aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-14 00:50:34 -0800
committerH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-14 00:57:05 -0800
commit9df075595e08b923c1eb9d73b2900ed4a0dfb464 (patch)
tree20af360d010eb3a6cf8a6bbdad095bdba53434a0 /include
parentce19a52a3422332d55d8c0f601f30c2e67c14f09 (diff)
downloadnasm-9df075595e08b923c1eb9d73b2900ed4a0dfb464.tar.gz
nasm-9df075595e08b923c1eb9d73b2900ed4a0dfb464.tar.xz
nasm-9df075595e08b923c1eb9d73b2900ed4a0dfb464.zip
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 'include')
-rw-r--r--include/nasm.h1
-rw-r--r--include/nctype.h3
2 files changed, 2 insertions, 2 deletions
diff --git a/include/nasm.h b/include/nasm.h
index 08474135..ba015aec 100644
--- a/include/nasm.h
+++ b/include/nasm.h
@@ -153,6 +153,7 @@ typedef void (*ldfunc)(char *label, int32_t segment, int64_t offset,
enum token_type { /* token types, other than chars */
TOKEN_INVALID = -1, /* a placeholder value */
TOKEN_EOS = 0, /* end of string */
+ TOKEN_QMARK = '?',
TOKEN_EQ = '=',
TOKEN_GT = '>',
TOKEN_LT = '<', /* aliases */
diff --git a/include/nctype.h b/include/nctype.h
index ba57de23..ba594b97 100644
--- a/include/nctype.h
+++ b/include/nctype.h
@@ -119,10 +119,9 @@ static inline bool nasm_isquote(char x)
return nasm_ctype(x, NCT_QUOTE);
}
-/* TASM-compatible mode requires ? to be an identifier character */
static inline void nasm_ctype_tasm_mode(void)
{
- nasm_ctype_tab['?'] |= NCT_ID|NCT_IDSTART;
+ /* No differences at the present moment */
}
#endif /* NASM_NCTYPE_H */