[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
glr.c change to avoid run-on debug diagnostics
From: |
Paul Eggert |
Subject: |
glr.c change to avoid run-on debug diagnostics |
Date: |
Sun, 21 Aug 2005 18:06:57 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
I installed this:
2005-08-21 Paul Eggert <address@hidden>
* data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
with the other templates, and to fix bogus run-on messages such
as the one reported at the end of
<http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
All callers changed to avoid the newline.
(yyprocessOneStack): Output two lines rather than one, to accommodate
the above change. This changes the debug output format slightly.
--- data/glr.c 21 Aug 2005 23:43:56 -0000 1.112
+++ data/glr.c 22 Aug 2005 01:05:27 -0000
@@ -532,6 +532,7 @@ do {
\
YYFPRINTF (stderr, "%s ", Title); \
yysymprint (stderr, \
Type, Value]b4_location_if([, Location])[); \
+ YYFPRINTF (stderr, "\n"); \
} \
} while (0)
@@ -1748,7 +1749,6 @@ yyprocessOneStack (yyGLRStack* yystack,
yychar = YYLEX;
*yytokenp = YYTRANSLATE (yychar);
YY_SYMBOL_PRINT ("Next token is", *yytokenp, yylvalp, yyllocp);
- YYDPRINTF ((stderr, "\n"));
}
yygetLRActions (yystate, *yytokenp, &yyaction, &yyconflicts);
@@ -1771,7 +1771,8 @@ yyprocessOneStack (yyGLRStack* yystack,
YY_SYMBOL_PRINT ("shifting", *yytokenp, yylvalp, yyllocp);
yyglrShift (yystack, yyk, yyaction, yyposn+1,
*yylvalp, yyllocp);
- YYDPRINTF ((stderr, ", now in state #%d\n",
+ YYDPRINTF ((stderr, "Stack %lu now in state #%d\n",
+ (unsigned long int) yyk,
yystack->yytops.yystates[yyk]->yylrState));
break;
}
@@ -1931,7 +1932,6 @@ yyrecoverSyntaxError (yyGLRStack* yystac
yychar = YYLEX;
*yytokenp = YYTRANSLATE (yychar);
YY_SYMBOL_PRINT ("Next token is", *yytokenp, yylvalp, yyllocp);
- YYDPRINTF ((stderr, "\n"));
yyj = yypact[yystack->yytops.yystates[0]->yylrState];
if (yyis_pact_ninf (yyj))
return;
@@ -1974,7 +1974,6 @@ yyrecoverSyntaxError (yyGLRStack* yystac
YYLLOC_DEFAULT (yyerrloc, yystack->yyerror_range, 2);]])[
YY_SYMBOL_PRINT ("Shifting", yystos[yytable[yyj]],
yylvalp, &yyerrloc);
- YYDPRINTF ((stderr, "\n"));
yyglrShift (yystack, 0, yytable[yyj],
yys->yyposn, *yylvalp, &yyerrloc);
yys = yystack->yytops.yystates[0];
@@ -2095,7 +2094,6 @@ b4_syncline(address@hidden@], address@hidden@])])dnl
yychar = YYLEX;
yytoken = YYTRANSLATE (yychar);
YY_SYMBOL_PRINT ("Next token is", yytoken, yylvalp, yyllocp);
- YYDPRINTF ((stderr, "\n"));
}
yygetLRActions (yystate, yytoken, &yyaction, &yyconflicts);
if (*yyconflicts != 0)
@@ -2103,7 +2101,6 @@ b4_syncline(address@hidden@], address@hidden@])])dnl
if (yyisShiftAction (yyaction))
{
YY_SYMBOL_PRINT ("Shifting", yytoken, yylvalp, yyllocp);
- YYDPRINTF ((stderr, "\n"));
if (yytoken != YYEOF)
yytoken = YYEMPTY;
yyposn += 1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- glr.c change to avoid run-on debug diagnostics,
Paul Eggert <=