Open lassik opened 1 year ago
The algorithm of read-delimited-list
is clearly specified in the description:
read-delimited-list looks ahead at each step for the next
non-whitespace[2] character and peeks at it as if with peek-char. If
it is char, then the character is consumed and the list of objects is
returned. If it is a constituent or escape character, then read is
used to read an object, which is added to the end of the list. If it
is a macro character, its reader macro function is called; if the
function returns a value, that value is added to the list. The
peek-ahead process is then repeated.
This algorithm is quite explicit, and leaves no room for parsing a dot and then a final object, and no room to return a dotted-list.
CLHS does not say whether or not
read-delimited-list
can read dotted lists.AFAICT, it implies by omission that a dotted list is not valid. CLISP and SBCL follow this interpretation.