anchor.diff:  ;; http://www.it.kau.se/cs/education/courses/dvgc02/08p4/labs/asn1_bnf.txt
   (yacc:define-parser *asn1-parser*
     (:start-symbol module-definition)
  -  (:terminals (|::=| |,| |.| |{| |}| |(| |)| |..| |[| |]|
  +  (:terminals (|::=| |,| |.| |{| |}| |(| |)| |..| |[| |]| pipe
   	       integer boolean bit octet string any null objid
   	       object identifier
   	       implicit explicit begin end definitions
  
positive.code:   ("\\)" (return (values '|)| '|)|)))
    ("\\[" (return (values '|[| '|[|)))
    ("\\]" (return (values '|]| '|]|)))
    "--(.*)--" ;; inline comment FIXME: doesn't work with multiple inline comments on a single line
    "--(.*)\\\n"  ;; single line comments
    ("0x([0-9a-fA-F]+)" (return (values 'constant (parse-integer (or $1 "") :radix 16))))
    ("[-]?[0-9]+" (return (values 'constant (parse-integer $@))))
    ("\\\"([0-9a-fA-F]+)\\\"" (return (values 'constant (parse-integer (or $1 "") :radix 16))))
    ("[\\w-]+" (return (values 'name (alexandria:symbolicate (substitute #\- #\_ (string-upcase $@))))))
    )
  
  (defun test-lexer (string)
  
negative.code:   (integer-expr
     (integer (lambda (a) (declare (ignore a)) `(:integer)))
     (integer |(| constant |..| constant |)| 
  	    (lambda (a b c d e f) (declare (ignore a b d f)) `(:integer :range :start ,c :end ,e)))
     (integer |(| constant-list |)| (lambda (a b c d) (declare (ignore a b d)) `(:integer :member ,c)))
     (integer |{| named-number-list |}| (lambda (a b c d) (declare (ignore a b d)) `(:integer :member ,c))))
  
    (constant-list 
     (constant (lambda (a) (list a)))
     (constant-list pipe constant (lambda (a b c) (declare (ignore b)) (append a (list c)))))
  
    (bit-string-range 
     (constant |..| constant (lambda (a b c) (declare (ignore b)) `(:range :start ,a :end ,c)))
     (constant |..| max (lambda (a b c) (declare (ignore b c)) `(:range :start ,a :end nil))))
  
    (bit-string-option
     (size |(| bit-string-range |)| (lambda (a b c d) (declare (ignore a b d)) c)))
  