Blame | Last modification | View Log | RSS feed
/* A simple grammar for English sentences *//* after Clocksin & Mellish, 4th edition, pages 204ff */sentence(X) :- np(Y), vp(Z), append(Y,Z,X).np(X) :- determiner(Y), noun(Z), append(Y,Z,X).vp(X) :- verb(Y), np(Z), append(Y,Z,X).vp(X) :- verb(X).determiner([the]).noun([cat]).noun([dog]).verb([chases]).verb([eats]).verb([sings]).