2020-03-19 02:11:25 +02:00
|
|
|
Title: The Inform 7 compiler
|
|
|
|
Author: Graham Nelson
|
|
|
|
|
2020-04-14 19:56:54 +03:00
|
|
|
@ The task of the Inform 7 compiler is to take natural-language source text
|
|
|
|
and "transpile" to down to lower-level, more orthodox code which another
|
|
|
|
compiler can take the rest of the way. Usually, but not necessarily, that
|
|
|
|
other compiler is the typeless but otherwise C-like Inform 6 (1996-2003).
|
2020-04-08 01:02:44 +03:00
|
|
|
|
2020-04-14 19:56:54 +03:00
|
|
|
Inform offers three compiler tools: //inbuild//, //inform7//
|
|
|
|
and //inter//. These represent the front end (build control, resource
|
|
|
|
management), the middle part (actual compilation), and the back end (code
|
|
|
|
generation, assimilation of kits), but really they are three points of access
|
|
|
|
to the same code base. See //inbuild: Manual//, //inform7: Manual//, //inter: Manual//
|
|
|
|
and //inbuild: Reference Card//, //inform7: Reference Card//, //inter: Reference Card//.
|
2020-03-19 02:11:25 +02:00
|
|
|
|
2020-04-14 19:56:54 +03:00
|
|
|
Each tool has its own CLI (or "command-line interface") but is otherwise
|
|
|
|
divided up into "modules", many shared between two or even all three tools.
|
|
|
|
//inform7// contains every module, and is thus the entire compiler, whereas
|
|
|
|
the other tools are subsets of it:
|
|
|
|
= (hyperlinked text as BoxArt)
|
|
|
|
INBUILD INFORM7 INTER
|
2020-04-08 01:02:44 +03:00
|
|
|
+-------------+ +-------------+ +-------------+
|
2020-04-14 19:56:54 +03:00
|
|
|
| //inbuild// | | //inform7// | | //inter// |
|
|
|
|
| (cli) | | (cli) | | (cli) |
|
2020-04-08 01:02:44 +03:00
|
|
|
+---+.............+----------+.............+---+ | |
|
2020-04-14 19:56:54 +03:00
|
|
|
| //supervisor//-module | | |
|
2020-04-08 01:02:44 +03:00
|
|
|
+---+.............+----------+.............+---+ | |
|
|
|
|
| | | | | |
|
|
|
|
| | +---+.............+---+ | |
|
2020-04-14 19:56:54 +03:00
|
|
|
| | | //core//-module | | |
|
|
|
|
| | | //inflections//-module | | |
|
|
|
|
| | | //linguistics//-module | | |
|
|
|
|
| | | //problems//-module | | |
|
|
|
|
| | | //kinds//-module | | |
|
|
|
|
| | | //if//-module | | |
|
|
|
|
| | | //multimedia//-module | | |
|
|
|
|
| | | //index//-module | | |
|
2020-04-08 01:02:44 +03:00
|
|
|
| | +---+.............+---+ | |
|
|
|
|
| | | | | |
|
|
|
|
| | +---+.............+----------+.............+---+
|
2020-04-14 19:56:54 +03:00
|
|
|
| | | //bytecode//-module |
|
|
|
|
| | | //building//-module |
|
|
|
|
| | | //codegen//-module |
|
|
|
|
+-------------+ +----------------------------------------------+
|
|
|
|
+-----------------------------------------------------------------------+
|
|
|
|
| SHARED shared //syntax//-module |
|
|
|
|
| shared //words//-module |
|
|
|
|
| shared //arch//-module |
|
|
|
|
| shared //html//-module |
|
|
|
|
+-----------------------------------------------------------------------+
|
|
|
|
+-----------------------------------------------------------------------+
|
|
|
|
| FOUNDATION //foundation//-module (in inweb repository) |
|
2020-04-08 01:02:44 +03:00
|
|
|
| (Posix or Windows-related functions) |
|
|
|
|
| (standard C library) |
|
2020-04-14 19:56:54 +03:00
|
|
|
+-----------------------------------------------------------------------+
|
2020-04-08 01:02:44 +03:00
|
|
|
=
|
2020-04-14 19:56:54 +03:00
|
|
|
The three tools each use a "shared" library, made up of four modules
|
|
|
|
providing services useful for natural language-based programs. At one time
|
|
|
|
this was going to be called "Second Foundation" (or possibly "Foundation
|
|
|
|
and Empire"), because there is also //foundation// underneath, a C library
|
|
|
|
of utility functions provided by the //inweb// project.
|