Explorar o código

Merge branch 'master' of kompiler.org:trs into sort

Taddeus Kroes %!s(int64=14) %!d(string=hai) anos
pai
achega
bffd9f5d98
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/parser.py

+ 1 - 1
src/parser.py

@@ -154,7 +154,7 @@ class Parser(BisonParser):
             left, right = filter(None, match.groups())
 
             # Filter words (otherwise they will be preprocessed as well)
-            if left + right in ['graph', 'raise']:
+            if (left + right).upper() in self.tokens:
                 return left + right
 
             # If all characters on the right are numbers. e.g. "a4", the