Explorar el Código

Added ICNORECASE flag to preprocessor to allow expressions like 'aC'.

Taddeus Kroes hace 13 años
padre
commit
3e5a676b9e
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/parser.py

+ 2 - 1
src/parser.py

@@ -212,7 +212,8 @@ class Parser(BisonParser):
         i = 0
 
         while i < len(data):
-            data = data[:i] + re.sub(pattern, preprocess_data, data[i:])
+            data = data[:i] + re.sub(pattern, preprocess_data, data[i:],
+                                     flags=re.IGNORECASE)
             i += 1
 
         # Replace escape sequences with original keywords.