# define YYSTACK_REALLOC(Type, What, Array) \
do { \
Type *old = What; \
- What = (Type *) malloc (yystacksize * sizeof (Type)); \
+ What = (Type *) alloca (yystacksize * sizeof (Type)); \
__yy_memcpy ((char *) What, (char *) old, \
(size) * (unsigned int) sizeof (Type)); \
- yyfree_stacks = 1; \
- if (old != Array) \
- free (old); \
} while (0)
#else
# define YYSTACK_REALLOC(Type, What, Array) \
do { \
Type *old = What; \
- What = (Type *) alloca (yystacksize * sizeof (Type)); \
+ What = (Type *) malloc (yystacksize * sizeof (Type)); \
__yy_memcpy ((char *) What, (char *) old, \
(size) * (unsigned int) sizeof (Type)); \
+ yyfree_stacks = 1; \
+ if (old != Array) \
+ free (old); \
} while (0)
#endif
# define YYLTYPE %%ltype
#endif
-#ifndef YYERROR_VERBOSE
-# define YYERROR_VERBOSE %%verbose
-#else
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#endif
-
/* Tokens. */
%%tokendef
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE
+#if %%error_verbose
/* YYTNME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
static const char *const yytname[] =
{
{
++yynerrs;
-#if YYERROR_VERBOSE
+#if %%error_verbose
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
yyerror ("parse error; also virtual memory exhausted");
}
else
-#endif /* YYERROR_VERBOSE */
+#endif /* %%ERROR_VERBOSE */
yyerror ("parse error");
}
goto yyerrlab1;