diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2011-06-27 01:23:09 +0400 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2011-06-27 01:23:09 +0400 |
commit | c6a742cb6bbe9f6c866e62e9cdd1f3260a9ddf08 (patch) | |
tree | 07c6fbfe43b50910067ae8a9f34cf47ddefb5632 /preproc.c | |
parent | fdd0ac5f43d3b7f04974b70ff2e86154850e17a7 (diff) | |
download | nasm-c6a742cb6bbe9f6c866e62e9cdd1f3260a9ddf08.tar.gz nasm-c6a742cb6bbe9f6c866e62e9cdd1f3260a9ddf08.tar.bz2 nasm-c6a742cb6bbe9f6c866e62e9cdd1f3260a9ddf08.zip |
Revert "BR3288901: Relax concat rules in preprocessor code"
This reverts commit cb00cd1ba7f07f60f0a94c43cfc4fa7b01e2ff95.
As Victor pointed out some tests do not pass with this commit
so revert it until things get fixed.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'preproc.c')
-rw-r--r-- | preproc.c | 50 |
1 files changed, 27 insertions, 23 deletions
@@ -337,22 +337,6 @@ enum { /* max reps */ #define REP_LIMIT ((INT64_C(1) << 62)) -const struct tokseq_match pp_concat_match[] = { - { - PP_CONCAT_MASK(TOK_ID) | - PP_CONCAT_MASK(TOK_PREPROC_ID) | - PP_CONCAT_MASK(TOK_NUMBER) | - PP_CONCAT_MASK(TOK_FLOAT) | - PP_CONCAT_MASK(TOK_OTHER), - - PP_CONCAT_MASK(TOK_ID) | - PP_CONCAT_MASK(TOK_PREPROC_ID) | - PP_CONCAT_MASK(TOK_NUMBER) | - PP_CONCAT_MASK(TOK_FLOAT) | - PP_CONCAT_MASK(TOK_OTHER) - } -}; - /* * Condition codes. Note that we use c_ prefix not C_ because C_ is * used in nasm.h for the "real" condition codes. At _this_ level, @@ -4374,10 +4358,23 @@ static Token *expand_mmac_params(Token * tline) } *tail = NULL; - if (changed) - paste_tokens(&thead, pp_concat_match, - ARRAY_SIZE(pp_concat_match), - false); + if (changed) { + const struct tokseq_match t[] = { + { + PP_CONCAT_MASK(TOK_ID) | + PP_CONCAT_MASK(TOK_FLOAT), /* head */ + PP_CONCAT_MASK(TOK_ID) | + PP_CONCAT_MASK(TOK_NUMBER) | + PP_CONCAT_MASK(TOK_FLOAT) | + PP_CONCAT_MASK(TOK_OTHER) /* tail */ + }, + { + PP_CONCAT_MASK(TOK_NUMBER), /* head */ + PP_CONCAT_MASK(TOK_NUMBER) /* tail */ + } + }; + paste_tokens(&thead, t, ARRAY_SIZE(t), false); + } nasm_dump_token(thead); @@ -4691,9 +4688,16 @@ again: * them (without white spaces in between). */ if (expanded) { - if (paste_tokens(&thead, pp_concat_match, - ARRAY_SIZE(pp_concat_match), - true)) { + const struct tokseq_match t[] = { + { + PP_CONCAT_MASK(TOK_ID) | + PP_CONCAT_MASK(TOK_PREPROC_ID), /* head */ + PP_CONCAT_MASK(TOK_ID) | + PP_CONCAT_MASK(TOK_PREPROC_ID) | + PP_CONCAT_MASK(TOK_NUMBER) /* tail */ + } + }; + if (paste_tokens(&thead, t, ARRAY_SIZE(t), true)) { /* * If we concatenated something, *and* we had previously expanded * an actual macro, scan the lines again for macros... |