29 lines
No EOL
548 B
C++
29 lines
No EOL
548 B
C++
#pragma once
|
|
|
|
// fucking piece of shit flex, doesn't even have proper macro directives
|
|
#ifndef yyFlexLexer
|
|
#include <FlexLexer.h>
|
|
#endif
|
|
|
|
#include "../build/parser.hpp"
|
|
#include <string>
|
|
|
|
class yyFlexLexer;
|
|
|
|
class Scanner : public yyFlexLexer
|
|
{
|
|
public:
|
|
Scanner(std::istream *in) : yyFlexLexer(in) {}
|
|
|
|
int lex(yy::parser::semantic_type *yylval)
|
|
{
|
|
this->yylval = yylval;
|
|
return yylex();
|
|
}
|
|
|
|
private:
|
|
virtual int yylex();
|
|
yy::parser::semantic_type *yylval;
|
|
};
|
|
|
|
int scanner_lex(yy::parser::semantic_type *yylval); |