MantisBT - Core Inform
View Issue Details
0001028Core InformUnderstandingpublic2012-10-14 22:552014-05-07 07:33
otistdog 
graham 
normalcosmeticalways
closedfixed 
x86Windows7
6G60 
6L02 
(cosmetic) Error message is badly worded
0001028: Problem message about grammar token '[topic]' offers unusable advice
Use of the token '[topic]' in an instead rule for the answering it that action fails to compile, with an error message indicating that the proper convention is to use the '[text]' token. (See add'l information, first section, for an example.) However, trying to follow this advice results in a different problem message indicating the '[text]' token is not allowed. (See add'l info, second section, for an example.)

It appears the correct syntax is to use the keyword "something" in the rule definition, as in "Instead of answering Coach that something...". Can the problem messages be updated to reflect this?
"A Bug Report Example" by Otis

Gym is a room.

Coach is a person in Gym.

[Comment out first rule below and uncomment second rule to see result of following first problem messages's advice.]

Instead of answering Coach that "[topic]" (this is the Coach doesn't really hear you rule):
say "Coach nods absently."

[
Instead of answering Coach that "[text]" (this is the Coach doesn't really hear you rule):
say "Coach nods absently."
]
[first section]

This is the report produced by Inform 7 (build 6G60) on its most recent run through:


Problem. The grammar token 'topic' in the sentence 'Instead of answering Coach that "[topic]" (this is the Coach doesn't really hear you rule)' would in some ways be the right logical way to suggest 'any words at all here', but (partly for historical reasons) Inform in fact uses the special syntax '[text]' for that.

 See the manual: 16.1 > Understand


=======================================================

[second section]

This is the report produced by Inform 7 (build 6G60) on its most recent run through:


Problem. You wrote 'Instead of answering Coach that "[text]" (this is the Coach doesn't really hear you rule)' : but the '[text]' token is not allowed with 'matches' or in table columns, as it is just too complicated to sort out: a '[text]' is supposed to extract a snippet from the player's command, but here we already have a snippet, and don't want to snip it further.

 See the manual: 16.1 > Understand

No tags attached.
Issue History
2012-10-14 22:55otistdogNew Issue
2012-10-16 08:24EmacsUserStatusnew => confirmed
2012-10-16 08:24EmacsUserCategoryRules and rulebooks => Understanding
2014-01-24 03:29grahamStatusconfirmed => resolved
2014-01-24 03:29grahamResolutionopen => fixed
2014-01-24 03:29grahamAssigned To => graham
2014-05-07 07:32jmcgrewFixed in Version => 6L02
2014-05-07 07:33jmcgrewStatusresolved => closed

There are no notes attached to this issue.