4.14.2 How to Use the Grammar Rule Facility
Following is a summary of the steps that enable you to construct and
utilize definite clause grammars:
- Write a grammar, using
-->/2 to formulate rules.
- Compile the file containing the grammar rules. The Load
Predicates automatically translate the grammar rules
into Prolog clauses.
phrase/[2,3] to parse or generate strings.
- Modify the way in which Prolog translates your grammar rules
by defining clauses for
- In debugging or in using the grammar facility for more obscure
purposes it may be useful to understand more about
Send feedback on this subject.