]> git.saurik.com Git - bison.git/blobdiff - src/state.h
* src/state.h, src/state.c (errs_new, errs_dup): New.
[bison.git] / src / state.h
index d505565ac8d83c72131b11f923c5c97c484b6b3f..14017afedec657d3f4b67b1c6bfc713c226d39c4 100644 (file)
 
 typedef struct shifts
 {
-  struct shifts *next;
-  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
@@ -151,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));
 
 
 /*-------------.
@@ -191,7 +183,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;