anchor.diff:                   name))
              (helper (s)
                (format s "~&digraph {~%")
  -             (when start
  +             (when (fa-start fa)
                  (format s "~&  start[shape=none];")
  -               (format s "~&  start -> ~A;" start))
  -             (format s "~{~&  ~A [ shape=doublecircle ];~}" final)
  +               (format s "~{~&  start -> ~A;~}" (alexandria:ensure-list (fa-start fa))))
  +             (format s "~{~&  ~A [ shape=doublecircle ];~}" (fa-accept fa))
                (map 'nil (lambda (x)
                            (format s "~&  ~A -> ~A [label=\"~A\"];~%"
                                    (first x) (third x) (token-label (second x))))
  -                  d)
  +                  (fa-edges fa))
                (format s "~&}~%"))
              (dot (ext)
                (let ((p (sb-ext:run-program "dot" (list (concatenate 'string "-T" ext))
  
positive.code:                  (t (error "Unknown tree ~A" tree)))))
        ;; visit the start
        (let ((final (visit start regex)))
          (list edges start (list final))))))
  
  
  (defun fa-index (edges)
  
negative.code:     h))
  
  
  (defun fa-numerize (fa)
    "Returns an edge list with all states and transitions as fixnums.
  0 is epsilon"
    (let ((state-hash (make-hash-table :test #'equal))
          (token-hash (make-hash-table :test #'equal))
          (state-counter -1)
          (token-counter 0)
          nedges)
      (setf (gethash :epsilon token-hash) 0)
      ;; start states
      (map nil (lambda (x)
                 (setf (gethash x state-hash)
                       (incf state-counter)))
           (fa-start fa))
      ;; build hashes
      (dolist (e (fa-edges fa))
        (destructuring-bind (q0 z q1) e
          (unless (gethash q0 state-hash)
            (setf (gethash q0 state-hash) (incf state-counter)))
  