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
eba99662c4
Bug in pretty printing of Earley derivations (issue #210 )
6 years ago
Erez Shinan
1247a8c330
Improved error messages (as pointed out in issue #181 )
6 years ago
Erez Shinan
6ea4588bcf
Dynamic lexer is now returns the maximum match only. Complete lexing beahvior moved to "dynamic_complete"
Changed dynamic lexer behavior to only match terminals to their maximum length (i.e. greedy match), emulating the standard lexer.
The original dynamic lexer behavior, that attempts to match all appearances of a terminal, has been moved to the "dynamic_complete" lexer.
For example, when applying a terminal "a"+ to the text "aaa":
- dynamic: ["aaa"]
- dynamic_complete: ["a", "aa", "aaa"]
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
6d76a4ce8d
visitor_args -> v_args
6 years ago
Erez Shinan
6bfc27c11d
New transformers near completion
Nearley tool still needs fixing
6 years ago
Erez Shinan
4864a1cf4d
More work
6 years ago
Erez Shinan
5e546f38a9
args decorators actually work now
6 years ago
Erez Shinan
2b4ef11ebf
Columns now start at 1
6 years ago
Erez Shinan
4a5aa745ea
All tests passing
6 years ago
Erez Shinan
cf7ddeee88
Earley working too
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
c3bce19dc2
More steps towards a good solution
6 years ago
Erez Shinan
349a607ae3
Some more normalizing
6 years ago
Erez Shinan
61afbed17a
A minor style fix (a possible memory usage improvement)
6 years ago
Erez Shinan
b951b5f79c
Significant reduction in memory consumption (Saving only parse-table instead of analysis instance)
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
4f2330fc9b
Fixed bug in Earley prioritization
6 years ago
Erez Shinan
327cca8c00
Added 'considered_rules' to exceptions, to help users debug
7 years ago
Erez Shinan
bb0b9aa729
BUGFIX: Token and Derivation get compared in _compare_drv (Issue #91 )
7 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
07f45a0bd3
Style fixes
7 years ago
Erez Shinan
b90b0a215f
Fixed reconstruct (Issue #72 )
7 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
710cb6d20b
Added more information in UnexpectedInput exception (Issue #78 )
7 years ago
Erez Shinan
3d8b8b4725
A few more adaptations
7 years ago
Erez Shinan
648099d7b4
Idiomatic function names and a few other style fixes
7 years ago
Erez Shinan
748e9b7248
All relevant tests passing. Also indentation and other refactoring.
7 years ago
Ehud Tamir
7c253b9372
Merge CYK parser.
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
38c5fd244a
Improved grammar validation and refactored the lexers
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
5748920df4
BUGFIX in xearley + Feature: earley__predict_all
7 years ago
Erez Shinan
852607b978
BUGFIX: Tokens of different type were equal, causing disambiguation errors (Issue #21 )
7 years ago
Erez Shinan
ddae93f92f
BUGFIX: Ambiguity resolution now sums priority (Issue #46 )
7 years ago
Erez Shinan
eb007b297c
Removed old versions of Earley parsers that are no longer used
7 years ago
Erez Shinan
e77433f19a
Superficial improvement to Earley
7 years ago
Erez Shinan
c91bb61a43
XEarley: Better exception when can't find a solution
7 years ago