19 |
02111-1307, USA. */ |
02111-1307, USA. */ |
20 |
|
|
21 |
#include "system.h" |
#include "system.h" |
22 |
|
#include "getargs.h" |
23 |
#include "gram.h" |
#include "gram.h" |
24 |
#include "reader.h" |
#include "reader.h" |
25 |
#include "closure.h" |
#include "closure.h" |
40 |
/* number of words required to hold a bit for each variable */ |
/* number of words required to hold a bit for each variable */ |
41 |
static int varsetsize; |
static int varsetsize; |
42 |
|
|
|
#if TRACE |
|
43 |
|
|
44 |
/*-----------------. |
/*-----------------. |
45 |
| Debugging code. | |
| Debugging code. | |
97 |
fprintf (stderr, " %d\n", j); |
fprintf (stderr, " %d\n", j); |
98 |
} |
} |
99 |
} |
} |
|
#endif |
|
100 |
|
|
101 |
/*-------------------------------------------------------------------. |
/*-------------------------------------------------------------------. |
102 |
| Set FIRSTS to be an NVARS by NVARS bit matrix indicating which | |
| Set FIRSTS to be an NVARS by NVARS bit matrix indicating which | |
141 |
|
|
142 |
RTC (firsts, nvars); |
RTC (firsts, nvars); |
143 |
|
|
144 |
#ifdef TRACE |
if (trace_flag) |
145 |
print_firsts (); |
print_firsts (); |
|
#endif |
|
146 |
} |
} |
147 |
|
|
148 |
/*-------------------------------------------------------------------. |
/*-------------------------------------------------------------------. |
201 |
rrow += rulesetsize; |
rrow += rulesetsize; |
202 |
} |
} |
203 |
|
|
204 |
#ifdef TRACE |
if (trace_flag) |
205 |
print_fderives (); |
print_fderives (); |
|
#endif |
|
206 |
|
|
207 |
XFREE (firsts); |
XFREE (firsts); |
208 |
} |
} |
297 |
while (csp < csend) |
while (csp < csend) |
298 |
*itemsetend++ = *csp++; |
*itemsetend++ = *csp++; |
299 |
|
|
300 |
#if TRACE |
if (trace_flag) |
301 |
print_closure (n); |
print_closure (n); |
|
#endif |
|
302 |
} |
} |
303 |
|
|
304 |
|
|