(zodiac:read input location script? first-column) -> (-> (union read eof))
input = (current-input-port) : (union input-port (-> TST))
location = (make-zodiac 1 1 0) : zodiac-location
script? = #t : boolean
first-column = 1 : exact-integer
When invoked, the reader returns a thunk. Repeatedly invoke this
thunk to obtain a series of zodiac:read objects until an zodiac:eof is
returned. The names and the functionality of the optional arguments
to the reader, in turn, are:
- input
- This argument can be either an input port or a
thunk from which to take the input. The thunk should return a
zodiac:char, zodiac:eof or an object appropriate for zodiac:external.
- initial-location
- The location used for the first character
read from the port; subsequent characters are appropriately offset
from it.
- script?
- Whether or not the file is a script. In a script, if
the first two chars from port are
#!, then the reader will
treat the first line as a comment. (This comment can span multiple
lines if each preceding line ends in a \ before the newline.)
- first-column
- The first column of each line is can be changed
by this argument. This is useful for treating the entire file as if
it were indented by some amount. Note that this parameter is
unrelated to the initial location parameter.
NOTE: It is an error to perform read-char on any port passed to
the reader, since this may interfere with its operation.