- count_sr_conflicts (i);
- count_rr_conflicts (i);
- src_total += src_count;
- rrc_total += rrc_count;
-
- if (verbose_flag)
- {
- fprintf (out, _("State %d contains"), i);
- fputs (conflict_report (src_count, rrc_count), out);
- }
+ /* If invoked with `--yacc', use the output format specified by
+ POSIX. */
+ fprintf (stderr, _("conflicts: "));
+ if (src_total > 0)
+ fprintf (stderr, _(" %d shift/reduce"), src_total);
+ if (src_total > 0 && rrc_total > 0)
+ fprintf (stderr, ",");
+ if (rrc_total > 0)
+ fprintf (stderr, _(" %d reduce/reduce"), rrc_total);
+ putc ('\n', stderr);
+ }
+ else
+ {
+ fprintf (stderr, _("%s contains "), infile);
+ fputs (conflict_report (src_total, rrc_total), stderr);