X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fmetadata%2Fctf-ast.h;h=34d00367fc396ab93af2775c1dd677c6a563ae59;hp=b839b2c694991cec9d2347d33cc20fef7dd1aa04;hb=34d3acc4fc9f020b0e2616a29a339b5c546a05c1;hpb=c455f9d583959ff7a8181d216c26ff1f1cab52aa diff --git a/formats/ctf/metadata/ctf-ast.h b/formats/ctf/metadata/ctf-ast.h index b839b2c6..34d00367 100644 --- a/formats/ctf/metadata/ctf-ast.h +++ b/formats/ctf/metadata/ctf-ast.h @@ -2,6 +2,18 @@ #define _CTF_PARSER_H #include +#include +#include + +// 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, @@ -14,8 +26,6 @@ enum node_type { NR_NODE_TYPES, }; -struct ctf_node; - struct ctf_node { enum node_type type; char *str; @@ -27,6 +37,14 @@ struct ctf_node { struct cds_list_head gc; }; -int is_type(const char *id); +struct scope; +struct scope { + struct scope *parent; + GHashTable *types; +}; + +struct ctf_ast { + struct ctf_node root; +}; #endif /* _CTF_PARSER_H */