-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Nested IndentedBlock Issue when Implementing if/elif/else #417
Comments
Just tested with a modified version of https://github.com/pyparsing/pyparsing/blob/master/examples/indented_block_example.py data = """\
A
a
b
c
B
d
b
e
f
g
C
h
"""
group = pp.Forward()
group <<= pp.Group(pp.Char(pp.alphas) + pp.Group(pp.IndentedBlock(pp.Char(pp.alphas) | group)))
print(pp.OneOrMore(group).parseString(data)) The output is still not right. (modified the format a bit to make it clearer)
Seems like the weird behavior may relate to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I'm trying to implement the nested if/elif/else with
IndentedBlock
.The output is (Modified the format a bit, to make it more clear.)
Seems like the inner if clause is wrongly parsed.
The text was updated successfully, but these errors were encountered: