bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Get rid of yyrhs and yyprhs in glr.c.


From: Akim Demaille
Subject: Re: [PATCH] Get rid of yyrhs and yyprhs in glr.c.
Date: Wed, 26 Nov 2008 09:53:37 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

>>> "AD" == Akim Demaille <address@hidden> writes:

 > @@ -1453,7 +1440,8 @@ yy_reduce_print (yyGLRStack* yystackp, size_t yyk, 
 > yyRuleNum yyrule,
 >    for (yyi = 0; yyi < yynrhs; yyi++)
 >      {
 >        YYFPRINTF (stderr, "   $%d = ", yyi + 1);
 > -      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
 > +      yy_symbol_print (stderr,
 > +                       address@hidden(yynrhs, yyi + 1)address@hidden,
 >                     &]b4_rhs_value(yynrhs, yyi + 1)[
 >                     ]b4_locations_if([, &]b4_rhs_location(yynrhs, yyi + 
 > 1))[]dnl
 >                     b4_user_args[);
 > @@ -1782,11 +1770,11 @@ yyreportTree (yySemanticOption* yyx, int yyindent)
 >      {
 >        if (yystates[yyi-1]->yyposn+1 > yystates[yyi]->yyposn)
 >          YYFPRINTF (stderr, "%*s%s <empty>\n", yyindent+2, "",
 > -                   yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1]));
 > +                   yytokenName (yystos[yystates[yyi-1]->yylrState]));
 >        else
 >          YYFPRINTF (stderr, "%*s%s <tokens %lu .. %lu>\n", yyindent+2, "",
 > -                   yytokenName (yyrhs[yyprhs[yyx->yyrule]+yyi-1]),
 > -                   (unsigned long int) (yystates[yyi - 1]->yyposn + 1),
 > +                   yytokenName (yystos[yystates[yyi-1]->yylrState]),
 > +                   (unsigned long int) (yystates[yyi-1]->yyposn + 1),
 >                     (unsigned long int) yystates[yyi]->yyposn);
 >      }
 >        else

I hope I'm right here.  I could use a second pair of eyes on this
patch.  I'm not sure the test suite is checking this thoroughly.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]