Merge some important post-2.5.37 changes from upstream.
http://flex.git.sourceforge.net/git/gitweb.cgi?p=flex/flex;a=commit;h=c53fd2db8c78fef5afd284c3e64da51bc71cf6c3 http://flex.git.sourceforge.net/git/gitweb.cgi?p=flex/flex;a=commit;h=899b2163bbde1a70b3be8b91cbbabd8007341205 http://flex.git.sourceforge.net/git/gitweb.cgi?p=flex/flex;a=commit;h=7642bd98aebb62260df923f57b794138dab6f1e7 http://flex.git.sourceforge.net/git/gitweb.cgi?p=flex/flex;a=commit;h=11b7c6cea340c2fca9b49ec635a45bd34361afe9 http://flex.git.sourceforge.net/git/gitweb.cgi?p=flex/flex;a=commit;h=ec2fdb85e0bac6e8aeca405094506e4cf8bfc0b6
This commit is contained in:
parent
13a0f001a6
commit
6ad8422b51
13
flex.skl
13
flex.skl
@ -727,6 +727,11 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
|
||||
|
||||
%% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here
|
||||
|
||||
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
|
||||
[[
|
||||
%% [1.5] DFA
|
||||
]])
|
||||
|
||||
%if-c-only Standard (non-C++) definition
|
||||
|
||||
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
|
||||
@ -1272,8 +1277,6 @@ m4_ifdef( [[M4_YY_NOT_REENTRANT]],
|
||||
]])
|
||||
]])
|
||||
|
||||
%% [7.0] user's declarations go here
|
||||
|
||||
m4_ifdef( [[M4_YY_BISON_LVAL]],
|
||||
[[
|
||||
yylval = yylval_param;
|
||||
@ -1329,6 +1332,9 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
|
||||
yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
|
||||
}
|
||||
|
||||
{
|
||||
%% [7.0] user's declarations go here
|
||||
|
||||
while ( 1 ) /* loops until end-of-file is reached */
|
||||
{
|
||||
%% [8.0] yymore()-related code goes here
|
||||
@ -1486,6 +1492,7 @@ do_action: /* This label is used only to access EOF actions. */
|
||||
"fatal flex scanner internal error--no action found" );
|
||||
} /* end of action switch */
|
||||
} /* end of scanning one token */
|
||||
} /* end of user's declarations */
|
||||
} /* end of yylex */
|
||||
%ok-for-header
|
||||
|
||||
@ -2360,7 +2367,7 @@ YY_BUFFER_STATE yy_scan_bytes YYFARGS2( yyconst char *,yybytes, yy_size_t ,_yyb
|
||||
YY_BUFFER_STATE b;
|
||||
char *buf;
|
||||
yy_size_t n;
|
||||
int i;
|
||||
yy_size_t i;
|
||||
m4_dnl M4_YY_DECL_GUTS_VAR();
|
||||
|
||||
/* Get memory for full buffer, including space for trailing EOB's. */
|
||||
|
@ -908,6 +908,9 @@ extern void lerrif PROTO ((const char *, int));
|
||||
/* Report an error message formatted with one string argument. */
|
||||
extern void lerrsf PROTO ((const char *, const char *));
|
||||
|
||||
/* Like lerrsf, but also exit after displaying message. */
|
||||
extern void lerrsf_fatal PROTO ((const char *, const char *));
|
||||
|
||||
/* Spit out a "#line" statement. */
|
||||
extern void line_directive_out PROTO ((FILE *, int));
|
||||
|
||||
|
4
gen.c
4
gen.c
@ -874,7 +874,7 @@ void gen_next_state (worry_about_NULs)
|
||||
|
||||
else
|
||||
strcpy (char_map, useecs ?
|
||||
"yy_ec[YY_SC_TO_UI(*yy_cp)]" :
|
||||
"yy_ec[YY_SC_TO_UI(*yy_cp)] " :
|
||||
"YY_SC_TO_UI(*yy_cp)");
|
||||
|
||||
if (worry_about_NULs && nultrans) {
|
||||
@ -1972,7 +1972,7 @@ void make_tables ()
|
||||
("if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )");
|
||||
indent_up ();
|
||||
indent_puts ("{");
|
||||
indent_puts ("int yyl;");
|
||||
indent_puts ("yy_size_t yyl;");
|
||||
do_indent ();
|
||||
out_str ("for ( yyl = %s; yyl < yyleng; ++yyl )\n",
|
||||
yymore_used ? (yytext_is_array ? "YY_G(yy_prev_more_offset)" :
|
||||
|
7
main.c
7
main.c
@ -182,6 +182,8 @@ int flex_main (argc, argv)
|
||||
|
||||
readin ();
|
||||
|
||||
skelout ();
|
||||
/* %% [1.5] DFA */
|
||||
ntod ();
|
||||
|
||||
for (i = 1; i <= num_rules; ++i)
|
||||
@ -240,11 +242,6 @@ void check_options ()
|
||||
flexerror (_
|
||||
("Can't use --reentrant or --bison-bridge with -l option"));
|
||||
|
||||
/* Don't rely on detecting use of yymore() and REJECT,
|
||||
* just assume they'll be used.
|
||||
*/
|
||||
yymore_really_used = reject_really_used = true;
|
||||
|
||||
yytext_is_array = true;
|
||||
do_yylineno = true;
|
||||
use_read = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user