Max Brunsfeld
abbc282950
Add a public function for printing debugging graphs
2016-02-23 11:16:50 -08:00
Max Brunsfeld
3d7df851b5
Rename Vector -> Array
2016-02-17 20:41:29 -08:00
Max Brunsfeld
6fa7eca966
Make vector struct type-safe
2016-02-17 15:30:47 -08:00
Max Brunsfeld
1543a6c7b0
Handle allocation failures when instantiating documents
2016-01-18 11:32:10 -08:00
Max Brunsfeld
13d8de3eb3
Remove stack head after it is accepted
2015-12-24 22:04:20 -08:00
Max Brunsfeld
6abce098c0
Track whether parse stack was split before consuming each lookahead
2015-12-10 13:00:27 -08:00
Max Brunsfeld
26e34ddcbb
Allow all parse stack heads to finish
2015-12-08 13:01:33 -08:00
Max Brunsfeld
32b1088823
Rename HeadState -> LookaheadState, remove parser.lookahead field
2015-11-20 12:55:01 -08:00
Max Brunsfeld
c88e9044d5
Make stack popping more robust
2015-11-20 00:04:21 -08:00
Max Brunsfeld
64874449e4
Allow different parse stack heads to lex differently
2015-11-19 20:55:18 -08:00
Max Brunsfeld
f37f73f92f
Add ability to edit multiple times between parses
2015-09-18 23:20:06 -07:00
Max Brunsfeld
6254f45c1b
Rename ParseStack -> Stack
2015-09-18 22:02:06 -07:00
Max Brunsfeld
b3d883e128
Store edits in trees, not by splitting stack
...
This allows for multiple edits per parse, though it is not exposed through
the API yet
2015-09-18 22:02:06 -07:00
Max Brunsfeld
252fa7b631
Add Document getter methods for input, language
2015-09-08 23:33:43 -07:00
Max Brunsfeld
54e40b8146
Rework AST access API: reduce heap allocation
2015-07-31 15:47:48 -07:00
Max Brunsfeld
442db56b92
Use graph-structured parse stack in parser
...
Not using the splitting feature yet.
2015-06-18 17:03:17 -07:00
Max Brunsfeld
f7e4445358
Handle goto actions after reductions in a more standard way
...
Rather than letting the reduced tree become the new lookahead symbol,
and re-adding it to the stack via a subsequent shift action, just
add it to the stack as part of the reduce action. This is more in
line with the way LR is described traditionally.
2015-05-27 10:53:02 -07:00
Max Brunsfeld
8cf800ef5d
Unify debugging API for parsing and lexing
2014-10-17 17:52:54 -07:00
Max Brunsfeld
c594208ab8
Allow callbacks to be specified for debug output
2014-10-13 01:02:18 -07:00
Max Brunsfeld
4dcc712a8c
Start work on re-using right side of parse tree
2014-10-09 19:58:15 -07:00
Max Brunsfeld
4327f3ed26
Refactor parser and stack
2014-08-09 01:03:55 -07:00
Max Brunsfeld
eecbcccee0
Remove generated parsers' dependency on the runtime library
...
Generated parsers no longer export a parser constructor function.
They now export an opaque Language object which can be set on
Documents directly. This way, the logic for constructing parsers
lives entirely in the runtime. The Languages are just structs which
have no load-time dependency on the runtime
2014-07-30 23:40:02 -07:00