python2ruby/src/ParserCtx.cpp
2025-11-20 14:22:16 +01:00

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;
}