Opened 14 years ago
Last modified 12 years ago
#562 closed defect
Chicken reader does not maintain quotes on |#:| — at Version 2
Reported by: | Jim Ursetto | Owned by: | felix winkelmann |
---|---|---|---|
Priority: | major | Milestone: | 4.9.0 |
Component: | core libraries | Version: | 4.6.x |
Keywords: | the colossal colon caper | Cc: | |
Estimated difficulty: |
Description (last modified by )
string->symbol on |#:| works, but reading it does not. See comment below.
This causes node (chicken read-syntax #:) to be not properly indexed. It can be accessed directly but not via the index, because the index entry looks like (: (chicken read-syntax)) instead of (|#:| (chicken read-syntax)). Although it is written out correctly initially, once the index goes through a read/modify/write cycle (on a different symbol) the |#:| becomes #: and then eventually :.
Indirectly noticed by mario.
Change History (2)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Component: | extensions → core libraries |
---|---|
Description: | modified (diff) |
Owner: | changed from Jim Ursetto to felix winkelmann |
Status: | new → assigned |
Summary: | chicken-doc does not properly index #: → Chicken reader does not maintain quotes on |#:| |
This is a bug in core. string->symbol on |#:| works, but reading it does not. It works fine for other symbols, such as |#?|. This appears to be a bug in the reader not the writer.
#;7> (string->symbol "#:") ; => |#:| (with-input-from-string "((|#:|))" read) ; => ((#:)) #;4> '((|#:|)) ; => ((#:)) #;5> '|#:| ; => #: #;12> (write '|#:|) ; => #: #;13> (write (string->symbol "#:")) ; => |#:| (with-input-from-string "((|#?|))" read) ; => ((|#?|)) #;6> '|#?| ; => |#?|
Specifically this apparently leads to a 500 internal error when doing an empty regex search on chickadee. However searching for # does not error (but does not show #:, as expected).