night199uk
1f5abfc937
Fix Propagate Positions
6 years ago
Alexey Shrub
f604b73a3c
Tree walk tests
6 years ago
Alexey Shrub
1cdc7a0e88
Fix Python 2 error with return from generator
6 years ago
Alexey Shrub
2ad06a24bd
Method iter_subtrees_topdown added
6 years ago
evandrocoan
d8c9e1b5e1
Fixed SyntaxError: positional argument follows keyword argument on
lark/tree.py
6 years ago
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 years ago
Erez Shinan
843da8e809
Fixed bugs in the standalone generator (Issue #212 )
6 years ago
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 years ago
Erez Shinan
c0cf1b3176
Added some docstrings, removed is_terminal from common
6 years ago
Erez Shinan
6bfc27c11d
New transformers near completion
Nearley tool still needs fixing
6 years ago
Erez Shinan
9daacb9082
Refactored transformers, better code
6 years ago
Ramon Klass
1854b81ebc
interpreter: default behavior changed to return the values instead of discarding them, added test showcasing the behavior
6 years ago
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 years ago
Erez Shinan
f69bceb335
Snap more things into place
6 years ago
Erez Shinan
349a607ae3
Some more normalizing
6 years ago
Erez Shinan
f960c1b8ac
Initial: Added transformers.py, and Meta to tree
6 years ago
Erez Shinan
b9e1e444c9
Added SlottedTree
6 years ago
Erez Shinan
d5c617f0fe
BUGFIX: Non-linearity in tree construction, causing performance issues for large inputs (Issue #94 )
7 years ago
Erez Shinan
3d8b8b4725
A few more adaptations
7 years ago
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.
7 years ago
Ehud Tamir
7c253b9372
Merge CYK parser.
7 years ago
Erez Shinan
5ac4120b71
Stand-alone tool working for LALR+traditional lexer (first commit)
7 years ago
Erez Shinan
da1910f5b6
More refactoring towards standalone
7 years ago
Kevin Latimer
240cf1ca21
Bug fixes to Transformer_NoRecurse
7 years ago
Kevin Latimer
26ce48b940
Bug fix for Discard and make the syntax more pythonic
7 years ago
Kevin Latimer
a5625a3be9
Add delete functionality
7 years ago
Erez Shinan
cb18cf5e77
BUGFIX: iter_trees() wasn't consistent with a recursive order (Issue #47 )
7 years ago
Erez Shinan
593446d025
Improved Readme
7 years ago
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.
7 years ago
Erez Shinan
5d41371fb3
Added resolve__antiscore_sum
7 years ago
Erez Shinan
5c4c320c26
Small fixes
7 years ago
Erez Shinan
0c5acaab8a
Refactoring load_grammar
7 years ago
Erez Shinan
9570918005
Improved: efficiency of iter_subtrees(), customizability of pretty()
7 years ago
Erez Shinan
ae2834862e
Improved README and added tree-to-pydot utility function
7 years ago
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!
8 years ago
Erez Shinan
a0bb661c61
Token import now working
8 years ago
Erez Shinan
c70355389f
Initial support for EBNF in tokens (automatic compilation to regexps)
8 years ago
Erez Shinan
f31482c236
Lint treatment
8 years ago
Erez Shinan
115c4c6d21
A little order and refactoring
8 years ago
Erez Shinan
f1b2e1926c
Now supports Python3!
8 years ago
Erez Shinan
cde2b677bb
Added tests and lots of fixes and refactoring
8 years ago
Erez Shinan
d44658fa3f
Now supports empty rules. Added some tests. All tests passing.
8 years ago
Erez Shinan
92ce395ea8
Earley & Lalr both working an generating AST. Examples now use inline_args
8 years ago
Erez Shinan
73178d6ae0
Lark big first commit. Examples working.
8 years ago