From 488e1535e0c3e81f2e3e83612fe73284e0578d5a Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 22 Aug 2021 18:27:09 +0000 Subject: [PATCH] lexer: t_NUMBER should not grab minus sign --- src/openpower/decoder/pseudo/lexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openpower/decoder/pseudo/lexer.py b/src/openpower/decoder/pseudo/lexer.py index aad11a04..b420798b 100644 --- a/src/openpower/decoder/pseudo/lexer.py +++ b/src/openpower/decoder/pseudo/lexer.py @@ -346,7 +346,7 @@ class PowerLexer: #t_NUMBER = r'\d+' # taken from decmial.py but without the leading sign def t_NUMBER(self, t): - r"""[-]?(\d+(\.\d*)?|\.\d+)([eE][-+]? \d+)?""" + r"""(\d+(\.\d*)?|\.\d+)([eE][-+]? \d+)?""" t.value = int(t.value) return t -- 2.30.2