Jung-uk Kim 2013-05-01 00:04:29 +00:00
parent 13a0f001a6
commit 6ad8422b51
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/flex/dist/; revision=250128
4 changed files with 17 additions and 10 deletions

View File

@ -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. */

View File

@ -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
View File

@ -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
View File

@ -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;