% A direct Prolog implementation of the parser in program progpextddf1.pl
% progdcg.pl

np([toby | Words], Words).
np([scotch | Words], Words).
np([drinks | Words], Words).
v([drinks | Words], Words).

s(Input, ResultInput):- 
             np(Input, RemainingInput),
             vp(RemainingInput, ResultInput).
vp(Input, ResultInput):- 
             v(Input, ResultInput).
vp(Input, ResultInput):- 
             v(Input, RemainingInput),
             np(RemainingInput, ResultInput).