]> git.saurik.com Git - bison.git/commitdiff
* src/files.c, src/files.h (strsuffix): Not static.
authorAkim Demaille <akim@epita.fr>
Thu, 3 Jan 2002 13:39:20 +0000 (13:39 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 3 Jan 2002 13:39:20 +0000 (13:39 +0000)
* src/conflicts.c (conflicts_print): Don't consider it is an error
to have a %expectation violation on a file ending by `plural.y'.
Eek.

ChangeLog
NEWS
src/conflicts.c
src/files.c
src/files.h

index 37cdee28b42ef3d80c9446ee82611bbd63023049..2ba98e394ad0585e3dd9ebde3d1792fc0bf89f09 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-01-03  Akim Demaille  <akim@epita.fr>
+
+       * src/files.c, src/files.h (strsuffix): Not static.
+       * src/conflicts.c (conflicts_print): Don't consider it is an error
+       to have a %expectation violation on a file ending by `plural.y'.
+       Eek.
+
 2002-01-03  Akim Demaille  <akim@epita.fr>
 
        * tests/bison.in: Adjust to CVS Autoconf.
diff --git a/NEWS b/NEWS
index 35bd1d0217a41690ab52c3fd60491c9f30474abd..c5dc1fce4eae17abe97fccfb7ffb21f096762715 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,12 @@ Bison News
 
 Changes in version 1.30j:
 
+* GNU Gettext and %expect
+  GNU Gettext asserts 10 s/r conflicts, but there are 7.  Now that
+  Bison dies on incorrect %expectations, we fear there will be
+  too many bug reports for Gettext, so _for the time being_, %expect
+  does not trigger an error when the input file is named `plural.y'.
+
 Changes in version 1.30i:
 
 * Use of alloca in parsers
index 21c1f11c73ad7a30320bf141974b98680daa90c4..03fca121a001deb5c2e584ffbf7d7768fdbfe250 100644 (file)
@@ -401,7 +401,14 @@ conflicts_print (void)
 
   if (expected_conflicts != -1 && !src_ok)
     {
-      complain_message_count++;
+      /* FIXME: BIG ATTROCIOUS HACK.  For flames, complaints and so
+        on, see Bruno Haible.  GNU Gettext's plural.y's %expect is
+        wrong, and newer Bison reject it.  But then, Bruno will be
+        overwhelmed by bug reports, until a fixed Gettext is
+        released.  So for the 1.3x generation only, we leave a puke
+        puke hack.  */
+      if (!strsuffix (infile, "plural.y"))
+       complain_message_count++;
       fprintf (stderr, ngettext ("expected %d shift/reduce conflict\n",
                                 "expected %d shift/reduce conflicts\n",
                                 expected_conflicts),
index f6f3c2f752f150e87f9f3a4b5c196096b193ba27..8dcf357f88577ed02b93dca6a8749cabb2fa4caf 100644 (file)
@@ -1,5 +1,6 @@
 /* Open and close files for bison,
-   Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1984, 1986, 1989, 1992, 2000, 2001, 2002
+   Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -58,7 +59,7 @@ const char *header_extension = NULL;
 | Is SUFFIX ending STRING?  |
 `--------------------------*/
 
-static int
+int
 strsuffix (const char *string, const char *suffix)
 {
   size_t string_len = strlen (string);
index fa99d6aa058f3994a21d24a2c67d2e7c26c1b88b..b4a09537a80b1b6c312f70469e554d083f0eeae8 100644 (file)
@@ -1,7 +1,5 @@
-#ifndef FILES_H_
-# define FILES_H_
 /* File names and variables for bison,
-   Copyright 1984, 1989, 2000 Free Software Foundation, Inc.
+   Copyright 1984, 1989, 2000, 2002 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -20,6 +18,9 @@
    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#ifndef FILES_H_
+# define FILES_H_
+
 /* These two should be pathnames for opening the sample parser files.
    When bison is installed, they should be absolute pathnames.
    XPFILE1 and XPFILE2 normally come from config.h.  */