More trouble with OOPS #11
Comments
This only exhibits when the word to be corrected is at particular positions. Correcting the first noun (the one from
When attempting to correct the word in
Also when the word to correct is the verb:
|
I've tried with the
What is the expected behaviour for the OOPS command? Which of the above are not behaving as expected? |
This is the Toyshop command record I used for the above. |
|
Having read through this issue, I have a question: The version of Uninvited in the ifarchive was compiled in 2012. Is this the version that you guys are talking about? If so, I'm not sure how its behavior is relevant to the current state of OOPS. I compiled the test program for issue #30 against 6.12.1pre today and ran a few tests. I see the same behavior correcting verbs, nouns, prepositions, and second nouns that @bignose-debian reports for Toyshop. Here's my assessment of this behavior: Verbs: "Sorry, that can't be corrected" is better than "That's not a verb I recognise", but even better would be to actually correct the verb. We should look at changing this. It might be as simple as a well-placed "oops_from = verb_wordnum;" when etype == VERB_PE. Nouns: Ok. Prepositions: Broken. See the "put balloon xyzzy car" example above. Second nouns: Generally ok, but I did notice this:
|
I think we can safely use just #30's test program. Uninvited is just where I first noticed the problem. |
Working on the second noun problem. With trace set to 2, we run the above tests again. First the
For the first line of input, we see that all tokens match up with the names of objects. For the second line, the "foo" token doesn't match up and so we see a question mark. After the
Notice how the OOPS-handling code wrote "girl" over the "to" token instead of "foo". This appears to be the cause of the problem. Something is going wrong with GIVE such that the wrong token is pointed to when a |
From grammar.h:
Notice that for these two
This seems to fix the second noun problem. I've also checked to make sure both forms work -- Why did this work? |
I'm not sure why this fix works. I'm leaving debug prints in for others to play with until I'm satisfied this fix is correct.
This partial fix is the best we can do for now. A more correct fix will have to wait for 6.12.2. I'm going to close this issue now and open a new one that better describes the problem. |
There might be some new trouble with the OOPS verb. Playing around with Uninvited, I found this:
However, misspelling the first noun and then doing OOPS works correctly.
The text was updated successfully, but these errors were encountered: