void
output_headers (void)
{
- char *attrsfile_quoted = quotearg_style (c_quoting_style, attrsfile);
+ char *attrsfile_quoted = 0;
if (semantic_parser)
- obstack_fgrow1 (&guard_obstack, GUARDSTR, attrsfile_quoted);
+ {
+ /* FIXME: This is *buggy*. ATTRSFILE is not computed yet, since
+ we are waiting for the full input file to have been read to
+ be sure of the output file name. So basically, here, a SEGV
+ is guaranteed. OTOH, currently semantic parsers are not
+ supported. */
+ attrsfile_quoted = quotearg_style (c_quoting_style, attrsfile);
+ obstack_fgrow1 (&guard_obstack, GUARDSTR, attrsfile_quoted);
+ }
if (no_parser_flag)
return;
int c;
FILE *fskel;
size_t line;
- const char *skeleton = NULL;
int actions_dumped = 0;
if (pure_parser)
obstack_sgrow (&table_obstack, "#define YYPURE 1\n\n");
/* Loop over lines in the standard parser file. */
- if (semantic_parser)
- skeleton = skeleton_find ("BISON_HAIRY", BISON_HAIRY);
- else
- skeleton = skeleton_find ("BISON_SIMPLE", BISON_SIMPLE);
+ if (!skeleton)
+ {
+ if (semantic_parser)
+ skeleton = skeleton_find ("BISON_HAIRY", BISON_HAIRY);
+ else
+ skeleton = skeleton_find ("BISON_SIMPLE", BISON_SIMPLE);
+ }
fskel = xfopen (skeleton, "r");
/* Set LINE to 2, not 1: `#line LINENUM' -- Here LINENUM is a