Update of /project/climacs/cvsroot/climacs In directory common-lisp.net:/tmp/cvs-serv18572
Modified Files: lisp-syntax.lisp Log Message: Add parsing rules for `#:' so that prolog-syntax.lisp parses OK.
Date: Mon May 30 11:00:35 2005 Author: rstrandh
Index: climacs/lisp-syntax.lisp diff -u climacs/lisp-syntax.lisp:1.1 climacs/lisp-syntax.lisp:1.2 --- climacs/lisp-syntax.lisp:1.1 Mon May 30 09:25:13 2005 +++ climacs/lisp-syntax.lisp Mon May 30 11:00:35 2005 @@ -179,6 +179,7 @@ (defclass text-lexeme (lisp-lexeme) ()) (defclass reader-conditional-positive-lexeme (lisp-lexeme) ()) (defclass reader-conditional-negative-lexeme (lisp-lexeme) ()) +(defclass uninterned-symbol-lexeme (lisp-lexeme) ())
(defmethod skip-inter ((syntax lisp-syntax) state scan) (macrolet ((fo () `(forward-object scan))) @@ -236,6 +237,8 @@ (make-instance 'reader-conditional-positive-lexeme)) (#- (fo) (make-instance 'reader-conditional-negative-lexeme)) + (#: (fo) + (make-instance 'uninterned-symbol-lexeme)) (t (fo) (make-instance 'error-lexeme))))) (t (cond ((constituentp object) (loop until (end-of-buffer-p scan) @@ -605,6 +608,22 @@
(define-lisp-action (|#- form form | t) (reduce-rule reader-conditional-negative-form 3)) + +;;;;;;;;;;;;;;;; uninterned symbol + +;;; parse trees +(defclass uninterned-symbol-form (form) ()) + +(define-parser-state |#: | (form-may-follow) ()) +(define-parser-state |#: form | (lexer-toplevel-state parser-state) ()) + +(define-new-lisp-state (form-may-follow uninterned-symbol-lexeme) |' |) +(define-new-lisp-state (|#: | form) |#: form |) + +;;; reduce according to the rule form -> #: form +(define-lisp-action (|#: form | t) + (reduce-rule uninterned-symbol-form 2)) +
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;