summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2020-11-08 13:30:49 -0500
committerEric S. Raymond <esr@thyrsus.com>2020-11-08 17:38:42 -0500
commit2995af0eeb3792506f2b9975788443f67ac4b389 (patch)
tree564348b62b0a1aef4349b8a27bcb944012dd36a8
parentdb1dca76c1fd042516661218ba588a0aae682587 (diff)
downloadflex-git-2995af0eeb3792506f2b9975788443f67ac4b389.tar.gz
yy_flex_debug -> yyflexdebug.
-rw-r--r--src/FlexLexer.h6
-rw-r--r--src/c99-flex.skl10
-rw-r--r--src/cpp-flex.skl24
3 files changed, 22 insertions, 18 deletions
diff --git a/src/FlexLexer.h b/src/FlexLexer.h
index 5a1a72f..ccd9eeb 100644
--- a/src/FlexLexer.h
+++ b/src/FlexLexer.h
@@ -95,14 +95,14 @@ public:
int lineno() const { return yylineno; }
- int debug() const { return yy_flex_debug; }
- void set_debug( int flag ) { yy_flex_debug = flag; }
+ int debug() const { return yyflexdebug; }
+ void set_debug( int flag ) { yyflexdebug = flag; }
protected:
char* yytext;
int yyleng;
int yylineno; // only maintained if you use %option yylineno
- int yy_flex_debug; // only has effect with -d or "%option debug"
+ int yyflexdebug; // only has effect with -d or "%option debug"
};
}
diff --git a/src/c99-flex.skl b/src/c99-flex.skl
index 017d2cb..3dbdc8d 100644
--- a/src/c99-flex.skl
+++ b/src/c99-flex.skl
@@ -603,7 +603,7 @@ struct yyguts_t {
char* yy_last_accepting_cpos;
int yylineno_r;
- int yy_flex_debug_r;
+ int yyflexdebug_r;
m4_ifdef( [[M4_MODE_USES_REJECT]], [[
yy_state_type *yy_state_buf;
@@ -1096,7 +1096,7 @@ static void yy_lineno_rewind_to(char *yy_cp, char *dst, yyscan_t yyscanner) {
#define yytext yyscanner->yytext_r
#define yylineno (yyscanner->yy_buffer_stack[yyscanner->yy_buffer_stack_top]->yy_bs_lineno)
#define yycolumn (yyscanner->yy_buffer_stack[yyscanner->yy_buffer_stack_top]->yy_bs_column)
-#define yy_flex_debug yyscanner->yy_flex_debug_r
+#define yyflexdebug yyscanner->yyflexdebug_r
static void yybumpline( yyscan_t yyscanner) {
yylineno++;
@@ -1456,7 +1456,7 @@ m4_define([[M4_YYL_BASE]], [[m4_ifdef([[M4_MODE_YYMORE_USED]],
do_action: /* This label is used only to access EOF actions. */
m4_ifdef([[M4_MODE_DEBUG]], [[
- if ( yy_flex_debug ) {
+ if ( yyflexdebug ) {
if ( yy_act == 0 ) {
fprintf( stderr, "--scanner backing up\n" );
} else if ( yy_act < YY_NUM_RULES ) {
@@ -2456,14 +2456,14 @@ void yyset_out( FILE * _out_str, yyscan_t yyscanner) {
m4_ifdef( [[M4_YY_NO_GET_DEBUG]],,
[[
int yyget_debug (yyscan_t yyscanner) {
- return yy_flex_debug;
+ return yyflexdebug;
}
]])
m4_ifdef( [[M4_YY_NO_SET_DEBUG]],,
[[
void yyset_debug(int _bdebug, yyscan_t yyscanner) {
- yy_flex_debug = _bdebug ;
+ yyflexdebug = _bdebug ;
}
]])
diff --git a/src/cpp-flex.skl b/src/cpp-flex.skl
index c28d671..200bfaa 100644
--- a/src/cpp-flex.skl
+++ b/src/cpp-flex.skl
@@ -104,7 +104,7 @@ m4_ifelse(M4_MODE_PREFIX,yy,,
#define yypush_buffer_state M4_MODE_PREFIX[[push_buffer_state]]
#define yypop_buffer_state M4_MODE_PREFIX[[pop_buffer_state]]
#define yyensure_buffer_stack M4_MODE_PREFIX[[ensure_buffer_stack]]
-#define yy_flex_debug M4_MODE_PREFIX[[_flex_debug]]
+#define yyflexdebug M4_MODE_PREFIX[[flexdebug]]
#define yyin M4_MODE_PREFIX[[in]]
#define yyleng M4_MODE_PREFIX[[leng]]
#define yylex M4_MODE_PREFIX[[lex]]
@@ -232,7 +232,7 @@ m4_ifdef( [[M4_YY_NOT_REENTRANT]],
M4_GEN_PREFIX(`leng')
M4_GEN_PREFIX(`in')
M4_GEN_PREFIX(`out')
- M4_GEN_PREFIX(`_flex_debug')
+ M4_GEN_PREFIX(`flexdebug')
M4_GEN_PREFIX(`lineno')
]])
)
@@ -354,7 +354,7 @@ m4_define( [[M4_YY_DOC_PARAM]], [[@param yyscanner The scanner object.]])
#define yytext YY_G(yytext_r)
#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
-#define yy_flex_debug YY_G(yy_flex_debug_r)
+#define yyflexdebug YY_G(yyflexdebug_r)
m4_define( [[M4_YY_INCR_LINENO]],
[[
@@ -874,8 +874,12 @@ m4_ifdef([[M4_MODE_YYTEXT_IS_ARRAY]], [[ \
m4_ifdef([[M4_YY_NOT_REENTRANT]], [[
m4_ifdef( [[M4_MODE_C_ONLY]],
[[
-extern int yy_flex_debug;
-int yy_flex_debug = m4_ifdef([[M4_MODE_DEBUG]],[[1]],[[0]]);
+extern int yyflexdebug;
+int yyflexdebug = m4_ifdef([[M4_MODE_DEBUG]],[[1]],[[0]]);
+/* Legacy interface */
+#ifndef yy_flex_debug
+#define yy_flex_debug yyflexdebug
+#endif
]])
]])
@@ -1216,7 +1220,7 @@ struct yyguts_t {
char* yy_last_accepting_cpos;
int yylineno_r;
- int yy_flex_debug_r;
+ int yyflexdebug_r;
m4_ifdef( [[M4_MODE_USES_REJECT]], [[
yy_state_type *yy_state_buf;
@@ -2063,7 +2067,7 @@ m4_define([[M4_YYL_BASE]], [[m4_ifdef([[M4_MODE_YYMORE_USED]],
do_action: /* This label is used only to access EOF actions. */
m4_ifdef([[M4_MODE_DEBUG]], [[
- if ( yy_flex_debug ) {
+ if ( yyflexdebug ) {
if ( yy_act == 0 ) {
m4_ifdef([[M4_MODE_CXX_ONLY]], [[
std::cerr << "--scanner backing up\n";
@@ -2296,7 +2300,7 @@ void yyFlexLexer::ctor_common() {
yy_c_buf_p = 0;
yy_init = 0;
yy_start = 0;
- yy_flex_debug = 0;
+ yyflexdebug = 0;
yylineno = 1; // this will only get updated if %option yylineno
yy_did_buffer_switch_on_eof = 0;
@@ -3558,7 +3562,7 @@ m4_ifdef( [[M4_YY_NO_GET_DEBUG]],,
[[
int yyget_debug (M4_YY_DEF_ONLY_ARG) {
M4_YY_DECL_GUTS_VAR();
- return yy_flex_debug;
+ return yyflexdebug;
}
]])
@@ -3566,7 +3570,7 @@ m4_ifdef( [[M4_YY_NO_SET_DEBUG]],,
[[
void yyset_debug YYFARGS1( int ,_bdebug) {
M4_YY_DECL_GUTS_VAR();
- yy_flex_debug = _bdebug ;
+ yyflexdebug = _bdebug ;
}
]])
]])