Merge pull request #82 from qcjiang/bug_fix/negative_hex_address

fix a bug when the hex_number of address is negative
This commit is contained in:
Jan
2021-12-03 14:39:04 +01:00
committed by GitHub

View File

@@ -29,7 +29,9 @@ class ParserAArch64(BaseParser):
decimal_number = pp.Combine(
pp.Optional(pp.Literal("-")) + pp.Word(pp.nums)
).setResultsName("value")
hex_number = pp.Combine(pp.Literal("0x") + pp.Word(pp.hexnums)).setResultsName("value")
hex_number = pp.Combine(
pp.Optional(pp.Literal("-")) + pp.Literal("0x") + pp.Word(pp.hexnums)
).setResultsName("value")
relocation = pp.Combine(pp.Literal(":") + pp.Word(pp.alphanums + "_") + pp.Literal(":"))
first = pp.Word(pp.alphas + "_.", exact=1)
rest = pp.Word(pp.alphanums + "_.")