-
-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent parse results from simple ambiguous grammar #1434
Comments
Does this still happen with the latest master? ( |
Yes, it does still happen. ( I also see discussion #1288 and setting environment variable |
@mcarpenter Try the latest master again. (you might need to uninstall lark first) |
That got it, thanks. |
Describe the bug
I have a small grammar that is a starting point to parse regular expressions. When run repeatedly on the same input Lark produces two different parse trees.
There is an ambiguity in my toy grammar because a RE
quantifier
(*
,+
,?
) can also be interpreted as aprintable_char
(ASCII values between space and tilde). However my reading previous issues (#81, #83) indicates inconsistent parse results should be treated as a bug (and it was certainly a surprise).To Reproduce
Lark 1.1.9, Python 3.10.12.
Sample results
The text was updated successfully, but these errors were encountered: