anchor.diff:  	     (format stream "[JSon parse error] ~A"
   		     (match-error-message condition)))))
   
  +
   (defun char-whitespace-p (char)
     (or (char= char #\Space)
         (char= char #\Tab)
         (char= char #\Return)
         (char= char #\Linefeed)))
   
  +
   (defun read-next-char (input)
     (loop 
  -     (let ((char (read-char input nil :eof)))
  -       (cond ((eql char :eof) (error 'json-parse-error :message "Unexpected end of file"))
  -	     ((char= char #\\) ; c-style escape chars
  +    (let ((char (read-char input nil :eof)))
  +      (cond ((eql char :eof) 
  +        (error 'json-parse-error :message "Unexpected end of file"))
  +	      ((char= char #\\) ; c-style escape chars
   	      (let ((char (read-char input nil :eof)))
  -		(cond ((eql char :eof) (error 'json-parse-error :message "Unexpected end of file (after '\'"))
  +	  (cond ((eql char :eof) 
  +		(error 'json-parse-error :message "Unexpected end of file (after '\'"))
   		      ((char= char #\n) (return #\Newline))
   		      (t (return char)))))
   	     ((not (char-whitespace-p char)) (return char))))))
  
positive.code: (defun peek-next-char (input)
    (loop 
       (let ((char (peek-char nil input nil :eof)))
         (cond ((eql char :eof) (error 'json-parse-error :message "Unexpected end of file"))
  	     ((char-whitespace-p char) (read-char input))
  	     (t (return char))))))
  
  
  (defun parse-json (input)
  
negative.code:      when (not (null (cdr pair)))
     collect pair))
  
  
  (defun display-dispatch (value render-alist)
    (if (typep value 'display-object)
        value ; already displayed
        ;; otherwise needs to display
        (let ((data (combine-render 
           (cons `("text/plain" . ,(render-plain value)) 
  					render-alist))))
  	(make-instance 'display-object :value value :data data))))
  
  
  (defun display (value)
    "Display VALUE in all supported representations."
    (display-dispatch value  
       `(("text/html" . ,(render-html value))
  	   ("text/markdown" . ,(render-markdown value))
  	   ("text/latex" . ,(render-latex value))
  	   ("image/png" . ,(render-png value))
  	   ("image/jpeg" . ,(render-jpeg value))
  	   ("image/svg+xml" . ,(render-svg value))
  	   ("application/json" . ,(render-json value))
  	   ("application/javascript" . ,(render-javascript value)))))
  
  
  (defun display-html (value)
    "Display VALUE as HTML."
    (display-dispatch value `(("text/html" . ,(render-html value)))))
  
  
  (defun display-markdown (value)
    "Display VALUE as MARDOWN text."
    (display-dispatch value `(("text/markdown" . ,(render-markdown value)))))
  
  
  (defun display-latex (value)
    "Display VALUE as a LATEX document."
    (display-dispatch value `(("text/latex" . ,(render-latex value)))))
  
  
  (defun display-png (value)
    "Display VALUE as a PNG image."
    (display-dispatch value `(("image/png" . ,(render-png value)))))
  
  
  (defun display-jpeg (value)
    "Display VALUE as a JPEG image."
    (display-dispatch value `(("image/jpeg" . ,(render-jpeg value)))))
  
  
  (defun display-svg (value)
    "Display VALUE as a SVG image."
    (display-dispatch value `(("image/svg+xml" . ,(render-svg value)))))
  
  
  (defun display-json (value)
    "Display VALUE as a JSON document."
    (display-dispatch value `(("application/json" . ,(render-json value)))))
  
  
  (defun display-javascript (value)
    "Display VALUE as embedded JAVASCRIPT."
    (display-dispatch value `(("application/javascript" . ,(render-javascript value)))))
  
  
  ;;;;;;;;;;;;;;;;;
  ;;; Evaluator ;;;
  