//////////////////////////////////////////////////////////////// //and & or expressions /////////////////////////////////////////////////////////////// static cellpoint is_and(cellpoint exp) { reg = exp; args_push(make_symbol("and")); args_push(reg); return is_tagged_list(); }
/////////////////////////////////////////////////////////////////// //let* expression /////////////////////////////////////////////////////////////////// static cellpoint is_letstar(cellpoint exp) { reg = exp; args_push(make_symbol("let*")); args_push(reg); return is_tagged_list(); }
/////////////////////////////////////////////////////////////// //definition //format: (define <var> <value>) or // (define (var <formals>) <body>) ////////////////////////////////////////////////////////////// static cellpoint is_definition(cellpoint exp) { reg = exp; args_push(make_symbol("define")); args_push(reg); reg = is_tagged_list(); return reg; }
////////////////////////////////////////////////////////// //lambda //format: (lambda <formal> <body>) ////////////////////////////////////////////////////////// static cellpoint is_lambda(cellpoint exp) { reg = exp; args_push(make_symbol("lambda")); args_push(reg); reg = is_tagged_list(); return reg; }
////////////////////////////////////////////////////// //quotation //format: (quote <datum>) ////////////////////////////////////////////////////// static cellpoint is_quoted(cellpoint exp) { reg = exp; args_push(make_symbol("quote")); args_push(reg); reg = is_tagged_list(); return reg; }
///////////////////////////////////////////////////////////////// //begin //format: (begin <exps>) ///////////////////////////////////////////////////////////////// static cellpoint is_begin(cellpoint exp) { reg = exp; args_push(make_symbol("begin")); args_push(reg); reg = is_tagged_list(); return reg; }
///////////////////////////////////////////////////// //assignment //format: (set! <var> <value>) ///////////////////////////////////////////////////// static cellpoint is_assignment(cellpoint exp) { reg = exp; args_push(make_symbol("set!")); args_push(reg); reg = is_tagged_list(); return reg; }
bool is_assignment(object *exp) { return is_tagged_list(exp, set_symbol()); }
bool is_or(object *exp) { return is_tagged_list(exp, or_symbol()); }
char is_let(object *exp) { return is_tagged_list(exp, let_symbol()); }
bool is_if(object *exp) { return is_tagged_list(exp, if_symbol()); }
static inline int is_or(object *exp) { return is_tagged_list(exp, lookup_symbol("or")); }
static inline int is_begin(object *exp) { return is_tagged_list(exp, lookup_symbol("begin")); }
static int is_begin(pSlip gd, pSlipObject exp) { return is_tagged_list(exp, gd->singleton_Begin); }
static int is_if(pSlip gd, pSlipObject expression) { return is_tagged_list(expression, gd->singleton_IFSymbol); }
static inline int is_definition(object *exp) { return is_tagged_list(exp, lookup_symbol("define")); }
static inline int is_cond(object *exp) { return is_tagged_list(exp, lookup_symbol("cond")); }
static int is_cond(pSlip gd, pSlipObject exp) { return is_tagged_list(exp, gd->singleton_Cond); }
static inline int is_lambda(object *exp) { return is_tagged_list(exp, lookup_symbol("lambda")); }
char is_lambda(object *exp) { return is_tagged_list(exp, lambda_symbol); }
char is_cond(object *exp) { return is_tagged_list(exp, cond_symbol()); }
char is_if(object *exp) { return is_tagged_list(exp, if_symbol); }
bool is_begin(object *exp) { return is_tagged_list(exp, begin_symbol()); }
char is_and(object *exp) { return is_tagged_list(exp, and_symbol); }
bool is_and(object *exp) { return is_tagged_list(exp, and_symbol()); }
char is_or(object *exp) { return is_tagged_list(exp, or_symbol); }
bool is_quoted(object *expression) { return is_tagged_list(expression, quote_symbol()); }
static inline int is_quoted(object *exp) { return is_tagged_list(exp, lookup_symbol("quote")); }
bool is_definition(object *exp) { return is_tagged_list(exp, define_symbol()); }
static inline int is_assignment(object *exp) { return is_tagged_list(exp, lookup_symbol("set!")); }