X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fmetadata%2Fctf-ast.h;h=c12d09a97910dc43faf08237efee70bcd3a4f45a;hp=8b5ad887b6df6ea16334b7b86e6e88435751ec07;hb=7d4192cb80178ad534e460d56f67e55679c7d8ee;hpb=3888a159635f33766e433d76453a0a43a8c3e971 diff --git a/formats/ctf/metadata/ctf-ast.h b/formats/ctf/metadata/ctf-ast.h index 8b5ad887..c12d09a9 100644 --- a/formats/ctf/metadata/ctf-ast.h +++ b/formats/ctf/metadata/ctf-ast.h @@ -173,8 +173,11 @@ struct ctf_node { struct { /* typedec has no pointer list */ struct ctf_node *type_declarator; - /* value or first node of declaration specifier list */ - struct ctf_node *length; + /* + * unary expression (value) or + * declaration specifiers. + */ + struct cds_list_head length; /* for abstract type declarator */ unsigned int abstract_array; } nested; @@ -203,9 +206,13 @@ struct ctf_node { } enumerator; struct { char *enum_id; - /* NULL, value or declaration specifier */ - struct ctf_node *container_type; + /* + * Either empty, contains unary expression or + * declaration specifiers. + */ + struct cds_list_head container_type; struct cds_list_head enumerator_list; + int has_body; } _enum; struct { struct cds_list_head declaration_specifier; @@ -216,11 +223,13 @@ struct ctf_node { char *choice; /* list of typedef, typealias and declarations */ struct cds_list_head declaration_list; + int has_body; } variant; struct { char *name; /* list of typedef, typealias and declarations */ struct cds_list_head declaration_list; + int has_body; } _struct; } u; }; @@ -232,8 +241,12 @@ struct ctf_ast { const char *node_type(struct ctf_node *node); +struct ctf_trace; + int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node); int ctf_visitor_semantic_check(FILE *fd, int depth, struct ctf_node *node); int ctf_visitor_parent_links(FILE *fd, int depth, struct ctf_node *node); +int ctf_visitor_construct_metadata(FILE *fd, int depth, struct ctf_node *node, + struct ctf_trace *trace, int byte_order); #endif /* _CTF_PARSER_H */