Erez Sh
3688b0053b
Disallow '. .' for '..' syntax (Issue #513 )
5 years ago
Erez Sh
182385d7b7
Removed bad syntax: *? and +? no longer accepted by the grammar parser (Issue #511 )
5 years ago
Erez Sh
fcdba441b4
Better error message for reduce/reduce conflict (Issue #135 )
5 years ago
Erez Sh
5682dcc57a
Added python_bytecode example + Tiny bugfix
5 years ago
Erez Sh
b2f1b3bf7c
Small fixes
5 years ago
Erez Sh
b9c81a5450
Refactor: Simplify code by assuming rule.options is never None
5 years ago
Jussi Laasonen
2de7e34766
Open imported grammars with UTF-8 encoding
5 years ago
Mike Roberts
ed3c131ca8
Allow comments in rule definitions
5 years ago
Erez Sh
17b6d6d3b3
BUGFIX for declared terminals
5 years ago
Erez Sh
f566a3618b
Bugfix: Lark now throws an error for recursive terminals (Issue #264 )
5 years ago
Erez Shinan
571bb400e3
Bugfix for regression (Issue #445 )
5 years ago
Erez Shinan
f06a83a8a7
Better error for literal with bad escaping (Issue #287 )
5 years ago
Erez Sh
56978206a3
No longer confusing aliases and rules when importing (Issue #433 )
5 years ago
night199uk
dc94ebc42f
Fix Earley non-determinism
Rule.order should be set as the index of each expansion with rules
of the same name (e.g: a : b # rule.order 1 | c # rule.order 2).
5 years ago
Erez Shinan
7e8488d1a0
Fixed issue #425 , keeping in mind unicode issue #411
5 years ago
Erez Shinan
71c4abfb24
Fixed error message (Issue #380 )
5 years ago
Erez Shinan
e3cbd7aadc
Negative priority now allowed in rules and tokens. Updated docs about priority
5 years ago
Erez Shinan
f1e844accd
Mid work. Not promising
5 years ago
Erez Shinan
f814d91f9d
Removed possibly problematic code (Issue #372 )
5 years ago
Erez Shinan
e79689dce7
Remove unused rules (Issue #384 )
5 years ago
PJCampi
ccbaebdc6f
load_grammar now collects all imports to make before loading them to namespace
5 years ago
PJCampi
b055bc6399
import_grammar now include base_path in recursive call to load_grammar
5 years ago
PJCampi
4889013404
get_namespace_name now preserves leading underscore on relative import
5 years ago
Erez Shinan
f67eead0b4
Added error when using terminal weights in dynamic earley (Discussed in #324 )
6 years ago
Erez Shinan
4e6f92b03b
Support relative rule import in interactive environment (Issue #335 )
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
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
145d8a8e7c
Don't compile unused terminals (mentioned in issue #309 )
6 years ago
Erez Shinan
c4f8483c09
Small fix
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
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
222df5bab4
New Feature: Added maybe_placeholders option (Issue #285 )
6 years ago
Erez Shinan
149f7cec1f
BUGFIX: Importing the same grammar twice could lead to unexpected behavior (Issue #268 )
6 years ago
Jan Rydzewski
3ef84318b1
Removed unused imports and variables
6 years ago
Erez Shinan
21bbf9b970
Experimental support for importing rules
6 years ago
Erez Shinan
f048bfb870
Refactoring around terminals / tokens
6 years ago
Erez Shinan
ce75758f76
BUGFIX: Automatic terminal names didn't respect existing terminals(Issue #224 )
6 years ago
Erez Shinan
86c8ad41c9
BUGFIX affecting standalone generator (Issue #212 )
6 years ago
Erez Shinan
86cef7e654
Fix for issue #188
6 years ago
Erez Shinan
b924d87293
Fix error
6 years ago
Erez Shinan
32b78b8ee5
BUGFIX: Repeated use of optional rules tripped up the simplifier, manifesting when aliases were used (Issue #197 )
6 years ago
Erez Shinan
cffd610e77
Fixed reconstructor. All tests passing
6 years ago
Erez Shinan
454c88b58a
Refactoring and fixes for merge 2fd0087
6 years ago