isa_parser: allow negative integer literals
This commit is contained in:
parent
589218168c
commit
52ccfde2cd
|
@ -128,7 +128,7 @@ class ISAParser(Grammar):
|
||||||
|
|
||||||
# Integer literal
|
# Integer literal
|
||||||
def t_INTLIT(self, t):
|
def t_INTLIT(self, t):
|
||||||
r'(0x[\da-fA-F]+)|\d+'
|
r'-?(0x[\da-fA-F]+)|\d+'
|
||||||
try:
|
try:
|
||||||
t.value = int(t.value,0)
|
t.value = int(t.value,0)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|
Loading…
Reference in a new issue