summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2018-06-17 18:43:59 +0200
committerAkim Demaille <akim.demaille@gmail.com>2018-06-17 18:43:59 +0200
commitf462a08572ef5ff8d43513c6b866895d20cf018b (patch)
tree9d54ad8f92aa835c38029f92902cb9ff0fb11a42
parentd6445ec10bf296f3652c2231167ced977b803f5d (diff)
parent0ac08d2d6c0558b375764f957d1fb367f91ab24f (diff)
downloadbison-f462a08572ef5ff8d43513c6b866895d20cf018b.tar.gz
Merge maint into master
* upstream/maint: (48 commits) THANKS: update an address tests: adjust syncline tests to GCC 7 glr: fix improperly placed synclines bison: be git grep friendly Replace ftp with https maint: post-release administrivia version 3.0.5 bison: style: indentation fixes regen bison: please address sanitizer C++: style: fix indentation NEWS: update C++: style: prefer `unsigned` to `unsigned int` C++: style: space before paren C++: fix -Wdeprecated warnings tests: fix -Wdeprecated warning maint: update syntax-check exclusions autoconf: update regen Update copyright years ...
-rw-r--r--.prev-version2
-rw-r--r--AUTHORS2
-rw-r--r--ChangeLog-20124
-rw-r--r--Makefile.am2
-rw-r--r--NEWS34
-rw-r--r--PACKAGING2
-rw-r--r--README4
-rw-r--r--README-alpha2
-rw-r--r--README-hacking191
-rw-r--r--THANKS8
-rw-r--r--TODO3
-rwxr-xr-xbootstrap269
-rw-r--r--bootstrap.conf4
-rw-r--r--build-aux/.gitignore6
-rw-r--r--build-aux/Darwin.valgrind (renamed from build-aux/darwin11.4.0.valgrind)2
-rw-r--r--build-aux/Linux.valgrind48
-rw-r--r--build-aux/linux-gnu.valgrind16
-rw-r--r--build-aux/local.mk14
-rw-r--r--build-aux/snippet/.gitignore4
-rwxr-xr-xbuild-aux/update-b4-copyright2
-rwxr-xr-xbuild-aux/update-package-copyright-year2
-rw-r--r--cfg.mk39
-rw-r--r--configure.ac28
-rw-r--r--data/README2
-rw-r--r--data/bison.m42
-rw-r--r--data/c++-skel.m43
-rw-r--r--data/c++.m466
-rw-r--r--data/c-like.m42
-rw-r--r--data/c-skel.m43
-rw-r--r--data/c.m45
-rw-r--r--data/glr.c26
-rw-r--r--data/glr.cc6
-rw-r--r--data/java-skel.m42
-rw-r--r--data/java.m42
-rw-r--r--data/lalr1.cc98
-rw-r--r--data/lalr1.java4
-rw-r--r--data/local.mk2
-rw-r--r--data/location.cc42
-rw-r--r--data/stack.hh35
-rw-r--r--data/variant.hh4
-rw-r--r--data/xslt/bison.xsl2
-rw-r--r--data/xslt/xml2dot.xsl2
-rw-r--r--data/xslt/xml2text.xsl2
-rw-r--r--data/xslt/xml2xhtml.xsl2
-rw-r--r--data/yacc.c15
-rw-r--r--djgpp/Makefile.maint2
-rw-r--r--djgpp/README.in2
-rw-r--r--djgpp/config.bat2
-rw-r--r--djgpp/config.sed2
-rw-r--r--djgpp/config.site2
-rw-r--r--djgpp/config_h.sed2
-rw-r--r--djgpp/djunpack.bat2
-rw-r--r--djgpp/local.mk2
-rw-r--r--djgpp/subpipe.c2
-rw-r--r--djgpp/subpipe.h2
-rw-r--r--djgpp/testsuite.sed2
-rw-r--r--doc/bison.texi97
-rw-r--r--doc/local.mk3
-rw-r--r--doc/refcard.tex3
-rw-r--r--etc/README2
-rwxr-xr-xetc/bench.pl.in4
-rw-r--r--etc/local.mk2
-rwxr-xr-xexamples/calc++/calc++.test2
-rw-r--r--examples/calc++/local.mk3
-rwxr-xr-xexamples/extexi4
-rw-r--r--examples/local.mk2
-rw-r--r--examples/mfcalc/local.mk3
-rwxr-xr-xexamples/mfcalc/mfcalc.test2
-rw-r--r--examples/rpcalc/local.mk3
-rwxr-xr-xexamples/rpcalc/rpcalc.test2
-rwxr-xr-xexamples/test2
-rw-r--r--examples/variant.yy21
m---------gnulib0
-rw-r--r--lib/.gitignore54
-rw-r--r--lib/abitset.c4
-rw-r--r--lib/abitset.h3
-rw-r--r--lib/bbitset.h4
-rw-r--r--lib/bitset.c3
-rw-r--r--lib/bitset.h3
-rw-r--r--lib/bitset_stats.c3
-rw-r--r--lib/bitset_stats.h3
-rw-r--r--lib/bitsetv-print.c2
-rw-r--r--lib/bitsetv-print.h3
-rw-r--r--lib/bitsetv.c2
-rw-r--r--lib/bitsetv.h3
-rw-r--r--lib/ebitset.c3
-rw-r--r--lib/ebitset.h3
-rw-r--r--lib/get-errno.c3
-rw-r--r--lib/get-errno.h2
-rw-r--r--lib/lbitset.c4
-rw-r--r--lib/lbitset.h3
-rw-r--r--lib/libiberty.h3
-rw-r--r--lib/local.mk2
-rw-r--r--lib/main.c2
-rw-r--r--lib/timevar.c2
-rw-r--r--lib/timevar.def3
-rw-r--r--lib/timevar.h4
-rw-r--r--lib/vbitset.c3
-rw-r--r--lib/vbitset.h3
-rw-r--r--lib/yyerror.c2
-rw-r--r--m4/.gitignore40
-rw-r--r--m4/bison-i18n.m43
-rw-r--r--m4/c-working.m42
-rw-r--r--m4/cxx.m43
-rw-r--r--m4/flex.m42
-rw-r--r--m4/timevar.m43
-rw-r--r--po/.gitignore4
-rw-r--r--runtime-po/.gitignore4
-rw-r--r--src/AnnotationList.c2
-rw-r--r--src/AnnotationList.h2
-rw-r--r--src/InadequacyList.c2
-rw-r--r--src/InadequacyList.h2
-rw-r--r--src/LR0.c4
-rw-r--r--src/LR0.h4
-rw-r--r--src/Sbitset.c2
-rw-r--r--src/Sbitset.h2
-rw-r--r--src/assoc.c4
-rw-r--r--src/assoc.h3
-rw-r--r--src/closure.c4
-rw-r--r--src/closure.h4
-rw-r--r--src/complain.c2
-rw-r--r--src/complain.h4
-rw-r--r--src/conflicts.c4
-rw-r--r--src/conflicts.h2
-rw-r--r--src/derives.c4
-rw-r--r--src/derives.h2
-rw-r--r--src/files.c2
-rw-r--r--src/files.h2
-rw-r--r--src/flex-scanner.h2
-rw-r--r--src/getargs.c16
-rw-r--r--src/getargs.h2
-rw-r--r--src/gram.c4
-rw-r--r--src/gram.h2
-rw-r--r--src/graphviz.c3
-rw-r--r--src/graphviz.h2
-rw-r--r--src/ielr.c2
-rw-r--r--src/ielr.h2
-rw-r--r--src/lalr.c4
-rw-r--r--src/lalr.h2
-rw-r--r--src/local.mk2
-rw-r--r--src/location.c2
-rw-r--r--src/location.h2
-rw-r--r--src/main.c4
-rw-r--r--src/muscle-tab.c2
-rw-r--r--src/muscle-tab.h3
-rw-r--r--src/named-ref.c2
-rw-r--r--src/named-ref.h2
-rw-r--r--src/nullable.c2
-rw-r--r--src/nullable.h3
-rw-r--r--src/output.c6
-rw-r--r--src/output.h2
-rw-r--r--src/parse-gram.c389
-rw-r--r--src/parse-gram.h36
-rw-r--r--src/parse-gram.y12
-rw-r--r--src/print-xml.c2
-rw-r--r--src/print-xml.h2
-rw-r--r--src/print.c2
-rw-r--r--src/print.h2
-rw-r--r--src/print_graph.c3
-rw-r--r--src/print_graph.h3
-rw-r--r--src/reader.c2
-rw-r--r--src/reader.h2
-rw-r--r--src/reduce.c2
-rw-r--r--src/reduce.h4
-rw-r--r--src/relation.c4
-rw-r--r--src/relation.h3
-rw-r--r--src/scan-code.h3
-rw-r--r--src/scan-code.l2
-rw-r--r--src/scan-gram.h3
-rw-r--r--src/scan-gram.l2
-rw-r--r--src/scan-skel.h3
-rw-r--r--src/scan-skel.l2
-rw-r--r--src/state.c3
-rw-r--r--src/state.h4
-rw-r--r--src/symlist.c4
-rw-r--r--src/symlist.h4
-rw-r--r--src/symtab.c2
-rw-r--r--src/symtab.h4
-rw-r--r--src/system.h3
-rw-r--r--src/tables.c2
-rw-r--r--src/tables.h3
-rw-r--r--src/uniqstr.c3
-rw-r--r--src/uniqstr.h3
m---------submodules/autoconf0
-rw-r--r--tests/actions.at90
-rw-r--r--tests/atlocal.in8
-rw-r--r--tests/bison.in2
-rw-r--r--tests/c++.at119
-rw-r--r--tests/calc.at2
-rw-r--r--tests/conflicts.at3
-rw-r--r--tests/cxx-type.at2
-rw-r--r--tests/existing.at4
-rw-r--r--tests/glr-regression.at53
-rw-r--r--tests/headers.at4
-rw-r--r--tests/input.at2
-rw-r--r--tests/java.at2
-rw-r--r--tests/javapush.at26
-rw-r--r--tests/local.at8
-rw-r--r--tests/local.mk10
-rw-r--r--tests/named-refs.at2
-rw-r--r--tests/output.at3
-rw-r--r--tests/push.at2
-rw-r--r--tests/reduce.at3
-rw-r--r--tests/regression.at2
-rw-r--r--tests/sets.at2
-rw-r--r--tests/skeletons.at2
-rw-r--r--tests/synclines.at25
-rw-r--r--tests/testsuite.at2
-rw-r--r--tests/torture.at2
-rw-r--r--tests/types.at4
210 files changed, 1330 insertions, 1084 deletions
diff --git a/.prev-version b/.prev-version
index b0f2dcb3..eca690e7 100644
--- a/.prev-version
+++ b/.prev-version
@@ -1 +1 @@
-3.0.4
+3.0.5
diff --git a/AUTHORS b/AUTHORS
index 8ba23355..b0ddb150 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -24,7 +24,7 @@ and nasty bugs.
-----
-Copyright (C) 1998-2015 Free Software Foundation, Inc.
+Copyright (C) 1998-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/ChangeLog-2012 b/ChangeLog-2012
index abc1adb6..254f3d29 100644
--- a/ChangeLog-2012
+++ b/ChangeLog-2012
@@ -26733,8 +26733,8 @@
-----
- Copyright (C) 1987-1988, 1991-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 1987-1988, 1991-2015, 2018 Free Software
+ Foundation, Inc.
Copying and distribution of this file, with or without
modification, are permitted provided the copyright notice and this
diff --git a/Makefile.am b/Makefile.am
index b6135cbd..d03a65b0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2015, 2018 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 c45e6e07..dcfddbdc 100644
--- a/NEWS
+++ b/NEWS
@@ -45,6 +45,36 @@ GNU Bison NEWS
input: '0' | exp
^^^
+* Noteworthy changes in release 3.0.5 (2018-05-27) [stable]
+
+** Bug fixes
+
+*** C++: Fix support of 'syntax_error'
+
+ One incorrect 'inline' resulted in linking errors about the constructor of
+ the syntax_error exception.
+
+*** C++: Fix warnings
+
+ GCC 7.3 (with -O1 or -O2 but not -O0 or -O3) issued null-dereference
+ warnings about yyformat being possibly null. It also warned about the
+ deprecated implicit definition of copy constructors when there's a
+ user-defined (copy) assignment operator.
+
+*** Location of errors
+
+ In C++ parsers, out-of-bounds errors can happen when a rule with an empty
+ ride-hand side raises a syntax error. The behavior of the default parser
+ (yacc.c) in such a condition was undefined.
+
+ Now all the parsers match the behavior of glr.c: @$ is used as the
+ location of the error. This handles gracefully rules with and without
+ rhs.
+
+*** Portability fixes in the test suite
+
+ On some platforms, some Java and/or C++ tests were failing.
+
* Noteworthy changes in release 3.0.4 (2015-01-23) [stable]
** Bug fixes
@@ -106,7 +136,7 @@ GNU Bison NEWS
extracted from the documentation:
- rpcalc
- Reverse polish calculator, a simple introductory example.
+ Reverse Polish Calculator, a simple introductory example.
- mfcalc
Multi-function Calc, a calculator with memory and functions and located
error messages.
@@ -2793,7 +2823,7 @@ Output file does not redefine const for C++.
-----
-Copyright (C) 1995-2015 Free Software Foundation, Inc.
+Copyright (C) 1995-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Parser Generator.
diff --git a/PACKAGING b/PACKAGING
index 1110aa32..2abda4f2 100644
--- a/PACKAGING
+++ b/PACKAGING
@@ -36,7 +36,7 @@ to the bison package.
-----
-Copyright (C) 2002, 2005, 2009-2015 Free Software Foundation, Inc.
+Copyright (C) 2002, 2005, 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/README b/README
index 9cdf33d3..7ec93e49 100644
--- a/README
+++ b/README
@@ -7,7 +7,7 @@ instructions.
Bison requires GNU m4 1.4.6 or later. See:
- ftp://ftp.gnu.org/gnu/m4/m4-1.4.6.tar.gz
+ https://ftp.gnu.org/gnu/m4/m4-1.4.6.tar.gz
** Internationalization
Bison supports two catalogues: one for Bison itself (i.e., for the
@@ -44,7 +44,7 @@ End:
-----
-Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2015 Free Software
+Copyright (C) 1992, 1998-1999, 2003-2005, 2008-2015, 2018 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/README-alpha b/README-alpha
index f0aa3c97..8c1742ce 100644
--- a/README-alpha
+++ b/README-alpha
@@ -12,7 +12,7 @@ the problems you encounter.
-----
-Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
+Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of GNU Bison.
diff --git a/README-hacking b/README-hacking
index 25e4ef34..fcc6102a 100644
--- a/README-hacking
+++ b/README-hacking
@@ -9,19 +9,19 @@ Everything related to the development of Bison is on Savannah:
* Administrivia
** If you incorporate a change from somebody on the net:
-First, if it is a large change, you must make sure they have signed
-the appropriate paperwork. Second, be sure to add their name and
-email address to THANKS.
+First, if it is a large change, you must make sure they have signed the
+appropriate paperwork. Second, be sure to add their name and email address
+to THANKS.
** If a change fixes a test, mention the test in the commit message.
** Bug reports
-If somebody reports a new bug, mention his name in the commit message
-and in the test case you write. Put him into THANKS.
+If somebody reports a new bug, mention his name in the commit message and in
+the test case you write. Put him into THANKS.
-The correct response to most actual bugs is to write a new test case
-which demonstrates the bug. Then fix the bug, re-run the test suite,
-and check everything in.
+The correct response to most actual bugs is to write a new test case which
+demonstrates the bug. Then fix the bug, re-run the test suite, and check
+everything in.
* Hacking
@@ -30,17 +30,17 @@ and check everything in.
Which include serious bug fixes, must be mentioned in NEWS.
** Translations
-Only user visible strings are to be translated: error messages, bits
-of the .output file etc. This excludes impossible error messages
-(comparable to assert/abort), and all the --trace output which is
-meant for the maintainers only.
+Only user visible strings are to be translated: error messages, bits of the
+.output file etc. This excludes impossible error messages (comparable to
+assert/abort), and all the --trace output which is meant for the maintainers
+only.
** Horizontal tabs
Do not add horizontal tab characters to any file in Bison's repository
except where required. For example, do not use tabs to format C code.
-However, make files, ChangeLog, and some regular expressions require
-tabs. Also, test cases might need to contain tabs to check that Bison
-properly processes tabs in its input.
+However, make files, ChangeLog, and some regular expressions require tabs.
+Also, test cases might need to contain tabs to check that Bison properly
+processes tabs in its input.
* Working from the repository
@@ -103,14 +103,16 @@ to perform the first checkout of the submodules, run
$ git submodule update --init
-Git submodule support is weak before versions 1.6 and later, upgrade Git if
-your version is older.
-
The next step is to get other files needed to build, which are
extracted from other source packages:
$ ./bootstrap
+Bootstrapping updates the submodules to the versions registered in the
+top-level directory. To change gnulib, first check out the version you want
+in `gnulib`, then commit this change in Bison's repository, and finally run
+bootstrap.
+
If it fails with missing symbols (e.g., "error: possibly undefined macro:
AC_PROG_GNU_M4"), you are likely to have forgotten the submodule
initialization part. Otherwise, there you are! Just
@@ -137,13 +139,12 @@ explicitly by the user.
*** Updating Bison
If you pull a newer version of a branch, say via "git pull", you might
-import requests for updated submodules. A simple "git diff" will
-reveal if the current version of the submodule (i.e., the actual
-contents of the gnulib directory) and the current request from the
-subscriber (i.e., the reference of the version of gnulib that the
-Bison repository requests) differ. To upgrade the submodules (i.e.,
-to check out the version that is actually requested by the subscriber,
-run "git submodule update".
+import requests for updated submodules. A simple "git diff" will reveal if
+the current version of the submodule (i.e., the actual contents of the
+gnulib directory) and the current request from the subscriber (i.e., the
+reference of the version of gnulib that the Bison repository requests)
+differ. To upgrade the submodules (i.e., to check out the version that is
+actually requested by the subscriber, run "git submodule update".
$ git pull
$ git submodule update
@@ -167,8 +168,8 @@ Register your changes.
$ git checkin ...
-For a suggestion of what gnulib commit might be stable enough for a
-formal release, see the ChangeLog in the latest gnulib snapshot at:
+For a suggestion of what gnulib commit might be stable enough for a formal
+release, see the ChangeLog in the latest gnulib snapshot at:
http://erislabs.net/ianb/projects/gnulib/
@@ -178,9 +179,9 @@ The Autoconf files we use are currently:
lib/m4sugar/m4sugar.m4
lib/m4sugar/foreach.m4
-These files don't change very often in Autoconf, so it should be
-relatively straight-forward to examine the differences in order to
-decide whether to update.
+These files don't change very often in Autoconf, so it should be relatively
+straight-forward to examine the differences in order to decide whether to
+update.
* Test suite
@@ -243,102 +244,99 @@ suite. So currently, do not try to run valgrind on Mac OS X.
Try to run the test suite with more severe conditions before a
release:
-- Configure the package with --enable-gcc-warnings, so that one checks
- that 1. Bison compiles cleanly, 2. the parsers it produces compile
- cleanly too.
+- Configure the package with --enable-gcc-warnings, so that one checks that
+ 1. Bison compiles cleanly, 2. the parsers it produces compile cleanly too.
-- Maybe build with -DGNULIB_POSIXCHECK, which suggests gnulib modules
- that can fix portability issues. See if you really want to pay
- attention to its warnings; there's no need to obey blindly to it
+- Maybe build with -DGNULIB_POSIXCHECK, which suggests gnulib modules that
+ can fix portability issues. See if you really want to pay attention to
+ its warnings; there's no need to obey blindly to it
(<http://lists.gnu.org/archive/html/bison-patches/2012-05/msg00057.html>).
-- Check with "make syntax-check" if there are issues diagnosed by
- gnulib.
+- Check with "make syntax-check" if there are issues diagnosed by gnulib.
- run "make maintainer-check" which:
- runs "valgrind -q bison" to run Bison under Valgrind.
- runs the parsers under Valgrind.
- runs the test suite with G++ as C compiler...
-- run "make maintainer-push-check", which runs "make maintainer-check"
- while activating the push implementation and its pull interface wrappers
- in many test cases that were originally written to exercise only the
- pull implementation. This makes certain the push implementation can
- perform every task the pull implementation can.
+- run "make maintainer-push-check", which runs "make maintainer-check" while
+ activating the push implementation and its pull interface wrappers in many
+ test cases that were originally written to exercise only the pull
+ implementation. This makes certain the push implementation can perform
+ every task the pull implementation can.
-- run "make maintainer-xml-check", which runs "make maintainer-check"
- while checking Bison's XML automaton report for every working grammar
- passed to Bison in the test suite. The check just diffs the output of
- Bison's included XSLT style sheets with the output of --report=all and
- --graph.
+- run "make maintainer-xml-check", which runs "make maintainer-check" while
+ checking Bison's XML automaton report for every working grammar passed to
+ Bison in the test suite. The check just diffs the output of Bison's
+ included XSLT style sheets with the output of --report=all and --graph.
- running "make maintainer-release-check" takes care of running
maintainer-check, maintainer-push-check and maintainer-xml-check.
-- Change tests/atlocal/CFLAGS to add your preferred options. For
- instance, "-traditional" to check that the parsers are K&R. Note
- that it does not make sense for glr.c, which should be ANSI, but
- currently is actually GNU C, nor for lalr1.cc.
+- Change tests/atlocal/CFLAGS to add your preferred options. For instance,
+ "-traditional" to check that the parsers are K&R. Note that it does not
+ make sense for glr.c, which should be ANSI, but currently is actually GNU
+ C, nor for lalr1.cc.
-- Test with a very recent version of GCC for both C and C++. Testing
- with older versions that are still in use is nice too.
+- Test with a very recent version of GCC for both C and C++. Testing with
+ older versions that are still in use is nice too.
* Release Procedure
-This section needs to be updated to take into account features from
-gnulib. In particular, be sure to read README-release.
+This section needs to be updated to take into account features from gnulib.
+In particular, be sure to read README-release.
** Update the submodules. See above.
** Update maintainer tools, such as Autoconf. See above.
** Try to get the *.pot files to the Translation Project at least one
-week before a stable release, to give them time to translate them.
-Before generating the *.pot files, make sure that po/POTFILES.in and
-runtime-po/POTFILES.in list all files with translatable strings.
-This helps: grep -l '\<_(' *
+week before a stable release, to give them time to translate them. Before
+generating the *.pot files, make sure that po/POTFILES.in and
+runtime-po/POTFILES.in list all files with translatable strings. This
+helps: grep -l '\<_(' *
** Tests
See above.
** Update the foreign files
-Running "./bootstrap" in the top level should update them all for you.
-This covers PO files too. Sometimes a PO file contains problems that
-causes it to be rejected by recent Gettext releases; please report
-these to the Translation Project.
+Running "./bootstrap" in the top level should update them all for you. This
+covers PO files too. Sometimes a PO file contains problems that causes it
+to be rejected by recent Gettext releases; please report these to the
+Translation Project.
** Update README
-Make sure the information in README is current. Most notably, make sure
-it recommends a version of GNU M4 that is compatible with the latest
-Bison sources.
+Make sure the information in README is current. Most notably, make sure it
+recommends a version of GNU M4 that is compatible with the latest Bison
+sources.
** Check copyright years.
-We update years in copyright statements throughout Bison once at the
-start of every year by running "make update-copyright". However, before
-a release, it's good to verify that it's actually been run. Besides the
-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.
+We update years in copyright statements throughout Bison once at the start
+of every year by running "make update-copyright". However, before a
+release, it's good to verify that it's actually been run. Besides the
+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, commit and tag.
-See do-release-commit-and-tag in README-release. For a while, we used
-beta names such as "2.6_rc1". Now that we use gnulib in the release
-procedure, we must use "2.5.90", which has the additional benefit of
-being properly sorted in "git tag -l".
+See do-release-commit-and-tag in README-release. For a while, we used beta
+names such as "2.6_rc1". Now that we use gnulib in the release procedure,
+we must use "2.5.90", which has the additional benefit of being properly
+sorted in "git tag -l".
** make alpha, beta, or stable
See README-release.
** Upload
-There are two ways to upload the tarballs to the GNU servers: using
-gnupload (from gnulib), or by hand. Obviously prefer the former. But
-in either case, be sure to read the following paragraph.
+There are two ways to upload the tarballs to the GNU servers: using gnupload
+(from gnulib), or by hand. Obviously prefer the former. But in either
+case, be sure to read the following paragraph.
*** Setup
You need "gnupg".
-Make sure your public key has been uploaded at least to
-keys.gnupg.net. You can upload it with:
+Make sure your public key has been uploaded at least to keys.gnupg.net. You
+can upload it with:
gpg --keyserver keys.gnupg.net --send-keys F125BDF3
@@ -347,8 +345,8 @@ 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 procedure to
-run. Just copy and paste it in your shell.
+At the end "make stable" (or alpha/beta) will display the procedure to run.
+Just copy and paste it in your shell.
*** By hand
@@ -410,9 +408,9 @@ sections that have been removed or renamed):
$ ls -lt
Remove these files and commit their removal to CVS. For each of these
-files, add a line to the file .symlinks. This will ensure that
-hyperlinks to the removed files will redirect to the entire manual; this
-is better than a 404 error.
+files, add a line to the file .symlinks. This will ensure that hyperlinks
+to the removed files will redirect to the entire manual; this is better than
+a 404 error.
There is a problem with 'index.html' being written twice (once for POSIX
function 'index', once for the table of contents); you can ignore this
@@ -431,19 +429,18 @@ Complete/fix the announcement file. The generated list of recipients
(info-gnu@gnu.org, bug-bison@gnu.org, help-bison@gnu.org,
bison-patches@gnu.org, and coordinator@translationproject.org) is
appropriate for a stable release or a "serious beta". For any other
-release, drop at least info-gnu@gnu.org. For an example of how to
-fill out the rest of the template, search the mailing list archives
-for the most recent release announcement.
+release, drop at least info-gnu@gnu.org. For an example of how to fill out
+the rest of the template, search the mailing list archives for the most
+recent release announcement.
For a stable release, send the same announcement on the comp.compilers
-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.
+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.
** 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):
+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):
* Noteworthy changes in release ?.? (????-??-??) [?]
@@ -451,7 +448,7 @@ Push these changes.
-----
-Copyright (C) 2002-2005, 2007-2015 Free Software Foundation, Inc.
+Copyright (C) 2002-2005, 2007-2015, 2018 Free Software Foundation, Inc.
This file is part of GNU Bison.
diff --git a/THANKS b/THANKS
index 26bea0a7..a5b29e96 100644
--- a/THANKS
+++ b/THANKS
@@ -15,6 +15,7 @@ Anthony Heading ajrh@ajrh.net
Antonio Silva Correia amsilvacorreia@hotmail.com
Arnold Robbins arnold@skeeve.com
Art Haas ahaas@neosoft.com
+Askar Safin safinaskar@mail.ru
Baron Schwartz baron@sequent.org
Ben Pfaff blp@cs.stanford.edu
Benoit Perrot benoit.perrot@epita.fr
@@ -39,6 +40,7 @@ Daniel Hagerty hag@gnu.org
David J. MacKenzie djm@gnu.org
David Kastrup dak@gnu.org
Dennis Clarke dclarke@blastwave.org
+Derek Clegg derek@me.com
Derek M. Jones derek@knosof.co.uk
Di-an Jan dianj@freeshell.org
Dick Streefland dick.streefland@altium.nl
@@ -48,6 +50,7 @@ Enrico Scholz enrico.scholz@informatik.tu-chemnitz.de
Eric Blake ebb9@byu.net
Evgeny Stambulchik fnevgeny@plasma-gate.weizmann.ac.il
Fabrice Bauzac noon@cote-dazur.com
+Ferdinand Thiessen ferdinand@fthiessen.de
Florian Krohm florian@edamail.fishkill.ibm.com
Frank Heckenbach frank@g-n-u.de
Frans Englich frans.englich@telia.com
@@ -58,7 +61,7 @@ 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
-Hans Aberg haberg@matematik.su.se
+Hans Ã…berg haberg-1@telia.com
Jan Nieuwenhuizen janneke@gnu.org
Jerry Quinn jlquinn@optonline.net
Jesse Thilo jthilo@gnu.org
@@ -93,6 +96,7 @@ Michiel De Wilde mdewilde.agilent@gmail.com
Mickael Labau labau_m@epita.fr
Mike Castle dalgoda@ix.netcom.com
Mike Sullivan Mike.sullivan@Oracle.COM
+Nate Guerin nathan.guerin@riseup.net
Neil Booth NeilB@earthling.net
Nelson H. F. Beebe beebe@math.utah.edu
Nick Bowler nbowler@elliptictech.com
@@ -172,7 +176,7 @@ End:
-----
-Copyright (C) 2000-2015 Free Software Foundation, Inc.
+Copyright (C) 2000-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Parser Generator.
diff --git a/TODO b/TODO
index 7d4a5fb4..c25df084 100644
--- a/TODO
+++ b/TODO
@@ -369,7 +369,8 @@ End:
-----
-Copyright (C) 2001-2004, 2006, 2008-2015 Free Software Foundation, Inc.
+Copyright (C) 2001-2004, 2006, 2008-2015, 2018 Free Software Foundation,
+Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/bootstrap b/bootstrap
index 2fdf2674..eddacfb6 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,10 +1,10 @@
#! /bin/sh
# Print a version string.
-scriptversion=2014-12-08.12; # UTC
+scriptversion=2018-04-28.14; # UTC
# Bootstrap this package from checked-out sources.
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2018 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,7 +17,7 @@ scriptversion=2014-12-08.12; # UTC
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Originally written by Paul Eggert. The canonical version of this
# script is maintained as build-aux/bootstrap in gnulib, however, to
@@ -42,7 +42,7 @@ export LC_ALL
local_gl_dir=gl
-# Honour $PERL, but work even if there is none
+# Honor $PERL, but work even if there is none.
PERL="${PERL-perl}"
me=$0
@@ -109,9 +109,6 @@ die() { warn_ "$@"; exit 1; }
# Configuration.
-# Name of the Makefile.am
-gnulib_mk=gnulib.mk
-
# List of gnulib modules needed.
gnulib_modules=
@@ -141,7 +138,7 @@ po_download_command_format=\
# Fallback for downloading .po files (if rsync fails).
po_download_command_format2=\
"wget --mirror -nd -q -np -A.po -P '%s' \
- http://translationproject.org/latest/%s/"
+ https://translationproject.org/latest/%s/"
# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
# fall back to the package name (1st argument with munging)
@@ -170,7 +167,15 @@ source_base=lib
m4_base=m4
doc_base=doc
tests_base=tests
-gnulib_extra_files=''
+gnulib_extra_files="
+ build-aux/install-sh
+ build-aux/mdate-sh
+ build-aux/texinfo.tex
+ build-aux/depcomp
+ build-aux/config.guess
+ build-aux/config.sub
+ doc/INSTALL
+"
# Additional gnulib-tool options to use. Use "\newline" to break lines.
gnulib_tool_option_extras=
@@ -264,24 +269,18 @@ case "$0" in
*) test -r "$0.conf" && . ./"$0.conf" ;;
esac
-# Extra files from gnulib, which override files from other sources.
-test -z "${gnulib_extra_files}" && \
- gnulib_extra_files="
- build-aux/install-sh
- build-aux/mdate-sh
- build-aux/texinfo.tex
- build-aux/depcomp
- build-aux/config.guess
- build-aux/config.sub
- doc/INSTALL
-"
-
if test "$vc_ignore" = auto; then
vc_ignore=
test -d .git && vc_ignore=.gitignore
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
fi
+if test x"$gnulib_modules$gnulib_files$gnulib_extra_files" = x; then
+ use_gnulib=false
+else
+ use_gnulib=true
+fi
+
# Translate configuration into internal form.
# Parse options.
@@ -418,28 +417,30 @@ sort_ver() { # sort -V is not generally available
done
}
-get_version() {
- app=$1
+get_version_sed='
+# Move version to start of line.
+s/.*[v ]\([0-9]\)/\1/
- $app --version >/dev/null 2>&1 || { $app --version; return 1; }
+# Skip lines that do not start with version.
+/^[0-9]/!d
- $app --version 2>&1 |
- sed -n '# Move version to start of line.
- s/.*[v ]\([0-9]\)/\1/
+# Remove characters after the version.
+s/[^.a-z0-9-].*//
- # Skip lines that do not start with version.
- /^[0-9]/!d
+# The first component must be digits only.
+s/^\([0-9]*\)[a-z-].*/\1/
- # Remove characters after the version.
- s/[^.a-z0-9-].*//
+#the following essentially does s/5.005/5.5/
+s/\.0*\([1-9]\)/.\1/g
+p
+q'
- # The first component must be digits only.
- s/^\([0-9]*\)[a-z-].*/\1/
+get_version() {
+ app=$1
- #the following essentially does s/5.005/5.5/
- s/\.0*\([1-9]\)/.\1/g
- p
- q'
+ $app --version >/dev/null 2>&1 || { $app --version; return 1; }
+
+ $app --version 2>&1 | sed -n "$get_version_sed"
}
check_versions() {
@@ -610,85 +611,87 @@ git_modules_config () {
test -f .gitmodules && git config --file .gitmodules "$@"
}
-if $use_git; then
- gnulib_path=$(git_modules_config submodule.gnulib.path)
- test -z "$gnulib_path" && gnulib_path=gnulib
-fi
+if $use_gnulib; then
+ if $use_git; then
+ gnulib_path=$(git_modules_config submodule.gnulib.path)
+ test -z "$gnulib_path" && gnulib_path=gnulib
+ fi
-# Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
-# submodule, for use in the rest of the script.
+ # Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
+ # submodule, for use in the rest of the script.
-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 -- "$gnulib_path" || exit $?
- git submodule update -- "$gnulib_path" || exit $?
+ 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 -- "$gnulib_path" || exit $?
+ git submodule update -- "$gnulib_path" || exit $?
- elif [ ! -d "$gnulib_path" ]; then
- echo "$0: getting gnulib files..."
+ elif [ ! -d "$gnulib_path" ]; then
+ echo "$0: getting gnulib files..."
- trap cleanup_gnulib 1 2 13 15
+ trap cleanup_gnulib 1 2 13 15
- shallow=
- git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
- git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
- cleanup_gnulib
+ shallow=
+ git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
+ git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
+ cleanup_gnulib
- trap - 1 2 13 15
- fi
- GNULIB_SRCDIR=$gnulib_path
- ;;
-*)
- # Use GNULIB_SRCDIR directly or as a reference.
- if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
- git_modules_config submodule.gnulib.url >/dev/null; then
- echo "$0: getting gnulib files..."
- if git submodule -h|grep -- --reference > /dev/null; then
- # Prefer the one-liner available in git 1.6.4 or newer.
- git submodule update --init --reference "$GNULIB_SRCDIR" \
- "$gnulib_path" || exit $?
- else
- # 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 -- "$gnulib_path" || exit $?
+ trap - 1 2 13 15
+ fi
+ GNULIB_SRCDIR=$gnulib_path
+ ;;
+ *)
+ # Use GNULIB_SRCDIR directly or as a reference.
+ if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
+ git_modules_config submodule.gnulib.url >/dev/null; then
+ echo "$0: getting gnulib files..."
+ if git submodule -h|grep -- --reference > /dev/null; then
+ # Prefer the one-liner available in git 1.6.4 or newer.
+ git submodule update --init --reference "$GNULIB_SRCDIR" \
+ "$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 -- "$gnulib_path" \
- && git submodule update -- "$gnulib_path" \
- || exit $?
+ # 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 -- "$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 -- "$gnulib_path" \
+ && git submodule update -- "$gnulib_path" \
+ || exit $?
+ fi
fi
+ GNULIB_SRCDIR=$gnulib_path
fi
- GNULIB_SRCDIR=$gnulib_path
- fi
- ;;
-esac
+ ;;
+ esac
-# $GNULIB_SRCDIR now points to the version of gnulib to use, and
-# we no longer need to use git or $gnulib_path below here.
+ # $GNULIB_SRCDIR now points to the version of gnulib to use, and
+ # we no longer need to use git or $gnulib_path below here.
+
+ if $bootstrap_sync; then
+ cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
+ echo "$0: updating bootstrap and restarting..."
+ case $(sh -c 'echo "$1"' -- a) in
+ a) ignored=--;;
+ *) ignored=ignored;;
+ esac
+ exec sh -c \
+ 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
+ $ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
+ "$0" "$@" --no-bootstrap-sync
+ }
+ fi
-if $bootstrap_sync; then
- cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
- echo "$0: updating bootstrap and restarting..."
- case $(sh -c 'echo "$1"' -- a) in
- a) ignored=--;;
- *) ignored=ignored;;
- esac
- exec sh -c \
- 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
- $ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
- "$0" "$@" --no-bootstrap-sync
- }
+ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
+ <$gnulib_tool || exit $?
fi
-gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
-<$gnulib_tool || exit $?
-
# Get translations.
download_po_files() {
@@ -697,7 +700,7 @@ download_po_files() {
echo "$me: getting translations into $subdir for $domain..."
cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
eval "$cmd" && return
- # Fallback to HTTP.
+ # Fallback to HTTPS.
cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
eval "$cmd"
}
@@ -788,9 +791,9 @@ symlink_to_dir()
# Leave any existing symlink alone, if it already points to the source,
# so that broken build tools that care about symlink times
# aren't confused into doing unnecessary builds. Conversely, if the
- # existing symlink's time stamp is older than the source, make it afresh,
+ # existing symlink's timestamp is older than the source, make it afresh,
# so that broken tools aren't confused into skipping needed builds. See
- # <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
+ # <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
test -h "$dst" &&
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
@@ -896,31 +899,33 @@ fi
# Import from gnulib.
-gnulib_tool_options="\
- --import\
- --no-changelog\
- --aux-dir $build_aux\
- --doc-base $doc_base\
- --lib $gnulib_name\
- --m4-base $m4_base/\
- --source-base $source_base/\
- --tests-base $tests_base\
- --local-dir $local_gl_dir\
- $gnulib_tool_option_extras\
-"
-if test $use_libtool = 1; then
- case "$gnulib_tool_options " in
- *' --libtool '*) ;;
- *) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
- esac
-fi
-echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
-$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
+if $use_gnulib; then
+ gnulib_tool_options="\
+ --no-changelog\
+ --aux-dir $build_aux\
+ --doc-base $doc_base\
+ --lib $gnulib_name\
+ --m4-base $m4_base/\
+ --source-base $source_base/\
+ --tests-base $tests_base\
+ --local-dir $local_gl_dir\
+ $gnulib_tool_option_extras\
+ "
+ if test $use_libtool = 1; then
+ case "$gnulib_tool_options " in
+ *' --libtool '*) ;;
+ *) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
+ esac
+ fi
+ echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
+ $gnulib_tool $gnulib_tool_options --import $gnulib_modules \
+ || die "gnulib-tool failed"
-for file in $gnulib_files; do
- symlink_to_dir "$GNULIB_SRCDIR" $file \
- || die "failed to symlink $file"
-done
+ for file in $gnulib_files; do
+ symlink_to_dir "$GNULIB_SRCDIR" $file \
+ || die "failed to symlink $file"
+ done
+fi
bootstrap_post_import_hook \
|| die "bootstrap_post_import_hook failed"
@@ -1017,9 +1022,9 @@ bootstrap_epilogue
echo "$0: done. Now you can run './configure'."
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/bootstrap.conf b/bootstrap.conf
index 6a5c9ae5..3e900b33 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,6 +1,6 @@
# Bootstrap configuration.
-# Copyright (C) 2006-2015 Free Software Foundation, Inc.
+# Copyright (C) 2006-2015, 2018 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
@@ -81,7 +81,7 @@ gnulib_tool_option_extras='--symlink --makefile-name=gnulib.mk'
bootstrap_post_import_hook()
{
# Massage lib/gnulib.mk before using it later in the bootstrapping process.
- build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/$gnulib_mk
+ build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/gnulib.mk
# Ensure that ChangeLog exists, for automake.
test -f ChangeLog || touch ChangeLog
diff --git a/build-aux/.gitignore b/build-aux/.gitignore
index 2c8b6fe1..0d8a2b30 100644
--- a/build-aux/.gitignore
+++ b/build-aux/.gitignore
@@ -1,6 +1,4 @@
/announce-gen
-/arg-nonnull.h
-/c++defs.h
/compile
/config.guess
/config.rpath
@@ -16,14 +14,12 @@
/install-sh
/javacomp.sh.in
/javaexec.sh.in
-/link-warning.h
/mdate-sh
/missing
+/prefix-gnulib-mk
/test-driver
/texinfo.tex
/update-copyright
/useless-if-before-free
/vc-list-files
-/warn-on-use.h
/ylwrap
-/prefix-gnulib-mk
diff --git a/build-aux/darwin11.4.0.valgrind b/build-aux/Darwin.valgrind
index 9b0b06f3..ba9b9494 100644
--- a/build-aux/darwin11.4.0.valgrind
+++ b/build-aux/Darwin.valgrind
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2015, 2018 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/Linux.valgrind b/build-aux/Linux.valgrind
new file mode 100644
index 00000000..a40719fb
--- /dev/null
+++ b/build-aux/Linux.valgrind
@@ -0,0 +1,48 @@
+# Copyright (C) 2012-2015, 2018 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
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Valgrind suppression file for Bison.
+
+# Linux prague 4.1.2-2-ARCH #1 SMP PREEMPT Wed Jul 15 08:30:32 UTC 2015
+# x86_64 GNU/Linux
+{
+ Probably exception handling from G++ 5.1.
+ Memcheck:Leak
+ match-leak-kinds: reachable
+ fun:malloc
+ fun:pool
+ fun:__static_initialization_and_destruction_0
+ fun:_GLOBAL__sub_I_eh_alloc.cc
+ fun:call_init.part.0
+ fun:_dl_init
+ obj:/usr/lib/ld-2.21.so
+}
+
+# Linux seattle 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012
+# x86_64 GNU/Linux
+{
+ index
+ Memcheck:Cond
+ fun:index
+ fun:expand_dynamic_string_token
+ fun:_dl_map_object
+ fun:map_doit
+ fun:_dl_catch_error
+ fun:do_preload
+ fun:dl_main
+ fun:_dl_sysdep_start
+ fun:_dl_start
+ obj:/lib/ld-2.11.3.so
+}
diff --git a/build-aux/linux-gnu.valgrind b/build-aux/linux-gnu.valgrind
deleted file mode 100644
index 3130fbc0..00000000
--- a/build-aux/linux-gnu.valgrind
+++ /dev/null
@@ -1,16 +0,0 @@
-# Linux seattle 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012
-# x86_64 GNU/Linux
-{
- index
- Memcheck:Cond
- fun:index
- fun:expand_dynamic_string_token
- fun:_dl_map_object
- fun:map_doit
- fun:_dl_catch_error
- fun:do_preload
- fun:dl_main
- fun:_dl_sysdep_start
- fun:_dl_start
- obj:/lib/ld-2.11.3.so
-}
diff --git a/build-aux/local.mk b/build-aux/local.mk
index 7d752c86..70a900ff 100644
--- a/build-aux/local.mk
+++ b/build-aux/local.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2015 Free Software Foundation, Inc.
+# Copyright (C) 2000-2015, 2018 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
@@ -13,10 +13,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-EXTRA_DIST += \
- build-aux/cross-options.pl \
- build-aux/darwin11.4.0.valgrind \
- build-aux/linux-gnu.valgrind \
- build-aux/move-if-change \
- build-aux/prev-version.txt \
+EXTRA_DIST += \
+ build-aux/Darwin.valgrind \
+ build-aux/Linux.valgrind \
+ build-aux/cross-options.pl \
+ build-aux/move-if-change \
+ build-aux/prev-version.txt \
build-aux/update-b4-copyright
diff --git a/build-aux/snippet/.gitignore b/build-aux/snippet/.gitignore
deleted file mode 100644
index 2a3a2f91..00000000
--- a/build-aux/snippet/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/_Noreturn.h
-/arg-nonnull.h
-/c++defs.h
-/warn-on-use.h
diff --git a/build-aux/update-b4-copyright b/build-aux/update-b4-copyright
index 901ff05b..8946378a 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-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2015, 2018 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 f2adedf7..da9ac3a1 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-2015 Free Software Foundation, Inc.
+# Copyright (C) 2010-2015, 2018 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 7d0fe9a5..ce023732 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,5 @@
# Customize maint.mk -*- makefile -*-
-# Copyright (C) 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2008-2015, 2018 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
@@ -34,7 +34,7 @@ _is-dist-target = $(filter-out %clean maintainer-check% maintainer-%-check, \
$(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
url_dir_list = \
- ftp://$(gnu_rel_host)/gnu/bison
+ https://$(gnu_rel_host)/gnu/bison
# Tests not to run as part of "make distcheck".
local-checks-to-skip = \
@@ -158,23 +158,24 @@ sc_space_before_open_paren:
exclude = \
$(foreach a,$(1),$(eval $(subst $$,$$$$,exclude_file_name_regexp--sc_$(a))))
-$(call exclude, \
- bindtextdomain=^lib/main.c$$ \
- preprocessor_indentation=^data/|^lib/|^src/parse-gram.[ch]$$ \
- program_name=^lib/main.c$$ \
- prohibit_always-defined_macros=^data/yacc.c$$|^djgpp/ \
- prohibit_always-defined_macros+=?|^lib/timevar.c$$ \
- prohibit_always-defined_macros+=?|^src/(parse-gram.c|system.h)$$ \
- prohibit_always-defined_macros+=?|^tests/regression.at$$ \
- prohibit_always_true_header_tests=^djgpp/subpipe.h$$|^lib/timevar.c$$ \
- prohibit_always_true_header_tests+=?|^m4/timevar.m4$$ \
- prohibit_defined_have_decl_tests=?|^lib/timevar.c$$ \
+$(call exclude, \
+ bindtextdomain=^lib/main.c$$ \
+ preprocessor_indentation=^data/|^lib/|^src/parse-gram.[ch]$$ \
+ program_name=^lib/main.c$$ \
+ prohibit_always-defined_macros=^data/yacc.c$$|^djgpp/ \
+ prohibit_always-defined_macros+=?|^lib/timevar.c$$ \
+ prohibit_always-defined_macros+=?|^src/(parse-gram.c|system.h)$$ \
+ prohibit_always-defined_macros+=?|^tests/regression.at$$ \
+ prohibit_always_true_header_tests=^djgpp/subpipe.h$$|^lib/timevar.c$$ \
+ prohibit_always_true_header_tests+=?|^m4/timevar.m4$$ \
+ prohibit_defined_have_decl_tests=?|^lib/timevar.c$$ \
prohibit_doubled_word=^tests/named-refs.at$$ \
- prohibit_magic_number_exit=^doc/bison.texi$$ \
- prohibit_magic_number_exit+=?|^tests/(conflicts|regression).at$$ \
- prohibit_strcmp=^doc/bison\.texi|tests/local\.at$$ \
- prohibit_tab_based_indentation=\.(am|mk)$$|^djgpp/|^\.git \
- require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$ \
+ prohibit_magic_number_exit=^doc/bison.texi$$ \
+ prohibit_magic_number_exit+=?|^tests/(conflicts|regression).at$$ \
+ prohibit_strcmp=^doc/bison\.texi|tests/local\.at$$ \
+ prohibit_tab_based_indentation=\.(am|mk)$$|^djgpp/|^\.git \
+ require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$ \
space_before_open_paren=^(data/|djgpp/) \
- unmarked_diagnostics=^(djgpp/|doc/bison.texi$$|tests/c\+\+\.at$$) \
+ two_space_separator_in_usage=^(bootstrap) \
+ unmarked_diagnostics=^(djgpp/|doc/bison.texi$$|tests/c\+\+\.at$$) \
)
diff --git a/configure.ac b/configure.ac
index 6f200400..99f6ad43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
# Configure template for GNU Bison. -*-Autoconf-*-
#
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2015, 2018 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], [2015])
+AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2018])
AC_DEFINE_UNQUOTED([PACKAGE_COPYRIGHT_YEAR], [$PACKAGE_COPYRIGHT_YEAR],
[The copyright year for this package])
@@ -82,7 +82,7 @@ AC_ARG_ENABLE([gcc-warnings],
AM_CONDITIONAL([ENABLE_GCC_WARNINGS], [test "$enable_gcc_warnings" = yes])
if test "$enable_gcc_warnings" = yes; then
warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align -Wdocumentation
- -Wformat -Wpointer-arith -Wwrite-strings'
+ -Wformat -Wnull-dereference -Wpointer-arith -Wwrite-strings'
warn_c='-Wbad-function-cast -Wshadow -Wstrict-prototypes'
warn_cxx='-Wnoexcept'
# Warnings for the test suite only.
@@ -90,7 +90,12 @@ if test "$enable_gcc_warnings" = yes; then
# -fno-color-diagnostics: Clang's use of colors in the error
# messages is confusing the tests looking at the compiler's output
# (e.g., synclines.at).
- warn_tests='-Wundef -pedantic -Wsign-compare -fno-color-diagnostics'
+ #
+ # -Wno-keyword-macro: We use the "#define private public" dirty
+ # trick in the test suite to check some private implementation
+ # details for lalr1.cc.
+ warn_tests='-Wundef -pedantic -Wdeprecated -Wsign-compare -fno-color-diagnostics
+ -Wno-keyword-macro'
AC_LANG_PUSH([C])
# Clang supports many of GCC's -W options, but only issues warnings
@@ -220,20 +225,21 @@ AC_CONFIG_FILES([etc/bench.pl], [chmod +x etc/bench.pl])
AC_CONFIG_TESTDIR(tests)
AC_CONFIG_FILES([tests/atlocal])
AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
+
AC_CHECK_PROGS([VALGRIND], [valgrind])
-case $VALGRIND:$host_os in
+# Use something simpler that $host_os to select our suppression file.
+uname=`uname`
+case $VALGRIND:$uname in
'':*) ;;
- *:darwin*)
+ *:Darwin)
# See README-hacking.
- # VALGRIND+='-q --suppressions=$(abs_top_srcdir)/build-aux/darwin11.4.0.valgrind'
VALGRIND=;;
*:*)
- suppfile=build-aux/$host_os.valgrind
+ suppfile=build-aux/$uname.valgrind
if test -f "$srcdir/$suppfile"; then
- VALGRIND="$VALGRIND --gen-suppressions=all"
- VALGRIND="$VALGRIND --suppressions=\$(abs_top_srcdir)/$suppfile"
+ AC_SUBST([VALGRIND_OPTS_SUPPRESSION],
+ ["--suppressions=\$(abs_top_srcdir)/$suppfile"])
fi
- AC_SUBST([VALGRIND_PREBISON], ["$VALGRIND -q"])
;;
esac
diff --git a/data/README b/data/README
index 4b3e5561..629599cc 100644
--- a/data/README
+++ b/data/README
@@ -52,7 +52,7 @@ into various formats.
-----
-Copyright (C) 2002, 2008-2015 Free Software Foundation, Inc.
+Copyright (C) 2002, 2008-2015, 2018 Free Software Foundation, Inc.
This file is part of GNU Bison.
diff --git a/data/bison.m4 b/data/bison.m4
index 2000d0f6..42bb67b8 100644
--- a/data/bison.m4
+++ b/data/bison.m4
@@ -2,7 +2,7 @@
# Language-independent M4 Macros for Bison.
-# Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-2015, 2018 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 9117262c..3cd56789 100644
--- a/data/c++-skel.m4
+++ b/data/c++-skel.m4
@@ -2,7 +2,8 @@
# C++ skeleton dispatching for Bison.
-# Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2015, 2018 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 d176e1a2..2d2a5957 100644
--- a/data/c++.m4
+++ b/data/c++.m4
@@ -2,7 +2,7 @@
# C++ skeleton for Bison
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2018 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
@@ -30,6 +30,16 @@ m4_include(b4_pkgdatadir/[c.m4])
m4_define([b4_comment],
[b4_comment_([$1], [$2// ], [$2// ])])
+# b4_inline(hh|cc)
+# ----------------
+# Expand to `inline\n ` if $1 is hh.
+m4_define([b4_inline],
+[m4_case([$1],
+ [cc], [],
+ [hh], [[inline
+ ]],
+ [m4_fatal([$0: invalid argument: $1])])])
+
## -------- ##
## Checks. ##
## -------- ##
@@ -275,25 +285,22 @@ m4_define([b4_public_types_declare],
]b4_symbol_constructor_declare])
-# b4_public_types_define
-# ----------------------
+# b4_public_types_define(hh|cc)
+# -----------------------------
# Provide the implementation needed by the public types.
m4_define([b4_public_types_define],
-[[ inline
- ]b4_parser_class_name[::syntax_error::syntax_error (]b4_locations_if([const location_type& l, ])[const std::string& m)
+[ b4_inline([$1])b4_parser_class_name[::syntax_error::syntax_error (]b4_locations_if([const location_type& l, ])[const std::string& m)
: std::runtime_error (m)]b4_locations_if([
, location (l)])[
{}
// basic_symbol.
template <typename Base>
- inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol ()
: value ()
{}
template <typename Base>
- inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (const basic_symbol& other)
: Base (other)
, value ()]b4_locations_if([
@@ -304,9 +311,7 @@ m4_define([b4_public_types_define],
[value = other.value;])[
}
-
template <typename Base>
- inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
[typename Base::kind_type t],
[const semantic_type& v],
@@ -323,7 +328,6 @@ m4_define([b4_public_types_define],
]b4_type_foreach([b4_basic_symbol_constructor_define])], [[
/// Constructor for valueless symbols.
template <typename Base>
- inline
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (]b4_join(
[typename Base::kind_type t],
b4_locations_if([const location_type& l]))[)
@@ -333,14 +337,12 @@ m4_define([b4_public_types_define],
{}]])[
template <typename Base>
- inline
]b4_parser_class_name[::basic_symbol<Base>::~basic_symbol ()
{
clear ();
}
template <typename Base>
- inline
void
]b4_parser_class_name[::basic_symbol<Base>::clear ()
{]b4_variant_if([[
@@ -361,7 +363,6 @@ m4_define([b4_public_types_define],
}
template <typename Base>
- inline
bool
]b4_parser_class_name[::basic_symbol<Base>::empty () const
{
@@ -369,11 +370,10 @@ m4_define([b4_public_types_define],
}
template <typename Base>
- inline
void
]b4_parser_class_name[::basic_symbol<Base>::move (basic_symbol& s)
{
- super_type::move(s);
+ super_type::move (s);
]b4_variant_if([b4_symbol_variant([this->type_get ()], [value], [move],
[s.value])],
[value = s.value;])[]b4_locations_if([
@@ -381,45 +381,38 @@ m4_define([b4_public_types_define],
}
// by_type.
- inline
- ]b4_parser_class_name[::by_type::by_type ()
+ ]b4_inline([$1])b4_parser_class_name[::by_type::by_type ()
: type (empty_symbol)
{}
- inline
- ]b4_parser_class_name[::by_type::by_type (const by_type& other)
+ ]b4_inline([$1])b4_parser_class_name[::by_type::by_type (const by_type& other)
: type (other.type)
{}
- inline
- ]b4_parser_class_name[::by_type::by_type (token_type t)
+ ]b4_inline([$1])b4_parser_class_name[::by_type::by_type (token_type t)
: type (yytranslate_ (t))
{}
- inline
- void
+ ]b4_inline([$1])[void
]b4_parser_class_name[::by_type::clear ()
{
type = empty_symbol;
}
- inline
- void
+ ]b4_inline([$1])[void
]b4_parser_class_name[::by_type::move (by_type& that)
{
type = that.type;
that.clear ();
}
- inline
- int
+ ]b4_inline([$1])[int
]b4_parser_class_name[::by_type::type_get () const
{
return type;
}
]b4_token_ctor_if([[
- inline
- ]b4_parser_class_name[::token_type
+ ]b4_inline([$1])b4_parser_class_name[::token_type
]b4_parser_class_name[::by_type::token () const
{
// YYTOKNUM[NUM] -- (External) token number corresponding to the
@@ -445,14 +438,13 @@ m4_define([b4_symbol_constructor_declare], [])
m4_define([b4_symbol_constructor_define], [])
-# b4_yytranslate_define
-# ---------------------
-# Define yytranslate_. Sometimes used in the header file,
+# b4_yytranslate_define(cc|hh)
+# ----------------------------
+# Define yytranslate_. Sometimes used in the header file ($1=hh),
# sometimes in the cc file.
m4_define([b4_yytranslate_define],
[[ // Symbol number corresponding to token number t.
- inline
- ]b4_parser_class_name[::token_number_type
+ ]b4_inline([$1])b4_parser_class_name[::token_number_type
]b4_parser_class_name[::yytranslate_ (]b4_token_ctor_if([token_type],
[int])[ t)
{
@@ -462,12 +454,12 @@ m4_define([b4_yytranslate_define],
{
]b4_translate[
};
- const unsigned int user_token_number_max_ = ]b4_user_token_number_max[;
+ const unsigned user_token_number_max_ = ]b4_user_token_number_max[;
const token_number_type undef_token_ = ]b4_undef_token_number[;
- if (static_cast<int>(t) <= yyeof_)
+ if (static_cast<int> (t) <= yyeof_)
return yyeof_;
- else if (static_cast<unsigned int> (t) <= user_token_number_max_)
+ else if (static_cast<unsigned> (t) <= user_token_number_max_)
return translate_table[t];
else
return undef_token_;
diff --git a/data/c-like.m4 b/data/c-like.m4
index ff648a7d..26bab42e 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-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2015, 2018 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 51fad177..cb9a7a21 100644
--- a/data/c-skel.m4
+++ b/data/c-skel.m4
@@ -2,7 +2,8 @@
# C skeleton dispatching for Bison.
-# Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2015, 2018 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 738244d4..8607f55f 100644
--- a/data/c.m4
+++ b/data/c.m4
@@ -2,7 +2,7 @@
# C M4 Macros for Bison.
-# Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004-2015, 2018 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
@@ -459,7 +459,8 @@ b4_syncline([@oline@], [@ofile@])
# ------------------------------------
m4_define([b4_predicate_case],
[ case $1:
- if (! ($2)) YYERROR;
+ if (! (
+$2)) YYERROR;
b4_syncline([@oline@], [@ofile@])
break;])
diff --git a/data/glr.c b/data/glr.c
index 77fa23ac..cf902622 100644
--- a/data/glr.c
+++ b/data/glr.c
@@ -2,7 +2,7 @@
# GLR skeleton for Bison
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2015, 2018 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
@@ -198,7 +198,7 @@ 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])[
+ [2002-2015, 2018])[
]b4_cpp_guard_open([b4_spec_defines_file])[
]b4_shared_declarations[
@@ -213,7 +213,7 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C],
b4_output_begin([b4_parser_file_name])
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
- [2002-2015])[
+ [2002-2015, 2018])[
/* C GLR parser skeleton written by Paul Hilfinger. */
@@ -808,6 +808,7 @@ yyuserAction (yyRuleNum yyn, size_t yyrhslen, yyGLRStackItem* yyvsp,
*yyvalp = yyval_default;
else
*yyvalp = yyvsp[YYFILL (1-yyrhslen)].yystate.yysemantics.yysval;]b4_locations_if([[
+ /* Default location. */
YYLLOC_DEFAULT ((*yylocp), (yyvsp - yyrhslen), yyrhslen);
yystackp->yyerror_range[1].yystate.yyloc = *yylocp;
]])[
@@ -2074,6 +2075,7 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
case N: \
yyformat = S; \
break
+ default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
@@ -2294,8 +2296,8 @@ b4_dollar_popdef])[]dnl
{
yyrule = yydefaultAction (yystate);
if (yyrule == 0)
- {
-]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
+ {]b4_locations_if([[
+ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
yyreportSyntaxError (&yystack]b4_user_args[);
goto yyuser_error;
}
@@ -2334,8 +2336,8 @@ b4_dollar_popdef])[]dnl
yystack.yyerrState -= 1;
}
else if (yyisErrorAction (yyaction))
- {
-]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
+ {]b4_locations_if([[
+ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
yyreportSyntaxError (&yystack]b4_user_args[);
goto yyuser_error;
}
@@ -2380,8 +2382,8 @@ b4_dollar_popdef])[]dnl
if (yystack.yytops.yysize == 0)
yyFail (&yystack][]b4_lpure_args[, YY_("syntax error"));
YYCHK1 (yyresolveStack (&yystack]b4_user_args[));
- YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));
-]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
+ YYDPRINTF ((stderr, "Returning to deterministic operation.\n"));]b4_locations_if([[
+ yystack.yyerror_range[1].yystate.yyloc = yylloc;]])[
yyreportSyntaxError (&yystack]b4_user_args[);
goto yyuser_error;
}
@@ -2462,9 +2464,9 @@ b4_dollar_popdef])[]dnl
{
while (yystates[yyk])
{
- yyGLRState *yys = yystates[yyk];
-]b4_locations_if([[ yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;]]
-)[ if (yys->yypred != YY_NULLPTR)
+ yyGLRState *yys = yystates[yyk];]b4_locations_if([[
+ yystack.yyerror_range[1].yystate.yyloc = yys->yyloc;]])[
+ if (yys->yypred != YY_NULLPTR)
yydestroyGLRState ("Cleanup: popping", yys]b4_user_args[);
yystates[yyk] = yys->yypred;
yystack.yynextFree -= 1;
diff --git a/data/glr.cc b/data/glr.cc
index fbb6de7b..2ce14bc0 100644
--- a/data/glr.cc
+++ b/data/glr.cc
@@ -1,6 +1,6 @@
# C++ GLR skeleton for Bison
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2015, 2018 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
@@ -177,7 +177,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
| Print this symbol. |
`--------------------*/
- inline void
+ void
]b4_parser_class_name[::yy_symbol_value_print_ (int yytype,
const semantic_type* yyvaluep]b4_locations_if([[,
const location_type* yylocationp]])[)
@@ -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-2015])[
+ [2002-2015, 2018])[
// C++ GLR parser skeleton written by Akim Demaille.
diff --git a/data/java-skel.m4 b/data/java-skel.m4
index 9b5cb249..79c3f536 100644
--- a/data/java-skel.m4
+++ b/data/java-skel.m4
@@ -2,7 +2,7 @@
# Java skeleton dispatching for Bison.
-# Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2015, 2018 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 b319626a..5ac145c4 100644
--- a/data/java.m4
+++ b/data/java.m4
@@ -2,7 +2,7 @@
# Java language support for Bison
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2015, 2018 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 3773257c..afebda55 100644
--- a/data/lalr1.cc
+++ b/data/lalr1.cc
@@ -1,6 +1,6 @@
# C++ skeleton for Bison
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2015, 2018 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-2015])
+ [2002-2015, 2018])
m4_define([b4_parser_class_name],
[b4_percent_define_get([[parser_class_name]])])
@@ -142,9 +142,9 @@ b4_bison_locations_if([# Backward compatibility.
m4_include(b4_pkgdatadir/[stack.hh])
b4_variant_if([m4_include(b4_pkgdatadir/[variant.hh])])
-# b4_shared_declarations
-# ----------------------
-# Declaration that might either go into the header (if --defines)
+# b4_shared_declarations(hh|cc)
+# -----------------------------
+# Declaration that might either go into the header (if --defines, $1 = hh)
# or open coded in the parser body.
m4_define([b4_shared_declarations],
[b4_percent_code_get([[requires]])[
@@ -314,6 +314,8 @@ b4_location_define])])[
typedef basic_symbol<by_state> super_type;
/// Construct an empty symbol.
stack_symbol_type ();
+ /// Copy construct.
+ stack_symbol_type (const stack_symbol_type& that);
/// Steal the contents from \a sym to build this.
stack_symbol_type (state_type s, symbol_type& sym);
/// Assignment, needed by push_back.
@@ -342,7 +344,7 @@ b4_location_define])])[
void yypush_ (const char* m, state_type s, symbol_type& sym);
/// Pop \a n symbols the three stacks.
- void yypop_ (unsigned int n = 1);
+ void yypop_ (unsigned n = 1);
/// Constants.
enum
@@ -359,8 +361,8 @@ b4_location_define])])[
]b4_parse_param_vars[
};
-]b4_token_ctor_if([b4_yytranslate_define
-b4_public_types_define])[
+]b4_token_ctor_if([b4_yytranslate_define([$1])[
+]b4_public_types_define([$1])])[
]b4_namespace_close[
]b4_percent_define_flag_if([[global_tokens_and_yystype]],
@@ -386,7 +388,7 @@ b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++])
// C++ LALR(1) parser skeleton written by Akim Demaille.
]b4_cpp_guard_open([b4_spec_defines_file])[
-]b4_shared_declarations[
+]b4_shared_declarations(hh)[
]b4_cpp_guard_close([b4_spec_defines_file])
b4_output_end()
])
@@ -406,7 +408,7 @@ m4_if(b4_prefix, [yy], [],
]b4_null_define[
]b4_defines_if([[#include "@basename(]b4_spec_defines_file[@)"]],
- [b4_shared_declarations])[
+ [b4_shared_declarations([cc])])[
// User implementation prologue.
]b4_user_post_prologue[
@@ -443,7 +445,7 @@ m4_if(b4_prefix, [yy], [],
{ \
*yycdebug_ << Title << ' '; \
yy_print_ (*yycdebug_, Symbol); \
- *yycdebug_ << std::endl; \
+ *yycdebug_ << '\n'; \
} \
} while (false)
@@ -462,9 +464,9 @@ m4_if(b4_prefix, [yy], [],
#else // !]b4_api_PREFIX[DEBUG
# define YYCDEBUG if (false) std::cerr
-# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE(Symbol)
-# define YY_REDUCE_PRINT(Rule) static_cast<void>(0)
-# define YY_STACK_PRINT() static_cast<void>(0)
+# define YY_SYMBOL_PRINT(Title, Symbol) YYUSE (Symbol)
+# define YY_REDUCE_PRINT(Rule) static_cast<void> (0)
+# define YY_STACK_PRINT() static_cast<void> (0)
#endif // !]b4_api_PREFIX[DEBUG
@@ -533,27 +535,23 @@ m4_if(b4_prefix, [yy], [],
| Symbol types. |
`---------------*/
-]b4_token_ctor_if([], [b4_public_types_define])[
+]b4_token_ctor_if([], [b4_public_types_define([cc])])[
// by_state.
- inline
]b4_parser_class_name[::by_state::by_state ()
: state (empty_state)
{}
- inline
]b4_parser_class_name[::by_state::by_state (const by_state& other)
: state (other.state)
{}
- inline
void
]b4_parser_class_name[::by_state::clear ()
{
state = empty_state;
}
- inline
void
]b4_parser_class_name[::by_state::move (by_state& that)
{
@@ -561,12 +559,10 @@ m4_if(b4_prefix, [yy], [],
that.clear ();
}
- inline
]b4_parser_class_name[::by_state::by_state (state_type s)
: state (s)
{}
- inline
]b4_parser_class_name[::symbol_number_type
]b4_parser_class_name[::by_state::type_get () const
{
@@ -576,12 +572,17 @@ m4_if(b4_prefix, [yy], [],
return yystos_[state];
}
- inline
]b4_parser_class_name[::stack_symbol_type::stack_symbol_type ()
{}
+ ]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (const stack_symbol_type& that)
+ : super_type (that.state]b4_locations_if([, that.location])[)
+ {
+ ]b4_variant_if([b4_symbol_variant([that.type_get ()],
+ [value], [copy], [that.value])],
+ [[value = that.value;]])[
+ }
- inline
]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (state_type s, symbol_type& that)
: super_type (s]b4_locations_if([, that.location])[)
{
@@ -592,7 +593,6 @@ m4_if(b4_prefix, [yy], [],
that.type = empty_symbol;
}
- inline
]b4_parser_class_name[::stack_symbol_type&
]b4_parser_class_name[::stack_symbol_type::operator= (const stack_symbol_type& that)
{
@@ -606,7 +606,6 @@ m4_if(b4_prefix, [yy], [],
template <typename Base>
- inline
void
]b4_parser_class_name[::yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const
{
@@ -638,7 +637,6 @@ m4_if(b4_prefix, [yy], [],
}
#endif
- inline
void
]b4_parser_class_name[::yypush_ (const char* m, state_type s, symbol_type& sym)
{
@@ -646,7 +644,6 @@ m4_if(b4_prefix, [yy], [],
yypush_ (m, t);
}
- inline
void
]b4_parser_class_name[::yypush_ (const char* m, stack_symbol_type& s)
{
@@ -655,9 +652,8 @@ m4_if(b4_prefix, [yy], [],
yystack_.push (s);
}
- inline
void
- ]b4_parser_class_name[::yypop_ (unsigned int n)
+ ]b4_parser_class_name[::yypop_ (unsigned n)
{
yystack_.pop (n);
}
@@ -689,7 +685,7 @@ m4_if(b4_prefix, [yy], [],
}
#endif // ]b4_api_PREFIX[DEBUG
- inline ]b4_parser_class_name[::state_type
+ ]b4_parser_class_name[::state_type
]b4_parser_class_name[::yy_lr_goto_state_ (state_type yystate, int yysym)
{
int yyr = yypgoto_[yysym - yyntokens_] + yystate;
@@ -699,13 +695,13 @@ m4_if(b4_prefix, [yy], [],
return yydefgoto_[yysym - yyntokens_];
}
- inline bool
+ bool
]b4_parser_class_name[::yy_pact_value_is_default_ (int yyvalue)
{
return yyvalue == yypact_ninf_;
}
- inline bool
+ bool
]b4_parser_class_name[::yy_table_value_is_error_ (int yyvalue)
{
return yyvalue == yytable_ninf_;
@@ -736,7 +732,7 @@ m4_if(b4_prefix, [yy], [],
// avoid gratuitous conflicts when merging into the master branch.
try
{
- YYCDEBUG << "Starting parse" << std::endl;
+ YYCDEBUG << "Starting parse\n";
]m4_ifdef([b4_initial_action], [
b4_dollar_pushdef([yyla.value], [], [yyla.location])dnl
@@ -753,7 +749,7 @@ b4_dollar_popdef])[]dnl
// A new symbol was pushed on the stack.
yynewstate:
- YYCDEBUG << "Entering state " << yystack_[0].state << std::endl;
+ YYCDEBUG << "Entering state " << yystack_[0].state << '\n';
// Accept?
if (yystack_[0].state == yyfinal_)
@@ -827,7 +823,7 @@ b4_dollar_popdef])[]dnl
yylen = yyr2_[yyn];
{
stack_symbol_type yylhs;
- yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]);]b4_variant_if([
+ yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);]b4_variant_if([
/* Variants are always initialized to an empty instance of the
correct type. The default '$$ = $1' action is NOT applied
when using variants. */
@@ -844,10 +840,11 @@ b4_dollar_popdef])[]dnl
yylhs.value = yystack_@{0@}.value;])[
]b4_locations_if([dnl
[
- // Compute the default @@$.
+ // Default location.
{
slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
YYLLOC_DEFAULT (yylhs.location, slice, yylen);
+ yyerror_range[1].location = yylhs.location;
}]])[
// Perform the reduction.
@@ -918,8 +915,7 @@ b4_dollar_popdef])[]dnl
YYERROR and the label yyerrorlab therefore never appears in user
code. */
if (false)
- goto yyerrorlab;]b4_locations_if([[
- yyerror_range[1].location = yystack_[yylen - 1].location;]])[
+ goto yyerrorlab;
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
yypop_ (yylen);
@@ -993,8 +989,7 @@ b4_dollar_popdef])[]dnl
}
catch (...)
{
- YYCDEBUG << "Exception caught: cleaning lookahead and stack"
- << std::endl;
+ YYCDEBUG << "Exception caught: cleaning lookahead and stack\n";
// Do not try to display the values of the reclaimed symbols,
// as their printer might throw an exception.
if (!yyla.empty ())
@@ -1013,7 +1008,7 @@ b4_dollar_popdef])[]dnl
]b4_parser_class_name[::error (const syntax_error& yyexc)
{
error (]b4_join(b4_locations_if([yyexc.location]),
- [[yyexc.what()]])[);
+ [[yyexc.what ()]])[);
}
// Generate an error message.
@@ -1091,12 +1086,13 @@ b4_error_verbose_if([state_type yystate, const symbol_type& yyla],
case N: \
yyformat = S; \
break
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+ default: // Avoid compiler warnings.
+ YYCASE_ (0, YY_("syntax error"));
+ YYCASE_ (1, YY_("syntax error, unexpected %s"));
+ YYCASE_ (2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_ (3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_ (4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_ (5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
#undef YYCASE_
}
@@ -1144,18 +1140,18 @@ b4_error_verbose_if([state_type yystate, const symbol_type& yyla],
i_end = yystack_.end ();
i != i_end; ++i)
*yycdebug_ << ' ' << i->state;
- *yycdebug_ << std::endl;
+ *yycdebug_ << '\n';
}
// Report on the debug stream that the rule \a yyrule is going to be reduced.
void
]b4_parser_class_name[::yy_reduce_print_ (int yyrule)
{
- unsigned int yylno = yyrline_[yyrule];
+ unsigned yylno = yyrline_[yyrule];
int yynrhs = yyr2_[yyrule];
// Print the symbols being reduced, and their result.
*yycdebug_ << "Reducing stack by rule " << yyrule - 1
- << " (line " << yylno << "):" << std::endl;
+ << " (line " << yylno << "):\n";
// The symbols being reduced.
for (int yyi = 0; yyi < yynrhs; yyi++)
YY_SYMBOL_PRINT (" $" << yyi + 1 << " =",
@@ -1163,7 +1159,7 @@ b4_error_verbose_if([state_type yystate, const symbol_type& yyla],
}
#endif // ]b4_api_PREFIX[DEBUG
-]b4_token_ctor_if([], [b4_yytranslate_define])[
+]b4_token_ctor_if([], [b4_yytranslate_define([cc])])[
]b4_namespace_close[
]b4_epilogue[]dnl
b4_output_end()
diff --git a/data/lalr1.java b/data/lalr1.java
index 670ea013..7bf8e7fc 100644
--- a/data/lalr1.java
+++ b/data/lalr1.java
@@ -1,6 +1,6 @@
# Java skeleton for Bison -*- autoconf -*-
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2015, 2018 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-2015])
+ [2007-2015, 2018])
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 9b0b0680..ea097aab 100644
--- a/data/local.mk
+++ b/data/local.mk
@@ -1,4 +1,4 @@
-## Copyright (C) 2002, 2005-2015 Free Software Foundation, Inc.
+## Copyright (C) 2002, 2005-2015, 2018 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 53fddd48..3cc949df 100644
--- a/data/location.cc
+++ b/data/location.cc
@@ -1,6 +1,6 @@
# C++ skeleton for Bison
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2015, 2018 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 <http://www.gnu.org/licenses/>.
m4_pushdef([b4_copyright_years],
- [2002-2015])
+ [2002-2015, 2018])
# b4_position_define
# ------------------
@@ -28,19 +28,18 @@ m4_define([b4_position_define],
public:]m4_ifdef([b4_location_constructors], [[
/// Construct a position.
explicit position (]b4_percent_define_get([[filename_type]])[* f = YY_NULLPTR,
- unsigned int l = ]b4_location_initial_line[u,
- unsigned int c = ]b4_location_initial_column[u)
+ unsigned l = ]b4_location_initial_line[u,
+ unsigned c = ]b4_location_initial_column[u)
: filename (f)
, line (l)
, column (c)
- {
- }
+ {}
]])[
/// Initialization.
void initialize (]b4_percent_define_get([[filename_type]])[* fn = YY_NULLPTR,
- unsigned int l = ]b4_location_initial_line[u,
- unsigned int c = ]b4_location_initial_column[u)
+ unsigned l = ]b4_location_initial_line[u,
+ unsigned c = ]b4_location_initial_column[u)
{
filename = fn;
line = l;
@@ -69,15 +68,15 @@ m4_define([b4_position_define],
/// File name to which this position refers.
]b4_percent_define_get([[filename_type]])[* filename;
/// Current line number.
- unsigned int line;
+ unsigned line;
/// Current column number.
- unsigned int column;
+ unsigned column;
private:
/// Compute max(min, lhs+rhs) (provided min <= lhs).
- static unsigned int add_ (unsigned int lhs, int rhs, unsigned int min)
+ static unsigned add_ (unsigned lhs, int rhs, unsigned min)
{
- return (0 < rhs || -static_cast<unsigned int>(rhs) < lhs
+ return (0 < rhs || -static_cast<unsigned>(rhs) < lhs
? rhs + lhs
: min);
}
@@ -157,30 +156,27 @@ m4_define([b4_location_define],
location (const position& b, const position& e)
: begin (b)
, end (e)
- {
- }
+ {}
/// Construct a 0-width location in \a p.
explicit location (const position& p = position ())
: begin (p)
, end (p)
- {
- }
+ {}
/// Construct a 0-width location in \a f, \a l, \a c.
explicit location (]b4_percent_define_get([[filename_type]])[* f,
- unsigned int l = ]b4_location_initial_line[u,
- unsigned int c = ]b4_location_initial_column[u)
+ unsigned l = ]b4_location_initial_line[u,
+ unsigned c = ]b4_location_initial_column[u)
: begin (f, l, c)
, end (f, l, c)
- {
- }
+ {}
])[
/// Initialization.
void initialize (]b4_percent_define_get([[filename_type]])[* f = YY_NULLPTR,
- unsigned int l = ]b4_location_initial_line[u,
- unsigned int c = ]b4_location_initial_column[u)
+ unsigned l = ]b4_location_initial_line[u,
+ unsigned c = ]b4_location_initial_column[u)
{
begin.initialize (f, l, c);
end = begin;
@@ -278,7 +274,7 @@ m4_define([b4_location_define],
inline std::basic_ostream<YYChar>&
operator<< (std::basic_ostream<YYChar>& ostr, const location& loc)
{
- unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0;
+ unsigned end_col = 0 < loc.end.column ? loc.end.column - 1 : 0;
ostr << loc.begin;
if (loc.end.filename
&& (!loc.begin.filename
diff --git a/data/stack.hh b/data/stack.hh
index a56e6c74..c79f0833 100644
--- a/data/stack.hh
+++ b/data/stack.hh
@@ -1,6 +1,6 @@
# C++ skeleton for Bison
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2015, 2018 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,12 +16,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
m4_pushdef([b4_copyright_years],
- [2002-2015])
+ [2002-2015, 2018])
# b4_stack_define
# ---------------
m4_define([b4_stack_define],
-[[ template <class T, class S = std::vector<T> >
+[[ /// A stack with random access from its top.
+ template <class T, class S = std::vector<T> >
class stack
{
public:
@@ -35,20 +36,24 @@ m4_define([b4_stack_define],
seq_.reserve (200);
}
- stack (unsigned int n)
+ stack (unsigned n)
: seq_ (n)
{}
- inline
+ /// Random access.
+ ///
+ /// Index 0 returns the topmost element.
T&
- operator[] (unsigned int i)
+ operator[] (unsigned i)
{
return seq_[seq_.size () - 1 - i];
}
- inline
+ /// Random access.
+ ///
+ /// Index 0 returns the topmost element.
const T&
- operator[] (unsigned int i) const
+ operator[] (unsigned i) const
{
return seq_[seq_.size () - 1 - i];
}
@@ -56,7 +61,6 @@ m4_define([b4_stack_define],
/// Steal the contents of \a t.
///
/// Close to move-semantics.
- inline
void
push (T& t)
{
@@ -64,9 +68,8 @@ m4_define([b4_stack_define],
operator[](0).move (t);
}
- inline
void
- pop (unsigned int n = 1)
+ pop (unsigned n = 1)
{
for (; n; --n)
seq_.pop_back ();
@@ -78,21 +81,18 @@ m4_define([b4_stack_define],
seq_.clear ();
}
- inline
typename S::size_type
size () const
{
return seq_.size ();
}
- inline
const_iterator
begin () const
{
return seq_.rbegin ();
}
- inline
const_iterator
end () const
{
@@ -111,21 +111,20 @@ m4_define([b4_stack_define],
class slice
{
public:
- slice (const S& stack, unsigned int range)
+ slice (const S& stack, unsigned range)
: stack_ (stack)
, range_ (range)
{}
- inline
const T&
- operator [] (unsigned int i) const
+ operator [] (unsigned i) const
{
return stack_[range_ - i];
}
private:
const S& stack_;
- unsigned int range_;
+ unsigned range_;
};
]])
diff --git a/data/variant.hh b/data/variant.hh
index f918e34c..7a6fbfb9 100644
--- a/data/variant.hh
+++ b/data/variant.hh
@@ -1,6 +1,6 @@
# C++ skeleton for Bison
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2015, 2018 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
@@ -27,7 +27,7 @@
m4_define([b4_symbol_variant],
[m4_pushdef([b4_dollar_dollar],
[$2.$3< $][3 > (m4_shift3($@))])dnl
- switch ($1)
+switch ($1)
{
b4_type_foreach([b4_type_action_])[]dnl
default:
diff --git a/data/xslt/bison.xsl b/data/xslt/bison.xsl
index 9e60ad99..9f9132b9 100644
--- a/data/xslt/bison.xsl
+++ b/data/xslt/bison.xsl
@@ -3,7 +3,7 @@
<!--
bison.xsl - common templates for Bison XSLT.
- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+ Copyright (C) 2007-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/data/xslt/xml2dot.xsl b/data/xslt/xml2dot.xsl
index aca9045c..a46fc564 100644
--- a/data/xslt/xml2dot.xsl
+++ b/data/xslt/xml2dot.xsl
@@ -3,7 +3,7 @@
<!--
xml2dot.xsl - transform Bison XML Report into DOT.
- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+ Copyright (C) 2007-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/data/xslt/xml2text.xsl b/data/xslt/xml2text.xsl
index c3d15296..747c32b9 100644
--- a/data/xslt/xml2text.xsl
+++ b/data/xslt/xml2text.xsl
@@ -3,7 +3,7 @@
<!--
xml2text.xsl - transform Bison XML Report into plain text.
- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+ Copyright (C) 2007-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/data/xslt/xml2xhtml.xsl b/data/xslt/xml2xhtml.xsl
index 03498914..12c99eb1 100644
--- a/data/xslt/xml2xhtml.xsl
+++ b/data/xslt/xml2xhtml.xsl
@@ -3,7 +3,7 @@
<!--
xml2html.xsl - transform Bison XML Report into XHTML.
- Copyright (C) 2007-2015 Free Software Foundation, Inc.
+ Copyright (C) 2007-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/data/yacc.c b/data/yacc.c
index 600e77df..db83b56e 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -1,11 +1,11 @@
-*- C -*-
# Yacc compatible skeleton for Bison
-# Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation,
-# Inc.
+# Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software
+# Foundation, Inc.
m4_pushdef([b4_copyright_years],
- [1984, 1989-1990, 2000-2015])
+ [1984, 1989-1990, 2000-2015, 2018])
# 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
@@ -1207,6 +1207,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
case N: \
yyformat = S; \
break
+ default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
@@ -1641,8 +1642,9 @@ yyreduce:
yyval = yyvsp[1-yylen];
]b4_locations_if(
-[[ /* Default location. */
- YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);]])[
+[[ /* Default location. */
+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
+ yyerror_range[1] = yyloc;]])[
YY_REDUCE_PRINT (yyn);]b4_lac_if([[
{
int yychar_backup = yychar;
@@ -1782,8 +1784,7 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
-]b4_locations_if([[ yyerror_range[1] = yylsp[1-yylen];
-]])[ /* Do not reclaim the symbols of the rule whose action triggered
+ /* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
diff --git a/djgpp/Makefile.maint b/djgpp/Makefile.maint
index 84a93aaf..1d969d18 100644
--- a/djgpp/Makefile.maint
+++ b/djgpp/Makefile.maint
@@ -1,7 +1,7 @@
# DJGPP Maintainer's Makefile -*-Makefile-*-
# Requires GNU sed
-## Copyright (C) 2005-2015 Free Software Foundation, Inc.
+## Copyright (C) 2005-2015, 2018 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/djgpp/README.in b/djgpp/README.in
index 2f888565..c6154c92 100644
--- a/djgpp/README.in
+++ b/djgpp/README.in
@@ -1,6 +1,6 @@
This is a port of GNU Bison @VERSION@ to MSDOS/DJGPP.
-Copyright (C) 2005-2015 Free Software Foundation, Inc.
+Copyright (C) 2005-2015, 2018 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/djgpp/config.bat b/djgpp/config.bat
index d2ed5ab3..785163c5 100644
--- a/djgpp/config.bat
+++ b/djgpp/config.bat
@@ -4,7 +4,7 @@ Rem Configure Bison for DJGPP.
Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
Rem format, or else stock DOS/Windows shells will refuse to run it.
-Rem Copyright (C) 2005-2015 Free Software Foundation, Inc.
+Rem Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
Rem This program is free software: you can redistribute it and/or modify
Rem it under the terms of the GNU General Public License as published by
diff --git a/djgpp/config.sed b/djgpp/config.sed
index 423b1df9..1a2d8c6c 100644
--- a/djgpp/config.sed
+++ b/djgpp/config.sed
@@ -2,7 +2,7 @@
# Sed script for additional DJGPP specific editing
# of the configure script generated by autoconf 2.62.
-# Copyright (C) 2005-2015 Free Software Foundation, Inc.
+# Copyright (C) 2005-2015, 2018 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/djgpp/config.site b/djgpp/config.site
index 08d40d3c..c5e114ea 100644
--- a/djgpp/config.site
+++ b/djgpp/config.site
@@ -3,7 +3,7 @@
# This is the config.site file for configuring GNU packages
# which are to be built with DJGPP tools.
-# Copyright (C) 2005-2015 Free Software Foundation, Inc.
+# Copyright (C) 2005-2015, 2018 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/djgpp/config_h.sed b/djgpp/config_h.sed
index 5308d5d9..3d6be931 100644
--- a/djgpp/config_h.sed
+++ b/djgpp/config_h.sed
@@ -1,6 +1,6 @@
# sed script for DJGPP specific editing of config.hin
-# Copyright (C) 2005-2015 Free Software Foundation, Inc.
+# Copyright (C) 2005-2015, 2018 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/djgpp/djunpack.bat b/djgpp/djunpack.bat
index 59c8c638..1359db63 100644
--- a/djgpp/djunpack.bat
+++ b/djgpp/djunpack.bat
@@ -7,7 +7,7 @@ Rem This batch file unpacks the Bison distribution while simultaneously
Rem renaming some of the files whose names are invalid on DOS or conflict
Rem with other file names after truncation to DOS 8+3 namespace.
Rem
-Rem Copyright (C) 2005-2015 Free Software Foundation, Inc.
+Rem Copyright (C) 2005-2015, 2018 Free Software Foundation, Inc.
Rem
Rem This program is free software: you can redistribute it and/or modify
Rem it under the terms of the GNU General Public License as published by
diff --git a/djgpp/local.mk b/djgpp/local.mk
index f5100529..50b1a336 100644
--- a/djgpp/local.mk
+++ b/djgpp/local.mk
@@ -1,4 +1,4 @@
-## Copyright (C) 2008-2015 Free Software Foundation, Inc.
+## Copyright (C) 2008-2015, 2018 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/djgpp/subpipe.c b/djgpp/subpipe.c
index 47d2bd44..f5de36ca 100644
--- a/djgpp/subpipe.c
+++ b/djgpp/subpipe.c
@@ -1,6 +1,6 @@
/* Subprocesses with pipes.
- Copyright (C) 2005-2015 Free Software Foundation, Inc.
+ Copyright (C) 2005-2015, 2018 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/djgpp/subpipe.h b/djgpp/subpipe.h
index 92a26d12..590b00d5 100644
--- a/djgpp/subpipe.h
+++ b/djgpp/subpipe.h
@@ -1,6 +1,6 @@
/* Subprocesses with pipes.
- Copyright (C) 2005-2015 Free Software Foundation, Inc.
+ Copyright (C) 2005-2015, 2018 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/djgpp/testsuite.sed b/djgpp/testsuite.sed
index 0ba27ee5..0623b9d1 100644
--- a/djgpp/testsuite.sed
+++ b/djgpp/testsuite.sed
@@ -2,7 +2,7 @@
# Sed script for additional DJGPP specific editing
# of the testsuite script generated by autoconf 2.61.
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2015, 2018 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/doc/bison.texi b/doc/bison.texi
index 26c17d60..7d125b55 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -35,7 +35,7 @@
This manual (@value{UPDATED}) is for GNU Bison (version
@value{VERSION}), the GNU parser generator.
-Copyright @copyright{} 1988-1993, 1995, 1998-2015 Free Software
+Copyright @copyright{} 1988-1993, 1995, 1998-2015, 2018 Free Software
Foundation, Inc.
@quotation
@@ -143,7 +143,7 @@ Writing GLR Parsers
Examples
-* RPN Calc:: Reverse polish notation calculator;
+* RPN Calc:: Reverse Polish Notation Calculator;
a first example with no operator precedence.
* Infix Calc:: Infix (algebraic) notation calculator.
Operator precedence is introduced.
@@ -1493,7 +1493,7 @@ simple program, all the rest of the program can go here.
@cindex examples, simple
Now we show and explain several sample programs written using Bison: a
-reverse polish notation calculator, an algebraic (infix) notation
+Reverse Polish Notation calculator, an algebraic (infix) notation
calculator --- later extended to track ``locations'' ---
and a multi-function calculator. All
produce usable, though limited, interactive desk-top calculators.
@@ -1503,7 +1503,7 @@ languages are written the same way. You can copy these examples into a
source file to try them.
@menu
-* RPN Calc:: Reverse polish notation calculator;
+* RPN Calc:: Reverse Polish Notation Calculator;
a first example with no operator precedence.
* Infix Calc:: Infix (algebraic) notation calculator.
Operator precedence is introduced.
@@ -1516,13 +1516,12 @@ source file to try them.
@node RPN Calc
@section Reverse Polish Notation Calculator
-@cindex reverse polish notation
-@cindex polish notation calculator
+@cindex Reverse Polish Notation
@cindex @code{rpcalc}
@cindex calculator, simple
-The first example is that of a simple double-precision @dfn{reverse polish
-notation} calculator (a calculator using postfix operators). This example
+The first example is that of a simple double-precision @dfn{Reverse Polish
+Notation} calculator (a calculator using postfix operators). This example
provides a good starting point, since operator precedence is not an issue.
The second example will illustrate how operator precedence is handled.
@@ -1542,12 +1541,12 @@ The source code for this calculator is named @file{rpcalc.y}. The
@node Rpcalc Declarations
@subsection Declarations for @code{rpcalc}
-Here are the C and Bison declarations for the reverse polish notation
+Here are the C and Bison declarations for the Reverse Polish Notation
calculator. As in C, comments are placed between @samp{/*@dots{}*/}.
@comment file: rpcalc.y
@example
-/* Reverse polish notation calculator. */
+/* Reverse Polish Notation calculator. */
@group
%@{
@@ -1598,7 +1597,7 @@ declared is @code{NUM}, the token type for numeric constants.
@node Rpcalc Rules
@subsection Grammar Rules for @code{rpcalc}
-Here are the grammar rules for the reverse polish notation calculator.
+Here are the grammar rules for the Reverse Polish Notation calculator.
@comment file: rpcalc.y
@example
@@ -8933,7 +8932,7 @@ clear the flag.
Developing a parser can be a challenge, especially if you don't understand
the algorithm (@pxref{Algorithm, ,The Bison Parser Algorithm}). This
-chapter explains how understand and debug a parser.
+chapter explains how to understand and debug a parser.
The first sections focus on the static part of the parser: its structure.
They explain how to generate and read the detailed description of the
@@ -10901,12 +10900,12 @@ Regular union-based code in Lex scanner typically look like:
@example
[0-9]+ @{
- yylval.ival = text_to_int (yytext);
- return yy::parser::INTEGER;
+ yylval->ival = text_to_int (yytext);
+ return yy::parser::token::INTEGER;
@}
[a-z]+ @{
- yylval.sval = new std::string (yytext);
- return yy::parser::IDENTIFIER;
+ yylval->sval = new std::string (yytext);
+ return yy::parser::token::IDENTIFIER;
@}
@end example
@@ -10915,12 +10914,12 @@ initialized. So the code would look like:
@example
[0-9]+ @{
- yylval.build<int>() = text_to_int (yytext);
- return yy::parser::INTEGER;
+ yylval->build<int> () = text_to_int (yytext);
+ return yy::parser::token::INTEGER;
@}
[a-z]+ @{
- yylval.build<std::string> = yytext;
- return yy::parser::IDENTIFIER;
+ yylval->build<std::string> () = yytext;
+ return yy::parser::token::IDENTIFIER;
@}
@end example
@@ -10929,12 +10928,12 @@ or
@example
[0-9]+ @{
- yylval.build(text_to_int (yytext));
- return yy::parser::INTEGER;
+ yylval->build (text_to_int (yytext));
+ return yy::parser::token::INTEGER;
@}
[a-z]+ @{
- yylval.build(yytext);
- return yy::parser::IDENTIFIER;
+ yylval->build (yytext);
+ return yy::parser::token::IDENTIFIER;
@}
@end example
@@ -10962,8 +10961,8 @@ it is still possible to give an integer as semantic value for a string.
So for each token type, Bison generates named constructors as follows.
-@deftypemethod {symbol_type} {} make_@var{token} (const @var{value_type}& @var{value}, const location_type& @var{location})
-@deftypemethodx {symbol_type} {} make_@var{token} (const location_type& @var{location})
+@deftypemethod {symbol_type} {} {make_@var{token}} (const @var{value_type}& @var{value}, const location_type& @var{location})
+@deftypemethodx {symbol_type} {} {make_@var{token}} (const location_type& @var{location})
Build a complete terminal symbol for the token type @var{token} (not
including the @code{api.token.prefix}) whose possible semantic value is
@var{value} of adequate @var{value_type}. If location tracking is enabled,
@@ -10983,20 +10982,18 @@ For instance, given the following declarations:
Bison generates the following functions:
@example
-symbol_type make_IDENTIFIER(const std::string& v,
- const location_type& l);
-symbol_type make_INTEGER(const int& v,
- const location_type& loc);
-symbol_type make_COLON(const location_type& loc);
+symbol_type make_IDENTIFIER (const std::string&, const location_type&);
+symbol_type make_INTEGER (const int&, const location_type&);
+symbol_type make_COLON (const location_type&);
@end example
@noindent
which should be used in a Lex-scanner as follows.
@example
-[0-9]+ return yy::parser::make_INTEGER(text_to_int (yytext), loc);
-[a-z]+ return yy::parser::make_IDENTIFIER(yytext, loc);
-":" return yy::parser::make_COLON(loc);
+[0-9]+ return yy::parser::make_INTEGER (text_to_int (yytext), loc);
+[a-z]+ return yy::parser::make_IDENTIFIER (yytext, loc);
+":" return yy::parser::make_COLON (loc);
@end example
Tokens that do not have an identifier are not accessible: you cannot simply
@@ -11177,13 +11174,13 @@ calcxx_driver::parse (const std::string &f)
void
calcxx_driver::error (const yy::location& l, const std::string& m)
@{
- std::cerr << l << ": " << m << std::endl;
+ std::cerr << l << ": " << m << '\n';
@}
void
calcxx_driver::error (const std::string& m)
@{
- std::cerr << m << std::endl;
+ std::cerr << m << '\n';
@}
@end example
@@ -11461,13 +11458,13 @@ The rules are simple. The driver is used to report errors.
@comment file: calc++-scanner.ll
@example
-"-" return yy::calcxx_parser::make_MINUS(loc);
-"+" return yy::calcxx_parser::make_PLUS(loc);
-"*" return yy::calcxx_parser::make_STAR(loc);
-"/" return yy::calcxx_parser::make_SLASH(loc);
-"(" return yy::calcxx_parser::make_LPAREN(loc);
-")" return yy::calcxx_parser::make_RPAREN(loc);
-":=" return yy::calcxx_parser::make_ASSIGN(loc);
+"-" return yy::calcxx_parser::make_MINUS (loc);
+"+" return yy::calcxx_parser::make_PLUS (loc);
+"*" return yy::calcxx_parser::make_STAR (loc);
+"/" return yy::calcxx_parser::make_SLASH (loc);
+"(" return yy::calcxx_parser::make_LPAREN (loc);
+")" return yy::calcxx_parser::make_RPAREN (loc);
+":=" return yy::calcxx_parser::make_ASSIGN (loc);
@group
@{int@} @{
@@ -11475,12 +11472,12 @@ The rules are simple. The driver is used to report errors.
long n = strtol (yytext, NULL, 10);
if (! (INT_MIN <= n && n <= INT_MAX && errno != ERANGE))
driver.error (loc, "integer is out of range");
- return yy::calcxx_parser::make_NUMBER(n, loc);
+ return yy::calcxx_parser::make_NUMBER (n, loc);
@}
@end group
-@{id@} return yy::calcxx_parser::make_IDENTIFIER(yytext, loc);
+@{id@} return yy::calcxx_parser::make_IDENTIFIER (yytext, loc);
. driver.error (loc, "invalid character");
-<<EOF>> return yy::calcxx_parser::make_END(loc);
+<<EOF>> return yy::calcxx_parser::make_END (loc);
%%
@end example
@@ -11536,7 +11533,7 @@ main (int argc, char *argv[])
else if (argv[i] == std::string ("-s"))
driver.trace_scanning = true;
else if (!driver.parse (argv[i]))
- std::cout << driver.result << std::endl;
+ std::cout << driver.result << '\n';
else
res = 1;
return res;
@@ -12543,7 +12540,7 @@ is turned on by default. If you have problems building in the @file{po}
subdirectory, it indicates that your system's internationalization
support is lacking. You can re-configure Bison with
@option{--disable-nls} to turn off this support, or you can install GNU
-gettext from @url{ftp://ftp.gnu.org/gnu/gettext/} and re-configure
+gettext from @url{https://ftp.gnu.org/gnu/gettext/} and re-configure
Bison. See the file @file{ABOUT-NLS} for more information.
@@ -12572,7 +12569,7 @@ I found a bug. What should I include in the bug report?
@end quotation
Before you send a bug report, make sure you are using the latest
-version. Check @url{ftp://ftp.gnu.org/pub/gnu/bison/} or one of its
+version. Check @url{https://ftp.gnu.org/pub/gnu/bison/} or one of its
mirrors. Be sure to include the version number in your bug report. If
the bug is present in the latest version but not in a previous version,
try to determine the most recent version which did not contain the bug.
@@ -13348,7 +13345,7 @@ A reentrant subprogram is a subprogram which can be in invoked any
number of times in parallel, without interference between the various
invocations. @xref{Pure Decl, ,A Pure (Reentrant) Parser}.
-@item Reverse polish notation
+@item Reverse Polish Notation
A language in which all operators are postfix operators.
@item Right recursion
diff --git a/doc/local.mk b/doc/local.mk
index c340452a..5fa08cee 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -1,4 +1,5 @@
-## Copyright (C) 2001-2003, 2005-2015 Free Software Foundation, Inc.
+## Copyright (C) 2001-2003, 2005-2015, 2018 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/doc/refcard.tex b/doc/refcard.tex
index 23956c00..772cb02b 100644
--- a/doc/refcard.tex
+++ b/doc/refcard.tex
@@ -19,7 +19,8 @@
\def\finalout{\overfullrule=0pt}
%\finalout
-% Copyright (c) 1998, 2001, 2009-2015 Free Software Foundation, Inc.
+% Copyright (c) 1998, 2001, 2009-2015, 2018 Free Software Foundation,
+% Inc.
%
% This file is part of Bison.
%
diff --git a/etc/README b/etc/README
index d2b12f76..3778af14 100644
--- a/etc/README
+++ b/etc/README
@@ -16,7 +16,7 @@ straightforward use of _build/src/bison would.)
--
-Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc.
+Copyright (C) 2006, 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/etc/bench.pl.in b/etc/bench.pl.in
index cbd9473d..b3f3b61e 100755
--- a/etc/bench.pl.in
+++ b/etc/bench.pl.in
@@ -1,6 +1,6 @@
#! /usr/bin/perl -w
-# Copyright (C) 2006, 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008-2015, 2018 Free Software Foundation, Inc.
#
# This file is part of Bison, the GNU Compiler Compiler.
#
@@ -738,7 +738,7 @@ yy::parser::token_type yylex(yy::parser::semantic_type* yylvalp,
void
yy::parser::error(const yy::parser::location_type& loc, const std::string& msg)
{
- std::cerr << loc << ": " << msg << std::endl;
+ std::cerr << loc << ": " << msg << '\n';
}
int main(int argc, char *argv[])
diff --git a/etc/local.mk b/etc/local.mk
index 16d2b550..b238fe4c 100644
--- a/etc/local.mk
+++ b/etc/local.mk
@@ -1,4 +1,4 @@
-## Copyright (C) 2006, 2008-2015 Free Software Foundation, Inc.
+## Copyright (C) 2006, 2008-2015, 2018 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/examples/calc++/calc++.test b/examples/calc++/calc++.test
index 514c57ab..53663846 100755
--- a/examples/calc++/calc++.test
+++ b/examples/calc++/calc++.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2005-2015 Free Software Foundation, Inc.
+# Copyright (C) 2005-2015, 2018 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/examples/calc++/local.mk b/examples/calc++/local.mk
index 9b1bf957..53c6834b 100644
--- a/examples/calc++/local.mk
+++ b/examples/calc++/local.mk
@@ -1,4 +1,5 @@
-# Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2005-2006, 2008-2015, 2018 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/examples/extexi b/examples/extexi
index f7c443f2..40d16e38 100755
--- a/examples/extexi
+++ b/examples/extexi
@@ -3,8 +3,8 @@
# This file is part of GNU Bison
-# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2015 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992, 2000-2001, 2005-2006, 2009-2015, 2018 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/examples/local.mk b/examples/local.mk
index dfb3e324..3a23d808 100644
--- a/examples/local.mk
+++ b/examples/local.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2008-2015, 2018 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/examples/mfcalc/local.mk b/examples/mfcalc/local.mk
index 9c0b4799..e8be61a9 100644
--- a/examples/mfcalc/local.mk
+++ b/examples/mfcalc/local.mk
@@ -1,4 +1,5 @@
-# Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2005-2006, 2008-2015, 2018 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/examples/mfcalc/mfcalc.test b/examples/mfcalc/mfcalc.test
index 5a6d00dd..5dd98e71 100755
--- a/examples/mfcalc/mfcalc.test
+++ b/examples/mfcalc/mfcalc.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2005-2015 Free Software Foundation, Inc.
+# Copyright (C) 2005-2015, 2018 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/examples/rpcalc/local.mk b/examples/rpcalc/local.mk
index eaf9c8d8..2c4ce2b0 100644
--- a/examples/rpcalc/local.mk
+++ b/examples/rpcalc/local.mk
@@ -1,4 +1,5 @@
-# Copyright (C) 2005-2006, 2008-2015 Free Software Foundation, Inc.
+# Copyright (C) 2005-2006, 2008-2015, 2018 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/examples/rpcalc/rpcalc.test b/examples/rpcalc/rpcalc.test
index f59bdb71..45325377 100755
--- a/examples/rpcalc/rpcalc.test
+++ b/examples/rpcalc/rpcalc.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2005-2015 Free Software Foundation, Inc.
+# Copyright (C) 2005-2015, 2018 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/examples/test b/examples/test
index f9a09436..a30d3616 100755
--- a/examples/test
+++ b/examples/test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2005-2015 Free Software Foundation, Inc.
+# Copyright (C) 2005-2015, 2018 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/examples/variant.yy b/examples/variant.yy
index 99426cab..b6d97c9c 100644
--- a/examples/variant.yy
+++ b/examples/variant.yy
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2008-2015 Free Software Foundation, Inc.
+ Copyright (C) 2008-2015, 2018 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
@@ -25,9 +25,9 @@
%code requires // *.hh
{
-#include <list>
#include <string>
-typedef std::list<std::string> strings_type;
+#include <vector>
+typedef std::vector<std::string> strings_type;
}
%code // *.cc
@@ -43,14 +43,14 @@ typedef std::list<std::string> strings_type;
static parser::symbol_type yylex ();
}
- // Printing a list of strings.
- // Koening look up will look into std, since that's an std::list.
+ // Printing a vector of strings.
+ // Koening look up will look into std, since that's an std::vector.
namespace std
{
std::ostream&
operator<< (std::ostream& o, const strings_type& ss)
{
- o << "(" << &ss << ") {";
+ o << '(' << &ss << ") {";
const char *sep = "";
for (strings_type::const_iterator i = ss.begin(), end = ss.end();
i != end; ++i)
@@ -58,13 +58,12 @@ typedef std::list<std::string> strings_type;
o << sep << *i;
sep = ", ";
}
- return o << "}";
+ return o << '}';
}
}
// Conversion to string.
template <typename T>
- inline
std::string
string_cast (const T& t)
{
@@ -80,12 +79,12 @@ typedef std::list<std::string> strings_type;
%token END_OF_FILE 0;
%type <::std::string> item;
-%type <::std::list<std::string>> list;
+%type <::std::vector<std::string>> list;
%%
result:
- list { std::cout << $1 << std::endl; }
+ list { std::cout << $1 << '\n'; }
;
list:
@@ -135,7 +134,7 @@ namespace yy
void
parser::error (const parser::location_type& loc, const std::string& msg)
{
- std::cerr << loc << ": " << msg << std::endl;
+ std::cerr << loc << ": " << msg << '\n';
}
}
diff --git a/gnulib b/gnulib
-Subproject ea6cb044ca0ab57045900a494a0e4ae39ed5372
+Subproject 0d10473be6fb40c42c0d10c3417a818b0ebfcce
diff --git a/lib/.gitignore b/lib/.gitignore
index 4815b9e1..c833c2bb 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -4,8 +4,7 @@
/*~
/.deps
/.dirstamp
-/Makefile
-/Makefile.in
+/_Noreturn.h
/alignof.h
/alloca.h
/alloca.in.h
@@ -15,7 +14,9 @@
/asnprintf.c
/basename-lgpl.c
/basename.c
+/binary-io.c
/binary-io.h
+/bitrotate.c
/bitrotate.h
/c++defs.h
/c-ctype.c
@@ -28,8 +29,6 @@
/charset.alias
/cloexec.c
/cloexec.h
-/close-hook.c
-/close-hook.h
/close-stream.c
/close-stream.h
/close.c
@@ -56,7 +55,6 @@
/exitfail.h
/fatal-signal.c
/fatal-signal.h
-/fclose.c
/fcntl.c
/fcntl.h
/fcntl.in.h
@@ -81,19 +79,27 @@
/fseterr.h
/fstat.c
/getdtablesize.c
+/getopt-cdefs.in.h
+/getopt-core.h
+/getopt-ext.h
+/getopt-pfx-core.h
+/getopt-pfx-ext.h
/getopt.c
/getopt.h
/getopt.in.h
/getopt1.c
/getopt_int.h
+/getprogname.c
+/getprogname.h
/gettext.h
/gnulib.mk
+/hard-locale.c
+/hard-locale.h
/hash.c
/hash.h
/intprops.h
/inttypes.h
/inttypes.in.h
-/ioctl.c
/isnan.c
/isnand-nolibm.h
/isnand.c
@@ -103,9 +109,15 @@
/isnanl.c
/itold.c
/ldexpl.c
+/limits.h
+/limits.in.h
/localcharset.c
/localcharset.h
+/lstat.c
/malloc.c
+/malloca.c
+/malloca.h
+/math.c
/math.h
/math.in.h
/mbrtowc.c
@@ -114,12 +126,11 @@
/mbswidth.h
/memchr.c
/memchr.valgrind
+/minmax.h
/msvc-inval.c
/msvc-inval.h
/msvc-nothrow.c
/msvc-nothrow.h
-/nonblocking.c
-/nonblocking.h
/obstack.c
/obstack.h
/obstack_printf.c
@@ -140,7 +151,6 @@
/printf.c
/progname.c
/progname.h
-/quote.c
/quote.h
/quotearg.c
/quotearg.h
@@ -154,6 +164,7 @@
/ref-del.sin
/sched.h
/sched.in.h
+/sig-handler.c
/sig-handler.h
/sigaction.c
/signal.h
@@ -182,6 +193,8 @@
/spawnp.c
/sprintf.c
/stamp-h1
+/stat-w32.c
+/stat-w32.h
/stat.c
/stdbool.h
/stdbool.in.h
@@ -192,7 +205,6 @@
/stdio--.h
/stdio-impl.h
/stdio-safer.h
-/stdio-write.c
/stdio.h
/stdio.in.h
/stdlib.h
@@ -213,20 +225,17 @@
/strnlen.c
/strverscmp.c
/sys
-/sys_ioctl.h
/sys_ioctl.in.h
-/sys_socket.h
/sys_socket.in.h
-/sys_stat.h
/sys_stat.in.h
/sys_types.in.h
-/sys_wait.h
/sys_wait.in.h
/sysexits.in.h
/time.h
/time.in.h
/unistd--.h
/unistd-safer.h
+/unistd.c
/unistd.h
/unistd.in.h
/unitypes.h
@@ -234,6 +243,7 @@
/uniwidth
/uniwidth.h
/uniwidth.in.h
+/unlink.c
/unlocked-io.h
/unsetenv.c
/vasnprintf.c
@@ -242,7 +252,6 @@
/vfprintf.c
/vsnprintf.c
/vsprintf.c
-/w32sock.h
/w32spawn.h
/wait-process.c
/wait-process.h
@@ -250,6 +259,7 @@
/warn-on-use.h
/wchar.h
/wchar.in.h
+/wctype-h.c
/wctype.h
/wctype.in.h
/wcwidth.c
@@ -260,17 +270,9 @@
/xmalloc.c
/xmemdup0.c
/xmemdup0.h
+/xsize.c
/xsize.h
/xstrndup.c
/xstrndup.h
-/binary-io.c
-/xsize.c
-/bitrotate.c
-/math.c
-/sig-handler.c
-/unistd.c
-/wctype-h.c
-/lstat.c
-/unlink.c
-/gettimeofday.c
-/sys_time.in.h
+/stat-time.c
+/stat-time.h
diff --git a/lib/abitset.c b/lib/abitset.c
index bed1d0f5..e4e926bb 100644
--- a/lib/abitset.c
+++ b/lib/abitset.c
@@ -1,7 +1,7 @@
/* Array bitsets.
- Copyright (C) 2002-2003, 2006, 2009-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 2002-2003, 2006, 2009-2015, 2018 Free Software
+ Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/abitset.h b/lib/abitset.h
index 08d617b8..65d48427 100644
--- a/lib/abitset.h
+++ b/lib/abitset.h
@@ -1,6 +1,7 @@
/* Functions to support abitsets.
- Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/bbitset.h b/lib/bbitset.h
index 4cbe7c47..77efd35e 100644
--- a/lib/bbitset.h
+++ b/lib/bbitset.h
@@ -1,7 +1,7 @@
/* Base bitset stuff.
- Copyright (C) 2002-2004, 2006, 2009-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 2002-2004, 2006, 2009-2015, 2018 Free Software
+ Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/bitset.c b/lib/bitset.c
index bb900b0d..9d081ed3 100644
--- a/lib/bitset.c
+++ b/lib/bitset.c
@@ -1,6 +1,7 @@
/* General bitsets.
- Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2006, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/bitset.h b/lib/bitset.h
index 1f578e7d..817ffe98 100644
--- a/lib/bitset.h
+++ b/lib/bitset.h
@@ -1,6 +1,7 @@
/* Generic bitsets.
- Copyright (C) 2002-2004, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/bitset_stats.c b/lib/bitset_stats.c
index 7ddc2b14..6fa2c53f 100644
--- a/lib/bitset_stats.c
+++ b/lib/bitset_stats.c
@@ -1,6 +1,7 @@
/* Bitset statistics.
- Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2006, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/bitset_stats.h b/lib/bitset_stats.h
index 8f314495..f1e213f9 100644
--- a/lib/bitset_stats.h
+++ b/lib/bitset_stats.h
@@ -1,6 +1,7 @@
/* Functions to support bitset statistics.
- Copyright (C) 2002-2004, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/bitsetv-print.c b/lib/bitsetv-print.c
index 7b855c68..6041c302 100644
--- a/lib/bitsetv-print.c
+++ b/lib/bitsetv-print.c
@@ -1,6 +1,6 @@
/* Bitset vectors.
- Copyright (C) 2001-2002, 2004, 2006, 2009-2015 Free Software
+ Copyright (C) 2001-2002, 2004, 2006, 2009-2015, 2018 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/bitsetv-print.h b/lib/bitsetv-print.h
index c13841d7..f1ba1182 100644
--- a/lib/bitsetv-print.h
+++ b/lib/bitsetv-print.h
@@ -1,6 +1,7 @@
/* Bitset vectors.
- Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Akim Demaille (akim@freefriends.org).
diff --git a/lib/bitsetv.c b/lib/bitsetv.c
index f0e228a9..d4728f1a 100644
--- a/lib/bitsetv.c
+++ b/lib/bitsetv.c
@@ -1,6 +1,6 @@
/* Bitset vectors.
- Copyright (C) 2001-2002, 2004-2006, 2009-2015 Free Software
+ Copyright (C) 2001-2002, 2004-2006, 2009-2015, 2018 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/lib/bitsetv.h b/lib/bitsetv.h
index 965fd124..672cbf18 100644
--- a/lib/bitsetv.h
+++ b/lib/bitsetv.h
@@ -1,6 +1,7 @@
/* Bitset vectors.
- Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/ebitset.c b/lib/ebitset.c
index 071b61fe..e4bdf33b 100644
--- a/lib/ebitset.c
+++ b/lib/ebitset.c
@@ -1,6 +1,7 @@
/* Functions to support expandable bitsets.
- Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2006, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/ebitset.h b/lib/ebitset.h
index b26247df..e8036cd4 100644
--- a/lib/ebitset.h
+++ b/lib/ebitset.h
@@ -1,6 +1,7 @@
/* Functions to support ebitsets.
- Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/get-errno.c b/lib/get-errno.c
index ff9fa959..fdce0658 100644
--- a/lib/get-errno.c
+++ b/lib/get-errno.c
@@ -1,6 +1,7 @@
/* get-errno.c - get and set errno.
- Copyright (C) 2002, 2006, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2015, 2018 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/lib/get-errno.h b/lib/get-errno.h
index cb533530..39c9c8a1 100644
--- a/lib/get-errno.h
+++ b/lib/get-errno.h
@@ -1,6 +1,6 @@
/* get-errno.h - get and set errno.
- Copyright (C) 2002, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2015, 2018 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/lib/lbitset.c b/lib/lbitset.c
index cbe08d09..605b767e 100644
--- a/lib/lbitset.c
+++ b/lib/lbitset.c
@@ -1,7 +1,7 @@
/* Functions to support link list bitsets.
- Copyright (C) 2002-2004, 2006, 2009-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 2002-2004, 2006, 2009-2015, 2018 Free Software
+ Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/lbitset.h b/lib/lbitset.h
index 16d82548..4aced06d 100644
--- a/lib/lbitset.h
+++ b/lib/lbitset.h
@@ -1,6 +1,7 @@
/* Functions to support lbitsets.
- Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/libiberty.h b/lib/libiberty.h
index 22fc5506..7628fc12 100644
--- a/lib/libiberty.h
+++ b/lib/libiberty.h
@@ -1,6 +1,7 @@
/* Fake libiberty.h for Bison.
- Copyright (C) 2002-2004, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2009-2015, 2018 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/lib/local.mk b/lib/local.mk
index 73eb6c9c..c2c16238 100644
--- a/lib/local.mk
+++ b/lib/local.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2015, 2018 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/lib/main.c b/lib/main.c
index b905bb11..0e325e64 100644
--- a/lib/main.c
+++ b/lib/main.c
@@ -1,6 +1,6 @@
/* Yacc library main function.
- Copyright (C) 2002, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/lib/timevar.c b/lib/timevar.c
index 100902bb..e5181821 100644
--- a/lib/timevar.c
+++ b/lib/timevar.c
@@ -1,6 +1,6 @@
/* Timing variables for measuring compiler performance.
- Copyright (C) 2000, 2002, 2004, 2006, 2009-2015 Free Software
+ Copyright (C) 2000, 2002, 2004, 2006, 2009-2015, 2018 Free Software
Foundation, Inc.
Contributed by Alex Samuel <samuel@codesourcery.com>
diff --git a/lib/timevar.def b/lib/timevar.def
index 4e135076..01eaba70 100644
--- a/lib/timevar.def
+++ b/lib/timevar.def
@@ -1,7 +1,8 @@
/* This file contains the definitions for timing variables used to -*- C -*-
measure run-time performance of the compiler.
- Copyright (C) 2002, 2007, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2007, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Akim Demaille <akim@freefriends.org>.
diff --git a/lib/timevar.h b/lib/timevar.h
index caeb92ab..14366c96 100644
--- a/lib/timevar.h
+++ b/lib/timevar.h
@@ -1,7 +1,7 @@
/* Timing variables for measuring compiler performance.
- Copyright (C) 2000, 2002, 2004, 2009-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 2000, 2002, 2004, 2009-2015, 2018 Free Software
+ Foundation, Inc.
Contributed by Alex Samuel <samuel@codesourcery.com>
diff --git a/lib/vbitset.c b/lib/vbitset.c
index 602dcdd0..8f2bcec1 100644
--- a/lib/vbitset.c
+++ b/lib/vbitset.c
@@ -1,6 +1,7 @@
/* Variable array bitsets.
- Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2006, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/vbitset.h b/lib/vbitset.h
index 7ae38e55..6f7d7137 100644
--- a/lib/vbitset.h
+++ b/lib/vbitset.h
@@ -1,6 +1,7 @@
/* Functions to support vbitsets.
- Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
+ Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
diff --git a/lib/yyerror.c b/lib/yyerror.c
index af7d2d65..468104d3 100644
--- a/lib/yyerror.c
+++ b/lib/yyerror.c
@@ -1,6 +1,6 @@
/* Yacc library error-printing function.
- Copyright (C) 2002, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/m4/.gitignore b/m4/.gitignore
index 5715c35c..daace580 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -1,10 +1,10 @@
+/*~
/00gnulib.m4
+/absolute-header.m4
/alloca.m4
-/argmatch.m4
/asm-underscore.m4
/assert.m4
/calloc.m4
-/cloexec.m4
/close-stream.m4
/close.m4
/closeout.m4
@@ -12,9 +12,9 @@
/config-h.m4
/configmake.m4
/dirname.m4
-/dos.m4
/double-slash-root.m4
/dup2.m4
+/eealloc.m4
/environ.m4
/errno_h.m4
/error.m4
@@ -22,8 +22,8 @@
/exponentf.m4
/exponentl.m4
/extensions.m4
+/extern-inline.m4
/fatal-signal.m4
-/fclose.m4
/fcntl-o.m4
/fcntl.m4
/fcntl_h.m4
@@ -38,6 +38,7 @@
/fstat.m4
/getdtablesize.m4
/getopt.m4
+/getprogname.m4
/gettext.m4
/glibc2.m4
/glibc21.m4
@@ -45,12 +46,11 @@
/gnulib-common.m4
/gnulib-comp.m4
/gnulib-tool.m4
-/hash.m4
+/hard-locale.m4
/iconv.m4
/include_next.m4
/intdiv0.m4
/intl.m4
-/intl.m4~
/intldir.m4
/intlmacosx.m4
/intmax.m4
@@ -58,7 +58,6 @@
/inttypes-pri.m4
/inttypes.m4
/inttypes_h.m4
-/ioctl.m4
/isnan.m4
/isnand.m4
/isnanf.m4
@@ -73,19 +72,23 @@
/lib-link.m4
/lib-prefix.m4
/libunistring-base.m4
+/limits-h.m4
/localcharset.m4
/locale-fr.m4
/locale-ja.m4
/locale-zh.m4
/lock.m4
/longlong.m4
+/lstat.m4
/malloc.m4
+/malloca.m4
/math_h.m4
/mbrtowc.m4
/mbsinit.m4
/mbstate_t.m4
/mbswidth.m4
/memchr.m4
+/minmax.m4
/mmap-anon.m4
/mode_t.m4
/msvc-inval.m4
@@ -93,13 +96,16 @@
/multiarch.m4
/nls.m4
/nocrash.m4
+/non-recursive-gnulib-prefix-hack.m4
+/obstack-printf.m4
+/obstack.m4
/off_t.m4
+/open-cloexec.m4
/open.m4
/pathmax.m4
/perror.m4
/pipe2.m4
/po.m4
-/po.m4~
/posix_spawn.m4
/printf-frexp.m4
/printf-frexpl.m4
@@ -107,6 +113,7 @@
/printf-posix.m4
/printf.m4
/progtest.m4
+/pthread_rwlock_rdlock.m4
/quote.m4
/quotearg.m4
/raise.m4
@@ -122,8 +129,6 @@
/size_max.m4
/snprintf-posix.m4
/snprintf.m4
-/socklen.m4
-/sockpfaf.m4
/spawn-pipe.m4
/spawn_h.m4
/sprintf-posix.m4
@@ -133,7 +138,6 @@
/stddef_h.m4
/stdint.m4
/stdint_h.m4
-/stdio-safer.m4
/stdio_h.m4
/stdlib_h.m4
/stpcpy.m4
@@ -145,17 +149,16 @@
/strndup.m4
/strnlen.m4
/strverscmp.m4
-/sys_ioctl_h.m4
/sys_socket_h.m4
/sys_stat_h.m4
/sys_types_h.m4
/sys_wait_h.m4
-/sysexits.m4
/threadlib.m4
/time_h.m4
/uintmax_t.m4
/unistd-safer.m4
/unistd_h.m4
+/unlink.m4
/unlocked-io.m4
/vasnprintf.m4
/vfprintf-posix.m4
@@ -175,12 +178,5 @@
/xalloc.m4
/xsize.m4
/xstrndup.m4
-/obstack-printf.m4
-/extern-inline.m4
-/non-recursive-gnulib-prefix-hack.m4
-/absolute-header.m4
-/lstat.m4
-/unlink.m4
-/gettimeofday.m4
-/obstack.m4
-/sys_time_h.m4
+/host-cpu-c-abi.m4
+/stat-time.m4
diff --git a/m4/bison-i18n.m4 b/m4/bison-i18n.m4
index 8e57cafd..b548bcd0 100644
--- a/m4/bison-i18n.m4
+++ b/m4/bison-i18n.m4
@@ -1,6 +1,7 @@
# bison-i18n.m4 serial 2
-dnl Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2009-2015, 2018 Free Software Foundation,
+dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/m4/c-working.m4 b/m4/c-working.m4
index c801584c..67c2cef2 100644
--- a/m4/c-working.m4
+++ b/m4/c-working.m4
@@ -1,6 +1,6 @@
# Sanity test a C compiler.
-# Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2015, 2018 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/m4/cxx.m4 b/m4/cxx.m4
index 7b0d9c1a..5e8ee2ab 100644
--- a/m4/cxx.m4
+++ b/m4/cxx.m4
@@ -1,7 +1,8 @@
# -*- Autoconf -*-
# Sanity-test a C++ compiler.
#
-# Copyright (C) 2004, 2006, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2009-2015, 2018 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/m4/flex.m4 b/m4/flex.m4
index 11dc433d..2c4e22aa 100644
--- a/m4/flex.m4
+++ b/m4/flex.m4
@@ -1,5 +1,5 @@
# flex.m4 serial 2
-# Copyright (C) 2012-2015 Free Software Foundation, Inc.
+# Copyright (C) 2012-2015, 2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/m4/timevar.m4 b/m4/timevar.m4
index d3a9785f..ad061413 100644
--- a/m4/timevar.m4
+++ b/m4/timevar.m4
@@ -1,7 +1,8 @@
# -*- Autoconf -*-
# Checks required to run `timevar', a time tracker.
#
-# Copyright (C) 2002-2003, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2003, 2009-2015, 2018 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/po/.gitignore b/po/.gitignore
index 940ce9ef..e2218710 100644
--- a/po/.gitignore
+++ b/po/.gitignore
@@ -1,12 +1,11 @@
+/*~
/*.gmo
/*.po
-/*.po~
/.reference
/LINGUAS
/Makefile
/Makefile.in
/Makefile.in.in
-/Makefile.in.in~
/Makevars
/Makevars.template
/POTFILES
@@ -15,7 +14,6 @@
/boldquot.sed
/en@boldquot.header
/en@quot.header
-/insert-header.sed
/insert-header.sin
/quot.sed
/remove-potcdate.sed
diff --git a/runtime-po/.gitignore b/runtime-po/.gitignore
index 8675428f..3aea337f 100644
--- a/runtime-po/.gitignore
+++ b/runtime-po/.gitignore
@@ -1,12 +1,11 @@
+/*~
/*.gmo
/*.po
-/*.po~
/.reference
/LINGUAS
/Makefile
/Makefile.in
/Makefile.in.in
-/Makefile.in.in~
/Makevars
/Makevars.template
/POTFILES
@@ -15,7 +14,6 @@
/boldquot.sed
/en@boldquot.header
/en@quot.header
-/insert-header.sed
/insert-header.sin
/quot.sed
/remove-potcdate.sed
diff --git a/src/AnnotationList.c b/src/AnnotationList.c
index cf0b49cf..a5d015e4 100644
--- a/src/AnnotationList.c
+++ b/src/AnnotationList.c
@@ -1,6 +1,6 @@
/* IELR's inadequacy annotation list.
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/AnnotationList.h b/src/AnnotationList.h
index 59e41d09..739f377f 100644
--- a/src/AnnotationList.h
+++ b/src/AnnotationList.h
@@ -1,6 +1,6 @@
/* IELR's inadequacy annotation list.
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/InadequacyList.c b/src/InadequacyList.c
index f2e45f49..4d36533f 100644
--- a/src/InadequacyList.c
+++ b/src/InadequacyList.c
@@ -1,6 +1,6 @@
/* IELR's inadequacy list.
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/InadequacyList.h b/src/InadequacyList.h
index d5da96b6..42f11fc4 100644
--- a/src/InadequacyList.h
+++ b/src/InadequacyList.h
@@ -1,6 +1,6 @@
/* IELR's inadequacy list.
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/LR0.c b/src/LR0.c
index c8f0166b..35eaf563 100644
--- a/src/LR0.c
+++ b/src/LR0.c
@@ -1,7 +1,7 @@
/* Generate the LR(0) parser states for Bison.
- Copyright (C) 1984, 1986, 1989, 2000-2002, 2004-2015 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1986, 1989, 2000-2002, 2004-2015, 2018 Free
+ Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/LR0.h b/src/LR0.h
index b415b8f0..f7f6b63a 100644
--- a/src/LR0.h
+++ b/src/LR0.h
@@ -1,7 +1,7 @@
/* Generate the LR(0) parser states for Bison.
- Copyright (C) 1984, 1986, 1989, 2000-2002, 2009-2015 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1986, 1989, 2000-2002, 2009-2015, 2018 Free
+ Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/Sbitset.c b/src/Sbitset.c
index 376cf2e2..b6ba379d 100644
--- a/src/Sbitset.c
+++ b/src/Sbitset.c
@@ -1,6 +1,6 @@
/* A simple, memory-efficient bitset implementation.
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/Sbitset.h b/src/Sbitset.h
index 3589cddb..82acdc52 100644
--- a/src/Sbitset.h
+++ b/src/Sbitset.h
@@ -1,6 +1,6 @@
/* A simple, memory-efficient bitset implementation.
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/assoc.c b/src/assoc.c
index c24c7036..38d24e34 100644
--- a/src/assoc.c
+++ b/src/assoc.c
@@ -1,7 +1,7 @@
/* Associativity information.
- Copyright (C) 2002, 2005-2006, 2008-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 2002, 2005-2006, 2008-2015, 2018 Free Software
+ Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/assoc.h b/src/assoc.h
index bae019e5..661e1e54 100644
--- a/src/assoc.h
+++ b/src/assoc.h
@@ -1,6 +1,7 @@
/* Associativity information.
- Copyright (C) 2002, 2006, 2008-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2008-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/closure.c b/src/closure.c
index 253b7cd8..db17e15f 100644
--- a/src/closure.c
+++ b/src/closure.c
@@ -1,7 +1,7 @@
/* Closures for Bison
- Copyright (C) 1984, 1989, 2000-2002, 2004-2005, 2007, 2009-2015 Free
- Software Foundation, Inc.
+ Copyright (C) 1984, 1989, 2000-2002, 2004-2005, 2007, 2009-2015, 2018
+ Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/closure.h b/src/closure.h
index 528d3b2a..d80eae5e 100644
--- a/src/closure.h
+++ b/src/closure.h
@@ -1,7 +1,7 @@
/* Subroutines for bison
- Copyright (C) 1984, 1989, 2000-2002, 2007, 2009-2015 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1989, 2000-2002, 2007, 2009-2015, 2018 Free
+ Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/complain.c b/src/complain.c
index 22e18cb3..e39626a3 100644
--- a/src/complain.c
+++ b/src/complain.c
@@ -1,6 +1,6 @@
/* Declaration for error-reporting function for Bison.
- Copyright (C) 2000-2002, 2004-2006, 2009-2015 Free Software
+ Copyright (C) 2000-2002, 2004-2006, 2009-2015, 2018 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/src/complain.h b/src/complain.h
index 63347785..599afb97 100644
--- a/src/complain.h
+++ b/src/complain.h
@@ -1,7 +1,7 @@
/* Declaration for error-reporting function for Bison.
- Copyright (C) 2000-2002, 2006, 2009-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 2000-2002, 2006, 2009-2015, 2018 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/src/conflicts.c b/src/conflicts.c
index 16cb44b7..2138e3bb 100644
--- a/src/conflicts.c
+++ b/src/conflicts.c
@@ -1,7 +1,7 @@
/* Find and resolve or report lookahead conflicts for bison,
- Copyright (C) 1984, 1989, 1992, 2000-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 1984, 1989, 1992, 2000-2015, 2018 Free Software
+ Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/conflicts.h b/src/conflicts.h
index 0a705513..22a177cb 100644
--- a/src/conflicts.h
+++ b/src/conflicts.h
@@ -1,6 +1,6 @@
/* Find and resolve or report lookahead conflicts for bison,
- Copyright (C) 2000-2002, 2004, 2007, 2009-2015 Free Software
+ Copyright (C) 2000-2002, 2004, 2007, 2009-2015, 2018 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/derives.c b/src/derives.c
index 75266491..7564b411 100644
--- a/src/derives.c
+++ b/src/derives.c
@@ -1,7 +1,7 @@
/* Match rules with nonterminals for bison,
- Copyright (C) 1984, 1989, 2000-2003, 2005, 2009-2015 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1989, 2000-2003, 2005, 2009-2015, 2018 Free
+ Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/derives.h b/src/derives.h
index 4cccb434..c4a701c0 100644
--- a/src/derives.h
+++ b/src/derives.h
@@ -1,6 +1,6 @@
/* Match rules with nonterminals for bison,
- Copyright (C) 1984, 1989, 2000-2002, 2009-2015 Free Software
+ Copyright (C) 1984, 1989, 2000-2002, 2009-2015, 2018 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/files.c b/src/files.c
index 3c913b6b..06e8ea3b 100644
--- a/src/files.c
+++ b/src/files.c
@@ -1,6 +1,6 @@
/* Open and close files for Bison.
- Copyright (C) 1984, 1986, 1989, 1992, 2000-2015 Free Software
+ Copyright (C) 1984, 1986, 1989, 1992, 2000-2015, 2018 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/files.h b/src/files.h
index 52250aff..9970e88b 100644
--- a/src/files.h
+++ b/src/files.h
@@ -1,6 +1,6 @@
/* File names and variables for bison,
- Copyright (C) 1984, 1989, 2000-2002, 2006-2007, 2009-2015 Free
+ Copyright (C) 1984, 1989, 2000-2002, 2006-2007, 2009-2015, 2018 Free
Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/flex-scanner.h b/src/flex-scanner.h
index 6c61418d..4dec7e1f 100644
--- a/src/flex-scanner.h
+++ b/src/flex-scanner.h
@@ -1,6 +1,6 @@
/* Common parts between scan-code.l, scan-gram.l, and scan-skel.l.
- Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/getargs.c b/src/getargs.c
index fa9e3c1c..5696c35f 100644
--- a/src/getargs.c
+++ b/src/getargs.c
@@ -1,6 +1,6 @@
/* Parse command line arguments for Bison.
- Copyright (C) 1984, 1986, 1989, 1992, 2000-2015 Free Software
+ Copyright (C) 1984, 1986, 1989, 1992, 2000-2015, 2018 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -64,7 +64,7 @@ struct bison_language const *language = &valid_languages[0];
/** Decode an option's key.
*
- * \param option option being decoded.
+ * \param opt option being decoded.
* \param keys array of valid subarguments.
* \param values array of corresponding (int) values.
* \param all the all value.
@@ -79,11 +79,11 @@ struct bison_language const *language = &valid_languages[0];
* flags from \c all. Thus no-none = all and no-all = none.
*/
static void
-flag_argmatch (const char *option,
- const char * const keys[], const int values[],
+flag_argmatch (const char *opt,
+ const char *const keys[], const int values[],
int all, int *flags, char *arg, size_t no)
{
- int value = XARGMATCH (option, arg + no, keys, values);
+ int value = XARGMATCH (opt, arg + no, keys, values);
/* -rnone == -rno-all, and -rno-none == -rall. */
if (!value)
@@ -100,7 +100,7 @@ flag_argmatch (const char *option,
/** Decode an option's set of keys.
*
- * \param option option being decoded.
+ * \param opt option being decoded (e.g., --report).
* \param keys array of valid subarguments.
* \param values array of corresponding (int) values.
* \param all the all value.
@@ -109,7 +109,7 @@ flag_argmatch (const char *option,
* If 0, then activate all the flags.
*/
static void
-flags_argmatch (const char *option,
+flags_argmatch (const char *opt,
const char * const keys[], const int values[],
int all, int *flags, char *args)
{
@@ -117,7 +117,7 @@ flags_argmatch (const char *option,
for (args = strtok (args, ","); args; args = strtok (NULL, ","))
{
size_t no = STRPREFIX_LIT ("no-", args) ? 3 : 0;
- flag_argmatch (option, keys,
+ flag_argmatch (opt, keys,
values, all, flags, args, no);
}
else
diff --git a/src/getargs.h b/src/getargs.h
index d7c6d16b..5639f0f7 100644
--- a/src/getargs.h
+++ b/src/getargs.h
@@ -1,6 +1,6 @@
/* Parse command line arguments for bison.
- Copyright (C) 1984, 1986, 1989, 1992, 2000-2015 Free Software
+ Copyright (C) 1984, 1986, 1989, 1992, 2000-2015, 2018 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/gram.c b/src/gram.c
index 594d835f..fb2593e2 100644
--- a/src/gram.c
+++ b/src/gram.c
@@ -1,7 +1,7 @@
/* Allocate input grammar variables for Bison.
- Copyright (C) 1984, 1986, 1989, 2001-2003, 2005-2015 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1986, 1989, 2001-2003, 2005-2015, 2018 Free
+ Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/gram.h b/src/gram.h
index b4d5845f..a2b55ead 100644
--- a/src/gram.h
+++ b/src/gram.h
@@ -1,6 +1,6 @@
/* Data definitions for internal representation of Bison's input.
- Copyright (C) 1984, 1986, 1989, 1992, 2001-2007, 2009-2015 Free
+ Copyright (C) 1984, 1986, 1989, 1992, 2001-2007, 2009-2015, 2018 Free
Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/graphviz.c b/src/graphviz.c
index ac8070c4..d85b23de 100644
--- a/src/graphviz.c
+++ b/src/graphviz.c
@@ -1,6 +1,7 @@
/* Output Graphviz specification of a state machine generated by Bison.
- Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/graphviz.h b/src/graphviz.h
index 40df1e9d..f2aaa91f 100644
--- a/src/graphviz.h
+++ b/src/graphviz.h
@@ -1,6 +1,6 @@
/* Output Graphviz specification of a state machine generated by Bison.
- Copyright (C) 2006, 2010-2015 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2010-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/ielr.c b/src/ielr.c
index 99228377..81a28de8 100644
--- a/src/ielr.c
+++ b/src/ielr.c
@@ -1,6 +1,6 @@
/* IELR main implementation.
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/ielr.h b/src/ielr.h
index bd31d601..c080fdf0 100644
--- a/src/ielr.h
+++ b/src/ielr.h
@@ -1,6 +1,6 @@
/* IELR main implementation.
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/lalr.c b/src/lalr.c
index d971cc0a..109aa0f4 100644
--- a/src/lalr.c
+++ b/src/lalr.c
@@ -1,7 +1,7 @@
/* Compute lookahead criteria for Bison.
- Copyright (C) 1984, 1986, 1989, 2000-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 1984, 1986, 1989, 2000-2015, 2018 Free Software
+ Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/lalr.h b/src/lalr.h
index d8ba880a..898053f5 100644
--- a/src/lalr.h
+++ b/src/lalr.h
@@ -1,7 +1,7 @@
/* Compute lookahead criteria for bison,
Copyright (C) 1984, 1986, 1989, 2000, 2002, 2004, 2006-2007,
- 2009-2015 Free Software Foundation, Inc.
+ 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/local.mk b/src/local.mk
index 573ad008..88d9e9d0 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2015, 2018 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/src/location.c b/src/location.c
index 4fb55934..faceb5c9 100644
--- a/src/location.c
+++ b/src/location.c
@@ -1,6 +1,6 @@
/* Locations for Bison
- Copyright (C) 2002, 2005-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/location.h b/src/location.h
index 0477a936..25a9aa49 100644
--- a/src/location.h
+++ b/src/location.h
@@ -1,6 +1,6 @@
/* Locations for Bison
- Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/main.c b/src/main.c
index 311ab8c9..29324600 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,7 +1,7 @@
/* Top level entry point of Bison.
- Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000-2002, 2004-2015 Free
- Software Foundation, Inc.
+ Copyright (C) 1984, 1986, 1989, 1992, 1995, 2000-2002, 2004-2015,
+ 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/muscle-tab.c b/src/muscle-tab.c
index b38598b0..c14273f6 100644
--- a/src/muscle-tab.c
+++ b/src/muscle-tab.c
@@ -1,6 +1,6 @@
/* Muscle table manager for Bison.
- Copyright (C) 2001-2015 Free Software Foundation, Inc.
+ Copyright (C) 2001-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/muscle-tab.h b/src/muscle-tab.h
index 0267bc99..4ec1ae1b 100644
--- a/src/muscle-tab.h
+++ b/src/muscle-tab.h
@@ -1,6 +1,7 @@
/* Muscle table manager for Bison,
- Copyright (C) 2001-2003, 2006-2015 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/named-ref.c b/src/named-ref.c
index 26f7ba82..ac5af1c8 100644
--- a/src/named-ref.c
+++ b/src/named-ref.c
@@ -1,6 +1,6 @@
/* Named symbol references for Bison
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/named-ref.h b/src/named-ref.h
index 19ad65c9..f42036fa 100644
--- a/src/named-ref.h
+++ b/src/named-ref.h
@@ -1,6 +1,6 @@
/* Named symbol references for Bison
- Copyright (C) 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/nullable.c b/src/nullable.c
index 118c0aa4..0dffd575 100644
--- a/src/nullable.c
+++ b/src/nullable.c
@@ -1,6 +1,6 @@
/* Calculate which nonterminals can expand into the null string for Bison.
- Copyright (C) 1984, 1989, 2000-2006, 2009-2015 Free Software
+ Copyright (C) 1984, 1989, 2000-2006, 2009-2015, 2018 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/nullable.h b/src/nullable.h
index 00cae665..8b6cfddd 100644
--- a/src/nullable.h
+++ b/src/nullable.h
@@ -1,6 +1,7 @@
/* Part of the bison parser generator,
- Copyright (C) 2000, 2002, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2009-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/output.c b/src/output.c
index 007f24c3..b07d0f1e 100644
--- a/src/output.c
+++ b/src/output.c
@@ -1,6 +1,6 @@
/* Output the generated parsing program for Bison.
- Copyright (C) 1984, 1986, 1989, 1992, 2000-2015 Free Software
+ Copyright (C) 1984, 1986, 1989, 1992, 2000-2015, 2018 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -358,8 +358,8 @@ user_actions_output (FILE *out)
for (r = 0; r < nrules; ++r)
if (rules[r].action)
{
- fprintf (out, "b4_%scase(%d, [b4_syncline(%d, ",
- rules[r].is_predicate ? "predicate_" : "",
+ fprintf (out, "%s(%d, [b4_syncline(%d, ",
+ rules[r].is_predicate ? "b4_predicate_case" : "b4_case",
r + 1, rules[r].action_location.start.line);
string_output (out, rules[r].action_location.start.file);
fprintf (out, ")\n[ %s]])\n\n", rules[r].action);
diff --git a/src/output.h b/src/output.h
index 2c6f1d02..ba47a89c 100644
--- a/src/output.h
+++ b/src/output.h
@@ -1,6 +1,6 @@
/* Output the generated parsing program for bison,
- Copyright (C) 2000-2003, 2006-2007, 2009-2015 Free Software
+ Copyright (C) 2000-2003, 2006-2007, 2009-2015, 2018 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/parse-gram.c b/src/parse-gram.c
index 43eeaeb5..4faf9772 100644
--- a/src/parse-gram.c
+++ b/src/parse-gram.c
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.0.2.29-9a91e. */
+/* A Bison parser, made by GNU Bison 3.0.4.38-1047-dirty. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 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
@@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "3.0.2.29-9a91e"
+#define YYBISON_VERSION "3.0.4.38-1047-dirty"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -1669,6 +1669,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
case N: \
yyformat = S; \
break
+ default: /* Avoid compiler warnings. */
YYCASE_(0, YY_("syntax error"));
YYCASE_(1, YY_("syntax error, unexpected %s"));
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
@@ -1842,7 +1843,7 @@ YYLTYPE yylloc = yyloc_default;
yychar = YYEMPTY; /* Cause a token to be read. */
/* User initialization code. */
-#line 108 "src/parse-gram.y" /* yacc.c:1429 */
+#line 108 "src/parse-gram.y" /* yacc.c:1430 */
{
/* Bison's grammar can initial empty locations, hence a default
location is needed. */
@@ -1850,7 +1851,7 @@ YYLTYPE yylloc = yyloc_default;
boundary_set (&yylloc.end, current_file, 1, 1);
}
-#line 1854 "src/parse-gram.c" /* yacc.c:1429 */
+#line 1855 "src/parse-gram.c" /* yacc.c:1430 */
yylsp[0] = yylloc;
goto yysetstate;
@@ -2036,151 +2037,152 @@ yyreduce:
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
- /* Default location. */
+ /* Default location. */
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
+ yyerror_range[1] = yyloc;
YY_REDUCE_PRINT (yyn);
{
int yychar_backup = yychar;
switch (yyn)
{
case 6:
-#line 280 "src/parse-gram.y" /* yacc.c:1646 */
+#line 280 "src/parse-gram.y" /* yacc.c:1648 */
{
muscle_code_grow (union_seen ? "post_prologue" : "pre_prologue",
translate_code ((yyvsp[0].code), (yylsp[0]), true), (yylsp[0]));
code_scanner_last_string_free ();
}
-#line 2054 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2056 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 7:
-#line 286 "src/parse-gram.y" /* yacc.c:1646 */
+#line 286 "src/parse-gram.y" /* yacc.c:1648 */
{
muscle_percent_define_ensure ((yyvsp[0].uniqstr), (yylsp[0]), true);
}
-#line 2062 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2064 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 8:
-#line 290 "src/parse-gram.y" /* yacc.c:1646 */
+#line 290 "src/parse-gram.y" /* yacc.c:1648 */
{
muscle_percent_define_insert ((yyvsp[-1].uniqstr), (yylsp[-1]), (yyvsp[0].value).kind, (yyvsp[0].value).chars,
MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE);
}
-#line 2071 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2073 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 9:
-#line 294 "src/parse-gram.y" /* yacc.c:1646 */
+#line 294 "src/parse-gram.y" /* yacc.c:1648 */
{ defines_flag = true; }
-#line 2077 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2079 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 10:
-#line 296 "src/parse-gram.y" /* yacc.c:1646 */
+#line 296 "src/parse-gram.y" /* yacc.c:1648 */
{
defines_flag = true;
spec_defines_file = xstrdup ((yyvsp[0].code));
}
-#line 2086 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2088 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 11:
-#line 301 "src/parse-gram.y" /* yacc.c:1646 */
+#line 301 "src/parse-gram.y" /* yacc.c:1648 */
{
muscle_percent_define_insert ("parse.error", (yylsp[0]), muscle_keyword,
"verbose",
MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE);
}
-#line 2096 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2098 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 12:
-#line 306 "src/parse-gram.y" /* yacc.c:1646 */
+#line 306 "src/parse-gram.y" /* yacc.c:1648 */
{ expected_sr_conflicts = (yyvsp[0].integer); }
-#line 2102 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2104 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 13:
-#line 307 "src/parse-gram.y" /* yacc.c:1646 */
+#line 307 "src/parse-gram.y" /* yacc.c:1648 */
{ expected_rr_conflicts = (yyvsp[0].integer); }
-#line 2108 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2110 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 14:
-#line 308 "src/parse-gram.y" /* yacc.c:1646 */
+#line 308 "src/parse-gram.y" /* yacc.c:1648 */
{ spec_file_prefix = (yyvsp[0].code); }
-#line 2114 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2116 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 15:
-#line 310 "src/parse-gram.y" /* yacc.c:1646 */
+#line 310 "src/parse-gram.y" /* yacc.c:1648 */
{
nondeterministic_parser = true;
glr_parser = true;
}
-#line 2123 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2125 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 16:
-#line 315 "src/parse-gram.y" /* yacc.c:1646 */
+#line 315 "src/parse-gram.y" /* yacc.c:1648 */
{
muscle_code_grow ("initial_action", translate_code ((yyvsp[0].code), (yylsp[0]), false), (yylsp[0]));
code_scanner_last_string_free ();
}
-#line 2132 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2134 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 17:
-#line 319 "src/parse-gram.y" /* yacc.c:1646 */
+#line 319 "src/parse-gram.y" /* yacc.c:1648 */
{ language_argmatch ((yyvsp[0].code), grammar_prio, (yylsp[-1])); }
-#line 2138 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2140 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 18:
-#line 320 "src/parse-gram.y" /* yacc.c:1646 */
+#line 320 "src/parse-gram.y" /* yacc.c:1648 */
{ spec_name_prefix = (yyvsp[0].code); }
-#line 2144 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2146 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 19:
-#line 321 "src/parse-gram.y" /* yacc.c:1646 */
+#line 321 "src/parse-gram.y" /* yacc.c:1648 */
{ no_lines_flag = true; }
-#line 2150 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2152 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 20:
-#line 322 "src/parse-gram.y" /* yacc.c:1646 */
+#line 322 "src/parse-gram.y" /* yacc.c:1648 */
{ nondeterministic_parser = true; }
-#line 2156 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2158 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 21:
-#line 323 "src/parse-gram.y" /* yacc.c:1646 */
+#line 323 "src/parse-gram.y" /* yacc.c:1648 */
{ spec_outfile = (yyvsp[0].code); }
-#line 2162 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2164 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 22:
-#line 324 "src/parse-gram.y" /* yacc.c:1646 */
+#line 324 "src/parse-gram.y" /* yacc.c:1648 */
{ current_param = (yyvsp[0].param); }
-#line 2168 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2170 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 23:
-#line 324 "src/parse-gram.y" /* yacc.c:1646 */
+#line 324 "src/parse-gram.y" /* yacc.c:1648 */
{ current_param = param_none; }
-#line 2174 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2176 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 24:
-#line 325 "src/parse-gram.y" /* yacc.c:1646 */
+#line 325 "src/parse-gram.y" /* yacc.c:1648 */
{ version_check (&(yylsp[0]), (yyvsp[0].code)); }
-#line 2180 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2182 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 25:
-#line 327 "src/parse-gram.y" /* yacc.c:1646 */
+#line 327 "src/parse-gram.y" /* yacc.c:1648 */
{
char const *skeleton_user = (yyvsp[0].code);
if (strchr (skeleton_user, '/'))
@@ -2204,49 +2206,49 @@ yyreduce:
}
skeleton_arg (skeleton_user, grammar_prio, (yylsp[-1]));
}
-#line 2208 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2210 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 26:
-#line 350 "src/parse-gram.y" /* yacc.c:1646 */
+#line 350 "src/parse-gram.y" /* yacc.c:1648 */
{ token_table_flag = true; }
-#line 2214 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2216 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 27:
-#line 351 "src/parse-gram.y" /* yacc.c:1646 */
+#line 351 "src/parse-gram.y" /* yacc.c:1648 */
{ report_flag |= report_states; }
-#line 2220 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2222 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 28:
-#line 352 "src/parse-gram.y" /* yacc.c:1646 */
+#line 352 "src/parse-gram.y" /* yacc.c:1648 */
{ yacc_flag = true; }
-#line 2226 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2228 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 30:
-#line 357 "src/parse-gram.y" /* yacc.c:1646 */
+#line 357 "src/parse-gram.y" /* yacc.c:1648 */
{ add_param (current_param, (yyvsp[0].code), (yylsp[0])); }
-#line 2232 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2234 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 31:
-#line 358 "src/parse-gram.y" /* yacc.c:1646 */
+#line 358 "src/parse-gram.y" /* yacc.c:1648 */
{ add_param (current_param, (yyvsp[0].code), (yylsp[0])); }
-#line 2238 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2240 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 34:
-#line 370 "src/parse-gram.y" /* yacc.c:1646 */
+#line 370 "src/parse-gram.y" /* yacc.c:1648 */
{
grammar_start_symbol_set ((yyvsp[0].symbol), (yylsp[0]));
}
-#line 2246 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2248 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 35:
-#line 374 "src/parse-gram.y" /* yacc.c:1646 */
+#line 374 "src/parse-gram.y" /* yacc.c:1648 */
{
code_props code;
code_props_symbol_action_init (&code, (yyvsp[-1].code), (yylsp[-1]));
@@ -2258,27 +2260,27 @@ yyreduce:
symbol_list_free ((yyvsp[0].list));
}
}
-#line 2262 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2264 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 36:
-#line 386 "src/parse-gram.y" /* yacc.c:1646 */
+#line 386 "src/parse-gram.y" /* yacc.c:1648 */
{
default_prec = true;
}
-#line 2270 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2272 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 37:
-#line 390 "src/parse-gram.y" /* yacc.c:1646 */
+#line 390 "src/parse-gram.y" /* yacc.c:1648 */
{
default_prec = false;
}
-#line 2278 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2280 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 38:
-#line 394 "src/parse-gram.y" /* yacc.c:1646 */
+#line 394 "src/parse-gram.y" /* yacc.c:1648 */
{
/* Do not invoke muscle_percent_code_grow here since it invokes
muscle_user_name_list_grow. */
@@ -2286,86 +2288,86 @@ yyreduce:
translate_code_braceless ((yyvsp[0].code), (yylsp[0])), (yylsp[0]));
code_scanner_last_string_free ();
}
-#line 2290 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2292 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 39:
-#line 402 "src/parse-gram.y" /* yacc.c:1646 */
+#line 402 "src/parse-gram.y" /* yacc.c:1648 */
{
muscle_percent_code_grow ((yyvsp[-1].uniqstr), (yylsp[-1]), translate_code_braceless ((yyvsp[0].code), (yylsp[0])), (yylsp[0]));
code_scanner_last_string_free ();
}
-#line 2299 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2301 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 40:
-#line 412 "src/parse-gram.y" /* yacc.c:1646 */
+#line 412 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.code_type) = destructor; }
-#line 2305 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2307 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 41:
-#line 413 "src/parse-gram.y" /* yacc.c:1646 */
+#line 413 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.code_type) = printer; }
-#line 2311 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2313 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 42:
-#line 423 "src/parse-gram.y" /* yacc.c:1646 */
+#line 423 "src/parse-gram.y" /* yacc.c:1648 */
{}
-#line 2317 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2319 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 43:
-#line 424 "src/parse-gram.y" /* yacc.c:1646 */
+#line 424 "src/parse-gram.y" /* yacc.c:1648 */
{ muscle_percent_define_insert ("api.value.union.name",
(yylsp[0]), muscle_keyword, (yyvsp[0].uniqstr),
MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE); }
-#line 2325 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2327 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 44:
-#line 431 "src/parse-gram.y" /* yacc.c:1646 */
+#line 431 "src/parse-gram.y" /* yacc.c:1648 */
{
union_seen = true;
muscle_code_grow ("union_members", translate_code_braceless ((yyvsp[0].code), (yylsp[0])), (yylsp[0]));
code_scanner_last_string_free ();
}
-#line 2335 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2337 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 45:
-#line 442 "src/parse-gram.y" /* yacc.c:1646 */
+#line 442 "src/parse-gram.y" /* yacc.c:1648 */
{ current_class = nterm_sym; }
-#line 2341 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2343 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 46:
-#line 443 "src/parse-gram.y" /* yacc.c:1646 */
+#line 443 "src/parse-gram.y" /* yacc.c:1648 */
{
current_class = unknown_sym;
current_type = NULL;
}
-#line 2350 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2352 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 47:
-#line 447 "src/parse-gram.y" /* yacc.c:1646 */
+#line 447 "src/parse-gram.y" /* yacc.c:1648 */
{ current_class = token_sym; }
-#line 2356 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2358 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 48:
-#line 448 "src/parse-gram.y" /* yacc.c:1646 */
+#line 448 "src/parse-gram.y" /* yacc.c:1648 */
{
current_class = unknown_sym;
current_type = NULL;
}
-#line 2365 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2367 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 49:
-#line 453 "src/parse-gram.y" /* yacc.c:1646 */
+#line 453 "src/parse-gram.y" /* yacc.c:1648 */
{
symbol_list *list;
tag_seen = true;
@@ -2373,11 +2375,11 @@ yyreduce:
symbol_type_set (list->content.sym, (yyvsp[-1].uniqstr), (yylsp[-1]));
symbol_list_free ((yyvsp[0].list));
}
-#line 2377 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2379 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 50:
-#line 464 "src/parse-gram.y" /* yacc.c:1646 */
+#line 464 "src/parse-gram.y" /* yacc.c:1648 */
{
symbol_list *list;
++current_prec;
@@ -2389,341 +2391,341 @@ yyreduce:
symbol_list_free ((yyvsp[0].list));
current_type = NULL;
}
-#line 2393 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2395 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 51:
-#line 478 "src/parse-gram.y" /* yacc.c:1646 */
+#line 478 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.assoc) = left_assoc; }
-#line 2399 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2401 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 52:
-#line 479 "src/parse-gram.y" /* yacc.c:1646 */
+#line 479 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.assoc) = right_assoc; }
-#line 2405 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2407 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 53:
-#line 480 "src/parse-gram.y" /* yacc.c:1646 */
+#line 480 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.assoc) = non_assoc; }
-#line 2411 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2413 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 54:
-#line 481 "src/parse-gram.y" /* yacc.c:1646 */
+#line 481 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.assoc) = precedence_assoc; }
-#line 2417 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2419 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 55:
-#line 485 "src/parse-gram.y" /* yacc.c:1646 */
+#line 485 "src/parse-gram.y" /* yacc.c:1648 */
{ current_type = NULL; }
-#line 2423 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2425 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 56:
-#line 486 "src/parse-gram.y" /* yacc.c:1646 */
+#line 486 "src/parse-gram.y" /* yacc.c:1648 */
{ current_type = (yyvsp[0].uniqstr); tag_seen = true; }
-#line 2429 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2431 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 57:
-#line 492 "src/parse-gram.y" /* yacc.c:1646 */
+#line 492 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.list) = symbol_list_sym_new ((yyvsp[0].symbol), (yylsp[0])); }
-#line 2435 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2437 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 58:
-#line 494 "src/parse-gram.y" /* yacc.c:1646 */
+#line 494 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.list) = symbol_list_append ((yyvsp[-1].list), symbol_list_sym_new ((yyvsp[0].symbol), (yylsp[0]))); }
-#line 2441 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2443 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 59:
-#line 499 "src/parse-gram.y" /* yacc.c:1646 */
+#line 499 "src/parse-gram.y" /* yacc.c:1648 */
{
(yyval.symbol) = (yyvsp[0].symbol);
symbol_class_set ((yyvsp[0].symbol), token_sym, (yylsp[0]), false);
}
-#line 2450 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2452 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 60:
-#line 504 "src/parse-gram.y" /* yacc.c:1646 */
+#line 504 "src/parse-gram.y" /* yacc.c:1648 */
{
(yyval.symbol) = (yyvsp[-1].symbol);
symbol_user_token_number_set ((yyvsp[-1].symbol), (yyvsp[0].integer), (yylsp[0]));
symbol_class_set ((yyvsp[-1].symbol), token_sym, (yylsp[-1]), false);
}
-#line 2460 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2462 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 61:
-#line 514 "src/parse-gram.y" /* yacc.c:1646 */
+#line 514 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.list) = symbol_list_sym_new ((yyvsp[0].symbol), (yylsp[0])); }
-#line 2466 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2468 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 62:
-#line 516 "src/parse-gram.y" /* yacc.c:1646 */
+#line 516 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.list) = symbol_list_append ((yyvsp[-1].list), symbol_list_sym_new ((yyvsp[0].symbol), (yylsp[0]))); }
-#line 2472 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2474 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 63:
-#line 520 "src/parse-gram.y" /* yacc.c:1646 */
+#line 520 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.list) = (yyvsp[0].list); }
-#line 2478 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2480 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 64:
-#line 521 "src/parse-gram.y" /* yacc.c:1646 */
+#line 521 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.list) = symbol_list_append ((yyvsp[-1].list), (yyvsp[0].list)); }
-#line 2484 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2486 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 65:
-#line 525 "src/parse-gram.y" /* yacc.c:1646 */
+#line 525 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.list) = symbol_list_sym_new ((yyvsp[0].symbol), (yylsp[0])); }
-#line 2490 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2492 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 66:
-#line 526 "src/parse-gram.y" /* yacc.c:1646 */
+#line 526 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.list) = symbol_list_type_new ((yyvsp[0].uniqstr), (yylsp[0])); }
-#line 2496 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2498 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 68:
-#line 531 "src/parse-gram.y" /* yacc.c:1646 */
+#line 531 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.uniqstr) = uniqstr_new ("*"); }
-#line 2502 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2504 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 69:
-#line 532 "src/parse-gram.y" /* yacc.c:1646 */
+#line 532 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.uniqstr) = uniqstr_new (""); }
-#line 2508 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2510 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 70:
-#line 538 "src/parse-gram.y" /* yacc.c:1646 */
+#line 538 "src/parse-gram.y" /* yacc.c:1648 */
{
current_type = (yyvsp[0].uniqstr);
tag_seen = true;
}
-#line 2517 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2519 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 71:
-#line 543 "src/parse-gram.y" /* yacc.c:1646 */
+#line 543 "src/parse-gram.y" /* yacc.c:1648 */
{
symbol_class_set ((yyvsp[0].symbol), current_class, (yylsp[0]), true);
symbol_type_set ((yyvsp[0].symbol), current_type, (yylsp[0]));
}
-#line 2526 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2528 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 72:
-#line 548 "src/parse-gram.y" /* yacc.c:1646 */
+#line 548 "src/parse-gram.y" /* yacc.c:1648 */
{
symbol_class_set ((yyvsp[-1].symbol), current_class, (yylsp[-1]), true);
symbol_type_set ((yyvsp[-1].symbol), current_type, (yylsp[-1]));
symbol_user_token_number_set ((yyvsp[-1].symbol), (yyvsp[0].integer), (yylsp[0]));
}
-#line 2536 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2538 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 73:
-#line 554 "src/parse-gram.y" /* yacc.c:1646 */
+#line 554 "src/parse-gram.y" /* yacc.c:1648 */
{
symbol_class_set ((yyvsp[-1].symbol), current_class, (yylsp[-1]), true);
symbol_type_set ((yyvsp[-1].symbol), current_type, (yylsp[-1]));
symbol_make_alias ((yyvsp[-1].symbol), (yyvsp[0].symbol), (yyloc));
}
-#line 2546 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2548 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 74:
-#line 560 "src/parse-gram.y" /* yacc.c:1646 */
+#line 560 "src/parse-gram.y" /* yacc.c:1648 */
{
symbol_class_set ((yyvsp[-2].symbol), current_class, (yylsp[-2]), true);
symbol_type_set ((yyvsp[-2].symbol), current_type, (yylsp[-2]));
symbol_user_token_number_set ((yyvsp[-2].symbol), (yyvsp[-1].integer), (yylsp[-1]));
symbol_make_alias ((yyvsp[-2].symbol), (yyvsp[0].symbol), (yyloc));
}
-#line 2557 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2559 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 81:
-#line 590 "src/parse-gram.y" /* yacc.c:1646 */
+#line 590 "src/parse-gram.y" /* yacc.c:1648 */
{
yyerrok;
}
-#line 2565 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2567 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 82:
-#line 596 "src/parse-gram.y" /* yacc.c:1646 */
+#line 596 "src/parse-gram.y" /* yacc.c:1648 */
{ current_lhs ((yyvsp[-1].symbol), (yylsp[-1]), (yyvsp[0].named_ref)); }
-#line 2571 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2573 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 83:
-#line 597 "src/parse-gram.y" /* yacc.c:1646 */
+#line 597 "src/parse-gram.y" /* yacc.c:1648 */
{
/* Free the current lhs. */
current_lhs (0, (yylsp[-3]), 0);
}
-#line 2580 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2582 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 84:
-#line 604 "src/parse-gram.y" /* yacc.c:1646 */
+#line 604 "src/parse-gram.y" /* yacc.c:1648 */
{ grammar_current_rule_end ((yylsp[0])); }
-#line 2586 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2588 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 85:
-#line 605 "src/parse-gram.y" /* yacc.c:1646 */
+#line 605 "src/parse-gram.y" /* yacc.c:1648 */
{ grammar_current_rule_end ((yylsp[0])); }
-#line 2592 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2594 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 87:
-#line 612 "src/parse-gram.y" /* yacc.c:1646 */
+#line 612 "src/parse-gram.y" /* yacc.c:1648 */
{ grammar_current_rule_begin (current_lhs_symbol, current_lhs_location,
current_lhs_named_ref); }
-#line 2599 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2601 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 88:
-#line 615 "src/parse-gram.y" /* yacc.c:1646 */
+#line 615 "src/parse-gram.y" /* yacc.c:1648 */
{ grammar_current_rule_symbol_append ((yyvsp[-1].symbol), (yylsp[-1]), (yyvsp[0].named_ref)); }
-#line 2605 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2607 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 89:
-#line 617 "src/parse-gram.y" /* yacc.c:1646 */
+#line 617 "src/parse-gram.y" /* yacc.c:1648 */
{ grammar_current_rule_action_append ((yyvsp[-1].code), (yylsp[-1]), (yyvsp[0].named_ref), false); }
-#line 2611 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2613 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 90:
-#line 619 "src/parse-gram.y" /* yacc.c:1646 */
+#line 619 "src/parse-gram.y" /* yacc.c:1648 */
{ grammar_current_rule_action_append ((yyvsp[0].code), (yylsp[0]), NULL, true); }
-#line 2617 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2619 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 91:
-#line 621 "src/parse-gram.y" /* yacc.c:1646 */
+#line 621 "src/parse-gram.y" /* yacc.c:1648 */
{ grammar_current_rule_empty_set ((yylsp[0])); }
-#line 2623 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2625 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 92:
-#line 623 "src/parse-gram.y" /* yacc.c:1646 */
+#line 623 "src/parse-gram.y" /* yacc.c:1648 */
{ grammar_current_rule_prec_set ((yyvsp[0].symbol), (yylsp[0])); }
-#line 2629 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2631 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 93:
-#line 625 "src/parse-gram.y" /* yacc.c:1646 */
+#line 625 "src/parse-gram.y" /* yacc.c:1648 */
{ grammar_current_rule_dprec_set ((yyvsp[0].integer), (yylsp[0])); }
-#line 2635 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2637 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 94:
-#line 627 "src/parse-gram.y" /* yacc.c:1646 */
+#line 627 "src/parse-gram.y" /* yacc.c:1648 */
{ grammar_current_rule_merge_set ((yyvsp[0].uniqstr), (yylsp[0])); }
-#line 2641 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2643 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 95:
-#line 631 "src/parse-gram.y" /* yacc.c:1646 */
+#line 631 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.named_ref) = 0; }
-#line 2647 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2649 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 96:
-#line 632 "src/parse-gram.y" /* yacc.c:1646 */
+#line 632 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.named_ref) = named_ref_new ((yyvsp[0].uniqstr), (yylsp[0])); }
-#line 2653 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2655 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 98:
-#line 643 "src/parse-gram.y" /* yacc.c:1646 */
+#line 643 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.uniqstr) = uniqstr_new ((yyvsp[0].code)); }
-#line 2659 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2661 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 99:
-#line 668 "src/parse-gram.y" /* yacc.c:1646 */
+#line 668 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.value).kind = muscle_keyword; (yyval.value).chars = ""; }
-#line 2665 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2667 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 100:
-#line 669 "src/parse-gram.y" /* yacc.c:1646 */
+#line 669 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.value).kind = muscle_keyword; (yyval.value).chars = (yyvsp[0].uniqstr); }
-#line 2671 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2673 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 101:
-#line 670 "src/parse-gram.y" /* yacc.c:1646 */
+#line 670 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.value).kind = muscle_string; (yyval.value).chars = (yyvsp[0].code); }
-#line 2677 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2679 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 102:
-#line 671 "src/parse-gram.y" /* yacc.c:1646 */
+#line 671 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.value).kind = muscle_code; (yyval.value).chars = strip_braces ((yyvsp[0].code)); }
-#line 2683 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2685 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 103:
-#line 684 "src/parse-gram.y" /* yacc.c:1646 */
+#line 684 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.symbol) = symbol_from_uniqstr ((yyvsp[0].uniqstr), (yylsp[0])); }
-#line 2689 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2691 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 104:
-#line 686 "src/parse-gram.y" /* yacc.c:1646 */
+#line 686 "src/parse-gram.y" /* yacc.c:1648 */
{
(yyval.symbol) = symbol_get (char_name ((yyvsp[0].character)), (yylsp[0]));
symbol_class_set ((yyval.symbol), token_sym, (yylsp[0]), false);
symbol_user_token_number_set ((yyval.symbol), (yyvsp[0].character), (yylsp[0]));
}
-#line 2699 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2701 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 105:
-#line 694 "src/parse-gram.y" /* yacc.c:1646 */
+#line 694 "src/parse-gram.y" /* yacc.c:1648 */
{ (yyval.symbol) = symbol_from_uniqstr ((yyvsp[0].uniqstr), (yylsp[0])); }
-#line 2705 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2707 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 108:
-#line 706 "src/parse-gram.y" /* yacc.c:1646 */
+#line 706 "src/parse-gram.y" /* yacc.c:1648 */
{
(yyval.symbol) = symbol_get (quotearg_style (c_quoting_style, (yyvsp[0].code)), (yylsp[0]));
symbol_class_set ((yyval.symbol), token_sym, (yylsp[0]), false);
}
-#line 2714 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2716 "src/parse-gram.c" /* yacc.c:1648 */
break;
case 110:
-#line 715 "src/parse-gram.y" /* yacc.c:1646 */
+#line 715 "src/parse-gram.y" /* yacc.c:1648 */
{
muscle_code_grow ("epilogue", translate_code ((yyvsp[0].code), (yylsp[0]), true), (yylsp[0]));
code_scanner_last_string_free ();
}
-#line 2723 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2725 "src/parse-gram.c" /* yacc.c:1648 */
break;
-#line 2727 "src/parse-gram.c" /* yacc.c:1646 */
+#line 2729 "src/parse-gram.c" /* yacc.c:1648 */
default: break;
}
if (yychar_backup != yychar)
@@ -2852,7 +2854,6 @@ yyerrorlab:
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
- yyerror_range[1] = yylsp[1-yylen];
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
@@ -2970,7 +2971,7 @@ yyreturn:
#endif
return yyresult;
}
-#line 721 "src/parse-gram.y" /* yacc.c:1906 */
+#line 721 "src/parse-gram.y" /* yacc.c:1907 */
/* Return the location of the left-hand side of a rule whose
@@ -3033,7 +3034,7 @@ translate_code_braceless (char *code, location loc)
static void
add_param (param_type type, char *decl, location loc)
{
- static char const alphanum[26 + 26 + 1 + 10] =
+ static char const alphanum[26 + 26 + 1 + 10 + 1] =
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"_"
@@ -3045,18 +3046,18 @@ add_param (param_type type, char *decl, location loc)
/* Stop on last actual character. */
for (p = decl; p[1]; p++)
if ((p == decl
- || ! memchr (alphanum, p[-1], sizeof alphanum))
- && memchr (alphanum, p[0], sizeof alphanum - 10))
+ || ! memchr (alphanum, p[-1], sizeof alphanum - 1))
+ && memchr (alphanum, p[0], sizeof alphanum - 10 - 1))
name_start = p;
/* Strip the surrounding '{' and '}', and any blanks just inside
the braces. */
--p;
- while (c_isspace ((unsigned char) *p))
+ while (c_isspace ((unsigned char) *p))
--p;
p[1] = '\0';
++decl;
- while (c_isspace ((unsigned char) *decl))
+ while (c_isspace ((unsigned char) *decl))
++decl;
}
diff --git a/src/parse-gram.h b/src/parse-gram.h
index 26bb3c54..450a7682 100644
--- a/src/parse-gram.h
+++ b/src/parse-gram.h
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.0.2.29-9a91e. */
+/* A Bison parser, made by GNU Bison 3.0.4.38-1047-dirty. */
/* Bison interface for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018 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
@@ -48,11 +48,11 @@
extern int gram_debug;
#endif
/* "%code requires" blocks. */
-#line 21 "src/parse-gram.y" /* yacc.c:1909 */
+#line 21 "src/parse-gram.y" /* yacc.c:1910 */
#include "symlist.h"
#include "symtab.h"
-#line 221 "src/parse-gram.y" /* yacc.c:1909 */
+#line 221 "src/parse-gram.y" /* yacc.c:1910 */
typedef enum
{
@@ -61,10 +61,10 @@ extern int gram_debug;
param_parse = 1 << 1,
param_both = param_lex | param_parse
} param_type;
-#line 647 "src/parse-gram.y" /* yacc.c:1909 */
+#line 647 "src/parse-gram.y" /* yacc.c:1910 */
#include "muscle-tab.h"
-#line 68 "src/parse-gram.h" /* yacc.c:1909 */
+#line 68 "src/parse-gram.h" /* yacc.c:1910 */
/* Token type. */
#ifndef GRAM_TOKENTYPE
@@ -135,27 +135,27 @@ extern int gram_debug;
union GRAM_STYPE
{
-#line 182 "src/parse-gram.y" /* yacc.c:1909 */
+#line 182 "src/parse-gram.y" /* yacc.c:1910 */
unsigned char character;
-#line 186 "src/parse-gram.y" /* yacc.c:1909 */
+#line 186 "src/parse-gram.y" /* yacc.c:1910 */
char *code;
-#line 191 "src/parse-gram.y" /* yacc.c:1909 */
+#line 191 "src/parse-gram.y" /* yacc.c:1910 */
uniqstr uniqstr;
-#line 199 "src/parse-gram.y" /* yacc.c:1909 */
+#line 199 "src/parse-gram.y" /* yacc.c:1910 */
int integer;
-#line 203 "src/parse-gram.y" /* yacc.c:1909 */
+#line 203 "src/parse-gram.y" /* yacc.c:1910 */
symbol *symbol;
-#line 208 "src/parse-gram.y" /* yacc.c:1909 */
+#line 208 "src/parse-gram.y" /* yacc.c:1910 */
assoc assoc;
-#line 211 "src/parse-gram.y" /* yacc.c:1909 */
+#line 211 "src/parse-gram.y" /* yacc.c:1910 */
symbol_list *list;
-#line 214 "src/parse-gram.y" /* yacc.c:1909 */
+#line 214 "src/parse-gram.y" /* yacc.c:1910 */
named_ref *named_ref;
-#line 241 "src/parse-gram.y" /* yacc.c:1909 */
+#line 241 "src/parse-gram.y" /* yacc.c:1910 */
param_type param;
-#line 409 "src/parse-gram.y" /* yacc.c:1909 */
+#line 409 "src/parse-gram.y" /* yacc.c:1910 */
code_props_type code_type;
-#line 649 "src/parse-gram.y" /* yacc.c:1909 */
+#line 649 "src/parse-gram.y" /* yacc.c:1910 */
struct
{
@@ -163,7 +163,7 @@ code_props_type code_type;
muscle_kind kind;
} value;
-#line 167 "src/parse-gram.h" /* yacc.c:1909 */
+#line 167 "src/parse-gram.h" /* yacc.c:1910 */
};
typedef union GRAM_STYPE GRAM_STYPE;
diff --git a/src/parse-gram.y b/src/parse-gram.y
index 5a0b2006..39088cb0 100644
--- a/src/parse-gram.y
+++ b/src/parse-gram.y
@@ -1,6 +1,6 @@
/* Bison Grammar Parser -*- C -*-
- Copyright (C) 2002-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -780,7 +780,7 @@ translate_code_braceless (char *code, location loc)
static void
add_param (param_type type, char *decl, location loc)
{
- static char const alphanum[26 + 26 + 1 + 10] =
+ static char const alphanum[26 + 26 + 1 + 10 + 1] =
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"_"
@@ -792,18 +792,18 @@ add_param (param_type type, char *decl, location loc)
/* Stop on last actual character. */
for (p = decl; p[1]; p++)
if ((p == decl
- || ! memchr (alphanum, p[-1], sizeof alphanum))
- && memchr (alphanum, p[0], sizeof alphanum - 10))
+ || ! memchr (alphanum, p[-1], sizeof alphanum - 1))
+ && memchr (alphanum, p[0], sizeof alphanum - 10 - 1))
name_start = p;
/* Strip the surrounding '{' and '}', and any blanks just inside
the braces. */
--p;
- while (c_isspace ((unsigned char) *p))
+ while (c_isspace ((unsigned char) *p))
--p;
p[1] = '\0';
++decl;
- while (c_isspace ((unsigned char) *decl))
+ while (c_isspace ((unsigned char) *decl))
++decl;
}
diff --git a/src/print-xml.c b/src/print-xml.c
index f1564244..3f4bc5be 100644
--- a/src/print-xml.c
+++ b/src/print-xml.c
@@ -1,6 +1,6 @@
/* Print an xml on generated parser, for Bison,
- Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/print-xml.h b/src/print-xml.h
index dd09f8d5..abdb7635 100644
--- a/src/print-xml.h
+++ b/src/print-xml.h
@@ -1,6 +1,6 @@
/* Output an xml of the generated parser, for Bison.
- Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/print.c b/src/print.c
index 3fb8fbf0..affaa426 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1,6 +1,6 @@
/* Print information on generated parser, for bison,
- Copyright (C) 1984, 1986, 1989, 2000-2005, 2007, 2009-2015 Free
+ Copyright (C) 1984, 1986, 1989, 2000-2005, 2007, 2009-2015, 2018 Free
Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/print.h b/src/print.h
index 22b57ee7..61bc2055 100644
--- a/src/print.h
+++ b/src/print.h
@@ -1,6 +1,6 @@
/* Print information on generated parser, for bison,
- Copyright (C) 2000, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/print_graph.c b/src/print_graph.c
index d9181a46..15d6dd57 100644
--- a/src/print_graph.c
+++ b/src/print_graph.c
@@ -1,6 +1,7 @@
/* Output a graph of the generated parser, for Bison.
- Copyright (C) 2001-2007, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2009-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/print_graph.h b/src/print_graph.h
index 4e0c5b07..4081b63d 100644
--- a/src/print_graph.h
+++ b/src/print_graph.h
@@ -1,6 +1,7 @@
/* Output a graph of the generated parser, for Bison.
- Copyright (C) 2000, 2006, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2006, 2009-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/reader.c b/src/reader.c
index ae606920..c220d707 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -1,7 +1,7 @@
/* Input parser for Bison
Copyright (C) 1984, 1986, 1989, 1992, 1998, 2000-2003, 2005-2007,
- 2009-2015 Free Software Foundation, Inc.
+ 2009-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/reader.h b/src/reader.h
index 5c99437e..14e35a94 100644
--- a/src/reader.h
+++ b/src/reader.h
@@ -1,6 +1,6 @@
/* Input parser for Bison
- Copyright (C) 2000-2003, 2005-2007, 2009-2015 Free Software
+ Copyright (C) 2000-2003, 2005-2007, 2009-2015, 2018 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/reduce.c b/src/reduce.c
index 316833bb..c5013a9e 100644
--- a/src/reduce.c
+++ b/src/reduce.c
@@ -1,6 +1,6 @@
/* Grammar reduction for Bison.
- Copyright (C) 1988-1989, 2000-2003, 2005-2015 Free Software
+ Copyright (C) 1988-1989, 2000-2003, 2005-2015, 2018 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/reduce.h b/src/reduce.h
index 254f7bc2..b1baa892 100644
--- a/src/reduce.h
+++ b/src/reduce.h
@@ -1,7 +1,7 @@
/* Grammar reduction for Bison.
- Copyright (C) 2000-2002, 2007, 2009-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 2000-2002, 2007, 2009-2015, 2018 Free Software
+ Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/relation.c b/src/relation.c
index f48c6621..71473278 100644
--- a/src/relation.c
+++ b/src/relation.c
@@ -1,7 +1,7 @@
/* Binary relations.
- Copyright (C) 2002, 2004-2005, 2009-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 2002, 2004-2005, 2009-2015, 2018 Free Software
+ Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/relation.h b/src/relation.h
index 4604cd68..cc940f93 100644
--- a/src/relation.h
+++ b/src/relation.h
@@ -1,6 +1,7 @@
/* Binary relations.
- Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/scan-code.h b/src/scan-code.h
index 1e03a330..ed70d25b 100644
--- a/src/scan-code.h
+++ b/src/scan-code.h
@@ -1,6 +1,7 @@
/* Bison code properties structure and scanner.
- Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/scan-code.l b/src/scan-code.l
index eeca1616..e79e8859 100644
--- a/src/scan-code.l
+++ b/src/scan-code.l
@@ -1,6 +1,6 @@
/* Bison Action Scanner -*- C -*-
- Copyright (C) 2006-2015 Free Software Foundation, Inc.
+ Copyright (C) 2006-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/scan-gram.h b/src/scan-gram.h
index 84f3b735..f135959e 100644
--- a/src/scan-gram.h
+++ b/src/scan-gram.h
@@ -1,6 +1,7 @@
/* Bison Grammar Scanner
- Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/scan-gram.l b/src/scan-gram.l
index a7e9bc4f..ff5c056e 100644
--- a/src/scan-gram.l
+++ b/src/scan-gram.l
@@ -1,6 +1,6 @@
/* Bison Grammar Scanner -*- C -*-
- Copyright (C) 2002-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/scan-skel.h b/src/scan-skel.h
index 049637a5..f76abde1 100644
--- a/src/scan-skel.h
+++ b/src/scan-skel.h
@@ -1,6 +1,7 @@
/* Scan Bison Skeletons.
- Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/scan-skel.l b/src/scan-skel.l
index 22756267..096a07ae 100644
--- a/src/scan-skel.l
+++ b/src/scan-skel.l
@@ -1,6 +1,6 @@
/* Scan Bison Skeletons. -*- C -*-
- Copyright (C) 2001-2015 Free Software Foundation, Inc.
+ Copyright (C) 2001-2015, 2018 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/state.c b/src/state.c
index 62b75291..7037b358 100644
--- a/src/state.c
+++ b/src/state.c
@@ -1,6 +1,7 @@
/* Type definitions for the finite state machine for Bison.
- Copyright (C) 2001-2007, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2009-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/state.h b/src/state.h
index 3c65efd0..f8ef6d2a 100644
--- a/src/state.h
+++ b/src/state.h
@@ -1,7 +1,7 @@
/* Type definitions for the finite state machine for Bison.
- Copyright (C) 1984, 1989, 2000-2004, 2007, 2009-2015 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1989, 2000-2004, 2007, 2009-2015, 2018 Free
+ Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/symlist.c b/src/symlist.c
index d3dc3118..201ddabd 100644
--- a/src/symlist.c
+++ b/src/symlist.c
@@ -1,7 +1,7 @@
/* Lists of symbols for Bison
- Copyright (C) 2002, 2005-2007, 2009-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 2002, 2005-2007, 2009-2015, 2018 Free Software
+ Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/symlist.h b/src/symlist.h
index 45cb7963..3ade1704 100644
--- a/src/symlist.h
+++ b/src/symlist.h
@@ -1,7 +1,7 @@
/* Lists of symbols for Bison
- Copyright (C) 2002, 2005-2007, 2009-2015 Free Software Foundation,
- Inc.
+ Copyright (C) 2002, 2005-2007, 2009-2015, 2018 Free Software
+ Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/symtab.c b/src/symtab.c
index f23b7961..eb4511aa 100644
--- a/src/symtab.c
+++ b/src/symtab.c
@@ -1,6 +1,6 @@
/* Symbol table manager for Bison.
- Copyright (C) 1984, 1989, 2000-2002, 2004-2015 Free Software
+ Copyright (C) 1984, 1989, 2000-2002, 2004-2015, 2018 Free Software
Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/symtab.h b/src/symtab.h
index d984070e..63b5fba2 100644
--- a/src/symtab.h
+++ b/src/symtab.h
@@ -1,7 +1,7 @@
/* Definitions for symtab.c and callers, part of Bison.
- Copyright (C) 1984, 1989, 1992, 2000-2002, 2004-2015 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1989, 1992, 2000-2002, 2004-2015, 2018 Free
+ Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/system.h b/src/system.h
index 8ed08bb8..caca0442 100644
--- a/src/system.h
+++ b/src/system.h
@@ -1,6 +1,7 @@
/* System-dependent definitions for Bison.
- Copyright (C) 2000-2007, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000-2007, 2009-2015, 2018 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/src/tables.c b/src/tables.c
index eb8572fc..3481ffb7 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -1,6 +1,6 @@
/* Output the generated parsing program for Bison.
- Copyright (C) 1984, 1986, 1989, 1992, 2000-2006, 2009-2015 Free
+ Copyright (C) 1984, 1986, 1989, 1992, 2000-2006, 2009-2015, 2018 Free
Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/tables.h b/src/tables.h
index 271e0bf0..349078a0 100644
--- a/src/tables.h
+++ b/src/tables.h
@@ -1,6 +1,7 @@
/* Prepare the LALR and GLR parser tables.
- Copyright (C) 2002, 2004, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2009-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/uniqstr.c b/src/uniqstr.c
index a4e2db0e..bfe1d172 100644
--- a/src/uniqstr.c
+++ b/src/uniqstr.c
@@ -1,6 +1,7 @@
/* Keep a unique copy of strings.
- Copyright (C) 2002-2005, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2005, 2009-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/src/uniqstr.h b/src/uniqstr.h
index 3f32d9d0..fe04cb79 100644
--- a/src/uniqstr.h
+++ b/src/uniqstr.h
@@ -1,6 +1,7 @@
/* Keeping a unique copy of strings.
- Copyright (C) 2002-2003, 2008-2015 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2008-2015, 2018 Free Software Foundation,
+ Inc.
This file is part of Bison, the GNU Compiler Compiler.
diff --git a/submodules/autoconf b/submodules/autoconf
-Subproject 9e087dd343b67ac58a7f54e08335ac62fc33ed5
+Subproject 487d6aaaa4fe45001d30c439ea6240fc74f1b5d
diff --git a/tests/actions.at b/tests/actions.at
index d538f883..e79405a8 100644
--- a/tests/actions.at
+++ b/tests/actions.at
@@ -1,6 +1,6 @@
e# Executing Actions. -*- Autotest -*-
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2015, 2018 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
@@ -203,7 +203,7 @@ AT_DATA_GRAMMAR([[input.y]],
]AT_YYLEX_DECLARE[
}
%%
-exp: { ]AT_SKEL_CC_IF([[std::cerr << @$ << std::endl]],
+exp: { ]AT_SKEL_CC_IF([[std::cerr << @$ << '\n']],
[[LOCATION_PRINT(stderr, @$); fputc ('\n', stderr)]])[; }
%%
]AT_YYERROR_DEFINE[
@@ -475,7 +475,7 @@ AT_DATA_GRAMMAR([[input.y]],
/* Display the symbol type Symbol. */
#define V(Symbol, Value, Location, Sep) \
- fprintf (stderr, #Symbol " (%d@%d-%d)" Sep, Value, RANGE(Location))
+ fprintf (stderr, #Symbol " (%d@%d-%d)%s", Value, RANGE(Location), Sep)
}
$5
@@ -490,15 +490,17 @@ AT_LALR1_CC_IF([typedef yy::location YYLTYPE;])[
]AT_LALR1_CC_IF([], [AT_YYERROR_DECLARE])
[}
-]m4_ifval([$6], [%type <ival> '(' 'x' 'y' ')' ';' thing line input END])[
+]m4_ifval([$6],
+[%type <ival> '(' 'x' 'y' ')' ';' thing line input
+ '!' raise check-spontaneous-errors END])[
/* FIXME: This %printer isn't actually tested. */
%printer
{
- ]AT_LALR1_CC_IF([debug_stream () << $$;],
- [fprintf (yyoutput, "%d", $$)])[;
+ ]AT_LALR1_CC_IF([yyo << $$;],
+ [fprintf (yyo, "%d", $$)])[;
}
- input line thing 'x' 'y'
+ '(' 'x' 'y' ')' ';' thing line input '!' raise check-spontaneous-errors END
%destructor
{ fprintf (stderr, "Freeing nterm input (%d@%d-%d)\n", $$, RANGE (@$)); }
@@ -513,6 +515,14 @@ AT_LALR1_CC_IF([typedef yy::location YYLTYPE;])[
thing
%destructor
+ { fprintf (stderr, "Freeing raise thing (%d@%d-%d)\n", $$, RANGE (@$)); }
+ raise
+
+%destructor
+ { fprintf (stderr, "Freeing check-spontaneous-errors thing (%d@%d-%d)\n", $$, RANGE (@$)); }
+ check-spontaneous-errors
+
+%destructor
{ fprintf (stderr, "Freeing token 'x' (%d@%d-%d)\n", $$, RANGE (@$)); }
'x'
@@ -534,7 +544,7 @@ AT_LALR1_CC_IF([typedef yy::location YYLTYPE;])[
*/
input:
- /* Nothing. */
+ %empty
{
$$ = 0;
V(input, $$, @$, ": /* Nothing */\n");
@@ -547,6 +557,38 @@ input:
V(line, $1, @1, " ");
V(input, $2, @2, "\n");
}
+| '!' check-spontaneous-errors
+ {
+ $$ = $2;
+ }
+;
+
+check-spontaneous-errors:
+ raise { abort(); $$ = $1; }
+| '(' raise ')' { abort(); $$ = $2; }
+| error
+ {
+ $$ = 5;
+ V(check-spontaneous-errors, $$, @$, ": ");
+ fprintf (stderr, "error (@%d-%d)\n", RANGE(@1));
+ }
+;
+
+raise:
+ %empty
+ {
+ $$ = 4;
+ V(raise, $$, @$, ": %empty\n");
+ YYERROR;
+ }
+| '!' '!'
+ {
+ $$ = 5;
+ V(raise, $$, @$, ": ");
+ V(!, $1, @2, " ");
+ V(!, $2, @2, "\n");
+ YYERROR;
+ }
;
line:
@@ -668,6 +710,38 @@ Freeing nterm input (2@0-29)
Successful parse.
]])
+# Check the location of empty reductions raising an error
+# -------------------------------------------------------
+# Here, the error is after token "!@0-9", so the error is raised from
+# @9-9, and the error recovery detects that it starts from @9-9 and
+# ends where starts the next token: END@10-19.
+#
+# So error recovery reports error@9-19.
+AT_PARSER_CHECK([./input '!'], 0, [],
+[[sending: '!' (0@0-9)
+sending: END (1@10-19)
+raise (4@9-9): %empty
+check-spontaneous-errors (5@9-19): error (@9-19)
+Freeing token END (1@10-19)
+Freeing nterm input (5@0-19)
+Successful parse.
+]])
+
+# Check the location of not empty reductions raising an error
+# -----------------------------------------------------------
+# This time the error is raised from a rule with 2 rhs symbols: @10-29.
+# It is recovered @10-29.
+AT_PARSER_CHECK([[./input '!!!']], 0, [],
+[[sending: '!' (0@0-9)
+sending: '!' (1@10-19)
+sending: '!' (2@20-29)
+raise (5@10-29): ! (1@20-29) ! (2@20-29)
+check-spontaneous-errors (5@10-29): error (@10-29)
+sending: END (3@30-39)
+Freeing token END (3@30-39)
+Freeing nterm input (5@0-29)
+Successful parse.
+]])
# Check locations in error recovery
# ---------------------------------
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 406f72d5..5db32669 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -1,7 +1,7 @@
# @configure_input@ -*- shell-script -*-
# Configurable variable values for Bison test suite.
-# Copyright (C) 2000-2015 Free Software Foundation, Inc.
+# Copyright (C) 2000-2015, 2018 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,8 +16,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# We need 'config.h'.
-CPPFLAGS="-I$abs_top_builddir/lib @CPPFLAGS@"
+# We need 'config.h' (builddir/lib), and the gnulib headers (srcdir/lib).
+CPPFLAGS="-I$abs_top_srcdir/lib -I$abs_top_builddir/lib @CPPFLAGS@"
# Don't just check if $POSIXLY_CORRECT is set, as Bash, when launched
# as /bin/sh, sets the shell variable POSIXLY_CORRECT to y, but not
@@ -69,7 +69,7 @@ if $BISON_CXX_WORKS; then
int main ()
{
- std::cout << "Works" << std::endl;
+ std::cout << "Works\n";
}
EOF
$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS $LIBS -o conftest conftest.cc
diff --git a/tests/bison.in b/tests/bison.in
index 80c831ce..d3b8ba61 100644
--- a/tests/bison.in
+++ b/tests/bison.in
@@ -2,7 +2,7 @@
# @configure_input@
# Wrapper around a non installed bison to make it work as an installed one.
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2015, 2018 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/tests/c++.at b/tests/c++.at
index 55d7d403..d708a5ba 100644
--- a/tests/c++.at
+++ b/tests/c++.at
@@ -1,6 +1,7 @@
# Checking the C++ Features. -*- Autotest -*-
-# Copyright (C) 2004-2005, 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2004-2005, 2007-2015, 2018 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
@@ -49,7 +50,7 @@ check (const T& in, const std::string& s)
os << in;
if (os.str () != s)
{
- std::cerr << "fail: " << os.str () << ", expected: " << s << std::endl;
+ std::cerr << "fail: " << os.str () << ", expected: " << s << '\n';
return false;
}
return true;
@@ -96,7 +97,7 @@ AT_SETUP([C++ Variant-based Symbols])
AT_KEYWORDS([variant])
AT_BISON_OPTION_PUSHDEFS([%skeleton "lalr1.cc" %debug $1])
-# Store strings and integers in a list of strings.
+# Store strings and integers in a vector of strings.
AT_DATA_GRAMMAR([list.y],
[[%skeleton "lalr1.cc"
%define api.value.type variant
@@ -114,20 +115,20 @@ AT_DATA_GRAMMAR([list.y],
}
%token <int> INT "int"
-%type < std::list<int> > exp
+%type < std::vector<int> > exp
%printer { yyo << $$; } <int>
%printer
{
- for (std::list<int>::const_iterator i = $$.begin (); i != $$.end (); ++i)
+ for (std::vector<int>::const_iterator i = $$.begin (); i != $$.end (); ++i)
{
if (i != $$.begin ())
yyo << ", ";
yyo << *i;
}
- } < std::list<int> >
+ } < std::vector<int> >
-%code requires { #include <list> }
+%code requires { #include <vector> }
%code { int yylex (yy::parser::semantic_type* yylval); }
%%
@@ -140,13 +141,13 @@ int main()
{
{
yy::parser::symbol_type s = yy::parser::make_INT(12);
- std::cerr << s.value.as<int>() << std::endl;
+ std::cerr << s.value.as<int>() << '\n';
}
{
yy::parser::symbol_type s = yy::parser::make_INT(123);
yy::parser::stack_symbol_type ss(1, s);
- std::cerr << ss.value.as<int>() << std::endl;
+ std::cerr << ss.value.as<int>() << '\n';
}
{
@@ -185,7 +186,7 @@ m4_pushdef([AT_TEST],
[AT_SETUP([Variants $1])
AT_BISON_OPTION_PUSHDEFS([%debug $1])
-# Store strings and integers in a list of strings.
+# Store strings and integers in a vector of strings.
AT_DATA_GRAMMAR([list.y],
[[%debug
%define api.value.type variant
@@ -194,29 +195,25 @@ AT_DATA_GRAMMAR([list.y],
%code requires // code for the .hh file
{
-#include <list>
+#include <vector>
#include <string>
-typedef std::list<std::string> strings_type;
+typedef std::vector<std::string> strings_type;
}
-%code // code for the .cc file
+%code top // code for the .cc file.
{
#include <cstdlib> // abort, getenv
#include <iostream>
+#include <vector>
#include <sstream>
+#include <string>
- namespace yy
- {
- static]AT_TOKEN_CTOR_IF([[
- parser::symbol_type yylex ()]], [[
- parser::token_type yylex (parser::semantic_type* yylval]AT_LOCATION_IF([,
- parser::location_type* yylloc])[)]])[;
- }
- // Printing a list of strings (for %printer).
- // Koening look up will look into std, since that's an std::list.
- namespace std
+ typedef std::vector<std::string> strings_type;
+
+ namespace yy
{
+ // Must be available early, as is used in %destructor.
std::ostream&
operator<<(std::ostream& o, const strings_type& s)
{
@@ -230,16 +227,27 @@ typedef std::list<std::string> strings_type;
return o << ')';
}
}
+}
- // Conversion to string.
- template <typename T>
- inline
- std::string
- to_string (const T& t)
+%code // code for the .cc file.
+{
+ namespace yy
{
- std::ostringstream o;
- o << t;
- return o.str ();
+ static]AT_TOKEN_CTOR_IF([[
+ parser::symbol_type yylex ()]], [[
+ parser::token_type yylex (parser::semantic_type* yylval]AT_LOCATION_IF([,
+ parser::location_type* yylloc])[)]])[;
+
+ // Conversion to string.
+ template <typename T>
+ inline
+ std::string
+ to_string (const T& t)
+ {
+ std::ostringstream o;
+ o << t;
+ return o.str ();
+ }
}
}
@@ -252,16 +260,16 @@ typedef std::list<std::string> strings_type;
// Using the template type to exercize its parsing.
// Starting with :: to ensure we don't output "<::" which starts by the
// digraph for the left square bracket.
-%type <::std::list<std::string>> list;
+%type <::std::vector<std::string>> list;
%printer { yyo << $$; }
- <int> <::std::string> <::std::list<std::string>>;
+ <int> <::std::string> <::std::vector<std::string>>;
%destructor { std::cerr << "Destroy: " << $$ << '\n'; } <*>;
%destructor { std::cerr << "Destroy: \"" << $$ << "\"\n"; } <::std::string>;
%%
result:
- list { std::cout << $][1 << std::endl; }
+ list { std::cout << $][1 << '\n'; }
;
list:
@@ -497,7 +505,7 @@ void
]$1[::parser::error (const ]$1[::parser::location_type &loc,
const std::string &msg)
{
- std::cerr << "At " << loc << ": " << msg << std::endl;
+ std::cerr << "At " << loc << ": " << msg << '\n';
}
]AT_MAIN_DEFINE[
@@ -565,7 +573,7 @@ AT_DATA_GRAMMAR([[input.y]],
%nonassoc 'a' ;
%destructor {
- std::cerr << "Discarding 'a'." << std::endl;
+ std::cerr << "Discarding 'a'.\n";
} 'a'
%%
@@ -574,7 +582,7 @@ start: error-reduce consistent-error 'a' { USE ($3); };
error-reduce:
'a' 'a' consistent-error 'a' { USE (($1, $2, $4)); }
-| 'a' error { std::cerr << "Reducing 'a'." << std::endl; USE ($1); }
+| 'a' error { std::cerr << "Reducing 'a'.\n"; USE ($1); }
;
consistent-error:
@@ -598,7 +606,7 @@ yylex (yy::parser::semantic_type *)
void
yy::parser::error (const std::string &m)
{
- std::cerr << m << std::endl;
+ std::cerr << m << '\n';
}
]AT_MAIN_DEFINE[
@@ -626,6 +634,7 @@ AT_BISON_OPTION_PUSHDEFS([%skeleton "lalr1.cc"])
AT_DATA_GRAMMAR([[input.y]],
[[%skeleton "lalr1.cc"
+%defines
%code
{
@@ -644,7 +653,7 @@ start:
;
thing:
- error { std::cerr << "caught error" << std::endl; }
+ error { std::cerr << "caught error\n"; }
| item
;
@@ -657,6 +666,17 @@ item:
%%
+void
+yy::parser::error (const std::string &m)
+{
+ std::cerr << "error: " << m << '\n';
+}
+]AT_MAIN_DEFINE[
+]])
+
+AT_DATA_SOURCE([input-scan.cc],
+[[#include "input.hh"
+
int
yylex (yy::parser::semantic_type *)
{
@@ -670,16 +690,9 @@ yylex (yy::parser::semantic_type *)
return res;
}
}
-
-void
-yy::parser::error (const std::string &m)
-{
- std::cerr << "error: " << m << std::endl;
-}
-]AT_MAIN_DEFINE[
]])
-AT_FULL_COMPILE([[input]])
+AT_FULL_COMPILE([[input]], [[scan]])
AT_PARSER_CHECK([[./input]], [[0]], [[]],
[[error: invalid expression
@@ -757,6 +770,12 @@ $1
Object::instances.erase (i);
}
+ Object& operator= (const Object& that)
+ {
+ val = that.val;
+ return *this;
+ }
+
Object& operator= (char v)
{
val = v;
@@ -790,7 +809,7 @@ $1
std::cerr << sep << *i;
sep = ", ";
}
- std::cerr << " }" << std::endl;
+ std::cerr << " }\n";
}
}
};
@@ -922,11 +941,11 @@ main (int argc, const char *argv[])
}
catch (const std::exception& e)
{
- std::cerr << "exception caught: " << e.what () << std::endl;
+ std::cerr << "exception caught: " << e.what () << '\n';
}
catch (...)
{
- std::cerr << "unknown exception caught" << std::endl;
+ std::cerr << "unknown exception caught\n";
}
Object::log (YY_NULLPTR, "end");
assert (Object::empty());
diff --git a/tests/calc.at b/tests/calc.at
index 85170097..39a54e97 100644
--- a/tests/calc.at
+++ b/tests/calc.at
@@ -1,6 +1,6 @@
# Simple calculator. -*- Autotest -*-
-# Copyright (C) 2000-2015 Free Software Foundation, Inc.
+# Copyright (C) 2000-2015, 2018 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/tests/conflicts.at b/tests/conflicts.at
index d320442d..bd2d4643 100644
--- a/tests/conflicts.at
+++ b/tests/conflicts.at
@@ -1,6 +1,7 @@
# Exercising Bison on conflicts. -*- Autotest -*-
-# Copyright (C) 2002-2005, 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2005, 2007-2015, 2018 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/tests/cxx-type.at b/tests/cxx-type.at
index e112a2cf..54b055a3 100644
--- a/tests/cxx-type.at
+++ b/tests/cxx-type.at
@@ -1,6 +1,6 @@
# Checking GLR Parsing. -*- Autotest -*-
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2015, 2018 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/tests/existing.at b/tests/existing.at
index 9faec1bf..517ed371 100644
--- a/tests/existing.at
+++ b/tests/existing.at
@@ -1,7 +1,7 @@
# Exercising Bison on actual grammars. -*- Autotest -*-
-# Copyright (C) 1989-1992, 2000-2005, 2007, 2009-2015 Free Software
-# Foundation, Inc.
+# Copyright (C) 1989-1992, 2000-2005, 2007, 2009-2015, 2018 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/tests/glr-regression.at b/tests/glr-regression.at
index a815008d..6ca6813d 100644
--- a/tests/glr-regression.at
+++ b/tests/glr-regression.at
@@ -1,6 +1,6 @@
# Checking GLR Parsing: Regression Tests -*- Autotest -*-
-# Copyright (C) 2002-2003, 2005-2007, 2009-2015 Free Software
+# Copyright (C) 2002-2003, 2005-2007, 2009-2015, 2018 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -1755,27 +1755,60 @@ AT_CLEANUP
## Predicates. ##
## ##
## http://lists.gnu.org/archive/html/bug-bison/2013-10/msg00004.html ##
+## http://lists.gnu.org/archive/html/bug-bison/2018-05/msg00033.html ##
## ----------------------------------------------------------------- ##
AT_SETUP([Predicates])
-# FIXME: We need genuine test cases with uses of %?.
-
AT_DATA_GRAMMAR([input.y],
[[%glr-parser
+%error-verbose
%expect-rr 1
+%code requires
+{
+ #include <assert.h>
+ #include <stdbool.h>
+ bool new_syntax = false;
+ const char *input = YY_NULLPTR;
+ ]AT_YYERROR_DECLARE[
+ ]AT_YYLEX_DECLARE[
+}
%%
-// Exercise "%?{...}" and "%? {...}".
widget:
- %? {new_syntax} "widget" id new_args { $$ = f($3, $4); }
-| %?{!new_syntax} "widget" id old_args { $$ = f($3, $4); }
+ %? {new_syntax} 'w' id new_args { printf("new"); }
+| %?{!new_syntax} 'w' id old_args { printf("old"); }
;
-id:;
-new_args:;
-old_args:;
+id: 'i';
+new_args: 'n';
+old_args: 'o';
%%
+]AT_YYERROR_DEFINE[
+
+int
+yylex (void)
+{
+ return *input++;
+}
+
+int
+main (int argc, const char* argv[])
+{
+ assert (argc == 2); (void) argc;
+ // First char decides whether new, or old syntax.
+ // Then the input.
+ new_syntax = argv[1][0] == 'N';
+ input = argv[1] + 1;
+ return yyparse ();
+}
]])
-AT_BISON_CHECK([[input.y]])
+AT_BISON_CHECK([[-o input.c input.y]])
+AT_COMPILE([input])
+AT_PARSER_CHECK([[./input Nwin]], [0], [new])
+AT_PARSER_CHECK([[./input Owin]], [1], [], [[syntax error, unexpected 'n', expecting 'o'
+]])
+AT_PARSER_CHECK([[./input Owio]], [0], [old])
+AT_PARSER_CHECK([[./input Nwio]], [1], [], [[syntax error, unexpected 'o', expecting 'n'
+]])
AT_CLEANUP
diff --git a/tests/headers.at b/tests/headers.at
index 9c1d00bc..f58160d7 100644
--- a/tests/headers.at
+++ b/tests/headers.at
@@ -1,6 +1,6 @@
# Bison Parser Headers. -*- Autotest -*-
-# Copyright (C) 2001-2002, 2006-2007, 2009-2015 Free Software
+# Copyright (C) 2001-2002, 2006-2007, 2009-2015, 2018 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -181,7 +181,7 @@ extern "C"
do { \
int res = S; \
if (res) \
- std::cerr << #S": " << res << std::endl; \
+ std::cerr << #S": " << res << '\n'; \
} while (false)
int
diff --git a/tests/input.at b/tests/input.at
index 895ec202..b83edd4a 100644
--- a/tests/input.at
+++ b/tests/input.at
@@ -1,6 +1,6 @@
# Checking the Bison scanner. -*- Autotest -*-
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2015, 2018 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/tests/java.at b/tests/java.at
index 8a4f5af4..30b07bbd 100644
--- a/tests/java.at
+++ b/tests/java.at
@@ -1,6 +1,6 @@
# Java tests for simple calculator. -*- Autotest -*-
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2015, 2018 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/tests/javapush.at b/tests/javapush.at
index 28e69471..45f95914 100644
--- a/tests/javapush.at
+++ b/tests/javapush.at
@@ -1,6 +1,6 @@
# Checking Java Push Parsing. -*- Autotest -*-
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2015, 2018 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
@@ -241,10 +241,13 @@ m4_define([AT_CALC_BODY],[
static StringReader
getinput(String filename) throws IOException
{
- StringBuilder buf = new StringBuilder();
+ // Yes, there are better alternatives to StringBuffer. But we
+ // don't really care about performances here, while portability
+ // to older Java matters.
+ StringBuffer buf = new StringBuffer();
FileReader file = new FileReader(filename);
int c;
- while ((c=file.read()) > 0)
+ while (0 < (c = file.read()))
buf.append((char)c);
file.close();
return new StringReader(buf.toString());
@@ -302,6 +305,13 @@ exp:
;
])
+
+
+## ------------------------------------- ##
+## Calc parser with api.push-pull both. ##
+## ------------------------------------- ##
+
+
# Test that the states transitioned by the push parser are the
# same as for the pull parser. This test is assumed to work
# if it produces the same partial trace of stack states as is
@@ -577,8 +587,9 @@ Stack now 0 7 15
]])
AT_BISON_CHECK([PUSHPULLFLAG [-o Calc.java Calc.y]])
+
AT_JAVA_COMPILE([[Calc.java]])
-#Verify that this is a push parser.
+# Verify that this is a push parser.
AT_CHECK_JAVA_GREP([[Calc.java]],
[[.*public void push_parse_initialize().*]])
# Capture stderr output for comparison purposes.
@@ -593,6 +604,13 @@ AT_CHECK([[sed -e '/^Stack now.*$/p' -e d ./stderr]],
AT_BISON_OPTION_POPDEFS
AT_CLEANUP
+
+
+## ---------------------------------------------------------------- ##
+## Calc parser with %locations %code lexer and api.push-pull both. ##
+## ---------------------------------------------------------------- ##
+
+
# This test looks for location reporting by looking
# at the lexer output with locations enabled.
# It defines a lexer that reports location info.
diff --git a/tests/local.at b/tests/local.at
index 5a459c64..35c5f395 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -2,7 +2,7 @@
# Macros for the GNU Bison Test suite.
-# Copyright (C) 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003-2015, 2018 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
@@ -539,7 +539,7 @@ m4_define([AT_YYERROR_DEFINE(c++)],
void
]AT_NAME_PREFIX[::parser::error (]AT_LOCATION_IF([[const location_type& l, ]])[const std::string& m)
{
- std::cerr << ]AT_LOCATION_IF([l << ": " << ])[m << std::endl;
+ std::cerr << ]AT_LOCATION_IF([l << ": " << ])[m << '\n';
}]])
@@ -892,7 +892,7 @@ void foo()
}
catch (...)
{
- std::cerr << "Inner caught" << std::endl;
+ std::cerr << "Inner caught\n";
throw;
}
}
@@ -905,7 +905,7 @@ int main()
}
catch (...)
{
- std::cerr << "Outer caught" << std::endl;
+ std::cerr << "Outer caught\n";
return 0;
}
return 1;
diff --git a/tests/local.mk b/tests/local.mk
index 0fa6947a..bcd3b2b8 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -1,6 +1,6 @@
## Makefile for Bison testsuite.
-# Copyright (C) 2000-2015 Free Software Foundation, Inc.
+# Copyright (C) 2000-2015, 2018 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
@@ -108,11 +108,13 @@ maintainer-check-posix: $(RUN_TESTSUITE_deps)
$(RUN_TESTSUITE) POSIXLY_CORRECT=1 _POSIX2_VERSION=200112
.PHONY: maintainer-check-valgrind
+VALGRIND_OPTS = --leak-check=full --show-reachable=yes --gen-suppressions=all \
+ $(VALGRIND_OPTS_SUPPRESSION)
maintainer-check-valgrind: $(RUN_TESTSUITE_deps)
- test -z '$(VALGRIND)' || \
+ test 'x$(VALGRIND)' != x || \
$(RUN_TESTSUITE) \
- PREBISON='$(VALGRIND_PREBISON)' PREPARSER='$(VALGRIND) -q' \
- VALGRIND_OPTS='--leak-check=full --show-reachable=yes'
+ PREBISON='$(VALGRIND) -q' PREPARSER='$(VALGRIND) -q' \
+ VALGRIND_OPTS="$(VALGRIND_OPTS)"
.PHONY: maintainer-check
maintainer-check: maintainer-check-posix maintainer-check-valgrind maintainer-check-g++
diff --git a/tests/named-refs.at b/tests/named-refs.at
index 17516a6a..43b04ce5 100644
--- a/tests/named-refs.at
+++ b/tests/named-refs.at
@@ -1,6 +1,6 @@
# Named references test. -*- Autotest -*-
-# Copyright (C) 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2009-2015, 2018 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/tests/output.at b/tests/output.at
index 09126774..6bee3147 100644
--- a/tests/output.at
+++ b/tests/output.at
@@ -1,6 +1,7 @@
# Checking the output filenames. -*- Autotest -*-
-# Copyright (C) 2000-2002, 2005-2015 Free Software Foundation, Inc.
+# Copyright (C) 2000-2002, 2005-2015, 2018 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/tests/push.at b/tests/push.at
index 9dc9f53a..40f55c34 100644
--- a/tests/push.at
+++ b/tests/push.at
@@ -1,6 +1,6 @@
# Checking Push Parsing. -*- Autotest -*-
-# Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2015, 2018 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/tests/reduce.at b/tests/reduce.at
index d197dc63..138f32dd 100644
--- a/tests/reduce.at
+++ b/tests/reduce.at
@@ -1,6 +1,7 @@
# Exercising Bison Grammar Reduction. -*- Autotest -*-
-# Copyright (C) 2001-2002, 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2002, 2007-2015, 2018 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/tests/regression.at b/tests/regression.at
index d2cb7de2..accd294f 100644
--- a/tests/regression.at
+++ b/tests/regression.at
@@ -1,6 +1,6 @@
# Bison Regressions. -*- Autotest -*-
-# Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# Copyright (C) 2001-2015, 2018 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/tests/sets.at b/tests/sets.at
index 180f6ae1..18bad2d9 100644
--- a/tests/sets.at
+++ b/tests/sets.at
@@ -1,6 +1,6 @@
# Exercising Bison Grammar Sets. -*- Autotest -*-
-# Copyright (C) 2001-2002, 2005, 2007, 2009-2015 Free Software
+# Copyright (C) 2001-2002, 2005, 2007, 2009-2015, 2018 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
diff --git a/tests/skeletons.at b/tests/skeletons.at
index 386f3011..5e99b340 100644
--- a/tests/skeletons.at
+++ b/tests/skeletons.at
@@ -1,6 +1,6 @@
# Checking skeleton support. -*- Autotest -*-
-# Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2015, 2018 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/tests/synclines.at b/tests/synclines.at
index 00c2fc1d..362fc73d 100644
--- a/tests/synclines.at
+++ b/tests/synclines.at
@@ -1,6 +1,6 @@
# Executing Actions. -*- Autotest -*-
-# Copyright (C) 2002, 2004-2005, 2007, 2009-2015 Free Software
+# Copyright (C) 2002, 2004-2005, 2007, 2009-2015, 2018 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
@@ -81,7 +81,15 @@ m4_define([_AT_SYNCLINES_COMPILE],
#
# "input.yy", line 80.21: 1540-0218 (S) The call does not match any parameter list for "operator<<".
# "/usr/vacpp/include/iosfwd", line 32.6: 1506-205 (S) #error This file to be used only with IBM VisualAge C++ v4 and later compilers
-
+#
+# Newer GCCs go further and if the function is declared static, complain
+# that it's not used.
+#
+# GCC 7 also underlines the error.
+#
+# syncline.c:4:2: error: #error "4"
+# #error "4"
+# ^~~~~
AT_CHECK([[$PERL -p -0777 - stderr <<\EOF
# 1. Remove useless lines.
@@ -91,8 +99,8 @@ AT_CHECK([[$PERL -p -0777 - stderr <<\EOF
s/^clang: warning: treating 'c' input as 'c\+\+'.*\n//gm;
# Function context.
s/^[^:]*: In function '[^']+':\n//gm;
- # Caret error.
- s/^ *#error.*\n *\^\n//gm;
+ # Caret error (with possible '~' to underline).
+ s/^ *#error.*\n *\^~*\n//gm;
# Number of errors.
s/^1 error generated\.\n//gm;
@@ -136,12 +144,15 @@ EOF
m4_define([AT_SYNCLINES_COMPILE],
[# Check if we can trust location translation.
AT_DATA([syncline.c],
-[[#error "1"
-int i; /* avoids -pedantic warning about an empty translation unit. */
+[[void foo (void);
+void foo (void)
+{
+#error "4"
+}
]])
_AT_SYNCLINES_COMPILE([syncline.c])
-AT_CHECK([[test "`cat stdout`" = 'syncline.c:1: @%:@error "1"' || exit 77]])
+AT_CHECK([[test "`cat stdout`" = 'syncline.c:4: @%:@error "4"' || exit 77]])
# Then work for real.
_AT_SYNCLINES_COMPILE([$1])
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 9b92e07c..4f110782 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -1,6 +1,6 @@
# Test suite for GNU Bison. -*- Autotest -*-
-# Copyright (C) 2000-2004, 2006-2007, 2009-2015 Free Software
+# Copyright (C) 2000-2004, 2006-2007, 2009-2015, 2018 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
diff --git a/tests/torture.at b/tests/torture.at
index d6b2806a..bbf40cc2 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -1,6 +1,6 @@
# Torturing Bison. -*- Autotest -*-
-# Copyright (C) 2001-2002, 2004-2007, 2009-2015 Free Software
+# Copyright (C) 2001-2002, 2004-2007, 2009-2015, 2018 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
diff --git a/tests/types.at b/tests/types.at
index 0c108d9d..5c56a1c0 100644
--- a/tests/types.at
+++ b/tests/types.at
@@ -1,6 +1,6 @@
# Value type. -*- Autotest -*-
-# Copyright (C) 2013-2015 Free Software Foundation, Inc.
+# Copyright (C) 2013-2015, 2018 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
@@ -243,7 +243,7 @@ m4_foreach([b4_skel], [[yacc.c], [glr.c], [lalr1.cc], [glr.cc]],
%define api.value.type variant],
[%token <int> '1';
%token <std::string> '2';],
- ['1' '2' { std::cout << $1 << ", " << $2 << std::endl; }],
+ ['1' '2' { std::cout << $1 << ", " << $2 << '\n'; }],
["12"],
[if (res == '1')
AT_VAL.build(10);