anchor.diff:     (and (symbolp form) (grammar-p form names))
      (and (consp form) (symbolp (car form)) (grammar-p (car form) names))))
   
  -(defun binding-form-p (form)
  -  (and (consp form) (eql (car form) '->)))
  -
  -(defun progn-p (form)
  -  (and (consp form) (eql (car form) 'progn)))
  -
  -(defun or-p (form)
  -  (and (consp form) (eql (car form) 'or)))
  -
  -(defun match-form-p (form)
  -  (and (consp form) (eql (car form) 'match)))
  +(defun form-p (what form)
  +  (and (consp form) (eql (car form) what)))
   
   (defmacro defparserfun (name (&rest args) &body body)
     `(progn
        (setf (get ',name 'parser-function) t)
        (defun ,name (,@args) ,@body)))
  -
   
   (defparserfun any-char (text state position)
     "Match a single character. Succeeds everywhere except at the EOF."
  
positive.code: ;;;
  ;;; - state manipulation
  ;;;
  ;;; - IF forms
  ;;;
  
  #|
  
negative.code:             ((parser-function-invocation-p form names)
               (wrap (compile-parser-call form names text s-in p-in)))
  
              ((form-p '-> form)
               (destructuring-bind (expr var) (cdr form)
                 (let ((cexp (compile-wrapped-form wrapper expr text s-in p-in s p names (gensym "R") nil)))
                   (funcall wrapper cexp ok var s p continuation failure))))
  
              ((form-p 'progn form)
               (compile-progn (rest form) text s-in p-in names r))
  
              ((form-p 'or form)
               (compile-or (rest form) text s-in p-in names r))
  
              ((form-p 'match form)
               (wrap (compile-match (cadr form) text s-in p-in)))
  
              ((form-p 'if form)
               (destructuring-bind (test then else) (cdr form)
                 (wrap `(if ,test
                            ,(compile-wrapped-form wrapper then text s-in p-in s p names (gensym "R") nil)
                            ,(compile-wrapped-form wrapper else text s-in p-in s p names (gensym "R") nil)))))
  
              ((stringp form)
               (wrap (compile-string form text s-in p-in)))
  
              (t form))))))
  
  (defun compile-expression (exp names)
    (with-gensyms (text state position)
      (labels ((thunk (exp)
                 (if (and (consp exp) (grammar-p (car exp) names) (= (length exp) 4))
                     `(function ,(car exp))
                     `(lambda (,text ,state ,position) ,exp))))
        (cond
          ((parser-function-invocation-p exp names)
           (thunk (compile-parser-call exp names text state position)))
  
          ((form-p 'progn exp)
           (thunk (compile-progn (rest exp) text state position names (gensym "R"))))
  
          ((form-p 'or exp)
           (thunk (compile-or (rest exp) text state position names (gensym "R"))))
  
          ((form-p 'if exp)
           (destructuring-bind (test then else) (cdr exp)
             `(if ,test
                  ,(compile-expression then names)
                  ,(compile-expression else names))))
  
          ((stringp exp)
           (thunk (compile-string exp text state position)))
  
          (t exp)))))
  
  (defun compile-string (str text state position)
    `(matching ,str ,(length str) ,text ,state ,position))
  