The numbers above, 3 and 2, refer to rules listed at the bottom of the
file. I am learning about lemon and compared this to tables found online
about parsers but cannot understand where the DFA will go after the
Other states within lemon show a shift AND the number is the state where it
is going to next instead of a rule number. Here is the trace output from
the parser when using the rule. It shows we would reduce by rule 2 and then
go to state 3.
debug:Shift 'SEMI', pending reduce 2
debug:Return. Stack=[typelist TYPEDEF STRUCT IDENT LBLOCK memlist idlist
ptr idlist SEMI]
debug:Input 'RBLOCK' with pending reduce 2
debug:Reduce 2 [mem ::= idlist ptr idlist SEMI], go to state 3.
debug:... then shift 'mem', pending reduce 7
debug:Reduce 7 [memlist ::= memlist mem], go to state 1.
debug:... then shift 'memlist', go to state 3
debug:Shift 'RBLOCK', go to state 9
debug:Return. Stack=[typelist TYPEDEF STRUCT IDENT LBLOCK memlist RBLOCK]