summaryrefslogtreecommitdiff
path: root/src/dfa.c
diff options
context:
space:
mode:
authorDemi Obenour <demiobenour@gmail.com>2016-09-27 10:54:16 -0400
committerWill Estes <westes575@gmail.com>2016-10-19 20:39:06 -0400
commit4bffa41e4ed434f1e2ba64ac5a8fe661fa089cfb (patch)
tree378e886700ac96e8c316f354f10e1e9a622144ea /src/dfa.c
parent7dcb10c048744192ab873ee10fb6a5d8b1640434 (diff)
Improved M4 quotation
This fixes M4 quotation of certain strings beginning with `yy` (in section 3 of the input file only) and character literals. The new quotation method is also less brittle and faster. Tests that relied on the old behavior were fixed. Also, `yyconst` is no longer defined; use `const` (which it unconditionally was defined to) instead.
Diffstat (limited to 'src/dfa.c')
-rw-r--r--src/dfa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dfa.c b/src/dfa.c
index 8d48c93..0fcc5b3 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -531,12 +531,12 @@ void ntod (void)
*/
if (gentables)
out_str_dec
- ("static yyconst %s yy_nxt[][%d] =\n {\n",
+ ("static const %s yy_nxt[][%d] =\n {\n",
long_align ? "flex_int32_t" : "flex_int16_t",
num_full_table_rows);
else {
out_dec ("#undef YY_NXT_LOLEN\n#define YY_NXT_LOLEN (%d)\n", num_full_table_rows);
- out_str ("static yyconst %s *yy_nxt =0;\n",
+ out_str ("static const %s *yy_nxt =0;\n",
long_align ? "flex_int32_t" : "flex_int16_t");
}