3 The front end ------------- 3.1 The ICL interpreter ------------------- Inform's front end is quite simple and there is little to say about it. Its task is to translate the user's compilation command into five kinds of ICL variable: switches, which are on/off flags controlling compilation options; switch settings, which are numerical values (between about 1 and 8) controlling more finely-controllable compilation options; path variables, which hold the text of some directory pathname; memory settings, which hold positive numbers (the extent of certain memory allocations within Inform); the filenames of the source code to read, and the object code to write. See "inform.c" and the memory-setting-parser in "memory.c" for the details. 3.2 Fundamental method ------------------ It is not possible, in almost any compiled language, to make a direct translation from source to object code "a line at a time": the first time a line is reached, it often cannot be finally translated until information is known which cannot yet be known. (For example, Inform translates an object's name into a number indicating its position in the final game's tree of objects. If the name comes up before the definition of the object has been seen, Inform cannot know what number to translate the name into.) Inform makes only one pass through the entire source code. The translation it makes is (roughly speaking) left blank in places, and these blanks are filled in at the very end, once the necessary information is available. This process is called "backpatching": Inform is patching things up behind itself.