Skip to content
Snippets Groups Projects
Commit a5f7dd26 authored by Franck Dary's avatar Franck Dary
Browse files

Added support for morpho tagging

parent bac54e14
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra -std=c++11")
set(CMAKE_CXX_FLAGS_DEBUG "-g3")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast")
include_directories(maca_common/include)
include_directories(tape_machine/include)
......
......@@ -45,6 +45,8 @@ int ActionSet::getActionIndex(const std::string & name)
if(!isDynamic)
{
fprintf(stderr, "ERROR (%s) : unknown action \'%s\'. Aborting.\n", ERRINFO, name.c_str());
fprintf(stderr, "AS :\n");
printForDebug(stderr);
exit(1);
}
......
......@@ -27,6 +27,8 @@ Oracle * Oracle::getOracle(const std::string & name, std::string filename)
fprintf(stderr, "ERROR (%s) : invalid oracle name \'%s\'. Aborting.\n", ERRINFO, name.c_str());
exit(1);
return nullptr;
}
......@@ -70,6 +72,15 @@ void Oracle::createDatabase()
return "WRITE 0 POS " + c.getTape("POS")[c.head];
})));
str2oracle.emplace("morpho", std::unique_ptr<Oracle>(new Oracle(
[](Oracle *)
{
},
[](Config & c, Oracle *)
{
return "WRITE 0 MORPHO " + c.getTape("MORPHO")[c.head];
})));
str2oracle.emplace("signature", std::unique_ptr<Oracle>(new Oracle(
[](Oracle * oracle)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment