Max Brunsfeld
67b33a615b
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.
2014-03-17 18:43:17 -07:00
Max Brunsfeld
da992b77ff
Rename 'parse_config' export -> 'parser'
2014-03-15 14:48:28 -07:00
Max Brunsfeld
0dc3a95d0c
Refactor parser header
...
Make separate lexer, stack and parser structs.
2014-03-15 14:43:50 -07:00
Max Brunsfeld
c43ec90dad
Fix missing auxiliary tokens in lex error state
2014-02-27 00:38:08 -08:00
Max Brunsfeld
926b4ef242
Clean up parser.h
2014-02-27 00:06:22 -08:00
Max Brunsfeld
0d4687bdad
Make start and EOF symbols into builtin symbols
2014-02-26 23:18:49 -08:00
Max Brunsfeld
8b7ed13c8b
Add more error recovery tests for JSON
2014-02-26 22:58:45 -08:00
Max Brunsfeld
63718d5bad
Add basic support for error recovery
2014-02-26 19:03:43 -08:00
Max Brunsfeld
4541332c2b
Put definition of EOF symbol back in parse table builder (not in parser.h)
2014-02-25 13:25:58 -08:00
Max Brunsfeld
e58a6d8ba7
Start work on error recovery
...
- In runtime, make parse errors part of the parse tree
- Add error state to lexers in which they can accept any token
2014-02-24 18:42:54 -08:00
Max Brunsfeld
713b3899c5
Simplify logic for extracting tokens from grammar
2014-02-23 10:00:49 -08:00
Max Brunsfeld
688fe993cf
Remove rules that don't need to be public from compiler.h
2014-02-20 23:05:32 -08:00
Max Brunsfeld
6ed6aa05cc
Update runtime code naming
...
Also, add macros so that code generator doesn't
need to know about any runtime variables names
or types
2014-02-20 13:30:43 -08:00
Max Brunsfeld
acad97cfd2
Separate concepts of hidden and auxiliary symbols
...
This way, we can hide auxiliary symbols from library users,
but still allow them to use hidden symbols
2014-02-19 13:05:54 -08:00
Max Brunsfeld
fd757c20d0
Move example grammars from fixtures -> examples dir
2014-02-17 13:18:09 -08:00