]> git.saurik.com Git - bison.git/blobdiff - src/state.h
* tests/regression.at (Web2c Actions): Blindly move the actual
[bison.git] / src / state.h
index f7244b4b17cd11d8f6805ba8ceb3eda1c4f7d93a..8cdf40400cce385f3ff7ecd9c07163bb922d7358 100644 (file)
 
 typedef struct shifts
 {
-  short number;
   short nshifts;
   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
@@ -150,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));
 
 
 /*-------------.
@@ -165,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));
 
 
 /*----------.
@@ -190,7 +180,9 @@ typedef struct state_s
   char consistent;
 
   /* Used in LALR, not LR(0). */
-  short lookaheads;
+  /* Pseudo pointer into LA. */
+  short lookaheadsp;
+  int nlookaheads;
 
   /* Its items. */
   short nitems;