Add source file headers to CTF lexer/parser
[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
12struct ctf_scanner {
13 yyscan_t scanner;
14 struct ctf_ast *ast;
15 struct scope root_scope;
16 struct scope *cs;
17 struct cds_list_head allocated_strings;
18};
19
20struct ctf_scanner *ctf_scanner_alloc(FILE *input);
21void ctf_scanner_free(struct ctf_scanner *scanner);
22int ctf_scanner_append_ast(struct ctf_scanner *scanner);
23
24static inline
25struct ctf_ast *ctf_scanner_get_ast(struct ctf_scanner *scanner)
26{
27 return scanner->ast;
28}
29
30int is_type(struct ctf_scanner *scanner, const char *id);
31
32#endif /* _CTF_SCANNER_H */
This page took 0.023814 seconds and 4 git commands to generate.