Go to the first, previous, next, last section, table of contents.

Term input

Author(s): First versions from SICStus 0.6 code; additional changes and documentation by Daniel Cabeza and Manuel Carro.

Version: 1.10#6 (2004/8/7, 21:46:39 CEST)

Version of last change: 1.9#289 (2004/2/13, 19:46:27 CET)

This module provides falicities to read terms in Prolog syntax. This is very convenient in many cases (and not only if you are writing a Prolog compiler), because Prolog terms are easy to write and can convey a lot of information in a human-readable fashion.

Usage and interface (read)

Documentation on exports (read)

PREDICATE: read/1:


Like read(Stream,Term) with Stream associated to the current input stream.

PREDICATE: read/2:

Usage: read(+Stream, ?Term) * ISO *

PREDICATE: read_term/2:

Usage: read_term(?Term, +Options) * ISO *

PREDICATE: read_term/3:

Usage: read_term(+Stream, ?Term, +Options) * ISO *

PREDICATE: read_top_level/3:

read_top_level(Stream, Data, Variables)

Predicate used to read in the Top Level.

PREDICATE: second_prompt/2:

Usage: second_prompt(?Old, ?New)

Documentation on multifiles (read)

PREDICATE: define_flag/3:

Defines flags as follows:


(See section Changing system behaviour and various flags).

If flag is on (it is off by default), a variable followed by a parenthesized lists of arguments is read as a call/N term, except if the variable is anonymous, in which case it is read as an anonymous predicate abstraction head. For example, P(X) is read as call(P,X) and _(X,Y) as "(X,Y).

The predicate is multifile.

Documentation on internals (read)

REGTYPE: read_option/1:

Usage: read_option(Option)

Known bugs and planned improvements (read)

Go to the first, previous, next, last section, table of contents.