Explorar el Código

Added input support for floats (no scientific notation yet).

Sander Mathijs van Veen hace 14 años
padre
commit
9f4f502970
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/parser.py

+ 1 - 1
src/parser.py

@@ -340,7 +340,7 @@ class Parser(BisonParser):
 
     %%
 
-    [0-9]+    { returntoken(NUMBER); }
+    [0-9]+"."?[0-9]* { returntoken(NUMBER); }
     [a-zA-Z]  { returntoken(IDENTIFIER); }
     "("       { returntoken(LPAREN); }
     ")"       { returntoken(RPAREN); }