-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
Missing ambiguities when using inline rules #1214
Comments
@chanicpanic Any ideas? |
Both grammars produce the same SPPF, so the issue is probably in the forest to tree transformation. I will look into it more when I have a chance. |
Makes sense! Possibly the inlining of the rules messes with the logic somehow. |
chanicpanic
added a commit
to chanicpanic/lark
that referenced
this issue
Nov 20, 2022
Many thanks for fixing it so quickly! When do you expect to release it? |
@yurymann Released 1.1.5 today. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
With some grammars, Earley parser does not return all ambiguities with
ambiguity='explicit'
.However, when removing the inlining underscore, all ambiguities are returned.
Potentially related to #536.
To Reproduce
When parsing string
1M 2
withambiguity='explicit'
, the result misses ambiguitiesf2 f2
andf3 f1
.However, removing
_
fromfield
fixes it, at the expense of the additional tree level which I wanted to avoid.It's great that the workaround works, at least in this case. But with a complex grammar including inlined rules at several levels, it's difficult to spot the issue before realising that some results are missing in production.
The text was updated successfully, but these errors were encountered: