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

Diff of /bison/src/conflicts.c

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

revision 1.73 by akim, Sun Apr 7 17:41:43 2002 UTC revision 1.74 by akim, Sun Apr 7 17:42:31 2002 UTC
# Line 1  Line 1 
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    
# Line 97  resolve_sr_conflict (state_t *state, int Line 98  resolve_sr_conflict (state_t *state, int
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    
# Line 175  set_conflicts (state_t *state) Line 176  set_conflicts (state_t *state)
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);

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.74

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