Erez Shinan
5c6df8e825
Moved and restructured exceptions
* All exceptions are now under exceptions.py
* UnexpectedInput is now superclass of UnexpectedToken and UnexpectedCharacters,
all of which support the get_context() and match_examples() methods.
6 years ago
Erez Shinan
67f372c994
Symbols instead of strings - initial
6 years ago
Erez Shinan
61afbed17a
A minor style fix (a possible memory usage improvement)
6 years ago
Erez Shinan
ba0dc789a3
Significantly better memory performance (Thanks @drslump!)
Added __slots__ to RulePtr and Token, resulting in significantly lower memory consumption.
As suggested by @drslump .
6 years ago
Erez Shinan
9d84c52140
Better error message for reduce collisions in lalr
7 years ago
Erez Shinan
6c28010581
Simplified grammar analysis. Improved performance of FIRST/FOLLOW calculations
7 years ago
Erez Shinan
39e58cb8fd
Post-refactor cleanup
7 years ago
Erez Shinan
1cc4c965e8
Big Refactor: Grammars now build in half the time. Code shorter & cleaner.
7 years ago
Erez Shinan
0ee80e675a
Refactoring for LALR, added the ParseTable class
7 years ago
Erez Shinan
5f5acca40b
Cleaned up the LALR(1) parser
7 years ago
Erez Shinan
eb007b297c
Removed old versions of Earley parsers that are no longer used
7 years ago
Erez Shinan
4eec924403
Added prioritization to Earley. Use rule.1 etc. Highest priority will be selected in case of ambiguity.
7 years ago
Erez Shinan
a73cc9ad90
Re-wrote the Earley parser to use a parse-forest
It now knows how to resolve ambiguity! And in a memory-efficient way!
8 years ago
Erez Shinan
9f00b3fab7
Re-wrote Earley's mainloop implementation. Better performance.
Now uses Column & NewsList instead of sets.
8 years ago
Erez Shinan
538f944602
My Earley parser is working
8 years ago
Erez Shinan
d5123812b0
Another step of refactoring
8 years ago
Erez Shinan
b95567c4a7
Another refactoring step
8 years ago
Erez Shinan
972034fd2d
Began refactoring of lalr_analysis -> grammar_analysis
8 years ago
Erez Shinan
f31482c236
Lint treatment
8 years ago
Erez Shinan
eabb86860d
Added parsimonious to benchmarks
8 years ago
Erez Shinan
977025fded
Small parser optimization
8 years ago
Erez Shinan
115c4c6d21
A little order and refactoring
8 years ago
Erez Shinan
f1b2e1926c
Now supports Python3!
8 years ago
Erez Shinan
cde2b677bb
Added tests and lots of fixes and refactoring
8 years ago
Erez Shinan
d44658fa3f
Now supports empty rules. Added some tests. All tests passing.
8 years ago
Erez Shinan
73178d6ae0
Lark big first commit. Examples working.
8 years ago