/[bison]/bison/data/glr.c
ViewVC logotype

Diff of /bison/data/glr.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.38 by eggert, Fri Nov 15 20:32:20 2002 UTC revision 1.39 by akim, Sat Nov 16 12:32:27 2002 UTC
# Line 1106  static inline void Line 1106  static inline void
1106  yy_reduce_print (size_t yyk, yyRuleNum yyrule)  yy_reduce_print (size_t yyk, yyRuleNum yyrule)
1107  {  {
1108    int yyi;    int yyi;
1109    YYDPRINTF ((stderr, "Reducing stack %d by rule %d (line %d), ",    YYFPRINTF (stderr, "Reducing stack %d by rule %d (line %d), ",
1110                yyk, yyrule - 1, yyrline[yyrule]));               yyk, yyrule - 1, yyrline[yyrule]);
1111    /* Print the symbols being reduced, and their result.  */    /* Print the symbols being reduced, and their result.  */
1112    for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)    for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1113      YYFPRINTF (stderr, "%s ", yytokenName (yyrhs[yyi]));      YYFPRINTF (stderr, "%s ", yytokenName (yyrhs[yyi]));
# Line 1143  yyglrReduce (yyGLRStack* yystack, size_t Line 1143  yyglrReduce (yyGLRStack* yystack, size_t
1143                    yyLRgotoState (yystack->yytops.yystates[yyk]->yylrState,                    yyLRgotoState (yystack->yytops.yystates[yyk]->yylrState,
1144                                   yylhsNonterm (yyrule)),                                   yylhsNonterm (yyrule)),
1145                    yyposn, yysval, &yyloc]b4_user_args[);                    yyposn, yysval, &yyloc]b4_user_args[);
       YYDPRINTF ((stderr, "Stack %d entering state %d\n",  
                   yyk, yystack->yytops.yystates[yyk]->yylrState));  
1146      }      }
1147    else    else
1148      {      {
# Line 1512  yyprocessOneStack (yyGLRStack* yystack, Line 1510  yyprocessOneStack (yyGLRStack* yystack,
1510    while (yystack->yytops.yystates[yyk] != NULL)    while (yystack->yytops.yystates[yyk] != NULL)
1511      {      {
1512        yyStateNum yystate = yystack->yytops.yystates[yyk]->yylrState;        yyStateNum yystate = yystack->yytops.yystates[yyk]->yylrState;
1513          YYDPRINTF ((stderr, "Stack %d Entering state %d\n", yyk, yystate));
1514    
1515        assert (yystate != YYFINAL);        assert (yystate != YYFINAL);
1516        if (yyisDefaultedState (yystate))        if (yyisDefaultedState (yystate))
# Line 1711  yyrecoverParseError (yyGLRStack* yystack Line 1710  yyrecoverParseError (yyGLRStack* yystack
1710                YYDPRINTF ((stderr, "Shifting error token, "));                YYDPRINTF ((stderr, "Shifting error token, "));
1711                yyglrShift (yystack, 0, yytable[yyj],                yyglrShift (yystack, 0, yytable[yyj],
1712                            yys->yyposn, *yylvalp, yyllocp]b4_user_args[);                            yys->yyposn, *yylvalp, yyllocp]b4_user_args[);
               YYDPRINTF ((stderr, "Entering state %d\n",  
                           yystack->yytops.yystates[0]->yylrState));  
1713                break;                break;
1714              }              }
1715          }          }
# Line 1783  yyrecoverParseError (yyGLRStack* yystack Line 1780  yyrecoverParseError (yyGLRStack* yystack
1780        /* For efficiency, we have two loops, the first of which is        /* For efficiency, we have two loops, the first of which is
1781           specialized to deterministic operation (single stack, no           specialized to deterministic operation (single stack, no
1782           potential ambiguity).  */           potential ambiguity).  */
   
1783        /* Standard mode */        /* Standard mode */
1784        while (yytrue)        while (yytrue)
1785          {          {
# Line 1792  yyrecoverParseError (yyGLRStack* yystack Line 1788  yyrecoverParseError (yyGLRStack* yystack
1788            const short* yyconflicts;            const short* yyconflicts;
1789    
1790            yyStateNum yystate = yystack.yytops.yystates[0]->yylrState;            yyStateNum yystate = yystack.yytops.yystates[0]->yylrState;
1791              YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1792            if (yystate == YYFINAL)            if (yystate == YYFINAL)
1793              goto yyDone;              goto yyDone;
1794            if (yyisDefaultedState (yystate))            if (yyisDefaultedState (yystate))
# Line 1827  yyrecoverParseError (yyGLRStack* yystack Line 1824  yyrecoverParseError (yyGLRStack* yystack
1824                                yylval, yyllocp]b4_user_args[);                                yylval, yyllocp]b4_user_args[);
1825                    if (0 < yystack.yyerrState)                    if (0 < yystack.yyerrState)
1826                      yystack.yyerrState -= 1;                      yystack.yyerrState -= 1;
                   YYDPRINTF ((stderr, "Entering state %d\n",  
                               yystack.yytops.yystates[0]->yylrState));  
1827                  }                  }
1828                else if (yyisErrorAction (yyaction))                else if (yyisErrorAction (yyaction))
1829                  {                  {

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26