123456789101112131415161718 |
- (define (print0 port)
- (lambda (s)
- (display:port s port)
- (display:port (integer->char 0) port)))
- (define (compile-and-run exp)
- (let ((p (vm:open)))
- (display ">>> ")
- (compile exp #f p '(halt))
- (print `(result ,(vm:finish p)))))
- (load-macros)
- (let ((code (read-s* (tokenize standard-input))))
- (for-each compile-and-run code))
- (print 'completed)
|