`rules' starts at 1, not 0.
+2002-04-07 Akim Demaille <akim@epita.fr>
+
+ * src/output.c (output_rule_data): Fix various range errors:
+ `rules' starts at 1, not 0.
+
+
2002-04-07 Akim Demaille <akim@epita.fr>
Remove the useless rules from the parser.
2002-04-07 Akim Demaille <akim@epita.fr>
Remove the useless rules from the parser.
{
int i;
short *values = XCALLOC (short, nrules + 1);
{
int i;
short *values = XCALLOC (short, nrules + 1);
- for (i = 0; i < nrules + 1; ++i)
+ for (i = 1; i < nrules + 1; ++i)
values[i] = rules[i].rhs - ritem;
output_table_data (&format_obstack, values,
0, 1, nrules + 1);
values[i] = rules[i].rhs - ritem;
output_table_data (&format_obstack, values,
0, 1, nrules + 1);
{
short *values = XCALLOC (short, nrules + 1);
{
short *values = XCALLOC (short, nrules + 1);
- for (i = 0; i < nrules + 1; ++i)
+ for (i = 1; i < nrules + 1; ++i)
values[i] = rules[i].line;
output_table_data (&format_obstack, values,
0, 1, nrules + 1);
values[i] = rules[i].line;
output_table_data (&format_obstack, values,
0, 1, nrules + 1);
/* Output YYR1. */
{
short *values = XCALLOC (short, nrules + 1);
/* Output YYR1. */
{
short *values = XCALLOC (short, nrules + 1);
- for (i = 0; i < nrules + 1; ++i)
+ for (i = 1; i < nrules + 1; ++i)
values[i] = rules[i].lhs;
output_table_data (&format_obstack, values,
0, 1, nrules + 1);
values[i] = rules[i].lhs;
output_table_data (&format_obstack, values,
0, 1, nrules + 1);