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) |
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 |
} |
} |
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; |