From 0f11eec272453d5646e5aeda135650b4fb8ac33d Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 12 Jun 2012 16:15:14 +0200 Subject: [PATCH] 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. --- NEWS | 14 ++++++++++++++ data/glr.c | 2 +- data/yacc.c | 3 ++- 3 files changed, 17 insertions(+), 2 deletions(-) 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 -- 2.45.2