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

Diff of /bison/src/print.c

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

revision 1.72 by akim, Sat Jun 15 18:24:25 2002 UTC revision 1.73 by akim, Sun Jun 30 17:27:34 2002 UTC
# Line 113  print_shifts (FILE *out, state_t *state) Line 113  print_shifts (FILE *out, state_t *state)
113    for (i = 0; i < shiftp->nshifts && SHIFT_IS_SHIFT (shiftp, i); i++)    for (i = 0; i < shiftp->nshifts && SHIFT_IS_SHIFT (shiftp, i); i++)
114      if (!SHIFT_IS_DISABLED (shiftp, i))      if (!SHIFT_IS_DISABLED (shiftp, i))
115        {        {
116          int state1 = shiftp->shifts[i];          state_number_t state1 = shiftp->shifts[i];
117          symbol_number_t symbol = states[state1]->accessing_symbol;          symbol_number_t symbol = states[state1]->accessing_symbol;
118          fprintf (out,          fprintf (out,
119                   _("    %-4s\tshift, and go to state %d\n"),                   _("    %-4s\tshift, and go to state %d\n"),
# Line 155  print_gotos (FILE *out, state_t *state) Line 155  print_gotos (FILE *out, state_t *state)
155        for (; i < shiftp->nshifts; i++)        for (; i < shiftp->nshifts; i++)
156          if (!SHIFT_IS_DISABLED (shiftp, i))          if (!SHIFT_IS_DISABLED (shiftp, i))
157            {            {
158              int state1 = shiftp->shifts[i];              state_number_t state1 = shiftp->shifts[i];
159              symbol_number_t symbol = states[state1]->accessing_symbol;              symbol_number_t symbol = states[state1]->accessing_symbol;
160              fprintf (out, _("    %-4s\tgo to state %d\n"),              fprintf (out, _("    %-4s\tgo to state %d\n"),
161                       symbol_tag_get (symbols[symbol]), state1);                       symbol_tag_get (symbols[symbol]), state1);
# Line 309  print_actions (FILE *out, state_t *state Line 309  print_actions (FILE *out, state_t *state
309    
310    if (shiftp->nshifts == 0 && redp->nreds == 0)    if (shiftp->nshifts == 0 && redp->nreds == 0)
311      {      {
312        if (final_state == state->number)        if (state->number == final_state->number)
313         fprintf (out, _("    $default\taccept\n"));         fprintf (out, _("    $default\taccept\n"));
314        else        else
315         fprintf (out, _("    NO ACTIONS\n"));         fprintf (out, _("    NO ACTIONS\n"));
# Line 449  print_grammar (FILE *out) Line 449  print_grammar (FILE *out)
449  void  void
450  print_results (void)  print_results (void)
451  {  {
452    size_t i;    state_number_t i;
453    
454    /* We used to use just .out if SPEC_NAME_PREFIX (-p) was used, but    /* We used to use just .out if SPEC_NAME_PREFIX (-p) was used, but
455       that conflicts with Posix.  */       that conflicts with Posix.  */

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