497 |
for (i = 0; i < state->nlookaheads; i++) |
for (i = 0; i < state->nlookaheads; i++) |
498 |
{ |
{ |
499 |
int count = 0; |
int count = 0; |
500 |
rule_number_t rule = -state->lookaheads_rule[i]->number; |
rule_number_t rule = state->lookaheads_rule[i]->number; |
501 |
symbol_number_t j; |
symbol_number_t j; |
502 |
|
|
503 |
for (j = 0; j < ntokens; j++) |
for (j = 0; j < ntokens; j++) |
504 |
if (actrow[j] == rule) |
if (actrow[j] == -rule) |
505 |
count++; |
count++; |
506 |
|
|
507 |
if (count > max) |
if (count > max) |
521 |
{ |
{ |
522 |
int j; |
int j; |
523 |
for (j = 0; j < ntokens; j++) |
for (j = 0; j < ntokens; j++) |
524 |
if (actrow[j] == default_rule && ! (glr_parser && conflrow[j])) |
if (actrow[j] == -default_rule |
525 |
|
&& ! (glr_parser && conflrow[j])) |
526 |
actrow[j] = 0; |
actrow[j] = 0; |
527 |
} |
} |
|
default_rule = -default_rule; |
|
528 |
} |
} |
529 |
} |
} |
530 |
|
|