* data/glr.c (yyreportTree): Make room in yystates for the state

preceding the RHS.  This fixes the segmentation fault reported by Derek
M. Jones in
<http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
(yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
to the user.  Reported for yyreportTree by Derek M. Jones later in the
same thread.
* THANKS: Add Derek M. Jones.
Update my email address.
Fix typo in Steve Murphy's name.
This commit is contained in:
Joel E. Denny
2006-05-17 16:39:40 +00:00
parent d664514801
commit 9138c575d8
3 changed files with 20 additions and 6 deletions
+13
View File
@@ -1,3 +1,16 @@
2006-05-17 Joel E. Denny <[email protected]>
* data/glr.c (yyreportTree): Make room in yystates for the state
preceding the RHS. This fixes the segmentation fault reported by Derek
M. Jones in
<http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
(yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
to the user. Reported for yyreportTree by Derek M. Jones later in the
same thread.
* THANKS: Add Derek M. Jones.
Update my email address.
Fix typo in Steve Murphy's name.
2006-05-14 Paul Eggert <[email protected]>
* data/glr.c (yyreportSyntaxError): Fix off-by-one error in
+3 -2
View File
@@ -21,6 +21,7 @@ Cris Bailiff [email protected]
Cris van Pelt [email protected]
Daniel Hagerty [email protected]
David J. MacKenzie [email protected]
Derek M. Jones [email protected]
Dick Streefland [email protected]
Enrico Scholz [email protected]
Evgeny Stambulchik [email protected]
@@ -34,7 +35,7 @@ Jan Nieuwenhuizen [email protected]
Jesse Thilo [email protected]
Jim Kent [email protected]
Jim Meyering [email protected]
Joel E. Denny jdenny@hubcap.clemson.edu
Joel E. Denny jdenny@ces.clemson.edu
Juan Manuel Guerrero [email protected]
Kees Zeelenberg [email protected]
Keith Browne [email protected]
@@ -67,7 +68,7 @@ Raja R Harinath [email protected]
Richard Stallman [email protected]
Robert Anisko [email protected]
Shura [email protected]
Steve Murhpy [email protected]
Steve Murphy [email protected]
Tim Josling [email protected]
Tim Van Holder [email protected]
Tom Lane [email protected]
+4 -4
View File
@@ -1741,7 +1741,7 @@ yyreportTree (yySemanticOption* yyx, int yyindent)
int yynrhs = yyrhsLength (yyx->yyrule);
int yyi;
yyGLRState* yys;
yyGLRState* yystates[YYMAXRHS];
yyGLRState* yystates[1 + YYMAXRHS];
yyGLRState yyleftmost_state;
for (yyi = yynrhs, yys = yyx->yystate; 0 < yyi; yyi -= 1, yys = yys->yypred)
@@ -1757,11 +1757,11 @@ yyreportTree (yySemanticOption* yyx, int yyindent)
if (yyx->yystate->yyposn < yys->yyposn + 1)
YYFPRINTF (stderr, "%*s%s -> <Rule %d, empty>\n",
yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)),
yyx->yyrule);
yyx->yyrule - 1);
else
YYFPRINTF (stderr, "%*s%s -> <Rule %d, tokens %lu .. %lu>\n",
yyindent, "", yytokenName (yylhsNonterm (yyx->yyrule)),
yyx->yyrule, (unsigned long int) (yys->yyposn + 1),
yyx->yyrule - 1, (unsigned long int) (yys->yyposn + 1),
(unsigned long int) yyx->yystate->yyposn);
for (yyi = 1; yyi <= yynrhs; yyi += 1)
{
@@ -2578,7 +2578,7 @@ yypdumpstack (yyGLRStack* yystackp)
else
{
fprintf (stderr, "Option. rule: %d, state: %ld, next: %ld",
yyp->yyoption.yyrule,
yyp->yyoption.yyrule - 1,
(long int) YYINDEX (yyp->yyoption.yystate),
(long int) YYINDEX (yyp->yyoption.yynext));
}