Documentation Prolog Predicate Reference builtin phrase/3

phrase/3

Safely execute a grammar rule from a predicate clause.

Description

phrase( :dcg_body, ?list, ?list )

phrase(DCGBody, S0, S) is true iff the grammar rule body DCGBody parses, according to the currently defined grammar rules, the list of terminals S0 unifying S with the list of the remaining terminals.

Implementation