2021-03-25 00:17:33 +01:00
|
|
|
/*
|
|
|
|
** Practice runtime header for Yab2Cpp
|
|
|
|
**
|
|
|
|
** by Samuel D. Crow
|
|
|
|
*/
|
|
|
|
#ifndef YAB_RUNTIME
|
2021-03-25 20:38:17 +01:00
|
|
|
#define YAB_RUNTIME
|
2021-03-25 00:17:33 +01:00
|
|
|
|
2021-03-25 20:38:17 +01:00
|
|
|
#include <string>
|
2021-03-25 00:17:33 +01:00
|
|
|
#include <cstdio>
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
enum STATES:unsigned int
|
|
|
|
{
|
|
|
|
EXIT,
|
|
|
|
UNDEFINED_STATE_ERROR,
|
2021-04-08 22:31:36 +02:00
|
|
|
STACK_UNDERFLOW_ERROR,
|
2021-03-25 00:17:33 +01:00
|
|
|
START
|
|
|
|
};
|
|
|
|
|
2021-04-08 22:31:36 +02:00
|
|
|
class subroutine
|
|
|
|
{
|
|
|
|
struct subroutine *called;
|
|
|
|
enum STATES ret;
|
|
|
|
|
|
|
|
public:
|
|
|
|
static enum STATES close();
|
|
|
|
subroutine(enum STATES r);
|
|
|
|
virtual ~subroutine()
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct subroutine *callStack;
|
|
|
|
|
2021-03-25 00:17:33 +01:00
|
|
|
/* function prototype */
|
|
|
|
unsigned int run();
|
|
|
|
|
|
|
|
#endif
|