diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2020-11-11 06:16:18 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2020-11-11 06:52:49 -0500 |
commit | 3854cd2c67e31ddfacfe5a6b3aba1347e63be420 (patch) | |
tree | c5274ed5e07b9d053f7ac07b6f5d484c0dd86697 /src/cpp-flex.skl | |
parent | ab32ad65bb13eff5c1210c56d564af2c71516262 (diff) | |
download | flex-git-3854cd2c67e31ddfacfe5a6b3aba1347e63be420.tar.gz |
Add a test for trailing conyext rules. Fix the bug it turned up.
Also, roperly condition some variables related to trailing contexts.
Makes generated parsers ever so slightly smaller in this case.
Diffstat (limited to 'src/cpp-flex.skl')
-rw-r--r-- | src/cpp-flex.skl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cpp-flex.skl b/src/cpp-flex.skl index 200bfaa..4432126 100644 --- a/src/cpp-flex.skl +++ b/src/cpp-flex.skl @@ -1228,12 +1228,13 @@ m4_ifdef( [[M4_MODE_USES_REJECT]], [[ char *yy_full_match; int yy_lp; - /* These are only needed for trailing context rules, - * but there's no conditional variable for that yet. */ +m4_ifdef( [[M4_MODE_VARIABLE_TRAILING_CONTEXT_RULES]], [[dnl + /* These are only needed for trailing context rules */ int yy_looking_for_trail_begin; int yy_full_lp; int *yy_full_state; ]]) +]]) m4_ifdef( [[M4_MODE_REENTRANT_TEXT_IS_ARRAY]], [[ char yytext_r[YYLMAX]; char *yytext_ptr; |