mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 21:03:04 +00:00
For associating token numbers with token names for "yacc.c", don't use
#define statements unless `--yacc' is specified; always use enum yytokentype. Most important discussions start at: <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>, <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>, and <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>. * NEWS (2.3+): Mention. * data/c.m4 (b4_yacc_if): New. (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the token #define's. * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc' on token name definitions. * src/getargs.c (usage): Capitalize `Yacc' in English. * src/output.c (prepare): Define b4_yacc_flag. * tests/regression.at (Early token definitions): Test that tokens names are defined before the pre-prologue not just before the post-prologue. Remove this test case and copy to... (Early token definitions with --yacc): ... this to test #define's. (Early token definitions without --yacc): ... and this to test enums.
This commit is contained in:
@@ -217,7 +217,7 @@ Operation modes:\n\
|
||||
-h, --help display this help and exit\n\
|
||||
-V, --version output version information and exit\n\
|
||||
--print-localedir output directory containing locale-dependent data\n\
|
||||
-y, --yacc emulate POSIX yacc\n"), stdout);
|
||||
-y, --yacc emulate POSIX Yacc\n"), stdout);
|
||||
putc ('\n', stdout);
|
||||
|
||||
fputs (_("\
|
||||
|
||||
@@ -590,6 +590,7 @@ prepare (void)
|
||||
MUSCLE_INSERT_BOOL ("locations_flag", locations_flag);
|
||||
MUSCLE_INSERT_BOOL ("pure_flag", pure_parser);
|
||||
MUSCLE_INSERT_BOOL ("synclines_flag", !no_lines_flag);
|
||||
MUSCLE_INSERT_BOOL ("yacc_flag", yacc_flag);
|
||||
|
||||
/* File names. */
|
||||
MUSCLE_INSERT_STRING ("prefix", spec_name_prefix ? spec_name_prefix : "yy");
|
||||
|
||||
Reference in New Issue
Block a user