anchor.diff:              ;; default
               (c-gen '(:seq (:label "default")
                        (:return -1)))))))))
  +
  +
  +
  +(defun grammar->c-file (grammar pathname &key
  +                        (function-name "mgparse")
  +                        (context-type "void*")
  +                        ;(print-stub #'print-c-parser-stub)
  +                        (stub-pathname (make-pathname :directory (pathname-directory pathname)
  +                                                      :name (concatenate 'string (pathname-name pathname) "-terminal-stub")
  +                                                      :type "c")))
  +  ;(fa->c-stub fa
  +              ;:output stub-pathname :halt-function halt-function :context-type context-type
  +              ;:print-stub print-stub)
  +  (grammar->c-predictive-parser grammar :output pathname
  +                                :header (format nil "#include \"~A.c\" ~&" (pathname-name stub-pathname))
  +                                :function-name function-name
  +                                :context-type context-type))
  
positive.code:                        (c-gen `(:comment ,production))
                         (c-gen (destructuring-bind (head term0 &rest rest) production
                                  (assert (equal X head))
                                  (assert (equal term0 a))
                                  `(:if ,(term-check a)
                                        ,(if rest
                                             (loop for tail on rest
                                                for a = (car tail)
  
negative.code:            (eq :predicate (car symbol)))
        (print-c-parser-predicate stream (cadr symbol) context)
        (format stream "~A( ~A )" (csymbol symbol) context)))
  
  (defun c-parser-test (symbol context)
    (spec-case symbol
      ((:predicate (:not x))
       (list :! (c-parser-test `(:predicate ,x) context)))
      ((:predicate x)
       (list :-> context (csymbol x)))
      (x `(:== 0 (:call ,(csymbol x) ,context)))))
  
  
  (defun print-c-parser-stub (stream symbol context-type context)
    (if (and (listp symbol)
  