#pragma once #include #include #include "Architecture.h" #include "Language.h" #include "Symbol.h" class Compiler { private: const Architecture *architecture; const Language *language; ehs::Array symbols; public: Compiler(); Compiler(const ehs::Str_8 &arch, const ehs::Str_8 &lang); Compiler(Compiler &&other) noexcept; Compiler(const Compiler &other); Compiler &operator=(Compiler &&other) noexcept; Compiler &operator=(const Compiler &other); ehs::Array Compile(const ehs::Str_8 &code) const; private: static bool IsSeparator(const ehs::Array &separators, const ehs::Char_8 *c); static bool IsPrimitive(const ehs::Array &primitives, const ehs::Str_8 &value); static bool IsKeyword(const ehs::Array &keywords, const ehs::Str_8 &value); static const Operator *IsOperator(const ehs::Array &operators, const ehs::Str_8 &value); Token ParseValue(const ehs::Array &primitives, const ehs::Array &keywords, const ehs::Array &operators, const ehs::Str_8 &value) const; ehs::Vector Parse(const ehs::Str_8 &code) const; };