[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
read syntax stuff
Date: Tuesday, 12 April 1983 14:56-EST
From: Norman Adams <Adams>
To: Rees
Re: read syntax stuff
Why does A'B get parsed as a single atom but A(A not?
I thought "(" was just a read macro, so what makes it a delimiter too?
"'", and also doublequote, "#", "`", and ",", are defined with
(SET (READ-TABLE-ENTRY ... #\') (LAMBDA (CH STREAM) ...)),
whereas "(", and also ")" and ";", are defined with
(SET (READ-TABLE-ENTRY ... #\()
(NOT-CONSTITUENT (LAMBDA (CH STREAM) ...))).
I don't see any reason not to release the NOT-CONSTITUENT procedure,
which coerces a constituent read-macro procedure to a non-constituent
one. Sure, it's a little kludgey, but so are read-macros.
Another thing that should probably be released is the procedure
READ-DELIMITED-SYMBOL, which implements the Maclisp/Franz/Common Lisp/Lisp
Machine Lisp vertical bar symbol syntax. E.g. if
(SET (READ-TABLE-ENTRY (REPL-READ-TABLE) #\|) READ-DELIMITED-SYMBOL)
then "|foo|" will read as a symbol whose print name is "foo". Actually
this will probably be part of a more general Maclisp/Franz reader
compatibility package.
Please send replies, criticisms, and suggestions to T-Discussion@Yale,
not to T-Users.