Overloading existing non-meta verb with a meta verb?

I’d like to make ‘exit’ without a given noun execute the Quit subroutine, instead of Exit. Something like this:

Extend only 'exit' first * -> Quit;
Or perhaps

Extend replace only 'exit' * -> Quit * noun -> Exit;
However, there doesn’t seem to be a way to both extend a verb, and also make that particular verb grammar be marked as a meta verb.

I’d like to be able to toggle the availability of verbs to a player between meta-only verbs and all verbs. However, if the player types ‘exit’ while in meta-only mode, the corresponding ‘exit’ verb is unavailable, since it is not a meta verb.

Is there any way to specify individual verb grammars as meta, whilst still preserving existing non-meta verb definitions for specific grammars?

So, sort of overloading non-meta verbs with a meta-verb with the same dictionary word?

This doesn’t work, of course:

Extend meta only 'exit' first * -> Quit;

No. It’s a flag on the verb word itself. (Not the best structure, obviously.)

However, you could stick some code into the parser to set the “meta” global variable when the “action” variable is set to ##Quit. (Doing the check after “action” is set, but before it starts executing it.

Great idea. Special-casing ##Quit doesn’t seem too inelegant. Thanks!

Yeah, reverse-engineering a parser for the Inform 6 grammar files was fun. I only recently discovered the limitation of the one-to-many Verb-Grammars structure. I don’t know how else it could be arranged, unless each grammar line was registered as its own Verb, and each verb word lookup returned a list of those grammars as possible matches. But that would seem to depart from the Inform 6 design significantly.