Grammar
0 $accept: st $end
1 st: st exp
2 | exp
3 exp: exp OPA NUM
4 | NUM
Terminals, with rules where they appear
$end (0) 0
error (256)
NUM (258) 3 4
OPA (259) 3
Nonterminals, with rules where they appear
$accept (5)
on left: 0
st (6)
on left: 1 2, on right: 0 1
exp (7)
on left: 3 4, on right: 1 2 3
state 0
0 $accept: . st $end
NUM shift, and go to state 1
st go to state 2
exp go to state 3
state 1
4 exp: NUM .
$default reduce using rule 4 (exp)
state 2
0 $accept: st . $end
1 st: st . exp
$end shift, and go to state 4
NUM shift, and go to state 1
exp go to state 5
state 3
2 st: exp .
3 exp: exp . OPA NUM
OPA shift, and go to state 6
$default reduce using rule 2 (st)
state 4
0 $accept: st $end .
$default accept
state 5
1 st: st exp .
3 exp: exp . OPA NUM
OPA shift, and go to state 6
$default reduce using rule 1 (st)
state 6
3 exp: exp OPA . NUM
NUM shift, and go to state 7
state 7
3 exp: exp OPA NUM .
$default reduce using rule 3 (exp)