anchor.diff:                                    (declare (ignore c))
                                     (append a (list b)))))
   
  -  (declaration
  -   (type-specifier identifier
  -                   (lambda (tspec identifier)
  -                     (list tspec identifier)))
  -   (type-specifier identifier |[| value |]|
  -                   (lambda (a b c d e) (declare (ignore c e))
  -                           (list a b d)))
  -   (type-specifier identifier |<| value |>|
  -                   (lambda (a b c d e) (declare (ignore c e))
  -                           (list a b d)))
  -   (type-specifier identifier |<| |>|
  -                   (lambda (a b c e) (declare (ignore c e))
  -                           (list a b nil)))
  -   (string identifier |<| |>| 
  -           (lambda (a b c e) (declare (ignore a c e))
  -                   (list :string b nil)))
  -   (string identifier |<| value |>| 
  -           (lambda (a b c d e) (declare (ignore a c e))
  -                   (list :string b d))))
  +  (union-type-spec 
  +   (union union-body (lambda (a b) (declare (ignore a)) b)))
  +
  +  (union-body-list 
  +   (case value |:| declaration |;| 
  +	 (lambda (a b c d e) (declare (ignore a c e))
  +		 (list `(,b ,d))))
  +   (union-body-list case value |:| declaration |;|
  +		    (lambda (a b c d e f) (declare (ignore b d f))
  +			    (append a 
  +				    (list `(,c ,e)))))
  +   (union-body-list default |:| declaration |;|
  +		    (lambda (a b c d e) (declare (ignore b c e))
  +			    (append a 
  +				    (list `(otherwise ,d))))))
  +
  +  (union-body 
  +   (switch |(| declaration |)| |{| union-body-list |}|
  +	   (lambda (a b c d e f g) (declare (ignore a b d e g))
  +		   `(:union ,c ,@f))))
  +
  +  (constant-def 
  +   (const identifier |=| constant |;|
  +          (lambda (a b c d e) (declare (ignore a c e))
  +		  `(defconstant ,(alexandria:symbolicate '+ b '+)
  +		     ,d))))
   
     (type-def 
      (typedef declaration |;|
               (lambda (td decl sc)
                 (declare (ignore td sc))
  -              (destructuring-bind (tname name) decl
  -                `(defxtype* ,(alexandria:symbolicate name) () ,tname))))
  +	      `(defxtype* ,(alexandria:symbolicate (string-upcase (car decl)))
  +		   () ,(cadr decl))))
      (enum identifier enum-body |;| 
            (lambda (e id b c)
              (declare (ignore e c))
              `(defxenum ,id () ,@b)))
      (struct identifier |{| struct-body |}| |;|
  -           (lambda (a b c d) 
  -             (declare (ignore a d))
  -             `(defxstruct ,(alexandria:symbolicate b) () ,@c)))))
  +           (lambda (a b c d e f) 
  +             (declare (ignore a c e f))
  +             `(defxstruct ,(alexandria:symbolicate (string-upcase b))
  +		  () ,@d)))
  +   (union identifier union-body |;|
  +	  (lambda (a b c d) (declare (ignore a d))
  +		  `(defxunion ,b () ,@c))))
  +
  +  (program-def
  +   (program identifier |{| version-def |}| |=| value |;|
  +	    (lambda (a b c d e f g h)
  +	      (declare (ignore a c e f h))
  +	      `(progn (defprogram ,b ,g)
  +		      ,@d))))
  +
  +  (version-def 
  +   (version identifier |{| rpc-def-list |}| |=| value |;|
  +	    (lambda (a b c d e f g h)  
  +	      (declare (ignore a c e f h))
  +	      (list (list :version b d g))))
  +   (version-def version identifier |{| rpc-def-list |}| |=| value |;|
  +		(lambda (a b c d e f g h i)
  +		  (declare (ignore b d f g i))
  +		  (append a 
  +			  (list (list :version c e h))))))
  +
  +  (rpc-def-list 
  +   (type-specifier identifier |(| type-specifier |)| |=| value |;|
  +		   (lambda (a b c d e f g h)
  +		     (declare (ignore c e f h))
  +		     (list `(defrpc ,b ,g ,d ,a))))
  +   (rpc-def-list type-specifier identifier |(| type-specifier |)| |=| value |;|
  +		 (lambda (a b c d e f g h i)
  +		   (declare (ignore d f g i))
  +		   (append a 
  +			   (list `(defrpc ,c ,h ,e ,b))))))
  +
  +  (definition 
  +    (type-def)
  +    (constant-def)
  +    (program-def))
  +    
  +
  +  (specification 
  +   definition
  +   (specification definition)))
   
   
   
  
positive.code:   ("\\]" (return (values '|]| '|]|)))
    ("\\(" (return (values '|(| '|(|)))
    ("\\)" (return (values '|)| '|)|)))
    ("struct" (return (values 'struct 'struct)))
    ("enum" (return (values 'enum 'enum)))
    ("typedef" (return (values 'typedef 'typedef)))
  
negative.code:    (hyper (lambda (h) (declare (ignore h)) :int64))
     (float (lambda (f) (declare (ignore f)) :real32))
     (double (lambda (d) (declare (ignore d)) :real64))
     (bool (lambda (b) (declare (ignore b)) :boolean))
     enum-type-spec
     struct-type-spec
     union-type-spec
     identifier)
  
    (enum-type-spec 
     (enum enum-body (lambda (a b) (declare (ignore a)) b)))
  
    (enum-body 
     (|{| enum-body-list |}| (select-n 1)))
  
    (enum-body-list 
     (identifier |=| value 
                 (lambda (a b c) (declare (ignore b)) 
  		       (list (list (intern (string-upcase a) :keyword) c))))
     (enum-body-list |,| identifier |=| value
                     (lambda (prev comma id eq val)
                       (declare (ignore comma eq))
                       (append prev 
                             (list (list (intern (string-upcase id) :keyword) val))))))
  			   
    (struct-type-spec 
     (struct |{|  struct-body |}| (select-n 2)))
  
  