[plt-scheme] Cuystomizing read

From: Greg Woodhouse (gregory.woodhouse at sbcglobal.net)
Date: Sun Dec 24 13:57:22 EST 2006

I'm trying to understand the manual section (11.2) that discusses customizing the I/O handlers. I know this a kind of a pointless example, but if I wanted read to consume #true and return #t (not just consume #t and leave rue in the input buffer), how might this be done? I was looking at the section on readtables (not that I think I really understand it), but it seems this would probably require a custom lexer, anyway. Okay, so here's something simpler: What if I want to introduce a new symbol, say #m and return it as something like (special 'maybe)? Can this be done in a straightforward manner, or is it really necessary to writer a new reader from scratch?
Gregory Woodhouse 
"Mathematics is the science of patterns."
--Lynn Arthur Steen, 1988

Posted on the users mailing list.