mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 09:43:03 +00:00
Merge branch 'maint'
* maint: maint: post-release administrivia version 3.3.1 yacc: issue warnings, not errors, for Bison extensions style: formatting changes in NEWS and complain.c tests: don't depend on the user's definition of SHELL
This commit is contained in:
@@ -1 +1 @@
|
|||||||
3.3
|
3.3.1
|
||||||
|
|||||||
15
NEWS
15
NEWS
@@ -3,13 +3,20 @@ GNU Bison NEWS
|
|||||||
* Noteworthy changes in release ?.? (????-??-??) [?]
|
* Noteworthy changes in release ?.? (????-??-??) [?]
|
||||||
|
|
||||||
|
|
||||||
|
* Noteworthy changes in release 3.3.1 (2019-01-27) [stable]
|
||||||
|
|
||||||
|
** Changes
|
||||||
|
|
||||||
|
The option -y/--yacc used to imply -Werror=yacc, which turns uses of Bison
|
||||||
|
extensions into errors. It now makes them simple warnings (-Wyacc).
|
||||||
|
|
||||||
* Noteworthy changes in release 3.3 (2019-01-26) [stable]
|
* Noteworthy changes in release 3.3 (2019-01-26) [stable]
|
||||||
|
|
||||||
A new mailing list was created, Bison Announce. It is low traffic, and is
|
A new mailing list was created, Bison Announce. It is low traffic, and is
|
||||||
only about announcing new releases and important messages (e.g., polls about
|
only about announcing new releases and important messages (e.g., polls
|
||||||
major decisions to make).
|
about major decisions to make).
|
||||||
|
|
||||||
https://lists.gnu.org/mailman/listinfo/bison-announce
|
https://lists.gnu.org/mailman/listinfo/bison-announce
|
||||||
|
|
||||||
** Backward incompatible changes
|
** Backward incompatible changes
|
||||||
|
|
||||||
|
|||||||
@@ -10308,26 +10308,26 @@ See the documentation of @option{--feature=fixit} below for more details.
|
|||||||
|
|
||||||
@item -y
|
@item -y
|
||||||
@itemx --yacc
|
@itemx --yacc
|
||||||
Act more like the traditional Yacc command. This can cause different
|
Act more like the traditional @command{yacc} command. This can cause
|
||||||
diagnostics to be generated, and may change behavior in other minor
|
different diagnostics to be generated (it implies @option{-Wyacc}), and may
|
||||||
ways. Most importantly, imitate Yacc's output file name conventions,
|
change behavior in other minor ways. Most importantly, imitate Yacc's
|
||||||
so that the parser implementation file is called @file{y.tab.c}, and
|
output file name conventions, so that the parser implementation file is
|
||||||
the other outputs are called @file{y.output} and @file{y.tab.h}.
|
called @file{y.tab.c}, and the other outputs are called @file{y.output} and
|
||||||
Also, if generating a deterministic parser in C, generate
|
@file{y.tab.h}. Also, if generating a deterministic parser in C, generate
|
||||||
@code{#define} statements in addition to an @code{enum} to associate
|
@code{#define} statements in addition to an @code{enum} to associate token
|
||||||
token numbers with token names. Thus, the following shell script can
|
numbers with token names. Thus, the following shell script can substitute
|
||||||
substitute for Yacc, and the Bison distribution contains such a script
|
for Yacc, and the Bison distribution contains such a script for
|
||||||
for compatibility with POSIX:
|
compatibility with POSIX:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
bison -y "$@@"
|
bison -y "$@@"
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The @option{-y}/@option{--yacc} option is intended for use with
|
The @option{-y}/@option{--yacc} option is intended for use with traditional
|
||||||
traditional Yacc grammars. If your grammar uses a Bison extension
|
Yacc grammars. If your grammar uses Bison extensions like
|
||||||
like @samp{%glr-parser}, Bison might not be Yacc-compatible even if
|
@samp{%glr-parser}, Bison might not be Yacc-compatible even if this option
|
||||||
this option is specified.
|
is specified.
|
||||||
|
|
||||||
@item -W [@var{category}]
|
@item -W [@var{category}]
|
||||||
@itemx --warnings[=@var{category}]
|
@itemx --warnings[=@var{category}]
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
SHELL=/bin/sh
|
||||||
|
export SHELL
|
||||||
|
|
||||||
me=$(basename "$1" .test)
|
me=$(basename "$1" .test)
|
||||||
medir=$(dirname "$1" | sed -e 's,.*examples/,,')
|
medir=$(dirname "$1" | sed -e 's,.*examples/,,')
|
||||||
|
|
||||||
|
|||||||
@@ -421,8 +421,10 @@ duplicate_rule_directive (char const *directive,
|
|||||||
location first, location second)
|
location first, location second)
|
||||||
{
|
{
|
||||||
unsigned i = 0;
|
unsigned i = 0;
|
||||||
complain_indent (&second, complaint, &i, _("only one %s allowed per rule"), directive);
|
complain_indent (&second, complaint, &i,
|
||||||
|
_("only one %s allowed per rule"), directive);
|
||||||
i += SUB_INDENT;
|
i += SUB_INDENT;
|
||||||
complain_indent (&first, complaint, &i, _("previous declaration"));
|
complain_indent (&first, complaint, &i,
|
||||||
|
_("previous declaration"));
|
||||||
fixits_register (&second, "");
|
fixits_register (&second, "");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -708,7 +708,7 @@ getargs (int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'y':
|
case 'y':
|
||||||
warning_argmatch ("error=yacc", 0, 6);
|
warning_argmatch ("yacc", 0, 0);
|
||||||
yacc_loc = command_line_location ();
|
yacc_loc = command_line_location ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -1402,15 +1402,15 @@ without_period: "WITHOUT.PERIOD";
|
|||||||
AT_BISON_OPTION_POPDEFS
|
AT_BISON_OPTION_POPDEFS
|
||||||
|
|
||||||
# POSIX Yacc accept periods, but not dashes.
|
# POSIX Yacc accept periods, but not dashes.
|
||||||
AT_BISON_CHECK([--yacc input.y], [1], [],
|
AT_BISON_CHECK([--yacc input.y], [], [],
|
||||||
[[input.y:1.1-5: error: POSIX Yacc does not support %code [-Werror=yacc]
|
[[input.y:1.1-5: warning: POSIX Yacc does not support %code [-Wyacc]
|
||||||
input.y:9.8-16: error: POSIX Yacc forbids dashes in symbol names: WITH-DASH [-Werror=yacc]
|
input.y:9.8-16: warning: POSIX Yacc forbids dashes in symbol names: WITH-DASH [-Wyacc]
|
||||||
input.y:10.21-34: error: POSIX Yacc does not support string literals [-Werror=yacc]
|
input.y:10.21-34: warning: POSIX Yacc does not support string literals [-Wyacc]
|
||||||
input.y:12.23-38: error: POSIX Yacc does not support string literals [-Werror=yacc]
|
input.y:12.23-38: warning: POSIX Yacc does not support string literals [-Wyacc]
|
||||||
input.y:13.1-5: error: POSIX Yacc does not support %code [-Werror=yacc]
|
input.y:13.1-5: warning: POSIX Yacc does not support %code [-Wyacc]
|
||||||
input.y:20.8-16: error: POSIX Yacc forbids dashes in symbol names: with-dash [-Werror=yacc]
|
input.y:20.8-16: warning: POSIX Yacc forbids dashes in symbol names: with-dash [-Wyacc]
|
||||||
input.y:22.15-28: error: POSIX Yacc does not support string literals [-Werror=yacc]
|
input.y:22.15-28: warning: POSIX Yacc does not support string literals [-Wyacc]
|
||||||
input.y:24.17-32: error: POSIX Yacc does not support string literals [-Werror=yacc]
|
input.y:24.17-32: warning: POSIX Yacc does not support string literals [-Wyacc]
|
||||||
]])
|
]])
|
||||||
|
|
||||||
# Dashes are fine for GNU Bison.
|
# Dashes are fine for GNU Bison.
|
||||||
|
|||||||
Reference in New Issue
Block a user