Exemple #1
0
void init_logical(void) {
	define_primop("eq?",primop_eq_p,2,2);
	define_primop("eqv?",primop_eqv_p,2,2);
	define_primop("equal?", primop_equal_p,2,2);
	define_primop_inline("not", primop_not,1,OPCODE_NOT);
	/*	define_primop("not", primop_not,1,1);*/
	define_primop("boolean?",primop_boolean_p,1,1);
}
Exemple #2
0
void init_table(void) {
    define_primop("system:table?",primop_table_p,1,1);
    define_primop("system:make-table",primop_make_table,0,1);
    define_primop("system:table",primop_table,0,MAX_ARGC);
    define_primop("system:table-count",primop_table_count,1,1);
    define_primop("system:set-table-type!",primop_set_table_tag,2,2);
    define_primop("system:table-get",primop_table_get,2,2);
    define_primop("system:table-put!",primop_table_put,3,3);
    define_primop("system:table-ref",primop_table_ref,2,2);
    define_primop("system:table-set!",primop_table_set,3,3);
}
Exemple #3
0
void init_string(void) {
	define_primop("string?",primop_string_p,1,1);
	define_primop("make-string",primop_make_string,1,2);
	define_primop("string", primop_string, 0, MAX_ARGC);
	define_primop("string-length", primop_string_length,1,1);
	define_primop("string=?", primop_string_eq,2,2);
	define_primop("string<?", primop_string_lt,2,2);
	define_primop("string<=?", primop_string_le,2,2);
	define_primop("string>?", primop_string_gt,2,2);
	define_primop("string>=?", primop_string_ge,2,2);
	define_primop("string-ci=?", primop_string_ci_eq,2,2);
	define_primop("string-ci<?", primop_string_ci_lt,2,2);
	define_primop("string-ci<=?", primop_string_ci_le,2,2);
	define_primop("string-ci>?", primop_string_ci_gt,2,2);
	define_primop("string-ci>=?", primop_string_ci_ge,2,2);
	define_primop("string-ref", primop_string_ref,2,2);
	define_primop("string-set!", primop_string_set,3,3);
	define_primop("substring", primop_substring,3,3);
	define_primop("system:substring-index", primop_substring_ix,2,2);
	define_primop("string-append", primop_string_append, 0, MAX_ARGC);
	define_primop("string->list", primop_string_to_list,1,1);
	define_primop("list->string", primop_list_to_string,1,1);
	define_primop("char?", primop_character_p,1,1);
	define_primop("char=?",primop_char_eq_p,2,2);
	define_primop("char<?",primop_char_lt_p,2,2);
	define_primop("char>?",primop_char_gt_p,2,2);
	define_primop("char<=?",primop_char_le_p,2,2);
	define_primop("char>=?",primop_char_ge_p,2,2);
	define_primop("char-ci=?",primop_char_ci_eq_p,2,2);
	define_primop("char-ci<?",primop_char_ci_lt_p,2,2);
	define_primop("char-ci>?",primop_char_ci_gt_p,2,2);
	define_primop("char-ci<=?",primop_char_ci_le_p,2,2);
	define_primop("char-ci>=?",primop_char_ci_ge_p,2,2);
	define_primop("char-alphabetic?", primop_char_alphabetic_p,1,1);
	define_primop("char-numeric?",primop_char_numeric_p,1,1);
	define_primop("char-whitespace?",primop_char_whitespace_p,1,1);
	define_primop("char-upper-case?",primop_char_upper_case_p,1,1);
	define_primop("char-lower-case?",primop_char_lower_case_p,1,1);
	define_primop("char-upcase", primop_char_upcase,1,1);
	define_primop("char-downcase", primop_char_downcase,1,1);
	define_primop("char->integer",primop_char_to_integer,1,1);
	define_primop("integer->char",primop_integer_to_char,1,1);
}
Exemple #4
0
void init_procedure(void) {
	define_primop("procedure?", primop_procedure_p,1,1);
}