Question: 7. Extend your parser/interpreter from exercise 5 to handle simple imperative sentences of the form Put NP on NP where NP is a noun phrase.
7. Extend your parser/interpreter from exercise 5 to handle simple imperative sentences of the form “Put NP on NP” where NP is a noun phrase. For example, the following are syntactically well-formed imperative sentences:
Put a green pyramid on the small red cube.
Put an orange wedge on the block beside a red cube.
Put any small block on a green cube on the big red cube.
The effect of parsing and interpreting sentences such as these should be to update the scene using the put_on predicate from exercise 6.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
