X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Fcommon%2Fmetadata%2Fparser.y;h=b270a83c5001b89d5b4398398420a55587eed259;hp=ef89fcf8bfeb714ce750cd982857cc5305f4425a;hb=9103e903a8;hpb=8cca03c6f0678cf878a62ef7863cf6ec7b6dff2d diff --git a/src/plugins/ctf/common/metadata/parser.y b/src/plugins/ctf/common/metadata/parser.y index ef89fcf8..b270a83c 100644 --- a/src/plugins/ctf/common/metadata/parser.y +++ b/src/plugins/ctf/common/metadata/parser.y @@ -41,16 +41,10 @@ #include "common/list.h" #include "common/assert.h" #include "scanner.h" -#include "parser.h" #include "ast.h" #include "objstack.h" -#if BT_LOG_ENABLED_TRACE -# define YYDEBUG 1 -# define YYFPRINTF(_stream, _fmt, args...) BT_LOGT(_fmt, ## args) -#else -# define YYDEBUG 0 -#endif +#include "parser-wrap.h" /* Join two lists, put "add" at the end of "head". */ static inline void @@ -1044,6 +1038,17 @@ void ctf_scanner_free(struct ctf_scanner *scanner) %} +/* + * This ends up in parser.h and makes sure those who want to include it pass + * through parser-wrap.h. + */ +%code requires { +#ifndef ALLOW_INCLUDE_PARSER_H +# error "Don't include parser.h directly, include parser-wrap.h instead." +#endif +} + + %define api.pure /* %locations */ %error-verbose