]> git.saurik.com Git - bison.git/blobdiff - NEWS
yysyntax_error: more preparation for readability of next patch.
[bison.git] / NEWS
diff --git a/NEWS b/NEWS
index 93312ff953a67d8f26464dc20a0f4e7a9ec15295..ee80d567c107322d00c14a944c3e72a775d045f1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -180,7 +180,52 @@ Bison News
   determine which destructor to call for the lookahead upon a syntax
   error or upon parser return.  This bug has been fixed.
 
-* Changes in version 2.4.3 (????-??-??):
+** C++ parsers use YYRHSLOC
+
+  Similarly to the C parsers, the C++ parsers now define the YYRHSLOC
+  macro and use it in the default YYLLOC_DEFAULT.  You are encouraged
+  to use it.  If, for instance, your location structure has "first"
+  and "last" members, instead of
+
+      # define YYLLOC_DEFAULT(Current, Rhs, N)                             \
+        do                                                                 \
+          if (N)                                                           \
+            {                                                              \
+              (Current).first = (Rhs)[1].location.first;                   \
+              (Current).last  = (Rhs)[N].location.last;                    \
+            }                                                              \
+          else                                                             \
+            {                                                              \
+              (Current).first = (Current).last = (Rhs)[0].location.last;   \
+            }                                                              \
+        while (false)
+
+  use:
+
+      # define YYLLOC_DEFAULT(Current, Rhs, N)                             \
+        do                                                                 \
+          if (N)                                                           \
+            {                                                              \
+              (Current).first = YYRHSLOC (Rhs, 1).first;                   \
+              (Current).last  = YYRHSLOC (Rhs, N).last;                    \
+            }                                                              \
+          else                                                             \
+            {                                                              \
+              (Current).first = (Current).last = YYRHSLOC (Rhs, 0).last;   \
+            }                                                              \
+        while (false)
+
+** YYLLOC_DEFAULT in C++
+
+  The default implementation of YYLLOC_DEFAULT used to be issued in
+  the header file.  It is now output in the implementation file, after
+  the user %code sections so that its #ifndef guard does not try to
+  override the user's YYLLOC_DEFAULT if provided.
+
+* Changes in version 2.4.3 (2010-08-05):
+
+** Bison now obeys -Werror and --warnings=error for warnings about
+   grammar rules that are useless in the parser due to conflicts.
 
 ** Problems with spawning M4 on at least FreeBSD 8 and FreeBSD 9 have
    been fixed.
@@ -195,6 +240,8 @@ Bison News
    errors in Bison 2.5.  They will remain warnings, which should be
    sufficient for POSIX while avoiding backward compatibility issues.
 
+** Minor documentation fixes.
+
 * Changes in version 2.4.2 (2010-03-20):
 
 ** Some portability problems that resulted in failures and livelocks
@@ -1336,7 +1383,9 @@ End:
 
 -----
 
-Copyright (C) 1995-2010 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+Inc.
 
 This file is part of Bison, the GNU Parser Generator.