[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
We currently don't say anything about datum labels, a capability in R7RS. I propose this text for the SRFI:
"A sweet-expression reader MAY implement datum labels with syntax #number=datum. If the first character after the equal sign is not whitespace, such a reader SHOULD read it as a neoteric-expression. If the first character after the equal sign is whitespace, a datum reader MAY reject it. A reader MAY also accept a datum label that is an initial expression of a head production (see the BNF below), with a trailing space or tab, as labelling the rest of the sweet-expression."
I've modified the sample implementation so that it supports datum labels, but only if #NUMBER= is followed by non-whitespace (in which case it calls the neoteric-reader). Implementing a sweet-expression reader after the "=" is a lot more work, and I don't think we need to try to do that since users can always use neoteric-expressions. I think datum labels are just too specialized to work that hard at implementing them in other cases; we just need to reserve a syntax so that we COULD add it later.
Well, anyway, that's my position. Any objections or agreements?
--- David A. Wheeler