mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-26 12:43:03 +00:00
* src/lalr.c (build_relations): Rename states' as states1'.
Sorry, I don't understand exactly what it is, no better name...
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2001-12-29 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* src/lalr.c (build_relations): Rename `states' as `states1'.
|
||||||
|
Sorry, I don't understand exactly what it is, no better name...
|
||||||
|
|
||||||
|
|
||||||
2001-12-29 Akim Demaille <akim@epita.fr>
|
2001-12-29 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
|
* src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
|
||||||
|
|||||||
10
src/lalr.c
10
src/lalr.c
@@ -401,7 +401,7 @@ static void
|
|||||||
build_relations (void)
|
build_relations (void)
|
||||||
{
|
{
|
||||||
short *edge = XCALLOC (short, ngotos + 1);
|
short *edge = XCALLOC (short, ngotos + 1);
|
||||||
short *states = XCALLOC (short, ritem_longest_rhs () + 1);
|
short *states1 = XCALLOC (short, ritem_longest_rhs () + 1);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
includes = XCALLOC (short *, ngotos);
|
includes = XCALLOC (short *, ngotos);
|
||||||
@@ -418,7 +418,7 @@ build_relations (void)
|
|||||||
int length = 1;
|
int length = 1;
|
||||||
short *rp;
|
short *rp;
|
||||||
state_t *state = state_table[from_state[i]];
|
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++)
|
for (rp = &ritem[rules[*rulep].rhs]; *rp >= 0; rp++)
|
||||||
{
|
{
|
||||||
@@ -431,7 +431,7 @@ build_relations (void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
states[length++] = state->number;
|
states1[length++] = state->number;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!state->consistent)
|
if (!state->consistent)
|
||||||
@@ -446,7 +446,7 @@ build_relations (void)
|
|||||||
/* JF added rp>=ritem && I hope to god its right! */
|
/* JF added rp>=ritem && I hope to god its right! */
|
||||||
if (rp >= ritem && ISVAR (*rp))
|
if (rp >= ritem && ISVAR (*rp))
|
||||||
{
|
{
|
||||||
edge[nedges++] = map_goto (states[--length], *rp);
|
edge[nedges++] = map_goto (states1[--length], *rp);
|
||||||
if (nullable[*rp])
|
if (nullable[*rp])
|
||||||
done = 0;
|
done = 0;
|
||||||
}
|
}
|
||||||
@@ -464,7 +464,7 @@ build_relations (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
XFREE (edge);
|
XFREE (edge);
|
||||||
XFREE (states);
|
XFREE (states1);
|
||||||
|
|
||||||
includes = transpose (includes, ngotos);
|
includes = transpose (includes, ngotos);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user