mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 17:53:02 +00:00
* src/getargs.c (fixed_outfiles): Rename as...
(yaccflag): for consistency and accuracy. Adjust dependencies.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
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>
|
2000-10-02 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
Use the more standard files `xalloc.h' and `xmalloc.c' instead of
|
Use the more standard files `xalloc.h' and `xmalloc.c' instead of
|
||||||
|
|||||||
@@ -465,7 +465,7 @@ print_conflicts (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Report the total number of conflicts on STDERR. */
|
/* Report the total number of conflicts on STDERR. */
|
||||||
if (fixed_outfiles)
|
if (yaccflag)
|
||||||
{
|
{
|
||||||
/* If invoked with `--yacc', use the output format specified by
|
/* If invoked with `--yacc', use the output format specified by
|
||||||
POSIX. */
|
POSIX. */
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ open_files (void)
|
|||||||
|
|
||||||
static char FIXED_NAME_BASE[] = "y.y";
|
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. */
|
/* BASE_LENGTH gets length of NAME_BASE, sans ".y" suffix if any. */
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ int rawtoknumflag = 0;
|
|||||||
int toknumflag = 0;
|
int toknumflag = 0;
|
||||||
int verboseflag = 0;
|
int verboseflag = 0;
|
||||||
int statisticsflag = 0;
|
int statisticsflag = 0;
|
||||||
int fixed_outfiles = 0;/* for -y */
|
int yaccflag = 0; /* for -y */
|
||||||
|
|
||||||
extern char *program_name;
|
extern char *program_name;
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ static struct option longopts[] =
|
|||||||
{"debug", 0, &debugflag, 1},
|
{"debug", 0, &debugflag, 1},
|
||||||
{"defines", 0, &definesflag, 1},
|
{"defines", 0, &definesflag, 1},
|
||||||
{"file-prefix", 1, 0, 'b'},
|
{"file-prefix", 1, 0, 'b'},
|
||||||
{"fixed-output-files", 0, &fixed_outfiles, 1},
|
{"fixed-output-files", 0, &yaccflag, 1},
|
||||||
{"help", 0, 0, 'h'},
|
{"help", 0, 0, 'h'},
|
||||||
{"name-prefix", 1, 0, 'p'}, /* was 'a'; apparently unused -wjh */
|
{"name-prefix", 1, 0, 'p'}, /* was 'a'; apparently unused -wjh */
|
||||||
{"no-lines", 0, &nolinesflag, 1},
|
{"no-lines", 0, &nolinesflag, 1},
|
||||||
@@ -55,7 +55,7 @@ static struct option longopts[] =
|
|||||||
{"token-table", 0, &toknumflag, 1},
|
{"token-table", 0, &toknumflag, 1},
|
||||||
{"verbose", 0, &verboseflag, 1},
|
{"verbose", 0, &verboseflag, 1},
|
||||||
{"version", 0, 0, 'V'},
|
{"version", 0, 0, 'V'},
|
||||||
{"yacc", 0, &fixed_outfiles, 1},
|
{"yacc", 0, &yaccflag, 1},
|
||||||
{"statistics", 0, &statisticsflag, 1},
|
{"statistics", 0, &statisticsflag, 1},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
@@ -147,15 +147,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
|||||||
void
|
void
|
||||||
getargs (int argc, char *argv[])
|
getargs (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
register int c;
|
int c;
|
||||||
|
|
||||||
verboseflag = 0;
|
|
||||||
definesflag = 0;
|
|
||||||
debugflag = 0;
|
|
||||||
noparserflag = 0;
|
|
||||||
rawtoknumflag = 0;
|
|
||||||
toknumflag = 0;
|
|
||||||
fixed_outfiles = 0;
|
|
||||||
|
|
||||||
while ((c = getopt_long (argc, argv, "yvdhrltknVo:b:p:", longopts, (int *)0))
|
while ((c = getopt_long (argc, argv, "yvdhrltknVo:b:p:", longopts, (int *)0))
|
||||||
!= EOF)
|
!= EOF)
|
||||||
@@ -167,7 +159,7 @@ getargs (int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'y':
|
case 'y':
|
||||||
fixed_outfiles = 1;
|
yaccflag = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'h':
|
case 'h':
|
||||||
|
|||||||
@@ -27,14 +27,13 @@ extern char *spec_name_prefix; /* for -p */
|
|||||||
|
|
||||||
extern int debugflag; /* for -t */
|
extern int debugflag; /* for -t */
|
||||||
extern int definesflag; /* for -d */
|
extern int definesflag; /* for -d */
|
||||||
extern int fixed_outfiles; /* for -y */
|
|
||||||
extern int nolinesflag; /* for -l */
|
extern int nolinesflag; /* for -l */
|
||||||
extern int noparserflag; /* for -n */
|
extern int noparserflag; /* for -n */
|
||||||
extern int rawtoknumflag; /* for -r */
|
extern int rawtoknumflag; /* for -r */
|
||||||
|
extern int statisticsflag;
|
||||||
extern int toknumflag; /* for -k */
|
extern int toknumflag; /* for -k */
|
||||||
extern int verboseflag; /* for -v */
|
extern int verboseflag; /* for -v */
|
||||||
extern int statisticsflag;
|
extern int yaccflag; /* for -y */
|
||||||
extern int fixed_outfiles; /* for -y */
|
|
||||||
|
|
||||||
void getargs PARAMS ((int argc, char *argv[]));
|
void getargs PARAMS ((int argc, char *argv[]));
|
||||||
|
|
||||||
|
|||||||
@@ -548,8 +548,8 @@ percent_table[] =
|
|||||||
But %{ and %union both put information into files
|
But %{ and %union both put information into files
|
||||||
that have to be opened before read_declarations().
|
that have to be opened before read_declarations().
|
||||||
*/
|
*/
|
||||||
{ "yacc", &fixed_outfiles, NOOP}, /* -y */
|
{ "yacc", &yaccflag, NOOP}, /* -y */
|
||||||
{ "fixed_output_files", &fixed_outfiles, NOOP}, /* -y */
|
{ "fixed_output_files", &yaccflag, NOOP}, /* -y */
|
||||||
{ "defines", &definesflag, NOOP}, /* -d */
|
{ "defines", &definesflag, NOOP}, /* -d */
|
||||||
{ "no_parser", &noparserflag, NOOP}, /* -n */
|
{ "no_parser", &noparserflag, NOOP}, /* -n */
|
||||||
{ "output_file", &spec_outfile, SETOPT}, /* -o */
|
{ "output_file", &spec_outfile, SETOPT}, /* -o */
|
||||||
|
|||||||
@@ -483,7 +483,7 @@ dump_grammar (void)
|
|||||||
static void
|
static void
|
||||||
print_notices (void)
|
print_notices (void)
|
||||||
{
|
{
|
||||||
if (fixed_outfiles && nuseless_productions)
|
if (yaccflag && nuseless_productions)
|
||||||
fprintf (stderr, _("%d rules never reduced\n"), nuseless_productions);
|
fprintf (stderr, _("%d rules never reduced\n"), nuseless_productions);
|
||||||
|
|
||||||
fprintf (stderr, _("%s contains "), infile);
|
fprintf (stderr, _("%s contains "), infile);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ int nolinesflag;
|
|||||||
extern int noparserflag;
|
extern int noparserflag;
|
||||||
extern int toknumflag;
|
extern int toknumflag;
|
||||||
extern int rawtoknumflag;
|
extern int rawtoknumflag;
|
||||||
extern int fixed_outfiles;
|
extern int yaccflag;
|
||||||
extern char * version_string;
|
extern char * version_string;
|
||||||
|
|
||||||
/* Allocate storgate and initialize, since bison uses them elsewhere. */
|
/* Allocate storgate and initialize, since bison uses them elsewhere. */
|
||||||
@@ -53,7 +53,7 @@ getargs(argc,argv)
|
|||||||
verboseflag = 0;
|
verboseflag = 0;
|
||||||
definesflag = 0;
|
definesflag = 0;
|
||||||
debugflag = 0;
|
debugflag = 0;
|
||||||
fixed_outfiles = 0;
|
yaccflag = 0;
|
||||||
nolinesflag = 0;
|
nolinesflag = 0;
|
||||||
noparserflag = 0;
|
noparserflag = 0;
|
||||||
toknumflag = 0;
|
toknumflag = 0;
|
||||||
@@ -69,8 +69,8 @@ getargs(argc,argv)
|
|||||||
/*
|
/*
|
||||||
* Check for /FIXED_OUTFILES qualifier
|
* Check for /FIXED_OUTFILES qualifier
|
||||||
*/
|
*/
|
||||||
if (cli_present("BISON$FIXED_OUTFILES")) fixed_outfiles = 1;
|
if (cli_present("BISON$FIXED_OUTFILES")) yaccflag = 1;
|
||||||
if (cli_present("BISON$YACC")) fixed_outfiles = 1;
|
if (cli_present("BISON$YACC")) yaccflag = 1;
|
||||||
/*
|
/*
|
||||||
* Check for /VERSION qualifier
|
* Check for /VERSION qualifier
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user