lexer: t_NUMBER should not grab minus sign
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Sun, 22 Aug 2021 18:27:09 +0000 (18:27 +0000)
committerDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Sun, 22 Aug 2021 19:54:59 +0000 (19:54 +0000)
src/openpower/decoder/pseudo/lexer.py

index aad11a04a9f8ce59108974587c769e64e9ae2fea..b420798b17533118a8440e91c077b38f2b68180f 100644 (file)
@@ -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