+ return default_rule;
+}
+
+
+/*--------------------------------------------------------------------.
+| Report a reduction of RULE on LOOKAHEADS (which can be `default'). |
+| If not ENABLED, the rule is masked by a shift or a reduce (S/R and |
+| R/R conflicts). |
+`--------------------------------------------------------------------*/
+
+static void
+print_reduction (FILE *out, size_t width,
+ const char *lookahead,
+ rule_t *rule, bool enabled)
+{
+ int j;
+ fprintf (out, " %s", lookahead);
+ for (j = width - strlen (lookahead); j > 0; --j)
+ fputc (' ', out);
+ if (!enabled)
+ fputc ('[', out);
+ fprintf (out, _("reduce using rule %d (%s)"),
+ rule->number - 1, rule->lhs->tag);
+ if (!enabled)
+ fputc (']', out);
+ fputc ('\n', out);
+}
+
+
+/*----------------------------------------------------.
+| Report on OUT the reduction actions of this STATE. |
+`----------------------------------------------------*/
+
+static void
+print_reductions (FILE *out, state_t *state)
+{
+ transitions_t *transitions = state->transitions;
+ reductions_t *redp = state->reductions;
+ rule_t *default_rule = NULL;
+ size_t width = 0;
+ int i, j;
+
+ if (redp->num == 0)
+ return;
+
+ default_rule = state_default_rule (state);
+
+ bitset_zero (shiftset);
+ for (i = 0; i < transitions->num && TRANSITION_IS_SHIFT (transitions, i); i++)
+ if (!TRANSITION_IS_DISABLED (transitions, i))
+ bitset_set (shiftset, TRANSITION_SYMBOL (transitions, i));
+
+ /* Compute the width of the lookaheads column. */
+ if (default_rule)
+ width = strlen (_("$default"));
+ for (i = 0; i < ntokens; i++)