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.
8 years ago
Erez Shinan
6d76a4ce8d
visitor_args -> v_args
8 years ago
Erez Shinan
6bfc27c11d
New transformers near completion
Nearley tool still needs fixing
8 years ago
Erez Shinan
4864a1cf4d
More work
8 years ago
Erez Shinan
5e546f38a9
args decorators actually work now
8 years ago
Erez Shinan
2b4ef11ebf
Columns now start at 1
8 years ago
Erez Shinan
4a5aa745ea
All tests passing
8 years ago
Erez Shinan
cf7ddeee88
Earley working too
8 years ago
Erez Shinan
67f372c994
Symbols instead of strings - initial
8 years ago
DrSlump
e69d567bce
example driven parser errors
8 years ago
Erez Shinan
c3bce19dc2
More steps towards a good solution
8 years ago
Erez Shinan
349a607ae3
Some more normalizing
8 years ago
Erez Shinan
61afbed17a
A minor style fix (a possible memory usage improvement)
8 years ago
Erez Shinan
b951b5f79c
Significant reduction in memory consumption (Saving only parse-table instead of analysis instance)
8 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 .
8 years ago
Erez Shinan
4f2330fc9b
Fixed bug in Earley prioritization
8 years ago
Erez Shinan
327cca8c00
Added 'considered_rules' to exceptions, to help users debug
8 years ago
Erez Shinan
bb0b9aa729
BUGFIX: Token and Derivation get compared in _compare_drv (Issue #91 )
8 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.
8 years ago
Erez Shinan
07f45a0bd3
Style fixes
8 years ago
Erez Shinan
b90b0a215f
Fixed reconstruct (Issue #72 )
8 years ago
Erez Shinan
9d84c52140
Better error message for reduce collisions in lalr
8 years ago
Erez Shinan
6c28010581
Simplified grammar analysis. Improved performance of FIRST/FOLLOW calculations
8 years ago
Erez Shinan
710cb6d20b
Added more information in UnexpectedInput exception (Issue #78 )
8 years ago
Erez Shinan
3d8b8b4725
A few more adaptations
8 years ago
Erez Shinan
648099d7b4
Idiomatic function names and a few other style fixes
8 years ago
Erez Shinan
748e9b7248
All relevant tests passing. Also indentation and other refactoring.
8 years ago
Ehud Tamir
7c253b9372
Merge CYK parser.
8 years ago
Erez Shinan
da1910f5b6
More refactoring towards standalone
8 years ago
Erez Shinan
7182ba3991
Minor refactoring for the standalone tool (in progress)
8 years ago
Erez Shinan
38c5fd244a
Improved grammar validation and refactored the lexers
8 years ago
Erez Shinan
39e58cb8fd
Post-refactor cleanup
8 years ago
Erez Shinan
1cc4c965e8
Big Refactor: Grammars now build in half the time. Code shorter & cleaner.
8 years ago
Erez Shinan
0ee80e675a
Refactoring for LALR, added the ParseTable class
8 years ago
Erez Shinan
5f5acca40b
Cleaned up the LALR(1) parser
8 years ago
Erez Shinan
fbeb0e6e59
BUGFIX: tree-less transformer may hang for empty values (Issue #49 )
8 years ago
Erez Shinan
5748920df4
BUGFIX in xearley + Feature: earley__predict_all
8 years ago
Erez Shinan
852607b978
BUGFIX: Tokens of different type were equal, causing disambiguation errors (Issue #21 )
8 years ago
Erez Shinan
ddae93f92f
BUGFIX: Ambiguity resolution now sums priority (Issue #46 )
8 years ago
Erez Shinan
eb007b297c
Removed old versions of Earley parsers that are no longer used
8 years ago
Erez Shinan
e77433f19a
Superficial improvement to Earley
8 years ago
Erez Shinan
c91bb61a43
XEarley: Better exception when can't find a solution
8 years ago
Erez Shinan
6f85ca4294
%ignore bug fixed in xearley (thanks to issue #44 )
8 years ago
Erez Shinan
34449651bf
Added UnexpectedInput exception (with line & column) to xearley (Issue #43 )
8 years ago
Erez Shinan
eea569fa3a
Tiny fix
8 years ago
Erez Shinan
0155d3d956
A few more fixes
8 years ago
Erez Shinan
93302d7ceb
Important optimization for fix
8 years ago
Erez Shinan
c93140386d
BUGFIX: The Earley parser collected repeating derivations, and filtered them out much later than needed. This resulted in very long lists and many unnecessary comparisons.
8 years ago
Erez Shinan
a8aa908a4e
BUGFIX in Dynamic Earley when ending with an %ignore token
8 years ago
Erez Shinan
816266a5eb
BUGFIX for issue #24 : Dynamic Earley mishandled %ignore tokens
8 years ago