`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/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
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. */
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;
# 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 */
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");
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);
obstack_1grow (&action_obstack, 0);
muscle_insert ("action", obstack_finish (&action_obstack));
- if (spec_name_prefix)
- MUSCLE_INSERT_STRING ("prefix", spec_name_prefix);
}
/*----------------------------------------------------------.
{
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");
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;
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[];