Like the scanner, the reader returns either an end-of-file delimiter
or the actual object read. The end-of-file object is of type
zodiac:eof, as defined in Section
. All other
values are elements of zodiac:read
:
The reader's output is sub-divided into scalar and sequence
objects
:
zodiacscalar : read ()
zodiac:sequence : read (length)
Most of these sub-types should be self-explanatory:
zodiac:string : scalar ()
zodiac:boolean : scalar ()
zodiac:number : scalar ()
zodiac:symbol : scalar (orig-name marks)
zodiac:char : scalar ()
zodiac:external : scalar ()
zodiac:list : sequence (marks)
zodiac:vector : sequence ()
zodiac:improper-list : sequence (period marks)
In the case of zodiac:scalar objects, the object field contains the Scheme representation of that object. All zodiac:sequence objects have a list of zodiac:read objects in their object field; in the case of zodiac:improper-list, the length of this list is one greater than the number of pairs that constitute the list.
The zodiac:external struct may contain any scheme value in the read field, except those listed in other structures. That is, it will not be a string, boolean, number, symbol or character, but it might be a procedure, the void value, or an instance of a class.
The period field contains a zodiac:period which gives the
location of the period in the source that marks a list as being
improper. The orig-name and marks fields are used by
parsers that perform hygienic macro-expansion
.