[Giannis gave a much more succinct answer while I was typing. Here’s a very long-winded answer!]
Hi Mike! I would not recommend trying to understand Inform 7 by reading that at all… it’s a complete source code for the whole freaking compiler of an older version of Inform. (And I don’t think it was really supposed to be released, but I certainly have a copy on my computer just in case…)
The canonical reference for Inform is Writing with Inform, which is the manual that is built into the Inform app, and can also be found here. But that is a lot to read and is kind of eccentric in some ways. Don’t get me wrong–I learned the language by reading the manual over a long period of time and working through lots of the included examples. But it doesn’t work for everyone.
Carolyn VanEseltine’s QuickStart guide to Inform 7 is a good way to get started.
Anyway! For this particular issue, this has to do with Kinds of Action which are covered in WwI §7.15. The first important thing to understand is that in “Switching off the parking brake is releasing the parking brake” the two sides are not the same kind of thing at all. “Switching off the parking brake” is a description of an action, which consists of the action name “switching off” and the object “the parking brake.” (We could also have a more general description like “switching off something” or “switching off a device.”)
In this kind of declaration, “releasing the parking brake” is just the name of the kind of action and doesn’t have any logical parts. It could just as well be called “ReleasingTheParkingBrake,” or “poop di di scoop,” or something like that. It’s usable for making a rule that encompasses different actions all at once. So you can write this:
[code]The Street is a room.
A car is a thing in the street.
The parking brake is a device.
The parking brake is part of the car.
The parking brake is switched on.
Switching off the parking brake is releasing the parking brake.
Pulling the parking brake is releasing the parking brake.
Pushing the parking brake is releasing the parking brake.
Instead of releasing the parking brake, say “You’d roll downhill.”[/code]
and the Instead rule will work on all three of those actions. (You can verify that changing it to “poop di di scoop” doesn’t change the behavior, though it makes the code more confusing.)
If you want the player to be able to write the command “release parking brake,” the thing to do is to write a new “Understand” line. “Understand” lines are for things the player can type–kinds of action are just for the programmer’s internal use. This particular thing can be found in WwI §17.2, “New commands for old grammar”–which really means for old actions. If you write:
Understand "release [something]" as switching off.
then “release parking brake” will be understood as switching the parking brake off. Also “release flashlight” will be understood as switching the flashlight off.
That might be undesirable. We could take care of it by making a new action called releasing, and writing rules that redirect it appropriately. See WwI §12.7.
[code]Releasing is an action applying to one thing. Understand “release [something]” as releasing.
Instead of releasing the parking brake, try switching off the parking brake.
Instead of releasing something, try dropping the noun.[/code]
“Releasing is an action applying to one thing” defines the new action. The “Understand” line defines the command the player can type to invoke it. Then the Instead rules redirect it–the more specific one applies when the noun (basically the direct object) is the parking brake, and “try” redirects the action to switching off. For anything else, the less specific Instead rule applies, and the “try” redirects the action to dropping the noun, whatever it may be.
Hope this is somewhat helpful! There’s a lot to absorb with the language.