- for (sp = ritem + rule_table[rule].rhs; sp < sp1; sp++)
- fprintf (out, "%s ", escape (tags[*sp]));
+ for (sp = ritem + rules[rule].rhs; sp < sp1; sp++)
+ fprintf (out, "%s ", escape (symbols[*sp]->tag));
if (!SHIFT_IS_DISABLED (shiftp, i))
{
int state1 = shiftp->shifts[i];
if (!SHIFT_IS_DISABLED (shiftp, i))
{
int state1 = shiftp->shifts[i];
for (i = 0; i < errp->nerrs; ++i)
if (errp->errs[i])
fprintf (out, _(" %-4s\terror (nonassociative)\n"),
for (i = 0; i < errp->nerrs; ++i)
if (errp->errs[i])
fprintf (out, _(" %-4s\terror (nonassociative)\n"),
if (!SHIFT_IS_DISABLED (shiftp, i))
{
int state1 = shiftp->shifts[i];
if (!SHIFT_IS_DISABLED (shiftp, i))
{
int state1 = shiftp->shifts[i];
for (i = 0; i < ntokens; i++)
if (BITISSET (lookaheadset, i))
fprintf (out, _(" %-4s\t[reduce using rule %d (%s)]\n"),
for (i = 0; i < ntokens; i++)
if (BITISSET (lookaheadset, i))
fprintf (out, _(" %-4s\t[reduce using rule %d (%s)]\n"),
- escape (tags[i]), default_rule,
- escape2 (tags[rule_table[default_rule].lhs]));
+ escape (symbols[i]->tag), default_rule - 1,
+ escape2 (symbols[rules[default_rule].lhs]->tag));
if (state->lookaheadsp + j != default_LA)
fprintf (out,
_(" %-4s\treduce using rule %d (%s)\n"),
if (state->lookaheadsp + j != default_LA)
fprintf (out,
_(" %-4s\treduce using rule %d (%s)\n"),
- escape (tags[i]),
- LAruleno[state->lookaheadsp + j],
- escape2 (tags[rule_table[LAruleno[state->lookaheadsp + j]].lhs]));
+ escape (symbols[i]->tag),
+ LAruleno[state->lookaheadsp + j] - 1,
+ escape2 (symbols[rules[LAruleno[state->lookaheadsp + j]].lhs]->tag));
- escape (tags[i]),
- LAruleno[default_LA],
- escape2 (tags[rule_table[LAruleno[default_LA]].lhs]));
+ escape (symbols[i]->tag),
+ LAruleno[default_LA] - 1,
+ escape2 (symbols[rules[LAruleno[default_LA]].lhs]->tag));
- escape (tags[i]),
- LAruleno[state->lookaheadsp + j],
- escape2 (tags[rule_table[LAruleno[state->lookaheadsp + j]].lhs]));
+ escape (symbols[i]->tag),
+ LAruleno[state->lookaheadsp + j] - 1,
+ escape2 (symbols[rules[LAruleno[state->lookaheadsp + j]].lhs]->tag));
fprintf (out, " %s\n", _("Number, Line, Rule"));
for (i = 1; i <= nrules; i++)
/* Don't print rules disabled in reduce_grammar_tables. */
fprintf (out, " %s\n", _("Number, Line, Rule"));
for (i = 1; i <= nrules; i++)
/* Don't print rules disabled in reduce_grammar_tables. */
- i, rule_table[i].line, escape (tags[rule_table[i].lhs]));
- rule = &ritem[rule_table[i].rhs];
+ i - 1, rules[i].line, escape (symbols[rules[i].lhs]->tag));
+ rule = &ritem[rules[i].rhs];
- column = strlen (escape (tags[token_translations[i]]));
- fputs (escape (tags[token_translations[i]]), out);
+ column = strlen (escape (symbols[token_translations[i]]->tag));
+ fputs (escape (symbols[token_translations[i]]->tag), out);
END_TEST (50);
sprintf (buffer, " (%d)", i);
for (j = 1; j <= nrules; j++)
END_TEST (50);
sprintf (buffer, " (%d)", i);
for (j = 1; j <= nrules; j++)
- fputs (escape (tags[i]), out);
- column = strlen (escape (tags[i]));
+ fputs (escape (symbols[i]->tag), out);
+ column = strlen (escape (symbols[i]->tag));
- if (rule_table[j].lhs == i)
- sprintf (buffer + strlen (buffer), " %d", j);
+ if (rules[j].lhs == i)
+ sprintf (buffer + strlen (buffer), " %d", j - 1);
sprintf (buffer + strlen (buffer), _(" on right:"));
for (j = 1; j <= nrules; j++)
{
sprintf (buffer + strlen (buffer), _(" on right:"));
for (j = 1; j <= nrules; j++)
{
only its kernel. Requires to run closure, which need memory
allocation/deallocation. */
if (trace_flag)
only its kernel. Requires to run closure, which need memory
allocation/deallocation. */
if (trace_flag)
/* Storage for print_reductions. */
shiftset = XCALLOC (unsigned, tokensetsize);
lookaheadset = XCALLOC (unsigned, tokensetsize);
for (i = 0; i < nstates; i++)
/* Storage for print_reductions. */
shiftset = XCALLOC (unsigned, tokensetsize);
lookaheadset = XCALLOC (unsigned, tokensetsize);
for (i = 0; i < nstates; i++)