anchor.diff:                        (error "Mimic rule must be the only one in chain")
                         `(t (values ,(first results) stream)))
                     `(t ,(state->action end results)))
  -              `(t (error "No alt!")))))))
  +              `(t (parser::parser-error stream :alt ',(mappend #'first-for-state
  +                                                               states))))))))
   
   (def-state-generic state->action (state results))
   
  
positive.code:                 body-cond
                  `(eq ,delim (second (head stream))))
             (multiple-value-bind (,result1 stream)
                 (,fn-name (tail stream))
               (values (cons ,result ,result1) stream))
             (values (list ,result) stream)))))
  
  
negative.code:                        val
                         (setf (gethash val-sym %%vals) (funcall val-fn)))))))
        `(funcall ,fn (lambda () ,@body)))))
  
  
  (defun print-term (term &optional (stream *standard-output*))
    (let ((*standard-output* stream)
          (*print-pretty* t)
          (*print-right-margin* 88)
          (*print-miser-width* nil)
          (no-space? t))
      (labels ((%print-loop (format delim components)
                 (when components
                   (unless (eq :eps delim)
                     (princ delim))
                   (%print-with-format format (list (first components)))
                   (%print-loop format delim (rest components))))
               (%print-with-format (format components)
                 (pprint-newline :fill)
                 (when format
                   (if (stringp (first format))
                       (progn
                         (if no-space?
                             (setf no-space? nil)
                             (princ " "))
                         (princ (first format))
                         (%print-with-format (rest format) components))
                       (case (first format)
                         (:{
                          (multiple-value-bind (format comps)
                              (pprint-logical-block (nil nil)
                                (%print-with-format (rest format) components))
                            (%print-with-format format comps)))
                         (:}
                          (values format components))
                         (:v
                          (pprint-newline :mandatory)
                          (setf no-space? t)
                          (%print-with-format (rest format) components))
                         (:>
                          (pprint-indent :block 3)
                          (%print-with-format (rest format) components))
                         (:<
                          (pprint-indent :block 0)
                          (%print-with-format (rest format) components))
                         (:.
                          (setf no-space? t)
                          (%print-with-format (rest format) components))
                         (:!
                          (pprint-indent :current 1)
                          (%print-with-format (rest format) components))
                         (:lex
                          (if no-space?
                              (setf no-space? nil)
                              (princ " "))
                          (princ (first components))
                          (%print-with-format (rest format) (rest components)))
                         (:_
                          (%print (first components))
                          (%print-with-format (rest format) (rest components)))
                         ((:+ :*)
                          (when components
                            (%print-with-format (rest (rest format)) (list (first components)))
                            (%print-loop (rest (rest format)) (second format) (rest components))))))))
               (%print (term)
                 (let ((format (term-format (first term))))
                   (when format
                     (%print-with-format format (rest term))))))
        (pprint-logical-block (*standard-output* nil)
          (%print term)))))
  
  (defun parse-str (grammar str rule)
    (parser grammar (lexer grammar (make-string-input-stream str)) rule))
  