Louis Dubois
a423097362
fix: Propagate debug flag on loading grammar from cache
The debug flag is already saved in the cached file, but is not
resumed on loading the dumped file. To solve that,
- add argument `debug` to parser_fronteds.WithLexer.deserialize
- add argument `debug` lalr_parser.LALR_Parser.deserialize
- propagate the value of the `debug` option on resuming a cached
grammar, in lark.Lark._load
4 years ago
Louis Dubois
c6f2b023f3
chg: Force pickle to use highest protocol
Python2.7 uses protocol 1 by default, which is not compatible with
class defining __slots__. On the other hand, all the Python versions
support versions >= 2.
4 years ago
Erez Sh
798a7026b4
Minor version bump + Adjustments to PR
4 years ago
MegaIng1
009cc10590
Added `FromPackageLoader` and `open_from_package`
4 years ago
MegaIng1
c9b5443127
Fix for python2.7
4 years ago
MegaIng1
53b3e12bba
Added `import_sources`
4 years ago
Louis Dubois
abdbabe429
fix: Propagate debug flag on loading grammar from cache
The debug flag is already saved in the cached file, but is not
resumed on loading the dumped file. To solve that,
- add argument `debug` to parser_fronteds.WithLexer.deserialize
- add argument `debug` lalr_parser.LALR_Parser.deserialize
- propagate the value of the `debug` option on resuming a cached
grammar, in lark.Lark._load
4 years ago
Louis Dubois
d41e3cdfb9
chg: Force pickle to use highest protocol
Python2.7 uses protocol 1 by default, which is not compatible with
class defining __slots__. On the other hand, all the Python versions
support versions >= 2.
4 years ago
Erez Sh
9f3d611022
Version bump to 0.10.0
4 years ago
Chanic Panic
24434ec5ff
Add documentation for working with the SPPF
4 years ago
Erez Sh
faecf32592
Restore the Lark.terminals attribute when using cached grammar
4 years ago
Tom Ritchford
ce32310f49
Add print parameter to lark.tools.standalone.main
4 years ago
Erez Sh
e6caa035ca
Tiny docs fix
4 years ago
Erez Sh
156bd7577f
Adjustments and fixes for PR
4 years ago
Chanic Panic
50c9cda6b5
Pass list to on_cycle instead of function
4 years ago
Erez Sh
88d4659c29
Improvements to puppet + other small stuff
4 years ago
Jonah Yolles-Murphy
b82f7177cb
added test
4 years ago
Chanic Panic
9db869cc80
Add PackedData class
4 years ago
Erez Sh
968d1652d8
Fixed issue in grammar error-reporting due to unordered dict (changed it to list)
4 years ago
Chanic Panic
9c967fafb0
Add ambiguity='forest' option
4 years ago
Chanic Panic
607f984523
Create TreeForestTransformer
4 years ago
Chanic Panic
93d70e8a41
Replace ForestToTreeVisitors with ForestToParseTree
4 years ago
Chanic Panic
4adc871bf1
Add ForestTransformer
4 years ago
Chanic Panic
67ae0e2b16
Moderate updates and improvements to ForestVisitor
- add methods for visiting intermediate nodes
- add method to notify subclass of cycles
- support returning iterables of nodes from visit*node_in functions
- remove result and visit return value
- also add children property to PackedNode
4 years ago
Jonah Yolles-Murphy
6cd706279a
make Trees and Tokens' reprs' evalable
4 years ago
Erez Sh
fe89296193
Improved load_grammar's error messages, and added tests
4 years ago
Omega16
a01de190d3
Added pydot__tree_to_dot and pydot__tree_to_graph, changed pydot__tree_to_png
4 years ago
Erez Sh
b87acedac4
Fixed docs. Added support for hashing ParserPuppet
4 years ago
Erez Sh
42ada346cd
Corrected docstring
4 years ago
Erez Sh
6f48b23383
Fix imports
4 years ago
Erez Sh
afde561ac3
Refactored reconstructor out into tree_matcher. Functionality should stay the same.
4 years ago
Erez Sh
96b0cfbbc4
Docs: error in docs..
4 years ago
Erez Sh
49914424df
Docs: Tiny fix (rst)
4 years ago
Erez Sh
fdd5c83588
Updated docstring for Token
4 years ago
starwarswii
10dd3d7299
corrected caret placement in error messages due to tabs
fixes #663
4 years ago
Sasank Chilamkurthy
298e7cfce6
add end options in docstring
4 years ago
Chanic Panic
e459f28743
Add AmbiguousIntermediateExpander
4 years ago
Chanic Panic
b076efadff
Create CompleteForestToAmbiguousTreeVisitor
4 years ago
Erez Sh
023709f710
Added comment
4 years ago
MegaIng
f86c4cf14d
Fixed Failing tests
4 years ago
julienmalard
a768506945
Erez's idea
4 years ago
Sasank Chilamkurthy
e6edc109b7
options part of lark.Lark's docs
4 years ago
Erez Sh
b601525798
Added logger.debug() prints for unused rules and terminals ( #658 )
4 years ago
Erez Sh
eae1693c76
Docs: Moved some examples away from docstrings
4 years ago
Erez Sh
bf2d9bf7b1
Standalone generator now remove docstrings and comments.
The result is a much smaller file.
4 years ago
Erez Sh
c6438007a7
A tiny fix
4 years ago
Erez Sh
288078a6a0
Corrections to PR
4 years ago
julienmalard
7a67f0d027
Postproc option for reconstruct, and fixed isalnum bug
4 years ago
Erez Sh
0c47b981fc
Bugfix: Infinite loop on mishandled $END token in on_error (Issue #656 )
4 years ago
Sasank Chilamkurthy
f107512cb3
change to definition format for larkoptins
4 years ago