Erez Shinan
6efa6b4fa0
Still working
5 years ago
Erez Shinan
3c64c56bcd
All tests passing
5 years ago
Erez Shinan
94e15fb6f7
Mid work. Almost stable
5 years ago
Erez Shinan
e52cc46fc5
Minor cleanup
5 years ago
Erez Shinan
d13ebb9c15
Using a mostly-generic serialization method
5 years ago
Erez Shinan
dd84f6c0a8
Tiny refactor
5 years ago
Erez Shinan
066303fdab
Serialized lark is now json compatible
5 years ago
Erez Shinan
244f671665
Small refactor
5 years ago
Erez Shinan
335206911d
Basic serialize/deserialize working!
5 years ago
Erez Shinan
4b915a9f78
Style improvements to errors
5 years ago
Erez Shinan
120d5b9ffa
Mid work
5 years ago
Erez Shinan
bd75bf2dff
Refactor - callbacks are now {rule: callback}, instead of a Callback object referenced by Rule.alias
5 years ago
Erez Shinan
8bd4668b12
Major Version bump (0.7)
6 years ago
Erez Shinan
f67eead0b4
Added error when using terminal weights in dynamic earley (Discussed in #324 )
6 years ago
Erez Shinan
475312c608
Bugfix in tools.nearley: Added support for null keyword (Issue #342 )
6 years ago
Erez Shinan
20329e0bf5
Bugfix in tools.nearley: Backslash now handled correctly in strings (Issue #341 )
6 years ago
Peter Dolak
b89b003cdb
Fix v_args when used on classes with non-callable members
6 years ago
Erez Shinan
4e6f92b03b
Support relative rule import in interactive environment (Issue #335 )
6 years ago
Erez Shinan
2b3fabd01c
Fixed Discard, broken in 0.6.6 (Issue #337 )
6 years ago
Erez Shinan
e16bb35576
Change maybe_placeholders: Apply to [a] and [a b c], but not a? or (a b)? or [_a _b _c]
6 years ago
Rogdham
2f6b97cfd3
Allow renaming relative import rule
%import .local.foo -> bar
6 years ago
Rogdham
9b22d41e49
Change namespace naming and aliasing for imports
The `.` character is invalid as a group name in regex, replacing by `__`.
The bug arose in `lexer._build_mres`.
6 years ago
Kyungdahm Yun
d5c9006f01
Fix literal range escape assertion
6 years ago
Aurelien Grenotton
cbafa4d7bb
Make VisitError inherit from LarkError
The recently added VisitError is the only lark exception not inheriting from LarkError,
which makes it painful to catch for client application.
6 years ago
Erez Shinan
18c7022b0f
Borrowed tokens now copy end_line/end_column too
6 years ago
Erez Shinan
6b2df208c2
Fixed support for hex encoding (\xAA)
6 years ago
Kyungdahm Yun
70d724732d
Support hex escape (\xhh) in string literal
6 years ago
Erez Shinan
d1fea12aa5
Remove duplicates of empty rules (Issue #315 )
6 years ago
Erez Shinan
1b5f734c49
Bugfix: Callbacks now work for terminals with UnlessCallback (Issue #317 )
6 years ago
Erez Shinan
6a6dd97c52
VisitError now allows explicit access to previous exception (Issue #314 )
6 years ago
Erez Shinan
145d8a8e7c
Don't compile unused terminals (mentioned in issue #309 )
6 years ago
Erez Shinan
12a0cbae0c
Correction for commit b83bac4
(Issue #316 )
6 years ago
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