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
106508dcce
Tiny improvement to the LALR parser
6 years ago
Erez Shinan
21bbf9b970
Experimental support for importing rules
6 years ago
Erez Shinan
19b09438fa
Added documentation for lexer_callbacks in recipes
6 years ago
Erez Shinan
48a781fcf2
Bugfix for propagate_positions
6 years ago
Erez Shinan
8ee9b4cfcb
Refactored lexer + tiny bugfix
6 years ago
evandrocoan
6fc2f5a6ba
Fix #231
6 years ago
Erez Shinan
c85098e090
Small refactoring in standalone
6 years ago
Erez Shinan
f048bfb870
Refactoring around terminals / tokens
6 years ago
Erez Shinan
519b07ceca
Tiny refactor
6 years ago
Erez Shinan
4487bf65c1
EOF token now gets proper line/column number (Issue #228 )
6 years ago
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 years ago
Erez Shinan
bd7e331ad7
Slightly better error message (UnexpectedToken)
6 years ago
Erez Shinan
53a66132ba
Added visitors & transformers to standalone (Issue #223 )
6 years ago
Erez Shinan
ce75758f76
BUGFIX: Automatic terminal names didn't respect existing terminals(Issue #224 )
6 years ago
Erez Shinan
9ce8a79dc0
Misleading error message at unexpected EOF (Issue #220 )
6 years ago
Erez Shinan
37cfe5c9f3
BUGFIX: Standalone parser didn't retain filter_out values for terminals (Issue #222 )
6 years ago
Erez Shinan
242ac24ea6
Fixed the propagate_positions implementation, and added start_pos/end_pos attributes to Tree.Meta
Related to issue #216
6 years ago
Erez Shinan
843da8e809
Fixed bugs in the standalone generator (Issue #212 )
6 years ago
Erez Shinan
1c1b364de8
Version bump
6 years ago
Erez Shinan
86c8ad41c9
BUGFIX affecting standalone generator (Issue #212 )
6 years ago
Erez Shinan
eba99662c4
Bug in pretty printing of Earley derivations (issue #210 )
6 years ago
Erez Shinan
181f061091
BUGFIX - Fixed 2 issues with line counting
1) Failed to detect newlines in regexps of the form [^...]
2) Last token didn't get end_line & end_column
6 years ago
Erez Shinan
86cef7e654
Fix for issue #188
6 years ago
Erez Shinan
faf2a8c213
Version bump
6 years ago
Erez Shinan
dd69b95338
Cleanup after pylint
6 years ago
Erez Shinan
b924d87293
Fix error
6 years ago
Erez Shinan
ef29812520
Fixed missing import (Issue #202 )
6 years ago
Erez Shinan
d7d7b956b7
BUGFIX: Bad naming scheme in tree-builder callbacks caused conflicts (Issue #198 )
6 years ago
Erez Shinan
32b78b8ee5
BUGFIX: Repeated use of optional rules tripped up the simplifier, manifesting when aliases were used (Issue #197 )
6 years ago
Erez Shinan
cffd610e77
Fixed reconstructor. All tests passing
6 years ago
Erez Shinan
454c88b58a
Refactoring and fixes for merge 2fd0087
6 years ago
Julien Malard
12004b3c65
Reimplemented relative and multiple imports.
6 years ago
Erez Shinan
d5b3af208d
Version bump
6 years ago
Erez Shinan
3ac32fa5f0
Bug in PropagatePositions when supplying a reducing transformer
6 years ago
Erez Shinan
3abf16bf67
Added support for v_args(tree=True)
6 years ago
Erez Shinan
c637f3b35e
Version bump
6 years ago
Erez Shinan
1247a8c330
Improved error messages (as pointed out in issue #181 )
6 years ago
Erez Shinan
0240e1c248
Fixed issue where Lark would throw RecursionError for huge grammars (Issue #181 )
6 years ago
Erez Shinan
f99e2ecc86
Lark grammars are now utf8 by default (Issue #179 )
6 years ago
Erez Shinan
a49df1b2e4
Added option to provide a custom lexer (with example)
6 years ago
Erez Shinan
dee5ac776d
Fix for Python 3.7
6 years ago
Julien Malard
405f6a399d
From and relative type imports seem to work.
6 years ago
Erez Shinan
e7212261b2
Fixed examples for error reporting
6 years ago
Erez Shinan
d11c67fea0
Fixed reconstruct
6 years ago
Erez Shinan
6ea4588bcf
Dynamic lexer is now returns the maximum match only. Complete lexing beahvior moved to "dynamic_complete"
Changed dynamic lexer behavior to only match terminals to their maximum length (i.e. greedy match), emulating the standard lexer.
The original dynamic lexer behavior, that attempts to match all appearances of a terminal, has been moved to the "dynamic_complete" lexer.
For example, when applying a terminal "a"+ to the text "aaa":
- dynamic: ["aaa"]
- dynamic_complete: ["a", "aa", "aaa"]
6 years ago
Erez Shinan
0e33217321
Updated version
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
c77934f6a2
Fixed nearley
6 years ago