Compiler Design and Construction - Old Questions
5. Consider the following grammar:
a. Show steps of shift-reduce parsing for the input string id+id*id.
b. Identify conflicts during the parsing.
6 marks
|
Asked in 2070
Given grammar;
a)
Input string: id + id * id
b)
Here, the shift-reduce conflict is encountered during the parsing. At $E+T, the conflict occured whether to reduce or shift during the parsing.