Commit graph

40 commits

Author SHA1 Message Date
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
3aaa08b948 Fix some egregiously long lines 2014-03-09 23:58:25 -07:00
Max Brunsfeld
a4120f36d4 Remove all uses of 'using namespace' 2014-03-09 22:45:33 -07:00
Max Brunsfeld
de5deeeb69 Remove spurious semicolons 2014-03-09 22:24:52 -07:00
Max Brunsfeld
661314cf4e Remove all non const reference parameters 2014-03-09 22:21:58 -07:00
Max Brunsfeld
a411e43484 Rename source files: .cpp -> .cc 2014-03-09 22:13:08 -07:00
Max Brunsfeld
31a58bc7e4 Make include guards pass cpplint 2014-03-09 22:05:24 -07:00
Max Brunsfeld
eb30429700 Make paths explicit in #includes 2014-03-09 21:43:14 -07:00
Max Brunsfeld
39aa0ccc91 Add script to trim whitespace 2014-03-09 19:49:35 -07:00
Max Brunsfeld
af64d3fffa Build with all warnings enabled
Fix resulting warnings
2014-03-04 18:28:28 -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
7251456cd2 Move some general code generation helpers into their own file 2014-02-26 19:08:07 -08:00
Max Brunsfeld
63718d5bad Add basic support for error recovery 2014-02-26 19:03:43 -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
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
2c56612650 Get makefile working 2014-02-18 09:07:00 -08:00
Max Brunsfeld
d09fa910ef Put public headers in tree_sitter directory 2014-02-17 12:53:57 -08:00
Max Brunsfeld
9e2dc14182 Extract public compiler API into its own header file 2014-02-17 12:40:46 -08:00
Max Brunsfeld
0b4e1c8d0d Remove unused import in generated parsers 2014-02-15 22:26:41 -08:00
Max Brunsfeld
812f27f43a Clean up using statements 2014-02-12 23:06:26 -08:00
Max Brunsfeld
15c9e2d398 Make ordering of cases deterministic in generated parsers 2014-02-10 18:38:01 -08:00
Max Brunsfeld
8baa1396fd Properly merge transitions on overlapping character sets! 2014-02-10 13:20:43 -08:00
Max Brunsfeld
df3397f02c Implement character set difference 2014-02-07 12:57:35 -08:00
Max Brunsfeld
8b1aeee0e3 Remove unused ‘unexpected token’ handling 2014-02-06 09:06:52 -08:00
Max Brunsfeld
d3d25f2683 Represent character sets as sets of character ranges 2014-02-05 18:56:04 -08:00
Max Brunsfeld
8cce11a52a Rename Character -> CharacterSet, CharacterMatch -> CharacterRange 2014-02-03 13:05:51 -08:00
Max Brunsfeld
0d3a941848 Add support for character ranges in regex patterns 2014-01-30 18:54:39 -08:00
Max Brunsfeld
7f62e752be Allow Character rules to handle arbitrary character sets 2014-01-30 08:34:20 -08:00
Max Brunsfeld
7d297f2f9e Remove auxiliary rules from syntax tree 2014-01-28 22:09:37 -08:00
Max Brunsfeld
fd0d77ef8b Separate auxiliary rules from user-specified rules 2014-01-28 13:27:30 -08:00
Max Brunsfeld
ca33c3942a In parse table, store symbols as Symbol objects, not strings 2014-01-27 13:40:10 -08:00
Max Brunsfeld
5d9dc71da1 Remove default_actions from ParseTable 2014-01-25 23:40:51 -08:00
Max Brunsfeld
5eb5b61c14 Don’t pass rule names to code generator separately from parse tables 2014-01-25 20:45:00 -08:00
Max Brunsfeld
5776846227 Make compile take a name argument
Start work on JSON fixture grammar
2014-01-23 13:48:07 -08:00
Max Brunsfeld
e174b89133 Treat end of input like a normal token 2014-01-22 23:04:11 -08:00
Max Brunsfeld
92cec5758f Reorganize compiler directory 2014-01-11 15:14:17 -08:00