Where's the giving of items blocked?

This doesn’t work:

the demo is a room. 

The hole is a fixed in place container in the demo. 
The mouth is a thing in the hole.
the player is carrying an apple. 

instead of giving something to the mouth, try inserting the noun into the hole.

test me with "give apple to mouth";

That doesn’t work, bummer. I’m not surprised. But even with “rules” and “actions” turned on, you get no information about where the “you can only do that to something animate” is coming from.

Why is that?

I can probable figure it out myself but I suspect somebody here can explain this better than my guesswork.

Look in the Standard Rules: it’s a check rule, the can’t give to a non-person rule.

Yes, that’s what I though too. But then why isn’t it shown as a rule when you do “rules”?

Also, I tried this

The can't give to a non-person rule is not listed in any rulebook.
The block giving rule is not listed in any rulebook.

but I still get

“You can only do that to something animate” is a parser error, not a check rule. It arises because the give action is defined as

“give [something preferably held] to [someone]”

To work around it, you’ll have to wipe and redefine the “give” grammar. Or else give the mouth the (I6-level) “animate” property.

Just adding the new grammar line Understand "give [something preferably held] to [something]" as giving it to. seems to work, too. Is that a risky way of doing it for some reason?

Having two grammar lines that match the same objects can cause disambiguation to be more limited than it should be. I avoid it, generally. Might not be a big deal in this case, though.

Of course, the grammar definition itself! That’s why no rules or actions fire at all, that makes total sense.

BTW, apparently you need to understand synonyms “as something new” and then as the verb again, or they will keep the old definition. So unless you do that you will still not be able to “offer” something to a thing.

Here’s the complete working code, which admittedly is doing a very silly thing indeed. It’s part of a grander thing, which is very slightly less silly and may one day be offered to the world as an example in a forthcoming “More Computers” extension (working title).

The demo is a room. 

The hole is a fixed in place container in the demo. 
The mouth is a thing in the hole.
The player is carrying an apple and some pocket fluff. The apple is edible.

[
You can't normally give things to things, only to people. This is because the 
grammar rule (in section Section SR4/10 - Grammar in the Standard Rules) is this:
understand "give [something preferably held] to [someone]" as giving it to.

This is a rewriting of the "give" verb and its synonyms:
]
Understand the command "give" as something new.
Understand "give [something preferably held] to [something]" as giving it to.
Understand "give [something] [something preferably held]" as giving it to (with nouns reversed).
Understand the command "pay" and "offer" and "feed" as something new.
Understand the commands "pay" and "offer" and "feed" as "give".

Instead of giving something to the mouth, try inserting the noun into the hole.
Instead of inserting something into the mouth, try inserting the noun into the hole.

Check inserting something which is not edible into the hole:
	say "Putting inedible things in there is clearly not a good idea.";
	stop the action.

After inserting something into the hole:
	say "Munch munch. [The noun] is gone.";
	now the noun is off-stage.
	
Test me with "offer the apple to the mouth";

This discussion helped me nail down a similar problem–namely, how to “remove” something that wasn’t an article of clothing. There was a similar solution in it–I was looking in the standard rules, but not quite right–so thanks, all.

I’m starting to think that having kinds in grammar lines is an anti-pattern, except when you want the one verb to be used for many actions. So in Kerkerkruip we have “use [weapon]”, “use [granade]”, “use [clothing]”, “use [ment]”. In other situations checking for the right kind should be a check rule.

Sargent cries!

You can set up a grammar line that covers several kinds, although it’s awkward. For example:

Definition: a thing is usable if it is a weapon or it is a grenade or it is clothing.
Understand “[any usable object]” as “[usable-spec]”.
Understand “use [usable-spec]” as using.

Then the action rules can divvy up the various noun kinds in the usual way. Either have “carry out using a grenade” rules (etc), or something like “check using a grenade: instead try grenade-using the noun” if you want different actions on the back end.

But normally, of course, you’d just say “use [something]”. I only use this multi-kind trick when I have several special kinds. E.g., in HL I have rituals and incantations, which are special classes outside the normal world-model. They are only in-scope for particular verbs (“chant”, “perform”, etc.)

I’m late to this thread but would it not be neater to use an instead for one weird case like this?

Instead of giving something to the mouth, try inserting the noun into the mouth.

Instead rules do not bypass the requirements of the grammar definition.