Erez Sh
8953849841
Allow unicode in terminal names
4 years ago
Erez Sh
712df517b2
Fixes for PR. Custom lexer now works with CYK
4 years ago
MegaIng1
b655bd950a
Fix tests failing when used with `python -m unittest discover`
4 years ago
MegaIng1
83e896b3b8
Prevent test from running with old custom lexer
4 years ago
MegaIng1
cf9d0d915e
Fixes for custom lexer.
4 years ago
MegaIng1
cf25c06420
Added custom lexer to earley.
4 years ago
Erez Sh
e6dcc43478
Improve match_examples() for Earley (Issue #760 )
4 years ago
Erez Sh
7fa993320e
match_examples() now works for Earley+Standard
Note: This refactor opens the door for implementing a ContextualLexer for Earley.
But unlike the existing one for LALR, it will have to be computed at runtime,
rather than ahead of time.
4 years ago
Erez Sh
1aff84391a
Added test for match_examples
4 years ago
MegaIng1
2fe5f2ed4c
Added tests for `lark.lark`
4 years ago
MegaIng
a4ddb1e84f
Adding missing Testcase to `__main__`
4 years ago
MegaIng1
2d8bd42315
Make `LALR_CustomLexerWrapper` behave correctly + tests
4 years ago
Chanic Panic
13abf7ca3a
Add test for custom indenter
4 years ago
julienmalard
02c39a84db
Skipping this test for Python 2 for now.
4 years ago
julienmalard
e5081420c6
Add encoding specification for Python 2
4 years ago
julienmalard
74c94bb369
Tests now pass!
4 years ago
julienmalard
b01c283d47
Failing test
4 years ago
Chanic Panic
d6ef539199
Add tests for SPPF cycles
4 years ago
Erez Sh
72e7926097
Completely redesigned the interface between Lexer<->Parser, and refactored LALR parser and lexers
4 years ago
Erez Sh
8283d91507
More tests for priority
4 years ago
Erez Sh
b5aeb812e0
Better error message for options. More tests for priority
4 years ago
Erez Sh
e84a64fc52
Added support for rule priorities in LALR
4 years ago
Erez Sh
6bcff89e3c
Added test for standalone compression
4 years ago
MegaIng1
2d74539424
lark.tools.serialize and standalone can now take more options. Also added info where options need to be added
4 years ago
Tom Ritchford
fb925f8b31
Guard Lark.__doc__ assignment for tools.standalone
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
a50fc10773
import_paths->sources, source->source_path, various implementation changes
4 years ago
Louis Dubois
a423097362
fix: Propagate debug flag on loading grammar from cache
The debug flag is already saved in the cached file, but is not
resumed on loading the dumped file. To solve that,
- add argument `debug` to parser_fronteds.WithLexer.deserialize
- add argument `debug` lalr_parser.LALR_Parser.deserialize
- propagate the value of the `debug` option on resuming a cached
grammar, in lark.Lark._load
4 years ago
Louis Dubois
c6f2b023f3
chg: Force pickle to use highest protocol
Python2.7 uses protocol 1 by default, which is not compatible with
class defining __slots__. On the other hand, all the Python versions
support versions >= 2.
4 years ago
MegaIng1
009cc10590
Added `FromPackageLoader` and `open_from_package`
4 years ago
MegaIng1
53b3e12bba
Added `import_sources`
4 years ago
Louis Dubois
abdbabe429
fix: Propagate debug flag on loading grammar from cache
The debug flag is already saved in the cached file, but is not
resumed on loading the dumped file. To solve that,
- add argument `debug` to parser_fronteds.WithLexer.deserialize
- add argument `debug` lalr_parser.LALR_Parser.deserialize
- propagate the value of the `debug` option on resuming a cached
grammar, in lark.Lark._load
4 years ago
Louis Dubois
d41e3cdfb9
chg: Force pickle to use highest protocol
Python2.7 uses protocol 1 by default, which is not compatible with
class defining __slots__. On the other hand, all the Python versions
support versions >= 2.
4 years ago
Tom Ritchford
fcf6e8e98e
Test print argument to lark.tools.standalone.main
4 years ago
Erez Sh
156bd7577f
Adjustments and fixes for PR
4 years ago
Jonah Yolles-Murphy
b82f7177cb
added test
4 years ago
Erez Sh
968d1652d8
Fixed issue in grammar error-reporting due to unordered dict (changed it to list)
4 years ago
Chanic Panic
b89ee6b2fc
Write tests for TreeForestTransformer
4 years ago
Erez Sh
fe89296193
Improved load_grammar's error messages, and added tests
4 years ago
Chanic Panic
f89b1549dd
Write tests for ambiguous intermediate nodes in the SPPF
4 years ago
Blank Spruce
96873d64ba
Make transformer work with tokens in standalone parser, fixes #648
4 years ago
decorator-factory
9923987e94
allow multiline regexes with 'x' (verbose) flag
4 years ago
Erez Sh
b7068c45a7
Tiny fixes. Don't test use_bytes on Python 3.4.
4 years ago
Erez Sh
d631cad024
Minor adjustments
4 years ago
Erez Sh
7c6e94bf73
Fixed issues with the use_bytes PR, and added documentation
4 years ago
MegaIng1
c93106f143
Tests for bytes parser (credit to @ctrlcctrlv )
4 years ago
Inky
fcaf10ac4d
Fixes caching when custom lexers are used
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