[previous] [up] [next]     [contents] [index]
Next: Procedures Up: Reader Previous: Reader

Types

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 eof, as defined in Section 4.2.1. All other values are elements of 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:

string : read ()

boolean : read ()

number : read ()

symbol : read (orig-name marks)

char : read ()

list : sequence (marks)

vector : sequence ()

improper-list : sequence (period marks)

In the case of scalar objects, the object field contains the Scheme representation of that object. All sequence objects have a list of read objects in their object field; in the case of improper-list, the length of this list is one greater than the number of pairs that constitute the list.

The period field contains a 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