decodetree: Allow +- to begin a number initializing a field
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 6e7ba27..f6f58e2 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -589,7 +589,7 @@
continue
# 'Foo=number' sets an argument field to a constant value
- if re_fullmatch(re_ident + '=[0-9]+', t):
+ if re_fullmatch(re_ident + '=[+-]?[0-9]+', t):
(fname, value) = t.split('=')
value = int(value)
flds = add_field(lineno, flds, fname, ConstField(value))