X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/68f1e3edc304e03b249b64791e4b7d981938bef4..80a697503460fcf0d52bed9fb3b86e4c276fb37e:/src/derives.c diff --git a/src/derives.c b/src/derives.c index 45fecffe..ab7cc326 100644 --- a/src/derives.c +++ b/src/derives.c @@ -19,11 +19,6 @@ Boston, MA 02111-1307, USA. */ -/* 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. - */ - #include "system.h" #include "getargs.h" #include "types.h" @@ -31,8 +26,7 @@ #include "gram.h" #include "derives.h" -short **derives; - +short **derives = NULL; static void print_derives (void) @@ -51,7 +45,7 @@ print_derives (void) fprintf (stderr, "\t\t%d:", *sp); for (rhsp = ritem + rule_table[*sp].rhs; *rhsp > 0; ++rhsp) fprintf (stderr, " %s", tags[*rhsp]); - fputc ('\n', stderr); + fprintf (stderr, " (rule %d)\n", -*rhsp); } }