/** * error.h * * Grendel: a compiling Beowulf reimplementation. * * The error handling subsystem. * * Error codes are detailed in section 6.3, page 32, of the * Lisp 1.5 Programmer's Manual. I shall in so far as possible follow * those codes. * * (c) 2026 Simon Brooke * Licensed under GPL version 2.0, or, at your option, any later version. */ #ifndef __grendel_error_h #define __grendel_error_h #include uint32_t make_error( char* code); /** * @brief error codes * * Error codes are detailed in section 6.3, page 32, of the * Lisp 1.5 Programmer's Manual. I shall in so far as possible follow * those codes. * * Error codes comprise a one or two alphabetic character category, followed * by a single digit number. A space is shown in the manual between the * category and the number, but I have not followed that here for reasons. */ #define APPLIED_FUNCTION_CALLED_ERROR (make_error( "A1")) #define UNDEFINED_FUNCTION_APPLY_ERROR (make_error( "A2")) #define COND_UNSATISFIED_ERROR (make_error( "A3")) #define SETQ_ON_NONEXISTANT_VAR_ERROR (make_error( "A4")) #define SET_ON_NONEXISTANT_VAR_ERROR (make_error( "A5")) #define NO_TARGET_FOR_GO_ERROR (make_error( "A6")) #define TOO_MANY_ARGUMENTS_ERROR (make_error( "A7")) #define UNBOUND_VARIABLE_ERROR (make_error( "A8")) #define UNDEFINED_FUNCTION_EVAL_ERROR (make_error( "A9")) #endif