void
-print_reductions (int state)
+print_reductions (FILE *out, int state)
{
int i;
int j;
for (i = 0; i < ntokens; i++)
{
if (mask & *fp3)
- obstack_fgrow3 (&output_obstack,
- _(" %-4s\t[reduce using rule %d (%s)]\n"),
- tags[i], default_rule, tags[rlhs[default_rule]]);
+ fprintf (out, _(" %-4s\t[reduce using rule %d (%s)]\n"),
+ tags[i], default_rule, tags[rlhs[default_rule]]);
mask <<= 1;
if (mask == 0)
}
}
- obstack_fgrow2 (&output_obstack,
- _(" $default\treduce using rule %d (%s)\n\n"),
- default_rule, tags[rlhs[default_rule]]);
+ fprintf (out, _(" $default\treduce using rule %d (%s)\n\n"),
+ default_rule, tags[rlhs[default_rule]]);
}
else if (n - m >= 1)
{
if (j != default_LA)
{
rule = LAruleno[j];
- obstack_fgrow3 (&output_obstack,
+ fprintf (out,
_(" %-4s\treduce using rule %d (%s)\n"),
tags[i], rule, tags[rlhs[rule]]);
}
if (defaulted)
{
rule = LAruleno[default_LA];
- obstack_fgrow3 (&output_obstack,
+ fprintf (out,
_(" %-4s\treduce using rule %d (%s)\n"),
tags[i], rule, tags[rlhs[rule]]);
defaulted = 0;
}
rule = LAruleno[j];
- obstack_fgrow3 (&output_obstack,
+ fprintf (out,
_(" %-4s\t[reduce using rule %d (%s)]\n"),
tags[i], rule, tags[rlhs[rule]]);
}
}
if (default_LA >= 0)
- obstack_fgrow2 (&output_obstack,
- _(" $default\treduce using rule %d (%s)\n"),
- default_rule, tags[rlhs[default_rule]]);
-
- obstack_1grow (&output_obstack, '\n');
+ fprintf (out, _(" $default\treduce using rule %d (%s)\n"),
+ default_rule, tags[rlhs[default_rule]]);
}
}