s --> np vp
np --> det n
vp --> v np
vp --> v
det --> the
det --> a
n --> man
n --> woman
v --> shoots
Define, using examples, terminals and non-terminals.
Write down a parse tree that uses the above grammar for the setence "the man shoots".
Write down the following DCG as its equivalent Prolog program.
s --> np, vp.
Write a PROLOG DCG grammaer for the langauge "a2nbn".
In English,
"she" and "he" are subject pronouns and cannot be used in object position;
"her" and "him" are object pronouns and
cannot be used in subject position.
The above grammar violates these rules. Give an example of that violation,.
Write a new grammar that passes around information of object and subject
appropriately. Hint: that grammar will contain:
Modify the grammar from the previous question so that it can return a parse
tree "s(np(det(the),n(woman)),
vp(v(shoots),np(det(a),n(man)))))" for the sentence "the woman shoots a man"