/* * Wicca - a Public Domain Wicca interpreter * * Version ALPHA * * NAMESPACE: WCA_ / wca_ * */ /* * limits */ #define WCA_MAX_NORMAL_VARIABLES 128 #define WCA_MAX_LITERALS 512 #define WCA_MAX_MAGIC_VARIABLES 16 #define WCA_MAGIC_VARIABLE_NAME_SIZE 32 /* function name size */ #define WCA_FUNCTION_NAME_SIZE 32 /* max. number of functions */ #define WCA_MAX_FUNCTIONS 64 /* variable / literal size limit */ #define WCA_STORAGE_BLOCK_SIZE 128 /* variable name size */ #define WCA_VARIABLE_NAME_SIZE 32 /* maximal number of instructions per program */ #define WCA_MAX_INSTRUCTIONS 4096 /* maximal conditional / loop nesting depth */ #define WCA_MAX_DEPTH 16 /* max. WCA_NUMBER digits */ #define WCA_NUMBER_MAX_DIGITS 31 /* expr function stack size */ #define WCA_EXPR_STACK_SIZE 16 /* NIL value */ #define WCA_NIL -1 /* * types */ typedef char WCA_CHAR; typedef int WCA_NUMBER; typedef int WCA_STORAGE_INDEX; void wca_start(void); void wca_end(void); void wca_add_function(const WCA_CHAR *, void (*)(void) ); bool wca_run(const WCA_CHAR *); bool wca_load(const WCA_CHAR *); void wca_execute(void); const WCA_STORAGE_INDEX * wca_call_parameters(void); WCA_NUMBER wca_number(WCA_STORAGE_INDEX); const WCA_CHAR * wca_string(WCA_STORAGE_INDEX); void wca_store_number(WCA_STORAGE_INDEX, WCA_NUMBER ); void wca_store_string(WCA_STORAGE_INDEX, const WCA_CHAR * ); WCA_STORAGE_INDEX wca_magic_variable(const WCA_CHAR *); void wca_magic_variable_add(const WCA_CHAR *); void wca_magic_variable_set(const WCA_CHAR *, const WCA_CHAR * );