*** FINAL STATES***
-- State 0 0x1191330 --
Kernel:
start : . expr
-> Shift on '(' to state 3
<- Shift/Reduce on '@INTEGER' by production 'factor : @@INTEGER'
-> Goto state 1 on 'expr'
-> Goto state 2 on 'term'
<- Goto/Reduce by production 'term : factor' in 'factor'
-- State 1 0x11925a0 --
Kernel:
start : expr . [ @@eof ]
expr : expr . @+ term
expr : expr . @- term
-> Shift on '+' to state 4
-> Shift on '-' to state 5
<- Reduce on '@eof' by production 'start : expr'
-- State 2 0x1192830 --
Kernel:
expr : term . [ @- @) @+ @@eof ]
term : term . @* factor
term : term . @/ factor
-> Shift on '*' to state 6
-> Shift on '/' to state 7
<- Reduce on '-' by production 'expr : term'
<- Reduce on ')' by production 'expr : term'
<- Reduce on '+' by production 'expr : term'
<- Reduce on '@eof' by production 'expr : term'
-- State 3 0x1192b10 --
Kernel:
factor : @( . expr @)
<- Shift/Reduce on '@INTEGER' by production 'factor : @@INTEGER'
-> Goto state 8 on 'expr'
-> Goto state 2 on 'term'
<- Goto/Reduce by production 'term : factor' in 'factor'
-- State 4 0x1192e90 --
Kernel:
expr : expr @+ . term
-> Shift on '(' to state 3
<- Shift/Reduce on '@INTEGER' by production 'factor : @@INTEGER'
-> Goto state 9 on 'term'
<- Goto/Reduce by production 'term : factor' in 'factor'
-- State 5 0x1193080 --
Kernel:
expr : expr @- . term
-> Shift on '(' to state 3
<- Shift/Reduce on '@INTEGER' by production 'factor : @@INTEGER'
-> Goto state 10 on 'term'
<- Goto/Reduce by production 'term : factor' in 'factor'
-- State 6 0x11936d0 --
Kernel:
term : term @* . factor
-> Shift on '(' to state 3
<- Shift/Reduce on '@INTEGER' by production 'factor : @@INTEGER'
<- Goto/Reduce by production 'term : term @* factor' in 'factor'
-- State 7 0x11938c0 --
Kernel:
term : term @/ . factor
-> Shift on '(' to state 3
<- Shift/Reduce on '@INTEGER' by production 'factor : @@INTEGER'
<- Goto/Reduce by production 'term : term @/ factor' in 'factor'
-- State 8 0x1194640 --
Kernel:
factor : @( expr . @)
expr : expr . @+ term
expr : expr . @- term
<- Shift/Reduce on ')' by production 'factor : @( expr @)'
-> Shift on '+' to state 4
-> Shift on '-' to state 5
-- State 9 0x11956f0 --
Kernel:
expr : expr @+ term . [ @- @) @+ @@eof ]
term : term . @* factor
term : term . @/ factor
-> Shift on '*' to state 6
-> Shift on '/' to state 7
<- Reduce on '-' by production 'expr : expr @+ term'
<- Reduce on ')' by production 'expr : expr @+ term'
<- Reduce on '+' by production 'expr : expr @+ term'
<- Reduce on '@eof' by production 'expr : expr @+ term'
-- State 10 0x1196080 --
Kernel:
expr : expr @- term . [ @- @) @+ @@eof ]
term : term . @* factor
term : term . @/ factor
-> Shift on '*' to state 6
-> Shift on '/' to state 7
<- Reduce on '-' by production 'expr : expr @- term'
<- Reduce on ')' by production 'expr : expr @- term'
<- Reduce on '+' by production 'expr : expr @- term'
<- Reduce on '@eof' by production 'expr : expr @- term'
#00: columns=24 accept=-1 default=-1 trans=47(/);47(/):01 trans=45(-);45(-):02 trans=43(+);43(+):03 trans=41());41()):04 trans=48(0);57(9):05 trans=40(();40(():06 trans=42(*);42(*):07
#01: columns=3 accept=5 default=-1
#02: columns=3 accept=4 default=-1
#03: columns=3 accept=3 default=-1
#04: columns=3 accept=8 default=-1
#05: columns=6 accept=2 default=-1 trans=48(0);57(9):05
#06: columns=3 accept=7 default=-1
#07: columns=3 accept=6 default=-1
>>>
00: sym: '(X)' state: 0 token: (X)((X))
get token
Token 2 len 1 lexem >1<
got token '@INTEGER' lexem '1'
shift/reduce by production 8
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '@INTEGER' state: -1 token: @INTEGER(1)
reduce by production 8
popping 1 items off the stack, replacing by 'factor'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'factor' state: -1 token: (X)((X))
reduce by production 6
popping 1 items off the stack, replacing by 'term'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'term' state: 2 token: (X)((X))
get token
Token 6 len 1 lexem >*<
got token '*' lexem '*'
shift to state 6
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'term' state: 2 token: (X)((X))
02: sym: '*' state: 6 token: *(*)
get token
Token 2 len 1 lexem >2<
got token '@INTEGER' lexem '2'
shift/reduce by production 8
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'term' state: 2 token: (X)((X))
02: sym: '*' state: 6 token: *(*)
03: sym: '@INTEGER' state: -1 token: @INTEGER(2)
reduce by production 8
popping 1 items off the stack, replacing by 'factor'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'term' state: 2 token: (X)((X))
02: sym: '*' state: 6 token: *(*)
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'term' state: 2 token: (X)((X))
02: sym: '*' state: 6 token: *(*)
03: sym: 'factor' state: -1 token: (X)((X))
reduce by production 4
popping 3 items off the stack, replacing by 'term'
<<<
<<<
<<<
00: sym: '(X)' state: 0 token: (X)((X))
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'term' state: 2 token: (X)((X))
get token
Token 3 len 1 lexem >+<
got token '+' lexem '+'
reduce by production 3
popping 1 items off the stack, replacing by 'expr'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
get token
got token '+' lexem '+'
shift to state 4
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
02: sym: '+' state: 4 token: +(+)
get token
Token 2 len 1 lexem >3<
got token '@INTEGER' lexem '3'
shift/reduce by production 8
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
02: sym: '+' state: 4 token: +(+)
03: sym: '@INTEGER' state: -1 token: @INTEGER(3)
reduce by production 8
popping 1 items off the stack, replacing by 'factor'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
02: sym: '+' state: 4 token: +(+)
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
02: sym: '+' state: 4 token: +(+)
03: sym: 'factor' state: -1 token: (X)((X))
reduce by production 6
popping 1 items off the stack, replacing by 'term'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
02: sym: '+' state: 4 token: +(+)
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
02: sym: '+' state: 4 token: +(+)
03: sym: 'term' state: 9 token: (X)((X))
get token
EOF read
got token '@eof' lexem ''
reduce by production 1
popping 3 items off the stack, replacing by 'expr'
<<<
<<<
<<<
00: sym: '(X)' state: 0 token: (X)((X))
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
get token
got token '@eof' lexem ''
reduce by production 0
popping 1 items off the stack, replacing by 'start'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
goal symbol reduced!
add
mul
@INTEGER = >1<
@INTEGER = >2<
@INTEGER = >3<
------------------------------
>>>
00: sym: '(X)' state: 0 token: (X)((X))
get token
Token 7 len 1 lexem >(<
got token '(' lexem '('
shift to state 3
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
get token
Token 2 len 1 lexem >7<
got token '@INTEGER' lexem '7'
shift/reduce by production 8
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
02: sym: '@INTEGER' state: -1 token: @INTEGER(7)
reduce by production 8
popping 1 items off the stack, replacing by 'factor'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
02: sym: 'factor' state: -1 token: (X)((X))
reduce by production 6
popping 1 items off the stack, replacing by 'term'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
02: sym: 'term' state: 2 token: (X)((X))
get token
Token 3 len 1 lexem >+<
got token '+' lexem '+'
reduce by production 3
popping 1 items off the stack, replacing by 'expr'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
02: sym: 'expr' state: 8 token: (X)((X))
get token
got token '+' lexem '+'
shift to state 4
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
02: sym: 'expr' state: 8 token: (X)((X))
03: sym: '+' state: 4 token: +(+)
get token
Token 2 len 1 lexem >3<
got token '@INTEGER' lexem '3'
shift/reduce by production 8
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
02: sym: 'expr' state: 8 token: (X)((X))
03: sym: '+' state: 4 token: +(+)
04: sym: '@INTEGER' state: -1 token: @INTEGER(3)
reduce by production 8
popping 1 items off the stack, replacing by 'factor'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
02: sym: 'expr' state: 8 token: (X)((X))
03: sym: '+' state: 4 token: +(+)
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
02: sym: 'expr' state: 8 token: (X)((X))
03: sym: '+' state: 4 token: +(+)
04: sym: 'factor' state: -1 token: (X)((X))
reduce by production 6
popping 1 items off the stack, replacing by 'term'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
02: sym: 'expr' state: 8 token: (X)((X))
03: sym: '+' state: 4 token: +(+)
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
02: sym: 'expr' state: 8 token: (X)((X))
03: sym: '+' state: 4 token: +(+)
04: sym: 'term' state: 9 token: (X)((X))
get token
Token 8 len 1 lexem >)<
got token ')' lexem ')'
reduce by production 1
popping 3 items off the stack, replacing by 'expr'
<<<
<<<
<<<
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
02: sym: 'expr' state: 8 token: (X)((X))
get token
got token ')' lexem ')'
shift/reduce by production 7
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: '(' state: 3 token: ((()
02: sym: 'expr' state: 8 token: (X)((X))
03: sym: ')' state: -1 token: )())
reduce by production 7
popping 3 items off the stack, replacing by 'factor'
<<<
<<<
<<<
00: sym: '(X)' state: 0 token: (X)((X))
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'factor' state: -1 token: (X)((X))
reduce by production 6
popping 1 items off the stack, replacing by 'term'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'term' state: 2 token: (X)((X))
get token
Token 6 len 1 lexem >*<
got token '*' lexem '*'
shift to state 6
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'term' state: 2 token: (X)((X))
02: sym: '*' state: 6 token: *(*)
get token
Token 2 len 1 lexem >2<
got token '@INTEGER' lexem '2'
shift/reduce by production 8
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'term' state: 2 token: (X)((X))
02: sym: '*' state: 6 token: *(*)
03: sym: '@INTEGER' state: -1 token: @INTEGER(2)
reduce by production 8
popping 1 items off the stack, replacing by 'factor'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'term' state: 2 token: (X)((X))
02: sym: '*' state: 6 token: *(*)
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'term' state: 2 token: (X)((X))
02: sym: '*' state: 6 token: *(*)
03: sym: 'factor' state: -1 token: (X)((X))
reduce by production 4
popping 3 items off the stack, replacing by 'term'
<<<
<<<
<<<
00: sym: '(X)' state: 0 token: (X)((X))
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'term' state: 2 token: (X)((X))
get token
Token 4 len 1 lexem >-<
got token '-' lexem '-'
reduce by production 3
popping 1 items off the stack, replacing by 'expr'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
get token
got token '-' lexem '-'
shift to state 5
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
02: sym: '-' state: 5 token: -(-)
get token
Token 2 len 1 lexem >5<
got token '@INTEGER' lexem '5'
shift/reduce by production 8
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
02: sym: '-' state: 5 token: -(-)
03: sym: '@INTEGER' state: -1 token: @INTEGER(5)
reduce by production 8
popping 1 items off the stack, replacing by 'factor'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
02: sym: '-' state: 5 token: -(-)
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
02: sym: '-' state: 5 token: -(-)
03: sym: 'factor' state: -1 token: (X)((X))
reduce by production 6
popping 1 items off the stack, replacing by 'term'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
02: sym: '-' state: 5 token: -(-)
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
02: sym: '-' state: 5 token: -(-)
03: sym: 'term' state: 10 token: (X)((X))
get token
EOF read
got token '@eof' lexem ''
reduce by production 2
popping 3 items off the stack, replacing by 'expr'
<<<
<<<
<<<
00: sym: '(X)' state: 0 token: (X)((X))
>>>
00: sym: '(X)' state: 0 token: (X)((X))
01: sym: 'expr' state: 1 token: (X)((X))
get token
got token '@eof' lexem ''
reduce by production 0
popping 1 items off the stack, replacing by 'start'
<<<
00: sym: '(X)' state: 0 token: (X)((X))
goal symbol reduced!
sub
mul
add
@INTEGER = >7<
@INTEGER = >3<
@INTEGER = >2<
@INTEGER = >5<