+2002-03-04 Akim Demaille <akim@epita.fr>
+
+ * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
+ * src/reduce.c: Remove the `bitset_zero's following the
+ `bitset_create's, as now it is performed by the latter.
+
+
2002-03-04 Akim Demaille <akim@epita.fr>
* lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
for (i = ntokens; i < nsyms; i++)
{
FIRSTS (i) = bitset_create (nvars, BITSET_FIXED);
- bitset_zero (FIRSTS (i));
for (j = 0; derives[i][j] >= 0; ++j)
{
int symbol = ritem[rules[derives[i][j]].rhs];
fderives = XCALLOC (bitset, nvars);
bitset_stats_init ();
for (i = 0 ; i < nvars; ++i)
- {
- fderives[i] = bitset_create (nrules + 1, BITSET_FIXED);
- bitset_zero (fderives[i]);
- }
+ fderives[i] = bitset_create (nrules + 1, BITSET_FIXED);
set_firsts ();
itemset = XCALLOC (short, n);
ruleset = bitset_create (nrules + 1, BITSET_FIXED);
- bitset_zero (ruleset);
set_fderives ();
}
conflicts = XCALLOC (char, nstates);
shiftset = bitset_create (ntokens, BITSET_FIXED);
- bitset_zero (shiftset);
lookaheadset = bitset_create (ntokens, BITSET_FIXED);
- bitset_zero (lookaheadset);
for (i = 0; i < nstates; i++)
set_conflicts (states[i]);
LA = XCALLOC (bitset, nLA);
for (i = 0; i < nLA; ++i)
- {
- LA[i] = bitset_create (ntokens, BITSET_FIXED);
- bitset_zero (LA[i]);
- }
+ LA[i] = bitset_create (ntokens, BITSET_FIXED);
LAruleno = XCALLOC (short, nLA);
lookback = XCALLOC (shorts *, nLA);
F = XCALLOC (bitset, ngotos);
for (i = 0; i < ngotos; ++i)
- {
- F[i] = bitset_create (ntokens, BITSET_FIXED);
- bitset_zero (F[i]);
- }
+ F[i] = bitset_create (ntokens, BITSET_FIXED);
for (i = 0; i < ngotos; i++)
{
new_closure (nritems);
/* Storage for print_reductions. */
shiftset = bitset_create (ntokens, BITSET_FIXED);
- bitset_zero (shiftset);
lookaheadset = bitset_create (ntokens, BITSET_FIXED);
- bitset_zero (lookaheadset);
for (i = 0; i < nstates; i++)
print_state (out, states[i]);
bitset_free (shiftset);
set of all productions which have a RHS all in N. */
Np = bitset_create (nvars, BITSET_FIXED);
- bitset_zero (Np);
/* The set being computed is a set of nonterminals which can derive
user can know. */
Vp = bitset_create (nsyms, BITSET_FIXED);
- bitset_zero (Vp);
Pp = bitset_create (nrules + 1, BITSET_FIXED);
- bitset_zero (Pp);
/* If the start symbol isn't useful, then nothing will be useful. */
if (bitset_test (N, start_symbol - ntokens))
/* Allocate the global sets used to compute the reduced grammar */
N = bitset_create (nvars, BITSET_FIXED);
- bitset_zero (N);
P = bitset_create (nrules + 1, BITSET_FIXED);
- bitset_zero (P);
V = bitset_create (nsyms, BITSET_FIXED);
- bitset_zero (V);
V1 = bitset_create (nsyms, BITSET_FIXED);
- bitset_zero (V1);
useless_nonterminals ();
inaccessable_symbols ();