(cl:in-package #:sod-frontend)
-;;;--------------------------------------------------------------------------
-;;; Preparation for dumping.
-
-(clear-the-decks)
-(exercise)
-
;;;--------------------------------------------------------------------------
;;; The main program.
("Evaluate raw Lisp code.")
(lambda (lisp)
(handler-case
- (let ((*package* (find-package "SOD-USER")))
- (eval (read-from-string lisp)))
+ (let ((*package* (find-package "SOD-USER"))
+ (token (cons 'token nil)))
+ (with-input-from-string (in lisp)
+ (loop (let ((form (read in nil token)))
+ (when (eq form token) (return))
+ (eval form)))))
(error (error)
(option-parse-error "~A" error)))))
(#\l "load" (:arg "FILE")
~[~:; ~:*~D error~:P~[~:; and~]~:*~]~
~[~:; ~:*~D warning~:P~]~%"
*program-name* nerror nwarn))
- (exit (if (plusp nerror) 2 0)))))))
+ (uiop:quit (if (plusp nerror) 2 0)))))))
;;;----- That's all, folks --------------------------------------------------