From 84ecdde6009386e0754e45cc12871e99caa6d9aa Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 7 Dec 2018 06:26:08 +0100 Subject: [PATCH] bison: don't force the Yacc mode Passing -y forces Bison into POSIX YACC mode. This includes reporting errors when Bison features are used in the grammar file. Some of these features (such as %expect) were flagged non-yacc recently. Most of the time, -y is actually used to please Automake's ylwrap which expects the output to be y.tab.c. * m4/bison.m4 (gl_BISON): Use `-o y.tab.c` rather than `-y`. --- ChangeLog | 10 ++++++++++ m4/bison.m4 | 9 +++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76d6966e4a..10187e9e1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2018-12-07 Akim Demaille + + bison: don't force the Yacc mode + Passing -y forces Bison into POSIX YACC mode. This includes reporting + errors when Bison features are used in the grammar file. Some of + these features (such as %expect) were flagged non-yacc recently. Most + of the time, -y is actually used to please Automake's ylwrap which + expects the output to be y.tab.c. + * m4/bison.m4 (gl_BISON): Use `-o y.tab.c` rather than `-y`. + 2018-12-01 Bruno Haible gnupload: Document short options. diff --git a/m4/bison.m4 b/m4/bison.m4 index ce47553b0a..bbb605413a 100644 --- a/m4/bison.m4 +++ b/m4/bison.m4 @@ -8,15 +8,16 @@ AC_DEFUN([gl_BISON], [ # parse-datetime.y works with bison only. - : ${YACC='bison -y'} + : ${YACC='bison -o y.tab.c'} dnl dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB dnl requires an Autoconf greater than 2.59c, but it will probably still be dnl useful to override the description of YACC in the --help output, re -dnl parse-datetime.y assuming 'bison -y'. +dnl parse-datetime.y assuming 'bison -o y.tab.c'. AC_ARG_VAR([YACC], -[The "Yet Another C Compiler" implementation to use. Defaults to 'bison -y'. -Values other than 'bison -y' will most likely break on most systems.])dnl +[The "Yet Another C Compiler" implementation to use. Defaults to +'bison -o y.tab.c'. Values other than 'bison -o y.tab.c' will most likely +break on most systems.])dnl AC_ARG_VAR([YFLAGS], [YFLAGS contains the list arguments that will be passed by default to Bison. This script will default YFLAGS to the empty string to avoid a default value of -- 2.39.5