File "fancy"

This module allows the colorizing of Prolog texts inside a HTML page. By extending the scanner from the Prolog system we read tokens and fillers. These are then rendered using various character style classes. Multi-line tokens and fillers are broken up and newline characters are inserted. This allows a colorizing target which is a pre HTML element.

The same colorizing of tokens is also used when the predicate write_term/[2,3] is called with the colorized option set to true. As a convenience we provide the additional predicate print_term/[2,3] and display_term/2,3] which do check the flags of the output stream to enable certain features. Besides colorizing we also offer cycle breaking.

The following fancy predicates are provided:

print_term(T, O):
print_term(S, T, O):
The predicate succeeds. As a side effect the term T is written with colorize(true) and the options O. The ternary predicate allows specifying an output stream S. The colorize(true) option is not used if the stream has flag MASK_DST_COLR missing.
display_term(X, O):
display_term(S, X, O):
The predicate succeeds. As a side effect the term X is printed as T, E1, .., En where T is a skeleton and L = [E1, .., En] is a list of equations, so that L applied to T gives identical X. The binary predicate allows specifying an output stream S. The cycle breaking is not used if the stream has flag MASK_DST_CYCL missing.

Use Privacy (c) 2005-2026 XLOG Technologies AG