negative short int. Used to flag ?? */
#include "system.h"
+#include "bitsetv.h"
#include "quotearg.h"
#include "error.h"
#include "getargs.h"
token_definitions_output (FILE *out)
{
int i;
+ int first = 1;
for (i = 0; i < ntokens; ++i)
{
bucket *symbol = symbols[i];
if (strchr (symbol->tag, '.') || strchr (symbol->tag, '$'))
continue;
- fprintf (out, "# define %s\t%d\n",
- symbol->tag, number);
+ fprintf (out, "%s [[[%s]], [%d]]",
+ first ? "" : ",\n", symbol->tag, number);
if (semantic_parser)
/* FIXME: This is probably wrong, and should be just as
above. --akim. */
fprintf (out, "# define T%s\t%d\n", symbol->tag, symbol->value);
+ first = 0;
}
}
width = XCALLOC (short, nvectors);
token_actions ();
- XFREE (LA);
+ bitsetv_free (LA);
XFREE (LAruleno);
goto_actions ();
output_skeleton (void)
{
/* Store the definition of all the muscles. */
- char *tempdir = getenv ("TMPDIR");
+ const char *tempdir = getenv ("TMPDIR");
char *tempfile = NULL;
FILE *out = NULL;
- ssize_t bytes_read;
int fd;
if (tempdir == NULL)
guards_output (out);
fputs ("]])\n\n", out);
- fputs ("m4_define([b4_tokendef], \n[[", out);
+ fputs ("m4_define([b4_tokens], \n[", out);
token_definitions_output (out);
- fputs ("]])\n\n", out);
+ fputs ("])\n\n", out);
muscles_m4_output (out);
output_token_translations ();
output_gram ();
- XFREE (ritem);
if (semantic_parser)
output_stos ();
output_rule_data ();
/* Process the selected skeleton file. */
output_skeleton ();
- free (rules + 1);
obstack_free (&muscle_obstack, NULL);
obstack_free (&format_obstack, NULL);
obstack_free (&action_obstack, NULL);