ctf: make ctf scanner symbols hidden
[babeltrace.git] / src / plugins / ctf / common / metadata / scanner.h
CommitLineData
e98a2d6e
PP
1#ifndef _CTF_SCANNER_H
2#define _CTF_SCANNER_H
3
4/*
5 * ctf-scanner.h
6 *
7 * Copyright 2011-2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a copy
10 * of this software and associated documentation files (the "Software"), to deal
11 * in the Software without restriction, including without limitation the rights
12 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 * copies of the Software, and to permit persons to whom the Software is
14 * furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
18 */
19
20#include <stdio.h>
91d81473 21#include "common/macros.h"
06a626b8 22#include "ast.h"
e98a2d6e
PP
23
24#ifndef YY_TYPEDEF_YY_SCANNER_T
25#define YY_TYPEDEF_YY_SCANNER_T
26typedef void* yyscan_t;
27#endif
28
29struct ctf_scanner_scope;
30struct ctf_scanner_scope {
31 struct ctf_scanner_scope *parent;
5cd6d0e5 32 GHashTable *classes;
e98a2d6e
PP
33};
34
35struct ctf_scanner {
36 yyscan_t scanner;
37 struct ctf_ast *ast;
38 struct ctf_scanner_scope root_scope;
39 struct ctf_scanner_scope *cs;
40 struct objstack *objstack;
41};
42
d07cfd1a 43BT_HIDDEN
e98a2d6e 44struct ctf_scanner *ctf_scanner_alloc(void);
d07cfd1a
SM
45
46BT_HIDDEN
e98a2d6e 47void ctf_scanner_free(struct ctf_scanner *scanner);
d07cfd1a
SM
48
49BT_HIDDEN
e98a2d6e
PP
50int ctf_scanner_append_ast(struct ctf_scanner *scanner, FILE *input);
51
52static inline
53struct ctf_ast *ctf_scanner_get_ast(struct ctf_scanner *scanner)
54{
55 return scanner->ast;
56}
57
58BT_HIDDEN
59int is_type(struct ctf_scanner *scanner, const char *id);
60
61#endif /* _CTF_SCANNER_H */
This page took 0.068488 seconds and 4 git commands to generate.