Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002118Core InformActionspublic2020-02-12 20:302020-02-13 10:43
Reporterajmako 
Assigned To 
PrioritynormalSeveritymildReproducibilityalways
StatusconfirmedResolutionopen 
Platformx64OSWindowsOS Version8.1
Product Version6M62 
Target VersionFixed in Version 
Summary0002118: Wrong parser error is given when the noun is a person in the giving it to action
DescriptionIt appears the wrong parser error is given when the noun and second noun are mistakenly reversed in the giving it to action.

Standard Rules states: Giving it to is an action applying to one carried thing and one thing. The giving it to action translates into I6 as "Give".

Understand "give [something preferably held] to [someone]" as giving it to.
Understand "give [someone] [something preferably held]" as giving it to (with nouns reversed).

As expected, the "something preferably held" triggers an implicit take attempt if the thing being given isn't held. We also expect "someone" triggers a check to ensure the person the thing is given to is actually a person. This works fine as long as the player doesn't mix up the nouns.

If, however, the player mistakenly reverses the nouns following the first syntax (i.e. give bird to skeleton), the parser reports "You can't see any such thing." If the player mistakenly reverses the nouns following the second syntax (i.e. give skeleton bird), the parser reports "You can only do that to something animate."

This takes place before any rules in the giving it to action are processed.
Minimal Source Text To Reproduce
The Aviary is a room.

The little bird is a neuter animal in The Aviary.

The skeleton is a thing in The Aviary. It is fixed in place.

Some seeds are an edible thing carried by the player.

Test me with "x bird / x skeleton / x seeds / take bird / give seeds to bird / give bird seeds / 
give seeds to skeleton / give skeleton seeds / give bird to skeleton / give skeleton bird".
Additional InformationIf both the noun and the second noun are persons, the action processes normally. Likewise, if both are inanimate things.
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
(0004898)
ajmako (reporter)
2020-02-12 20:53

After further work the issue is not exclusive to giving it to. The same issue applies to showing it to.
(0004899)
zarf (developer)
2020-02-13 10:43

Confirmed.

I thought this might be a confusion about how scope is handled (see http://inform7.com/mantis/view.php?id=1980 [^]). But no, it is genuinely a wrong parser error.

The parser first checks the grammar line 'give' * creature held -> Give reverse. This fails with parser error CANTSEE_PE.
It then checks the grammar line 'give' * held 'to' creature -> Give. This fails with parser error ANIMA_PE.

Then it's out of grammar lines, so it reaches .GiveError. The best_etype is CANTSEE_PE, so it reports "You can't see any such thing."


- Issue History
Date Modified Username Field Change
2020-02-12 20:30 ajmako New Issue
2020-02-12 20:53 ajmako Note Added: 0004898
2020-02-13 10:43 zarf Note Added: 0004899
2020-02-13 10:43 zarf Status new => confirmed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker