X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/71846502ae5af8e93e87355d178ce7d5704cdf32..1fa19a769721658bb53177596531afbbea8b4e1c:/doc/bison.texi diff --git a/doc/bison.texi b/doc/bison.texi index 2ed10c2f..198403fe 100644 --- a/doc/bison.texi +++ b/doc/bison.texi @@ -3795,6 +3795,11 @@ yylval.TOK_INT = 42; return TOK_INT; @end example +This Bison extension cannot work if @code{%yacc} (or +@option{-y}/@option{--yacc}) is enabled, as POSIX mandates that Yacc +generate tokens as macros (e.g., @samp{#define INT 258}, or @samp{#define +TOK_INT 258}). + This feature is new, and user feedback would be most welcome. A similar feature is provided for C++ that in addition overcomes C++ @@ -4990,10 +4995,8 @@ For example: @example %union @{ char *string; @} -%token STRING1 -%token STRING2 -%type string1 -%type string2 +%token STRING1 STRING2 +%type string1 string2 %union @{ char character; @} %token CHR %type chr @@ -5119,10 +5122,8 @@ For example: @example %union @{ char *string; @} -%token STRING1 -%token STRING2 -%type string1 -%type string2 +%token STRING1 STRING2 +%type string1 string2 %union @{ char character; @} %token CHR %type chr