/[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.72 by akim, Sun Jun 30 17:29:36 2002 UTC revision 1.73 by akim, Sun Jun 30 17:30:29 2002 UTC
# Line 163  set_goto_map (void) Line 163  set_goto_map (void)
163    ngotos = 0;    ngotos = 0;
164    for (state = 0; state < nstates; ++state)    for (state = 0; state < nstates; ++state)
165      {      {
166        shifts *sp = states[state]->shifts;        shifts_t *sp = states[state]->shifts;
167        int i;        int i;
168        for (i = sp->nshifts - 1; i >= 0 && SHIFT_IS_GOTO (sp, i); --i)        for (i = sp->nshifts - 1; i >= 0 && SHIFT_IS_GOTO (sp, i); --i)
169          {          {
# Line 196  set_goto_map (void) Line 196  set_goto_map (void)
196    
197    for (state = 0; state < nstates; ++state)    for (state = 0; state < nstates; ++state)
198      {      {
199        shifts *sp = states[state]->shifts;        shifts_t *sp = states[state]->shifts;
200        int i;        int i;
201        for (i = sp->nshifts - 1; i >= 0 && SHIFT_IS_GOTO (sp, i); --i)        for (i = sp->nshifts - 1; i >= 0 && SHIFT_IS_GOTO (sp, i); --i)
202          {          {
# Line 258  initialize_F (void) Line 258  initialize_F (void)
258    for (i = 0; i < ngotos; i++)    for (i = 0; i < ngotos; i++)
259      {      {
260        state_number_t stateno = to_state[i];        state_number_t stateno = to_state[i];
261        shifts *sp = states[stateno]->shifts;        shifts_t *sp = states[stateno]->shifts;
262    
263        int j;        int j;
264        for (j = 0; j < sp->nshifts && SHIFT_IS_SHIFT (sp, j); j++)        for (j = 0; j < sp->nshifts && SHIFT_IS_SHIFT (sp, j); j++)
# Line 420  build_relations (void) Line 420  build_relations (void)
420    
421            for (rp = rules[*rulep].rhs; *rp >= 0; rp++)            for (rp = rules[*rulep].rhs; *rp >= 0; rp++)
422              {              {
423                shifts *sp = state->shifts;                shifts_t *sp = state->shifts;
424                int j;                int j;
425                for (j = 0; j < sp->nshifts; j++)                for (j = 0; j < sp->nshifts; j++)
426                  {                  {
# Line 522  states_lookaheads_count (void) Line 522  states_lookaheads_count (void)
522        int k;        int k;
523        int nlookaheads = 0;        int nlookaheads = 0;
524        reductions *rp = states[i]->reductions;        reductions *rp = states[i]->reductions;
525        shifts *sp = states[i]->shifts;        shifts_t *sp = states[i]->shifts;
526    
527        /* We need a lookahead either to distinguish different        /* We need a lookahead either to distinguish different
528           reductions (i.e., there are two or more), or to distinguish a           reductions (i.e., there are two or more), or to distinguish a

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

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