MCalc/include/lexer_base.h

27 lines
566 B
C
Raw Permalink Normal View History

2023-08-19 15:23:23 +00:00
#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