]> Savannah Git Hosting - gnulib.git/commitdiff
bison: don't force the Yacc mode
authorAkim Demaille <akim.demaille@gmail.com>
Fri, 7 Dec 2018 05:26:08 +0000 (06:26 +0100)
committerAkim Demaille <akim.demaille@gmail.com>
Fri, 7 Dec 2018 17:33:48 +0000 (18:33 +0100)
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
m4/bison.m4

index 76d6966e4ae01fd1d37b2dea893852e952affb16..10187e9e1f7d9a753d16415fabccb44ddc29d266 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2018-12-07  Akim Demaille  <akim@lrde.epita.fr>
+
+       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  <bruno@clisp.org>
 
        gnupload: Document short options.
index ce47553b0ae206fcc8aa039c85b6b5796d13ce6b..bbb605413af717fd3456c4e3eb5359e26700ba33 100644 (file)
@@ -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