Browse Source

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

Sander Mathijs van Veen 14 năm trước cách đây
mục cha
commit
9f4f502970
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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); }