Update of /project/climacs/cvsroot/climacs In directory clnet:/tmp/cvs-serv26555
Modified Files: c-syntax.lisp Log Message: Removed the commented-out old redisplay code of C syntax.
--- /project/climacs/cvsroot/climacs/c-syntax.lisp 2008/01/07 23:08:14 1.6 +++ /project/climacs/cvsroot/climacs/c-syntax.lisp 2008/01/07 23:09:03 1.7 @@ -801,184 +801,6 @@ (defmethod syntax-highlighting-rules ((syntax c-syntax)) *syntax-highlighting-rules*)
-#| -(define-standard-faces c-syntax - (make-face :error +red+) - (make-face :string +rosy-brown+ (make-text-style nil :italic nil)) - (make-face :keyword +orchid+ nil) - (make-face :preprocessor +purple+ nil) - (make-face :type-specifier +dark-blue+ nil) - (make-face :storage-class +dark-green+ nil) - (make-face :comment +maroon+ nil) - (make-face :number +gray50+ nil)) - -(defmethod display-parse-tree ((parse-symbol (eql nil)) stream (view textual-drei-syntax-view) - (syntax c-syntax)) - nil) - -(defmethod display-parse-tree ((parse-symbol error-symbol) stream (view textual-drei-syntax-view) - (syntax c-syntax)) - (let ((children (children parse-symbol))) - (loop until (or (null (cdr children)) - (typep (parser-state (cadr children)) 'error-state)) - do (display-parse-tree (pop children) stream view syntax)) - (if (and (null (cdr children)) - (not (typep (parser-state parse-symbol) 'error-state))) - (display-parse-tree (car children) stream view syntax) - (with-face (:error) - (loop for child in children - do (display-parse-tree child stream view syntax)))))) - -(defmethod display-parse-tree ((parse-symbol error-lexeme) stream (view textual-drei-syntax-view) (syntax c-syntax)) - (with-face (:error) - (call-next-method))) - -(defmethod display-parse-tree ((parse-symbol integer-constant-lexeme) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (with-face (:number) - (call-next-method))) - -(defmethod display-parse-tree ((parse-symbol floating-constant-lexeme) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (with-face (:number) - (call-next-method))) - -(defmethod display-parse-tree ((parse-symbol type-specifier) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (with-face (:type-specifier) - (call-next-method))) - -(defmethod display-parse-tree ((parse-symbol storage-class-specifier) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (with-face (:storage-class) - (call-next-method))) - -(defmethod display-parse-tree ((parse-symbol function-specifier) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (with-face (:storage-class) - (call-next-method))) - -(defmethod display-parse-tree ((parse-symbol type-qualifier) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (with-face (:type-specifier) - (call-next-method))) - -(defmethod display-parse-tree ((parse-symbol operator) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (with-face (:keyword) - (call-next-method))) - -(defmethod display-parse-tree ((parser-symbol c-lexeme) stream (view textual-drei-syntax-view) - (syntax c-syntax)) - (flet ((cache-test (t1 t2) - (and (eq t1 t2) - (eq (slot-value t1 'ink) - (medium-ink (sheet-medium stream))) - (eq (slot-value t1 'face) - (text-style-face (medium-text-style (sheet-medium stream))))))) - (updating-output - (stream :unique-id (list view parser-symbol) - :id-test #'equal - :cache-value parser-symbol - :cache-test #'cache-test) - (with-slots (ink face) parser-symbol - (setf ink (medium-ink (sheet-medium stream)) - face (text-style-face (medium-text-style (sheet-medium stream)))) - (write-string (form-string syntax parser-symbol) stream))))) - -(defmethod display-parse-tree ((parse-symbol complete-string-form) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (let ((children (children parse-symbol))) - (if (third children) - (with-face (:string) - (display-parse-tree (pop children) stream view syntax) - (loop until (null (cdr children)) - do (display-parse-tree (pop children) stream view syntax)) - (display-parse-tree (pop children) stream view syntax)) - (with-face (:string) - (display-parse-tree (pop children) stream view syntax) - (display-parse-tree (pop children) stream view syntax))))) - -(defmethod display-parse-tree ((parse-symbol incomplete-string-form) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (let ((children (children parse-symbol))) - (if (second children) - (with-face (:string) - (display-parse-tree (pop children) stream view syntax) - (loop until (null children) - do (display-parse-tree (pop children) stream view syntax))) - (with-face (:string) - (display-parse-tree (pop children) stream view syntax))))) - -(defmethod display-parse-tree ((parse-symbol complete-character-form) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (let ((children (children parse-symbol))) - (if (third children) - (with-face (:string) - (display-parse-tree (pop children) stream view syntax) - (loop until (null (cdr children)) - do (display-parse-tree (pop children) stream view syntax)) - (display-parse-tree (pop children) stream view syntax)) - (with-face (:string) - (display-parse-tree (pop children) stream view syntax) - (display-parse-tree (pop children) stream view syntax))))) - -(defmethod display-parse-tree ((parse-symbol incomplete-character-form) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (let ((children (children parse-symbol))) - (if (second children) - (with-face (:string) - (display-parse-tree (pop children) stream view syntax) - (loop until (null children) - do (display-parse-tree (pop children) stream view syntax))) - (with-face (:string) - (display-parse-tree (pop children) stream view syntax))))) - -(defmethod display-parse-tree ((parse-symbol preprocessor-directive-form) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (with-face (:preprocessor) - (call-next-method))) - -(defmethod display-parse-tree ((parse-symbol line-comment-form) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (with-face (:comment) - (call-next-method))) - -(defmethod display-parse-tree ((parse-symbol long-comment-form) - stream - (view textual-drei-syntax-view) - (syntax c-syntax)) - (with-face (:comment) - (call-next-method))) - -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; exploit the parse