(yaccflag): for consistency and accuracy.
Adjust dependencies.
+2000-10-02 Akim Demaille <akim@epita.fr>
+
+ * src/getargs.c (fixed_outfiles): Rename as...
+ (yaccflag): for consistency and accuracy.
+ Adjust dependencies.
+
+
2000-10-02 Akim Demaille <akim@epita.fr>
Use the more standard files `xalloc.h' and `xmalloc.c' instead of
}
/* Report the total number of conflicts on STDERR. */
- if (fixed_outfiles)
+ if (yaccflag)
{
/* If invoked with `--yacc', use the output format specified by
POSIX. */
static char FIXED_NAME_BASE[] = "y.y";
- name_base = fixed_outfiles ? FIXED_NAME_BASE : infile;
+ name_base = yaccflag ? FIXED_NAME_BASE : infile;
/* BASE_LENGTH gets length of NAME_BASE, sans ".y" suffix if any. */
int toknumflag = 0;
int verboseflag = 0;
int statisticsflag = 0;
-int fixed_outfiles = 0;/* for -y */
+int yaccflag = 0; /* for -y */
extern char *program_name;
{"debug", 0, &debugflag, 1},
{"defines", 0, &definesflag, 1},
{"file-prefix", 1, 0, 'b'},
- {"fixed-output-files", 0, &fixed_outfiles, 1},
+ {"fixed-output-files", 0, &yaccflag, 1},
{"help", 0, 0, 'h'},
{"name-prefix", 1, 0, 'p'}, /* was 'a'; apparently unused -wjh */
{"no-lines", 0, &nolinesflag, 1},
{"token-table", 0, &toknumflag, 1},
{"verbose", 0, &verboseflag, 1},
{"version", 0, 0, 'V'},
- {"yacc", 0, &fixed_outfiles, 1},
+ {"yacc", 0, &yaccflag, 1},
{"statistics", 0, &statisticsflag, 1},
{0, 0, 0, 0}
};
void
getargs (int argc, char *argv[])
{
- register int c;
-
- verboseflag = 0;
- definesflag = 0;
- debugflag = 0;
- noparserflag = 0;
- rawtoknumflag = 0;
- toknumflag = 0;
- fixed_outfiles = 0;
+ int c;
while ((c = getopt_long (argc, argv, "yvdhrltknVo:b:p:", longopts, (int *)0))
!= EOF)
break;
case 'y':
- fixed_outfiles = 1;
+ yaccflag = 1;
break;
case 'h':
extern int debugflag; /* for -t */
extern int definesflag; /* for -d */
-extern int fixed_outfiles; /* for -y */
extern int nolinesflag; /* for -l */
extern int noparserflag; /* for -n */
extern int rawtoknumflag; /* for -r */
+extern int statisticsflag;
extern int toknumflag; /* for -k */
extern int verboseflag; /* for -v */
-extern int statisticsflag;
-extern int fixed_outfiles; /* for -y */
+extern int yaccflag; /* for -y */
void getargs PARAMS ((int argc, char *argv[]));
But %{ and %union both put information into files
that have to be opened before read_declarations().
*/
- { "yacc", &fixed_outfiles, NOOP}, /* -y */
- { "fixed_output_files", &fixed_outfiles, NOOP}, /* -y */
+ { "yacc", &yaccflag, NOOP}, /* -y */
+ { "fixed_output_files", &yaccflag, NOOP}, /* -y */
{ "defines", &definesflag, NOOP}, /* -d */
{ "no_parser", &noparserflag, NOOP}, /* -n */
{ "output_file", &spec_outfile, SETOPT}, /* -o */
static void
print_notices (void)
{
- if (fixed_outfiles && nuseless_productions)
+ if (yaccflag && nuseless_productions)
fprintf (stderr, _("%d rules never reduced\n"), nuseless_productions);
fprintf (stderr, _("%s contains "), infile);
extern int noparserflag;
extern int toknumflag;
extern int rawtoknumflag;
-extern int fixed_outfiles;
+extern int yaccflag;
extern char * version_string;
/* Allocate storgate and initialize, since bison uses them elsewhere. */
verboseflag = 0;
definesflag = 0;
debugflag = 0;
- fixed_outfiles = 0;
+ yaccflag = 0;
nolinesflag = 0;
noparserflag = 0;
toknumflag = 0;
/*
* Check for /FIXED_OUTFILES qualifier
*/
- if (cli_present("BISON$FIXED_OUTFILES")) fixed_outfiles = 1;
- if (cli_present("BISON$YACC")) fixed_outfiles = 1;
+ if (cli_present("BISON$FIXED_OUTFILES")) yaccflag = 1;
+ if (cli_present("BISON$YACC")) yaccflag = 1;
/*
* Check for /VERSION qualifier
*/