glr.c, yacc.c: declare yydebug in the header.

* data/c.m4 (b4_declare_yydebug): New.
* data/glr.c, data/yacc.c (b4_shared_declarations): Use it.
Remove the corresponding code from the parser body.
* NEWS: Doc this.
This commit is contained in:
Akim Demaille
2012-06-15 15:19:16 +02:00
parent c3e9f08f93
commit 56ca3d8fce
4 changed files with 33 additions and 13 deletions

View File

@@ -272,7 +272,8 @@ m4_define([b4_declare_yyparse],
# Declaration that might either go into the header (if --defines)
# or open coded in the parser body.
m4_define([b4_shared_declarations],
[b4_percent_code_get([[requires]])[
[b4_declare_yydebug[
]b4_percent_code_get([[requires]])[
]b4_token_enums_defines(b4_tokens)[
]b4_declare_yylstype[
]b4_declare_yyparse[
@@ -323,11 +324,6 @@ m4_if(b4_prefix, [yy], [],
]b4_null_define[
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG ]b4_debug_flag[
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE