Cleanup parser code, add some node IDs to AST
[babeltrace.git] / formats / ctf / metadata / ctf-ast.h
index b839b2c694991cec9d2347d33cc20fef7dd1aa04..0e37d81850d2209990cda9f1f31bf52a8905e2be 100644 (file)
@@ -2,20 +2,45 @@
 #define _CTF_PARSER_H
 
 #include <helpers/list.h>
+#include <stdio.h>
+#include <glib.h>
+
+// the parameter name (of the reentrant 'yyparse' function)
+// data is a pointer to a 'SParserParam' structure
+//#define YYPARSE_PARAM        scanner
+
+// the argument for the 'yylex' function
+#define YYLEX_PARAM    ((struct ctf_scanner *) scanner)->scanner
+
+struct ctf_node;
+struct ctf_parser;
 
 enum node_type {
        NODE_UNKNOWN,
        NODE_ROOT,
+
        NODE_EVENT,
        NODE_STREAM,
-       NODE_TYPE,
        NODE_TRACE,
 
+       NODE_CTF_EXPRESSION,
+
+       NODE_TYPEDEF,
+       NODE_TYPEALIAS,
+
+       NODE_DECLARATION_SPECIFIER,
+       NODE_TYPE_DECLARATOR,
+
+       NODE_FLOATING_POINT,
+       NODE_INTEGER,
+       NODE_STRING,
+       NODE_ENUM,
+       NODE_VARIANT,
+       NODE_STRUCT,
+
        NR_NODE_TYPES,
 };
 
-struct ctf_node;
-
 struct ctf_node {
        enum node_type type;
        char *str;
@@ -27,6 +52,8 @@ struct ctf_node {
        struct cds_list_head gc;
 };
 
-int is_type(const char *id);
+struct ctf_ast {
+       struct ctf_node root;
+};
 
 #endif /* _CTF_PARSER_H */
This page took 0.024203 seconds and 4 git commands to generate.