18 lines
325 B
C++
18 lines
325 B
C++
#include "ParserCtx.hpp"
|
|
#include "../build/lexer.hpp"
|
|
#include "../build/parser.hpp"
|
|
|
|
ParserCtx::ParserCtx()
|
|
{
|
|
yylex_init(&lexer);
|
|
// yyset_in()
|
|
loc = new yy::location();
|
|
parser = new yy::Parser(lexer, *loc, *this);
|
|
}
|
|
|
|
ParserCtx::~ParserCtx()
|
|
{
|
|
yylex_destroy(lexer);
|
|
delete loc;
|
|
delete parser;
|
|
}
|