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
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 Shinan
f1e844accd
Mid work. Not promising
5 years ago
Erez Shinan
a798dec779
Fix to new serializer code (Discussed in issue #349 )
5 years ago
Erez Shinan
bd75bf2dff
Refactor - callbacks are now {rule: callback}, instead of a Callback object referenced by Rule.alias
5 years ago
Erez Shinan
c85098e090
Small refactoring in standalone
6 years ago
Erez Shinan
f048bfb870
Refactoring around terminals / tokens
6 years ago
Erez Shinan
dd69b95338
Cleanup after pylint
6 years ago
Erez Shinan
5c6df8e825
Moved and restructured exceptions
* All exceptions are now under exceptions.py
* UnexpectedInput is now superclass of UnexpectedToken and UnexpectedCharacters,
all of which support the get_context() and match_examples() methods.
6 years ago
Erez Shinan
c0cf1b3176
Added some docstrings, removed is_terminal from common
6 years ago
Erez Shinan
880f42dd12
Corrections to PR and added get_context
6 years ago
DrSlump
e69d567bce
example driven parser errors
6 years ago
Erez Shinan
327cca8c00
Added 'considered_rules' to exceptions, to help users debug
7 years ago
Erez Shinan
07f45a0bd3
Style fixes
7 years ago
Erez Shinan
22e525f53e
Fixed propagate positions. Added lexer_callbacks option.
7 years ago
Erez Shinan
37c1c0f65f
Better error message for bad regexps (Issue #62 )
7 years ago
Erez Shinan
9b0672fda6
Standalone tools now supports postlex
7 years ago
Erez Shinan
da1910f5b6
More refactoring towards standalone
7 years ago
Erez Shinan
1cc4c965e8
Big Refactor: Grammars now build in half the time. Code shorter & cleaner.
7 years ago
Erez Shinan
5f5acca40b
Cleaned up the LALR(1) parser
7 years ago
Erez Shinan
dcb7297c30
Flags are now part of the terminal identity
7 years ago
Erez Shinan
2efbc08854
Support for multiple flags
7 years ago
Erez Shinan
e8810e3b80
Fixed some deprecation warnings due to changes in Py3.6 regexps
7 years ago
Erez Shinan
ac9ea26b58
Added token priority for standard lexers.
Big Thanks to Seth G of the mappyfile project for financing this feature!
7 years ago
Erez Shinan
0c5acaab8a
Refactoring load_grammar
7 years ago
Erez Shinan
0d5dd2bd0d
Improved README. Dynamic lexer now generates tokens.
7 years ago
Erez Shinan
4eec924403
Added prioritization to Earley. Use rule.1 etc. Highest priority will be selected in case of ambiguity.
7 years ago
Erez Shinan
188386cf04
Fixed main bug in test_token_collision2.
7 years ago
Erez Shinan
794a1c4965
More flags work
8 years ago
Erez Shinan
34acc4674e
Added flag options to terminals (just 'i' for now)
8 years ago
Erez Shinan
a73cc9ad90
Re-wrote the Earley parser to use a parse-forest
It now knows how to resolve ambiguity! And in a memory-efficient way!
8 years ago
Erez Shinan
680449fb6b
A little bit of cleanup
8 years ago
Erez Shinan
d230e7744c
Pylint
8 years ago
Erez Shinan
5236e4a32a
Refactored TokenDef to store Pattern(Str/RE)
8 years ago
Erez Shinan
538f944602
My Earley parser is working
8 years ago
Erez Shinan
0b902b1d03
Added the '!' prefix to keep all tokens in rule. Also removed tools (it's now in lark/tools)
8 years ago
Erez Shinan
c8e6122148
Restored nice error reports
8 years ago
Erez Shinan
387b701670
Added Nearley-to-lark converter
8 years ago
Erez Shinan
f31482c236
Lint treatment
8 years ago
Erez Shinan
7af3de208d
Moved lexing responsibility to parser frontend
8 years ago
Erez Shinan
1602482608
Improved error reporting in Earley
8 years ago
Erez Shinan
115c4c6d21
A little order and refactoring
8 years ago
Erez Shinan
cde2b677bb
Added tests and lots of fixes and refactoring
8 years ago