anchor.diff:     (struct identifier |{| struct-body |}| |;|
              (lambda (a b c d e f) 
                (declare (ignore a c e f))
  -             `(defxstruct ,(alexandria:symbolicate (string-upcase b))
  -		  () ,@d)))
  +             (let ((res `(defxstruct ,(alexandria:symbolicate (string-upcase b))
  +			     () ,@d)))
  +	       res)))
      (struct |*| identifier |{| struct-body |}| |;|
   	   (lambda (a b c d e f g) (declare (ignore a b d f g))
   		   `(progn (defxstruct ,(alexandria:symbolicate c '*) () ,@e)
  
positive.code:    type-specifier)
  
    (definition 
      type-def
      constant-def
      program-def)
      
    (specification 
     (definition)
     (specification definition (lambda (a b) (append a (list b))))))
  
         
  (defun test-parser (string)
    (parse-with-lexer (xdr-lexer string) *xdr-parser*))
  
  (defun gen (pathspec &optional outfile)
    (let ((forms 
  	 (test-parser 
  	  (with-open-file (f pathspec :direction :input)
  	    (with-output-to-string (s)
  	      (do ((l (read-line f nil nil) (read-line f nil nil)))
  		  ((null l))
  		(princ l s) 
  		(fresh-line s)))))))
      (with-open-file (f (or outfile 
  			   (merge-pathnames (make-pathname :type "lisp")
  					    (pathname pathspec)))
  		       :direction :output
  		       :if-exists :supersede)
        (terpri f)
        (multiple-value-bind (sec min hour day month year) (decode-universal-time (get-universal-time))
  	(format f ";;; Autogenerated from ~A at ~A-~A-~A ~A:~A:~A ~%" 
  		pathspec 
  		year month day hour min sec))
        (terpri f)
        (dolist (form forms)
  	(cond
  	  ((eq (car form) :program)
  	   ;; special case 
  	   (destructuring-bind (pname id &rest versions) (cdr form)
  	     (pprint `(defprogram ,pname ,id) f)
  	     (terpri f)
  	     (dolist (version versions)
  	       (destructuring-bind (v vname num &rest rpcs) version
  		 (declare (ignore v vname))
  		 (dolist (rpc rpcs)
  		   (pprint (append rpc `((:program ,pname ,num)))
  			   f)
  		   (terpri f))))))
  	  (t 
  	   (pprint form f)
  	   (terpri f)))))))
  
        
  
  
negative.code:   ("void" (return (values 'void 'void)))
    ("[-]?[0-9]+" (return (values 'constant (parse-integer $@))))
    ("\\w+" (return (values 'identifier (alexandria:symbolicate (substitute #\- #\_ (string-upcase $@))))))
    "/\\*.*?\\*/" ;; for multi-line comments
    "//(.*)\\\n") ;; single line comments
             
  (defun test-lexer (string)
  