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

Diff of /bison/src/print_graph.c

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

revision 1.20 by akim, Thu Dec 27 18:05:05 2001 UTC revision 1.21 by akim, Thu Dec 27 18:10:16 2001 UTC
# Line 91  print_actions (state_t *state, const cha Line 91  print_actions (state_t *state, const cha
91    
92    shifts   *shiftp = state->shifts;    shifts   *shiftp = state->shifts;
93    reductions *redp = state->reductions;    reductions *redp = state->reductions;
 #if 0  
   errs       *errp = state->errs;  
 #endif  
94    
95    static char buff[10];    static char buff[10];
96    edge_t edge;    edge_t edge;
97    
98    if (!shiftp->nshifts && !redp)    if (!shiftp->nshifts && !redp)
99      {      return;
 #if 0  
       if (final_state == state)  
         obstack_sgrow (node_obstack, "$default: accept");  
       else  
         obstack_sgrow (node_obstack, "NO ACTIONS");  
 #endif  
       return;  
     }  
100    
101    for (i = 0; i < shiftp->nshifts; i++)    for (i = 0; i < shiftp->nshifts; i++)
102      if (!SHIFT_IS_DISABLED (shiftp, i))      if (!SHIFT_IS_DISABLED (shiftp, i))
# Line 130  print_actions (state_t *state, const cha Line 119  print_actions (state_t *state, const cha
119          output_edge (&edge, fgraph);          output_edge (&edge, fgraph);
120          close_edge (fgraph);          close_edge (fgraph);
121        }        }
   
 #if 0  
   if (errp)  
     {  
       int j, nerrs;  
   
       nerrs = errp->nerrs;  
   
       for (j = 0; j < nerrs; j++)  
         {  
           if (!errp->errs[j])  
             continue;  
           symbol = errp->errs[j];  
           /* If something has been added in the NODE_OBSTACK after  
              the declaration of the label, then we need a `\n'.  
           if (obstack_object_size (node_obstack) > node_output_size)  
             obstack_sgrow (node_obstack, "\n");  
             */  
           obstack_fgrow1 (node_obstack, _("%-4s\terror (nonassociative)"),  
                           tags[symbol]);  
         }  
       if (j > 0)  
         obstack_1grow (node_obstack, '\n');  
     }  
   
   if (state->consistent && redp)  
     {  
       rule = redp->rules[0];  
       symbol = rule_table[rule].lhs;  
       /*  
       if (obstack_object_size (node_obstack) > node_output_size)  
         obstack_sgrow (node_obstack, "\n");  
         */  
       obstack_fgrow2 (node_obstack, _("$default\treduce using rule %d (%s)"),  
                       rule, tags[symbol]);  
     }  
 #endif  
122  }  }
123    
124    

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

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