You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The single_digit grammar matches 1, then expects EOF but finds x instead.
The many_digits grammar matches 1, then expects another digit or EOF, but finds x instead.
I would expect both grammars to have the same, or at least similar parse errors. Instead, with Parsley 1.3 on Python 2.7, I get:
1x
^
Parse error at line 1, column 1: expected EOF. trail: []
1x
^
Parse error at line 2, column 0: expected EOF. trail: [digit]
...that is, single_digit reports a sensible error at a sensible location, but many_digits draws the caret under a character that it should have accepted, while reporting an error on line 2 of an input that contains no newline characters.
The text was updated successfully, but these errors were encountered:
it's calculating the line and column wrong. there's clearly no line 2.
this is caused by "off-by-1" errors in one or more places. when that's fixed, the position makes sense again.
some error reporting is also misleading/wrong, e.g. an "expected EOF" error when the parser is at the end of input... the input was simply incomplete, yet it doesn't say more than that.
it seems to me like this project is abandoned and nobody has had any interest in it in years.
Consider the following Python code:
The
single_digit
grammar matches1
, then expects EOF but findsx
instead.The
many_digits
grammar matches1
, then expects another digit or EOF, but findsx
instead.I would expect both grammars to have the same, or at least similar parse errors. Instead, with Parsley 1.3 on Python 2.7, I get:
...that is,
single_digit
reports a sensible error at a sensible location, butmany_digits
draws the caret under a character that it should have accepted, while reporting an error on line 2 of an input that contains no newline characters.The text was updated successfully, but these errors were encountered: