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
When a rule has multiple arguments and passes those arguments to another rule, all but the last argument are wrapped in single-valued tuples. This is a concern because the tuples are unexpected and the multiple arguments are not handled consistently.
Code example:
from parsley import makeGrammar
GRAMMAR = """
a :x :y :z = b(x, y, z) -> print("a: x={} y={} z={}".format(x, y, z))
b :x :y :z = c(x, y, z) -> print("b: x={} y={} z={}".format(x, y, z))
c :x :y :z = -> print("c: x={} y={} z={}".format(x, y, z))
"""
ParserClass = makeGrammar(GRAMMAR, {})
parser = ParserClass('')
parser.a(1, 2, 3)
When a rule has multiple arguments and passes those arguments to another rule, all but the last argument are wrapped in single-valued tuples. This is a concern because the tuples are unexpected and the multiple arguments are not handled consistently.
Code example:
Output from Python 3.5.3:
The text was updated successfully, but these errors were encountered: