Did you know ... | Search Documentation: |
Single sided unification for Definite Clause Grammars |
Single sided unification is attractive for generative DCG rules, i.e., DCG rules that are used to serialize some term. In that context they avoid unwanted matching on variables and provide better error messages in case not all possible terms are described by the grammar. Single sided unification has no practical use for parsing because the arguments are typically output arguments.
If the head of an SSU DCG rules is a term Head, Extra
,
Extra is interpreted as a push back list if it is a
list and as an SSU guard otherwise. The guard is not
subject to DCG expansion, i.e., it is interpreted as if enclosed by {}
.