From 27ed29aea5915777d7e75f251b2e10f7351e2701 Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Tue, 17 Jun 2014 13:57:45 +1000 Subject: [PATCH] Allow SCT files to have numbers with a leading minus --- site_ansto/instrument/util/gen_sct.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site_ansto/instrument/util/gen_sct.py b/site_ansto/instrument/util/gen_sct.py index fadd550b..5c2478bc 100755 --- a/site_ansto/instrument/util/gen_sct.py +++ b/site_ansto/instrument/util/gen_sct.py @@ -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: