Appropriate topic for IFWiki? (Inside Infocom Games)

I’ve written a big technical white paper on the basic internal workings of Infocom games (in general). It talks about things like the layout of the parsing system, how objects are found, and how syntax entries are matched. It basically fills in the gap between the article “Learning ZIL - or - Everything You Always Wanted to Know About Writing Interactive Fiction But Couldn’t Find Anyone Still Working Here to Ask” and the games themselves. It also talks a bit about how these routines and functions have changed with different games.

I’m just curious if this is something appropriate for IFWiki? Otherwise, I’d probably just make a blog about it or maybe just a massive PDF.

1 Like

I’d certainly be interested in reading it regardless of where and how it’s published.

1 Like

Blog it then link it to ifwiki. Add your blog to planet-if as well.


I would like to read it too, about how the parser and other things are work. I seem to remember I have read somewhere that Infocom’s YZIP games use LALR(1) parsing; presumably that is the reason for the new stack operations in YZIP (although I do not actually know). I don’t know what the older games use, though.

1 Like is a repository of such information, and we’d welcome that addition.


I don’t have the technical background to distinguish if the Infocom parser uses a LALR parsing method. If someone can provide some concrete examples of how to tell the difference, I can try to figure that out. However, the parser mechanics really haven’t changed much from ZIP 1 through XZIP (ZIP 5) games. They are able to recognize more special cases where the command given is not matched against the allowed syntaxes (such as an OOPS command).

Sounds good. I’ll try to get it up in blog form and link it to other sites. Thanks.

Interesting! I’ve written a few blog posts about how those operate in ZILF, so I’m looking forward to comparing the analyses:

Part 1: The ideal sentence
Part 2: Noun phrases
Part 3: From noun phrase to object

Just skimming through your posts, it looks like the analysis will be similar though maybe a bit more detailed in sections (maybe too detailed).

For everyone else, I’ve created a blog to slowly post up all the sections on to it: Internal Secrets of Infocom Gamesl

Right now, it only contains basic info about the ZIL and game data structures. All of this has been described by others. But Chapter 4 does describe the overall looping of the various functions that make up the game.


So all 19 chapters regarding the structure and methods of Infocom Games have been posted at .

Sorry about any errors. I tried to keep them to a minimum during the editing. This maybe moved to a Wiki pages which seems to me to be a more appropriate place.

I was just reminded about this blog series. I’m late, but let me now say what a great series this is! I really appreciate the level of analysis.

I see that Roman Bartke has compiled the posts into a PDF: GitHub - ZoBoRf/InternalSecretsOfInfocomGames: Inside Infocom Games

Repeating what I said above: we’d welcome this document being uploaded to the IF Archive, if the author is amenable. (I don’t think it ever got posted on IFWiki.)


I’ve actually created a personal Wiki for all of this running on a home computer and have been updating it. I’ll see about getting an updated PFD created.

I’m also in the process of doing similar analysis for all of the text based Infocom games. So far, I’ve done 14 of the 35 games. But I admit the page styles have morphed over the months. Once I can find a more stable platform to deposit it, then I can release it.


Great stuff and very interesting. BTW, i don’t think this is an off-topic discussion :slight_smile:

Since people here know things, I’d like to ask:

To what extend did the parser resolve items due to context (ie against the world state). One example covered is get key will resolve to a key not carried.

What about things like get key in the bag to resolve a particular key.

Also was there support for possessives, eg get Gandalf's hat and pull the dog's tail or even pull the tail of the dog.

The write ups talk about resolving objects with one adjective. What happens when two are provided, eg punch the big fat oaf.

What about “double nouning” (not sure what the grammatical term is), when you use two nouns that aren’t adjectives to specify a noun.
eg. talk to king Henry. Where “king” and “Henry” are nouns (in fact refer to same object), but you don’t really want “king” also as an adjective (or did you have to make “king” an adjective for this to work).

Agreed. This is an older thread but I’ve moved it to Essays.

I’m not as much of an expert on the system as OP is, but I’ve explored the source of Infocom games and I can try to answer these questions. OP can feel free to correct me if I’m wrong.

  • There are two ways to fine-tune noun resolutions. You can use one of four special flags which tell the parser where in the containment model to look. So TAKE includes the flags IN-ROOM and ON-GROUND, which mean “in a container in the room” and “directly in the room” - deprioritizing the objects in the player’s inventory. (There are three other search flags as well but they do different things.)
    The parser can also search for any of the flags - boolean properties - defined on the object itself. An example from Seastalker is FIX OBJECT WITH OBJECT (FIND TOOLBIT). This disambiguates to resolve an object marked as a tool, if possible. You can find out more on page 106 of this document.

  • The games do allow locative phrases with TAKE; however this is handled as part of the TAKE verb and not as a general rule, and I don’t think it’s useful for disambiguation (EDIT: This is wrong; those versions of the syntax use different search flags). Also, the specific phrasing IN LOCATION doesn’t work in some games. (FROM LOCATION and OUT OF LOCATION always work.)

  • Yes, these are treated as adjectives. Note that the games don’t contain any built-in possession relation (beyond the containment hierarchy) so these must all be hand-coded. It’s possible in theory to make objects which change possessives as the person carrying them changes, (because it’s possible to alter adjectives in play, as seen in Spellbreaker), but would take some work. No support for OF phrases as far as I know.

  • The player can provide multiple adjectives. (I just ran some tests and determined they can use a maximum of 4 as of Seastalker.) (The reason I was able to run that test is because Seastalker has at least one object which provides 7.)

  • You do have to make KING an adjective in this example. Note that it’s quite acceptable to use the same word as an adjective and a noun.

As a closer, here’s part of an object definition from Seastalker:

	(DESC "magazine")

Notice how MAGAZINE is listed in both the ADJECTIVE and SYNONYM fields. This allows the player to type LOOK AT THE MAGAZINE COVER and have it interpreted as a reference to the magazine. Also note TIP’S as a possessive, because the magazine belongs to Tip and he has it at the start of the game. (The use of the surname seems poorly considered; ignore that.)

Thanks for the detailed answers. Appreciated!

On a closer look, it is useful for disambiguation in that the locative version of the TAKE syntax has different search flags set (only the ones that include containers). So I was wrong about that.

I would only add that many games will hard code checks of valid combinations of multiple adjectives or multiple words that can be a noun and adjective. The specific actions (like TAKE or EAT, etc) will check for these very specific combos. The routines do not try to be smart and figure out the proper context.

I can’t say for all the games, but many of the early games (ZIP version 1 to 3) only use the last given adjective with multiple ones are given.