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

Diff of /bison/src/lalr.c

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

revision 1.79 by akim, Sun Jun 30 17:33:37 2002 UTC revision 1.80 by akim, Sun Jun 30 17:34:31 2002 UTC
# Line 77  initialize_LA (void) Line 77  initialize_LA (void)
77    np = LArule;    np = LArule;
78    for (i = 0; i < nstates; i++)    for (i = 0; i < nstates; i++)
79      if (!states[i]->consistent)      if (!states[i]->consistent)
80        for (j = 0; j < states[i]->reductions->nreds; j++)        for (j = 0; j < states[i]->reductions->num; j++)
81          *np++ = &rules[states[i]->reductions->rules[j]];          *np++ = &rules[states[i]->reductions->rules[j]];
82  }  }
83    
# Line 366  states_lookaheads_count (void) Line 366  states_lookaheads_count (void)
366           reductions (i.e., there are two or more), or to distinguish a           reductions (i.e., there are two or more), or to distinguish a
367           reduction from a shift.  Otherwise, it is straightforward,           reduction from a shift.  Otherwise, it is straightforward,
368           and the state is `consistent'.  */           and the state is `consistent'.  */
369        if (rp->nreds > 1        if (rp->num > 1
370            || (rp->nreds == 1 && sp->num && TRANSITION_IS_SHIFT (sp, 0)))            || (rp->num == 1 && sp->num && TRANSITION_IS_SHIFT (sp, 0)))
371          nlookaheads += rp->nreds;          nlookaheads += rp->num;
372        else        else
373          states[i]->consistent = 1;          states[i]->consistent = 1;
374    

Legend:
Removed from v.1.79  
changed lines
  Added in v.1.80

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