%% I saw a man on the hill with a telescope 
s(s(N,V)) --> np2(N), vp2(V).
np2(np(N)) --> pron(N).
np2(np(D,N)) --> det(D), np1(N).
np1(np(N)) --> n(N).
np1(np(N,P)) --> np1(N),pp(P).
pp(pp(P,N)) --> p(P),np2(N).
vp1(vp(V,N)) --> vp1(V),np2(N).
vp2(vp(V,P)) --> vp1(V),pp(P).
vp1(vp(V)) --> v(V).

pron(pron('I')) --> ['I'].
det(det(a)) -->[a].
det(det(the)) -->[the].
n(n(man)) --> [man].
n(n(hill)) --> [hill].
n(n(telescope)) -->[telescope].
v(v(saw)) -->[saw].
p(p(on)) --> [on].
p(p(with)) -->[with].

 