From: Akim Demaille Date: Tue, 12 Jun 2012 14:15:14 +0000 (+0200) Subject: yacc.c: instead of duplicating y.tab.h inside y.tac.c, include it. X-Git-Tag: v2.6~78 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/0f11eec272453d5646e5aeda135650b4fb8ac33d?hp=ae6bdabbf6bfe6a8a0ab26b26ab66c0c0406fd15 yacc.c: instead of duplicating y.tab.h inside y.tac.c, include it. This is already what glr.c and lalr1.cc do. * data/yacc.c: here. --- diff --git a/NEWS b/NEWS index 393538c7..fd51b61b 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,20 @@ GNU Bison NEWS * Noteworthy changes in release ?.? (????-??-??) [?] +** Future changes: + + The next major release will drop support for generating parsers in K&R C, + and remove the definition of yystype (removal announced since Bison + 1.875). + +** Changes in regular C parsers (yacc.c): + +*** The generated header is included + + Instead of duplicating the content of the generated header (definition of + YYSTYPE, yyltype etc.), the generated parser now includes it, as was + already the case for GLR or C++ parsers. + * Noteworthy changes in release 2.5.1 (2012-06-05) [stable] ** Future changes: diff --git a/data/glr.c b/data/glr.c index 7ebc65c0..223aa1e9 100644 --- a/data/glr.c +++ b/data/glr.c @@ -203,7 +203,7 @@ m4_if(b4_prefix, [yy], [], ]b4_null_define[ ]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]], - [b4_shared_declarations])[ + [b4_shared_declarations])[ /* Enabling traces. */ #ifndef YYDEBUG diff --git a/data/yacc.c b/data/yacc.c index 079e488c..d5000da0 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -319,7 +319,8 @@ m4_if(b4_prefix, [yy], [], # define YYTOKEN_TABLE ]b4_token_table[ #endif -]b4_shared_declarations[ +]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]], + [b4_shared_declarations])[ /* Copy the second part of user declarations. */ ]b4_user_post_prologue