-#ifndef _CTF_PARSER_H
-#define _CTF_PARSER_H
+#ifndef _CTF_AST_H
+#define _CTF_AST_H
+
+/*
+ * ctf-ast.h
+ *
+ * Copyright 2011-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ */
#include <stdint.h>
#include <stdio.h>
NODE_ENV,
NODE_TRACE,
NODE_CLOCK,
+ NODE_CALLSITE,
NODE_CTF_EXPRESSION,
NODE_UNARY_EXPRESSION,
struct bt_list_head stream;
struct bt_list_head event;
struct bt_list_head clock;
+ struct bt_list_head callsite;
} root;
struct {
/*
*/
struct bt_list_head declaration_list;
} clock;
+ struct {
+ /*
+ * Children nodes are ctf_expression, typedef,
+ * typealias and type_specifier_list.
+ */
+ struct bt_list_head declaration_list;
+ } callsite;
struct {
struct bt_list_head left; /* Should be string */
struct bt_list_head right; /* Unary exp. or type */
struct ctf_trace;
+BT_HIDDEN
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node);
+BT_HIDDEN
int ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node);
+BT_HIDDEN
int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node);
+BT_HIDDEN
int ctf_visitor_construct_metadata(FILE *fd, int depth, struct ctf_node *node,
struct ctf_trace *trace, int byte_order);
+BT_HIDDEN
+int ctf_destroy_metadata(struct ctf_trace *trace);
-#endif /* _CTF_PARSER_H */
+#endif /* _CTF_AST_H */