diff --git a/docs/yap.tex b/docs/yap.tex index bdb5fb16f..709c7e30f 100644 --- a/docs/yap.tex +++ b/docs/yap.tex @@ -6395,6 +6395,7 @@ Grammar related built-in predicates: @table @code +@item @var{CurrentModule}:expand_term(@var{T},-@var{X}) @item user:expand_term(@var{T},-@var{X}) @findex expand_term/2 @syindex expand_term/2 @@ -6405,11 +6406,12 @@ Grammar related built-in predicates: This predicate is used by YAP for preprocessing each top level term read when consulting a file and before asserting or executing it. It rewrites a term @var{T} to a term @var{X} according to the following -rules: first try to use the user defined predicate +rules: first try @code{term_expansion/2} in the current module, and then try to use the user defined predicate @code{user:term_expansion/2}. If this call fails then the translating process for DCG rules is applied, together with the arithmetic optimizer whenever the compilation of arithmetic expressions is in progress. +@item @var{CurrentModule}:goal_expansion(+@var{G},+@var{M},-@var{NG}) @item user:goal_expansion(+@var{G},+@var{M},-@var{NG}) @findex goal_expansion/3 @snindex goal_expansion/3