Compiler Design and Construction - Old Questions
4. Construct SLR parse table for the following grammar.
6 marks
|
Asked in 2075
The augmented grammar of given grammar is:
S' → S
S → E
E → E+T | T
T → T*F | F
F → id
Next, we obtain the canonical collection of sets of LR(0) items, as follows,