anchor.diff:    (:default-initargs . (:state :seek-return-1)))
   
   (defstate header-fsm :seek-return-1 (fsm data)
  -  (format "~S[~S] => ~S~%" fsm state (code-char data))
  +  (format t "~S[~S] => ~S~%" fsm state (code-char data))
     (when (char-equal (code-char data) #\Return)
       :seek-newline-1))
   
   (defstate header-fsm :seek-newline-1 (fsm data)
  -  (format "~S[~S] => ~S~%" fsm state (code-char data))
  +  (format t "~S[~S] => ~S~%" fsm state (code-char data))
     (if (char-equal (code-char data) #\Newline)
       :seek-return-2
       :error))
   
   (defstate header-fsm :seek-return-2 (fsm data)
  -  (format "~S[~S] => ~S~%" fsm state (code-char data))
  +  (format t "~S[~S] => ~S~%" fsm state (code-char data))
     (if (char-equal (code-char data) #\Return)
       :seek-newline-2
       :seek-return-1))
   
   (defstate header-fsm :seek-newline-2 (fsm data)
  -  (format "~S[~S] => ~S~%" fsm state (code-char data))
  +  (format t "~S[~S] => ~S~%" fsm state (code-char data))
     (if (char-equal (code-char data) #\Newline)
         :done
         :error))
  
positive.code:            (return (1+ i))))))))
  
  ;; HTTP Peer
  (defclass http-peer ()
    ((socket :initarg :socket
             :accessor sock)
     (parser :accessor parser)))
  
  (defmethod initialize-instance :after ((peer http-peer) &key)
    (setf (parser peer) (make-instance 'request-parser :peer peer))
  
    (add-listener (sock peer) "data"
                  (lambda (data)
  
negative.code: 
  (defstate request-parser :read-request (parser data)
    (flet ((finish (at)
             (if (not (equalp at :error))
                 (progn
                   (unless (>= at (length data))
                     (setf (buffer parser) (subseq data at (length data))))
  
                   (values
                    (if (eql (state (request-fsm parser)) :done) :read-headers nil)
                    (buffer parser)))
                 (progn
                   :error))))
  
      (finish
       (dotimes (i (length data) i)
         (funcall (request-fsm parser) (aref data i))
         (when (eql (state (request-fsm parser)) :error)
           (emit (peer parser) "error" "Parser Error")
           (return :error))
         (when (eql (state (request-fsm parser)) :done)
           (return (1+ i)))))))
  
  