diff --git a/AUTHORS b/AUTHORS index fa4b1715..8ba23355 100644 --- a/AUTHORS +++ b/AUTHORS @@ -24,7 +24,7 @@ and nasty bugs. ----- -Copyright (C) 1998-2013 Free Software Foundation, Inc. +Copyright (C) 1998-2015 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. diff --git a/ChangeLog-2012 b/ChangeLog-2012 index 458a9e55..abc1adb6 100644 --- a/ChangeLog-2012 +++ b/ChangeLog-2012 @@ -26733,7 +26733,7 @@ ----- - Copyright (C) 1987-1988, 1991-2013 Free Software Foundation, + Copyright (C) 1987-1988, 1991-2015 Free Software Foundation, Inc. Copying and distribution of this file, with or without diff --git a/Makefile.am b/Makefile.am index becd1d39..fd3db0f1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2015 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/NEWS b/NEWS index e6521bf9..490e89ed 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,20 @@ GNU Bison NEWS ** Bug fixes +*** Named %union support + + Bison 3.0 introduced a regression on named %union such as + + %union foo { int ival; }; + + The possibility to use a name was introduced ``for Yacc compatibility''. + It is however not required by POSIX Yacc, and its usefulness is not clear. + +*** %define api.value.type union with %defines + + The yacc.c and glr.c parsers were broken when %defines was used + together with "%define api.value.type union". + *** Redeclarations are reported in proper order On @@ -2718,7 +2732,7 @@ Output file does not redefine const for C++. ----- -Copyright (C) 1995-2013 Free Software Foundation, Inc. +Copyright (C) 1995-2015 Free Software Foundation, Inc. This file is part of Bison, the GNU Parser Generator. diff --git a/PACKAGING b/PACKAGING index c8bbbf6b..1110aa32 100644 --- a/PACKAGING +++ b/PACKAGING @@ -36,7 +36,7 @@ to the bison package. ----- -Copyright (C) 2002, 2005, 2009-2013 Free Software Foundation, Inc. +Copyright (C) 2002, 2005, 2009-2015 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. diff --git a/README b/README index ed393c28..9cdf33d3 100644 --- a/README +++ b/README @@ -44,7 +44,7 @@ End: ----- -Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2013 Free Software +Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2015 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. diff --git a/README-alpha b/README-alpha index cf065eed..f0aa3c97 100644 --- a/README-alpha +++ b/README-alpha @@ -12,7 +12,7 @@ the problems you encounter. ----- -Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc. +Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc. This file is part of GNU Bison. diff --git a/README-hacking b/README-hacking index ab82a3a2..4b773745 100644 --- a/README-hacking +++ b/README-hacking @@ -449,7 +449,7 @@ Push these changes. ----- -Copyright (C) 2002-2005, 2007-2013 Free Software Foundation, Inc. +Copyright (C) 2002-2005, 2007-2015 Free Software Foundation, Inc. This file is part of GNU Bison. diff --git a/THANKS b/THANKS index ebadb447..2436f004 100644 --- a/THANKS +++ b/THANKS @@ -1,7 +1,8 @@ Bison was originally written by Robert Corbett. It would not be what it is today without the invaluable help of these people: -Аскар Сафин safinaskar@mail.ru +Aaro Koskinen aaro.koskinen@iki.fi +Аскар Сафин safinaskar@mail.ru Airy Andre Airy.Andre@edf.fr Akim Demaille akim@lrde.epita.fr Albert Chin-A-Young china@thewrittenword.com @@ -16,6 +17,7 @@ Art Haas ahaas@neosoft.com Baron Schwartz baron@sequent.org Ben Pfaff blp@cs.stanford.edu Benoit Perrot benoit.perrot@epita.fr +Bernd Edlinger bernd.edlinger@hotmail.de Bernd Kiefer kiefer@dfki.de Bert Deknuydt Bert.Deknuydt@esat.kuleuven.ac.be Bill Allombert Bill.Allombert@math.u-bordeaux1.fr @@ -66,9 +68,9 @@ Johan van Selst johans@stack.nl Jonathan Fabrizio jonathan.fabrizio@lrde.epita.fr Jonathan Nieder jrnieder@gmail.com Juan Manuel Guerrero juan.guerrero@gmx.de -Ken Moffat zarniwhoop@ntlworld.com Kees Zeelenberg kzlg@users.sourceforge.net Keith Browne kbrowne@legato.com +Ken Moffat zarniwhoop@ntlworld.com Laurent Mascherpa laurent.mascherpa@epita.fr Lie Yan lie.yan@kaust.edu.sa Magnus Fromreide magfr@lysator.liu.se @@ -112,11 +114,12 @@ Quoc Peyrot chojin@lrde.epita.fr R Blake blakers@mac.com Raja R Harinath harinath@cs.umn.edu Ralf Wildenhues Ralf.Wildenhues@gmx.de +Rich Wilson richaw@gmail.com Richard Stallman rms@gnu.org Rici Lake ricilake@gmail.com +Rob Conde rob.conde@ai-solutions.com Rob Vermaas rob.vermaas@gmail.com Robert Anisko anisko_r@epita.fr -Rob Conde rob.conde@ai-solutions.com Roland Levillain roland@lrde.epita.fr Satya Kiran Popuri satyakiran@gmail.com Sebastian Setzer sebastian.setzer.ext@siemens.com @@ -124,6 +127,7 @@ Sebastien Fricker sebastien.fricker@gmail.com Sergei Steshenko sergstesh@yahoo.com Shura debil_urod@ngs.ru Stefano Lattarini stefano.lattarini@gmail.com +Stephen Cameron stephenmcameron@gmail.com Steve Murphy murf@parsetree.com Sum Wu sum@geekhouse.org Théophile Ranquet theophile.ranquet@gmail.com @@ -131,6 +135,7 @@ Thiru Ramakrishnan thiru.ramakrishnan@gmail.com Tim Josling tej@melbpc.org.au Tim Landscheidt tim@tim-landscheidt.de Tim Van Holder tim.van.holder@pandora.be +Tobias Frost tobi@debian.org Tom Lane tgl@sss.pgh.pa.us Tom Tromey tromey@cygnus.com Tommy Nordgren tommy.nordgren@chello.se @@ -146,6 +151,7 @@ Wojciech Polak polak@gnu.org Wolfgang S. Kechel wolfgang.kechel@prs.de Wolfram Wagner ww@mpi-sb.mpg.de Wwp subscript@free.fr +xolodho xolodho@gmail.com Zack Weinberg zack@codesourcery.com Many people are not named here because we lost track of them. We @@ -158,7 +164,7 @@ End: ----- -Copyright (C) 2000-2013 Free Software Foundation, Inc. +Copyright (C) 2000-2015 Free Software Foundation, Inc. This file is part of Bison, the GNU Parser Generator. diff --git a/TODO b/TODO index 09fce089..7d4a5fb4 100644 --- a/TODO +++ b/TODO @@ -369,7 +369,7 @@ End: ----- -Copyright (C) 2001-2004, 2006, 2008-2013 Free Software Foundation, Inc. +Copyright (C) 2001-2004, 2006, 2008-2015 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. diff --git a/bootstrap b/bootstrap index e31d17df..2fdf2674 100755 --- a/bootstrap +++ b/bootstrap @@ -1,10 +1,10 @@ #! /bin/sh # Print a version string. -scriptversion=2013-08-15.22; # UTC +scriptversion=2014-12-08.12; # UTC # Bootstrap this package from checked-out sources. -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,6 +42,9 @@ export LC_ALL local_gl_dir=gl +# Honour $PERL, but work even if there is none +PERL="${PERL-perl}" + me=$0 usage() { @@ -210,7 +213,17 @@ bootstrap_sync=false use_git=true check_exists() { - ($1 --version /dev/null 2>&1 + if test "$1" = "--verbose"; then + ($2 --version /dev/null 2>&1 + if test $? -ge 126; then + # If not found, run with diagnostics as one may be + # presented with env variables to set to find the right version + ($2 --version /dev/null 2>&1 + fi + test $? -lt 126 } @@ -408,7 +421,7 @@ sort_ver() { # sort -V is not generally available get_version() { app=$1 - $app --version >/dev/null 2>&1 || return 1 + $app --version >/dev/null 2>&1 || { $app --version; return 1; } $app --version 2>&1 | sed -n '# Move version to start of line. @@ -446,6 +459,7 @@ check_versions() { test "$appvar" = TAR && appvar=AMTAR case $appvar in GZIP) ;; # Do not use $GZIP: it contains gzip options. + PERL::*) ;; # Keep perl modules as-is *) eval "app=\${$appvar-$app}" ;; esac @@ -463,11 +477,22 @@ check_versions() { ret=1 continue } ;; + # Another check is for perl modules. These can be written as + # e.g. perl::XML::XPath in case of XML::XPath module, etc. + perl::*) + # Extract module name + app="${app#perl::}" + if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then + warn_ "Error: perl module '$app' not found" + ret=1 + fi + continue + ;; esac if [ "$req_ver" = "-" ]; then # Merely require app to exist; not all prereq apps are well-behaved # so we have to rely on $? rather than get_version. - if ! check_exists $app; then + if ! check_exists --verbose $app; then warn_ "Error: '$app' not found" ret=1 fi @@ -551,6 +576,14 @@ if ! printf "$buildreq" | check_versions; then fi fi +# Warn the user if autom4te appears to be broken; this causes known +# issues with at least gettext 0.18.3. +probe=$(echo 'm4_quote([hi])' | autom4te -l M4sugar -t 'm4_quote:$%' -) +if test "x$probe" != xhi; then + warn_ "WARNING: your autom4te wrapper eats stdin;" + warn_ "if bootstrap fails, consider upgrading your autotools" +fi + echo "$0: Bootstrapping from checked-out $package sources..." # See if we can use gnulib's git-merge-changelog merge driver. @@ -590,8 +623,8 @@ case ${GNULIB_SRCDIR--} in # Note that $use_git is necessarily true in this case. if git_modules_config submodule.gnulib.url >/dev/null; then echo "$0: getting gnulib files..." - git submodule init || exit $? - git submodule update || exit $? + git submodule init -- "$gnulib_path" || exit $? + git submodule update -- "$gnulib_path" || exit $? elif [ ! -d "$gnulib_path" ]; then echo "$0: getting gnulib files..." @@ -620,13 +653,14 @@ case ${GNULIB_SRCDIR--} in # This fallback allows at least git 1.5.5. if test -f "$gnulib_path"/gnulib-tool; then # Since file already exists, assume submodule init already complete. - git submodule update || exit $? + git submodule update -- "$gnulib_path" || exit $? else # Older git can't clone into an empty directory. rmdir "$gnulib_path" 2>/dev/null git clone --reference "$GNULIB_SRCDIR" \ "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \ - && git submodule init && git submodule update \ + && git submodule init -- "$gnulib_path" \ + && git submodule update -- "$gnulib_path" \ || exit $? fi fi diff --git a/bootstrap.conf b/bootstrap.conf index 186afa71..3bdf6c4a 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -1,6 +1,6 @@ # Bootstrap configuration. -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/build-aux/darwin11.4.0.valgrind b/build-aux/darwin11.4.0.valgrind index c5c3bd9c..9b0b06f3 100644 --- a/build-aux/darwin11.4.0.valgrind +++ b/build-aux/darwin11.4.0.valgrind @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2013 Free Software Foundation, Inc. +# Copyright (C) 2012-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/build-aux/git-log-fix b/build-aux/git-log-fix index 72111507..39bbbdb8 100644 --- a/build-aux/git-log-fix +++ b/build-aux/git-log-fix @@ -2,6 +2,9 @@ # option. It specifies what changes to make to each given SHA1's commit # log and metadata, using Perl-eval'able expressions. +975bb564319aa4f4204c48aba265757ba207a80f +s/Edligner/Edlinger/; + 0db2648930e3b6c376a539aabe368aade83ee29a s/--flags/--feature/; s/flag_flag/feature_flag/; diff --git a/build-aux/local.mk b/build-aux/local.mk index f92b3bd7..7d752c86 100644 --- a/build-aux/local.mk +++ b/build-aux/local.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2000-2013 Free Software Foundation, Inc. +# Copyright (C) 2000-2015 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/build-aux/update-b4-copyright b/build-aux/update-b4-copyright index 5ba7dd66..901ff05b 100755 --- a/build-aux/update-b4-copyright +++ b/build-aux/update-b4-copyright @@ -3,7 +3,7 @@ # Update b4_copyright invocations or b4_copyright_years definitions to # include the current year. -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/build-aux/update-package-copyright-year b/build-aux/update-package-copyright-year index c36c8082..f2adedf7 100755 --- a/build-aux/update-package-copyright-year +++ b/build-aux/update-package-copyright-year @@ -2,7 +2,7 @@ # In configure.ac, update PACKAGE_COPYRIGHT_YEAR to the current year. -# Copyright (C) 2010-2013 Free Software Foundation, Inc. +# Copyright (C) 2010-2015 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/cfg.mk b/cfg.mk index 1939ae47..7d0fe9a5 100644 --- a/cfg.mk +++ b/cfg.mk @@ -1,5 +1,5 @@ # Customize maint.mk -*- makefile -*- -# Copyright (C) 2008-2013 Free Software Foundation, Inc. +# Copyright (C) 2008-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/configure.ac b/configure.ac index 2658d73e..559b5054 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # Configure template for GNU Bison. -*-Autoconf-*- # -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2015 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ m4_pattern_forbid([^gl_[A-Z]]) AC_INIT([GNU Bison], m4_esyscmd([build-aux/git-version-gen .tarball-version]), [bug-bison@gnu.org]) -AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2013]) +AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2015]) AC_DEFINE_UNQUOTED([PACKAGE_COPYRIGHT_YEAR], [$PACKAGE_COPYRIGHT_YEAR], [The copyright year for this package]) @@ -237,6 +237,9 @@ case $VALGRIND:$host_os in ;; esac +# Whether we cannot run the compiled bison. +AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes]) + AM_MISSING_PROG([AUTOM4TE], [autom4te]) # Needed by tests/atlocal.in. AC_SUBST([GCC]) diff --git a/data/README b/data/README index 842c0041..4b3e5561 100644 --- a/data/README +++ b/data/README @@ -52,7 +52,7 @@ into various formats. ----- -Copyright (C) 2002, 2008-2013 Free Software Foundation, Inc. +Copyright (C) 2002, 2008-2015 Free Software Foundation, Inc. This file is part of GNU Bison. diff --git a/data/bison.m4 b/data/bison.m4 index ca27159c..da59baf5 100644 --- a/data/bison.m4 +++ b/data/bison.m4 @@ -2,7 +2,7 @@ # Language-independent M4 Macros for Bison. -# Copyright (C) 2002, 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -1061,3 +1061,6 @@ b4_percent_define_ifdef([api.value.type], [['%s' and '%s' cannot be used together]], [%yacc], [%define api.value.type "union"])])])]) + +# api.value.union.name. +b4_percent_define_check_kind([api.value.union.name], [keyword]) diff --git a/data/c++-skel.m4 b/data/c++-skel.m4 index 06597a8b..9117262c 100644 --- a/data/c++-skel.m4 +++ b/data/c++-skel.m4 @@ -2,7 +2,7 @@ # C++ skeleton dispatching for Bison. -# Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/data/c++.m4 b/data/c++.m4 index be12c0a2..7c0fd78e 100644 --- a/data/c++.m4 +++ b/data/c++.m4 @@ -2,7 +2,7 @@ # C++ skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,6 +17,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# Sanity checks, before defaults installed by c.m4. +b4_percent_define_ifdef([[api.value.union.name]], + [b4_complain_at(b4_percent_define_get_loc([[api.value.union.name]]), + [named %union is invalid in C++])]) + m4_include(b4_pkgdatadir/[c.m4]) # b4_comment(TEXT, [PREFIX]) diff --git a/data/c-like.m4 b/data/c-like.m4 index eb06de2a..ff648a7d 100644 --- a/data/c-like.m4 +++ b/data/c-like.m4 @@ -2,7 +2,7 @@ # Common code for C-like languages (C, C++, Java, etc.) -# Copyright (C) 2012-2013 Free Software Foundation, Inc. +# Copyright (C) 2012-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/data/c-skel.m4 b/data/c-skel.m4 index 36904aaf..51fad177 100644 --- a/data/c-skel.m4 +++ b/data/c-skel.m4 @@ -2,7 +2,7 @@ # C skeleton dispatching for Bison. -# Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/data/c.m4 b/data/c.m4 index b0524ef3..738244d4 100644 --- a/data/c.m4 +++ b/data/c.m4 @@ -2,7 +2,7 @@ # C M4 Macros for Bison. -# Copyright (C) 2002, 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -97,7 +97,8 @@ m4_define([b4_api_PREFIX], m4_define_default([b4_prefix], [b4_api_prefix]) # If the %union is not named, its name is YYSTYPE. -m4_define_default([b4_union_name], [b4_api_PREFIX[]STYPE]) +b4_percent_define_default([[api.value.union.name]], + [b4_api_PREFIX[][STYPE]]) ## ------------------------ ## @@ -560,15 +561,15 @@ b4_locations_if([, yylocationp])[]b4_user_args[); # b4_symbol_type_register(SYMBOL-NUM) # ----------------------------------- # Symbol SYMBOL-NUM has a type (for variant) instead of a type-tag. -# Extend the definition of %union's body with a field of that type, -# and extend the symbol's "type" field to point to the field name, -# instead of the type name. +# Extend the definition of %union's body (b4_union_members) with a +# field of that type, and extend the symbol's "type" field to point to +# the field name, instead of the type name. m4_define([b4_symbol_type_register], [m4_define([b4_symbol($1, type_tag)], [b4_symbol_if([$1], [has_id], [b4_symbol([$1], [id])], [yytype_[]b4_symbol([$1], [number])])])dnl -m4_append([b4_user_union_members], +m4_append([b4_union_members], m4_expand([ b4_symbol_tag_comment([$1])dnl b4_symbol([$1], [type]) b4_symbol([$1], [type_tag]);])) @@ -608,10 +609,9 @@ m4_copy_force([b4_symbol_value_union], [b4_symbol_value]) ]) -# ---------------- # -# api.value.type. # -# ---------------- # - +# -------------------------- # +# api.value.type = variant. # +# -------------------------- # # b4_value_type_setup_variant # --------------------------- @@ -686,11 +686,13 @@ typedef ]b4_percent_define_get([[api.value.type]])[ ]b4_api_PREFIX[STYPE; [m4_bmatch(b4_percent_define_get([[api.value.type]]), [union\|union-directive], [[#if ! defined ]b4_api_PREFIX[STYPE && ! defined ]b4_api_PREFIX[STYPE_IS_DECLARED -typedef union ]b4_union_name[ ]b4_api_PREFIX[STYPE; -union ]b4_union_name[ +]b4_percent_define_get_syncline([[api.value.union.name]])[ +union ]b4_percent_define_get([[api.value.union.name]])[ { ]b4_user_union_members[ }; +]b4_percent_define_get_syncline([[api.value.union.name]])[ +typedef union ]b4_percent_define_get([[api.value.union.name]])[ ]b4_api_PREFIX[STYPE; # define ]b4_api_PREFIX[STYPE_IS_TRIVIAL 1 # define ]b4_api_PREFIX[STYPE_IS_DECLARED 1 #endif diff --git a/data/glr.c b/data/glr.c index c627a9b6..77fa23ac 100644 --- a/data/glr.c +++ b/data/glr.c @@ -2,7 +2,7 @@ # GLR skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -178,9 +178,42 @@ m4_if(b4_skeleton, ["glr.c"], ## Output files. ## ## -------------- ## +# Unfortunately the order of generation between the header and the +# implementation file matters (for glr.c) because of the current +# implementation of api.value.type=union. In that case we still use a +# union for YYSTYPE, but we generate the contents of this union when +# setting up YYSTYPE. This is needed for other aspects, such as +# defining yy_symbol_value_print, since we need to now the name of the +# members of this union. +# +# To avoid this issue, just generate the header before the +# implementation file. But we should also make them more independant. + +# ----------------- # +# The header file. # +# ----------------- # + +# glr.cc produces its own header. +m4_if(b4_skeleton, ["glr.c"], +[b4_defines_if( +[b4_output_begin([b4_spec_defines_file]) +b4_copyright([Skeleton interface for Bison GLR parsers in C], + [2002-2015])[ + +]b4_cpp_guard_open([b4_spec_defines_file])[ +]b4_shared_declarations[ +]b4_cpp_guard_close([b4_spec_defines_file])[ +]b4_output_end() +])]) + + +# ------------------------- # +# The implementation file. # +# ------------------------- # + b4_output_begin([b4_parser_file_name]) b4_copyright([Skeleton implementation for Bison GLR parsers in C], - [2002-2013])[ + [2002-2015])[ /* C GLR parser skeleton written by Paul Hilfinger. */ @@ -2539,16 +2572,3 @@ m4_if(b4_prefix, [yy], [], ]b4_epilogue[]dnl b4_output_end() - -# glr.cc produces its own header. -m4_if(b4_skeleton, ["glr.c"], -[b4_defines_if( -[b4_output_begin([b4_spec_defines_file]) -b4_copyright([Skeleton interface for Bison GLR parsers in C], - [2002-2013])[ - -]b4_cpp_guard_open([b4_spec_defines_file])[ -]b4_shared_declarations[ -]b4_cpp_guard_close([b4_spec_defines_file])[ -]b4_output_end() -])]) diff --git a/data/glr.cc b/data/glr.cc index e57308bd..fbb6de7b 100644 --- a/data/glr.cc +++ b/data/glr.cc @@ -1,6 +1,6 @@ # C++ GLR skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -329,7 +329,7 @@ b4_percent_define_flag_if([[global_tokens_and_yystype]], b4_defines_if( [b4_output_begin([b4_spec_defines_file]) b4_copyright([Skeleton interface for Bison GLR parsers in C++], - [2002-2013])[ + [2002-2015])[ // C++ GLR parser skeleton written by Akim Demaille. diff --git a/data/java-skel.m4 b/data/java-skel.m4 index 384a6370..9b5cb249 100644 --- a/data/java-skel.m4 +++ b/data/java-skel.m4 @@ -2,7 +2,7 @@ # Java skeleton dispatching for Bison. -# Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/data/java.m4 b/data/java.m4 index f985f977..b319626a 100644 --- a/data/java.m4 +++ b/data/java.m4 @@ -2,7 +2,7 @@ # Java language support for Bison -# Copyright (C) 2007-2013 Free Software Foundation, Inc. +# Copyright (C) 2007-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/data/lalr1.cc b/data/lalr1.cc index 876de8c9..1bbec8ae 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -1,6 +1,6 @@ # C++ skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -131,7 +131,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param))])]) m4_pushdef([b4_copyright_years], - [2002-2013]) + [2002-2015]) m4_define([b4_parser_class_name], [b4_percent_define_get([[parser_class_name]])]) diff --git a/data/lalr1.java b/data/lalr1.java index bd32fa75..670ea013 100644 --- a/data/lalr1.java +++ b/data/lalr1.java @@ -1,6 +1,6 @@ # Java skeleton for Bison -*- autoconf -*- -# Copyright (C) 2007-2013 Free Software Foundation, Inc. +# Copyright (C) 2007-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -84,7 +84,7 @@ m4_define([b4_define_state],[[ b4_output_begin([b4_parser_file_name]) b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java], - [2007-2013]) + [2007-2015]) b4_percent_define_ifdef([package], [package b4_percent_define_get([package]); ])[/* First part of user declarations. */ diff --git a/data/local.mk b/data/local.mk index b8290522..9b0b0680 100644 --- a/data/local.mk +++ b/data/local.mk @@ -1,4 +1,4 @@ -## Copyright (C) 2002, 2005-2013 Free Software Foundation, Inc. +## Copyright (C) 2002, 2005-2015 Free Software Foundation, Inc. ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by diff --git a/data/location.cc b/data/location.cc index e80742a5..8e8a2c27 100644 --- a/data/location.cc +++ b/data/location.cc @@ -1,6 +1,6 @@ # C++ skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # along with this program. If not, see . m4_pushdef([b4_copyright_years], - [2002-2013]) + [2002-2015]) # b4_position_define # ------------------ @@ -273,8 +273,7 @@ m4_define([b4_location_define], operator<< (std::basic_ostream& ostr, const location& loc) { unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; - ostr << loc.begin// << "(" << loc.end << ") " -; + ostr << loc.begin; if (loc.end.filename && (!loc.begin.filename || *loc.begin.filename != *loc.end.filename)) diff --git a/data/stack.hh b/data/stack.hh index aa64d63d..e7ff0405 100644 --- a/data/stack.hh +++ b/data/stack.hh @@ -1,6 +1,6 @@ # C++ skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # along with this program. If not, see . m4_pushdef([b4_copyright_years], - [2002-2013]) + [2002-2015]) # b4_stack_define # --------------- diff --git a/data/variant.hh b/data/variant.hh index 633c29ab..78c2f945 100644 --- a/data/variant.hh +++ b/data/variant.hh @@ -1,6 +1,6 @@ # C++ skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/data/xslt/bison.xsl b/data/xslt/bison.xsl index 10e3305b..9e60ad99 100644 --- a/data/xslt/bison.xsl +++ b/data/xslt/bison.xsl @@ -3,7 +3,7 @@