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
|
|
|
|
2019-08-09 08:21:56 -04:00
|
|
|
;(load "compiler.scm")
|
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))
|
2019-08-09 10:18:36 -04:00
|
|
|
(begin (print (compile-thunk (expand E)))
|
|
|
|
(princ "\n")
|
|
|
|
(next (read in)))))
|
2009-04-22 20:55:03 -04:00
|
|
|
(io.close in)))
|
|
|
|
|
|
|
|
(for-each (lambda (file)
|
2019-08-09 10:18:36 -04:00
|
|
|
(compile-file file))
|
|
|
|
(cdr *argv*))
|