27 lines
566 B
C++
27 lines
566 B
C++
#ifndef MCALC_LEXER_BASE_H
|
|
#define MCALC_LEXER_BASE_H
|
|
|
|
#include <string_view>
|
|
|
|
#ifndef yyFlexLexerOnce
|
|
#include <FlexLexer.h>
|
|
#endif
|
|
|
|
#include <parser.h>
|
|
|
|
struct Scanner : public yyFlexLexer {
|
|
using value_type = yy::Parser::value_type;
|
|
using location_type = yy::Parser::location_type;
|
|
|
|
explicit Scanner(std::istream *in) : yyFlexLexer(in) {}
|
|
|
|
using FlexLexer::yylex;
|
|
virtual int yylex(value_type *lval, location_type * loc);
|
|
|
|
//double num{};
|
|
//std::string_view ident{};
|
|
//value_type *yylval = nullptr;
|
|
};
|
|
|
|
#endif //MCALC_LEXER_BASE_H
|