![]() | ![]() | ![]() | SLR(1) parsing |
< S >
a < S > b < S > |
[ < S' >
. < S > $ ]
[ < S >
. a < S > b < S > ]
[ < S >
.
]
[ < S >
a . < S > b < S > ]
[ < S >
. a < S > b < S > ]
[ < S >
. ]
We can use this machine anyway, if we are willing to look ahead a bit.
S![]()
N x
2
![]()
x
2
![]()
1 x
2
Follow( N ) = { xVt | A
![]()
N x
} U {
if S
![]()
N }
![]() | ![]() | ![]() | SLR(1) parsing |