3 #ifndef _PLANG_SCANNER_H 4 #define _PLANG_SCANNER_H 6 #if ! defined(yyFlexLexerOnce) 14 #include "util/plang/plang.h" 15 #include "util/plang/plang_parser.hh" 20 Scanner(std::istream *in) : yyFlexLexer(in) {
21 loc_.reset(
new plang::Parser::location_type());
25 Parser::semantic_type lval;
26 Parser::location_type location;
27 return parser_lex(&lval, &location);
30 int parser_lex( Parser::semantic_type *
const lval,
31 Parser::location_type *location);
33 std::string matched() {
return yytext; }
35 Parser::location_type *loc() {
return &*loc_; }
38 std::unique_ptr<plang::Parser::location_type> loc_;