This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/examples/dcgs/sentence.lgt
pmoura f1b417f1c3 Logtalk 2.15.2 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@812 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2003-04-02 13:57:50 +00:00

23 lines
337 B
Plaintext

:- object(sentence,
implements(parsep),
imports(determiners, nouns, verbs)).
parse(List, true) :-
phrase(sentence, List).
parse(_, false).
sentence --> noun_phrase, verb_phrase.
noun_phrase --> ::determiner, ::noun.
noun_phrase --> ::noun.
verb_phrase --> ::verb.
verb_phrase --> ::verb, noun_phrase.
:- end_object.