(maxrhs): this new function.
+2001-11-19 Akim Demaille <akim@epita.fr>
+
+ * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
+ (maxrhs): this new function.
+
2001-11-19 Akim Demaille <akim@epita.fr>
* src/lalr.c (F): New macro to access to the variable F.
2001-11-19 Akim Demaille <akim@epita.fr>
* src/lalr.c (F): New macro to access to the variable F.
/* Compute look-ahead criteria for bison,
/* Compute look-ahead criteria for bison,
- Copyright 1984, 1986, 1989, 2000 Free Software Foundation, Inc.
+ Copyright 1984, 1986, 1989, 2000, 2001 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
This file is part of Bison, the GNU Compiler Compiler.
extern void berror PARAMS ((const char *));
static int infinity;
extern void berror PARAMS ((const char *));
static int infinity;
static int ngotos;
/* And for the famous F variable, which named is so descriptive that a
static int ngotos;
/* And for the famous F variable, which named is so descriptive that a
-static void
-set_maxrhs (void)
+/* Return the size of the longest ride hand side of the rules. */
+static size_t
+maxrhs (void)
{
short *itemp;
int length;
{
short *itemp;
int length;
includes = XCALLOC (short *, ngotos);
edge = XCALLOC (short, ngotos + 1);
includes = XCALLOC (short *, ngotos);
edge = XCALLOC (short, ngotos + 1);
- states = XCALLOC (short, maxrhs + 1);
+ states = XCALLOC (short, maxrhs () + 1);
for (i = 0; i < ngotos; i++)
{
for (i = 0; i < ngotos; i++)
{
tokensetsize = WORDSIZE (ntokens);
set_state_table ();
tokensetsize = WORDSIZE (ntokens);
set_state_table ();
initialize_LA ();
set_goto_map ();
initialize_F ();
initialize_LA ();
set_goto_map ();
initialize_F ();