Fix: define macros for logging levels
[babeltrace.git] / src / plugins / ctf / common / metadata / parser.y
index ef89fcf8bfeb714ce750cd982857cc5305f4425a..b270a83c5001b89d5b4398398420a55587eed259 100644 (file)
 #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
This page took 0.023949 seconds and 4 git commands to generate.