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

Diff for /src/usr.bin/yacc/mkpar.c between version 1.1 and 1.2

version 1.1, 1995/10/18 08:47:05 version 1.2, 1996/02/04 08:37:01
Line 6 
Line 6 
   
 action **parser;  action **parser;
 int SRtotal;  int SRtotal;
   int SRexpect = 0;
 int RRtotal;  int RRtotal;
 short *SRconflicts;  short *SRconflicts;
 short *RRconflicts;  short *RRconflicts;
Line 279 
Line 280 
   
 total_conflicts()  total_conflicts()
 {  {
     fprintf(stderr, "%s: ", myname);      /* Warn if s/r != expect or if any r/r */
     if (SRtotal == 1)      if ((SRtotal != SRexpect) || RRtotal)
         fprintf(stderr, "1 shift/reduce conflict");      {
     else if (SRtotal > 1)          if (SRtotal == 1)
         fprintf(stderr, "%d shift/reduce conflicts", SRtotal);              fprintf(stderr, "%s: 1 shift/reduce conflict\n", myname);
           else if (SRtotal > 1)
               fprintf(stderr, "%s: %d shift/reduce conflicts\n", myname,
                       SRtotal);
       }
   
     if (SRtotal && RRtotal)  
         fprintf(stderr, ", ");  
   
     if (RRtotal == 1)      if (RRtotal == 1)
         fprintf(stderr, "1 reduce/reduce conflict");          fprintf(stderr, "%s: 1 reduce/reduce conflict\n", myname);
     else if (RRtotal > 1)      else if (RRtotal > 1)
         fprintf(stderr, "%d reduce/reduce conflicts", RRtotal);          fprintf(stderr, "%s: %d reduce/reduce conflicts\n", myname,
                   RRtotal);
     fprintf(stderr, ".\n");  
 }  }
   
   

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2