Erez Sh
1d61de4f94
Fix .pyi files
4 years ago
Erez Sh
fd3be9d8d6
Brought back the removal of unused rules/terminals in imported grammars
4 years ago
Erez Sh
8cfe52fb77
Examples: Added example of extending the Python grammar
4 years ago
Erez Sh
58c9435e80
Refactored and added grammar tests
4 years ago
Erez Sh
d18e009fa4
PR refactor: Simplified load_grammar
4 years ago
MegaIng1
b6b31548ca
Fix for review + Removed unused functions
4 years ago
MegaIng1
5db3003edb
Updated stubs
4 years ago
MegaIng1
9f3ef97bd7
removed GrammarLoader
4 years ago
MegaIng1
d676df9b88
Python2.7 compatibility
4 years ago
MegaIng1
3bf7c6a19a
Completed `GrammarBuilder.check`
4 years ago
MegaIng1
225c9e16a5
Added `%import` to GrammarLoader & fixed tests
4 years ago
MegaIng1
9e545f8825
Basics for GrammarBuilder
4 years ago
MegaIng1
be979f2e63
Added %extend for both rules and terminals.
4 years ago
MegaIng1
5930e4ba6f
Added Terminal support for `%override`
4 years ago
Erez Sh
1cfbb7be27
Added comments
4 years ago
Erez Sh
b379ea4b8b
Grammar: Added new %override statement for rewriting imported rules (like in class inheritance)
4 years ago
Erez Sh
8953849841
Allow unicode in terminal names
4 years ago
MegaIng1
8ec6d0f2ab
Correction for PR
- `user_repr` is now a method
- Fix for python 2.7
- excepts -> expected
4 years ago
Erez Sh
679c415673
Small refactor to adjust PR
4 years ago
Erez Sh
284dfe7fd3
Refactored parser_frontends. Now significantly simpler
4 years ago
Erez Sh
c6819a0ed7
Refactored all likely exceptions to inherit from LarkError, and improved error messages.
4 years ago
Erez Sh
5b30ba4841
Cleanup, and a few PEP8 changes
4 years ago
julienmalard
f8b0ca3ccc
Code review 3
4 years ago
julienmalard
364f9ae3a5
Response to code review
4 years ago
julienmalard
74c94bb369
Tests now pass!
4 years ago
MegaIng1
bc9ed5376d
made error message contain actual source code
make _all_terminals a dict
added raw attribute to Pattern
rename nice_print -> user_repr
4 years ago
MegaIng1
605b91e4be
improve error message with token source.
rename LexerConf.terminals to LexerConf.tokens
Make Exception message generation lazy
Made a few classes new-style
4 years ago
Erez Sh
e4d73526d4
Refactor
4 years ago
MegaIng1
ab5bc3f47e
Improved comment
4 years ago
MegaIng1
dcde0bcbe9
Prevent terminals from being filtered out when used in always_accept
4 years ago
MegaIng1
3112259b23
Fix for maybe_placeholders when keep_all_tokens=True
4 years ago
MegaIng1
a4260110ff
added PackageResource
4 years ago
MegaIng1
f7d466dc7d
added PackageResource
4 years ago
MegaIng1
a50fc10773
import_paths->sources, source->source_path, various implementation changes
4 years ago
MegaIng1
009cc10590
Added `FromPackageLoader` and `open_from_package`
4 years ago
MegaIng1
c9b5443127
Fix for python2.7
4 years ago
MegaIng1
53b3e12bba
Added `import_sources`
4 years ago
Erez Sh
968d1652d8
Fixed issue in grammar error-reporting due to unordered dict (changed it to list)
4 years ago
Erez Sh
fe89296193
Improved load_grammar's error messages, and added tests
4 years ago
Erez Sh
b601525798
Added logger.debug() prints for unused rules and terminals ( #658 )
4 years ago
decorator-factory
2525e0ce9c
formatting: fix pistol operator
4 years ago
decorator-factory
8b59a16425
refactor: replace dict lookup with simple conditional
4 years ago
decorator-factory
9923987e94
allow multiline regexes with 'x' (verbose) flag
4 years ago
Erez Sh
c96adbd1e8
Small refactor
4 years ago
MegaIng1
9ab02b465c
Added comment with explanation
4 years ago
MegaIng1
3d3bf69403
Added support of expansions
4 years ago
MegaIng1
e6fc3c9b00
Added possibility for terminals with different flags to be joined in python3.6+
4 years ago
Erez Sh
7dc00179e6
Lark now loads faster
- Refactored lexer interface into LexerConf
- Lexer now compiles regexps only when used (especially useful for ContextualLexer)
- Lexer now doesn't validate on deserialize (noticable speedup)
4 years ago
julienmalard
5d01f0ae68
test keep tokens in reconstructor works
4 years ago
julienmalard
86a162d6d8
Added `regex` module as optional mode.
4 years ago