stela/lexer.hpp

30 lines
519 B
C++
Raw Normal View History

#pragma once
#if !defined(yyFlexLexerOnce)
#undef yyFlexLexer
#define yyFlexLexer stela_FlexLexer
#include <FlexLexer.h>
#endif
#undef YY_DECL
#define YY_DECL stela::Parser::symbol_type stela::Lexer::next_token()
#include "parser.hpp"
namespace stela {
class Interpreter;
class Lexer : public yyFlexLexer {
public:
Lexer(Interpreter& interpreter) : interpreter(interpreter) {}
virtual ~Lexer() = default;
virtual stela::Parser::symbol_type next_token();
private:
Interpreter& interpreter;
};
}