X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/ad60e80f3d13e8c4306a22a9d15863f73c576a27..45fdfd8108084c2c3505d584d8dcc7e534ae77a2:/data/yacc.c diff --git a/data/yacc.c b/data/yacc.c index 5e77f844..7bcbd7ca 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -345,9 +345,11 @@ m4_if(b4_api_prefix, [yy], [], # define YYERROR_VERBOSE ]b4_error_verbose_flag[ #endif -/* In a future release of Bison, this section will be replaced +]m4_ifval(m4_quote(b4_spec_defines_file), +[[/* In a future release of Bison, this section will be replaced by #include "@basename(]b4_spec_defines_file[@)". */ -]b4_shared_declarations[ +]])dnl +b4_shared_declarations[ /* Copy the second part of user declarations. */ ]b4_user_post_prologue @@ -1513,7 +1515,7 @@ b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[ int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval;]b4_locations_if([[ @@ -1538,7 +1540,6 @@ b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[ goto yyread_pushed_token; }]])[ - yytoken = 0; yyss = yyssa; yyvs = yyvsa;]b4_locations_if([[ yyls = yylsa;]])[ @@ -1570,17 +1571,16 @@ b4_c_function_def([[yyparse]], [[int]], b4_parse_param)[ yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[; #endif]]) m4_ifdef([b4_initial_action],[ -m4_pushdef([b4_at_dollar], [m4_define([b4_at_dollar_used])yylloc])dnl -m4_pushdef([b4_dollar_dollar], [m4_define([b4_dollar_dollar_used])yylval])dnl +b4_dollar_pushdef([m4_define([b4_dollar_dollar_used])yylval], [], + [m4_define([b4_at_dollar_used])yylloc])dnl /* User initialization code. */ b4_user_initial_action -m4_popdef([b4_dollar_dollar])dnl -m4_popdef([b4_at_dollar])])dnl +b4_dollar_popdef[]dnl m4_ifdef([b4_dollar_dollar_used],[[ yyvsp[0] = yylval; ]])dnl m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc; -]])[ - goto yysetstate; +]])])dnl +[ goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | @@ -2046,7 +2046,7 @@ yypushreturn:]])[ } -]b4_epilogue +]b4_epilogue[]dnl b4_defines_if( [@output(b4_spec_defines_file@)@ b4_copyright([Bison interface for Yacc-like parsers in C],