|
@@ -653,7 +653,7 @@ This file must be translated to C++ and modified to build everywhere.
|
|
|
|
|
|
Run flex >= 2.6 like this:
|
|
|
|
|
|
- flex --nounistd -DFLEXINT_H --noline --header-file=cmCommandArgumentLexer.h -ocmCommandArgumentLexer.cxx cmCommandArgumentLexer.in.l
|
|
|
+ flex --nounistd --never-interactive --batch -DFLEXINT_H --noline --header-file=cmCommandArgumentLexer.h -ocmCommandArgumentLexer.cxx cmCommandArgumentLexer.in.l
|
|
|
|
|
|
Modify cmCommandArgumentLexer.cxx:
|
|
|
- remove trailing whitespace: sed -i 's/\s*$//' cmCommandArgumentLexer.h cmCommandArgumentLexer.cxx
|
|
@@ -668,10 +668,7 @@ Modify cmCommandArgumentLexer.cxx:
|
|
|
|
|
|
#include "cmCommandArgumentParserHelper.h"
|
|
|
|
|
|
-/* Replace the lexer input function. */
|
|
|
-#undef YY_INPUT
|
|
|
-#define YY_INPUT(buf, result, max_size) \
|
|
|
- do { result = yyextra->LexInput(buf, max_size); } while (0)
|
|
|
+#define YY_USER_ACTION yyextra->UpdateInputPosition(yyleng);
|
|
|
|
|
|
/* Include the set of tokens from the parser. */
|
|
|
#include "cmCommandArgumentParserTokens.h"
|
|
@@ -967,16 +964,12 @@ yy_match:
|
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
|
|
++yy_cp;
|
|
|
}
|
|
|
- while ( yy_base[yy_current_state] != 41 );
|
|
|
+ while ( yy_current_state != 29 );
|
|
|
+ yy_cp = yyg->yy_last_accepting_cpos;
|
|
|
+ yy_current_state = yyg->yy_last_accepting_state;
|
|
|
|
|
|
yy_find_action:
|
|
|
yy_act = yy_accept[yy_current_state];
|
|
|
- if ( yy_act == 0 )
|
|
|
- { /* have to back up */
|
|
|
- yy_cp = yyg->yy_last_accepting_cpos;
|
|
|
- yy_current_state = yyg->yy_last_accepting_state;
|
|
|
- yy_act = yy_accept[yy_current_state];
|
|
|
- }
|
|
|
|
|
|
YY_DO_BEFORE_ACTION;
|
|
|
|
|
@@ -1173,7 +1166,8 @@ case YY_STATE_EOF(NOESCAPES):
|
|
|
|
|
|
else
|
|
|
{
|
|
|
- yy_cp = yyg->yy_c_buf_p;
|
|
|
+ yy_cp = yyg->yy_last_accepting_cpos;
|
|
|
+ yy_current_state = yyg->yy_last_accepting_state;
|
|
|
goto yy_find_action;
|
|
|
}
|
|
|
}
|
|
@@ -1661,7 +1655,7 @@ static void yy_load_buffer_state (yyscan_t yyscanner)
|
|
|
b->yy_bs_column = 0;
|
|
|
}
|
|
|
|
|
|
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
|
|
+ b->yy_is_interactive = 0;
|
|
|
|
|
|
errno = oerrno;
|
|
|
}
|