mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 14:23:04 +00:00
* src/LR0.c (generate_states): Use nritems, not nitems, nor using
the 0-sentinel. * src/gram.c (ritem_longest_rhs): Likewise. * src/reduce.c (nonterminals_reduce): Likewise. * src/print_graph.c (print_graph): Likewise. * src/output.c (output_rule_data): Likewise. * src/nullable.c (set_nullable): Likewise.
This commit is contained in:
@@ -78,14 +78,14 @@ ritem_print (FILE *out)
|
||||
size_t
|
||||
ritem_longest_rhs (void)
|
||||
{
|
||||
short *itemp;
|
||||
int length;
|
||||
int max;
|
||||
int i;
|
||||
|
||||
length = 0;
|
||||
max = 0;
|
||||
for (itemp = ritem; *itemp; itemp++)
|
||||
if (*itemp > 0)
|
||||
for (i = 0; i < nritems; ++i)
|
||||
if (ritem[i] >= 0)
|
||||
{
|
||||
length++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user