
dcg.pl -- Grammar rule (DCG) compilerThis 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.
phrase(:RuleSet, ?List)
phrase(:RuleSet, ?List, ?Rest)The following predicates are exported, but not or incorrectly documented.
call_dcg(Arg1, Arg2, Arg3)
dcg_translate_rule(Arg1, Arg2)
phrase(Arg1, Arg2, Arg3)
dcg_translate_rule(Arg1, Arg2, Arg3, Arg4)