source: trunk/orbital/mesh-scanner.h @ 1419

Last change on this file since 1419 was 1419, checked in by sam, 11 years ago

orbital: a lot of scanner and parser refactoring to simplify the source
files and allow to build on MSVC soon.

File size: 869 bytes
Line 
1//
2// Orbital
3//
4// Copyright: (c) 2012 Various People
5//
6
7#ifndef EXAMPLE_SCANNER_H
8#define EXAMPLE_SCANNER_H
9
10#ifndef YY_DECL
11#   define YY_DECL orbital::MeshParser::token_type \
12        orbital::Scanner::lex(orbital::MeshParser::semantic_type* yylval, \
13                              orbital::MeshParser::location_type* yylloc)
14#endif
15
16#ifndef __FLEX_LEXER_H
17#   define yyFlexLexer MeshFlexLexer
18#   include "FlexLexer.h"
19#   undef yyFlexLexer
20#endif
21
22#include "generated/mesh-parser.h"
23
24namespace orbital {
25
26class Scanner : public MeshFlexLexer
27{
28public:
29    Scanner(char const *command);
30    virtual ~Scanner();
31    virtual int LexerInput(char* buf, int max_size);
32    virtual MeshParser::token_type lex(MeshParser::semantic_type* yylval,
33                                       MeshParser::location_type* yylloc);
34
35private:
36    char const *m_input;
37};
38
39}
40
41#endif
42
Note: See TracBrowser for help on using the repository browser.