26 lines
397 B
C++
26 lines
397 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "AST/Def.h"
|
|
#include "parser.gen.h"
|
|
|
|
class ParserDriver
|
|
{
|
|
public:
|
|
ParserDriver() {}
|
|
~ParserDriver() { delete module; }
|
|
|
|
int parse(const std::string &input);
|
|
|
|
void startLexer();
|
|
void stopLexer();
|
|
|
|
std::string file;
|
|
yy::location location;
|
|
ast::Module *module;
|
|
};
|
|
|
|
#define YY_DECL yy::parser::symbol_type yylex(ParserDriver &driver)
|
|
YY_DECL;
|