From 91aadcc7a93555d18cec64684b26e674c9c2a539 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 5 Jun 2012 10:16:02 +0200 Subject: [PATCH 1/9] maint: post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. --- .prev-version | 2 +- NEWS | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.prev-version b/.prev-version index 95e3ba81..73462a5a 100644 --- a/.prev-version +++ b/.prev-version @@ -1 +1 @@ -2.5 +2.5.1 diff --git a/NEWS b/NEWS index d105f79c..393538c7 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ GNU Bison NEWS +* Noteworthy changes in release ?.? (????-??-??) [?] + * Noteworthy changes in release 2.5.1 (2012-06-05) [stable] ** Future changes: @@ -92,7 +94,7 @@ GNU Bison NEWS This includes warnings with some compilers, unexpected behavior of tools such as diff, warning messages from the test suite itself, etc. -*** The install-pdf target work properly: +*** The install-pdf target works properly: Running "make install-pdf" (or -dvi, -html, -info, and -ps) no longer halts in the middle of its course. From c4576b484a4c211fcbf739d32fa0258f9c3d2719 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 5 Jun 2012 11:08:41 +0200 Subject: [PATCH 2/9] maint: cfg.mk: simplify * cfg.mk: Remove bits provided by maint.mk. --- cfg.mk | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cfg.mk b/cfg.mk index a208fe9c..9c1b838e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -22,13 +22,6 @@ _is-dist-target = $(filter-out %clean maintainer-check% maintainer-%-check, \ $(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS))) -# Use alpha.gnu.org for alpha and beta releases. -# Use ftp.gnu.org for major releases. -gnu_ftp_host-alpha = alpha.gnu.org -gnu_ftp_host-beta = alpha.gnu.org -gnu_ftp_host-major = ftp.gnu.org -gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE)) - url_dir_list = \ ftp://$(gnu_rel_host)/gnu/bison From f763e6ef67b44689548d8cbaf557190b8181634b Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 5 Jun 2012 11:09:07 +0200 Subject: [PATCH 3/9] maint: cfg.mk: manual title. * cfg.mk (manuel_title): New. --- cfg.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cfg.mk b/cfg.mk index 9c1b838e..c56e965b 100644 --- a/cfg.mk +++ b/cfg.mk @@ -1,5 +1,4 @@ # Customize maint.mk -*- makefile -*- - # Copyright (C) 2008-2012 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify @@ -15,6 +14,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# Used in maint.mk's web-manual rule +manual_title = The Yacc-compatible Parser Generator + # It's useful to run maintainer-*check* targets during development, but we # don't want to wait on a recompile because of an update to $(VERSION). Thus, # override the _is-dist-target from GNUmakefile so that maintainer-*check* From cc9fb4f6b60cc37d6008ae24209ecf24179359fc Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 5 Jun 2012 11:07:50 +0200 Subject: [PATCH 4/9] gnulib: update readme-release. * gnulib (readme-release): Now includes the modules it promotes. * bootstrap.conf: Simplify accordingly. --- bootstrap.conf | 1 - build-aux/.gitignore | 2 ++ gnulib | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bootstrap.conf b/bootstrap.conf index 76c1ea53..e7354675 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -20,7 +20,6 @@ gnulib_modules=' announce-gen argmatch assert calloc-posix close closeout config-h c-strcase configmake dirname - do-release-commit-and-tag error extensions fdl fopen-safer gendocs getopt-gnu gettext git-version-gen gitlog-to-changelog gpl-3.0 hash inttypes isnan javacomp-script diff --git a/build-aux/.gitignore b/build-aux/.gitignore index 3733f468..d8efe9f9 100644 --- a/build-aux/.gitignore +++ b/build-aux/.gitignore @@ -24,3 +24,5 @@ /warn-on-use.h /ylwrap /do-release-commit-and-tag +/gnu-web-doc-update +/gnupload diff --git a/gnulib b/gnulib index 338dd5d4..db60bb41 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit 338dd5d4362fdf5fb29b843d4d8a8f845bc750de +Subproject commit db60bb41e9f676668f9b0e08e1e7fed4df3ab553 From 6733d0247657f0f46a9fd27e3525b83bae24ae13 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Thu, 7 Jun 2012 14:41:56 +0200 Subject: [PATCH 5/9] maint: improve release procedure instructions. * gnulib: Update, in particular (README-release). * bootstrap.conf: don't require gendocs, provided by gnu-web-doc-update, provided by readme-release. * README-hacking: Update accordingly. --- README-hacking | 37 ++++++++++++------------------------- bootstrap.conf | 6 +++--- gnulib | 2 +- 3 files changed, 16 insertions(+), 29 deletions(-) diff --git a/README-hacking b/README-hacking index b3364ac3..cfb4b312 100644 --- a/README-hacking +++ b/README-hacking @@ -248,25 +248,10 @@ copyright statement for each Bison file, check the copyright statements that the skeletons insert into generated parsers, and check all occurrences of PACKAGE_COPYRIGHT_YEAR in configure.ac. -** Update NEWS -The version number, *and* the date of the release (including for -betas). +** Update NEWS, commit and tag. +See do-release-commit-and-tag in README-release. -** Mention the release name in a commit message -Should have an entry similar to "Version 2.3b.". - -** Tag the release -Before Bison will build with the right version number, you must tag -the release in git. Do this after all other changes. The command is -similar to: - - git tag -a v2.3b -m "Bison 2.3b." - -** Push -Once "make distcheck" passes, push your changes and the tag. -"git push" without arguments will not push the tag. - -** make alpha, beta, or release +** make alpha, beta, or stable See README-release. ** Upload @@ -287,8 +272,8 @@ where F125BDF3 should be replaced with your key ID. *** Using gnupload You need "ncftp". -At the end "make release" (or alpha/beta) will display the prodecure -to run. Just copy and paste it in your shell. +At the end "make stable" (or alpha/beta) will display the prodecure to +run. Just copy and paste it in your shell. *** By hand @@ -359,7 +344,8 @@ function 'index', once for the table of contents); you can ignore this issue. ** Announce -To generate a template announcement file: +The "make stable" (or alpha/beta) command just created a template, +$HOME/announce-bison-X.Y. Otherwise, to generate it, run: make RELEASE_TYPE=alpha gpg_key_ID=F125BDF3 announcement @@ -379,11 +365,12 @@ newsgroup by sending email to compilers@iecc.com. Do not make any Cc as the moderator will throw away anything cross-posted or Cc'ed. It really needs to be a separate message. -** Bump the version number -In configure.ac. Run "make". So that developers don't accidentally add new -items to the old NEWS entry, create a new empty NEWS entry something like: +** Prepare NEWS +So that developers don't accidentally add new items to the old NEWS +entry, create a new empty entry in line 3 (without the two leading +spaces): - Changes in version ?.? (????-??-??): + * Noteworthy changes in release ?.? (????-??-??) [?] Push these changes. diff --git a/bootstrap.conf b/bootstrap.conf index e7354675..aa05e340 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -17,13 +17,13 @@ # gnulib modules used by this package. gnulib_modules=' - announce-gen argmatch assert calloc-posix close closeout config-h c-strcase + argmatch assert calloc-posix close closeout config-h c-strcase configmake dirname - error extensions fdl fopen-safer gendocs getopt-gnu + error extensions fdl fopen-safer getopt-gnu gettext git-version-gen gitlog-to-changelog gpl-3.0 hash inttypes isnan javacomp-script - javaexec-script ldexpl maintainer-makefile malloc-gnu mbschr mbsrchr + javaexec-script ldexpl malloc-gnu mbschr mbsrchr mbswidth obstack perror progname quote quotearg readme-release diff --git a/gnulib b/gnulib index db60bb41..b42157dd 160000 --- a/gnulib +++ b/gnulib @@ -1 +1 @@ -Subproject commit db60bb41e9f676668f9b0e08e1e7fed4df3ab553 +Subproject commit b42157dd01e3243646f5a8270c09ee125a8aca21 From 6537c71fcc74ee3401b2ccf5434b1fa2a470bd84 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 8 Jun 2012 09:00:58 +0200 Subject: [PATCH 6/9] maint: fix spello. * README-hacking: Here. * THANKS: Reported by Gilles Espinasse. --- README-hacking | 2 +- THANKS | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README-hacking b/README-hacking index cfb4b312..5fab96c1 100644 --- a/README-hacking +++ b/README-hacking @@ -272,7 +272,7 @@ where F125BDF3 should be replaced with your key ID. *** Using gnupload You need "ncftp". -At the end "make stable" (or alpha/beta) will display the prodecure to +At the end "make stable" (or alpha/beta) will display the procedure to run. Just copy and paste it in your shell. *** By hand diff --git a/THANKS b/THANKS index e3bf221b..284c5a91 100644 --- a/THANKS +++ b/THANKS @@ -43,6 +43,7 @@ Frank Heckenbach frank@g-n-u.de Frans Englich frans.englich@telia.com Georg Sauthoff gsauthof@TechFak.Uni-Bielefeld.DE George Neuner gneuner2@comcast.net +Gilles Espinasse g.esp@free.fr Goran Uddeborg goeran@uddeborg.se Guido Trentalancia trentalg@aston.ac.uk H. Merijn Brand h.m.brand@hccnet.nl From 02287ec65002d4967927ba3cf22f6fdc634c4291 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 8 Jun 2012 09:02:09 +0200 Subject: [PATCH 7/9] tests: remove all the -On flags. * tests/atlocal.in: Here. Reported by Gilles Espinasse. --- tests/atlocal.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/atlocal.in b/tests/atlocal.in index 72a9bf75..7302209f 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -29,9 +29,11 @@ CPPFLAGS="-I$abs_top_builddir/lib @CPPFLAGS@" # Is the compiler GCC? GCC='@GCC@' -# We want no optimization. - O0CFLAGS=`echo '@CFLAGS@' | sed 's/-O[0-9] *//'` -O0CXXFLAGS=`echo '@CXXFLAGS@' | sed 's/-O[0-9] *//'` +# We want no optimization, as they uncover warnings (therefore, +# failures) about uninitialized variables in the test suite. FIXME: +# fix the warnings, not the flags. + O0CFLAGS=`echo '@CFLAGS@' | sed 's/-O[0-9s] *//g'` +O0CXXFLAGS=`echo '@CXXFLAGS@' | sed 's/-O[0-9s] *//g'` # Sometimes a test group needs to ignore gcc warnings, so it locally # sets CFLAGS to this. From e9807a79348dee60a4d83c2b1281e9e3678b8287 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 12 Jun 2012 09:27:12 +0200 Subject: [PATCH 8/9] glr.c: minor refactoring. * data/glr.c (b4_shared_declarations): Move from the generated file section, to the M4 prologue. --- data/glr.c | 74 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/data/glr.c b/data/glr.c index 5f7aac84..7588bd10 100644 --- a/data/glr.c +++ b/data/glr.c @@ -154,43 +154,14 @@ m4_define([b4_rhs_location], [(((yyGLRStackItem const *)yyvsp)@{YYFILL (($2) - ($1))@}.yystate.yyloc)]) - ## -------------- ## -## Output files. ## +## Declarations. ## ## -------------- ## -# We do want M4 expansion after # for CPP macros. -m4_changecom() -m4_divert_push(0)dnl -@output(b4_parser_file_name@)@ -b4_copyright([Skeleton implementation for Bison GLR parsers in C], - [2002-2012]) -[ -/* C GLR parser skeleton written by Paul Hilfinger. */ - -]b4_identification - -b4_percent_code_get([[top]])[]dnl -m4_if(b4_prefix, [yy], [], -[/* Substitute the variable and function names. */ -#define yyparse b4_prefix[]parse -#define yylex b4_prefix[]lex -#define yyerror b4_prefix[]error -#define yylval b4_prefix[]lval -#define yychar b4_prefix[]char -#define yydebug b4_prefix[]debug -#define yynerrs b4_prefix[]nerrs -#define yylloc b4_prefix[]lloc])[ - -/* Copy the first part of user declarations. */ -]b4_user_pre_prologue - -b4_null_define - -dnl # b4_shared_declarations -dnl # ---------------------- -dnl # Declaration that might either go into the header (if --defines) -dnl # or open coded in the parser body. +# b4_shared_declarations +# ---------------------- +# Declaration that might either go into the header (if --defines) +# or open coded in the parser body. m4_define([b4_shared_declarations], [b4_percent_code_get([[requires]])[]dnl @@ -223,7 +194,40 @@ typedef struct YYLTYPE ]b4_percent_code_get([[provides]])[]dnl ]) -b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]], + +## -------------- ## +## Output files. ## +## -------------- ## + +# We do want M4 expansion after # for CPP macros. +m4_changecom() +m4_divert_push(0)dnl +@output(b4_parser_file_name@)@ +b4_copyright([Skeleton implementation for Bison GLR parsers in C], + [2002-2012]) +[ +/* C GLR parser skeleton written by Paul Hilfinger. */ + +]b4_identification + +b4_percent_code_get([[top]])[]dnl +m4_if(b4_prefix, [yy], [], +[/* Substitute the variable and function names. */ +#define yyparse b4_prefix[]parse +#define yylex b4_prefix[]lex +#define yyerror b4_prefix[]error +#define yylval b4_prefix[]lval +#define yychar b4_prefix[]char +#define yydebug b4_prefix[]debug +#define yynerrs b4_prefix[]nerrs +#define yylloc b4_prefix[]lloc])[ + +/* Copy the first part of user declarations. */ +]b4_user_pre_prologue[ + +]b4_null_define[ + +]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]], [b4_shared_declarations])[ /* Enabling traces. */ From c0828abf9d81ce665d5dc9b5a2b2062e267d4114 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 12 Jun 2012 10:55:18 +0200 Subject: [PATCH 9/9] skeletons: factor yacc.c and glr.c. yacc.c and glr.c share common declarations. Their YYLTYPE are exactly equal, and their YYSTYPE are sufficiently alike to be fused (its declaration was protected by YYSTYPE_IS_DECLARED in yacc.c, but not in glr.c). Besides, yacc.c duplicated the definitions of YYLTYPE and YYSTYPE (*.h/*.c). * data/c.m4 (b4_declare_yylstype): New. * data/yacc.c, data/glr.c: Use it. --- data/c.m4 | 37 +++++++++++++++++++++++ data/glr.c | 31 ++----------------- data/yacc.c | 86 +++++++++-------------------------------------------- 3 files changed, 54 insertions(+), 100 deletions(-) diff --git a/data/c.m4 b/data/c.m4 index b49d6dc9..64f68fec 100644 --- a/data/c.m4 +++ b/data/c.m4 @@ -530,3 +530,40 @@ b4_locations_if([, yylocationp])[]b4_user_args[); YYFPRINTF (yyoutput, ")"); }]dnl ]) + +## -------------- ## +## Declarations. ## +## -------------- ## + +# b4_declare_yylstype +# ------------------ +# Declaration that might either go into the header (if --defines) +# or open coded in the parser body. Declare YYSTYPE and YYLTYPE. +m4_define([b4_declare_yylstype], +[[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +]m4_ifdef([b4_stype], +[[typedef union ]b4_union_name[ +{ +]b4_user_stype[ +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1]], +[m4_if(b4_tag_seen_flag, 0, +[[typedef int YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1]])])[ +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif]b4_locations_if([[ + +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +typedef struct YYLTYPE +{ + int first_line; + int first_column; + int last_line; + int last_column; +} YYLTYPE; +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 +#endif]]) +]) diff --git a/data/glr.c b/data/glr.c index 7588bd10..7ebc65c0 100644 --- a/data/glr.c +++ b/data/glr.c @@ -163,34 +163,9 @@ m4_define([b4_rhs_location], # Declaration that might either go into the header (if --defines) # or open coded in the parser body. m4_define([b4_shared_declarations], -[b4_percent_code_get([[requires]])[]dnl - -b4_token_enums(b4_tokens) - -[#ifndef YYSTYPE -]m4_ifdef([b4_stype], -[[typedef union ]b4_union_name[ -{ -]b4_user_stype[ -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1]], -[m4_if(b4_tag_seen_flag, 0, -[[typedef int YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1]])])[ -#endif -]b4_locations_if([[ -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif -]])[ +[b4_percent_code_get([[requires]])[ +]b4_token_enums(b4_tokens)[ +]b4_declare_yylstype[ ]b4_percent_code_get([[provides]])[]dnl ]) diff --git a/data/yacc.c b/data/yacc.c index dbaff877..5ba271cb 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -158,9 +158,9 @@ m4_define([b4_rhs_location], [(yylsp@{($2) - ($1)@})]) -## ------------------ ## -## Parser variables. ## -## ------------------ ## +## -------------- ## +## Declarations. ## +## -------------- ## # b4_declare_scanner_communication_variables # ------------------------------------------ @@ -224,10 +224,9 @@ m4_define([b4_declare_parser_state_variables], [b4_pure_if([[ yytype_int16 *yyes; YYSIZE_T yyes_capacity;]])]) - -## --------------------------------------------------------- ## -## Defining symbol actions, e.g., printers and destructors. ## -## --------------------------------------------------------- ## +## -------------- ## +## Output files. ## +## -------------- ## # We do want M4 expansion after # for CPP macros. m4_changecom() @@ -287,37 +286,10 @@ m4_if(b4_prefix, [yy], [], # define YYTOKEN_TABLE ]b4_token_table[ #endif -]b4_percent_code_get([[requires]])[]dnl - -b4_token_enums_defines(b4_tokens)[ - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -]m4_ifdef([b4_stype], -[[typedef union ]b4_union_name[ -{ -]b4_user_stype[ -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1]], -[m4_if(b4_tag_seen_flag, 0, -[[typedef int YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1]])])[ -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif]b4_locations_if([[ - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif]])b4_push_if([[ - +]b4_percent_code_get([[requires]])[ +]b4_token_enums_defines(b4_tokens)[ +]b4_declare_yylstype[ +]b4_push_if([[ #ifndef YYPUSH_DECLS # define YYPUSH_DECLS struct yypstate; @@ -2076,40 +2048,10 @@ b4_copyright([Bison interface for Yacc-like parsers in C], b4_percent_code_get([[requires]])[]dnl -b4_token_enums_defines(b4_tokens) - -[#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -]m4_ifdef([b4_stype], -[[typedef union ]b4_union_name[ -{ -]b4_user_stype[ -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1]], -[m4_if(b4_tag_seen_flag, 0, -[[typedef int YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1]])])[ -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -]b4_pure_if([], [[extern YYSTYPE ]b4_prefix[lval;]]) - -b4_locations_if( -[#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - -]b4_pure_if([], [[extern YYLTYPE ]b4_prefix[lloc;]]) -)dnl b4_locations_if +b4_token_enums_defines(b4_tokens)[ +]b4_declare_yylstype[ +]b4_pure_if([], [[extern YYSTYPE ]b4_prefix[lval; +]b4_locations_if([[extern YYLTYPE ]b4_prefix[lloc;]])])dnl b4_push_if([[ #ifndef YYPUSH_DECLS # define YYPUSH_DECLS