/[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.24 by akim, Mon Nov 19 10:38:53 2001 UTC revision 1.25 by akim, Mon Nov 19 10:39:07 2001 UTC
# Line 150  new_itemsets (void) Line 150  new_itemsets (void)
150    
151    shiftcount = 0;    shiftcount = 0;
152    
153    for (i = 0; i < itemsetend - itemset; ++i)    for (i = 0; i < itemsetsize; ++i)
154      {      {
155        int symbol = ritem[itemset[i]];        int symbol = ritem[itemset[i]];
156        if (symbol > 0)        if (symbol > 0)
# Line 544  augment_automaton (void) Line 544  augment_automaton (void)
544  static void  static void
545  save_reductions (void)  save_reductions (void)
546  {  {
   short *isp;  
   int item;  
547    int count;    int count;
548    reductions *p;    int i;
   
   short *rend;  
549    
550    /* Find and count the active items that represent ends of rules. */    /* Find and count the active items that represent ends of rules. */
551    
552    count = 0;    count = 0;
553    for (isp = itemset; isp < itemsetend; isp++)    for (i = 0; i < itemsetsize; ++i)
554      {      {
555        item = ritem[*isp];        int item = ritem[itemset[i]];
556        if (item < 0)        if (item < 0)
557          redset[count++] = -item;          redset[count++] = -item;
558      }      }
# Line 565  save_reductions (void) Line 561  save_reductions (void)
561    
562    if (count)    if (count)
563      {      {
564        p = REDUCTIONS_ALLOC (count);        reductions *p = REDUCTIONS_ALLOC (count);
565    
566        p->number = this_state->number;        p->number = this_state->number;
567        p->nreds = count;        p->nreds = count;

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

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