COMPILER DESIGN

LEXICAL ANALYSIS

REGULAR EXPRESSIONS AND FINITE AUTOMATA

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The symbols that can’t be replaced by anything are called ____
A
Productions
B
Terminals
C
Non-terminals
D
All of above
Explanation: 

Detailed explanation-1: -Terminal symbols are literal symbols that may appear in the outputs of the production rules of a formal grammar and which cannot be changed using the rules of the grammar.

Detailed explanation-2: -A terminal symbol is one of a set of symbols that appear explicitly in the specified language. A terminal symbol appears in boldface type. Examples of terminal symbols are: A, a, TRUE.

Detailed explanation-3: -A set of tokens, known as terminal symbols (). 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.

Detailed explanation-4: -Terminal symbols represent context that appear in the strings generated by the grammar. Nonterminal symbols are placeholders for patterns of terminal symbols that can be generated by nonterminals. A start symbol must be used as a special nonterminal to appear during the initial string generation.

Detailed explanation-5: -Terminal Symbols-Terminal symbols are the components of the sentences that are generated using grammar and are denoted using small case letters like a, b, c etc. Non-Terminal Symbols-Non-Terminal Symbols take part in the generation of the sentence but are not the component of the sentence.

There is 1 question to complete.