[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reader hacks

I am writing code for reader macros and find I need the following
(1) A predicate that is true of whitespace characters and false
    of all others.  The problem is that
	(member foo '(#\Space #\Newline))
    doesn't cover tabs, etc., and
	(member foo '(#\Space #\Newline #\Tab #\Form))
    is not completely portable because of the semi-standard
    character names.
(2) I find I can't easily write myself something akin to
    READ-DELIMITED-LIST that handles dotted lists because of
    the problem of recognizing all-dots tokens.  PEEK-CHAR can
    only peek one ahead, so I can't tell whether there is a
    space after a dot before calling READ recursively.