/* DOG_GRAMMAR.PL					*/

s --> np, vp.

np --> n.
np --> adj, n.
np --> adj, adj, n.
np --> det, n.
np --> det, adj, n.
np --> det, adj, adj, n.

vp --> v, np.
vp --> v, pp.

pp --> p, np.

det --> [the].
det --> [a].
det --> [an].

n --> [dogs].
n --> [fox].
n --> [jumps].

adj --> [quick].
adj --> [brown].
adj --> [lazy].

v --> [jumps].
v --> [runs].

p --> [over].
p --> [onto].
p --> [in].
p --> [under].

/* Generate all sentences */

loop:- s(S,[]), write(S), nl, fail.
