rename module

This commit is contained in:
xensik 2022-08-23 13:48:57 +02:00
parent 797b4e055d
commit 6efacd1ef2
20 changed files with 57 additions and 57 deletions

View File

@ -4,9 +4,9 @@
// that can be found in the LICENSE file.
#include "stdafx.hpp"
#include "iw5_console.hpp"
#include "iw5c.hpp"
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
auto assembler::output_script() -> std::vector<std::uint8_t>
@ -574,4 +574,4 @@ auto assembler::resolve_label(const std::string& name) -> std::int32_t
throw asm_error("couldn't resolve label address of '" + name + "'!");
}
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -5,7 +5,7 @@
#pragma once
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
class assembler : public gsc::assembler
@ -37,4 +37,4 @@ private:
auto resolve_label(const std::string& name) -> std::int32_t;
};
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -4,11 +4,11 @@
// that can be found in the LICENSE file.
#include "stdafx.hpp"
#include "iw5_console.hpp"
#include "iw5c.hpp"
#include "parser.hpp"
#include "lexer.hpp"
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
auto compiler::output() -> std::vector<function::ptr>
@ -3633,4 +3633,4 @@ void compiler::print_label(const std::string& label)
printf(" %s\n", label.data());
}
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -5,7 +5,7 @@
#pragma once
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
enum class opcode : std::uint8_t;
@ -167,4 +167,4 @@ private:
void print_label(const std::string& label);
};
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -4,9 +4,9 @@
// that can be found in the LICENSE file.
#include "stdafx.hpp"
#include "iw5_console.hpp"
#include "iw5c.hpp"
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
void context::init(build mode, read_cb_type callback)
@ -20,4 +20,4 @@ void context::cleanup()
resolver::cleanup();
}
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -5,15 +5,15 @@
#pragma once
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
class context : public gsc::context
{
iw5_console::assembler assembler_;
iw5_console::disassembler disassembler_;
iw5_console::compiler compiler_;
iw5_console::decompiler decompiler_;
iw5c::assembler assembler_;
iw5c::disassembler disassembler_;
iw5c::compiler compiler_;
iw5c::decompiler decompiler_;
public:
void init(build mode, read_cb_type callback);
@ -25,4 +25,4 @@ public:
auto decompiler() -> gsc::decompiler& { return decompiler_; }
};
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -4,9 +4,9 @@
// that can be found in the LICENSE file.
#include "stdafx.hpp"
#include "iw5_console.hpp"
#include "iw5c.hpp"
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
auto decompiler::output() -> std::vector<std::uint8_t>
@ -3433,4 +3433,4 @@ void decompiler::process_var_remove(const ast::asm_remove::ptr& expr, const bloc
blk->local_vars_public_count = static_cast<std::uint32_t>(blk->local_vars.size() - std::stoi(expr->index));
}
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -5,7 +5,7 @@
#pragma once
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
class decompiler : public gsc::decompiler
@ -98,4 +98,4 @@ private:
void process_var_remove(const ast::asm_remove::ptr& expr, const block::ptr& blk);
};
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -4,9 +4,9 @@
// that can be found in the LICENSE file.
#include "stdafx.hpp"
#include "iw5_console.hpp"
#include "iw5c.hpp"
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
auto disassembler::output() -> std::vector<function::ptr>
@ -576,4 +576,4 @@ void disassembler::print_instruction(const instruction::ptr& inst)
}
}
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -5,7 +5,7 @@
#pragma once
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
class disassembler : public gsc::disassembler
@ -39,4 +39,4 @@ private:
void print_instruction(const instruction::ptr& inst);
};
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -4,9 +4,9 @@
// that can be found in the LICENSE file.
#include "stdafx.hpp"
#include "iw5_console.hpp"
#include "iw5c.hpp"
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
auto opcode_size(std::uint8_t id) -> std::uint32_t
@ -176,4 +176,4 @@ auto opcode_size(std::uint8_t id) -> std::uint32_t
}
}
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -14,7 +14,7 @@
#include "resolver.hpp"
#include "context.hpp"
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
constexpr std::uint16_t max_string_id = 0x8250;
@ -179,4 +179,4 @@ enum class opcode : std::uint8_t
auto opcode_size(std::uint8_t id) -> std::uint32_t;
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -4,16 +4,16 @@
// that can be found in the LICENSE file.
#include "stdafx.hpp"
#include "iw5_console.hpp"
#include "iw5c.hpp"
#include "parser.hpp"
#include "lexer.hpp"
xsk::gsc::iw5_console::parser::symbol_type IW5Clex(xsk::gsc::iw5_console::lexer& lexer)
xsk::gsc::iw5c::parser::symbol_type IW5Clex(xsk::gsc::iw5c::lexer& lexer)
{
return lexer.lex();
}
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
const std::unordered_map<std::string_view, parser::token::token_kind_type> keyword_map
@ -845,4 +845,4 @@ void lexer::preprocessor_run(parser::token::token_kind_type token)
}
}
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -5,7 +5,7 @@
#pragma once
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
constexpr size_t max_buf_size = 0x2000;
@ -75,4 +75,4 @@ private:
void preprocessor_run(parser::token::token_kind_type token);
};
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c

