Yab2Cpp/runtime/runtime.h
2021-04-16 18:56:10 -05:00

39 lines
549 B
C++

/*
** Practice runtime header for Yab2Cpp
**
** by Samuel D. Crow
*/
#ifndef YAB_RUNTIME
#define YAB_RUNTIME
#include <string>
#include <cstdio>
using namespace std;
enum STATES:unsigned int
{
EXIT,
UNDEFINED_STATE_ERROR,
STACK_UNDERFLOW_ERROR,
START
};
class subroutine
{
struct subroutine *called;
unsigned int ret;
public:
static unsigned int close();
subroutine(unsigned int r);
virtual ~subroutine()
{}
};
extern struct subroutine *callStack;
/* function prototype */
unsigned int run();
#endif