/[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.34 by akim, Wed Dec 5 09:44:26 2001 UTC revision 1.35 by akim, Mon Dec 10 08:45:22 2001 UTC
# Line 49  static void Line 49  static void
49  print_core (FILE *out, int state)  print_core (FILE *out, int state)
50  {  {
51    int i;    int i;
52    short *sitems = state_table[state].state->items;    short *sitems = state_table[state]->items;
53    int snitems   = state_table[state].state->nitems;    int snitems   = state_table[state]->nitems;
54    
55    /* New experimental feature: if TRACE_FLAGS output all the items of    /* New experimental feature: if TRACE_FLAGS output all the items of
56       a state, not only its kernel.  */       a state, not only its kernel.  */
# Line 98  print_actions (FILE *out, int state) Line 98  print_actions (FILE *out, int state)
98  {  {
99    int i;    int i;
100    
101    shifts   *shiftp = state_table[state].shifts;    shifts   *shiftp = state_table[state]->shifts;
102    reductions *redp = state_table[state].reductions;    reductions *redp = state_table[state]->reductions;
103    errs       *errp = state_table[state].errs;    errs       *errp = state_table[state]->errs;
104    
105    if (!shiftp->nshifts && !redp)    if (!shiftp->nshifts && !redp)
106      {      {
# Line 115  print_actions (FILE *out, int state) Line 115  print_actions (FILE *out, int state)
115      if (!SHIFT_IS_DISABLED (shiftp, i))      if (!SHIFT_IS_DISABLED (shiftp, i))
116        {        {
117          int state1 = shiftp->shifts[i];          int state1 = shiftp->shifts[i];
118          int symbol = state_table[state1].accessing_symbol;          int symbol = state_table[state1]->accessing_symbol;
119          /* The following line used to be turned off.  */          /* The following line used to be turned off.  */
120          if (ISVAR (symbol))          if (ISVAR (symbol))
121            break;            break;
# Line 147  print_actions (FILE *out, int state) Line 147  print_actions (FILE *out, int state)
147          fputc ('\n', out);          fputc ('\n', out);
148      }      }
149    
150    if (state_table[state].consistent && redp)    if (state_table[state]->consistent && redp)
151      {      {
152        int rule = redp->rules[0];        int rule = redp->rules[0];
153        int symbol = rule_table[rule].lhs;        int symbol = rule_table[rule].lhs;
# Line 165  print_actions (FILE *out, int state) Line 165  print_actions (FILE *out, int state)
165          if (!SHIFT_IS_DISABLED (shiftp, i))          if (!SHIFT_IS_DISABLED (shiftp, i))
166            {            {
167              int state1 = shiftp->shifts[i];              int state1 = shiftp->shifts[i];
168              int symbol = state_table[state1].accessing_symbol;              int symbol = state_table[state1]->accessing_symbol;
169              fprintf (out, _("    %-4s\tgo to state %d\n"),              fprintf (out, _("    %-4s\tgo to state %d\n"),
170                       tags[symbol], state1);                       tags[symbol], state1);
171            }            }

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

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