2025-11-23 18:34:30 +11:00
|
|
|
#ifndef INTERPRETER_H
|
|
|
|
|
#define INTERPRETER_H
|
2025-11-23 19:18:10 +11:00
|
|
|
#define MAX_ID_LEN 64
|
2025-11-23 18:34:30 +11:00
|
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
#include "parser.h"
|
|
|
|
|
#include "include/uthash.h"
|
|
|
|
|
|
|
|
|
|
typedef enum GroundRuntimeError {
|
2025-11-23 19:18:10 +11:00
|
|
|
ARG_TYPE_MISMATCH, TOO_FEW_ARGS, TOO_MANY_ARGS, UNKNOWN_LABEL, FIXME
|
2025-11-23 18:34:30 +11:00
|
|
|
} GroundRuntimeError;
|
|
|
|
|
|
|
|
|
|
typedef struct GroundLabel {
|
2025-11-23 19:18:10 +11:00
|
|
|
char id[MAX_ID_LEN];
|
|
|
|
|
int lineNum;
|
|
|
|
|
UT_hash_handle hh;
|
2025-11-23 18:34:30 +11:00
|
|
|
} GroundLabel;
|
|
|
|
|
|
|
|
|
|
void interpretGroundProgram(GroundProgram* in);
|
|
|
|
|
void interpretGroundInstruction(GroundInstruction* in);
|
|
|
|
|
#endif
|