aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-02-28 14:36:52 -0800
committerRichard Henderson <richard.henderson@linaro.org>2019-03-12 09:46:58 -0700
commit263ac638a76a72841e3f513b14c515680703e084 (patch)
tree15c4223653efce37e590aa8e3c77af23f021d790 /scripts
parent82bfac1c06cadeb5c7252734dc695d951185916c (diff)
decodetree: Allow +- to begin a number initializing a field
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/decodetree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/decodetree.py b/scripts/decodetree.py
index 6e7ba278be..f6f58e2fec 100755
--- a/scripts/decodetree.py
+++ b/scripts/decodetree.py
@@ -589,7 +589,7 @@ def parse_generic(lineno, is_format, name, toks):
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))