Compiler Design and Construction - Old Questions

Question Answer Details

4.  Construct SLR parse table for the following grammar.

        

6 marks
Asked in 2075

Answer

AI Generated Answer

AI is thinking...

Official Answer

The augmented grammar of given grammar is:

S' → S

→ E

→ E+T | T

→ T*F | F

→ id

Next, we obtain the canonical collection of sets of LR(0) items, as follows,