/[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.22.2.10 by akim, Mon Nov 19 09:10:30 2001 UTC revision 1.22.2.11 by akim, Mon Nov 19 09:10:47 2001 UTC
# Line 210  set_conflicts (int state) Line 210  set_conflicts (int state)
210          }          }
211      }      }
212    
213    k = lookaheads[state + 1];    k = state_table[state + 1].lookaheads;
214    fp4 = lookaheadset + tokensetsize;    fp4 = lookaheadset + tokensetsize;
215    
216    /* Loop over all rules which require lookahead in this state.  First    /* Loop over all rules which require lookahead in this state.  First
217       check for shift-reduce conflict, and try to resolve using       check for shift-reduce conflict, and try to resolve using
218       precedence */       precedence */
219    for (i = lookaheads[state]; i < k; i++)    for (i = state_table[state].lookaheads; i < k; i++)
220      if (rprec[LAruleno[i]])      if (rprec[LAruleno[i]])
221        {        {
222          fp1 = LA + i * tokensetsize;          fp1 = LA + i * tokensetsize;
# Line 236  set_conflicts (int state) Line 236  set_conflicts (int state)
236    
237    /* Loop over all rules which require lookahead in this state.  Check    /* Loop over all rules which require lookahead in this state.  Check
238       for conflicts not resolved above.  */       for conflicts not resolved above.  */
239    for (i = lookaheads[state]; i < k; i++)    for (i = state_table[state].lookaheads; i < k; i++)
240      {      {
241        fp1 = LA + i * tokensetsize;        fp1 = LA + i * tokensetsize;
242        fp2 = fp1;        fp2 = fp1;
# Line 309  count_sr_conflicts (int state) Line 309  count_sr_conflicts (int state)
309        SETBIT (shiftset, symbol);        SETBIT (shiftset, symbol);
310      }      }
311    
312    k = lookaheads[state + 1];    k = state_table[state + 1].lookaheads;
313    fp3 = lookaheadset + tokensetsize;    fp3 = lookaheadset + tokensetsize;
314    
315    for (i = lookaheads[state]; i < k; i++)    for (i = state_table[state].lookaheads; i < k; i++)
316      {      {
317        fp1 = LA + i * tokensetsize;        fp1 = LA + i * tokensetsize;
318        fp2 = lookaheadset;        fp2 = lookaheadset;
# Line 359  count_rr_conflicts (int state) Line 359  count_rr_conflicts (int state)
359    
360    int rrc_count = 0;    int rrc_count = 0;
361    
362    int m = lookaheads[state];    int m = state_table[state].lookaheads;
363    int n = lookaheads[state + 1];    int n = state_table[state + 1].lookaheads;
364    
365    if (n - m < 2)    if (n - m < 2)
366      return 0;      return 0;
# Line 565  print_reductions (FILE *out, int state) Line 565  print_reductions (FILE *out, int state)
565          }          }
566      }      }
567    
568    m = lookaheads[state];    m = state_table[state].lookaheads;
569    n = lookaheads[state + 1];    n = state_table[state + 1].lookaheads;
570    
571    if (n - m == 1 && !nodefault)    if (n - m == 1 && !nodefault)
572      {      {

Legend:
Removed from v.1.22.2.10  
changed lines
  Added in v.1.22.2.11

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