mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 02:33:03 +00:00
yacc.c: simplify use of YYDPRINTF
* data/skeletons/yacc.c (YYDPRINTF): Expand to no-op (instead of nothing) when disabled. Simplify callers.
This commit is contained in:
@@ -764,7 +764,7 @@ do { \
|
|||||||
multiple parsers can coexist. */
|
multiple parsers can coexist. */
|
||||||
int yydebug;
|
int yydebug;
|
||||||
#else /* !]b4_api_PREFIX[DEBUG */
|
#else /* !]b4_api_PREFIX[DEBUG */
|
||||||
# define YYDPRINTF(Args)
|
# define YYDPRINTF(Args) ((void) 0)
|
||||||
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
|
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
|
||||||
# define YY_STACK_PRINT(Bottom, Top)
|
# define YY_STACK_PRINT(Bottom, Top)
|
||||||
# define YY_REDUCE_PRINT(Rule)
|
# define YY_REDUCE_PRINT(Rule)
|
||||||
@@ -914,9 +914,8 @@ do { \
|
|||||||
do { \
|
do { \
|
||||||
if (yy_lac_established) \
|
if (yy_lac_established) \
|
||||||
{ \
|
{ \
|
||||||
if (yydebug) \
|
YYDPRINTF ((stderr, "LAC: initial context discarded due to " \
|
||||||
YYFPRINTF (stderr, "LAC: initial context discarded due to " \
|
Event "\n")); \
|
||||||
Event "\n"); \
|
|
||||||
yy_lac_established = 0; \
|
yy_lac_established = 0; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
@@ -1211,10 +1210,8 @@ yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
|
|||||||
yyarg[yycount++] = yytname[yyx];
|
yyarg[yycount++] = yytname[yyx];
|
||||||
}
|
}
|
||||||
}]b4_lac_if([[
|
}]b4_lac_if([[
|
||||||
# if ]b4_api_PREFIX[DEBUG
|
else
|
||||||
else if (yydebug)
|
YYDPRINTF ((stderr, "No expected tokens.\n"));]])[
|
||||||
YYFPRINTF (stderr, "No expected tokens.\n");
|
|
||||||
# endif]])[
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (yycount)
|
switch (yycount)
|
||||||
|
|||||||
Reference in New Issue
Block a user