cisco / ChezScheme

Chez Scheme
Apache License 2.0
6.95k stars 982 forks source link

The R6RS reader does not treat # as a delimiter for numbers #687

Open mnieper opened 1 year ago

mnieper commented 1 year ago

In the lexical syntax of R6RS, the # character is a delimiter (the rationale for this is, I think, that this excludes comments within identifiers and numbers). In particular, the input 3#f should be tokenized into the lexemes 3 and #f. A transcript of the Chez Scheme REPL, however, shows the following:

> (let ([p (open-string-input-port "#!r6rs 3#f")])
     (get-datum p))
Exception in get-datum: 3#f symbol syntax is not allowed in #!r6rs mode at char 7 of #<input port string>