Scheme reader with source-location information.This library provides a reader for external representations of
Scheme objects compatible with the R7RS syntax. It has two
advantages over the standard reader in (scheme read).
Firstly, it accurately reports parsing errors by raising a
continuable exception, so that parsing can be continued after
reporting the error. Secondly, all the parsed datums are provided
with exact source locations by returning the parsed datums wrapped
in syntax objects as defined by the library (rapid syntax).
(rapid syntax). If an exception
handler handling a reader error returns, the reader continues and
tries to parse the next datum.
Returns a new source port wrapping the textual input port
port with position initialized to the start of a text
file (line number 0 and column number 1), and case-insensitivity
set according to ci?.
Returns #t if obj is a source port, and #f
otherwise.
Sets the case-insensitivity flag of source-port according to
ci?.
Sets the case-insensitivity flag of source-port.
Clears the case-insensitivity flag of source-port.
Reads the next datum available at source-port wrapped in a
syntax object.
Returns the list of syntax objects parsed from reading all external
representations in the file pathname with case-insensitivity flag set to
ci?. Context is used for syntax error objects when raised.
Reads the list of syntax objects parsed from reading all external
representations in the files filenames in the vinicity of
the syntax object context with case-insensitivity flag set
to ci?. Prepends this list in reverse order to the list
body and returns the results. The list filenames is a
list of syntax objects each wrapping a string. A syntax error is
raised if any syntax object in filenames does not wrap a
string.
By rebinding this parameter object to a custom procedure, the
behaviour of read-file and read-files-reverse
can be customized. It is expected that the new binding is a
procedure with the same signature and semantics as
read-file.