#include #include "../turing.cpp" /** * @brief Replaces provided string with appriopriate Turing::Instruction * it takes 'l' character as a left move */ constexpr Turing::Instruction operator ""_i (const char* txt, const size_t len) { char cS = *txt++; char cV = *txt++; char nS = *txt++; char nV = *txt++; Turing::Movement mv = *txt++ == 'l' ? Turing::Movement::left : Turing::Movement::right; return Turing::Instruction(cS, cV, nS, nV, mv); }; // Replaces provided string with aprriopriate vector const std::vector operator ""_v (const char* txt, const size_t len) { auto rvalue = std::vector(len); for (int i = 0; i < len; i++) { rvalue[i] = *txt++; } return rvalue; }