* src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
authorAkim Demaille <akim@epita.fr>
Sat, 29 Dec 2001 14:27:01 +0000 (14:27 +0000)
committerAkim Demaille <akim@epita.fr>
Sat, 29 Dec 2001 14:27:01 +0000 (14:27 +0000)
user prologue.  These are defaults.
* tests/actions.at (Mid-rule actions): Make sure the user can
define YYDEBUG and YYERROR_VERBOSE.

ChangeLog
src/bison.simple
tests/actions.at

index 5a9f6f9..d8074be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2001-12-29  Akim Demaille  <akim@epita.fr>
 
+       * 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.
+
+       
+2001-12-29  Akim Demaille  <akim@epita.fr>
+
        * src/output.c (header_output): Don't forget to export YYLTYPE and
        yylloc.
        * tests/headers.at (export YYLTYPE): New, make sure it does.
index 033d726..3c58fc9 100644 (file)
 /* 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
 /* 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;
 # define YYSTYPE yystype
index 79dee6f..e3d4ba2 100644 (file)
@@ -31,10 +31,12 @@ AT_SETUP([Mid-rule actions])
 
 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'); }