(→Problem) |
|||
Line 10: | Line 10: | ||
Input: 112110 | Input: 112110 | ||
+ | |||
+ | Is this an LR(0) grammar? | ||
== Solution == | == Solution == |
Contents[hide] |
S -> 1 S 1 | 1 X 0 | 2 X -> 2 | S 1 | X 2
Initial symbol: S
Terminals: { 0, 1, 2 }
Input: 112110
Is this an LR(0) grammar?