lilu-eval.ros 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/sh
  2. #|-*- mode:lisp -*-|#
  3. #|
  4. exec ros -Q -- $0 "$@"
  5. |#
  6. (progn ;;init forms
  7. (ros:ensure-asdf)
  8. #+quicklisp(ql:quickload '(:lilu-desk)
  9. :silent t))
  10. (defpackage :ros.script.lilu-eval.3841829401
  11. (:use :cl))
  12. (in-package :ros.script.lilu-eval.3841829401)
  13. (opts:define-opts
  14. #.lilu-roswell:*default-help-option*
  15. #.lilu-roswell:*default-debugger-option*)
  16. (defun main (&rest argv)
  17. (lilu-roswell:init)
  18. (multiple-value-bind (options free-args)
  19. (lilu-roswell:parse-options argv
  20. :free-args-p t :min-free-args 1)
  21. (declare (ignorable free-args))
  22. (lilu-roswell:options-check-for-help options
  23. :prefix nil
  24. :suffix nil
  25. :usage-of "lilu-eval.ros"
  26. :args "S-EXP ...")
  27. (lilu-debugger:with-debugger
  28. ((lilu-roswell:options-get-value options :debugger))
  29. (dolist (sexp free-args)
  30. (let ((exp (read-from-string sexp)))
  31. (format t "~A => ~A~%" exp (eval exp)))))))
  32. ;;; vim: set ft=lisp lisp: