cecko
ckbisonflex.hpp
1 /*
2 
3 bisonflex.hpp
4 
5 common interfaces for Flex and Bison
6 
7 */
8 
9 #ifndef CECKO_BISONFLEX_GUARD__
10 #define CECKO_BISONFLEX_GUARD__
11 
12 #include <cstdio>
13 
14 #include "ckcontext.hpp"
15 
16 // define the macro for Flex ...
17 #define YY_DECL \
18  cecko::parser::symbol_type yylex(yyscan_t yyscanner, cecko::context * ctx)
19 // ... and declare the function
20 
21 /* An opaque pointer. - taken from generated Flex file */
22 #ifndef YY_TYPEDEF_YY_SCANNER_T
23 #define YY_TYPEDEF_YY_SCANNER_T
24 typedef void* yyscan_t;
25 #endif
26 
27 #define STRINGIZE(n) #n
28 #define INCLUDE_WRAP(n) STRINGIZE(n)
29 
30 namespace cecko {
31  yyscan_t lexer_init(FILE * iff);
32  void lexer_shutdown(yyscan_t scanner);
33 }
34 
35 #endif