This is slightly slower than encoding the parse table in flow control, but allows the parser to inspect the parse table more flexibly. This is needed for incremental parsing.
Make separate lexer, stack and parser structs.