| Did you know ... | Search Documentation: |
| dcg.pl -- Grammar rule (DCG) compiler |
This module provides the term-expansion rules for DCGs as well as phrase/2,3 and call_dcg/3 for calling DCGs. The original code was copied from C-Prolog and written by Fernando Pereira, EDCAAD, Edinburgh, 1984. Since then many people have modified and extended this code.
DCGs have for a long time been a moving target, notably when it comes to dealing with cuts and unification delaying for calls to non-DCG code. This has slowly converged. This implementation attempts to be closely compatible to the pending ISO standard for DCGs.
dcg_body(:DCG, ?Pos0, +Qualify, ?List, ?Tail, -Goal, -Pos) is det[private]
qualify(+QualifyInfo, +Goal, +Pos0, -QGoal, -Pos) is det[private]
dcg_extend(:Rule, ?Pos0, ?List, ?Tail, -Head, -Pos) is det[private]
dcg_bt_pos(?BraceTermPos, -Pos) is det[private]
dcg_terminal_pos(+ListPos, -TermPos)[private]
dcg_qualify_pos(?TermPos0, ?ModuleCreatingPos, -TermPos)[private]
phrase(:RuleSet, ?List)
phrase(:RuleSet, ?List, ?Rest)The following predicates are exported, but not or incorrectly documented.