python2ruby/src/scanner.hpp
2025-11-21 09:14:42 +01:00

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);