/[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.20 by akim, Fri Nov 30 10:49:24 2001 UTC revision 1.21 by akim, Wed Dec 5 09:28:00 2001 UTC
# Line 19  Line 19 
19     Boston, MA 02111-1307, USA.  */     Boston, MA 02111-1307, USA.  */
20    
21    
 /* set_derives finds, for each variable (nonterminal), which rules can  
    derive it.  It sets up the value of derives so that derives[i -  
    ntokens] points to a vector of rule numbers, terminated with -1.  
    */  
   
22  #include "system.h"  #include "system.h"
23  #include "getargs.h"  #include "getargs.h"
24  #include "types.h"  #include "types.h"
# Line 31  Line 26 
26  #include "gram.h"  #include "gram.h"
27  #include "derives.h"  #include "derives.h"
28    
29  short **derives;  short **derives = NULL;
   
30    
31  static void  static void
32  print_derives (void)  print_derives (void)
# Line 51  print_derives (void) Line 45  print_derives (void)
45            fprintf (stderr, "\t\t%d:", *sp);            fprintf (stderr, "\t\t%d:", *sp);
46            for (rhsp = ritem + rule_table[*sp].rhs; *rhsp > 0; ++rhsp)            for (rhsp = ritem + rule_table[*sp].rhs; *rhsp > 0; ++rhsp)
47              fprintf (stderr, " %s", tags[*rhsp]);              fprintf (stderr, " %s", tags[*rhsp]);
48            fputc ('\n', stderr);            fprintf (stderr, " (rule %d)\n", -*rhsp);
49          }          }
50      }      }
51    

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

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