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