From 52ccfde2cdd4558e81e8eaf923c6952b3530ef0b Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Thu, 5 Nov 2009 17:21:25 -0800 Subject: [PATCH] isa_parser: allow negative integer literals --- src/arch/isa_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/isa_parser.py b/src/arch/isa_parser.py index 2db7c6aa6..bd45a8313 100755 --- a/src/arch/isa_parser.py +++ b/src/arch/isa_parser.py @@ -128,7 +128,7 @@ class ISAParser(Grammar): # Integer literal def t_INTLIT(self, t): - r'(0x[\da-fA-F]+)|\d+' + r'-?(0x[\da-fA-F]+)|\d+' try: t.value = int(t.value,0) except ValueError: