Erez Shinan
3c64c56bcd
All tests passing
5 years ago
Erez Shinan
94e15fb6f7
Mid work. Almost stable
5 years ago
Erez Shinan
e52cc46fc5
Minor cleanup
5 years ago
Erez Shinan
d13ebb9c15
Using a mostly-generic serialization method
5 years ago
Erez Shinan
066303fdab
Serialized lark is now json compatible
5 years ago
Erez Shinan
335206911d
Basic serialize/deserialize working!
5 years ago
Erez Shinan
120d5b9ffa
Mid work
5 years ago
Erez Shinan
bd75bf2dff
Refactor - callbacks are now {rule: callback}, instead of a Callback object referenced by Rule.alias
5 years ago
Erez Shinan
a892f184e3
Fix LALR shift/reduce warnings when debug=True (Issue #258 )
6 years ago
Erez Shinan
106508dcce
Tiny improvement to the LALR parser
6 years ago
Erez Shinan
519b07ceca
Tiny refactor
6 years ago
Erez Shinan
4487bf65c1
EOF token now gets proper line/column number (Issue #228 )
6 years ago
Erez Shinan
bd7e331ad7
Slightly better error message (UnexpectedToken)
6 years ago
Erez Shinan
9ce8a79dc0
Misleading error message at unexpected EOF (Issue #220 )
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
DrSlump
e69d567bce
example driven parser errors
6 years ago
Erez Shinan
b951b5f79c
Significant reduction in memory consumption (Saving only parse-table instead of analysis instance)
6 years ago
Parker
ce26c7cced
Use loops for flow control instead of catching exceptions
While optimizing hot spots in a tool I wrote I saw this issue. Changing this to use a for loop granted a minor speed boost to my script.
7 years ago
Erez Shinan
6c28010581
Simplified grammar analysis. Improved performance of FIRST/FOLLOW calculations
7 years ago
Erez Shinan
da1910f5b6
More refactoring towards standalone
7 years ago
Erez Shinan
7182ba3991
Minor refactoring for the standalone tool (in progress)
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
fbeb0e6e59
BUGFIX: tree-less transformer may hang for empty values (Issue #49 )
7 years ago
Erez Shinan
9d065c9642
LALR parser: towards generating a standalone (very far away still)
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
64d141e486
BUGFIX: Fixes a subtle bug in the LALR(1) parser. See the new test for details.
7 years ago
Erez Shinan
c70355389f
Initial support for EBNF in tokens (automatic compilation to regexps)
8 years ago
Erez Shinan
8e7395c6d6
Improved earley.py and added some comments to both parsers
8 years ago
Erez Shinan
e4d3e74f6a
Finished refactoring
8 years ago
Erez Shinan
d5123812b0
Another step of refactoring
8 years ago
Erez Shinan
c8e6122148
Restored nice error reports
8 years ago
Erez Shinan
520ab88cd8
Added ContextualLexer for LALR. Working, but doesn't seem to improve speed.
Also some issues with python_parser
8 years ago
Erez Shinan
387fa07818
Moved unless handling to lexer and improved code
8 years ago
Erez Shinan
1602482608
Improved error reporting in Earley
8 years ago
Erez Shinan
977025fded
Small parser optimization
8 years ago
Erez Shinan
717eabba2c
A small parser optimization
8 years ago
Erez Shinan
772f1cc0aa
Improved error reporting
8 years ago
Erez Shinan
e201beab5f
Fixed lexer newline counter and other stuff
8 years ago
Erez Shinan
ab23c163d8
Fixed bug in lalr parser. Now testing both lalr & earley in test_parser
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
56f68655ca
Fixed a small bug in parser error reporting
8 years ago
Erez Shinan
2e8f74c774
Better error reporting in lexer and lalr parser
8 years ago
Erez Shinan
cde2b677bb
Added tests and lots of fixes and refactoring
8 years ago
Erez Shinan
9e71f5a045
Added indentation support (for python-like languages)
8 years ago
Erez Shinan
d44658fa3f
Now supports empty rules. Added some tests. All tests passing.
8 years ago