소스 검색

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

Sander Mathijs van Veen 14 년 전
부모
커밋
9f4f502970
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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); }