summaryrefslogtreecommitdiff
path: root/src/examples/excelExpr.py
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@austin.rr.com>2016-02-07 05:47:23 +0000
committerPaul McGuire <ptmcg@austin.rr.com>2016-02-07 05:47:23 +0000
commit3963d5fdbd16f25d4e94968b823e811df836142d (patch)
tree0329cd5c5951e851e445b6e07b3fd8420424e34b /src/examples/excelExpr.py
parent4b24fe8cfb54086ecaec689a7cd229a0430b75c9 (diff)
downloadpyparsing-git-3963d5fdbd16f25d4e94968b823e811df836142d.tar.gz
Removed deprecated class Upcase and deprecated class keepOriginalText; updated examples to remove those symbols, and to replace operatorPrecedence with infixNotation
Diffstat (limited to 'src/examples/excelExpr.py')
-rw-r--r--src/examples/excelExpr.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/examples/excelExpr.py b/src/examples/excelExpr.py
index 39af365..2700100 100644
--- a/src/examples/excelExpr.py
+++ b/src/examples/excelExpr.py
@@ -6,7 +6,7 @@
#
from pyparsing import (CaselessKeyword, Suppress, Word, alphas,
alphanums, nums, Optional, Group, oneOf, Forward, Regex,
- operatorPrecedence, opAssoc, dblQuotedString, delimitedList,
+ infixNotation, opAssoc, dblQuotedString, delimitedList,
Combine, Literal, QuotedString, ParserElement)
ParserElement.enablePackrat()
@@ -43,14 +43,14 @@ multOp = oneOf("* /")
addOp = oneOf("+ -")
numericLiteral = Regex(r"\-?\d+(\.\d+)?")
operand = numericLiteral | funcCall | cellRange | cellRef
-arithExpr = operatorPrecedence(operand,
+arithExpr = infixNotation(operand,
[
(multOp, 2, opAssoc.LEFT),
(addOp, 2, opAssoc.LEFT),
])
textOperand = dblQuotedString | cellRef
-textExpr = operatorPrecedence(textOperand,
+textExpr = infixNotation(textOperand,
[
('&', 2, opAssoc.LEFT),
])