Erez Shinan
a9106df824
Corrected thee Transformer's whole_tree interface, for both internal and external use
5 years ago
Erez Shinan
f71df240b6
Removed Python2 incompatibility
5 years ago
Mostafa Razavi
e5868415eb
Implement embedded in-place transformers. See #378 .
As discussed in issue #378 , when an embedded transformer (that is, one
passed to the Lark class using the transformer argument), is an
inplace transformer (either a subclass of Transformer_InPlace, or with
the @v_args(tree=True) decorator), the in-place transformer was not
working correctly and in-fact Lark used it like a normal non-in-place
transformer, expecting it to return the transformed value.
5 years ago
Erez Shinan
0f9dfdd623
Re-implemented CustomLexer after regression (Issue #377 )
5 years ago
fbindel
09afcfcfc7
Allow any graph attribute in `pydot__tree_to_png`.
Keeping the explicit `rankdir="LR"` as default, add `kwargs`
to `pydot__tree_to_png` and `pydot.Dot` so that all graphviz
attributes are available for the graph.
5 years ago
Paul Vinciguerra
28e571f1c6
Fix DeprecationWarning in lalr_analysis.py
Under python 3.3+, logging.warn is deprecated.
Use logging.warning instead.
Fixes: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/lark/parsers/lalr_analysis.py:87: DeprecationWarning: The 'warn' function is deprecated, use 'warning' instead
5 years ago
Erez Shinan
4d8301f73c
Version Bump
5 years ago
Erez Shinan
a798dec779
Fix to new serializer code (Discussed in issue #349 )
5 years ago
Erez Shinan
c5cb79307b
Fixes for new standalone (Issue #349 )
5 years ago
PJCampi
c5218b185e
reconstructor creates parser at instantiation and update start_symbol in _reconstruct step.
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
9420bce40a
BUGFIX: v_args didn't wrap overwritten inherited methods (Issue #350 )
5 years ago
Erez Shinan
65bde7e15f
@ instead of __memo__
5 years ago
Erez Shinan
5ab12b031c
Added transformer, postlex arguments to standalone
5 years ago
Erez Shinan
ae51402cc7
Added serializer test
5 years ago
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