- (with-slots (connection table-buffer) m
- (if (char= #\/ (aref message 0))
- (progn
- (format t "table: ~a~%" table-buffer)
- (set-new-mode m 'play-mode)))
- ;XXX check table size
- (with-input-from-string (s (format nil "(~a)" message))
- (setf table-buffer (cons (read s) table-buffer)))))
+ (with-slots (connection parser phase) m
+ (if (xdump:parse-line parser message)
+ ;;XXX consider something like a 'pop-mode function
+ (ccase phase
+ (:meta-meta
+ (setf phase :meta-table
+ parser (xdump:make-parser))
+ (send-message connection "xdump meta table"))
+ (:meta-table
+ (setf phase :table
+ parser (xdump:make-parser))
+ (send-message connection "xdump table *"))
+ (:table
+ (set-new-mode (connection-mode connection) 'play-mode))))))