Java Reference
In-Depth Information
procedure T
ry
R
ule
I
n
S
tate
( s , r )
if LHS( r )
RHS( r )
•∈ s
then
foreach
X∈
Follow(LHS( r )) do
call A
ssert
E
ntry
( s ,X,
reduce r)
end
Figure 6.23: SLR(1) version of T
ry
R
ule
I
n
S
tate
.
State
num plus
times
$
Start
E
T
0
accept
2
3
1
1
3
3
7
2
5
5
5
3
4
5
4
2
6
5
1
6
2
2
7
7
8
8
4
4
4
Figure 6.24: SLR(1) parse table for the grammar in Figure 6.21.
 
Search WWH ::




Custom Search