mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 01:33:03 +00:00
style: decouple different uses of item_number
item_number is used for elements of ritem as well as indices into ritem which is fairly confusing. Introduce item_index to represent indices into ritem. * src/gram.h (item_index): Introduce it for ritem indices. * src/closure.h, src/closure.c, src/ielr.c, src/lr0.c, * src/print-graph.c, src/state.h, src/state.h: Replace uses of item_number with item_index where appropriate.
This commit is contained in:
committed by
Akim Demaille
parent
dd878d1851
commit
6a1a681fd2
@@ -230,7 +230,7 @@ ielr_compute_follow_kernel_items (bitset ritem_sees_lookahead_set,
|
||||
for (goto_number i = 0; i < ngotos; ++i)
|
||||
{
|
||||
size_t nitems = states[from_state[i]]->nitems;
|
||||
item_number *items = states[from_state[i]]->items;
|
||||
item_index *items = states[from_state[i]]->items;
|
||||
for (size_t j = 0; j < nitems; ++j)
|
||||
/* If this item has this goto and if all subsequent symbols in this
|
||||
RHS (if any) are nullable nonterminals, then record this item as
|
||||
|
||||
Reference in New Issue
Block a user