X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/342b8b6e2156e923797745af2da2596e3086ccd5..9bfe901c33190b9726bddabf8f192ad0c3a25500:/src/nullable.c?ds=inline diff --git a/src/nullable.c b/src/nullable.c index 33654918..eedc5a33 100644 --- a/src/nullable.c +++ b/src/nullable.c @@ -1,5 +1,5 @@ /* Part of the bison parser generator, - Copyright 1984, 1989, 2000 Free Software Foundation, Inc. + Copyright 1984, 1989, 2000, 2001 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -24,6 +24,7 @@ do so. */ #include "system.h" +#include "getargs.h" #include "types.h" #include "gram.h" #include "nullable.h" @@ -47,9 +48,8 @@ set_nullable (void) char any_tokens; short *r1; -#ifdef TRACE - fprintf (stderr, _("Entering set_nullable")); -#endif + if (trace_flag) + fprintf (stderr, "Entering set_nullable"); nullable = XCALLOC (char, nvars) - ntokens; @@ -69,7 +69,7 @@ set_nullable (void) { if (*r < 0) { - symbol = rlhs[-(*r++)]; + symbol = rule_table[-(*r++)].lhs; if (symbol >= 0 && !nullable[symbol]) { nullable[symbol] = 1; @@ -111,7 +111,7 @@ set_nullable (void) p = p->next; if (--rcount[ruleno] == 0) { - symbol = rlhs[ruleno]; + symbol = rule_table[ruleno].lhs; if (symbol >= 0 && !nullable[symbol]) { nullable[symbol] = 1;