Erez Sh
1d61de4f94
Fix .pyi files
4 years ago
Erez Sh
b379ea4b8b
Grammar: Added new %override statement for rewriting imported rules (like in class inheritance)
4 years ago
Erez Sh
a7c71f32cc
Fixed Lark.lex(), added dont_ignore option, added tests for it.
4 years ago
Erez Sh
aa7dc19bc3
Corrections for PR
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
c6819a0ed7
Refactored all likely exceptions to inherit from LarkError, and improved error messages.
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
b3eb2a3120
Add token_history to UnexpectedToken
4 years ago
MegaIng1
4e442bc0b8
regression-fix for #760
4 years ago
Erez Sh
5b30ba4841
Cleanup, and a few PEP8 changes
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
72e7926097
Completely redesigned the interface between Lexer<->Parser, and refactored LALR parser and lexers
4 years ago
Erez Sh
115edbfb32
Rewrite lexer to use LexerState
4 years ago
Jonah Yolles-Murphy
b82f7177cb
added test
4 years ago
Jonah Yolles-Murphy
6cd706279a
make Trees and Tokens' reprs' evalable
4 years ago
Erez Sh
96b0cfbbc4
Docs: error in docs..
4 years ago
Erez Sh
49914424df
Docs: Tiny fix (rst)
4 years ago
Erez Sh
fdd5c83588
Updated docstring for Token
4 years ago
Sasank Chilamkurthy
fd08f470e2
document lark.Token
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
MegaIng1
0c89189b5f
Support for bytes parser
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
3f524c88c9
Apparently still need re
4 years ago
julienmalard
2ed40237a5
Removed unnecessary imports
4 years ago
julienmalard
09e80a5c9e
Fixed tests
4 years ago
Erez Sh
985c38e0e0
Documentation fix (Removed bloat from README)
4 years ago
julienmalard
86a162d6d8
Added `regex` module as optional mode.
4 years ago
Erez Sh
3bee21051e
Reverted changes regarding EOF
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
b2f1b3bf7c
Small fixes
5 years ago
Erez Sh
8842928963
Fixed multithreading bug in ContextualLexer (Issue #493 )
5 years ago
Erez Shinan
58d6d9fac1
Added Token.end_pos, and updated docs regarding recent commits
5 years ago
Erez Shinan
1815bd7fbd
Support for token visitation in internal transformers, as an alternative mechanism for lexer_callbacks
5 years ago
Erez Sh
e39bfa1b18
Bugfix: Some tokens did not recieve and end_line (Issue #472 )
5 years ago
Timo Furrer
9f218f85b6
Copy exc state when converting UnexpectedCharacters to UnexpectedToken exc. Fixes #462
5 years ago
Erez Sh
a207963e46
Improved error reporting (Issue #194 )
5 years ago
Erez Sh
a7e7b568ff
Fixed contextual lexer error that was confusing users (Issue #194 )
5 years ago
Erez Sh
b6b95c3ff0
Raw docstring to avoid escape warnings (Issue #438 )
5 years ago
Erez Shinan
7e8488d1a0
Fixed issue #425 , keeping in mind unicode issue #411
5 years ago
Erez Shinan
9ca74d7f67
Added the serialize tool for exporting Lark state & analysis
5 years ago
Fábio Macêdo Mendes
1e4dbac58c
Fix undetected newlines on ignored tokens
5 years ago
Erez Shinan
7add0e1f3f
Memoize get_regexp_width (Issue #413 )
5 years ago
Erez Shinan
0d164bd344
Added get_terminal() method (Issue #412 )
5 years ago
Erez Shinan
d952f2a069
Token values are now always unicode (resolves issue #411 )
5 years ago
Erez Shinan
aa75d50bd5
End symbol working for lalr + fixed validation for undefined %ignore
5 years ago
Erez Shinan
f1e844accd
Mid work. Not promising
5 years ago