]> git.saurik.com Git - bison.git/commitdiff
* src/gram.c, src/gram.h (sprec, sassoc): Remove.
authorAkim Demaille <akim@epita.fr>
Sat, 29 Dec 2001 14:19:13 +0000 (14:19 +0000)
committerAkim Demaille <akim@epita.fr>
Sat, 29 Dec 2001 14:19:13 +0000 (14:19 +0000)
Adjust all users to use symbols[i]->prec or ->assoc.

ChangeLog
src/conflicts.c
src/gram.c
src/gram.h
src/reader.c

index d1da8f2c3dac094032600968ec4b6020bae77985..849440c381bced541157befe8f99db112a568e0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-12-29  Akim Demaille  <akim@epita.fr>
+
+       * src/gram.c, src/gram.h (sprec, sassoc): Remove.
+       Adjust all users to use symbols[i]->prec or ->assoc.
+
+       
 2001-12-29  Akim Demaille  <akim@epita.fr>
 
        * src/reader.c, src/reader.h (tags): Remove.
 2001-12-29  Akim Demaille  <akim@epita.fr>
 
        * src/reader.c, src/reader.h (tags): Remove.
index 05f37bd1849d0b7f7a1d50bd16b06b7fa97cf33a..2dc1cc5cb30c16dea43bac7a7ff9443f8e22714e 100644 (file)
@@ -122,7 +122,7 @@ resolve_sr_conflict (state_t *state, int lookahead)
             For right association, keep only the shift.
             For nonassociation, keep neither.  */
 
             For right association, keep only the shift.
             For nonassociation, keep neither.  */
 
-         switch (sassoc[i])
+         switch (symbols[i]->assoc)
            {
            case right_assoc:
              log_resolution (state, lookahead, i, _("shift"));
            {
            case right_assoc:
              log_resolution (state, lookahead, i, _("shift"));
index c901c0be7071357703a01918b28dfb50be400300..adc0e203306af47652245bcc95f1f5b97cd65a51 100644 (file)
@@ -38,11 +38,9 @@ int nritems;
 rule_t *rule_table = NULL;
 short *rprec = NULL;
 short *rprecsym = NULL;
 rule_t *rule_table = NULL;
 short *rprec = NULL;
 short *rprecsym = NULL;
+short *rassoc = NULL;
 
 struct bucket **symbols = NULL;
 
 struct bucket **symbols = NULL;
-short *sprec = NULL;
-short *rassoc = NULL;
-short *sassoc = NULL;
 short *token_translations = NULL;
 
 int start_symbol;
 short *token_translations = NULL;
 
 int start_symbol;
index b8d1c93bb81fea61eff14b1898f76bfa22389235..bf49c4029eea11b09ea4932f0e32ed17dda1bbe0 100644 (file)
@@ -78,7 +78,7 @@
    Item numbers are used in the finite state machine to represent
    places that parsing can get to.
 
    Item numbers are used in the finite state machine to represent
    places that parsing can get to.
 
-   SPREC records the precedence level of each symbol.
+   SYMBOLS[I]->PREC records the precedence level of each symbol.
 
    Precedence levels are assigned in increasing order starting with 1
    so that numerically higher precedence values mean tighter binding
 
    Precedence levels are assigned in increasing order starting with 1
    so that numerically higher precedence values mean tighter binding
@@ -100,9 +100,6 @@ extern int nvars;
 extern short *ritem;
 extern int nritems;
 
 extern short *ritem;
 extern int nritems;
 
-extern short *sprec;
-extern short *sassoc;
-
 extern int start_symbol;
 
 /* associativity values in elements of rassoc, sassoc.  */
 extern int start_symbol;
 
 /* associativity values in elements of rassoc, sassoc.  */
index 45b3eb73afd93e032ae07d78e1bb98b660756422..cff0f9119a9078837b7222c1ca57273170ea487f 100644 (file)
@@ -1570,8 +1570,6 @@ packsymbols (void)
   user_toknums = XCALLOC (short, nsyms + 1);
   symbols = XCALLOC (bucket *, nsyms);
 
   user_toknums = XCALLOC (short, nsyms + 1);
   symbols = XCALLOC (bucket *, nsyms);
 
-  sassoc = XCALLOC (short, nsyms);
-
   max_user_token_number = 256;
   last_user_token_number = 256;
 
   max_user_token_number = 256;
   last_user_token_number = 256;
 
@@ -1643,7 +1641,6 @@ packsymbols (void)
 
       symbols[bp->value] = bp;
       user_toknums[bp->value] = bp->user_token_number;
 
       symbols[bp->value] = bp;
       user_toknums[bp->value] = bp->user_token_number;
-      sassoc[bp->value] = bp->assoc;
     }
 
   token_translations_init ();
     }
 
   token_translations_init ();