@verb #9611:":_eval" this none this rxdo #7165 @program #9611:":_eval" this none this {l} = args if (typeof(l) == $LIST) {op, args} = l "Special forms:" if (op == "lambda") return this:_create_lambda(args) elseif (op == "quote") return args elseif (op == "define") symbol = args[1] args = args[2] endif a = {} "Args get reversed here :-P" while (args) a = {this:_eval(args[1]), a} args = args[2] endwhile "Reverse them back" b = {} while (a) b = {a[1], b} a = a[2] endwhile if (typeof(op) == $LIST && (op[1] != E_TYPE || op[2] != "lambda")) op = this:_eval(op) elseif (typeof(op) == $STR) `op = this.stack[1]:find_var(op) ! E_VARNF' endif if (typeof(op) == $STR) if (op == "define") return this:_define({symbol, b}) else return this:("_" + op)(b) endif elseif (typeof(op) == $LIST && op[1] == E_TYPE && op[2] == "lambda") this.stack = {this.class.stack_frame_class:new(op[5]), @this.stack} while (op[3]) this:_define({op[3][1], {b[1]}}) op[3] = op[3][2] b = b[2] endwhile while (op[4]) ret = this:_eval(op[4][1]) op[4] = op[4][2] endwhile this.stack[1..1] = {} return ret else raise(E_TYPE) endif elseif (typeof(l) == $STR) if (l[1] == "\"") return l endif return this.stack[1]:find_var(l) else return l endif "Last modified by Dax (#789) on Tue May 3 13:55:58 2005 MDT." .