symbol stack:
state stack: 0
- read next symbol: NUM
action at (0, NUM) is -1
- reduce: by rule 1. after reduction: goto state=1, lookahead=NUM
symbol stack: input
state stack: 0, 1
action at (1, NUM) is 6
- shift: state 6.
symbol stack: input, NUM
state stack: 0, 1, 6
- reduce: by rule 6. after reduction: goto state=4, lookahead=input
symbol stack: input, exp
state stack: 0, 1, 4
- read next symbol: +
action at (4, +) is 10
- shift: state 10.
symbol stack: input, exp, +
state stack: 0, 1, 4, 10
- read next symbol: NUM
action at (10, NUM) is 6
- shift: state 6.
symbol stack: input, exp, +, NUM
state stack: 0, 1, 4, 10, 6
- reduce: by rule 6. after reduction: goto state=19, lookahead=input
symbol stack: input, exp, +, exp
state stack: 0, 1, 4, 10, 19
- read next symbol: *
action at (19, *) is 9
- shift: state 9.
symbol stack: input, exp, +, exp, *
state stack: 0, 1, 4, 10, 19, 9
- read next symbol: NUM
action at (9, NUM) is 6
- shift: state 6.
symbol stack: input, exp, +, exp, *, NUM
state stack: 0, 1, 4, 10, 19, 9, 6
- reduce: by rule 6. after reduction: goto state=18, lookahead=input
symbol stack: input, exp, +, exp, *, exp
state stack: 0, 1, 4, 10, 19, 9, 18
- read next symbol: -
action at (18, -) is -9
- reduce: by rule 9. after reduction: goto state=19, lookahead=-
symbol stack: input, exp, +, exp
state stack: 0, 1, 4, 10, 19
action at (19, -) is -7
- reduce: by rule 7. after reduction: goto state=4, lookahead=-
symbol stack: input, exp
state stack: 0, 1, 4
action at (4, -) is 11
- shift: state 11.
symbol stack: input, exp, -
state stack: 0, 1, 4, 11
- read next symbol: NUM
action at (11, NUM) is 6
- shift: state 6.
symbol stack: input, exp, -, NUM
state stack: 0, 1, 4, 11, 6
- reduce: by rule 6. after reduction: goto state=20, lookahead=input
symbol stack: input, exp, -, exp
state stack: 0, 1, 4, 11, 20
- read next symbol: \n
action at (20, \n) is -8
- reduce: by rule 8. after reduction: goto state=4, lookahead=\n
symbol stack: input, exp
state stack: 0, 1, 4
action at (4, \n) is 14
- shift: state 14.
symbol stack: input, exp, \n
state stack: 0, 1, 4, 14
- reduce: by rule 4. after reduction: goto state=2, lookahead=input
symbol stack: input, line
state stack: 0, 1, 2
- reduce: by rule 2. after reduction: goto state=1, lookahead=input
symbol stack: input
state stack: 0, 1
- read next symbol: EOF
action at (1, EOF) is 0
- valid accept