expands a term to a clause.
If Term is a grammar rule of the form (Head --> Body) then expand_term expands Term to a clause and unifies it with ExpandedTerm.
Term term ExpandedTerm clause
| 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). |
This predicate is not part of the ISO-Prolog Standard.
| scroll to top |
|