summaryrefslogtreecommitdiff
path: root/examples/simpleArith.py
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@users.noreply.github.com>2018-12-23 21:30:40 -0600
committerGitHub <noreply@github.com>2018-12-23 21:30:40 -0600
commit4fba64a079016e6ea62d041f19b7eadd081341e8 (patch)
tree6c5fdae41cf8b335ff1c64f37856786523e4fd0d /examples/simpleArith.py
parent59dfd314c23fd653271bdad37631f0497e8ad748 (diff)
parentde8326d00dffdb500c02839a98330b869c2457f3 (diff)
downloadpyparsing-git-4fba64a079016e6ea62d041f19b7eadd081341e8.tar.gz
Merge pull request #55 from jdufresne/ws
Trim trailing white space throughout the project
Diffstat (limited to 'examples/simpleArith.py')
-rw-r--r--examples/simpleArith.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/simpleArith.py b/examples/simpleArith.py
index 825956b..af05373 100644
--- a/examples/simpleArith.py
+++ b/examples/simpleArith.py
@@ -34,7 +34,7 @@ factop = Literal('!')
# - rightLeftAssoc is the indicator whether the operator is
# right or left associative, using the pyparsing-defined
# constants opAssoc.RIGHT and opAssoc.LEFT.
-# - parseAction is the parse action to be associated with
+# - parseAction is the parse action to be associated with
# expressions matching this operator expression (the
# parse action tuple member may be omitted)
# 3. Call infixNotation passing the operand expression and
@@ -42,7 +42,7 @@ factop = Literal('!')
# as the generated pyparsing expression. You can then use
# this expression to parse input strings, or incorporate it
# into a larger, more complex grammar.
-#
+#
expr = infixNotation( operand,
[("!", 1, opAssoc.LEFT),
("^", 2, opAssoc.RIGHT),
@@ -63,5 +63,4 @@ test = ["9 + 2 + 3",
for t in test:
print(t)
print(expr.parseString(t))
- print('')
-
+ print('')