GATE 2003
January 26, 2024GATE 1992
January 26, 2024Compiler-Design
|
Question 42
|
(a) Construct all the parse trees corresponding to i + j * k for the grammar
E → E+E
E → E*E
E → id
- (b) In this grammar, what is the precedence of the two operators * and +?
(c) If only one parse tree is desired for any string in the same language, what
changes are to be made so that the resulting LALR(1) grammar is non-ambiguous?
|
Theory Explanation is given below.
|
Correct Answer: A
