/[bison]/bison/src/LR0.c
ViewVC logotype

Diff of /bison/src/LR0.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.72 by akim, Sun Jun 30 17:30:29 2002 UTC revision 1.73 by akim, Sun Jun 30 17:30:46 2002 UTC
# Line 94  allocate_itemsets (void) Line 94  allocate_itemsets (void)
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);
# Line 313  save_reductions (state_t *state) Line 313  save_reductions (state_t *state)
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    
# Line 340  set_states (void) Line 339  set_states (void)
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    

Legend:
Removed from v.1.72  
changed lines
  Added in v.1.73

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26