int i;
short *values = XCALLOC (short, nrules + 1);
for (i = 0; i < nrules + 1; ++i)
- values[i] = rules[i].rhs;
+ values[i] = rules[i].rhs - ritem;
output_table_data (&format_obstack, values,
0, 1, nrules + 1);
XFREE (values);
short_tab = XMALLOC (short, nrules + 1);
for (i = 1; i < nrules; i++)
short_tab[i] = rules[i + 1].rhs - rules[i].rhs - 1;
- short_tab[nrules] = nritems - rules[nrules].rhs - 1;
+ short_tab[nrules] = nritems - (rules[nrules].rhs - ritem) - 1;
output_table_data (&format_obstack, short_tab,
0, 1, nrules + 1);
muscle_insert ("r2", obstack_finish (&format_obstack));
if (number == SALIAS)
continue;
/* Skip error token. */
- if (symbol->value == error_token_number)
+ if (symbol->number == error_token_number)
continue;
if (symbol->tag[0] == '\'')
continue; /* skip literal character */
if (semantic_parser)
/* FIXME: This is probably wrong, and should be just as
above. --akim. */
- fprintf (out, "# define T%s\t%d\n", symbol->tag, symbol->value);
+ fprintf (out, "# define T%s\t%d\n", symbol->tag, symbol->number);
first = 0;
}
}