Accept many more prefixes and suffixes for a constant integer
This patch makes Normand accept the `0o`/`0O` and `0b`/`0B` prefixes for
a constant integer, as well as the `h`/`H`/`q`/`Q`/`o`/`O`/`b`/`B`
suffixes.
Those suffixes are common in tools such as MASM [1]:
> You can also specify hexadecimal numbers by adding an h after the
> number. You can use uppercase or lowercase letters within numbers. For
> example, "0x4AB3", "0X4aB3", "4AB3h", "4ab3h", and "4aB3H" have the
> same meaning.
as well as NASM [2]:
> NASM allows you to specify numbers in a variety of number bases, in a
> variety of ways: you can suffix `H`, `Q` or `O`, and `B` for hex,
> octal, and binary, or you can prefix `0x` for hex in the style of C,
> [...]
This constant integer form is available anywhere outside a Python
expression string, for example:
55 * 28Fh
+0o755~
11010001b
m:my_macro(-126q, 0b101)
Internally, the _norm_const_int() function transforms any suffix form
into a Python prefix form (for int()), keeping the negative `-` if
present.
[1]: https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/masm-numbers-and-operators
[2]: https://www.tortall.net/projects/yasm/manual/html/nasm-const.html
Change-Id: I708494e84080b9f4292397c6a81e67e335d330cd
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>