% file: parse
% query: s(P, [the,frog,sat,on,the,lilypad], [])?

dcg!
s(s(NP,VP)) --> np(NP), vp(VP).
np(np(Det,Noun)) --> det(Det), noun(Noun).
vp(vp(V)) --> v(V).
vp(vp(V,PP)) --> v(V), pp(PP).
pp(pp(Prep,NP)) --> prep(Prep), np(NP).
det(det(the)) --> [the].
noun(noun(frog)) --> [frog].
v(v(jumped)) --> [jumped].
v(v(sat)) --> [sat].
prep(prep(on)) --> [on].
noun(noun(lilypad)) --> [lilypad].

