Erez Sh
81fa039872
Refactor: Eradicated inheritance from object
3 years ago
Erez Sh
61c4512cf3
Rename lexer: Standard/Traditional -> Basic
3 years ago
Erez Sh
36c957595b
Token priority is now 0 by default
3 years ago
MegaIng
3a4568df24
Reworked grammar to simplify later processing + expand_kids_by_data + tests
3 years ago
Erez Sh
e30eef7a53
Commit latest master to v1.0
3 years ago
Erez Sh
0fddb7fef6
Replace '...' with 'NotImplemented'
3 years ago
Erez Sh
1457e01e7e
Fixes to typing and tests
3 years ago
Erez Sh
a8473e7e5d
A tiny bit more typing info
3 years ago
Erez Sh
ead7a04473
Small fix
3 years ago
Erez Sh
3bc070bc1d
Change how propagate_positions work
3 years ago
Erez Sh
da3a993d02
lexer.py: Small simplification
4 years ago
Erez Sh
e5991739ee
lexer.py: Small refactor
4 years ago
Erez Sh
389e7fbf5c
lexer.py: Refactored mres operations into a Scanner class.
4 years ago
Chanic Panic
804114d1ff
Remove default values on type declarations and mark ClassVars
3 years ago
Chanic Panic
4bc9445238
Corrections for PR and some mypy errors
3 years ago
Chanic Panic
433adeeaff
Last batch of .pyi files
__init__, lexer, and parsers/__init__
3 years ago
Erez Sh
9b77270502
Removed code relevant to versions below 3.6
3 years ago
Erez Sh
ec2ba8826e
Docs fix + cleanup
3 years ago
Erez Sh
eb45324146
Removed deprecated code
3 years ago
Erez Sh
8a00284700
Removed some of the Python2 compatibility code
3 years ago
Erez Sh
2409065529
Refactor PropagatePositions, change Token.pos_in_stream to start_pos
Increased minor version, because it might invalidate serialized objects
4 years ago
Erez Sh
5b0b20762a
Small correction to PR
4 years ago
Gary Geng
94e242f51a
Use NotImplemented for __eq__ and use __new__ for LexerThread
4 years ago
Gary Geng
38ab4232ae
make LexerState inherit from object
4 years ago
Gary Geng
6d6c751a79
Make LexerThread inherit from object
4 years ago
Gary Geng
83ce0c7a00
Fix copying and comparing of some classes
4 years ago
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