diff mbox series

[PULL,10/12] decodetree: Allow +- to begin a number initializing a field

Message ID 20190312170334.14005-11-richard.henderson@linaro.org
State Accepted
Commit 263ac638a76a72841e3f513b14c515680703e084
Headers show
Series decodetree patches | expand

Commit Message

Richard Henderson March 12, 2019, 5:03 p.m. UTC
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 scripts/decodetree.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.2
diff mbox series

Patch

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))