anchor.diff:    (lambda (string &aux (res (funcall arg1 string)))
       (when res
         (funcall arg2 res))))
  +
  +(defun literal-recognizer (literal)
  +  "Generate a recognizer for a literal string."
  +  (if (characterp literal)
  +      (setf literal (make-string 1 :initial-element literal)))
  +  (lambda (string)
  +    (and (<= (length literal) (length string))
  +         (string= literal (subseq string 0 (length literal)))
  +         (subseq string (length literal)))))
  +
  +;; using recursion to parse context-free and not just regular languages
  +(defun parentheses (string)
  +  "Recognize a balanced set of parentheses."
  +  (funcall (make-recognizer `((start end ,#'identity)
  +                              (start a   ,(literal-recognizer "("))
  +                              (a     b   ,#'parentheses)
  +                              (b     end ,(literal-recognizer ")"))))))
  
positive.code: 
  (defun start-state (syntax-graph)
    "Return the starting state of a given syntax diagram, if any."
    (let ((start-list (remove 0
                        (remove 1 (graph-nodes syntax-graph) :test-not #'= :key #'out-degree)
                        :test-not #'= :key #'in-degree)))
      (when (= (length start-list) 1)
        (car start-list))))
  
  (defun end-state (syntax-graph)
    "Return the ending state of a given syntax diagram, if any."
    (let ((end-list (remove 0 (graph-nodes syntax-graph) :test-not #'= :key #'out-degree)))
      (when (= (length end-list) 1)
        (car end-list))))
  
  (defun predicate-recognizer (pred)
    "Generate a recognizer predicate for strings from a predicate for characters."
  
negative.code:            queue
             visited)
            ((null queue)
             (if (eq node end)
                 string))
            (let ((added (loop for e in (edges node graph)
                               for res = (funcall (edge-weight e) string)
                           if (not (member (end-node e) visited))
  