Fixed a grammar check bug in the tokenizer.
This commit is contained in:
+1
-1
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user