diff --git a/include/picrin.h b/include/picrin.h index 6a7a946e..f3d54c10 100644 --- a/include/picrin.h +++ b/include/picrin.h @@ -71,6 +71,9 @@ typedef struct { pic_sym sQUASIQUOTE, sUNQUOTE, sUNQUOTE_SPLICING; pic_sym sDEFINE_SYNTAX, sDEFINE_MACRO; pic_sym sDEFINE_LIBRARY, sIMPORT, sEXPORT; + pic_sym sCONS, sCAR, sCDR, sNILP; + pic_sym sADD, sSUB, sMUL, sDIV; + pic_sym sEQ, sLT, sLE, sGT, sGE; struct xhash *sym_tbl; const char **sym_pool; diff --git a/src/state.c b/src/state.c index a7b987e8..a312ae2a 100644 --- a/src/state.c +++ b/src/state.c @@ -98,6 +98,19 @@ pic_open(int argc, char *argv[], char **envp) register_core_symbol(pic, sDEFINE_LIBRARY, "define-library"); register_core_symbol(pic, sIMPORT, "import"); register_core_symbol(pic, sEXPORT, "export"); + register_core_symbol(pic, sCONS, "cons"); + register_core_symbol(pic, sCAR, "car"); + register_core_symbol(pic, sCDR, "cdr"); + register_core_symbol(pic, sNILP, "null?"); + register_core_symbol(pic, sADD, "+"); + register_core_symbol(pic, sSUB, "-"); + register_core_symbol(pic, sMUL, "*"); + register_core_symbol(pic, sDIV, "/"); + register_core_symbol(pic, sEQ, "="); + register_core_symbol(pic, sLT, "<"); + register_core_symbol(pic, sLE, "<="); + register_core_symbol(pic, sGT, ">"); + register_core_symbol(pic, sGE, ">="); pic_gc_arena_restore(pic, ai); pic_init_core(pic);