-/* Type definitions for nondeterministic finite state machine for bison,
+/* Type definitions for nondeterministic finite state machine for Bison.
- Copyright (C) 1984, 1989, 2000, 2001, 2002 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1989, 2000, 2001, 2002, 2003, 2004 Free
+ Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
| Numbering states. |
`-------------------*/
-typedef short state_number;
+typedef short int state_number;
# define STATE_NUMBER_MAXIMUM SHRT_MAX
/* Be ready to map a state_number to an int. */
-# define state_number_as_int(Tok) ((int) (Tok))
+static inline int
+state_number_as_int (state_number s)
+{
+ return s;
+}
typedef struct state state;
typedef struct
{
- short num;
+ short int num;
state *states[1];
} transitions;
if (!TRANSITION_IS_DISABLED (Transitions, Iter))
-/* Return the state such SHIFTS contain a shift/goto to it on S.
+/* Return the state such SHIFTS contain a shift/goto to it on SYM.
Abort if none found. */
-struct state *transitions_to (transitions *shifts, symbol_number s);
+struct state *transitions_to (transitions *shifts, symbol_number sym);
/*-------.
typedef struct
{
- short num;
+ short int num;
symbol *symbols[1];
} errs;
typedef struct
{
- short num;
+ short int num;
bitset *lookaheads;
rule *rules[1];
} reductions;
/* Its items. Must be last, since ITEMS can be arbitrarily large.
*/
- unsigned short nitems;
+ unsigned short int nitems;
item_number items[1];
};