All predicatesShow sourceapply_macros.pl

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

Source expand_phrase(+PhraseGoal, -Goal) is semidet
Source expand_phrase(+PhraseGoal, +Pos0, -Goal, -Pos) is semidet
Provide goal-expansion for PhraseGoal. PhraseGoal is either phrase/2,3 or call_dcg/2,3. The current version does not translate control structures, but only simple terminals and non-terminals.

For example:

?- expand_phrase(phrase(("ab", rule)), List), Goal).
Goal = (List=[97, 98|_G121], rule(_G121, [])).
throws
- Re-throws errors from dcg_translate_rule/2
Source expand_phrase(+PhraseGoal, -Goal) is semidet
Source expand_phrase(+PhraseGoal, +Pos0, -Goal, -Pos) is semidet
Provide goal-expansion for PhraseGoal. PhraseGoal is either phrase/2,3 or call_dcg/2,3. The current version does not translate control structures, but only simple terminals and non-terminals.

For example:

?- expand_phrase(phrase(("ab", rule)), List), Goal).
Goal = (List=[97, 98|_G121], rule(_G121, [])).
throws
- Re-throws errors from dcg_translate_rule/2
Source apply_macros_sentinel
Used to detect that library(apply_macros) is loaded into the current context explicitly. This test is used if the Prolog flag apply_macros is set to imported.