anchor.diff:         (compile-or (rest body) txt pos names (gensym "R") state)))))
   
   (defun or-wrapper (expr ok result p continuation failure state)
  -  (let ((bindings (save-state-bindings state)))
  -    `(let (,@bindings)
  +  "Wrap an expression to be part of an OR. Arranges to save the state,
  +evaluate the expression, and then either return success or invoke the
  +continuation of the OR, if there is one, or fail and roll back the
  +state."
  +  (let ((state-bindings (save-state-bindings state)))
  +    `(let (,@state-bindings)
          (multiple-value-bind (,ok ,result ,p) ,expr
            (if ,ok
                (good ,result ,p)
                (progn
  -               ,@(restore-state bindings)
  +               ,@(restore-state state-bindings)
                  ,(or continuation failure)))))))
   
   (defun compile-wrapped-form (wrapper form text p-in p names r state continuation)
  +  "Used to compile forms that are part of PROGNs and ORs."
     (with-gensyms (ok)
       (let ((failure `(bad ,p-in)))
         (labels ((wrap (expr) (funcall wrapper expr ok r p continuation failure state))
  
positive.code:       (values ok r p))))
  
  (defun tracemsg (fmt &rest args)
    (when (plusp *trace*)
      (let ((indent (make-string (* 2 *trace-level*) :initial-element #\Space)))
        (format t "~&~a" indent)
        (apply #'format t fmt args))))
  
  (defun value (x) x)
  
negative.code: 
              (t (wrap `(good ,form ,p-in))))))))
  
  (defun compile-parser-argument (exp names state)
    "Used to compile expressions in function calls."
    (with-gensyms (text position)
      (labels ((thunk (exp)
                 (if (and (consp exp) (grammar-p (car exp) names) (= (length exp) 3))
                     `(function ,(car exp))
                     `(lambda (,text ,position)
                        (declare (ignorable ,text))
                        ,exp)))
               (self (exp) (compile-parser-argument exp names state)))
        (cond
          ((parser-function-invocation-p exp names)
           (thunk (compile-parser-call exp names text position state)))
  