Sort includes in C++ files
[babeltrace.git] / src / plugins / ctf / common / metadata / scanner.hpp
1 /*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 */
6
7 #ifndef _CTF_SCANNER_H
8 #define _CTF_SCANNER_H
9
10 #include <stdio.h>
11
12 #include "common/macros.h"
13
14 #include "ast.hpp"
15
16 #ifndef YY_TYPEDEF_YY_SCANNER_T
17 # define YY_TYPEDEF_YY_SCANNER_T
18 typedef void *yyscan_t;
19 #endif
20
21 struct ctf_scanner_scope;
22 struct ctf_scanner_scope
23 {
24 struct ctf_scanner_scope *parent;
25 GHashTable *classes;
26 };
27
28 struct ctf_scanner
29 {
30 yyscan_t scanner;
31 struct ctf_ast *ast;
32 struct ctf_scanner_scope root_scope;
33 struct ctf_scanner_scope *cs;
34 struct objstack *objstack;
35 };
36
37 struct ctf_scanner *ctf_scanner_alloc(void);
38
39 void ctf_scanner_free(struct ctf_scanner *scanner);
40
41 int ctf_scanner_append_ast(struct ctf_scanner *scanner, FILE *input);
42
43 static inline struct ctf_ast *ctf_scanner_get_ast(struct ctf_scanner *scanner)
44 {
45 return scanner->ast;
46 }
47
48 int is_type(struct ctf_scanner *scanner, const char *id);
49
50 #endif /* _CTF_SCANNER_H */
This page took 0.030269 seconds and 4 git commands to generate.