mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-23 03:03:02 +00:00
* 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:
@@ -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>
|
2001-11-28 Marc Autret <autret_m@epita.fr>
|
||||||
|
|
||||||
* src/bison.simple: Fix debug.
|
* src/bison.simple: Fix debug.
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
#define yynerrs %%prefix##nerrs
|
#define yynerrs %%prefix##nerrs
|
||||||
|
|
||||||
/* Copy the user declarations. */
|
/* Copy the user declarations. */
|
||||||
#line %%input_line "%%filename"
|
#line %%input-line "%%filename"
|
||||||
%%prologue
|
%%prologue
|
||||||
|
|
||||||
#line %%line "%%skeleton"
|
#line %%line "%%skeleton"
|
||||||
@@ -132,7 +132,7 @@ do { \
|
|||||||
# define YYDEBUG %%debug
|
# define YYDEBUG %%debug
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#line %%input_line "%%filename"
|
#line %%input-line "%%filename"
|
||||||
#ifndef YYSTYPE
|
#ifndef YYSTYPE
|
||||||
typedef %%stype yystype;
|
typedef %%stype yystype;
|
||||||
# define YYSTYPE yystype
|
# define YYSTYPE yystype
|
||||||
@@ -153,7 +153,7 @@ typedef struct yyltype
|
|||||||
# undef YYERROR_VERBOSE
|
# undef YYERROR_VERBOSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define YYERROR_VERBOSE %%error_verbose
|
#define YYERROR_VERBOSE %%error-verbose
|
||||||
|
|
||||||
/* Tokens. */
|
/* Tokens. */
|
||||||
%%tokendef
|
%%tokendef
|
||||||
@@ -306,7 +306,7 @@ while (0)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Definition of YYLSP_NEEDED. */
|
/* Definition of YYLSP_NEEDED. */
|
||||||
#define YYLSP_NEEDED %%locations_flag
|
#define YYLSP_NEEDED %%locations-flag
|
||||||
|
|
||||||
/* YYLEX -- calling `yylex' with the right arguments. */
|
/* YYLEX -- calling `yylex' with the right arguments. */
|
||||||
|
|
||||||
@@ -1006,5 +1006,5 @@ yyabortlab:
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#line %%input_line "%%filename"
|
#line %%input-line "%%filename"
|
||||||
%%epilogue
|
%%epilogue
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ muscle_init (void)
|
|||||||
muscle_insert ("final", "0");
|
muscle_insert ("final", "0");
|
||||||
muscle_insert ("maxtok", "0");
|
muscle_insert ("maxtok", "0");
|
||||||
muscle_insert ("ntbase", "0");
|
muscle_insert ("ntbase", "0");
|
||||||
muscle_insert ("error_verbose", "0");
|
muscle_insert ("error-verbose", "0");
|
||||||
muscle_insert ("prefix", "yy");
|
muscle_insert ("prefix", "yy");
|
||||||
/* Default #line formatting. */
|
/* Default #line formatting. */
|
||||||
muscle_insert ("linef", "#line %d %s\n");
|
muscle_insert ("linef", "#line %d %s\n");
|
||||||
|
|||||||
@@ -972,7 +972,7 @@ output_parser (const char *skel_filename, struct obstack *oout)
|
|||||||
const char *muscle_key = 0;
|
const char *muscle_key = 0;
|
||||||
const char *muscle_value = 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, c);
|
||||||
obstack_1grow (&muscle_obstack, 0);
|
obstack_1grow (&muscle_obstack, 0);
|
||||||
|
|
||||||
@@ -983,7 +983,7 @@ output_parser (const char *skel_filename, struct obstack *oout)
|
|||||||
obstack_sgrow (oout, muscle_value);
|
obstack_sgrow (oout, muscle_value);
|
||||||
else if (!strcmp (muscle_key, "line"))
|
else if (!strcmp (muscle_key, "line"))
|
||||||
obstack_fgrow1 (oout, "%d", line + 1);
|
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);
|
obstack_fgrow1 (oout, "%d", lineno);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1052,14 +1052,14 @@ prepare (void)
|
|||||||
MUSCLE_INSERT_INT ("final", final_state);
|
MUSCLE_INSERT_INT ("final", final_state);
|
||||||
MUSCLE_INSERT_INT ("maxtok", max_user_token_number);
|
MUSCLE_INSERT_INT ("maxtok", max_user_token_number);
|
||||||
MUSCLE_INSERT_INT ("ntbase", ntokens);
|
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 ("nnts", nvars);
|
||||||
MUSCLE_INSERT_INT ("nrules", nrules);
|
MUSCLE_INSERT_INT ("nrules", nrules);
|
||||||
MUSCLE_INSERT_INT ("nstates", nstates);
|
MUSCLE_INSERT_INT ("nstates", nstates);
|
||||||
MUSCLE_INSERT_INT ("ntokens", ntokens);
|
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. */
|
/* We need to save the actions in the muscle %%action. */
|
||||||
muscle_insert ("action", obstack_finish (&action_obstack));
|
muscle_insert ("action", obstack_finish (&action_obstack));
|
||||||
|
|||||||
Reference in New Issue
Block a user