Opened 13 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 Jim Ursetto)

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 13 years ago by Jim Ursetto

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).

comment:2 Changed 13 years ago by Jim Ursetto

Component: extensionscore libraries
Description: modified (diff)
Owner: changed from Jim Ursetto to felix winkelmann
Status: newassigned
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> '|#?|
 ; => |#?|
Note: See TracTickets for help on using tickets.