DirectiveListener
A ClauseListener refinement that further dispatches Directives (:- Goal clauses) depending on which of patterns their body unifies with, rather than treating every directive alike via ClauseListener.onDirective.
See also
for the concrete set of ISO/implementation-defined directive patterns 2P-Kt recognizes.
Inheritors
Properties
Functions
Link copied to clipboard
Tries to unify directive's body against each of patterns, in order; on the first match, delegates to listenDirectiveMatchingPattern, otherwise falls back to ClauseListener.onDirective.
Link copied to clipboard
open fun listenDirectiveMatchingPattern(directive: Directive, pattern: Term, unifier: Substitution.Unifier)
Invoked by listenDirective on a match; by default just forwards to onDirectiveMatchingPattern.
Link copied to clipboard
Link copied to clipboard
abstract fun onDirectiveMatchingPattern(directive: Directive, pattern: Term, unifier: Substitution.Unifier)