94 |
/* See comments before new_itemsets. All the vectors of items |
/* See comments before new_itemsets. All the vectors of items |
95 |
live inside KERNEL_ITEMS. The number of active items after |
live inside KERNEL_ITEMS. The number of active items after |
96 |
some symbol cannot be more than the number of times that symbol |
some symbol cannot be more than the number of times that symbol |
97 |
appears as an item, which is symbol_count[symbol]. |
appears as an item, which is SYMBOL_COUNT[SYMBOL]. |
98 |
We allocate that much space for each symbol. */ |
We allocate that much space for each symbol. */ |
99 |
|
|
100 |
kernel_base = XCALLOC (item_number_t *, nsyms); |
kernel_base = XCALLOC (item_number_t *, nsyms); |
313 |
} |
} |
314 |
|
|
315 |
/* Make a reductions structure and copy the data into it. */ |
/* Make a reductions structure and copy the data into it. */ |
316 |
state->reductions = reductions_new (count); |
state_reductions_set (state, count, redset); |
|
memcpy (state->reductions->rules, redset, count * sizeof (redset[0])); |
|
317 |
} |
} |
318 |
|
|
319 |
|
|
339 |
if (!state->errs) |
if (!state->errs) |
340 |
state->errs = errs_new (0); |
state->errs = errs_new (0); |
341 |
if (!state->reductions) |
if (!state->reductions) |
342 |
state->reductions = reductions_new (0); |
state_reductions_set (state, 0, 0); |
343 |
|
|
344 |
states[state->number] = state; |
states[state->number] = state; |
345 |
|
|