Erez Sh
7b6a730abc
Small bugfixes in exceptions
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
712df517b2
Fixes for PR. Custom lexer now works with CYK
4 years ago
Erez Sh
7beb681563
Adds stubs; cleanup
4 years ago
Erez Sh
c6819a0ed7
Refactored all likely exceptions to inherit from LarkError, and improved error messages.
4 years ago
Erez Sh
e6bbfd16c0
Fixed comment
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
Erez Sh
f285cda4f2
Earley error reporting - initial (Issue #760 )
4 years ago
Erez Sh
b3eb2a3120
Add token_history to UnexpectedToken
4 years ago
MegaIng
633a6dfee8
Make `UnexpectedCharacters` print the repr
This is an additional response to #738 .
I also often came across this when unexpectedly having a newline, which would previously result in the message being split up across two lines. This PR makes it easier to identify exactly which special character is causing problems.
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
Peter Wienemann
e02b1b6669
Fix various typos
4 years ago
starwarswii
10dd3d7299
corrected caret placement in error messages due to tabs
fixes #663
4 years ago
Erez Sh
c6438007a7
A tiny fix
4 years ago
Erez Sh
288078a6a0
Corrections to PR
4 years ago
Sasank Chilamkurthy
452f3fc061
complete sphinx autodoc
4 years ago
Erez Sh
af3bedd39d
Adjustments to logging PR
4 years ago
Blank Spruce
5559b1a211
Add missing elements in standalone parser
Add:
- missing imports
- __version__ variable
Additionally regenerated json parser example
4 years ago
Erez Sh
2c7afed894
Small fixes
4 years ago
Erez Sh
02d57bc32a
Small adjustments to PR
4 years ago
MegaIng1
cb2d9cded0
Refactored ParserPuppet, added stubs
4 years ago
MegaIng1
d3b0449f71
Improved `match_examples` with `UnexpectedToken.accepts`
4 years ago
MegaIng1
a7bcd0bc2d
Added `accepts` attribute to `UnexpectedToken` and update stubs
4 years ago
MegaIng1
28e0a86f38
Small improvements for debug info
4 years ago
Erez Sh
5954fdf87a
Restore bad code (needs better fix). Updated readme & docs.
4 years ago
Erez Sh
61a7c1e20a
Removed code that causes failure in Python 3.4
4 years ago
MegaIng1
0c89189b5f
Support for bytes parser
4 years ago
Aleh Arol
e6daf51f25
Make token type check fallback disabled by default
4 years ago
Erez Sh
4463524b3a
Puppet initial
4 years ago
Aleh Arol
732a562a1c
Use token type equality as a fallback when matching error examples
4 years ago
Erez Sh
3b901a06b0
Added docs (Spurred by issue #510 )
4 years ago
Erez Shinan
1815bd7fbd
Support for token visitation in internal transformers, as an alternative mechanism for lexer_callbacks
5 years ago
Erez Sh
0a4530b942
Improved Earley error on EOF (Issue #457 )
5 years ago
Erez Shinan
f1e844accd
Mid work. Not promising
5 years ago
Aurelien Grenotton
cbafa4d7bb
Make VisitError inherit from LarkError
The recently added VisitError is the only lark exception not inheriting from LarkError,
which makes it painful to catch for client application.
6 years ago
Erez Shinan
6a6dd97c52
VisitError now allows explicit access to previous exception (Issue #314 )
6 years ago
Erez Shinan
688c453456
Corrections
6 years ago
Erez Shinan
8e7c05a8f6
Added VisitError for transformers
6 years ago
night199uk
d7a6b01d8a
Ensure that Exceptions with Unicode content display correctly
6 years ago
Erez Shinan
bd7e331ad7
Slightly better error message (UnexpectedToken)
6 years ago
Erez Shinan
843da8e809
Fixed bugs in the standalone generator (Issue #212 )
6 years ago
Erez Shinan
dd69b95338
Cleanup after pylint
6 years ago
Erez Shinan
cffd610e77
Fixed reconstructor. All tests passing
6 years ago
Erez Shinan
1247a8c330
Improved error messages (as pointed out in issue #181 )
6 years ago
Erez Shinan
e7212261b2
Fixed examples for error reporting
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