(define (compiler exp)
(define (printer line) (display line) (newline))
(init-generators)
(let ((res (compile (append bootstrap (list exp)) function-res '())))
(map printer c-string-list)
(display bootstrap-c-code)
(add-c-function 'startup '(env) res)
(map (lambda (function) (map printer function) (newline)) c-function-list)
'ok))
,我需要
(define (compile file-name)
(compiler (load file-name)))
但它不以这种方式工作。它直接执行。我如何加载它作为表达式? (exp)
文件名的内容只是C++代码我只需要获得作为字符串(但只有现在我明白了)并解决:) – Cynede 2011-12-30 05:15:49