| expands a term to a clause.
expand_term(+Term, -ExpandedTerm)
If Term is a grammar rule of the form (Head --> Body) then expand_term expands Term to a clause and unifies it with ExpandedTerm.
Arguments
Term term
ExpandedTerm clause
Examples
| expand_term((eval(Z) --> expr(X), ['+'], expr(Y), {Z is X+Y}),T).
| Succeeds with unification T <-
(eval(Z,L,R) :- expr(X,L,L1), L1 = [(+)|L2], expr(Y,L2,R), Z is X+Y).
|
Standard
This predicate is not part of the ISO-Prolog Standard.
See also
phrase/2.
|