Erez Shinan
b83bac48bd
BUGFIX: Indenter was in corrupt state when parse failed (Issue #316 )
6 years ago
Erez Shinan
d2f55fe3ba
BUGFIX: Fixed common.ESCAPED_STRING (Issue #309 )
6 years ago
Erez Shinan
f8486a02b0
Minor cleanup
6 years ago
Erez Shinan
13ddc43782
Version bump
6 years ago
Erez Shinan
c4f8483c09
Small fix
6 years ago
Erez Shinan
688c453456
Corrections
6 years ago
Erez Shinan
934a997f83
Clean up
6 years ago
Erez Shinan
862a853340
More cleanup of Earley duplication
6 years ago
Erez Sh
4de71293e5
More cleanup
6 years ago
Erez Sh
57a602758d
Merged part of Earley & XEarley implementation. Major reduction
6 years ago
Erez Shinan
65d3212bed
Temporarily disable leo transitives
6 years ago
Erez Shinan
8e7c05a8f6
Added VisitError for transformers
6 years ago
Erez Shinan
00510edee6
Added a nicer error for duplicate rules
6 years ago
night199uk
80a09697fe
Rebuild the way Earley prioritizes ambiguities
- Makes rule ordering the default ambiguity tie breaker.
E.g.
start: a | b
a: "A"
b: "A"
will return:
start
a
start: b | a
a: "A"
b: "A"
will return
start
b
- Replaces the ambiguity='resolve__antiscore_sum' with a separate option: 'priority'.
The priority option has 4 values: 'auto', 'none', 'normal', 'invert'.
'Auto' maps to 'Normal' for CYK and Earley and 'None' for LALR.
'None' filters your priorities and ignores them. This saves some extra tree walking on Earley.
'Normal' uses your priorities untouched, mimicing the old behaviour.
'Invert' negates your priorities, emulating the old 'resolve__antiscore_sum' behaviour.
This allows you to use priority logic even when ambiguity=='explicit', to get a better idea
of the shape of your tree; and to easily disable priorities without removing them from the
grammar for testing (or performance).
- ambiguity='explicit' now correctly returns an ambiguous tree again, as 0.6 did.
6 years ago
night199uk
a543eeb162
Fix assert on empty options for a Rule
6 years ago
night199uk
64992aa49c
Fix a performance regression on Rules related to empties
6 years ago
evandrocoan
6c013b9a1d
Fix misspelling on lark/lark.py documentation
6 years ago
night199uk
80964e903b
Simplify the way we create Leo sets
Avoids recursion and improves performance slightly
6 years ago
night199uk
d74781605d
Fix Ambiguous Expander problems with nested ambiguities
6 years ago
night199uk
ea536820a5
Fix propogate positions for Earley
6 years ago
night199uk
1f5abfc937
Fix Propagate Positions
6 years ago
evandrocoan
48351c3d3e
Trimmed whitespaces and ensured a new line on the end of the file
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
641fec43ce
@v_args at function level now takes precedent over class level
6 years ago
Erez Shinan
222df5bab4
New Feature: Added maybe_placeholders option (Issue #285 )
6 years ago
Erez Shinan
76e185a36c
Added the Forest interface for explicit ambiguity
6 years ago
night199uk
04d90fa916
Implement Joop Leo's optimizations for right recursion performance
6 years ago
night199uk
637f121109
Cleanup unused Derivation
6 years ago
night199uk
8fa8ac36fc
Remove Earley Column
We can replace Earley Columns with basic python sets
for improved performance and simplicity.
6 years ago
night199uk
8415fa26a3
Add a pydot visualizer for the SPPF.
6 years ago
night199uk
bb22c84df3
Speed up repetitive parsing using the same parser
When using the same parser repeatedly for small parsers we incur
significant overhead by recreating the ForestVisitor each parser.
We can cache the Forest walker and re-use it by making it stateless.
Also, we can use slots for all of the Forest Walkers to reduce
construction delay and function call overhead.
6 years ago
Erez Shinan
6290b1647d
Lark now works under Python -OO (Issue #283 )
6 years ago
Erez Shinan
5c68bf677a
Implement eq/hash for Rule (Issue #278 )
6 years ago
Erez Shinan
c172653ea6
Fix issue with propagate_positions
6 years ago
Erez Shinan
b2489e13e2
A few fixes (tests + interface)
6 years ago
Erez Shinan
0935543280
Fix issue with propagate_positions
6 years ago
Erez Shinan
74fc559ea5
Reconstructor fixes
6 years ago
Erez Shinan
149f7cec1f
BUGFIX: Importing the same grammar twice could lead to unexpected behavior (Issue #268 )
6 years ago
Erez Shinan
383db31183
Fix in Earley forest for non-string tokens.
6 years ago
Alexey Shrub
f604b73a3c
Tree walk tests
6 years ago
Alexey Shrub
1cdc7a0e88
Fix Python 2 error with return from generator
6 years ago
Alexey Shrub
2ad06a24bd
Method iter_subtrees_topdown added
6 years ago
Erez Shinan
1798971455
Adjustments
6 years ago
Erez Shinan
a892f184e3
Fix LALR shift/reduce warnings when debug=True (Issue #258 )
6 years ago
Erez Shinan
3c1c867b5f
Fixed commit 216c341
(Issue #246 , #249 )
6 years ago
Erez Shinan
38a4a5de4e
Version bump
6 years ago
Erez Shinan
216c341b06
Fixed v_args handling of staticmethod and classmethod (Issue #246 , #249 )
6 years ago
Erez Shinan
0881fe122f
Updated mention of GPL for standalone tool (Issue #247 )
6 years ago
Erez Shinan
6c8ba76b79
Fixed a deep bug in grammar analysis involving empty rules (Issue #250 )
6 years ago