summaryrefslogtreecommitdiff
path: root/src/gen.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2020-10-07 17:19:31 -0400
committerEric S. Raymond <esr@thyrsus.com>2020-10-07 17:19:31 -0400
commit102c7a0149251e24a351742626e8d85453d7c75f (patch)
tree1c53c21c7b7884c02d2a69cc69e50d70a972b5cf /src/gen.c
parentde769336588d2537f0d1b5c36ccc3c4fe24d1107 (diff)
downloadflex-git-102c7a0149251e24a351742626e8d85453d7c75f.tar.gz
Finish up macro abstraction.
Everything Flex ships to the skeleton-file expansion phase is now either a macro expansion or a macro call. This almost finishes the retargeting patch series; the wrapup will be documentation. Sadky, this does not get us *all* the way to target-syntax independence. The probem is the inclusion of tables_shared.c when table serialization is enabled. Which ,eans table serialization is not practical to support outside the C/C++ back end. No diffs in generated test code from this commit. #69 in the retargeting patch series
Diffstat (limited to 'src/gen.c')
-rw-r--r--src/gen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gen.c b/src/gen.c
index ce3eb88..8e95917 100644
--- a/src/gen.c
+++ b/src/gen.c
@@ -50,10 +50,10 @@ struct packtype_t *optimize_pack(size_t sz)
/* FIXME: There's a 32-bit assumption lurking here */
static struct packtype_t out;
if (sz == 0) {
- out.name = ctrl.long_align ? "flex_int32_t" : "flex_int16_t";
+ out.name = ctrl.long_align ? "M4_HOOK_INT32" : "M4_HOOK_INT16";
out.width = ctrl.long_align ? 32 : 16;
} else {
- out.name = (ctrl.long_align || sz >= INT16_MAX) ? "flex_int32_t" : "flex_int16_t";
+ out.name = (ctrl.long_align || sz >= INT16_MAX) ? "M4_HOOK_INT32" : "M4_HOOK_INT16";
out.width = (ctrl.long_align || sz >= INT16_MAX) ? 32 : 16;
}
return &out;
@@ -1013,7 +1013,7 @@ void make_tables (void)
flex_int32_t *yynultrans_data = 0;
/* Begin generating yy_NUL_trans */
- out_str ("m4_define([[M4_HOOK_NULTRANS_TYPE]], [[%s]])", (ctrl.fullspd) ? "struct yy_trans_info*" : "flex_int32_t");
+ out_str ("m4_define([[M4_HOOK_NULTRANS_TYPE]], [[%s]])", (ctrl.fullspd) ? "struct yy_trans_info*" : "M4_HOOK_INT32");
out_dec ("m4_define([[M4_HOOK_NULTRANS_SIZE]], [[%d]])", lastdfa + 1);
outn ("m4_define([[M4_HOOK_NULTRANS_BODY]], [[m4_dnl");