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

Diff of /bison/data/yacc.c

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

revision 1.32 by akim, Tue Nov 12 08:45:40 2002 UTC revision 1.33 by akim, Tue Nov 12 09:03:12 2002 UTC
# Line 620  yystpcpy (yydest, yysrc) Line 620  yystpcpy (yydest, yysrc)
620    
621    
622  #if YYDEBUG  #if YYDEBUG
623  /*-----------------------------.  b4_yysymprint_generate([b4_c_function_def])
 | Print this symbol on YYOUT.  |  
 `-----------------------------*/  
   
 b4_c_function_def([yysymprint],  
                   [static void],  
                   [[FILE *yyout],        [yyout]],  
                   [[int yytype],         [yytype]],  
                   [[YYSTYPE yyvalue],    [yyvalue]]b4_location_if([,  
                   [[YYLTYPE yylocation], [yylocation]]]))  
 {  
   /* Pacify ``unused variable'' warnings.  */  
   (void) yyvalue;  
 b4_location_if([  (void) yylocation;  
 ])dnl  
   
   if (yytype < YYNTOKENS)  
     {  
       YYFPRINTF (yyout, "token %s (", yytname[[yytype]]);  
 # ifdef YYPRINT  
       YYPRINT (yyout, yytoknum[[yytype]], yyvalue);  
 # endif  
     }  
   else  
     YYFPRINTF (yyout, "nterm %s (", yytname[[yytype]]);  
   
   switch (yytype)  
     {  
 m4_map([b4_symbol_actions], m4_defn([b4_symbol_printers]))dnl  
       default:  
         break;  
     }  
   YYFPRINTF (yyout, ")");  
 }  
624  #endif /* YYDEBUG. */  #endif /* YYDEBUG. */
   
625  b4_yydestruct_generate([b4_c_function_def])  b4_yydestruct_generate([b4_c_function_def])
626    
627    
# Line 888  yybackup: Line 854  yybackup:
854        /* We have to keep this `#if YYDEBUG', since we use variables        /* We have to keep this `#if YYDEBUG', since we use variables
855           which are defined only if `YYDEBUG' is set.  */           which are defined only if `YYDEBUG' is set.  */
856        YYDPRINTF ((stderr, "Next token is "));        YYDPRINTF ((stderr, "Next token is "));
857        YYDSYMPRINT ((stderr, yytoken, yylval]b4_location_if([, yyloc])[));        YYDSYMPRINT ((stderr, yytoken, &yylval]b4_location_if([, &yyloc])[));
858        YYDPRINTF ((stderr, "\n"));        YYDPRINTF ((stderr, "\n"));
859      }      }
860    
# Line 1097  yyerrlab1: Line 1063  yyerrlab1:
1063                YYDPRINTF ((stderr, "Error: popping "));                YYDPRINTF ((stderr, "Error: popping "));
1064                YYDSYMPRINT ((stderr,                YYDSYMPRINT ((stderr,
1065                              yystos[*yyssp],                              yystos[*yyssp],
1066                              *yyvsp]b4_location_if([, *yylsp])[));                              yyvsp]b4_location_if([, yylsp])[));
1067                YYDPRINTF ((stderr, "\n"));                YYDPRINTF ((stderr, "\n"));
1068                yydestruct (yystos[*yyssp], *yyvsp]b4_location_if([, *yylsp])[);                yydestruct (yystos[*yyssp], yyvsp]b4_location_if([, yylsp])[);
1069                YYPOPSTACK;                YYPOPSTACK;
1070              }              }
1071            YYABORT;            YYABORT;
# Line 1107  yyerrlab1: Line 1073  yyerrlab1:
1073    
1074        YYDPRINTF ((stderr, "Discarding token %d (%s).\n",        YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1075                    yytoken, yytname[yytoken]));                    yytoken, yytname[yytoken]));
1076        yydestruct (yytoken, yylval]b4_location_if([, yylloc])[);        yydestruct (yytoken, &yylval]b4_location_if([, &yylloc])[);
1077        yytoken = YYEMPTY;        yytoken = YYEMPTY;
1078      }      }
1079    
# Line 1136  yyerrlab1: Line 1102  yyerrlab1:
1102    
1103        YYDPRINTF ((stderr, "Error: popping "));        YYDPRINTF ((stderr, "Error: popping "));
1104        YYDSYMPRINT ((stderr,        YYDSYMPRINT ((stderr,
1105                      yystos[*yyssp], *yyvsp]b4_location_if([, *yylsp])[));                      yystos[*yyssp], yyvsp]b4_location_if([, yylsp])[));
1106        YYDPRINTF ((stderr, "\n"));        YYDPRINTF ((stderr, "\n"));
1107    
1108        yydestruct (yystos[yystate], *yyvsp]b4_location_if([, *yylsp])[);        yydestruct (yystos[yystate], yyvsp]b4_location_if([, yylsp])[);
1109        yyvsp--;        yyvsp--;
1110        yystate = *--yyssp;        yystate = *--yyssp;
1111  ]b4_location_if([      yylsp--;])[  ]b4_location_if([      yylsp--;])[

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

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