Move to kernel style SPDX license identifiers
[babeltrace.git] / src / plugins / ctf / common / metadata / scanner.h
... / ...
CommitLineData
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#include "common/macros.h"
12#include "ast.h"
13
14#ifndef YY_TYPEDEF_YY_SCANNER_T
15#define YY_TYPEDEF_YY_SCANNER_T
16typedef void* yyscan_t;
17#endif
18
19struct ctf_scanner_scope;
20struct ctf_scanner_scope {
21 struct ctf_scanner_scope *parent;
22 GHashTable *classes;
23};
24
25struct ctf_scanner {
26 yyscan_t scanner;
27 struct ctf_ast *ast;
28 struct ctf_scanner_scope root_scope;
29 struct ctf_scanner_scope *cs;
30 struct objstack *objstack;
31};
32
33BT_HIDDEN
34struct ctf_scanner *ctf_scanner_alloc(void);
35
36BT_HIDDEN
37void ctf_scanner_free(struct ctf_scanner *scanner);
38
39BT_HIDDEN
40int ctf_scanner_append_ast(struct ctf_scanner *scanner, FILE *input);
41
42static inline
43struct ctf_ast *ctf_scanner_get_ast(struct ctf_scanner *scanner)
44{
45 return scanner->ast;
46}
47
48BT_HIDDEN
49int is_type(struct ctf_scanner *scanner, const char *id);
50
51#endif /* _CTF_SCANNER_H */
This page took 0.022895 seconds and 4 git commands to generate.