isa_parser: allow negative integer literals

This commit is contained in:
Nathan Binkert 2009-11-05 17:21:25 -08:00
parent 589218168c
commit 52ccfde2cd

View file

@ -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: