summaryrefslogtreecommitdiff
path: root/examples/eval_arith.py
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2020-04-07 15:25:08 -0500
committerptmcg <ptmcg@austin.rr.com>2020-04-07 15:25:08 -0500
commit72f2c5a67b4a26f584104b9ff63e1f272f54c5df (patch)
tree029f9fbacee8f4b378d3a9759979c5d2c60826d9 /examples/eval_arith.py
parent1881e43c10c34c0d24a6e3ecea7b4da710f9c790 (diff)
downloadpyparsing-git-72f2c5a67b4a26f584104b9ff63e1f272f54c5df.tar.gz
enable packrat parsing in all examples using infixNotation
Diffstat (limited to 'examples/eval_arith.py')
-rw-r--r--examples/eval_arith.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/eval_arith.py b/examples/eval_arith.py
index 6a747f3..4f6082f 100644
--- a/examples/eval_arith.py
+++ b/examples/eval_arith.py
@@ -17,8 +17,11 @@ from pyparsing import (
opAssoc,
infixNotation,
Literal,
+ ParserElement,
)
+ParserElement.enablePackrat()
+
class EvalConstant:
"Class to evaluate a parsed constant or variable"