Erez Shinan
222df5bab4
New Feature: Added maybe_placeholders option (Issue #285 )
6 years ago
Erez Shinan
149f7cec1f
BUGFIX: Importing the same grammar twice could lead to unexpected behavior (Issue #268 )
6 years ago
Jan Rydzewski
3ef84318b1
Removed unused imports and variables
6 years ago
Erez Shinan
21bbf9b970
Experimental support for importing rules
6 years ago
Erez Shinan
f048bfb870
Refactoring around terminals / tokens
6 years ago
Erez Shinan
ce75758f76
BUGFIX: Automatic terminal names didn't respect existing terminals(Issue #224 )
6 years ago
Erez Shinan
86c8ad41c9
BUGFIX affecting standalone generator (Issue #212 )
6 years ago
Erez Shinan
86cef7e654
Fix for issue #188
6 years ago
Erez Shinan
b924d87293
Fix error
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
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
a49df1b2e4
Added option to provide a custom lexer (with example)
6 years ago
Julien Malard
405f6a399d
From and relative type imports seem to work.
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
6d76a4ce8d
visitor_args -> v_args
6 years ago
Erez Shinan
ac0d49e7ab
Added %declare
6 years ago
Erez Shinan
6bfc27c11d
New transformers near completion
Nearley tool still needs fixing
6 years ago
Erez Shinan
5e546f38a9
args decorators actually work now
6 years ago
Erez Shinan
9daacb9082
Refactored transformers, better code
6 years ago
Erez Shinan
55e9d56792
Missed those at merge
6 years ago
Erez Shinan
ea413fd648
Simplify PrepareAnonTerminals
6 years ago
Erez Shinan
0d56b0cf30
Anon terminals no longer need to start with _
6 years ago
Erez Shinan
7b32ffd83a
Fixed token visibility rules (Issue #109 )
Anonymous tokens would become visible if they had the same value as named tokens.
That's because they are merged for the lexer. But after this change, the rules for
visibility are based on their use in the rule, and not their name or identity.
6 years ago
Erez Shinan
c5e6cf0954
Refactoring to introduce Symbol instances before creating anons
6 years ago
Erez Shinan
1839c324d3
Small refactoring step
6 years ago
Erez Shinan
33caa391d5
Breaking backwards compatibility:
* Removed the scanless parsing feature (dynamic lexing is king)
* Default LALR lexer is now contextual
6 years ago
Erez Shinan
67f372c994
Symbols instead of strings - initial
6 years ago
Erez Shinan
51644a6c58
Added examples/lark.g - Reference implementation of the Lark grammar
(inspired by issue #116 )
6 years ago
Erez Shinan
9848cac9f0
Improved Lark's error reporting for grammar syntax errors (Based on PR #129 )
6 years ago
Rob Rose
ca3d4ca6f4
Changing changes from .lrk to .lark
6 years ago
Erez Shinan
c3bce19dc2
More steps towards a good solution
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
255ef0d973
Added error message for the alias syntax in terminals (Issue #97 )
7 years ago
Rob Rose
ff588714c1
Changed Lark standalone file extension
- Reasoning addressed in Issue #116
- Renamed example and grammars file to use new extension.
- Changed `.g` to new extension of `.lrk` in places where it is
referenced.
7 years ago
Erez Shinan
7d11dfa5cd
FEATURE: Added support for ranged-repeat for rules and terminals (Issues #75 , #19 )
Syntax: symbol~number
| symbol~min..max
Example:
HEXCOLOR: "#" (HEXDIGIT~3 | HEXDIGIT~6)
short_sentence: word~4..20
Added range for tokens
7 years ago
Erez Shinan
710cb6d20b
Added more information in UnexpectedInput exception (Issue #78 )
7 years ago
Erez Shinan
b002ec47fb
BUGFIX: Repeating subrules are now allowed (Issue #61 )
7 years ago
Erez Shinan
5fd331be54
BUGFIX: Internally repetitive rules are now handled silently (Issue #60 )
7 years ago
Erez Shinan
da1910f5b6
More refactoring towards standalone
7 years ago
Erez Shinan
07b5469e86
More refactoring, untangling grammar compilation and parse-tree creation
7 years ago
Erez Shinan
7182ba3991
Minor refactoring for the standalone tool (in progress)
7 years ago
Erez Shinan
38c5fd244a
Improved grammar validation and refactored the lexers
7 years ago
Erez Shinan
209ac5ab4e
BUGFIX: Mishandling of quotes (Issue #50 )
7 years ago