Remove the so called hairy (semantic) parsers.

* src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
* src/gram.h, src/gram.c (semantic_parser): Remove.
(rule_t): Remove the guard and guard_line members.
* src/lex.h (token_t): remove tok_guard.
* src/options.c (option_table): Remove %guard and %semantic_parser
support.
* src/output.c, src/output.h (guards_output): Remove.
(prepare): Adjust.
(token_definitions_output): Don't output the `T'
tokens (???).
(output_skeleton): Don't output the guards.
* src/files.c, src/files.c (attrsfile): Remove.
* src/reader.c (symbol_list): Remove the guard and guard_line
members.
Adjust dependencies.
(parse_guard): Remove.
* data/bison.hairy: Remove.
* doc/bison.texinfo (Environment Variables): Remove occurrences of
BISON_HAIRY.
This commit is contained in:
Akim Demaille
2002-05-02 15:06:46 +00:00
parent 64bd62a1be
commit fdbcd8e289
21 changed files with 49 additions and 512 deletions

View File

@@ -568,30 +568,6 @@ actions_output (FILE *out)
}
/*----------------------------.
| Output the guards to OOUT. |
`----------------------------*/
void
guards_output (FILE *out)
{
int rule;
for (rule = 1; rule < nrules + 1; ++rule)
if (rules[rule].guard)
{
fprintf (out, " case %d:\n", rule);
if (!no_lines_flag)
fprintf (out, muscle_find ("linef"),
rules[rule].guard_line,
quotearg_style (c_quoting_style,
muscle_find ("filename")));
fprintf (out, "{ %s; }\n break;\n\n",
rules[rule].guard);
}
}
/*---------------------------------------.
| Output the tokens definition to OOUT. |
`---------------------------------------*/
@@ -629,10 +605,6 @@ token_definitions_output (FILE *out)
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->number);
first = 0;
}
}
@@ -1020,10 +992,6 @@ output_skeleton (void)
actions_output (out);
fputs ("]])\n\n", out);
fputs ("m4_define([b4_guards], \n[[", out);
guards_output (out);
fputs ("]])\n\n", out);
fputs ("m4_define([b4_tokens], \n[", out);
token_definitions_output (out);
fputs ("])\n\n", out);
@@ -1099,12 +1067,7 @@ prepare (void)
/* Find the right skeleton file. */
if (!skeleton)
{
if (semantic_parser)
skeleton = "bison.hairy";
else
skeleton = "bison.simple";
}
skeleton = "bison.simple";
/* Parse the skeleton file and output the needed parsers. */
muscle_insert ("skeleton", skeleton);