removed namespace

This commit is contained in:
bronku 2025-11-20 14:22:16 +01:00
parent 36396e97e9
commit 7e7d2a45b5
4 changed files with 24 additions and 33 deletions

View file

@ -1,8 +1,6 @@
#include "ParserCtx.hpp"
#include "../build/lexer.hpp"
#include "../build/parser.hpp"
namespace Elite
{
ParserCtx::ParserCtx()
{
@ -18,5 +16,3 @@ namespace Elite
delete loc;
delete parser;
}
} // namespace Elite

View file

@ -6,9 +6,6 @@ namespace yy
class location;
}
namespace Elite
{
class ParserCtx
{
public:
@ -19,5 +16,3 @@ namespace Elite
yy::location *loc;
yy::Parser *parser;
};
} // namespace Elite

View file

@ -7,7 +7,7 @@
yy::Parser::symbol_type yylex(yyscan_t yyscanner, yy::location &loc);
void dump_tokens(Elite::ParserCtx &ctx)
void dump_tokens(ParserCtx &ctx)
{
while (true)
{
@ -28,7 +28,7 @@ void dump_tokens(Elite::ParserCtx &ctx)
int main(int argc, char *argv[])
{
Elite::ParserCtx ctx;
ParserCtx ctx;
Configuration config(argc, argv);
if (!config.valid)
{

View file

@ -32,7 +32,7 @@ yy::Parser::symbol_type yylex(void* yyscanner, yy::location& loc);
* provides a simple but effective pure interface, not relying on global
* variables. */
%lex-param {void *scanner} {yy::location& loc}
%parse-param {void *scanner} {yy::location& loc} { class Elite::ParserCtx& ctx }
%parse-param {void *scanner} {yy::location& loc} { class ParserCtx& ctx }