View File

@ -41,7 +41,7 @@
#include "parser.hpp"
#include "lexer.hpp"
using namespace xsk::gsc;
xsk::gsc::iw5_console::parser::symbol_type IW5lex(xsk::gsc::iw5_console::lexer& lexer);
xsk::gsc::iw5c::parser::symbol_type IW5Clex(xsk::gsc::iw5c::lexer& lexer);
#line 47 "parser.cpp"
@ -144,11 +144,11 @@ xsk::gsc::iw5_console::parser::symbol_type IW5lex(xsk::gsc::iw5_console::lexer&
#define YYRECOVERING() (!!yyerrstatus_)
#line 13 "parser.ypp"
namespace xsk { namespace gsc { namespace iw5_console {
namespace xsk { namespace gsc { namespace iw5c {
#line 149 "parser.cpp"
/// Build a parser object.
parser::parser (xsk::gsc::iw5_console::lexer& lexer_yyarg, xsk::gsc::ast::program::ptr& ast_yyarg)
parser::parser (xsk::gsc::iw5c::lexer& lexer_yyarg, xsk::gsc::ast::program::ptr& ast_yyarg)
#if IW5CDEBUG
: yydebug_ (false),
yycdebug_ (&std::cerr),
@ -4656,13 +4656,13 @@ namespace xsk { namespace gsc { namespace iw5_console {
#line 13 "parser.ypp"
} } } // xsk::gsc::iw5_console
} } } // xsk::gsc::iw5c
#line 4661 "parser.cpp"
#line 883 "parser.ypp"
void xsk::gsc::iw5_console::parser::error(const xsk::gsc::location& loc, const std::string& msg)
void xsk::gsc::iw5c::parser::error(const xsk::gsc::location& loc, const std::string& msg)
{
throw xsk::gsc::comp_error(loc, msg);
}

View File

@ -33,7 +33,7 @@
/**
** \file parser.hpp
** Define the xsk::gsc::iw5_console::parser class.
** Define the xsk::gsc::iw5c::parser class.
*/
// C++ LALR(1) parser skeleton written by Akim Demaille.
@ -51,8 +51,8 @@
#pragma warning(disable:4065)
#pragma warning(disable:4127)
#endif
#include "iw5_console.hpp"
namespace xsk::gsc::iw5_console { class lexer; }
#include "iw5c.hpp"
namespace xsk::gsc::iw5c { class lexer; }
#line 58 "parser.hpp"
@ -202,7 +202,7 @@ namespace xsk::gsc::iw5_console { class lexer; }
#endif /* ! defined IW5CDEBUG */
#line 13 "parser.ypp"
namespace xsk { namespace gsc { namespace iw5_console {
namespace xsk { namespace gsc { namespace iw5c {
#line 207 "parser.hpp"
@ -2761,7 +2761,7 @@ switch (yykind)
};
/// Build a parser object.
parser (xsk::gsc::iw5_console::lexer& lexer_yyarg, xsk::gsc::ast::program::ptr& ast_yyarg);
parser (xsk::gsc::iw5c::lexer& lexer_yyarg, xsk::gsc::ast::program::ptr& ast_yyarg);
virtual ~parser ();
#if 201103L <= YY_CPLUSPLUS
@ -4837,7 +4837,7 @@ switch (yykind)
// User arguments.
xsk::gsc::iw5_console::lexer& lexer;
xsk::gsc::iw5c::lexer& lexer;
xsk::gsc::ast::program::ptr& ast;
};
@ -5541,7 +5541,7 @@ switch (yykind)
#line 13 "parser.ypp"
} } } // xsk::gsc::iw5_console
} } } // xsk::gsc::iw5c
#line 5546 "parser.hpp"

View File

@ -4,14 +4,14 @@
// that can be found in the LICENSE file.
#include "stdafx.hpp"
#include "iw5_console.hpp"
#include "iw5c.hpp"
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4244)
#endif
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
std::unordered_map<std::uint8_t, std::string_view> opcode_map;
@ -1773,7 +1773,7 @@ struct __init__
__init__ _;
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c
#ifdef _MSC_VER
#pragma warning(pop)

View File

@ -5,7 +5,7 @@
#pragma once
namespace xsk::gsc::iw5_console
namespace xsk::gsc::iw5c
{
class resolver
@ -37,4 +37,4 @@ public:
static auto fs_to_game_path(const std::filesystem::path& file) -> std::filesystem::path;
};
} // namespace xsk::gsc::iw5_console
} // namespace xsk::gsc::iw5c