diff options
author | Jin Kyu Song <jin.kyu.song@intel.com> | 2013-11-27 14:10:40 -0800 |
---|---|---|
committer | Jin Kyu Song <jin.kyu.song@intel.com> | 2013-11-27 15:43:33 -0800 |
commit | 487f352b6222c79fd6c719d2c00ab6087c6b6b3c (patch) | |
tree | d8b19e49b37c89586bba36691331f80111d71b79 /nasm.h | |
parent | 6cfa968e8d3ef6344ef3e92b37d64a277124ee29 (diff) | |
download | nasm-487f352b6222c79fd6c719d2c00ab6087c6b6b3c.tar.gz nasm-487f352b6222c79fd6c719d2c00ab6087c6b6b3c.tar.bz2 nasm-487f352b6222c79fd6c719d2c00ab6087c6b6b3c.zip |
stdscan: Rework curly brace parsing routines
As recommended by the community, a comma-separated decorators ({k1,z})
and nested braces ({{k1},{z}}) are dropped out. So only standard syntax
is supported from now.
This rework made source code neat and easy to maintain. Most of the codes
for handling corner cases are removed.
Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Diffstat (limited to 'nasm.h')
-rw-r--r-- | nasm.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -65,6 +65,7 @@ #endif #define IDLEN_MAX 4096 +#define DECOLEN_MAX 32 /* * Name pollution problems: <time.h> on Digital UNIX pulls in some @@ -421,6 +422,8 @@ extern struct preproc_ops preproc_nop; * identifier. E.g. a period may only appear at the start of an identifier * (for local labels), whereas a number may appear anywhere *but* at the * start. + * isbrcchar matches any character that may placed inside curly braces as a + * decorator. E.g. {rn-sae}, {1to8}, {k1}{z} */ #define isidstart(c) (nasm_isalpha(c) || \ @@ -435,6 +438,9 @@ extern struct preproc_ops preproc_nop; (c) == '#' || \ (c) == '~') +#define isbrcchar(c) (isidchar(c) || \ + (c) == '-') + /* Ditto for numeric constants. */ #define isnumstart(c) (nasm_isdigit(c) || (c) == '$') |