[previous] [up] [next]     [index]
Next: Argument Lists Up: Zodiac Previous: Scanner

Reader

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 [cross-reference]. All other values are elements of zodiac:read[footnote]:

read : zodiac (object)

The reader's output is sub-divided into scalar and sequence objects[footnote]:

scalar : read ()

sequence : read (length)

Most of these sub-types should be self-explanatory:

zodiac:string : read ()

zodiac:boolean : read ()

zodiac:number : read ()

zodiac:symbol : read (orig-name marks)

zodiac:char : read ()

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 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[footnote].





PLT