summaryrefslogtreecommitdiff
path: root/src/LR0.c
diff options
context:
space:
mode:
authorAkim Demaille <akim@epita.fr>2002-06-30 17:30:46 +0000
committerAkim Demaille <akim@epita.fr>2002-06-30 17:30:46 +0000
commit8a731ca8296e54a6fb31eb42cead791baf6810e7 (patch)
tree9a08876768b5f85fe788d74e8d60e0854723d524 /src/LR0.c
parent32e1e0a4865d64946a5497aff057d7be28c1cc3d (diff)
downloadbison-8a731ca8296e54a6fb31eb42cead791baf6810e7.tar.gz
* src/LR0.c (save_reductions): Remove, replaced by...
* src/state.h, src/state.c (state_reductions_set): New. (reductions, errs): Rename as... (reductions_t, errs_t): these. Adjust all dependencies.
Diffstat (limited to 'src/LR0.c')
-rw-r--r--src/LR0.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/LR0.c b/src/LR0.c
index 27282bd1..d402d910 100644
--- a/src/LR0.c
+++ b/src/LR0.c
@@ -94,7 +94,7 @@ allocate_itemsets (void)
/* See comments before new_itemsets. All the vectors of items
live inside KERNEL_ITEMS. The number of active items after
some symbol cannot be more than the number of times that symbol
- appears as an item, which is symbol_count[symbol].
+ appears as an item, which is SYMBOL_COUNT[SYMBOL].
We allocate that much space for each symbol. */
kernel_base = XCALLOC (item_number_t *, nsyms);
@@ -313,8 +313,7 @@ save_reductions (state_t *state)
}
/* Make a reductions structure and copy the data into it. */
- state->reductions = reductions_new (count);
- memcpy (state->reductions->rules, redset, count * sizeof (redset[0]));
+ state_reductions_set (state, count, redset);
}
@@ -340,7 +339,7 @@ set_states (void)
if (!state->errs)
state->errs = errs_new (0);
if (!state->reductions)
- state->reductions = reductions_new (0);
+ state_reductions_set (state, 0, 0);
states[state->number] = state;