An overview of the if module's role and abilities.


§1. Prerequisites. The if module is a part of the Inform compiler toolset. It is presented as a literate program or "web". Before diving in:

§2. So many plugins. This module consists entirely of plugins, and when they are all inactive, as for example with a Basic Inform project, it's as if the module does not exist at all: it does nothing.

The module is divided into four substantive parts, which form Chapters 2 to 5, and are largely independent of each other:

§3. Grammar is organised in a three-level hierarchy:

The picture is not quite so hierarchical as it looks, though, because a CG naming a token can be used as a token inside other CGs. We need to be careful that this does not lead to infinite regress: see below.