forgot to change mztext to use a plain namespace too; made evaluations use read-syntax for general karma

svn: r8816
This commit is contained in:
Eli Barzilay 2008-02-27 14:31:14 +00:00
parent f7042d063a
commit eff876671d
5 changed files with 8 additions and 8 deletions

View File

@ -21,7 +21,7 @@
#:multi
[("-E" "--eval") expr "evaluates <expr> before processing starts"
(parameterize ([read-case-sensitive #t])
(add-eval (read (open-input-string expr))))]
(add-eval (read-syntax 'command-line (open-input-string expr))))]
#:once-each
[("--debug") "show preprocessed Scheme code (for debugging)"
(debug? #t)]

View File

@ -124,7 +124,7 @@
(define (pp-repl)
(let loop ()
(let ([x (read)])
(let ([x (read-syntax)])
(unless (eof-object? x)
(call-with-values (lambda () (eval x)) show)
(loop)))))

View File

@ -15,7 +15,7 @@
#:multi
[("-E" "--eval") expr "evaluates <expr> before processing starts"
(parameterize ([read-case-sensitive #t])
(add-eval (read (open-input-string expr))))]
(add-eval (read-syntax 'command-line (open-input-string expr) )))]
#:handlers
(lambda (_ . files) (run preprocess run-cmd output files))
'("input-file")

View File

@ -187,7 +187,7 @@
(value->cont vs cont))))))
(cond [(regexp-try-match (command-marker-here-re) (stdin))
=> (lambda (here) (display (car here)) (cont))]
[else (let ((r (read))) (do-thunk (lambda () (eval r))))]))
[else (let ((r (read-syntax))) (do-thunk (lambda () (eval r))))]))
(provide paren-pairs)
(define paren-pairs
@ -305,12 +305,11 @@
;;=============================================================================
;; Invocation
(define-namespace-anchor nsa)
(define (initialize)
(read-case-sensitive #t)
(unless (command-marker) (command-marker "@"))
(current-namespace (namespace-anchor->namespace nsa))
(namespace-require 'scheme/base)
(namespace-require 'preprocessor/mztext)
(do-evals))
(define (run)

View File

@ -49,7 +49,8 @@
(delete-file file)
(rename-file-or-directory temp file))))]
[output
(with-output-to-file output (lambda () (apply preprocess files)) #:exists 'replace)
(with-output-to-file output #:exists 'replace
(lambda () (apply preprocess files)))
(when run-cmd (do-run-subst output))]
[else (apply preprocess files)])
(exit exit-code)))