MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
words of a language constitute
A
set of terminals
B
set of non terminals
C
both
D
none
Explanation: 

Detailed explanation-1: -Terminal symbols are the elementary symbols of the language defined by a formal grammar. Nonterminal symbols (or syntactic variables) are replaced by groups of terminal symbols according to the production rules. The terminals and nonterminals of a particular grammar are two disjoint sets.

Detailed explanation-2: -Context-free languages may be specified using a context-free grammar (CFG). A CFG consists of terminals, nonterminals, and productions: Terminals are symbols in the languageā€™s alphabet. By convention, we write them as lower-case letters. Nonterminals are placeholders in productions.

Detailed explanation-3: -Terminals are the basic symbols from which strings are formed. A set of non-terminals . Non-terminals are syntactic variables that denote sets of strings. The non-terminals define sets of strings that help define the language generated by the grammar.

Detailed explanation-4: -Terminals are the basic symbols from which strings are formed. A set of productions (P). The productions of a grammar specify the manner in which the terminals and non-terminals can be combined to form strings.

There is 1 question to complete.