% Grammar for Covington's (1994)
% standard example fragment of English


signature(signature).

% The Phrase Structure Rules

s_rule rule
 (s)
 ===>
cat> (np, num:Num, case:nom),
cat> (vp, num:Num).


np_rule1 rule
 (np, num:Num, case:Case)
 ===>
cat> (d, num:Num),
cat> (n, num:Num, case:Case).

np_rule2 rule
 (np, num:Num, case:Case)
 ===>
cat> (pron, num:Num, case:Case).

conj_rule rule
 (np, num:Num, case:Case)
 ===>
cat> (np, case:Case),
cat> (conj, num:Num, case:Case),
cat> (np, case:Case).


vp_rule0 rule
 (vp, num:Num)
 ===>
cat>  (v, type:zero, num:Num),
cats> ([];[(pp)]).

vp_rule1 rule
 (vp, num:Num)
 ===>
cat>  (v, type:one, num:Num),
cat>  (np, case:acc),
cats> ([];[(pp)]).

vp_rule2 rule
 (vp, num:Num)
 ===>
cat>  (v, type:two, num:Num),
cat>  (np, case:acc),
cat>  (np, case:acc).


pp_rule rule
 (pp)
 ===>
cat> (p),
cat> (np, case:acc).



% The Lexicon

all   ---> (d, num:pl).
every ---> (d, num:sg).
the   ---> (d).
%empty      (d, num:pl).


dog  ---> (n, num:sg).
dogs ---> (n, num:pl).
cat  ---> (n, num:sg).
cats ---> (n, num:pl).
elephant  ---> (n, num:sg).
elephants ---> (n, num:pl).

he  ---> (pron, num:sg, case:nom).
him ---> (pron, num:sg, case:acc).
she ---> (pron, num:sg, case:nom).
her --->  (pron, num:sg, case:acc).
they ---> (pron, num:pl, case:nom).
them ---> (pron, num:pl, case:acc).


near ---> (p).

and   ---> (conj, num:pl).


walk   ---> (v, type:zero, num:pl).
walks  ---> (v, type:zero, num:sg).
amuse  ---> (v, type:one, num:pl).
amuses ---> (v, type:one, num:sg).
chase  ---> (v, type:one, num:pl).
chases ---> (v, type:one, num:sg).
see    ---> (v, type:one, num:pl).
sees   ---> (v, type:one, num:sg).
give   ---> (v, type:two, num:pl).
gives  ---> (v, type:two, num:sg).