mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +00:00
* 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.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
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>
|
2001-12-29 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/output.c (header_output): Don't forget to export YYLTYPE and
|
* src/output.c (header_output): Don't forget to export YYLTYPE and
|
||||||
|
|||||||
@@ -40,19 +40,6 @@
|
|||||||
/* Using locations. */
|
/* Using locations. */
|
||||||
#define YYLSP_NEEDED %%locations-flag
|
#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
|
/* If name_prefix is specify substitute the variables and functions
|
||||||
names. */
|
names. */
|
||||||
#define yyparse %%prefix##parse
|
#define yyparse %%prefix##parse
|
||||||
@@ -66,6 +53,19 @@
|
|||||||
/* Copy the user declarations. */
|
/* Copy the user declarations. */
|
||||||
%%prologue
|
%%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
|
#ifndef YYSTYPE
|
||||||
typedef %%stype yystype;
|
typedef %%stype yystype;
|
||||||
# define YYSTYPE yystype
|
# define YYSTYPE yystype
|
||||||
|
|||||||
@@ -31,10 +31,12 @@ AT_SETUP([Mid-rule actions])
|
|||||||
|
|
||||||
AT_DATA([[input.y]],
|
AT_DATA([[input.y]],
|
||||||
[[%{
|
[[%{
|
||||||
#include <stdio.h>
|
# include <stdio.h>
|
||||||
#include <stdlib.h>
|
# include <stdlib.h>
|
||||||
static void yyerror (const char *msg);
|
static void yyerror (const char *msg);
|
||||||
static int yylex (void);
|
static int yylex (void);
|
||||||
|
# define YYDEBUG 1
|
||||||
|
# define YYERROR_VERBOSE 1
|
||||||
%}
|
%}
|
||||||
%%
|
%%
|
||||||
exp: { putchar ('0'); }
|
exp: { putchar ('0'); }
|
||||||
|
|||||||
Reference in New Issue
Block a user