From: Luke Kenneth Casson Leighton Date: Sun, 5 Apr 2020 19:03:14 +0000 (+0100) Subject: get hex to recognise capitals X-Git-Tag: div_pipeline~1472 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=41dea8bc3c9063f291e382e24272196da4060dc9;p=soc.git get hex to recognise capitals --- diff --git a/src/soc/decoder/pseudo/lexer.py b/src/soc/decoder/pseudo/lexer.py index 2518970f..85130696 100644 --- a/src/soc/decoder/pseudo/lexer.py +++ b/src/soc/decoder/pseudo/lexer.py @@ -281,7 +281,7 @@ class PowerLexer: self.lexer = lex.lex(module=self, **kwargs) def t_HEX(self, t): - r"""0x[0-9a-f_]+""" + r"""0x[0-9a-fA-F_]+""" val = t.value.replace("_", "") t.value = SelectableInt(int(val, 16), (len(val)-2)*16) return t