replace deprecated pyparsing method

pyparsing renamed a method used to define the operator
precedence hierarchy [1]. The method's behavior was preserved
although opt-in override enhancements to the paranthesis were
introduced.

Needed-by: https://review.opendev.org/818614/
[1] ab2f220dd2

Change-Id: I759aa5eec7dd52b3dba10a389efa27c5956991b9
This commit is contained in:
Goutham Pacha Ravi 2021-11-22 13:14:55 -08:00
parent 2969504e98
commit 97aeffa9f5
1 changed files with 2 additions and 2 deletions

View File

@ -237,7 +237,7 @@ def _def_parser():
oneOf = pyparsing.oneOf
opAssoc = pyparsing.opAssoc
operatorPrecedence = pyparsing.operatorPrecedence
infixNotation = pyparsing.infixNotation
Word = pyparsing.Word
integer = Word(nums)
@ -257,7 +257,7 @@ def _def_parser():
negateop = oneOf('NOT not !')
operand.setParseAction(EvalConstant)
expr = operatorPrecedence(operand, [
expr = infixNotation(operand, [
(fn, 1, opAssoc.RIGHT, EvalFunction),
("^", 2, opAssoc.RIGHT, EvalPowerOp),
(signop, 1, opAssoc.RIGHT, EvalSignOp),