16 static unsigned *first_derives;
20 static void print_closure(
int n);
21 static void print_EFF(
void);
22 static void print_first_derives(
void);
43 for (rule = *sp; rule > 0; rule = *++sp)
84 rrow = first_derives +
ntokens * rulesetsize;
87 vrow = EFF + ((i -
ntokens) * varsetsize);
100 while ((rule = *rp++) >= 0)
112 print_first_derives();
138 for (rsp =
ruleset; rsp < rsend; rsp++)
142 for (csp = nucleus; csp < csend; ++csp)
144 symbol =
ritem[*csp];
147 dsp = first_derives + symbol * rulesetsize;
157 for (rsp =
ruleset; rsp < rsend; ++rsp)
166 itemno =
rrhs[ruleno+
i];
167 while (csp < csend && *csp < itemno)
170 while (csp < csend && *csp == itemno)
204 printf(
"\n\nn = %d\n\n", n);
218 printf(
"\n\nEpsilon Free Firsts\n");
227 for (j = 0; j <
nvars; k++, j++)
243 print_first_derives(
void)
251 printf(
"\n\n\nFirst Derives\n");
258 for (j = 0; j <=
nrules; k++, j++)
266 if (cword & (1 << k))
void set_first_derives(void)
void reflexive_transitive_closure(unsigned int *R, int n)
void finalize_closure(void)
void closure(short int *nucleus, int n)