2009-04-22 20:55:03 -04:00
|
|
|
; -*- scheme -*-
|
|
|
|
|
2009-08-02 00:06:07 -04:00
|
|
|
(if (not (bound? 'top-level-value)) (set! top-level-value %eval))
|
|
|
|
(if (not (bound? 'set-top-level-value!)) (set! set-top-level-value! set))
|
2009-08-12 00:56:32 -04:00
|
|
|
(if (not (bound? 'eof-object?)) (set! eof-object? (lambda (x) #f)))
|
2009-04-22 20:55:03 -04:00
|
|
|
|
2009-07-10 00:17:39 -04:00
|
|
|
;(load "compiler.lsp")
|
2009-04-22 20:55:03 -04:00
|
|
|
|
|
|
|
(define (compile-file inf)
|
|
|
|
(let ((in (file inf :read)))
|
|
|
|
(let next ((E (read in)))
|
|
|
|
(if (not (io.eof? in))
|
|
|
|
(begin (print (compile-thunk (expand E)))
|
|
|
|
(princ "\n")
|
|
|
|
(next (read in)))))
|
|
|
|
(io.close in)))
|
|
|
|
|
|
|
|
(for-each (lambda (file)
|
|
|
|
(compile-file file))
|
|
|
|
(cdr *argv*))
|