bison-patches
[Top][All Lists]
Advanced

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

30-fyi-fix-defaults-order.patch


From: Akim Demaille
Subject: 30-fyi-fix-defaults-order.patch
Date: Sat, 29 Dec 2001 15:15:43 +0100

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
        user prologue.  These are defaults.
        * tests/actions.at (Mid-rule actions): Make sure the user can
        define YYDEBUG and YYERROR_VERBOSE.
        
        
Index: src/bison.simple
--- src/bison.simple Fri, 28 Dec 2001 17:52:17 +0100 akim
+++ src/bison.simple Sat, 29 Dec 2001 12:04:20 +0100 akim
@@ -40,19 +40,6 @@
 /* Using locations.  */
 #define YYLSP_NEEDED %%locations-flag
 
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG %%debug
-#endif
-
-/* Enabling verbose error messages.  */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE %%error-verbose
-#endif
-
 /* If name_prefix is specify substitute the variables and functions
    names.  */
 #define yyparse %%prefix##parse
@@ -65,6 +52,19 @@
 
 /* Copy the user declarations.  */
 %%prologue
+
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG %%debug
+#endif
+
+/* Enabling verbose error messages.  */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE %%error-verbose
+#endif
 
 #ifndef YYSTYPE
 typedef %%stype yystype;
Index: tests/actions.at
--- tests/actions.at Sat, 29 Dec 2001 09:13:26 +0100 akim
+++ tests/actions.at Sat, 29 Dec 2001 12:05:49 +0100 akim
@@ -31,10 +31,12 @@
 
 AT_DATA([[input.y]],
 [[%{
-#include <stdio.h>
-#include <stdlib.h>
-static void yyerror (const char *msg);
-static int yylex (void);
+# include <stdio.h>
+# include <stdlib.h>
+  static void yyerror (const char *msg);
+  static int yylex (void);
+# define YYDEBUG         1
+# define YYERROR_VERBOSE 1
 %}
 %%
 exp:     { putchar ('0'); }



reply via email to

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