Tutorial by Examples: dcg

DCGs can be used for parsing. Best of all, the same DCG can often be used to both parse and generate lists that are being described. For example: sentence --> article, subject, verb, object. article --> [the]. subject --> [woman] | [man]. verb --> [likes] | [enjoys]. object ...

Page 1 of 1