Trying to build a forth runtime in C
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
/**
|
|
|
|
* Forth errors
|
|
|
|
*
|
|
|
|
* Created on 2021/11/13.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FORTH_FH_ERROR_H
|
|
|
|
#define FORTH_FH_ERROR_H
|
|
|
|
|
|
|
|
/** Error codes */
|
|
|
|
enum fh_error {
|
|
|
|
FH_OK = 0,
|
|
|
|
FH_ERR_CS_OVERFLOW,
|
|
|
|
FH_ERR_DS_OVERFLOW,
|
|
|
|
FH_ERR_RS_OVERFLOW,
|
|
|
|
FH_ERR_CS_UNDERFLOW,
|
|
|
|
FH_ERR_DS_UNDERFLOW,
|
|
|
|
FH_ERR_RS_UNDERFLOW,
|
|
|
|
FH_ERR_HEAP_FULL,
|
|
|
|
FH_ERR_DICT_FULL,
|
|
|
|
FH_ERR_COMPILE_FULL,
|
|
|
|
FH_ERR_NAME_TOO_LONG,
|
|
|
|
FH_ERR_INVALID_STATE,
|
|
|
|
FH_ERR_INTERNAL,
|
|
|
|
FH_ERR_UNKNOWN_WORD,
|
|
|
|
FH_ERR_ILLEGAL_FETCH,
|
|
|
|
FH_ERR_DIV_BY_ZERO,
|
|
|
|
FH_ERR_MAX,
|
|
|
|
};
|
|
|
|
|
|
|
|
const char *fherr_name(enum fh_error e);
|
|
|
|
|
|
|
|
#endif //FORTH_FH_ERROR_H
|