Reader syntax is what the R6RS report calls "lexical syntax" (section 4 of R6RS). Reader syntax is stuff that the `read` procedure handles. This is stuff like vectors, strings, symbols, and lists. Reader syntax is different from syntax like `(lambda (x) ...)` or `syntax-rules` (what R6RS calls the "program syntax") because reader syntax is character based.

Some of the SRFIs add new reader syntax to Scheme, and the library system in R6RS/R7RS has no way to import new reader syntax. However, some of the SRFIs also add new procedures. SRFIs that add new procedures should be given library names, because the new procedures should be stored in a library.

For example, SRFI-4 adds #u8, #s16, #u32, etc. as reader syntax for constant fixed-width vectors. It also adds u8vector-ref, s16vector-ref, u32vector-ref, etc. as procedures. SRFI-261 should give SRFI-4 a library name, because it has procedures that one could import, even if it reader syntax modifications unspecified. That is because I should be able to import `(srfi srfi-4)` or `(srfi numeric-vectors-4)` and get those procedures.

On 7/3/25 02:01, WANG Zheng wrote:
As for reader syntax, maybe you could give me some more information? I personally know some syntax within Chez Scheme's context and search engine (bing) can't directly explain it to me.

Reply via email to