Commit 84753e44 authored by Taddeus Kroes's avatar Taddeus Kroes

Some syntaxis fixes (applied pep8).

parent 41047c7e
...@@ -90,7 +90,7 @@ TOKEN_MAP = { ...@@ -90,7 +90,7 @@ TOKEN_MAP = {
OP_HINT: 'HINT', OP_HINT: 'HINT',
OP_REWRITE_ALL: 'REWRITE_ALL', OP_REWRITE_ALL: 'REWRITE_ALL',
OP_REWRITE: 'REWRITE', OP_REWRITE: 'REWRITE',
} }
def to_expression(obj): def to_expression(obj):
......
...@@ -51,8 +51,8 @@ class Parser(BisonParser): ...@@ -51,8 +51,8 @@ class Parser(BisonParser):
# ---------------------------------------------------------------- # ----------------------------------------------------------------
# TODO: add a runtime check to verify that this token list match the list # TODO: add a runtime check to verify that this token list match the list
# of tokens of the lex script. # of tokens of the lex script.
tokens = ['NUMBER', 'IDENTIFIER', 'NEWLINE', 'QUIT', 'RAISE', 'GRAPH', \ tokens = ['NUMBER', 'IDENTIFIER', 'NEWLINE', 'QUIT', 'RAISE', 'GRAPH', \
'LPAREN', 'RPAREN'] + TOKEN_MAP.values() 'LPAREN', 'RPAREN'] + TOKEN_MAP.values()
# ------------------------------ # ------------------------------
# precedences # precedences
......
...@@ -219,7 +219,6 @@ def multiply_numerics(root, args): ...@@ -219,7 +219,6 @@ def multiply_numerics(root, args):
""" """
scope, c0, c1 = args scope, c0, c1 = args
# Replace the left node with the new expression # Replace the left node with the new expression
substitution = Leaf(c0.value * c1.value).negate(c0.negated + c1.negated) substitution = Leaf(c0.value * c1.value).negate(c0.negated + c1.negated)
scope.replace(c0, substitution) scope.replace(c0, substitution)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment