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

Diff of /bison/src/closure.c

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

revision 1.13.2.14 by akim, Wed Dec 5 09:22:27 2001 UTC revision 1.13.2.15 by akim, Wed Dec 5 09:22:40 2001 UTC
# Line 64  print_closure (int n) Line 64  print_closure (int n)
64  static void  static void
65  print_firsts (void)  print_firsts (void)
66  {  {
67    int i;    int i, j;
   int j;  
   unsigned *rowp;  
68    
69    fprintf (stderr, "FIRSTS\n");    fprintf (stderr, "FIRSTS\n");
   
70    for (i = ntokens; i < nsyms; i++)    for (i = ntokens; i < nsyms; i++)
71      {      {
72        fprintf (stderr, "\t%s firsts\n", tags[i]);        fprintf (stderr, "\t%s firsts\n", tags[i]);
   
       rowp = FIRSTS (i - ntokens);  
   
73        for (j = 0; j < nvars; j++)        for (j = 0; j < nvars; j++)
74          if (BITISSET (rowp, j))          if (BITISSET (FIRSTS (i - ntokens), j))
75            fprintf (stderr, "\t\t%d (%s)\n", j + ntokens, tags[j + ntokens]);            fprintf (stderr, "\t\t%d (%s)\n", j + ntokens, tags[j + ntokens]);
76      }      }
77    fprintf (stderr, "\n\n");    fprintf (stderr, "\n\n");
# Line 89  print_fderives (void) Line 83  print_fderives (void)
83  {  {
84    int i;    int i;
85    int j;    int j;
   unsigned *rp;  
86    
87    fprintf (stderr, "FDERIVES\n");    fprintf (stderr, "FDERIVES\n");
88    
89    for (i = ntokens; i < nsyms; i++)    for (i = ntokens; i < nsyms; i++)
90      {      {
91        fprintf (stderr, "\t%s derives\n", tags[i]);        fprintf (stderr, "\t%s derives\n", tags[i]);
       rp = FDERIVES (i);  
   
92        for (j = 0; j <= nrules; j++)        for (j = 0; j <= nrules; j++)
93          if (BITISSET (rp, j))          if (BITISSET (FDERIVES (i), j))
94            {            {
95              short *rhsp;              short *rhsp;
96              fprintf (stderr, "\t\t%d:", j);              fprintf (stderr, "\t\t%d:", j);

Legend:
Removed from v.1.13.2.14  
changed lines
  Added in v.1.13.2.15

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