Fixed lexer.
This commit is contained in:
parent
d118dcd844
commit
16720f0ca5
2
lexer.py
2
lexer.py
|
@ -78,7 +78,7 @@ t_ignore_COMMENT = r'//.*'
|
|||
|
||||
# A regex rule with some action code
|
||||
def t_NUMBER(t):
|
||||
r'[+-]*[(0-9).]+\b'
|
||||
r'[+-]*[0-9.]+\b'
|
||||
t.value = t.value.replace("+", "")
|
||||
t.value = t.value.replace("--", "")
|
||||
t.value = float(t.value)
|
||||
|
|
Loading…
Reference in New Issue