mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 06:43:03 +00:00
Remove uses of 'short int' and 'unsigned short int' in the parser generators.
* src/LR0.c (allocate_itemsets, new_itemsets, save_reductions): Use size_t, not int or short int, to count objects. * src/closure.c (nritemset, closure): Likewise. * src/closure.h (nritemset, closure): Likewise. * src/nullable.c (nullable_compute): Likewise. * src/print.c (print_core): Likewise. * src/print_graph.c (print_core): Likewise. * src/state.c (state_compare, state_hash): Likewise. * src/state.h (struct state): Likewise. * src/tables.c (default_goto, goto_actions): Likewise. * src/gram.h (rule_number, rule): Use int, not short int. * src/output.c (prepare_rules): Likewise. * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions, errs, reductions): Likewise. * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol): Likewise. * src/tables.c (vector_number, tally, action_number, ACTION_NUMBER_MINIMUM): Likewise. * src/output.c (muscle_insert_short_int_table): Remove.
This commit is contained in:
@@ -106,7 +106,6 @@ Name (const char *name, \
|
||||
|
||||
GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_unsigned_int_table, unsigned int)
|
||||
GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_int_table, int)
|
||||
GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_short_int_table, short int)
|
||||
GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_base_table, base_number)
|
||||
GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_rule_number_table, rule_number)
|
||||
GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_symbol_number_table, symbol_number)
|
||||
@@ -217,8 +216,8 @@ prepare_rules (void)
|
||||
unsigned int *rline = xnmalloc (nrules, sizeof *rline);
|
||||
symbol_number *r1 = xnmalloc (nrules, sizeof *r1);
|
||||
unsigned int *r2 = xnmalloc (nrules, sizeof *r2);
|
||||
short int *dprec = xnmalloc (nrules, sizeof *dprec);
|
||||
short int *merger = xnmalloc (nrules, sizeof *merger);
|
||||
int *dprec = xnmalloc (nrules, sizeof *dprec);
|
||||
int *merger = xnmalloc (nrules, sizeof *merger);
|
||||
|
||||
for (r = 0; r < nrules; ++r)
|
||||
{
|
||||
@@ -249,8 +248,8 @@ prepare_rules (void)
|
||||
muscle_insert_unsigned_int_table ("rline", rline, 0, 0, nrules);
|
||||
muscle_insert_symbol_number_table ("r1", r1, 0, 0, nrules);
|
||||
muscle_insert_unsigned_int_table ("r2", r2, 0, 0, nrules);
|
||||
muscle_insert_short_int_table ("dprec", dprec, 0, 0, nrules);
|
||||
muscle_insert_short_int_table ("merger", merger, 0, 0, nrules);
|
||||
muscle_insert_int_table ("dprec", dprec, 0, 0, nrules);
|
||||
muscle_insert_int_table ("merger", merger, 0, 0, nrules);
|
||||
|
||||
MUSCLE_INSERT_INT ("rules_number", nrules);
|
||||
MUSCLE_INSERT_INT ("max_left_semantic_context", max_left_semantic_context);
|
||||
|
||||
Reference in New Issue
Block a user