Erez Sh
3bee21051e
Reverted changes regarding EOF
4 years ago
Erez Shinan
8466981c08
Cleanup
5 years ago
Raekye
0c59cba3f5
implement DeRemer and Pennello's lookahead algorithm for LALR(1)
5 years ago
Raekye
6f412c25b7
LALR optimizations and profiling
5 years ago
Raekye
21c41e54a9
lalr parser
5 years ago
Erez Shinan
8e9da6a6d6
Minor optimization in LALR (and fix for last commit)
5 years ago
Erez Shinan
39b0d76914
Minor optimization in LALR (thanks to @Raekye )
5 years ago
Erez Shinan
c87cbc6322
Removed some dead code
5 years ago
Erez Shinan
aa75d50bd5
End symbol working for lalr + fixed validation for undefined %ignore
5 years ago
Erez Shinan
71fe87964a
Small refactor in grammar analysis
5 years ago
Erez Shinan
f1e844accd
Mid work. Not promising
5 years ago
Erez Shinan
00510edee6
Added a nicer error for duplicate rules
6 years ago
Erez Shinan
a892f184e3
Fix LALR shift/reduce warnings when debug=True (Issue #258 )
6 years ago
Erez Shinan
6c8ba76b79
Fixed a deep bug in grammar analysis involving empty rules (Issue #250 )
6 years ago
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