night199uk
d74781605d
Fix Ambiguous Expander problems with nested ambiguities
6 years ago
night199uk
1f5abfc937
Fix Propagate Positions
6 years ago
Erez Shinan
467483553b
Fixed placeholder code, should work as expected (Issue #285 )
6 years ago
Erez Shinan
adb30180aa
maybe_placeholder now doesn't apply to anonymous terminals
6 years ago
Erez Shinan
222df5bab4
New Feature: Added maybe_placeholders option (Issue #285 )
6 years ago
Erez Shinan
c172653ea6
Fix issue with propagate_positions
6 years ago
Erez Shinan
0935543280
Fix issue with propagate_positions
6 years ago
night199uk
1d5fd7301a
Heavy modifications to the Earley parser to try and make it handle more
types of ambiguity.
- Rewritten along the lines of Elizabeth Scott's parser.
https://www.sciencedirect.com/science/article/pii/S1571066108001497
- Implement SPPF trees per Elizabeth Scott and Bram van der Sanden's work.
http://www.bramvandersanden.com/post/2014/06/shared-packed-parse-forest/
6 years ago
night199uk
067ade56d9
Fix propagate positions
6 years ago
Erez Shinan
48a781fcf2
Bugfix for propagate_positions
6 years ago
Erez Shinan
53a66132ba
Added visitors & transformers to standalone (Issue #223 )
6 years ago
Erez Shinan
242ac24ea6
Fixed the propagate_positions implementation, and added start_pos/end_pos attributes to Tree.Meta
Related to issue #216
6 years ago
Erez Shinan
d7d7b956b7
BUGFIX: Bad naming scheme in tree-builder callbacks caused conflicts (Issue #198 )
6 years ago
Erez Shinan
3ac32fa5f0
Bug in PropagatePositions when supplying a reducing transformer
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
6bfc27c11d
New transformers near completion
Nearley tool still needs fixing
6 years ago
Erez Shinan
7b32ffd83a
Fixed token visibility rules (Issue #109 )
Anonymous tokens would become visible if they had the same value as named tokens.
That's because they are merged for the lexer. But after this change, the rules for
visibility are based on their use in the rule, and not their name or identity.
6 years ago
Erez Shinan
33caa391d5
Breaking backwards compatibility:
* Removed the scanless parsing feature (dynamic lexing is king)
* Default LALR lexer is now contextual
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
Erez Shinan
f69bceb335
Snap more things into place
6 years ago
Erez Shinan
f960c1b8ac
Initial: Added transformers.py, and Meta to tree
6 years ago
Erez Shinan
25c3c51b1c
Fixed bug in Earley: A tree builder optimization clashed with explicit ambiguity
6 years ago
Erez Shinan
d77f93c818
Standalone generator working again. Updated examples
7 years ago
Erez Shinan
d5c617f0fe
BUGFIX: Non-linearity in tree construction, causing performance issues for large inputs (Issue #94 )
7 years ago
Erez Shinan
ebdad8f144
Refactored parse_tree_builder, much small and cleaner now
7 years ago
Erez Shinan
22e525f53e
Fixed propagate positions. Added lexer_callbacks option.
7 years ago
Erez Shinan
5ac4120b71
Stand-alone tool working for LALR+traditional lexer (first commit)
7 years ago
Erez Shinan
da1910f5b6
More refactoring towards standalone
7 years ago
Erez Shinan
07b5469e86
More refactoring, untangling grammar compilation and parse-tree creation
7 years ago
Erez Shinan
38c5fd244a
Improved grammar validation and refactored the lexers
7 years ago
Erez Shinan
1cc4c965e8
Big Refactor: Grammars now build in half the time. Code shorter & cleaner.
7 years ago
Erez Shinan
baae08e399
Fixed tree-construction semantics: Alias now overrides the "?rule" operator
Breaking change!!
7 years ago
Erez Shinan
b3cb2f433b
Towards an introspectable tree-builder
7 years ago
Erez Shinan
19a9c9c206
Towards an introspectable tree-builder. Also added tests.
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
1da851516c
Added option: Keep all tokens
7 years ago
Erez Shinan
a588a70a7a
Added the experimental "propagate_positions" feature (only for standard lexer for now).
7 years ago
Erez Shinan
e151d22ea2
examples.reconstruct_json now working with scanless
8 years ago
Erez Shinan
5c115acbd9
Final fixes for scanless (hopefully)
8 years ago
Erez Shinan
a60c339ff7
Scanless Earley now working for all tests!
8 years ago
Erez Shinan
0b902b1d03
Added the '!' prefix to keep all tokens in rule. Also removed tools (it's now in lark/tools)
8 years ago
Erez Shinan
f31482c236
Lint treatment
8 years ago
Erez Shinan
09a80ed222
Fixed bug in lexer where unidentical tokens got the same name
8 years ago
Erez Shinan
772f1cc0aa
Improved error reporting
8 years ago
Erez Shinan
45060df80d
Optimized the tree builder, and updated docs
8 years ago
Erez Shinan
115c4c6d21
A little order and refactoring
8 years ago
Erez Shinan
cde2b677bb
Added tests and lots of fixes and refactoring
8 years ago