mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* src/getargs.h: Don't declare `spec_name_prefix' and
`spec_file_prefix', declared by src/files.h. * src/files.c, src/files.h: Default for spec_name_prefix is "yy". * src/muscle_tab.c (muscle_init): Default prefix to NULL. * src/output.c (prepare): Adjust. * src/reader.c (symbols_output): Likewise. * src/vmsgetargs.c: Vaguely adjust, but who cares?
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,3 +1,14 @@
|
||||
2001-12-10 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* src/getargs.h: Don't declare `spec_name_prefix' and
|
||||
`spec_file_prefix', declared by src/files.h.
|
||||
* src/files.c, src/files.h: Default for spec_name_prefix is "yy".
|
||||
* src/muscle_tab.c (muscle_init): Default prefix to NULL.
|
||||
* src/output.c (prepare): Adjust.
|
||||
* src/reader.c (symbols_output): Likewise.
|
||||
* src/vmsgetargs.c: Vaguely adjust, but who cares?
|
||||
|
||||
|
||||
2001-12-10 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* src/muscle_tab.c (muscle_init): NULL is a better default than
|
||||
|
||||
@@ -37,7 +37,7 @@ struct obstack output_obstack;
|
||||
|
||||
char *spec_outfile = NULL; /* for -o. */
|
||||
char *spec_file_prefix = NULL; /* for -b. */
|
||||
char *spec_name_prefix = NULL; /* for -p. */
|
||||
const char *spec_name_prefix = "yy"; /* for -p. */
|
||||
char *spec_verbose_file = NULL; /* for --verbose. */
|
||||
char *spec_graph_file = NULL; /* for -g. */
|
||||
char *spec_defines_file = NULL; /* for --defines. */
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
extern char *spec_outfile;
|
||||
|
||||
/* For -a. */
|
||||
extern char *spec_name_prefix;
|
||||
extern const char *spec_name_prefix;
|
||||
|
||||
/* File name pfx specified with -b, or 0 if no -b. */
|
||||
extern char *spec_file_prefix;
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
# define GETARGS_H_
|
||||
|
||||
/* flags set by % directives */
|
||||
extern char *spec_file_prefix; /* for -b */
|
||||
extern char *spec_name_prefix; /* for -p */
|
||||
extern const char *skeleton; /* for -S */
|
||||
extern const char *include; /* for -I */
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ muscle_init (void)
|
||||
muscle_insert ("maxtok", NULL);
|
||||
muscle_insert ("ntbase", NULL);
|
||||
muscle_insert ("error-verbose", NULL);
|
||||
muscle_insert ("prefix", "yy");
|
||||
muscle_insert ("prefix", NULL);
|
||||
/* Default #line formatting. */
|
||||
muscle_insert ("linef", "#line %d %s\n");
|
||||
|
||||
|
||||
@@ -1034,6 +1034,7 @@ prepare (void)
|
||||
MUSCLE_INSERT_INT ("maxtok", max_user_token_number);
|
||||
MUSCLE_INSERT_INT ("ntbase", ntokens);
|
||||
MUSCLE_INSERT_INT ("error-verbose", error_verbose);
|
||||
MUSCLE_INSERT_STRING ("prefix", spec_name_prefix);
|
||||
|
||||
MUSCLE_INSERT_INT ("nnts", nvars);
|
||||
MUSCLE_INSERT_INT ("nrules", nrules);
|
||||
@@ -1046,8 +1047,6 @@ prepare (void)
|
||||
obstack_1grow (&action_obstack, 0);
|
||||
muscle_insert ("action", obstack_finish (&action_obstack));
|
||||
|
||||
if (spec_name_prefix)
|
||||
MUSCLE_INSERT_STRING ("prefix", spec_name_prefix);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------.
|
||||
|
||||
@@ -318,7 +318,7 @@ print_results (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* We used to use just .out if spec_name_prefix (-p) was used, but
|
||||
/* We used to use just .out if SPEC_NAME_PREFIX (-p) was used, but
|
||||
that conflicts with Posix. */
|
||||
FILE *out = xfopen (spec_verbose_file, "w");
|
||||
|
||||
|
||||
11
src/reader.c
11
src/reader.c
@@ -1914,15 +1914,8 @@ symbols_output (void)
|
||||
output_token_defines (&defines_obstack);
|
||||
|
||||
if (!pure_parser)
|
||||
{
|
||||
if (spec_name_prefix)
|
||||
obstack_fgrow1 (&defines_obstack, "\nextern YYSTYPE %slval;\n",
|
||||
spec_name_prefix);
|
||||
else
|
||||
obstack_sgrow (&defines_obstack,
|
||||
"\nextern YYSTYPE yylval;\n");
|
||||
}
|
||||
|
||||
obstack_fgrow1 (&defines_obstack, "\nextern YYSTYPE %slval;\n",
|
||||
spec_name_prefix);
|
||||
if (semantic_parser)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -37,10 +37,6 @@ extern int raw_flag;
|
||||
extern int yacc_flag;
|
||||
extern char * version_string;
|
||||
|
||||
/* Allocate storgate and initialize, since bison uses them elsewhere. */
|
||||
char *spec_name_prefix;
|
||||
char *spec_file_prefix;
|
||||
|
||||
getargs(argc,argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
|
||||
Reference in New Issue
Block a user