plsm-cpp/compiler/include/ParserDriver.h
2024-02-27 08:45:58 +01:00

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;