mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 23: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
@@ -126,7 +126,7 @@ state *final_state = NULL;
|
||||
|
||||
state *
|
||||
state_new (symbol_number accessing_symbol,
|
||||
size_t nitems, item_number *core)
|
||||
size_t nitems, item_index *core)
|
||||
{
|
||||
aver (nstates < STATE_NUMBER_MAXIMUM);
|
||||
|
||||
@@ -395,7 +395,7 @@ state_hash_insert (state *s)
|
||||
`------------------------------------------------------------------*/
|
||||
|
||||
state *
|
||||
state_hash_lookup (size_t nitems, item_number *core)
|
||||
state_hash_lookup (size_t nitems, item_index *core)
|
||||
{
|
||||
size_t items_size = nitems * sizeof *core;
|
||||
state *probe = xmalloc (offsetof (state, items) + items_size);
|
||||
|
||||
Reference in New Issue
Block a user