mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
* src/closure.c (closure): b' and ruleno' denote the same value:
keep ruleno only.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2001-11-28 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* src/closure.c (closure): `b' and `ruleno' denote the same value:
|
||||||
|
keep ruleno only.
|
||||||
|
|
||||||
|
|
||||||
2001-11-28 Akim Demaille <akim@epita.fr>
|
2001-11-28 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/closure.c (closure): Instead of looping over word in array
|
* src/closure.c (closure): Instead of looping over word in array
|
||||||
|
|||||||
@@ -235,7 +235,6 @@ new_closure (int n)
|
|||||||
void
|
void
|
||||||
closure (short *core, int n)
|
closure (short *core, int n)
|
||||||
{
|
{
|
||||||
int ruleno;
|
|
||||||
/* Index over CORE. */
|
/* Index over CORE. */
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
@@ -243,7 +242,7 @@ closure (short *core, int n)
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
/* A bit index over RULESET. */
|
/* A bit index over RULESET. */
|
||||||
int b;
|
int ruleno;
|
||||||
|
|
||||||
if (trace_flag)
|
if (trace_flag)
|
||||||
{
|
{
|
||||||
@@ -269,26 +268,21 @@ closure (short *core, int n)
|
|||||||
ruleset[r] |= FDERIVES (ritem[core[c]])[r];
|
ruleset[r] |= FDERIVES (ritem[core[c]])[r];
|
||||||
}
|
}
|
||||||
|
|
||||||
ruleno = 0;
|
|
||||||
itemsetsize = 0;
|
itemsetsize = 0;
|
||||||
c = 0;
|
c = 0;
|
||||||
for (b = 0; b < rulesetsize * BITS_PER_WORD; ++b)
|
for (ruleno = 0; ruleno < rulesetsize * BITS_PER_WORD; ++ruleno)
|
||||||
{
|
if (BITISSET (ruleset, ruleno))
|
||||||
if (BITISSET (ruleset, b))
|
{
|
||||||
{
|
int itemno = rule_table[ruleno].rhs;
|
||||||
int itemno = rule_table[ruleno].rhs;
|
while (c < n && core[c] < itemno)
|
||||||
while (c < n && core[c] < itemno)
|
{
|
||||||
{
|
itemset[itemsetsize] = core[c];
|
||||||
itemset[itemsetsize] = core[c];
|
itemsetsize++;
|
||||||
itemsetsize++;
|
c++;
|
||||||
c++;
|
}
|
||||||
}
|
itemset[itemsetsize] = itemno;
|
||||||
itemset[itemsetsize] = itemno;
|
itemsetsize++;
|
||||||
itemsetsize++;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ruleno++;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (c < n)
|
while (c < n)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user