/****************************************************************
A DCG for simple English relative clauses using gap threading

This version: 13/06/03 stwa
****************************************************************/

np(F-F) --> det,n.
np(F-F) --> det,n,rel.
np(F-F) --> pn.
np(F-F) --> pn,rel.
np([gap(np)|F]-F) --> [].       

pp(F-G) --> p,np(F-G).
 
rel --> prorel,s([gap(np)|F] - F).
rel --> prorel,vp(F-F).

s(F-G) --> np(F-F),vp(F-G).     

vp(F-G) --> v(1),np(F-G).
vp(F-G) --> v(2),np(F-H),pp(H-G).


% lexicon
det --> [the].
det --> [a].

n --> [witch].
n --> [wizard].
n --> [house-elf].

p --> [to].

pn --> [harry].

prorel --> [who].

v(1) --> [likes].
v(1) --> [watches].
v(2) --> [gave].

