bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

18-fyi-states-to-states1.patch


From: Akim Demaille
Subject: 18-fyi-states-to-states1.patch
Date: Sat, 29 Dec 2001 15:14:43 +0100

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * src/lalr.c (build_relations): Rename `states' as `states1'.
        Sorry, I don't understand exactly what it is, no better name...
        
        
Index: src/lalr.c
--- src/lalr.c Fri, 28 Dec 2001 16:41:48 +0100 akim
+++ src/lalr.c Fri, 28 Dec 2001 16:43:34 +0100 akim
@@ -401,7 +401,7 @@
 build_relations (void)
 {
   short *edge = XCALLOC (short, ngotos + 1);
-  short *states = XCALLOC (short, ritem_longest_rhs () + 1);
+  short *states1 = XCALLOC (short, ritem_longest_rhs () + 1);
   int i;
 
   includes = XCALLOC (short *, ngotos);
@@ -418,7 +418,7 @@
          int length = 1;
          short *rp;
          state_t *state = state_table[from_state[i]];
-         states[0] = state->number;
+         states1[0] = state->number;
 
          for (rp = &ritem[rules[*rulep].rhs]; *rp >= 0; rp++)
            {
@@ -431,7 +431,7 @@
                    break;
                }
 
-             states[length++] = state->number;
+             states1[length++] = state->number;
            }
 
          if (!state->consistent)
@@ -446,7 +446,7 @@
              /* JF added rp>=ritem &&   I hope to god its right! */
              if (rp >= ritem && ISVAR (*rp))
                {
-                 edge[nedges++] = map_goto (states[--length], *rp);
+                 edge[nedges++] = map_goto (states1[--length], *rp);
                  if (nullable[*rp])
                    done = 0;
                }
@@ -464,7 +464,7 @@
     }
 
   XFREE (edge);
-  XFREE (states);
+  XFREE (states1);
 
   includes = transpose (includes, ngotos);
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]