anchor.diff:     :integer #'parse-number
      :real #'parse-number
      :boolean #'json-boolean-to-lisp
  -   :beginning-of-array #'init-vector-accumulator
  -   :array-member #'vector-accumulator-add
  -   :end-of-array #'vector-accumulator-get-sequence
  +   :beginning-of-array #'init-accumulator
  +   :array-member #'accumulator-add
  +   :end-of-array #'accumulator-get-sequence
      :array-type 'vector
      :beginning-of-object #'init-accumulator-and-prototype
      :object-key #'accumulator-add-key-or-set-prototype
      :object-value #'accumulator-add-value-or-set-prototype
      :end-of-object #'accumulator-get-object
  -   :beginning-of-string #'init-vector-accumulator
  -   :string-char #'vector-accumulator-add
  -   :end-of-string #'vector-accumulator-get-string
  +   :beginning-of-string #'init-accumulator
  +   :string-char #'accumulator-add
  +   :end-of-string #'accumulator-get-string
      :aggregate-scope (union *aggregate-scope-variables*
                              '(*accumulator* *accumulator-last*))
      :object-scope (union *object-scope-variables*
  
positive.code: *JSON-ARRAY-TYPE*."
    (coerce (cdr *accumulator*) *json-array-type*))
  
  (defun accumulator-get ()
    "Return all values accumulated so far in the list accumulator as a
  list."
    (cdr *accumulator*))
  
  (defun init-vector-accumulator ()
    "Initialize a vector accumulator."
    (setq *accumulator*
  
negative.code:   "Read a JSON number token from the given STREAM, and return 2
  values: the token category (:INTEGER or :REAL) and the token itself,
  as a string."
    (let* ((chars (cons nil nil))
           (chars-tail chars)
           (category :integer)
           (c (read-char stream nil)))
      (flet ((next-char ()
               (setf chars-tail (setf (cdr chars-tail) (cons c nil))
                     c (read-char stream nil))))
        (macrolet ((read-part (name divider &rest sign)
                     `(loop for part-length upfrom 0
                         initially
                           ,@(if divider
                                 `((if (and c (char-equal c ,divider))
                                       (next-char)
                                       (return))))
                           ,@(if sign
                                 (let ((sign
                                        `(or ,@(loop for s in sign
                                                  collect `(char= c ,s)))))
                                   `((if (and c ,sign) (next-char)))))
                           ,@(if (eq name 'int)
                                 `((when (and c (char= c #\0))
                                     (next-char)
                                     (return))))
                         while (and c (char<= #\0 c #\9))
                         do (next-char)
                         finally
                           ,(let ((error-fmt
                                   (format nil
                                     "Invalid JSON number: no ~:(~A~) digits"
                                     name)))
                                 `(if (zerop part-length)
                                      (json-syntax-error stream ,error-fmt)))
                           ,@(unless (eq name 'int)
                               `((setq category :real))))))
          (read-part Int nil #\-)
          (read-part Frac #\.)
          (read-part Exp #\e #\- #\+)
          (if c (unread-char c stream))
          (values category (coerce (cdr chars) 'string))))))
  
  (defun read-json-name-token (stream)
    "Read a JSON literal name token from the given STREAM, and return 2
  values: the token category (:BOOLEAN) and the token itself, as a
  string."
    (let ((name
           (loop for c = (read-char stream nil)
              while (and c (alpha-char-p c))
              collect c into chars
              finally (if c (unread-char c stream))
                (return (coerce chars 'string)))))
      (if (assoc name +json-lisp-symbol-tokens+ :test #'equal)
          (values :boolean name)
          (json-syntax-error stream "Invalid JSON literal name: ~A"
                             name))))
  
  (define-condition no-char-for-code (error)
    ((offending-code :initarg :code :reader offending-code))
  