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

Diff of /bison/src/reduce.c

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

revision 1.50 by akim, Sun Apr 7 17:38:22 2002 UTC revision 1.51 by akim, Sun Apr 7 17:41:08 2002 UTC
# Line 248  reduce_grammar_tables (void) Line 248  reduce_grammar_tables (void)
248      free (rules + 1);      free (rules + 1);
249      rules = rules_sorted;      rules = rules_sorted;
250    
251      /* Also reorder ritems. */      /* Renumber the rules markers in RITEMS.  */
252      {      for (i = 1; i < nrules + 1; ++i)
253        short *ritems_sorted = XCALLOC (short, nitems + 1);        {
254        short *ritemsp = ritems_sorted;          short *rhsp = rules[i].rhs;
255        for (i = 1; i < nrules + 1; ++i)          for (/* Nothing. */; *rhsp >= 0; ++rhsp)
256          {            /* Nothing. */;
257            short *rhsp = rules[i].rhs;          *rhsp = -i;
258            rules[i].rhs = ritemsp;        }
           for (/* Nothing. */; *rhsp >= 0; ++rhsp)  
             *ritemsp++ = *rhsp;  
           *ritemsp++ = -i;  
         }  
       *ritemsp++ = 0;  
       free (ritem);  
       ritem = ritems_sorted;  
     }  
259      nrules -= nuseless_productions;      nrules -= nuseless_productions;
260    }    }
261    

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51

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