template/bison/yacc.c in lrama-0.6.2 vs template/bison/yacc.c in lrama-0.6.3
- old
+ new
@@ -1750,10 +1750,11 @@
yystate = yyn;
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
*++yylsp = yylloc;
+<%= output.after_shift_function("/* %after-shift code. */") %>
/* Discard the shifted token. */
yychar = YYEMPTY;
goto yynewstate;
@@ -1782,10 +1783,11 @@
This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
+<%= output.before_reduce_function("/* %before-reduce function. */") %>
/* Default location. */
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
yyerror_range[1] = yyloc;
YY_REDUCE_PRINT (yyn<%= output.user_args %>);
@@ -1807,10 +1809,11 @@
to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc<%= output.user_args %>);
YYPOPSTACK (yylen);
+<%= output.after_reduce_function("/* %after-reduce function. */") %>
yylen = 0;
*++yyvsp = yyval;
*++yylsp = yyloc;
@@ -1908,10 +1911,11 @@
++yynerrs;
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
+<%= output.after_pop_stack_function("yylen", "/* %after-pop-stack function. */") %>
yylen = 0;
YY_STACK_PRINT (yyss, yyssp<%= output.user_args %>);
yystate = *yyssp;
goto yyerrlab1;
@@ -1967,10 +1971,11 @@
yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp<%= output.user_args %>);
YYPOPSTACK (1);
+<%= output.after_pop_stack_function(1, "/* %after-pop-stack function. */") %>
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp<%= output.user_args %>);
}
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
@@ -1981,9 +1986,10 @@
++yylsp;
YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
/* Shift the error token. */
YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp<%= output.user_args %>);
+<%= output.after_shift_error_token_function("/* %after-shift-error-token code. */") %>
yystate = yyn;
goto yynewstate;