/* 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.
/* Buffer for storing the current token. */
struct obstack token_obstack;
-char *token_buffer = NULL;
+const char *token_buffer = NULL;
bucket *symval;
int numval;
}
else
{
- char buf [] = "c";
- buf[0] = c;
+ char badchar [] = "c";
+ badchar[0] = c;
complain (_("unknown escape sequence: `\\' followed by `%s'"),
- quote (buf));
+ quote (badchar));
code = '?';
}
} /* has \ */
{ "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 */
{ "file_prefix", &spec_file_prefix, tok_setopt }, /* -b */
{ "name_prefix", &spec_name_prefix, tok_setopt }, /* -p */
#endif
+ { "header_extension", NULL, tok_hdrext},
+ { "source_extension", NULL, tok_srcext},
{ "verbose", &verbose_flag, tok_noop }, /* -v */
{ "debug", &debug_flag, tok_noop }, /* -t */
{ "semantic_parser", &semantic_parser, tok_noop },
if (strcmp (token_buffer + 1, tx->name) == 0)
break;
- if (tx->retval == tok_setopt)
+ if (tx->set_flag)
{
- *((char **) (tx->set_flag)) = optarg;
+ *((int *) (tx->set_flag)) = 1;
return tok_noop;
}
- if (tx->set_flag)
+
+ switch (tx->retval)
{
- *((int *) (tx->set_flag)) = 1;
+ 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;
}