%Computational Linguistics II, Feb-May 1999 %Joseba Abaitua, Universidad de Deusto %------------------dcg1.dec------------------------------- %This definite clause grammar shows the constraining power of %context free grammars! %Try ?-s_bar(S_bar,[]) %or try ?-go, there are only 4 solutions %---------------------------------------------------------- conj --> [if]. pron --> [i]. v --> [profane]. p --> [with]. det --> [my]. a --> [unworthiest]. n --> [hand]. s_bar --> conj, s. s --> np, vp. vp --> v, pp. pp --> p, np. np --> pron. np --> det, a, n. %---------------------------------------------------------- go :- s_bar(S_bar,[]), write(S_bar), nl, fail.