Refactor generated parsers to used explicit table

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.
This commit is contained in:
Max Brunsfeld 2014-03-17 13:32:14 -07:00
parent 0d6435e24a
commit 67b33a615b
6 changed files with 938 additions and 1472 deletions

View file

@ -28,7 +28,7 @@ state_id ts_stack_top_state(const ts_stack *stack) {
return stack->entries[stack->size - 1].state;
}
ts_tree * ts_stack_root(ts_stack *stack) {
ts_tree * ts_stack_root(const ts_stack *stack) {
return stack->entries[0].node;
}