Erez Sh
decb3cdcef
Fix for compression. Use base64 for compatibility
4 vuotta sitten
Erez Sh
6a9759d620
Added optional compression to standalone parser
4 vuotta sitten
MegaIng1
2700b794b9
add `--verbose` option & make warnings comments
fixup! make warnings comments
4 vuotta sitten
MegaIng1
2d74539424
lark.tools.serialize and standalone can now take more options. Also added info where options need to be added
4 vuotta sitten
MegaIng1
e1b572c3a9
Allows the standalone parser to take more options.
4 vuotta sitten
Tom Ritchford
ce32310f49
Add print parameter to lark.tools.standalone.main
4 vuotta sitten
MegaIng
f86c4cf14d
Fixed Failing tests
4 vuotta sitten
Erez Sh
bf2d9bf7b1
Standalone generator now remove docstrings and comments.
The result is a much smaller file.
4 vuotta sitten
Blank Spruce
5559b1a211
Add missing elements in standalone parser
Add:
- missing imports
- __version__ variable
Additionally regenerated json parser example
4 vuotta sitten
Erez Sh
9cc57abd8a
Added 'cache' option to Lark (Issue #479 )
4 vuotta sitten
Erez Sh
7538c93080
Fixed for mypy (including issue #532 )
4 vuotta sitten
Erez Sh
9ec9acf115
The standalone parser is now licensed under MPL2 (instead of GPL) (Issue #507 )
4 vuotta sitten
Erez Sh
b2f1b3bf7c
Small fixes
4 vuotta sitten
Erez Shinan
a798dec779
Fix to new serializer code (Discussed in issue #349 )
5 vuotta sitten
Erez Shinan
5ab12b031c
Added transformer, postlex arguments to standalone
5 vuotta sitten
Erez Shinan
ae51402cc7
Added serializer test
5 vuotta sitten
Erez Shinan
3c64c56bcd
All tests passing
5 vuotta sitten
Erez Shinan
94e15fb6f7
Mid work. Almost stable
5 vuotta sitten
Erez Shinan
bd75bf2dff
Refactor - callbacks are now {rule: callback}, instead of a Callback object referenced by Rule.alias
5 vuotta sitten
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.
5 vuotta sitten
Jan Rydzewski
3ef84318b1
Removed unused imports and variables
5 vuotta sitten
Erez Shinan
0881fe122f
Updated mention of GPL for standalone tool (Issue #247 )
6 vuotta sitten
Erez Shinan
c85098e090
Small refactoring in standalone
6 vuotta sitten
Erez Shinan
720372a386
Standalone parser now uses contextual lexer instead of traditional one (Issue #212 )
It should be easy to allow the user to choose between them, but perhaps unnecessary, as the one and only benefit of the traditional parser is a tiny performance advantage.
6 vuotta sitten
Erez Shinan
53a66132ba
Added visitors & transformers to standalone (Issue #223 )
6 vuotta sitten
Erez Shinan
37cfe5c9f3
BUGFIX: Standalone parser didn't retain filter_out values for terminals (Issue #222 )
6 vuotta sitten
Erez Shinan
843da8e809
Fixed bugs in the standalone generator (Issue #212 )
6 vuotta sitten
Erez Shinan
dee5ac776d
Fix for Python 3.7
6 vuotta sitten
Erez Shinan
33caa391d5
Breaking backwards compatibility:
* Removed the scanless parsing feature (dynamic lexing is king)
* Default LALR lexer is now contextual
6 vuotta sitten
Erez Shinan
b951b5f79c
Significant reduction in memory consumption (Saving only parse-table instead of analysis instance)
6 vuotta sitten
Erez Shinan
eba4a604cb
Added tests for standalone generator
6 vuotta sitten
Erez Shinan
e697c266a7
Standalone: Significantly reduced generated code size
6 vuotta sitten
Erez Shinan
9b0672fda6
Standalone tools now supports postlex
6 vuotta sitten
Erez Shinan
a409f2835c
Corrections to the standalone tool
6 vuotta sitten
Erez Shinan
5ac4120b71
Stand-alone tool working for LALR+traditional lexer (first commit)
6 vuotta sitten