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

Diff of /bison/src/derives.c

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

revision 1.15 by akim, Mon Nov 19 10:19:20 2001 UTC revision 1.16 by akim, Mon Nov 19 10:33:40 2001 UTC
# Line 1  Line 1 
1  /* Match rules with nonterminals for bison,  /* Match rules with nonterminals for bison,
2     Copyright 1984, 1989, 2000 Free Software Foundation, Inc.     Copyright 1984, 1989, 2000, 2001  Free Software Foundation, Inc.
3    
4     This file is part of Bison, the GNU Compiler Compiler.     This file is part of Bison, the GNU Compiler Compiler.
5    
# Line 26  Line 26 
26    
27  #include "system.h"  #include "system.h"
28  #include "types.h"  #include "types.h"
29    #include "reader.h"
30  #include "gram.h"  #include "gram.h"
31  #include "derives.h"  #include "derives.h"
32    
33  short **derives;  short **derives;
34    
35  #if DEBUG  #if TRACE
36    
37  static void  static void
38  print_derives (void)  print_derives (void)
# Line 39  print_derives (void) Line 40  print_derives (void)
40    int i;    int i;
41    short *sp;    short *sp;
42    
43    fputs ("\n\n\n", stdout);    fputs ("\n\n\nDERIVES\n\n", stderr);
   printf (_("DERIVES"));  
   fputs ("\n\n", stdout);  
44    
45    for (i = ntokens; i < nsyms; i++)    for (i = ntokens; i < nsyms; i++)
46      {      {
47        printf (_("%s derives"), tags[i]);        fprintf (stderr, "%s derives", tags[i]);
48        for (sp = derives[i]; *sp > 0; sp++)        for (sp = derives[i]; *sp > 0; sp++)
49          {          fprintf (stderr, "  %d", *sp);
50            printf ("  %d", *sp);        putc ('\n', stderr);
         }  
       putchar ('\n');  
51      }      }
52    
53    putchar ('\n');    putc ('\n', stderr);
54  }  }
55    
56  #endif  #endif
# Line 99  set_derives (void) Line 96  set_derives (void)
96        *q++ = -1;        *q++ = -1;
97      }      }
98    
99  #if DEBUG  #if TRACE
100    print_derives ();    print_derives ();
101  #endif  #endif
102    

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

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