1 |
/* Find and resolve or report look-ahead conflicts for bison, |
/* Find and resolve or report look-ahead conflicts for bison, |
2 |
Copyright 1984, 1989, 1992, 2000, 2001, 2002 Free Software Foundation, Inc. |
Copyright (C) 1984, 1989, 1992, 2000, 2001, 2002 |
3 |
|
Free Software Foundation, Inc. |
4 |
|
|
5 |
This file is part of Bison, the GNU Compiler Compiler. |
This file is part of Bison, the GNU Compiler Compiler. |
6 |
|
|
98 |
{ |
{ |
99 |
int i; |
int i; |
100 |
/* find the rule to reduce by to get precedence of reduction */ |
/* find the rule to reduce by to get precedence of reduction */ |
101 |
int redprec = LArule[lookahead]->prec; |
int redprec = LArule[lookahead]->prec->prec; |
102 |
errs *errp = errs_new (ntokens + 1); |
errs *errp = errs_new (ntokens + 1); |
103 |
errp->nerrs = 0; |
errp->nerrs = 0; |
104 |
|
|
176 |
precedence */ |
precedence */ |
177 |
for (i = 0; i < state->nlookaheads; ++i) |
for (i = 0; i < state->nlookaheads; ++i) |
178 |
if (LArule[state->lookaheadsp + i]->prec |
if (LArule[state->lookaheadsp + i]->prec |
179 |
|
&& LArule[state->lookaheadsp + i]->prec->prec |
180 |
&& !bitset_disjoint_p (LA[state->lookaheadsp + i], lookaheadset)) |
&& !bitset_disjoint_p (LA[state->lookaheadsp + i], lookaheadset)) |
181 |
{ |
{ |
182 |
resolve_sr_conflict (state, state->lookaheadsp + i); |
resolve_sr_conflict (state, state->lookaheadsp + i); |