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
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
327cca8c00
Added 'considered_rules' to exceptions, to help users debug
7 years ago
Erez Shinan
07f45a0bd3
Style fixes
7 years ago
Erez Shinan
710cb6d20b
Added more information in UnexpectedInput exception (Issue #78 )
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
5748920df4
BUGFIX in xearley + Feature: earley__predict_all
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
Erez Shinan
6f85ca4294
%ignore bug fixed in xearley (thanks to issue #44 )
7 years ago
Erez Shinan
34449651bf
Added UnexpectedInput exception (with line & column) to xearley (Issue #43 )
7 years ago
Erez Shinan
0155d3d956
A few more fixes
7 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.
7 years ago
Erez Shinan
a8aa908a4e
BUGFIX in Dynamic Earley when ending with an %ignore token
7 years ago
Erez Shinan
816266a5eb
BUGFIX for issue #24 : Dynamic Earley mishandled %ignore tokens
7 years ago
Erez Shinan
d9b490f322
Refactoring for ambiguity resolution
7 years ago
Erez Shinan
07fcc26422
Bugfix #21 : Can now handle recursive ambiguity while still defending against infinite recursion
7 years ago
Erez Shinan
0d5dd2bd0d
Improved README. Dynamic lexer now generates tokens.
7 years ago
Erez Shinan
feb95ec64d
Earley now uses dynamic lexer by default. Bump to version 0.3.0
7 years ago
Erez Shinan
dda0719375
Post-merge cleanup
7 years ago
Erez Shinan
996ac1e4d4
Complete solution. Only one test failing.
7 years ago
Erez Shinan
e7edae0604
Working. All tests passing but two. Minor fixes probably.
7 years ago
Erez Shinan
70fa3c6ea9
Tiny fix for issue #14
Version bump
7 years ago
Erez Shinan
48efa6500a
Improvements to the Earley parser ambiguity resolution
7 years ago
Erez Shinan
686e796a62
Small improvements to Earley
7 years ago
Erez Shinan
32cbf1eb19
Improvements to the Earley parser code
7 years ago
Erez Shinan
f374e70b2c
Feature: Added explicit ambiguity option for Earley
7 years ago
Erez Shinan
1685f94ea3
BUGFIX: Solved an elusive bug in Earley parser, when empty rules repeat in the same column
8 years ago
Erez Shinan
00811a7c16
Don't construct a list of tokens, to reduce memory footprint
8 years ago
Erez Shinan
24f86569da
Fixed issue #3 (infinite recursion in grammar)
8 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
616dc9f300
Added stuff to README
8 years ago
Erez Shinan
29718a9a3a
Bugfix in scanless
8 years ago
Erez Shinan
5c115acbd9
Final fixes for scanless (hopefully)
8 years ago
Erez Shinan
302dad36fe
Dramatically improved memory consumption of Earley parser
I no longer keep the entire table, only the relevant columns.
I let Python handle garbage collection for me.
8 years ago
Erez Shinan
a60c339ff7
Scanless Earley now working for all tests!
8 years ago
Erez Shinan
8e7395c6d6
Improved earley.py and added some comments to both parsers
8 years ago
Erez Shinan
a0fbecee70
Tiny improvement in Earley
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
4076256faa
Reconstruct working again
8 years ago
Erez Shinan
c14435ac95
Some cleanup
8 years ago
Erez Shinan
c17558dd91
Official switched to my Earley implementation
8 years ago
Erez Shinan
da15f99edb
Added the earley_nolex frontend, and a conf_nolex example to use it
8 years ago
Erez Shinan
fee18a8d8a
Improvements and cleanup to the earley parser
8 years ago