Make web server
This commit is contained in:
12
cli.lisp
12
cli.lisp
@ -13,6 +13,11 @@
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
(defpackage #:truth-table/cli
|
||||
(:use #:common-lisp #:truth-table/base
|
||||
#:truth-table/args)
|
||||
(:export #:toplevel #:main))
|
||||
|
||||
(in-package :truth-table/cli)
|
||||
|
||||
(defun eval-and-typeset-propositions (prop-strs &key (format "unicode")
|
||||
@ -43,7 +48,8 @@ functions involved in evaluating and typesetting."
|
||||
|
||||
(defparameter *command-line-spec*
|
||||
'((#\h "help" help nil "print this message, then exit")
|
||||
(#\f "format" format t "specify the output format (*unicode*, ascii, or latex)")
|
||||
(#\f "format" format t
|
||||
"specify the output format (*unicode*, ascii, latex, or html)")
|
||||
(#\s "subexps" subexps nil "include sub-expressions in the output table")
|
||||
(#\n "no-vars" no-vars nil "do not include variables in the output table")
|
||||
(#\m "multi-char" multi-char nil "allow multi-character variable names")
|
||||
@ -70,8 +76,8 @@ arguments."
|
||||
(parse-command-line *command-line-spec* argv)
|
||||
(cond
|
||||
((option-value 'help opts)
|
||||
(print-usage t *command-line-spec*
|
||||
"truth-table" "<propositions...>")
|
||||
(print-usage t *command-line-spec* "truth-table"
|
||||
:general-args "<propositions...>")
|
||||
(uiop:quit (if cmdline-error 1 0)))
|
||||
((null prop-strs)
|
||||
(cerror *cli-parse-continue-string* 'no-input-error))
|
||||
|
Reference in New Issue
Block a user