]> git.saurik.com Git - bison.git/blobdiff - data/yacc.c
Add Makevars.template, stamp-po.
[bison.git] / data / yacc.c
index 73df3ac825ceb24c48d7e317123424e67b3757f5..6ef0775c43d6604ee08a0cc1368140c6733928ec 100644 (file)
@@ -216,6 +216,13 @@ b4_syncline([@oline@], [@ofile@])[
 
 #if ! defined (yyoverflow) || YYERROR_VERBOSE
 
+# ifndef YYFREE
+#  define YYFREE free
+# endif
+# ifndef YYMALLOC
+#  define YYMALLOC malloc
+# endif
+
 /* The parser invokes alloca or malloc; define the necessary symbols.  */
 
 # ifdef YYSTACK_USE_ALLOCA
@@ -240,8 +247,8 @@ b4_syncline([@oline@], [@ofile@])[
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
 #   define YYSIZE_T size_t
 #  endif
-#  define YYSTACK_ALLOC malloc
-#  define YYSTACK_FREE free
+#  define YYSTACK_ALLOC YYMALLOC
+#  define YYSTACK_FREE YYFREE
 # endif
 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
 
@@ -549,7 +556,7 @@ do {                                                                \
 
 /*------------------------------------------------------------------.
 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (cinluded).                                                   |
+| TOP (included).                                                   |
 `------------------------------------------------------------------*/
 
 ]b4_c_function_def([yy_stack_print], [static void],
@@ -800,7 +807,17 @@ b4_c_function_def([yyparse], [int], b4_parse_param)
   yyssp = yyss;
   yyvsp = yyvs;
 ]b4_location_if([  yylsp = yyls;])[
-  goto yysetstate;
+]m4_ifdef([b4_initial_action], [
+m4_pushdef([b4_at_dollar],     [(*yylsp)])dnl
+m4_pushdef([b4_dollar_dollar], [(*yyvsp)])dnl
+  /* User initialization code. */
+  b4_initial_action
+m4_popdef([b4_dollar_dollar])dnl
+m4_popdef([b4_at_dollar])dnl
+/* Line __line__ of yacc.c.  */
+b4_syncline([@oline@], [@ofile@])])dnl
+
+[  goto yysetstate;
 
 /*------------------------------------------------------------.
 | yynewstate -- Push a new state, which is found in yystate.  |