[BACK]Return to verbose.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / yacc

Diff for /src/usr.bin/yacc/verbose.c between version 1.13 and 1.14

version 1.13, 2014/10/09 03:02:18 version 1.14, 2017/05/25 20:11:03
Line 298 
Line 298 
   
   
 void  void
 print_reductions(action * p, int defred)  print_reductions(action * p, int pdefred)
 {  {
         int k, anyreds;          int k, anyreds;
         action *q;          action *q;
Line 315 
Line 315 
                 fprintf(verbose_file, "\t.  error\n");                  fprintf(verbose_file, "\t.  error\n");
         else {          else {
                 for (; p; p = p->next) {                  for (; p; p = p->next) {
                         if (p->action_code == REDUCE && p->number != defred) {                          if (p->action_code == REDUCE && p->number != pdefred) {
                                 k = p->number - 2;                                  k = p->number - 2;
                                 if (p->suppressed == 0)                                  if (p->suppressed == 0)
                                         fprintf(verbose_file, "\t%s  reduce %d\n",                                          fprintf(verbose_file, "\t%s  reduce %d\n",
Line 323 
Line 323 
                         }                          }
                 }                  }
   
                 if (defred > 0)                  if (pdefred > 0)
                         fprintf(verbose_file, "\t.  reduce %d\n", defred - 2);                          fprintf(verbose_file, "\t.  reduce %d\n", pdefred - 2);
         }          }
 }  }
   
Line 334 
Line 334 
 {  {
         int i, k;          int i, k;
         int as;          int as;
         short *to_state;          short *tto_state;
         shifts *sp;          shifts *sp;
   
         putc('\n', verbose_file);          putc('\n', verbose_file);
         sp = shift_table[stateno];          sp = shift_table[stateno];
         to_state = sp->shift;          tto_state = sp->shift;
         for (i = 0; i < sp->nshifts; ++i) {          for (i = 0; i < sp->nshifts; ++i) {
                 k = to_state[i];                  k = tto_state[i];
                 as = accessing_symbol[k];                  as = accessing_symbol[k];
                 if (ISVAR(as))                  if (ISVAR(as))
                         fprintf(verbose_file, "\t%s  goto %d\n",                          fprintf(verbose_file, "\t%s  goto %d\n",

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14