Allow SCT files to have numbers with a leading minus

This commit is contained in:
Douglas Clowes
2014-06-17 13:57:45 +10:00
parent eadb336ef3
commit 27ed29aea5

View File

@ -218,7 +218,7 @@ def t_COMMENT(t):
# No Return Value. Token discarded
def t_FLOATER(t):
r'\d+\.\d*([eE]\d+)?'
r'-?\d+\.\d*([eE]\d+)?'
try:
t.value = float(t.value)
except ValueError:
@ -227,7 +227,7 @@ def t_FLOATER(t):
return t
def t_INTEGER(t):
r'\d+'
r'-?\d+'
try:
t.value = int(t.value)
except ValueError: