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:
12
src/state.h
12
src/state.h
@@ -94,8 +94,8 @@
|
||||
| Numbering states. |
|
||||
`-------------------*/
|
||||
|
||||
typedef short int state_number;
|
||||
# define STATE_NUMBER_MAXIMUM SHRT_MAX
|
||||
typedef int state_number;
|
||||
# define STATE_NUMBER_MAXIMUM INT_MAX
|
||||
|
||||
/* Be ready to map a state_number to an int. */
|
||||
static inline int
|
||||
@@ -113,7 +113,7 @@ typedef struct state state;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
short int num;
|
||||
int num;
|
||||
state *states[1];
|
||||
} transitions;
|
||||
|
||||
@@ -171,7 +171,7 @@ struct state *transitions_to (transitions *shifts, symbol_number sym);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
short int num;
|
||||
int num;
|
||||
symbol *symbols[1];
|
||||
} errs;
|
||||
|
||||
@@ -184,7 +184,7 @@ errs *errs_new (int num, symbol **tokens);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
short int num;
|
||||
int num;
|
||||
bitset *look_ahead_tokens;
|
||||
rule *rules[1];
|
||||
} reductions;
|
||||
@@ -212,7 +212,7 @@ struct state
|
||||
|
||||
/* Its items. Must be last, since ITEMS can be arbitrarily large.
|
||||
*/
|
||||
unsigned short int nitems;
|
||||
size_t nitems;
|
||||
item_number items[1];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user