/[bison]/bison/src/conflicts.c
ViewVC logotype

Diff of /bison/src/conflicts.c

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

revision 1.25 by akim, Mon Nov 12 09:31:40 2001 UTC revision 1.26 by akim, Mon Nov 12 09:32:35 2001 UTC
# Line 502  conflicts_print (void) Line 502  conflicts_print (void)
502    
503    
504  void  void
505  print_reductions (int state)  print_reductions (FILE *out, int state)
506  {  {
507    int i;    int i;
508    int j;    int j;
# Line 580  print_reductions (int state) Line 580  print_reductions (int state)
580        for (i = 0; i < ntokens; i++)        for (i = 0; i < ntokens; i++)
581          {          {
582            if (mask & *fp3)            if (mask & *fp3)
583              obstack_fgrow3 (&output_obstack,              fprintf (out, _("    %-4s\t[reduce using rule %d (%s)]\n"),
584                              _("    %-4s\t[reduce using rule %d (%s)]\n"),                       tags[i], default_rule, tags[rlhs[default_rule]]);
                             tags[i], default_rule, tags[rlhs[default_rule]]);  
585    
586            mask <<= 1;            mask <<= 1;
587            if (mask == 0)            if (mask == 0)
# Line 592  print_reductions (int state) Line 591  print_reductions (int state)
591              }              }
592          }          }
593    
594        obstack_fgrow2 (&output_obstack,        fprintf (out, _("    $default\treduce using rule %d (%s)\n\n"),
595                        _("    $default\treduce using rule %d (%s)\n\n"),                 default_rule, tags[rlhs[default_rule]]);
                       default_rule, tags[rlhs[default_rule]]);  
596      }      }
597    else if (n - m >= 1)    else if (n - m >= 1)
598      {      {
# Line 681  print_reductions (int state) Line 679  print_reductions (int state)
679                        if (j != default_LA)                        if (j != default_LA)
680                          {                          {
681                            rule = LAruleno[j];                            rule = LAruleno[j];
682                            obstack_fgrow3 (&output_obstack,                            fprintf (out,
683                                     _("    %-4s\treduce using rule %d (%s)\n"),                                     _("    %-4s\treduce using rule %d (%s)\n"),
684                                     tags[i], rule, tags[rlhs[rule]]);                                     tags[i], rule, tags[rlhs[rule]]);
685                          }                          }
# Line 695  print_reductions (int state) Line 693  print_reductions (int state)
693                        if (defaulted)                        if (defaulted)
694                          {                          {
695                            rule = LAruleno[default_LA];                            rule = LAruleno[default_LA];
696                            obstack_fgrow3 (&output_obstack,                            fprintf (out,
697                                     _("    %-4s\treduce using rule %d (%s)\n"),                                     _("    %-4s\treduce using rule %d (%s)\n"),
698                                     tags[i], rule, tags[rlhs[rule]]);                                     tags[i], rule, tags[rlhs[rule]]);
699                            defaulted = 0;                            defaulted = 0;
700                          }                          }
701                        rule = LAruleno[j];                        rule = LAruleno[j];
702                        obstack_fgrow3 (&output_obstack,                        fprintf (out,
703                                 _("    %-4s\t[reduce using rule %d (%s)]\n"),                                 _("    %-4s\t[reduce using rule %d (%s)]\n"),
704                                 tags[i], rule, tags[rlhs[rule]]);                                 tags[i], rule, tags[rlhs[rule]]);
705                      }                      }
# Line 722  print_reductions (int state) Line 720  print_reductions (int state)
720          }          }
721    
722        if (default_LA >= 0)        if (default_LA >= 0)
723          obstack_fgrow2 (&output_obstack,          fprintf (out, _("    $default\treduce using rule %d (%s)\n"),
724                          _("    $default\treduce using rule %d (%s)\n"),                   default_rule, tags[rlhs[default_rule]]);
                         default_rule, tags[rlhs[default_rule]]);  
   
       obstack_1grow (&output_obstack, '\n');  
725      }      }
726  }  }
727    

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

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