From 062778c428a75c5b966f14bf91619c4e328261ab Mon Sep 17 00:00:00 2001 From: ptmcg Date: Sat, 4 Jan 2020 17:43:44 -0600 Subject: Rollforward infixNotation ternary op fix from 2.4.6 branch, plus related unit test; change TestParseResultsAsserts to mixin instead of subclass; rollforward 2.4.6 CHANGES blurb from 2.4.6 branch --- pyparsing/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pyparsing/helpers.py') diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py index 3bd5a67..c4b84d7 100644 --- a/pyparsing/helpers.py +++ b/pyparsing/helpers.py @@ -696,7 +696,7 @@ def infixNotation(baseExpr, opList, lpar=Suppress("("), rpar=Suppress(")")): elif arity == 3: matchExpr = _FB( lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr - ) + Group(lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr) + ) + Group(lastExpr + OneOrMore(opExpr1 + lastExpr + opExpr2 + lastExpr)) else: raise ValueError( "operator must be unary (1), binary (2), or ternary (3)" -- cgit v1.2.1