Erez Sh
5b30ba4841
Cleanup, and a few PEP8 changes
3 년 전
Jonah Yolles-Murphy
b82f7177cb
added test
4 년 전
Jonah Yolles-Murphy
6cd706279a
make Trees and Tokens' reprs' evalable
4 년 전
Omega16
a01de190d3
Added pydot__tree_to_dot and pydot__tree_to_graph, changed pydot__tree_to_png
4 년 전
Erez Sh
288078a6a0
Corrections to PR
4 년 전
Sasank Chilamkurthy
b753e24b2f
document lark.Tree
4 년 전
Blank Spruce
5559b1a211
Add missing elements in standalone parser
Add:
- missing imports
- __version__ variable
Additionally regenerated json parser example
4 년 전
Erez Sh
cc1092bd53
Refactored puppet + small fixes
4 년 전
Erez Sh
4c61aaf1dc
Small refactoring for iter_subtrees
4 년 전
Blank Spruce
b18d109886
Rewrite iter_subtrees to more efficient version
Using OrderedDict provides these properties:
- given subtree is yielded only once since it's stored in OrderedDict
only once (even though it may be put there multiple times) so no need
to double check if subtree was already seen
- order of iteration is preserved as it was previously when subtrees
to iterate over were stored in a list
4 년 전
Erez Sh
a173117857
Included iter_subtrees and related methods in standalone parser (Issue #440 )
5 년 전
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 년 전
night199uk
1f5abfc937
Fix Propagate Positions
5 년 전
Alexey Shrub
f604b73a3c
Tree walk tests
5 년 전
Alexey Shrub
1cdc7a0e88
Fix Python 2 error with return from generator
5 년 전
Alexey Shrub
2ad06a24bd
Method iter_subtrees_topdown added
5 년 전
evandrocoan
d8c9e1b5e1
Fixed SyntaxError: positional argument follows keyword argument on
lark/tree.py
6 년 전
evandrocoan
91a5a5dfcb
Allow to pass to lark/tree.py pydot__tree_to_png the pydot tree
shaping. For example, passing "TB" instead of "LR" makes the tree
to be draw vertically instead of horizontally.
https://stackoverflow.com/questions/29003465/pydot-graphviz-how-to-order-horizontally-nodes-in-a-cluster-while-the-rest-of-t
6 년 전
Erez Shinan
843da8e809
Fixed bugs in the standalone generator (Issue #212 )
6 년 전
Erez Shinan
5c6df8e825
Moved and restructured exceptions
* All exceptions are now under exceptions.py
* UnexpectedInput is now superclass of UnexpectedToken and UnexpectedCharacters,
all of which support the get_context() and match_examples() methods.
6 년 전
Erez Shinan
c0cf1b3176
Added some docstrings, removed is_terminal from common
6 년 전
Erez Shinan
6bfc27c11d
New transformers near completion
Nearley tool still needs fixing
6 년 전
Erez Shinan
9daacb9082
Refactored transformers, better code
6 년 전
Ramon Klass
1854b81ebc
interpreter: default behavior changed to return the values instead of discarding them, added test showcasing the behavior
6 년 전
Ramon Klass
f5550b3040
Implemented a new visitor class (Interpreter) that works top-down (PR #130 )
It emulates antlr's visitor behavior for a dynamic evaluation order of subtrees
6 년 전
Erez Shinan
f69bceb335
Snap more things into place
6 년 전
Erez Shinan
349a607ae3
Some more normalizing
6 년 전
Erez Shinan
f960c1b8ac
Initial: Added transformers.py, and Meta to tree
6 년 전
Erez Shinan
b9e1e444c9
Added SlottedTree
6 년 전
Erez Shinan
d5c617f0fe
BUGFIX: Non-linearity in tree construction, causing performance issues for large inputs (Issue #94 )
6 년 전
Erez Shinan
3d8b8b4725
A few more adaptations
6 년 전
Chris McKinney
d8fbf92fea
Fixed TypeError on pretty-printing tuples in tree
When a tuple is passed as the argument to percent-formatting, its
elements are interpreted as multiple arguments. The pretty printer
previously passed tuples (e.g. those introduced via a Transformer) from
the tree directly to the percent operator, causing a TypeError because
the format string only calls for a single argument. This fix simply
wraps the argument in a one-tuple to ensure it is not interpreted as
multiple arguments if it itself is a tuple.
6 년 전
Ehud Tamir
7c253b9372
Merge CYK parser.
6 년 전
Erez Shinan
5ac4120b71
Stand-alone tool working for LALR+traditional lexer (first commit)
6 년 전
Erez Shinan
da1910f5b6
More refactoring towards standalone
6 년 전
Kevin Latimer
240cf1ca21
Bug fixes to Transformer_NoRecurse
6 년 전
Kevin Latimer
26ce48b940
Bug fix for Discard and make the syntax more pythonic
6 년 전
Kevin Latimer
a5625a3be9
Add delete functionality
6 년 전
Erez Shinan
cb18cf5e77
BUGFIX: iter_trees() wasn't consistent with a recursive order (Issue #47 )
6 년 전
Erez Shinan
593446d025
Improved Readme
6 년 전
Erez Shinan
c93140386d
BUGFIX: The Earley parser collected repeating derivations, and filtered them out much later than needed. This resulted in very long lists and many unnecessary comparisons.
6 년 전
Erez Shinan
5d41371fb3
Added resolve__antiscore_sum
7 년 전
Erez Shinan
5c4c320c26
Small fixes
7 년 전
Erez Shinan
0c5acaab8a
Refactoring load_grammar
7 년 전
Erez Shinan
9570918005
Improved: efficiency of iter_subtrees(), customizability of pretty()
7 년 전
Erez Shinan
ae2834862e
Improved README and added tree-to-pydot utility function
7 년 전
Erez Shinan
a73cc9ad90
Re-wrote the Earley parser to use a parse-forest
It now knows how to resolve ambiguity! And in a memory-efficient way!
7 년 전
Erez Shinan
a0bb661c61
Token import now working
7 년 전
Erez Shinan
c70355389f
Initial support for EBNF in tokens (automatic compilation to regexps)
7 년 전
Erez Shinan
f31482c236
Lint treatment
7 년 전