summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2020-11-19 01:15:19 -0500
committerEric S. Raymond <esr@thyrsus.com>2020-11-19 01:20:31 -0500
commit8b0503e1684bcb7d586678fefce270f5f64e8ceb (patch)
tree89643cf5aed70531e7de807ba42a4e612bbab32f
parent48a25d4966b68fa289dd66744bcef9467b9b9c17 (diff)
downloadflex-git-8b0503e1684bcb7d586678fefce270f5f64e8ceb.tar.gz
In C88 and Go back ends, remove remnant GENTABLES conditionals.
-rw-r--r--src/c99-flex.skl74
-rw-r--r--src/go-flex.skl74
2 files changed, 2 insertions, 146 deletions
diff --git a/src/c99-flex.skl b/src/c99-flex.skl
index 6fffe3b..7f9d4e1 100644
--- a/src/c99-flex.skl
+++ b/src/c99-flex.skl
@@ -403,164 +403,92 @@ m4_ifdef([[M4_MODE_NO_REAL_FULLSPD]], [[
%% [2.0] data tables for the DFA are inserted here
m4_ifdef( [[M4_HOOK_NXT_ROWS]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
-static const M4_HOOK_NXT_TYPE yy_nxt[][M4_HOOK_NXT_ROWS] =
- {
+static const M4_HOOK_NXT_TYPE yy_nxt[][M4_HOOK_NXT_ROWS] = {
M4_HOOK_NXT_BODY
-]], [[
-m4_define([[YY_NXT_LOLEN]], [[(M4_HOOK_NXT_ROWS)]])
-static const M4_HOOK_NXT_TYPE *yy_nxt =0;
-]])
-
]])
m4_ifdef( [[M4_MODE_YYLINENO]],[[m4_dnl
/* Table of booleans, true if rule could match eol. */
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_EOLTABLE_TYPE yy_rule_can_match_eol[M4_HOOK_EOLTABLE_SIZE] = { 0,
M4_HOOK_EOLTABLE_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_EOLTABLE_TYPE * yy_rule_can_match_eol = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_NEED_ACCEPT]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_ACCEPT_TYPE yy_accept[M4_HOOK_ACCEPT_SIZE] = { 0,
M4_HOOK_ACCEPT_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_ACCEPT_TYPE * yy_accept = 0;
-]])
-
]])
m4_ifdef( [[M4_MODE_USEECS]],[[m4_dnl
/* Character equivalence-class mapping */
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const YY_CHAR yy_ec[M4_HOOK_ECSTABLE_SIZE] = { 0,
M4_HOOK_ECSTABLE_BODY[[]]m4_dnl
};
-]], [[
-static const YY_CHAR * yy_ec = 0;
-]])
-
]])
m4_ifdef( [[M4_MODE_USEMECS]],[[m4_dnl
/* Character meta-equivalence-class mappings */
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const YY_CHAR yy_meta[M4_HOOK_MECSTABLE_SIZE] = { 0,
M4_HOOK_MECSTABLE_BODY[[]]m4_dnl
};
-]], [[
-static const YY_CHAR * yy_meta = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_TRANSTABLE_SIZE]],[[m4_dnl
/* The transition table */
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const struct yy_trans_info yy_transition[M4_HOOK_TRANSTABLE_SIZE] = {
M4_HOOK_TRANSTABLE_BODY[[]]m4_dnl
};
-]], [[
-static const struct yy_trans_info *yy_transition = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_STARTTABLE_SIZE]],[[m4_dnl
/* Table of pointers to start states. */
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const struct yy_trans_info *yy_start_state_list[M4_HOOK_STARTTABLE_SIZE] = {
M4_HOOK_STARTTABLE_BODY[[]]m4_dnl
};
-]], [[
-static const struct yy_trans_info **yy_start_state_list =0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_ACCLIST_TYPE]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_ACCLIST_TYPE yy_acclist[M4_HOOK_ACCLIST_SIZE] = { 0,
M4_HOOK_ACCLIST_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_ACCLIST_TYPE * yy_acclist = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_BASE_TYPE]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_BASE_TYPE yy_base[M4_HOOK_BASE_SIZE] = { 0,
M4_HOOK_BASE_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_BASE_TYPE * yy_base = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_DEF_TYPE]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_DEF_TYPE yy_def[M4_HOOK_DEF_SIZE] = { 0,
M4_HOOK_DEF_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_DEF_TYPE * yy_def = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_YYNXT_TYPE]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_YYNXT_TYPE yy_nxt[M4_HOOK_YYNXT_SIZE] = { 0,
M4_HOOK_YYNXT_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_YYNXT_TYPE * yy_nxt = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_CHK_TYPE]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_CHK_TYPE yy_chk[M4_HOOK_CHK_SIZE] = { 0,
M4_HOOK_CHK_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_CHK_TYPE * yy_chk = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_NULTRANS_SIZE]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const yy_state_type yy_NUL_trans[M4_HOOK_NULTRANS_SIZE] = { 0,
M4_HOOK_NULTRANS_BODY[[]]m4_dnl
};
-]], [[
-static const yy_state_type * yy_NUL_trans = 0;
-]])
-
]])
m4_ifdef( [[M4_MODE_DEBUG]],[[m4_dnl
/* Rule to line-number mapping */
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_DEBUGTABLE_TYPE yy_rule_linenum[M4_HOOK_DEBUGTABLE_SIZE] = { 0,
M4_HOOK_DEBUGTABLE_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_DEBUGTABLE_TYPE * yy_rule_linenum = 0;
-]])
-
]])
%% [3.0] static declarations conditional on mode switches go here
diff --git a/src/go-flex.skl b/src/go-flex.skl
index 6b8d3cc..11c7cbf 100644
--- a/src/go-flex.skl
+++ b/src/go-flex.skl
@@ -320,164 +320,92 @@ m4_ifdef([[M4_MODE_NO_REAL_FULLSPD]], [[
%% [2.0] data tables for the DFA are inserted here
m4_ifdef( [[M4_HOOK_NXT_ROWS]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
-static const M4_HOOK_NXT_TYPE yy_nxt[][M4_HOOK_NXT_ROWS] =
- {
+static const M4_HOOK_NXT_TYPE yy_nxt[][M4_HOOK_NXT_ROWS] = {
M4_HOOK_NXT_BODY
-]], [[
-m4_define([[YY_NXT_LOLEN]], [[(M4_HOOK_NXT_ROWS)]])
-static const M4_HOOK_NXT_TYPE *yy_nxt =0;
-]])
-
]])
m4_ifdef( [[M4_MODE_YYLINENO]],[[m4_dnl
/* Table of booleans, true if rule could match eol. */
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_EOLTABLE_TYPE yy_rule_can_match_eol[M4_HOOK_EOLTABLE_SIZE] = { 0,
M4_HOOK_EOLTABLE_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_EOLTABLE_TYPE * yy_rule_can_match_eol = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_NEED_ACCEPT]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_ACCEPT_TYPE yy_accept[M4_HOOK_ACCEPT_SIZE] = { 0,
M4_HOOK_ACCEPT_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_ACCEPT_TYPE * yy_accept = 0;
-]])
-
]])
m4_ifdef( [[M4_MODE_USEECS]],[[m4_dnl
/* Character equivalence-class mapping */
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const YY_CHAR yy_ec[M4_HOOK_ECSTABLE_SIZE] = { 0,
M4_HOOK_ECSTABLE_BODY[[]]m4_dnl
};
-]], [[
-static const YY_CHAR * yy_ec = 0;
-]])
-
]])
m4_ifdef( [[M4_MODE_USEMECS]],[[m4_dnl
/* Character meta-equivalence-class mappings */
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const YY_CHAR yy_meta[M4_HOOK_MECSTABLE_SIZE] = { 0,
M4_HOOK_MECSTABLE_BODY[[]]m4_dnl
};
-]], [[
-static const YY_CHAR * yy_meta = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_TRANSTABLE_SIZE]],[[m4_dnl
/* The transition table */
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const struct yyTransInfo yyTransition[M4_HOOK_TRANSTABLE_SIZE] = {
M4_HOOK_TRANSTABLE_BODY[[]]m4_dnl
};
-]], [[
-static const struct yyTransInfo *yyTransition = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_STARTTABLE_SIZE]],[[m4_dnl
/* Table of pointers to start states. */
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const struct yyTransInfo *yy_start_state_list[M4_HOOK_STARTTABLE_SIZE] = {
M4_HOOK_STARTTABLE_BODY[[]]m4_dnl
};
-]], [[
-static const struct yyTransInfo **yy_start_state_list =0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_ACCLIST_TYPE]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_ACCLIST_TYPE yy_acclist[M4_HOOK_ACCLIST_SIZE] = { 0,
M4_HOOK_ACCLIST_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_ACCLIST_TYPE * yy_acclist = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_BASE_TYPE]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_BASE_TYPE yy_base[M4_HOOK_BASE_SIZE] = { 0,
M4_HOOK_BASE_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_BASE_TYPE * yy_base = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_DEF_TYPE]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_DEF_TYPE yy_def[M4_HOOK_DEF_SIZE] = { 0,
M4_HOOK_DEF_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_DEF_TYPE * yy_def = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_YYNXT_TYPE]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_YYNXT_TYPE yy_nxt[M4_HOOK_YYNXT_SIZE] = { 0,
M4_HOOK_YYNXT_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_YYNXT_TYPE * yy_nxt = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_CHK_TYPE]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_CHK_TYPE yy_chk[M4_HOOK_CHK_SIZE] = { 0,
M4_HOOK_CHK_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_CHK_TYPE * yy_chk = 0;
-]])
-
]])
m4_ifdef( [[M4_HOOK_NULTRANS_SIZE]],[[m4_dnl
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const yyStateType yy_NUL_trans[M4_HOOK_NULTRANS_SIZE] = { 0,
M4_HOOK_NULTRANS_BODY[[]]m4_dnl
};
-]], [[
-static const yyStateType * yy_NUL_trans = 0;
-]])
-
]])
m4_ifdef( [[M4_MODE_DEBUG]],[[m4_dnl
/* Rule to line-number mapping */
-m4_ifdef( [[M4_MODE_GENTABLES]],[[m4_dnl
static const M4_HOOK_DEBUGTABLE_TYPE yy_rule_linenum[M4_HOOK_DEBUGTABLE_SIZE] = { 0,
M4_HOOK_DEBUGTABLE_BODY[[]]m4_dnl
};
-]], [[
-static const M4_HOOK_DEBUGTABLE_TYPE * yy_rule_linenum = 0;
-]])
-
]])
%% [3.0] static declarations conditional on mode switches go here