Answer to test yourself exercise 3 in Augmented Grammar handout
The productions of a left-to-right parser for Lxx. The start symbol is S[e].
- T ¬ a, where T.STR := "a"
- T ¬ b, where T.STR := "b"
- T0 ¬ T1 a, where T0.STR := "a"^T1.STR
- T0 ¬ T1 b, where T0.STR := "b"^T1.STR
- T ¬ S, where T.STR := S.STR
- S0 ¬ S1 a, where S0.STR := S1.STR ^ "a-1"
- S0 ¬ S1 b, where S0.STR := S1.STR ^ "b-1"