[BACK]Return to lr0.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / yacc

Diff for /src/usr.bin/yacc/lr0.c between version 1.13 and 1.14

version 1.13, 2014/01/08 21:40:25 version 1.14, 2014/01/08 22:30:32
Line 343 
Line 343 
     iend = kernel_end[symbol];      iend = kernel_end[symbol];
     n = iend - isp1;      n = iend - isp1;
   
     p = (core *) allocate((unsigned) (sizeof(core) + (n - 1) * sizeof(short)));      p = allocate(sizeof(core) + (n - 1) * sizeof(short));
     p->accessing_symbol = symbol;      p->accessing_symbol = symbol;
     p->number = nstates;      p->number = nstates;
     p->nitems = n;      p->nitems = n;
Line 369 
Line 369 
     short *sp2;      short *sp2;
     short *send;      short *send;
   
     p = (shifts *) allocate((unsigned) (sizeof(shifts) +      p = allocate(sizeof(shifts) + (nshifts - 1) * sizeof(short));
                         (nshifts - 1) * sizeof(short)));  
   
     p->number = this_state->number;      p->number = this_state->number;
     p->nshifts = nshifts;      p->nshifts = nshifts;
Line 418 
Line 417 
   
     if (count)      if (count)
     {      {
         p = (reductions *) allocate((unsigned) (sizeof(reductions) +          p = allocate(sizeof(reductions) + (count - 1) * sizeof(short));
                                         (count - 1) * sizeof(short)));  
   
         p->number = this_state->number;          p->number = this_state->number;
         p->nreds = count;          p->nreds = count;

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14