Make CTF metadata parser reentrant
[babeltrace.git] / formats / ctf / metadata / ctf-parser-test.c
diff --git a/formats/ctf/metadata/ctf-parser-test.c b/formats/ctf/metadata/ctf-parser-test.c
new file mode 100644 (file)
index 0000000..d2d4031
--- /dev/null
@@ -0,0 +1,25 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <glib.h>
+#include "ctf-scanner.h"
+#include "ctf-parser.h"
+#include "ctf-ast.h"
+
+extern int yydebug;
+
+int main(int argc, char **argv)
+{
+       struct ctf_scanner *scanner;
+
+       yydebug = 1;
+       scanner = ctf_scanner_alloc(stdin);
+       if (!scanner) {
+               fprintf(stderr, "Error allocating scanner\n");
+               return -1;
+       }
+       ctf_scanner_append_ast(scanner);
+       ctf_scanner_free(scanner);
+       return 0;
+} 
+
+
This page took 0.022933 seconds and 4 git commands to generate.