Commit graph

2195 commits

Author SHA1 Message Date
Max Brunsfeld
6c4d00aad5 Print diffs when tests fail 2019-01-07 22:01:40 -08:00
Max Brunsfeld
20fcffb393 Add parse subcommand
Co-Authored-By: Timothy Clem <timothy.clem@gmail.com>
2019-01-07 17:57:36 -08:00
Max Brunsfeld
8291d294fb Add test subcommand
Co-Authored-By: Timothy Clem <timothy.clem@gmail.com>
2019-01-07 17:57:27 -08:00
Max Brunsfeld
f059557a9d Move parser generation code in to 'generate' module within CLI crate 2019-01-07 10:23:01 -08:00
Max Brunsfeld
4e29fe69df Reduce lex table size by merging compatible entry point states 2019-01-07 09:59:04 -08:00
Max Brunsfeld
001f8c8f55 Rename LookaheadSet -> TokenSet
Also, replace non-standard `with` method with a `FromIterator` 
implementation.
2019-01-07 08:39:47 -08:00
Max Brunsfeld
dd416b0955 Update include paths to not reference 'runtime' directory 2019-01-04 17:33:34 -08:00
Max Brunsfeld
47607cecf4 Reorganize repo, add rust CLI and binding code, 2019-01-04 17:31:49 -08:00
Max Brunsfeld
97ca3bc2d1 Add rust tree-sitter runtime binding in lib directory 2019-01-04 17:16:34 -08:00
Max Brunsfeld
5b0e12ea33 Move code into cli directory 2019-01-04 16:50:52 -08:00
Max Brunsfeld
b8dd5d2640 Fix handling of precedence and associativity with inlining 2019-01-04 15:27:35 -08:00
Max Brunsfeld
d8f8bd288e Fix error in code generation w/ tokens that are internal and external 2019-01-04 15:27:15 -08:00
Max Brunsfeld
3a727af264 Add flag for logging the item set associated with a certain parse state 2019-01-04 15:26:48 -08:00
Max Brunsfeld
a0e65018ba Fix computation of MAX_ALIAS_SEQUENCE_LENGTH 2019-01-04 13:01:07 -08:00
Max Brunsfeld
ba96e4961b Simplify error handling, finish up LR conflict message generation 2019-01-04 12:42:45 -08:00
Max Brunsfeld
d0c3e26e84 Don't let lex state merging be fooled by trivial loops 2019-01-04 11:52:52 -08:00
Max Brunsfeld
baf7f3603c Mark fragile tokens 2019-01-04 11:52:16 -08:00
Max Brunsfeld
79b9d5ebed Fix minor differences in generated C code 2019-01-04 11:19:53 -08:00
Max Brunsfeld
d845b81ee9 Represent nfa transitions as structs with named fields, not tuples 2019-01-04 09:42:06 -08:00
Max Brunsfeld
cc0fbc0d93 Fix and simplify handling of precedence for completion of tokens 2019-01-04 09:12:05 -08:00
Max Brunsfeld
70aa4c2b2d Add a --no-minimize flag to suppress table minimization for debugging 2019-01-04 09:11:44 -08:00
Max Brunsfeld
bf9556dadc Fix recursive processing of rule inlining 2019-01-03 17:12:09 -08:00
Max Brunsfeld
5d3d161c05 Respect simple aliases in code gen 2019-01-03 14:08:24 -08:00
Max Brunsfeld
5a7d781aaa Fix logic for identifying error recovery tokens 2019-01-03 13:49:50 -08:00
Max Brunsfeld
70f00d1a1e Give immediate tokens higher implicit precedence than other tokens 2019-01-03 13:49:37 -08:00
Max Brunsfeld
c0f48dff6f Fix incorrect NFA generation for string rules 2019-01-03 11:52:57 -08:00
Max Brunsfeld
02ca84fb4a Add missing ';' in generated code 2019-01-03 11:52:45 -08:00
Max Brunsfeld
82fda8929e Add EOF actions to lex table 2019-01-03 11:50:35 -08:00
Max Brunsfeld
92d4fe419c Fix character set intersection bugs 2019-01-03 10:30:59 -08:00
Max Brunsfeld
3fbaff5e69 Fix various logic errors in parse table construction 2019-01-02 16:48:44 -08:00
Max Brunsfeld
9824ebbbc3 Implement lex table construction 2019-01-02 16:14:36 -08:00
Max Brunsfeld
a46b8fcb46 Implement parse state merging 2019-01-01 13:47:29 -08:00
Max Brunsfeld
c6b9e97c58 Implement token conflict map 2018-12-30 19:31:55 -08:00
Max Brunsfeld
605b50e58b Start work on shrinking parse table 2018-12-29 13:57:34 -08:00
Max Brunsfeld
479400e5d3 Add handling of precedence within tokens 2018-12-29 13:56:00 -08:00
Max Brunsfeld
5258ee2e6a Implement more C code generation 2018-12-23 14:19:18 -08:00
Max Brunsfeld
99ecf29e4b Fix typo causing infinite recursion in expand_regex 2018-12-23 10:15:23 -08:00
Max Brunsfeld
261a7fd073 Represent ParseItem with reference to Production
Implement comparisons in a way that disregards past steps.
2018-12-21 15:02:48 -08:00
Max Brunsfeld
a3dcfa0a52 Implement more of parse table generation 2018-12-20 13:36:39 -08:00
Max Brunsfeld
5eb8806959 Handle repetition ranges in regexes 2018-12-20 13:36:21 -08:00
Max Brunsfeld
988dc7de35 Handle precedence and aliases properly when inlining variables 2018-12-20 13:35:34 -08:00
Max Brunsfeld
d078c263b0 Fix bugs in grammar JSON parsing 2018-12-20 13:35:13 -08:00
Max Brunsfeld
143588c148 Implement ItemSetBuilder 2018-12-18 17:31:54 -08:00
Max Brunsfeld
889f232b4c Implement variable inlining 2018-12-18 16:05:36 -08:00
Max Brunsfeld
7bd9eaa970 0.3.5 2018-12-13 16:43:44 -08:00
Max Brunsfeld
d79203f58c Add test script 2018-12-13 16:42:46 -08:00
Max Brunsfeld
3f1fc65a27 Auto-format lib.rs 2018-12-13 16:32:22 -08:00
Max Brunsfeld
6d3835d292 Add Node::children method 2018-12-13 16:32:10 -08:00
Max Brunsfeld
bdd3f20522 Add PropertySheet::map method 2018-12-13 16:30:40 -08:00
Max Brunsfeld
4a361fbb3f Implement Copy for Node 2018-12-13 10:08:50 -08:00