about summary refs log blame commit diff stats
path: root/cbtech.lisp
blob: 15eda5a9c50180dd12c66d69f68afd71d83aa882 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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")