This commit is contained in:
bronku 2025-11-18 15:36:34 +01:00
commit 080d115e17
6 changed files with 202 additions and 0 deletions

22
src/ParserCtx.cpp Normal file
View file

@ -0,0 +1,22 @@
#include "ParserCtx.hpp"
#include "../build/lexer.hpp"
#include "../build/parser.hpp"
namespace Elite
{
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;
}
} // namespace Elite