/* comments for these variables are in gram.h */
item_number_t *ritem = NULL;
-int nritems = 0;
+unsigned int nritems = 0;
rule_t *rules = NULL;
int nrules = 0;
void
ritem_print (FILE *out)
{
- int i;
+ unsigned int i;
fputs ("RITEM\n", out);
for (i = 0; i < nritems; ++i)
if (ritem[i] >= 0)
}
fprintf (out, "\n\n");
}
+
+
+void
+grammar_free (void)
+{
+ XFREE (ritem);
+ free (rules + 1);
+ XFREE (token_translations);
+ /* Free the symbol table data structure. */
+ symbols_free ();
+}