Max Brunsfeld
7df35f9b8d
Make separate types for syntax and lexical grammars
...
This way, the separator characters can be added as a field to
lexical grammars only
2014-06-25 13:27:16 -07:00
Max Brunsfeld
d5674d33c4
Add test helper stream method for pairs
2014-06-24 21:54:38 -07:00
Max Brunsfeld
81880e000e
Tweak header include paths in tests
2014-06-23 18:50:03 -07:00
Max Brunsfeld
6769659f59
Add vim YCM config file
2014-06-23 12:47:12 -07:00
Max Brunsfeld
240de1ca61
Reorder methods in c code generator
2014-06-18 08:21:43 -07:00
Max Brunsfeld
2c382b7363
Trim trailing whitespace
2014-06-16 21:33:35 -07:00
Max Brunsfeld
c312f985c8
Refactor c code generator
...
It's been rewritten in a less functional style. String copies were actually
taking significant time for large parsers.
2014-06-16 21:29:04 -07:00
Max Brunsfeld
1daaf4485f
Refactor item set transition functions
2014-06-16 13:37:34 -07:00
Max Brunsfeld
e953dbaa17
Update submodules recursively in configure script
2014-06-16 13:27:38 -07:00
Max Brunsfeld
17040e32ec
Remove unused version of first_set function
2014-06-16 13:25:30 -07:00
Max Brunsfeld
5c089d0563
Bump bandit
2014-06-16 13:21:03 -07:00
Max Brunsfeld
39c1ab2d50
Refactor item_set_closure
...
Inline unnecessary function
2014-06-16 13:20:39 -07:00
Max Brunsfeld
7a2c2c1c90
Store ParseItemSets as maps, w/ core items as keys
...
ParseItem no longer has a lookahead_sym field; it now represents
the 'core' of a parse item. The lookahead context is stored separately,
as a set per core item. This makes iterating, copying and merging item
sets more efficient, because before, the core items were repeated for each
different lookahead symbol.
Also, the memoization in sym_transitions(ParseItemSet) has been removed.
Maybe I'll add it back later.
2014-06-16 08:35:20 -07:00
Max Brunsfeld
d203c15911
Remove unneeded blank rule in lex table builder
2014-06-11 17:43:07 -07:00
Max Brunsfeld
cad6e0ed5f
Fix expected symbol count in lr parser
2014-06-11 16:44:38 -07:00
Max Brunsfeld
bb4d83ce47
Add regex postfix flags to javascript grammar
...
- Refactor statement terminators in javascript grammar
- Reorganize javascript language tests
2014-06-11 16:43:27 -07:00
Max Brunsfeld
082560dd6e
Fix operator precedence of '.' operator in js grammar
2014-06-11 14:01:38 -07:00
Max Brunsfeld
3cd031af38
Add keypattern rule helper
...
This way, pattern rules (e.g. golang's comment) can be easily given the
same precedence as keyword rules.
2014-06-11 12:40:49 -07:00
Max Brunsfeld
174f306e2a
Fix precedence of comments vs '/' operator
2014-06-11 12:27:58 -07:00
Max Brunsfeld
155a57d3ab
Prevent infinite loop on certain lex errors
2014-06-11 11:49:06 -07:00
Max Brunsfeld
4ad6278334
Add finally, instance of, typeof, in to js grammar
2014-06-11 11:49:06 -07:00
Max Brunsfeld
c91c5cb730
Add range statements to golang grammar
2014-06-10 14:11:25 -07:00
Max Brunsfeld
a42f498c59
Optimize merge_sym_transitions and merge_char_transitions
2014-06-10 14:01:32 -07:00
Max Brunsfeld
53bc633a22
Add var decl and if statements to golang grammar
2014-06-10 13:27:55 -07:00
Max Brunsfeld
1c93d5e1a6
Add declarations w/o initialization to golang grammar
2014-06-10 11:57:45 -07:00
Max Brunsfeld
3968f36a03
Reorganize golang specs
2014-06-10 11:39:36 -07:00
Max Brunsfeld
123d3b26d8
Add more expressions, statements to golang grammar
2014-06-10 11:33:05 -07:00
Max Brunsfeld
e105f5cebc
Remove inheritance link btwn PreparedGrammar and Grammar
2014-06-10 10:34:37 -07:00
Max Brunsfeld
11acc7d087
Fix missing initializer warnings
2014-06-09 21:47:57 -07:00
Max Brunsfeld
8d48c3e48a
Fix integer type incompatibility warnings in specs
2014-06-09 21:35:41 -07:00
Max Brunsfeld
1b1f53a5e7
Fix memory leaks in tests
2014-06-09 21:16:33 -07:00
Max Brunsfeld
21c259df9c
Clean up lint errors
2014-06-09 21:14:38 -07:00
Max Brunsfeld
54a555168d
Add accessor methods on Grammar
2014-06-09 21:05:25 -07:00
Max Brunsfeld
b4a34dd7c2
Add valgrind helper script
2014-06-09 13:24:30 -07:00
Max Brunsfeld
12331d66f5
Fix memory leaks
2014-06-09 13:12:44 -07:00
Max Brunsfeld
9bc7d51074
Always initialize tree node size and offset
2014-06-09 13:12:44 -07:00
Max Brunsfeld
4602690c1a
Fix lr parser spec for gcc
2014-06-08 23:34:08 +00:00
Max Brunsfeld
652fa2f8a5
Fix stack spec on gcc
2014-06-04 18:24:54 -07:00
Max Brunsfeld
deaa7e2755
Fix missing return warning on gcc
2014-06-04 13:39:12 -07:00
Max Brunsfeld
9a4889176e
Move lr_parser implementation into a separate .c file
2014-06-04 13:34:37 -07:00
Max Brunsfeld
63cde3967c
Add unit test for stack
...
- Also, fix bug where trees pushed onto the stack were not retained
2014-06-03 13:19:49 -07:00
Max Brunsfeld
baec9f2c9a
Move computation of tree size/offset into tree constructor
2014-06-02 13:32:36 -07:00
Max Brunsfeld
868a09b0b0
Remove infinite loop on certain lex errors
2014-06-01 23:23:24 -07:00
Max Brunsfeld
c7266f791e
Don't use std::tuples in parse regex spec
...
gcc doesn't let me use initializer list syntax for them
2014-06-01 17:34:18 -07:00
Max Brunsfeld
e93e254518
In lexer, prefer tokens to skipped separator characters
...
This was causing newlines in go and javascript to be parsed as
meaningless separator characters instead of statement terminators
2014-05-30 13:29:54 -07:00
Max Brunsfeld
220e081c49
Remove unnecessary methods on LexTable
2014-05-29 18:28:23 -07:00
Max Brunsfeld
2988cc5aa2
Show offending lookahead chars when pretty-printing trees w/ errors
2014-05-26 21:50:01 -07:00
Max Brunsfeld
844f73c193
Remove unnecessary comment rule from JS grammar
2014-05-26 21:48:35 -07:00
Max Brunsfeld
6f45380f71
Move type-related tests for go grammar into their own file
2014-05-26 21:48:00 -07:00
Max Brunsfeld
4c9ac3dada
Fix parsing of empty strings in javascript and golang
2014-05-20 09:47:26 -07:00