Add 'xo-interpreter/' from commit '5d1b5e2ebb'
git-subtree-dir: xo-interpreter git-subtree-mainline:c3e96bee00git-subtree-split:5d1b5e2ebb
This commit is contained in:
commit
9969804845
3 changed files with 48 additions and 0 deletions
1
xo-interpreter/README.md
Normal file
1
xo-interpreter/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
# xo-interpreter
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/** @file VirtualSchematikaMachine.hpp **/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "VmInstr.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @class VirtualSchematikaMachine
|
||||
* @brief Virtual machine implementing a Schematika interpreter
|
||||
**/
|
||||
class VirtualSchematikaMachine {
|
||||
public:
|
||||
private:
|
||||
};
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end VirtualSchematikaMachine.hpp */
|
||||
28
xo-interpreter/include/xo/interpreter/VmInstr.hpp
Normal file
28
xo-interpreter/include/xo/interpreter/VmInstr.hpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/** @file VmInstr.hpp **/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
class VirtualSchematikaMachine; // see VirtualSchematikaMachine.hpp
|
||||
|
||||
/** @class VmInstr
|
||||
* @brief Represent a particular vritual schematika machine instruction
|
||||
*
|
||||
* A vsm instruction acts on a virtual schematika machine instance.
|
||||
**/
|
||||
class VmInstr
|
||||
{
|
||||
public:
|
||||
using ActionFn = void (*)(VirtualSchematikaMachine * vm);
|
||||
|
||||
private:
|
||||
std::string name_;
|
||||
ActionFn action_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/* end VmInstr.hpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue