bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch to fix bad interaction between Bison 1.75b and flex


From: Paul Eggert
Subject: patch to fix bad interaction between Bison 1.75b and flex
Date: Fri, 13 Dec 2002 01:35:16 -0800 (PST)

I installed the following patch.

2002-12-13  Paul Eggert  <address@hidden>

        Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
        <http://mail.gnu.org/pipermail/bug-bison/2002-November/001929.html>.
        * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
        locations are requested.
        (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
        locations are requested.

Index: yacc.c
===================================================================
RCS file: /cvsroot/bison/bison/data/yacc.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -p -u -r1.42 -r1.43
--- yacc.c      11 Dec 2002 05:25:27 -0000      1.42
+++ yacc.c      13 Dec 2002 09:33:23 -0000      1.43
@@ -197,7 +197,7 @@ b4_syncline(address@hidden@], address@hidden@])],
 # define YYSTYPE_IS_TRIVIAL 1
 #endif
 
-#ifndef YYLTYPE
+]b4_location_if([#ifndef YYLTYPE
 typedef struct yyltype
 {
   int first_line;
@@ -208,6 +208,7 @@ typedef struct yyltype
 # define YYLTYPE ]b4_location_type[
 # define YYLTYPE_IS_TRIVIAL 1
 #endif
+])[
 
 /* Copy the second part of user declarations.  */
 ]b4_post_prologue
@@ -249,7 +250,7 @@ b4_syncline(address@hidden@], address@hidden@])[
 
 #if (! defined (yyoverflow) \
      && (! defined (__cplusplus) \
-        || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+        || (]b4_location_if([YYLTYPE_IS_TRIVIAL && ])[YYSTYPE_IS_TRIVIAL)))
 
 /* A type that is properly aligned for any stack member.  */
 union yyalloc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]