Term input from strings

Author(s): Francisco Bueno, Daniel Cabeza, Manuel Hermenegildo, Jose F. Morales.

Stability: [devel] This implementation is incomplete


This module implements predicates for reading (parsing) terms from strings or atom codes.

Usage and interface

Documentation on exports

Usage:read_from_string(String,Term)

Read a term Term from String.

Usage:read_from_string(String,Term,Rest)

Read a term Term from String up to Rest (which is the non-parsed rest of the list).

Usage:read_from_string_opts(String,Term,Rest,Opts)

String is parsed into Term up to Rest (which is the non-parsed rest of the list). The options in Opts can be:

variable_names(Ns)
Read variable names in Ns.

Usage:read_from_string_atmvars(String,Term)

Read a term Term from String. Variables are converted to atoms with the name of the variable. It there is some rest of the string left after parsing the term, it is ignored (see read_from_string_atmvars/3).

Usage:read_from_string_atmvars(String,Term,Rest)

Read a term Term from String up to Rest (which is the non-parsed rest of the list). Unquoted uppercase identifiers (variables) are read as atoms instead of variables (thus, the read term is always ground).

Usage:read_from_atom_atmvars(Atom,Term)

Like read_from_string_atmvars/2, but reads the term Term from the atom codes in Atom.

Usage:read_from_atom(Atom,Term)

Read the term Term from the codes in the name of Atom.

Documentation on imports

This module has the following direct dependencies: