* src/bison.simple: Adjust muscle names.

* src/muscle_tab.c (muscle_init): Also rename the muscles.
* src/output.c (prepare): s/_/-/ for the muscles names.
(output_parser): When scanning for a muscle, allow '-' instead of '_'.
This commit is contained in:
Marc Autret
2001-11-28 20:32:53 +00:00
parent 8850be4b1c
commit 5b5d192929
4 changed files with 17 additions and 10 deletions

View File

@@ -1,3 +1,10 @@
2001-11-28 Marc Autret <autret_m@epita.fr>
* src/bison.simple: Adjust muscle names.
* src/muscle_tab.c (muscle_init): Also rename the muscles.
* src/output.c (prepare): s/_/-/ for the muscles names.
(output_parser): When scanning for a muscle, allow '-' instead of '_'.
2001-11-28 Marc Autret <autret_m@epita.fr>
* src/bison.simple: Fix debug.

View File

@@ -44,7 +44,7 @@
#define yynerrs %%prefix##nerrs
/* Copy the user declarations. */
#line %%input_line "%%filename"
#line %%input-line "%%filename"
%%prologue
#line %%line "%%skeleton"
@@ -132,7 +132,7 @@ do { \
# define YYDEBUG %%debug
#endif
#line %%input_line "%%filename"
#line %%input-line "%%filename"
#ifndef YYSTYPE
typedef %%stype yystype;
# define YYSTYPE yystype
@@ -153,7 +153,7 @@ typedef struct yyltype
# undef YYERROR_VERBOSE
#endif
#define YYERROR_VERBOSE %%error_verbose
#define YYERROR_VERBOSE %%error-verbose
/* Tokens. */
%%tokendef
@@ -306,7 +306,7 @@ while (0)
#endif
/* Definition of YYLSP_NEEDED. */
#define YYLSP_NEEDED %%locations_flag
#define YYLSP_NEEDED %%locations-flag
/* YYLEX -- calling `yylex' with the right arguments. */
@@ -1006,5 +1006,5 @@ yyabortlab:
return 1;
}
#line %%input_line "%%filename"
#line %%input-line "%%filename"
%%epilogue

View File

@@ -86,7 +86,7 @@ muscle_init (void)
muscle_insert ("final", "0");
muscle_insert ("maxtok", "0");
muscle_insert ("ntbase", "0");
muscle_insert ("error_verbose", "0");
muscle_insert ("error-verbose", "0");
muscle_insert ("prefix", "yy");
/* Default #line formatting. */
muscle_insert ("linef", "#line %d %s\n");

View File

@@ -972,7 +972,7 @@ output_parser (const char *skel_filename, struct obstack *oout)
const char *muscle_key = 0;
const char *muscle_value = 0;
while (isalnum (c = getc (fskel)) || c == '_')
while (isalnum (c = getc (fskel)) || c == '-')
obstack_1grow (&muscle_obstack, c);
obstack_1grow (&muscle_obstack, 0);
@@ -983,7 +983,7 @@ output_parser (const char *skel_filename, struct obstack *oout)
obstack_sgrow (oout, muscle_value);
else if (!strcmp (muscle_key, "line"))
obstack_fgrow1 (oout, "%d", line + 1);
else if (!strcmp (muscle_key, "input_line"))
else if (!strcmp (muscle_key, "input-line"))
obstack_fgrow1 (oout, "%d", lineno);
else
{
@@ -1052,14 +1052,14 @@ prepare (void)
MUSCLE_INSERT_INT ("final", final_state);
MUSCLE_INSERT_INT ("maxtok", max_user_token_number);
MUSCLE_INSERT_INT ("ntbase", ntokens);
MUSCLE_INSERT_INT ("error_verbose", error_verbose_flag);
MUSCLE_INSERT_INT ("error-verbose", error_verbose_flag);
MUSCLE_INSERT_INT ("nnts", nvars);
MUSCLE_INSERT_INT ("nrules", nrules);
MUSCLE_INSERT_INT ("nstates", nstates);
MUSCLE_INSERT_INT ("ntokens", ntokens);
MUSCLE_INSERT_INT ("locations_flag", locations_flag);
MUSCLE_INSERT_INT ("locations-flag", locations_flag);
/* We need to save the actions in the muscle %%action. */
muscle_insert ("action", obstack_finish (&action_obstack));