Assignment: LR(0) Course: COMP-451: Compiler Construction Section: B Assignment Statement: Create canonical LR(0) collec
-
- Posts: 43759
- Joined: Sat Aug 07, 2021 7:38 am
Assignment: LR(0) Course: COMP-451: Compiler Construction Section: B Assignment Statement: Create canonical LR(0) collec
Assignment: LR(0) Course: COMP-451: Compiler Construction Section: B Assignment Statement: Create canonical LR(0) collection for any given grammar. Example if the grammar is: S L = R | R *R | id L R → The output of the program should be all the states from the grammar. Io: S'→S 15: L→ id. SL= R S→ R 16: S→ L= R L→ *R R→ L L→ id L→ R R→ L L→ id I₁: S¹→ S. 17: L→ *R. I₂: S L = R 18: R→ L. R→ L Ig: S→ L= R 13: S → R 14: L→ *R R→ L L→ *R L→ id The program should contain the two main modules of LR(O): closure () and goto (). Due Date: June 15, 2022