X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fmetadata%2Fctf-ast.h;h=6ee937b6e44ec7597a39c6d34217ab9bc4f1bf89;hp=1252272acec3b6c42a022f67d9802fd80f48a1ef;hb=ab4cf05887a402e53396db43b5958918d0d2d022;hpb=48a01768126d75c638babf8b0f9a62106daf67cb diff --git a/formats/ctf/metadata/ctf-ast.h b/formats/ctf/metadata/ctf-ast.h index 1252272a..6ee937b6 100644 --- a/formats/ctf/metadata/ctf-ast.h +++ b/formats/ctf/metadata/ctf-ast.h @@ -2,9 +2,9 @@ #define _CTF_PARSER_H #include -#include #include #include +#include // the parameter name (of the reentrant 'yyparse' function) // data is a pointer to a 'SParserParam' structure @@ -152,6 +152,7 @@ struct ctf_node { TYPESPEC_UNSIGNED, TYPESPEC_BOOL, TYPESPEC_COMPLEX, + TYPESPEC_IMAGINARY, TYPESPEC_CONST, TYPESPEC_ID_TYPE, } type; @@ -194,7 +195,10 @@ struct ctf_node { } string; struct { char *id; - /* range list or single value node */ + /* + * Range list or single value node. Contains unary + * expressions. + */ struct cds_list_head values; } enumerator; struct { @@ -202,6 +206,7 @@ struct ctf_node { /* NULL, value or declaration specifier */ struct ctf_node *container_type; struct cds_list_head enumerator_list; + int has_body; } _enum; struct { struct cds_list_head declaration_specifier; @@ -212,11 +217,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; }; @@ -226,6 +233,14 @@ struct ctf_ast { struct cds_list_head allocated_nodes; }; +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 */