This repository has been archived on 2024-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
pacciani/Scanner.hpp
2014-11-28 20:02:41 +01:00

31 lines
516 B
C++

#ifndef SCANNER_HPP
#define SCANNER_HPP
#ifndef yyFlexLexerOnce
#include <FlexLexer.h>
#endif
#include "Parser.hpp"
namespace monicelli {
class Scanner: public yyFlexLexer {
public:
Scanner(std::istream &in): yyFlexLexer(&in) {}
int yylex(Parser::semantic_type *lval, Parser::location_type *loc) {
this->lval = lval;
location = loc;
return yylex();
}
private:
int yylex();
Parser::semantic_type *lval;
Parser::location_type *location;
};
} // monicelli
#endif