get hex to recognise capitals
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 5 Apr 2020 19:03:14 +0000 (20:03 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 5 Apr 2020 19:03:14 +0000 (20:03 +0100)
src/soc/decoder/pseudo/lexer.py

index 2518970f18ed4bf4d815f22f3668ad2851814066..85130696c7b6ed1b7d9d003b46513d6033fca0d6 100644 (file)
@@ -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