mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
* src/getargs.h (raw_flag): Remove.
* src/getargs.c: Die on `-r'/`--raw'. * src/lex.c (parse_percent_token): Die on `%raw'. * src/reader.c (output_token_defines): Suppress call to `raw_flag'. * tests/calc.at: Suppress test with option `--raw'.
This commit is contained in:
22
src/lex.c
22
src/lex.c
@@ -1,5 +1,5 @@
|
||||
/* Token-reader for Bison's input parser,
|
||||
Copyright 1984, 1986, 1989, 1992, 2000 Free Software Foundation, Inc.
|
||||
Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -537,7 +537,7 @@ struct percent_table_struct percent_table[] =
|
||||
{ "prec", NULL, tok_prec },
|
||||
{ "locations", &locations_flag, tok_noop }, /* -l */
|
||||
{ "no_lines", &no_lines_flag, tok_noop }, /* -l */
|
||||
{ "raw", &raw_flag, tok_noop }, /* -r */
|
||||
{ "raw", NULL, tok_obsolete }, /* -r */
|
||||
{ "token_table", &token_table_flag, tok_noop }, /* -k */
|
||||
{ "yacc", &yacc_flag, tok_noop }, /* -y */
|
||||
{ "fixed_output_files",&yacc_flag, tok_noop }, /* -y */
|
||||
@@ -616,15 +616,23 @@ parse_percent_token (void)
|
||||
if (strcmp (token_buffer + 1, tx->name) == 0)
|
||||
break;
|
||||
|
||||
if (tx->retval == tok_setopt)
|
||||
{
|
||||
*((char **) (tx->set_flag)) = optarg;
|
||||
return tok_noop;
|
||||
}
|
||||
if (tx->set_flag)
|
||||
{
|
||||
*((int *) (tx->set_flag)) = 1;
|
||||
return tok_noop;
|
||||
}
|
||||
|
||||
switch (tx->retval)
|
||||
{
|
||||
case tok_setopt:
|
||||
*((char **) (tx->set_flag)) = optarg;
|
||||
return tok_noop;
|
||||
break;
|
||||
|
||||
case tok_obsolete:
|
||||
fatal (_("`%s' is no longer supported"), token_buffer);
|
||||
break;
|
||||
}
|
||||
|
||||
return tx->retval;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user