anchor.diff:               (start ()
                  ;(print 'start)
                  (multiple-value-bind (type token) (next)
  -                 (cond
  -                   ((eq token :frame)
  -                    (cons (frame)
  -                          (start)))
  -                   ((null type)
  -                    nil)
  -                   (t (parse-error type "frame or EOF")))))
  +                 (when type
  +                   (case type
  +                     ((:frame :object)
  +                      (cons (named-block token)
  +                            (start)))
  +                     (otherwise (parse-error type "frame, object, or EOF"))))))
                (body ()
                  ;(print 'body)
                  (let ((type (next)))
  -                 (assert (eq #\{ type)))
  +                 (unless (eq #\{ type)
  +                   (parse-error type "{")))
                  (body-first-item ))
  -             (frame ()
  -               (multiple-value-bind (type token) (next)
  -                 (assert (eq :identifier type))
  -                 (make-curly-block :type :frame
  +             (named-block (block-type)
  +               (multiple-value-bind (type token) (next)
  +                 (unless (eq :identifier type)
  +                   (parse-error type "identifier"))
  +                 (make-curly-block :type block-type
                                      :line line
                                      :name token
                                      :statements (body))))
  
positive.code:              (body-first-item ()
                 ;(print 'body-first)
                 (multiple-value-bind (type token) (next)
                   (cond
                     ((eq type #\})
                      nil) ; empty block
                     ((eq token :geometry)
                      (cons (geometry)
                            (body-first-item)))
                     ((eq type :identifier) ; beginning of block statement
                      (cons (body-statement (list token))
                            (body-first-item)))
                     (t (error "Unknown statement type: ~A" type)))))
               (body-statement (items)
                 (declare (type list items))
                 ;(format t "~&body statement: ~A" (reverse items))
                 (multiple-value-bind (type token) (next)
                   (declare (ignore type))
                   (case token
                     (#\; (reverse items))
                     (#\{
                      (assert (= 1 (length items)))
                      (make-curly-block :name (car items)
                                        :type (car items)
                                        :line line
                                        :statements (body-first-item)))
  
                     (#\[
                      (body-statement (cons (array nil) items)))
                     (otherwise (body-statement (cons token items))))))
               (array (elements)
                 (multiple-value-bind (type token) (next)
                   (case type
  
negative.code:              (array-delim (elements)
                 (multiple-value-bind (type token) (next)
                   (declare (ignore token))
                   (case type
                     (#\] (apply #'vec (reverse elements)))
                     (#\, (array elements))
                     (otherwise (parse-error type "} or ,"))))))
  
        (start))))
  
  