Fixed a grammar check bug in the tokenizer.

This commit is contained in:
2020-04-16 14:19:59 -05:00
parent 20e114e33d
commit 0a79cdba54
2 changed files with 13 additions and 12 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ def get_tokens_from_expression_string(expression_string):
for i in range(0, len(expression_string)):
c = expression_string[i]
if c == '.' or c.isdigit():
if tmp.count('.') == 1:
if c == '.' and tmp.count('.') == 1:
raise SyntaxError("Invalid grammar, to many periods in number. Found at position " + str (i) + ".")
if len(tokens) > 1:
lookBehind = tokens[-1]