diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-14 00:50:34 -0800 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-14 00:57:05 -0800 |
commit | 9df075595e08b923c1eb9d73b2900ed4a0dfb464 (patch) | |
tree | 20af360d010eb3a6cf8a6bbdad095bdba53434a0 /nasmlib | |
parent | ce19a52a3422332d55d8c0f601f30c2e67c14f09 (diff) | |
download | nasm-9df075595e08b923c1eb9d73b2900ed4a0dfb464.tar.gz |
Restore the ability to have ? in identifiers, except ? itself
? in identifiers turns out to be used in the field even in non-TASM
mode. Resolve this by allowing it in an identifier still, but treat
'?' by itself the same as we would a keyword, meaning that it needs to
be separated from other identifier characters.
In other words:
a ? b : c ; conditional expression
a?b:c ; seg:off expression seg = a?b, off = c
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'nasmlib')
-rw-r--r-- | nasmlib/nctype.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nasmlib/nctype.c b/nasmlib/nctype.c index b04f9d19..f30f37e0 100644 --- a/nasmlib/nctype.c +++ b/nasmlib/nctype.c @@ -101,6 +101,7 @@ static void ctype_tab_init(void) nasm_ctype_tab['_'] |= NCT_UNDER|NCT_ID|NCT_IDSTART; nasm_ctype_tab['.'] |= NCT_ID|NCT_IDSTART; nasm_ctype_tab['@'] |= NCT_ID|NCT_IDSTART; + nasm_ctype_tab['?'] |= NCT_ID|NCT_IDSTART; nasm_ctype_tab['#'] |= NCT_ID; nasm_ctype_tab['~'] |= NCT_ID; nasm_ctype_tab['\''] |= NCT_QUOTE; |