Erez Sh
0199afa4c8
Cleanup and refactor
3 years ago
MegaIng1
a202f2c7e8
Fix for cache + inline Transformer
3 years ago
MegaIng1
3d5729d5d2
Resolved cyclic dependency by moving deserialize_lexer_conf out of MakeParsingFrontend.deserialize
3 years ago
MegaIng1
9252c0387c
added configurations checks for postlex+dynamic
3 years ago
Erez Sh
7ce0f7015f
Added load_grammar.find_grammar_errors
4 years ago
Erez Sh
ed065eeb76
Removed duplicate line
4 years ago
Erez Sh
679c415673
Small refactor to adjust PR
4 years ago
Erez Sh
712df517b2
Fixes for PR. Custom lexer now works with CYK
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
MegaIng1
cf9d0d915e
Fixes for custom lexer.
4 years ago
MegaIng1
cf25c06420
Added custom lexer to earley.
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
MegaIng1
2d8bd42315
Make `LALR_CustomLexerWrapper` behave correctly + tests
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
45467e1f61
Changes due to code review by @MegaIng
4 years ago
Erez Sh
72e7926097
Completely redesigned the interface between Lexer<->Parser, and refactored LALR parser and lexers
4 years ago
Erez Sh
f2a6feddf1
Tiny fixes
4 years ago
MegaIng1
bd22a2f79e
Removed _LOAD_BLOCKED_OPTIONS
4 years ago
MegaIng1
e1b572c3a9
Allows the standalone parser to take more options.
4 years ago
Erez Sh
aac21d4d19
Minor version bump + Adjustments to PR
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
Erez Sh
798a7026b4
Minor version bump + Adjustments to PR
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
Chanic Panic
9c967fafb0
Add ambiguity='forest' option
4 years ago
Erez Sh
2f4831f9b6
Small refactor after PR
4 years ago
Blank Spruce
96873d64ba
Make transformer work with tokens in standalone parser, fixes #648
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
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
86a162d6d8
Added `regex` module as optional mode.
4 years ago
julienmalard
3fc9733188
Added regex module option.
4 years ago
MegaIng1
926c98bd41
Renamed global_flags to g_regex_flags
4 years ago
MegaIng1
3a97029853
Added global_flags option to Lark (+ test)
4 years ago
Erez Sh
8842928963
Fixed multithreading bug in ContextualLexer (Issue #493 )
5 years ago
Michael Heyvaert
c00f4448fa
fix custom lexer handling for lalr parser + test
5 years ago
night199uk
d845aa3bf1
Add debug flag to Early and XEarley to allow dumping the SPPF
5 years ago
Erez Shinan
bcc4e67bce
CYK also working
5 years ago
Erez Shinan
f71df240b6
Removed Python2 incompatibility
5 years ago
Erez Shinan
0f9dfdd623
Re-implemented CustomLexer after regression (Issue #377 )
5 years ago
Erez Shinan
a798dec779
Fix to new serializer code (Discussed in issue #349 )
5 years ago
Erez Shinan
5ab12b031c
Added transformer, postlex arguments to standalone
5 years ago
Erez Shinan
ae51402cc7
Added serializer test
5 years ago
Erez Shinan
6efa6b4fa0
Still working
5 years ago
Erez Shinan
3c64c56bcd
All tests passing
5 years ago
Erez Shinan
94e15fb6f7
Mid work. Almost stable
5 years ago
Erez Shinan
d13ebb9c15
Using a mostly-generic serialization method
5 years ago
Erez Shinan
dd84f6c0a8
Tiny refactor
5 years ago
Erez Shinan
066303fdab
Serialized lark is now json compatible
5 years ago