Export the list header with a new namespace
[babeltrace.git] / formats / ctf / metadata / ctf-scanner.h
CommitLineData
34d3acc4
MD
1#ifndef _CTF_SCANNER_H
2#define _CTF_SCANNER_H
3
4#include <stdio.h>
5#include "ctf-ast.h"
6
7#ifndef YY_TYPEDEF_YY_SCANNER_T
8#define YY_TYPEDEF_YY_SCANNER_T
9typedef void* yyscan_t;
10#endif
11
609bd1bf
MD
12struct ctf_scanner_scope;
13struct ctf_scanner_scope {
14 struct ctf_scanner_scope *parent;
15 GHashTable *types;
16};
17
34d3acc4
MD
18struct ctf_scanner {
19 yyscan_t scanner;
20 struct ctf_ast *ast;
609bd1bf
MD
21 struct ctf_scanner_scope root_scope;
22 struct ctf_scanner_scope *cs;
3122e6f0 23 struct bt_list_head allocated_strings;
34d3acc4
MD
24};
25
26struct ctf_scanner *ctf_scanner_alloc(FILE *input);
27void ctf_scanner_free(struct ctf_scanner *scanner);
28int ctf_scanner_append_ast(struct ctf_scanner *scanner);
29
30static inline
31struct ctf_ast *ctf_scanner_get_ast(struct ctf_scanner *scanner)
32{
33 return scanner->ast;
34}
35
36int is_type(struct ctf_scanner *scanner, const char *id);
37
38#endif /* _CTF_SCANNER_H */
This page took 0.026044 seconds and 4 git commands to generate.