| ANSWER TO EXERCISE 20 | |
|
There are several ways to do this. The easiest is to add more grammar to the parser and let it do the hard work:
Object -> computer "computer"
with name "computer",
orders
[; Theta: print_ret "~Theta now set to ", noun, ".~";
default: print_ret "~Please rephrase.~";
],
has talkable;
...
[ ThetaSub; "You must tell your computer so."; ];
Verb "theta" * "is" number -> Theta;
|