|
A nyelvtan:
|
T0S=T1 |
T1a=T2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
T2S=T3 |
T3a=T4 |
T4S=T5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
T5b=T6 |
T5a=T7 |
T7S=T8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
T8b=T9 |
T8a=T10 |
T10S=T11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
T11b=T12 |
T11a=T10 |
|
|
|
|
|
|
|
Megjegyzés: T1-nél látni, hogy LR(0)-val ütközés lenne.
Nézzük a táblát:
|
a |
b |
|
a |
b |
S |
T0 |
2 |
|
2 |
|
|
T1 |
T1 |
S |
|
A |
T2 |
|
|
T2 |
2 |
|
|
|
|
T3 |
T3 |
S |
|
|
T4 |
|
|
T4 |
2 |
2 |
|
|
|
T5 |
T5 |
S |
S |
|
T7 |
T6 |
|
T6 |
1 |
|
1 |
|
|
|
T7 |
2 |
2 |
|
|
|
T8 |
T8 |
S |
S |
|
T10 |
T9 |
|
T9 |
1 |
|
|
|
|
|
T10 |
2 |
2 |
|
|
|
T11 |
T11 |
S |
S |
|
T10 |
T12 |
|
T12 |
1 |
1 |
|
|
|
|
És egy elemzés:
Accept.
|