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 |
|
|
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) |
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 |
96 |
*q++ = -1; |
*q++ = -1; |
97 |
} |
} |
98 |
|
|
99 |
#if DEBUG |
#if TRACE |
100 |
print_derives (); |
print_derives (); |
101 |
#endif |
#endif |
102 |
|
|