paranthesis now suppored in identifier strings

This commit is contained in:
Julian Hammer
2020-10-12 15:05:19 +02:00
parent 1def12ee79
commit 5e7a12f9bb

View File

@@ -26,7 +26,7 @@ class ParserX86ATT(BaseParser):
relocation = pp.Combine(pp.Literal('@') + pp.Word(pp.alphas))
id_offset = pp.Word(pp.nums) + pp.Suppress(pp.Literal('+'))
first = pp.Word(pp.alphas + '_.', exact=1)
rest = pp.Word(pp.alphanums + '$_.+-')
rest = pp.Word(pp.alphanums + '$_.+-()')
identifier = pp.Group(
pp.Optional(id_offset).setResultsName('offset')
+ pp.Combine(first + pp.Optional(rest)).setResultsName('name')