[r6rs-discuss] Linefeed and Line Endings
alan at alan-watson.org
Thu Jun 28 12:36:19 EDT 2007
Michael Sperber wrote:
> Alan Watson <alan at alan-watson.org> writes:
>> The response to Formal Comment #46 says:
>> > The R6RS grammar is meant to apply to a decoded stream. That is,
>> > specific bytes that represent a newline some stream are meant to be
>> > converted to the LF character in the character stream that is parsed
>> > as a program.
>> I cannot find this in section 4 of the latest draft. Is it somewhere else?
>> Related to this, shouldn't "\<line ending>" in strings be interpreted in
>> the same way as "\<linefeed>"?
> I'm confused: The grammar says something about \<line ending>, not about
> \<linefeed>. The section on "Line endings" has:
>>> In a string literal, a line ending not preceded by a \ stands for a
>>> linefeed character, which is the standard line-ending character of
There are three places this is mentioned:
(b) 4.2.1 has "\<line ending>" as a <string element>.
(b) 4.2.2 says "In a string literal, a line ending not preceded by a \
stands for a linefeed character, which is the standard line-ending
character of Scheme." and also talks about merging crlf and crnl.
(c) 4.2.7 says that "\<linefeed>" is nothing.
So, the grammar in 4.2.1 allows "\<line ending>", but I can see nothing
in 4.2.2 or 4.2.7 that say how this should be interpreted if the line
ending is not a line feed.
Also, I asked if the draft R6RS requires that source be "decoded". If it
is, then for source (but not necessarily data), all line endings will be
converted to linefeeds.
More information about the r6rs-discuss