7. Extend your parser/interpreter from exercise 5 to handle simple imperative sentences of the form Put NP

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. 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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: