4 ; returns (os filename)
7 (if (null? x) host-os ; todo: replace this with the os
10 (or (equal? (car x) "-t")
11 (equal? (car x) "--target"))
15 (else (error #f "unknown os")))
17 (define (parse-file x)
20 (or (equal? (car x) "-t")
21 (equal? (car x) "--target"))
24 (let ((args (cdr (command-line))))
25 (list (parse-os args) (parse-file args))))
28 (define target (car (parse-args)))
29 (define file (cadr (parse-args)))
31 (define (read-prog port)
32 (if (port-input-empty? port)
34 (cons (read) (read-prog port))))
37 (if (eqv? file 'stdin)
38 (read-prog (current-input-port))
39 (call-with-input-file file read-prog))