Following is a summary of the steps that enable you to construct and utilitze definte clause grammars:
STEPS:
-->/2
to formulate rules.
expand_term/2
, which translates the grammar rules
into Prolog clauses.
phrase/[2,3]
to parse or generate strings.
OPTIONAL STEPS:
term_expansion/2
.
expand_term/2
and 'C'/3
.