/* Type definitions for nondeterministic finite state machine for bison,
- Copyright (C) 1984, 1989, 2000 Free Software Foundation, Inc.
+ Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
}
core;
-
+#define CORE_ALLOC(Nitems) \
+ (core *) xcalloc ((unsigned) (sizeof (core) \
+ + (Nitems - 1) * sizeof (short)), 1)
typedef struct shifts
{
}
shifts;
+#define SHIFTS_ALLOC(Nshifts) \
+ (shifts *) xcalloc ((unsigned) (sizeof (shifts) \
+ + (Nshifts - 1) * sizeof (short)), 1)
typedef struct errs
}
errs;
+#define ERRS_ALLOC(Nerrs) \
+ (errs *) xcalloc ((unsigned) (sizeof (errs) \
+ + (Nerrs - 1) * sizeof (short)), 1)
+
typedef struct reductions
}
reductions;
-extern int nstates;
-extern core *first_state;
-extern shifts *first_shift;
-extern reductions *first_reduction;
+#define REDUCTIONS_ALLOC(Nreductions) \
+ (reductions *) xcalloc ((unsigned) (sizeof (reductions) \
+ + (Nreductions - 1) * sizeof (short)), 1)
#endif /* !STATE_H_ */