Transforms source file terms into Prolog clauses before they are compiled.
Normally called by the compiler, but can be called directly. The transform
can be customized by defining
When a source file is loaded, except by
expand_term/2 is called with the virtual clauses
beginning_of_file before and
end_of_file after the real
Prolog clauses, to give
user:term_expansion/6 an opportunity to
perform some action at the beginning and end of a source
file. Please note: the virtual clause
beginning_of_file is “seen” before any module
declaration, i.e. before the source module has been updated.
Usually called by the built-in predicates that read code and not directly by user programs.
in particular used to translate grammar rules, written with
-->/2, into ordinary Prolog clauses, written with
If Term1 is a grammar rule, then Term2 is the
corresponding clause. Otherwise Term2 is simply Term1
Prints messages for exceptions raised by