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

@@ -567,3 +567,15 @@ typedef struct YYLTYPE
# define YYLTYPE_IS_TRIVIAL 1
#endif]])
])
# b4_declare_yydebug
# ------------------
m4_define([b4_declare_yydebug],
[[/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG ]b4_debug_flag[
#endif
#if YYDEBUG
extern int ]b4_prefix[debug;
#endif][]dnl
])