X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/3877f72ba22f370554165fd4fde836979f8768d5..e9f87b5b7df2e328d2e4196d276c0d96594c906b:/src/state.h diff --git a/src/state.h b/src/state.h index a31af20b..c2d66f3f 100644 --- a/src/state.h +++ b/src/state.h @@ -99,12 +99,7 @@ typedef struct shifts short shifts[1]; } shifts; - -#define SHIFTS_ALLOC(Nshifts) \ - (shifts *) xcalloc ((unsigned) (sizeof (shifts) \ - + (Nshifts - 1) * sizeof (short)), 1) - -shifts * shifts_new PARAMS ((int n)); +shifts *shifts_new PARAMS ((int n)); /* What is the symbol which is shifted by SHIFTS->shifts[Shift]? Can @@ -112,7 +107,7 @@ shifts * shifts_new PARAMS ((int n)); case of gotos. */ #define SHIFT_SYMBOL(Shifts, Shift) \ - (state_table[Shifts->shifts[Shift]]->accessing_symbol) + (states[Shifts->shifts[Shift]]->accessing_symbol) /* Is the SHIFTS->shifts[Shift] a real shift? (as opposed to gotos.) */ @@ -149,9 +144,8 @@ typedef struct errs short errs[1]; } errs; -#define ERRS_ALLOC(Nerrs) \ - (errs *) xcalloc ((unsigned) (sizeof (errs) \ - + (Nerrs - 1) * sizeof (short)), 1) +errs *errs_new PARAMS ((int n)); +errs *errs_dup PARAMS ((errs *src)); /*-------------. @@ -164,10 +158,7 @@ typedef struct reductions short rules[1]; } reductions; -#define REDUCTIONS_ALLOC(Nreductions) \ - (reductions *) xcalloc ((unsigned) (sizeof (reductions) \ - + (Nreductions - 1) * sizeof (short)), 1) - +reductions *reductions_new PARAMS ((int n)); /*----------.