From 628c87c1a75e48c34888031f2aca3695b5a704cf Mon Sep 17 00:00:00 2001 From: Darren Bane Date: Thu, 30 Jul 2020 23:01:26 +0100 Subject: Maybe CL is better after all --- cbtech.lisp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 cbtech.lisp (limited to 'cbtech.lisp') diff --git a/cbtech.lisp b/cbtech.lisp new file mode 100755 index 0000000..15eda5a --- /dev/null +++ b/cbtech.lisp @@ -0,0 +1,18 @@ +(require "ccmd") +(require "cbuiltins") +(defpackage #:cbtech + (:use #:common-lisp #:ccmd #:cbuiltins) + (:export + #:main)) +(in-package #:cbtech) +;; Favour symbols & objects over C-like numbers +(defconstant +cmds+ (list + (create-tab #'bt-quit "QUIT" 1) + (create-tab #'help "help" 2) + (create-tab #'look "look" 2))) +(defun main () + (format *standard-output* "> ") + (let* ((tab (lookup (parse (read-line)) +cmds+)) + (f (fun tab))) + (funcall f))) ; I *think* this is better than (flet ... +(provide "cbtech") -- cgit 1.4.1-2-gfad0