We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
When missing alternatives within [], Lark will produce None for all the alternatives, while only generating one match if any of them match.
[]
This breaks the principle behind it, the argument count must remain the same whether or not there is a match.
To Reproduce
from lark import Lark p = Lark(r""" start: b [c | d] b: "b" c: "c" d: "d" """) print(p.parse('b').pretty()) print(p.parse('bc').pretty()) # Output # ------ # start # b # None # None # start # b # c
@MegaIng @ornariece Not sure how we missed it, but we need to fix it.
Related PRs: #922
The text was updated successfully, but these errors were encountered:
Bugfix: maybe_placeholders now don't accumulate over the | operator (…
97c4f3f
…Issue #1078)
No branches or pull requests
Describe the bug
When missing alternatives within
[]
, Lark will produce None for all the alternatives, while only generating one match if any of them match.This breaks the principle behind it, the argument count must remain the same whether or not there is a match.
To Reproduce
@MegaIng @ornariece Not sure how we missed it, but we need to fix it.
Related PRs: #922
The text was updated successfully, but these errors were encountered: