anchor.diff:  ;; "get" thing
   ;; "get"
   
  +(defun literal-token-p (token)
  +  (or (stringp token)
  +      (characterp token)))
  +
  +(defun var-token-p (token)
  +  (not (literal-token-p token)))
  +
   (defun pattern-sort< (a b)
     (cond
       ((and (null a) (null b))
  
positive.code:     ((null b)
       ;; a is longer, therefore should go first
       t)
      ((and (symbolp (car a)) (not (symbolp (car b))))
       ;; a is a symbol and b isn't, so a should go later
       nil)
      ((and (not (symbolp (car a))) (symbolp (car b)))
       ;; a isn't a symbol and b is, so a should go first
       t)
      ((and (symbolp (car a)) (symbolp (car b)))
       ;; both a and b are symbols, so check the next element
       (pattern-sort< (cdr a) (cdr b)))
      ((string= (car a) (car b))
  
negative.code:        (add-command (quote ,pattern) (quote ,flags) ',func-name)
         ',func-name)))
  
  (defparameter *parser-trace* t)
  (defun trace-msg (fmt &rest args)
    (when *parser-trace*
      (slog "~?" fmt args)))
  
  (defun pattern-match-wildcard (string tokens vars)
    ;; wildcard matching
    (trace-msg "Matching symbol ~a" (first tokens))
    (setf tokens (rest tokens))
    (cond
      ((string= string "")
       ;; wildcards don't match the empty string
       (trace-msg "No match - empty string")
       nil)
      ((null tokens)
       (trace-msg "Last token, rest of string is var")
       (values t nil nil (cons (string-trim '(#\space) string) vars)))
      ((symbolp (first tokens))
       (let ((space-pos (position #\space string)))
         (cond
           ((null space-pos)
            (trace-msg "No match - Next token is sym and no space found")
            nil)
           (t
            (trace-msg "Next tokens is sym - Pushing single word into var")
            (values t
                    (subseq string (1+ space-pos))
                    tokens
                    (cons (subseq string 0 space-pos) vars))))))
      ((stringp (first tokens))
       (let* ((space-pos (position #\space string))
              (match-pos (and space-pos (search (first tokens) string :start2 space-pos))))
         (cond
           ((null space-pos)
            (trace-msg "No match - Next token is string and no space found")
            nil)
           ((null match-pos)
            (trace-msg "No match - Next token is string and not found")
            nil)
           (t
            (trace-msg "Next token is str - Pushing subseq into var")
            (values t
                    (string-trim '(#\space) (subseq string (+ match-pos (length (first tokens)))))
                    (rest tokens) ; We skip the next token, since we've already matched it
                    (cons (string-trim '(#\space) (subseq string 0 match-pos)) vars))))))))
  
  (defun pattern-match-char (string tokens)
    (trace-msg "Matching character ~a" (first tokens))
    (cond
      ((not (eql (first tokens) (char string 0)))
       (trace-msg "No match - single character didn't match")
       nil)
      (t
       (trace-msg "Single character matched")
       (values (string-left-trim '(#\space) (subseq string 1)) (rest tokens)))))
  
  (defun pattern-match-string (string tokens)
    (trace-msg "Matching string ~a in middle" (first tokens))
    ;; string matching
    (cond
      ((null (rest tokens))
       ;; end of string
       (trace-msg "Matching string ~a at end" (first tokens))
       (when (string-abbrev string (first tokens))
         (values t nil nil)))
      (t
       (let* ((space-pos (position #\space string))
              (word (if space-pos (subseq string 0 space-pos) string)))
         (cond
           ((not (string-abbrev word (first tokens)))
            (trace-msg "No match - didn't match string")
            nil)
           ((null space-pos)
            (trace-msg "String matched at end")
            (values t
                    ""
                    (rest tokens)))
           (t
            (trace-msg "String matched in middle")
            (values t
                    (string-left-trim '(#\space) (subseq string (1+ space-pos)))
                    (rest tokens))))))))
  
  (defun command-pattern-matches (pattern string)
    (loop
       with vars = nil
       with match-p = t
       with tokens = pattern
       while tokens
       for token = (car tokens)
  