Typedefs | |
| typedef ptr< l_object > | lp |
| typedef ptr< l_atom > | lap |
| typedef list< srp< l_atom > >::iterator | lait |
| typedef ptr< l_object > | lp |
Functions | |
| ptr< l_object > | car (ptr< l_object > x) |
| ptr< l_object > | cdr (ptr< l_object > x) |
| ptr< l_object > | cons (ptr< l_object > a, ptr< l_object > d) |
| ptr< l_cons > | extra_cons (ptr< l_object > a, ptr< l_object > d) |
| lp | consp (lp x) |
| bool | endp (lp x) |
| lp | last_eval (lp x) |
| lp | list_eval (lp x) |
| lp | print (lp a) |
| ptr< l_object > | eval (ptr< l_object > x) |
| void | scan_string (lstring str) |
| void | yyparse () |
| int | run () |
| int | main (ptr< ::lestes::std::vector< lstring > > args) |
| int | yylex () |
| void | yyerror (lstring) |
Variables | |
| const char * | code |
| typedef list< srp < l_atom > >::iterator lestes::ui::lait |
| typedef ptr< l_atom > lestes::ui::lap |
| typedef ptr< l_object > lestes::ui::lp |
| typedef ptr< l_object > lestes::ui::lp |
| lp lestes::ui::car | ( | ptr< l_object > | x | ) |
| lp lestes::ui::cdr | ( | ptr< l_object > | x | ) |
| lp lestes::ui::cons | ( | ptr< l_object > | a, | |
| ptr< l_object > | d | |||
| ) |
| lp lestes::ui::consp | ( | lp | x | ) |
| bool lestes::ui::endp | ( | lp | x | ) |
Definition at line 64 of file interp.cc.
References consp().
Referenced by last_eval(), and list_eval().
00065 { 00066 return consp(x) == l_interpreter::nil_get(); 00067 }
| lp lestes::ui::eval | ( | ptr< l_object > | x | ) |
| ptr< l_cons > lestes::ui::extra_cons | ( | ptr< l_object > | a, | |
| ptr< l_object > | d | |||
| ) |
Definition at line 54 of file interp.cc.
Referenced by list_eval().
00055 { 00056 return l_cons::create(a, d); 00057 }
| lp lestes::ui::last_eval | ( | lp | x | ) |
| lp lestes::ui::list_eval | ( | lp | x | ) |
Definition at line 79 of file interp.cc.
References car(), cdr(), endp(), eval(), extra_cons(), and run().
00080 { 00081 ptr < l_cons > res, run, tmp; 00082 if (endp(x)) 00083 return eval(x); 00084 run = res = extra_cons(l_interpreter::nil_get(), l_interpreter::nil_get()); 00085 while (!endp(x)) { 00086 run->car_set(eval(car(x))); 00087 x = cdr(x); 00088 if (!endp(x)) { 00089 tmp = extra_cons(l_interpreter::nil_get(), l_interpreter::nil_get()); 00090 run->cdr_set(tmp); 00091 run = tmp; 00092 } 00093 } 00094 run->cdr_set(eval(x)); 00095 return res; 00096 }
| int lestes::ui::main | ( | ptr< ::lestes::std::vector< lstring > > | args | ) |
Definition at line 40 of file ui/main.cc.
00041 { 00042 vector<lstring>::iterator it = args->begin(); 00043 vector<lstring>::iterator end = args->end(); 00044 lstring progname = args->front(); 00045 ++it; 00046 00047 lstring as_filename = ""; 00048 lstring ss_filename = ""; 00049 00050 for ( ; it != end ; ++it) { 00051 if ((*it)[0] != '-') { 00052 tokeniser::input_set(istream_wrapper::create( 00053 new ::std::ifstream(it->c_str()), true)); 00054 goto name_was_set; 00055 } 00056 if (*it == "--dump-flat-as") { 00057 } 00058 } 00059 name_was_set: 00060 if (++it != end) { 00061 ::std::cerr << progname << ": extraneous argument: ``" << *it << "''\n"; 00062 exit(1); 00063 } 00064 return 0; 00065 }
| lp lestes::ui::print | ( | lp | a | ) |
| int lestes::ui::run | ( | void | ) |
Definition at line 65 of file interp.test.cc.
References code, scan_string(), and yyparse().
Referenced by lestes::std::mem::gc_test(), list_eval(), and main().
00066 { 00067 l_interpreter::init(); 00068 scan_string(code); 00069 yyparse(); 00070 }
| void lestes::ui::scan_string | ( | lstring | str | ) |
Referenced by run().
| int lestes::ui::yylex | ( | ) |
Referenced by lestes::lang::cplus::syn::source_streamer::next(), and lestes::lang::cplus::syn::yylex().
| void lestes::ui::yyparse | ( | ) |
| const char* lestes::ui::code |
Initial value:
" t nil ''t '(t) '(t . t)\n" " '(t t t nil a b c d e f) (set 'a 'b) a" " #'function #'car #'%fset" "\"aaa\"" "((lambda l l) a t nil)" "(%fset 'list (lambda l l))" "(list a t t a)" "((lambda (a b) b) a t)" "((macro (a b) (list 'quote a)) baalzabub)" "(%fset 'defmacro" " (macro (n a . b)" " (list '%fset (list 'quote n)" " (list 'macro a . b))))" "(%fset 'defun" " (macro (n a . b)" " (list '%fset (list 'quote n)" " (list 'lambda a . b))))" "(defun atom (x) (not (consp x)))" "(defun not (x) (eq x nil))" "(%fset 'endp 'atom)" "(cond)" "(cond ((eq t nil) 'a)" " (t 'b))" "(defmacro if (a b c) (list 'cond (list a b) (list t c)))"
Definition at line 36 of file interp.test.cc.
Referenced by lestes::md::mem::global_variable_allocator::emit_asm_declarations_for_initialized(), lestes::md::mem::global_variable_allocator::emit_asm_declarations_for_uninitialized(), lestes::backend_v2::workers::simple_spillgen::process(), run(), lestes::backend_v2::intercode::visitor_ge_operand2asm::visit_ge_operand_mem(), and lestes::backend_v2::intercode::visitor_ge_operand2asm::visit_ge_operand_reg().
1.5.1-20070107