MCQ1 mark
Which ONE of the following statements is FALSE regarding the symbol table?
Single correct
GATE CSE previous year questions · Compiler Design
Single correct
stmt -> if expr then expr else expr; stmt | ε
expr -> term relop term | term
term -> id | number
id -> a | b | c
number -> [0-9]
where relop is a relational operator (e.g., <, >, …), ε refers to the empty statement, and if, then, else are terminals.
Consider a program following the above grammar containing ten if terminals. The number of control flow paths in is ________. For example, the program
if e1 then e2 else e3
has 2 control flow paths, e1 → e2 and e1 → e3.Numerical answer
Answer key coming soon
(P) Syntax tree (i) Code generator
(Q) Character stream (ii) Syntax analyzer
(R) Intermediate representation (iii) Semantic analyzer
(S) Token stream (iv) Lexical analyzerSingle correct
Answer key coming soon
(P) Lexical analysis (i) Leftmost derivation
(Q) Top down parsing (ii) Type checking
(R) Semantic analysis (iii) Regular expressions
(S) Runtime environments (iv) Activation recordsSingle correct
Answer key coming soon
Single correct