1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-06-26 04:00:43 +03:00
inform7/docs/intern.html
2022-04-28 17:37:28 +01:00

164 lines
13 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Navigation page for Inter</title>
<link href="docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
<meta name="viewport" content="width=device-width initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-gb">
<link href="docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
</head>
<body class="commentary-font">
<nav role="navigation">
<h1><a href="index.html">
<img src="docs-assets/Inform.png" height=72">
</a></h1>
<ul><li><a href="index.html"><span class="selectedlink">home</span></a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="structure.html">structure</a></li>
<li><a href="inbuildn.html">inbuild</a></li>
<li><a href="inform7n.html">inform7</a></li>
<li><span class="unlink">inter</span></li>
<li><a href="services.html">services</a></li>
<li><a href="secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="inblorbn.html">inblorb</a></li>
<li><a href="indocn.html">indoc</a></li>
<li><a href="inform6.html">inform6</a></li>
<li><a href="inpolicyn.html">inpolicy</a></li>
<li><a href="inrtpsn.html">inrtps</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="extensions.html">extensions</a></li>
<li><a href="kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="docs-assets/github.png" height=18> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="../../inweb/index.html">inweb</a></li>
<li><a href="../../intest/index.html">intest</a></li>
</ul>
</nav>
<main role="main">
<!--Weave of 'Navigation page for Inter' generated by Inweb-->
<div class="breadcrumbs">
<ul class="crumbs"><li><a href="index.html">Home</a></li><li><b>Navigation page for Inter</b></li></ul></div>
<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>Inter is Stages 6 and 7 of the core Inform compiler, but can also be run as a
stand-alone tool. See <a href="structure.html" class="internal">structure</a> for the bigger picture: Inter handles
only these parts of the compilation flow &mdash;
</p>
<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax"> </span><span class="element-syntax">kit</span><span class="plain-syntax"> </span><span class="element-syntax">sources</span>
<span class="plain-syntax"> (</span><span class="element-syntax">in</span><span class="plain-syntax"> </span><span class="element-syntax">Inform</span><span class="plain-syntax"> </span><span class="constant-syntax">6</span><span class="plain-syntax"> </span><span class="element-syntax">code</span><span class="plain-syntax">)</span>
<span class="plain-syntax"> |</span>
<span class="plain-syntax"> | </span><span class="function-syntax">INTER</span>
<span class="plain-syntax"> \|/</span>
<span class="plain-syntax"> </span><span class="element-syntax">precompiled</span>
<span class="plain-syntax"> </span><span class="element-syntax">Inter</span><span class="plain-syntax"> </span><span class="element-syntax">trees</span>
<span class="plain-syntax"> .</span>
<span class="plain-syntax"> .</span>
<span class="plain-syntax"> . . . . . . . </span><span class="element-syntax">precompiled</span><span class="plain-syntax"> </span><span class="element-syntax">Inter</span><span class="plain-syntax"> </span><span class="element-syntax">tree</span>
<span class="plain-syntax"> </span><span class="element-syntax">Inter</span><span class="plain-syntax"> </span><span class="element-syntax">trees</span><span class="plain-syntax"> </span><span class="element-syntax">from</span><span class="plain-syntax"> </span><span class="element-syntax">inform7</span>
<span class="plain-syntax"> \ /</span>
<span class="plain-syntax"> \ / </span><span class="function-syntax">INFORM7</span><span class="plain-syntax"> </span><span class="element-syntax">Stage</span><span class="plain-syntax"> </span><span class="constant-syntax">6</span><span class="plain-syntax"> </span><span class="element-syntax">or</span><span class="plain-syntax"> </span><span class="function-syntax">INTER</span>
<span class="plain-syntax"> \|/ \|/</span>
<span class="plain-syntax"> </span><span class="element-syntax">single</span><span class="plain-syntax"> </span><span class="element-syntax">linked</span><span class="plain-syntax"> </span><span class="element-syntax">Inter</span><span class="plain-syntax"> </span><span class="element-syntax">tree</span>
<span class="plain-syntax"> / | \</span>
<span class="plain-syntax"> / | \ </span><span class="function-syntax">INFORM7</span><span class="plain-syntax"> </span><span class="element-syntax">Stage</span><span class="plain-syntax"> </span><span class="constant-syntax">7</span><span class="plain-syntax"> </span><span class="element-syntax">or</span><span class="plain-syntax"> </span><span class="function-syntax">INTER</span>
<span class="plain-syntax"> \|/ \|/ \|/</span>
<span class="plain-syntax"> </span><span class="element-syntax">Inform</span><span class="plain-syntax"> </span><span class="constant-syntax">6</span><span class="plain-syntax"> </span><span class="element-syntax">code</span><span class="plain-syntax"> </span><span class="element-syntax">C</span><span class="plain-syntax"> </span><span class="element-syntax">code</span><span class="plain-syntax"> </span><span class="element-syntax">index</span><span class="plain-syntax"> </span><span class="element-syntax">mini</span><span class="plain-syntax">-</span><span class="element-syntax">website</span>
</pre>
<p class="commentary">Used as a stand-alone tool at the command line, however, Inter is more
flexible and interesting. See the <a href="inter/M-ui.html" class="internal">Manual (in inter)</a> and <a href="inter/M-rc.html" class="internal">Reference Card (in inter)</a>.
</p>
<ul class="items"><li>&#9679; The contents page for the Inter web is here: <a href="inter/index.html" class="internal">inter</a>.
</li><li>&#9679; The command-line interface for Inter as a stand-alone tool is implemented
at <a href="inter/1-mn.html" class="internal">Main (in inter)</a>.
</li><li>&#9679; The <a href="inter/M-ui.html" class="internal">Manual (in inter)</a> contains a full description of the intermediate format
"Inter", regarded as a language in its own right.
</li></ul>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>The <a href="bytecode-module/index.html" class="internal">bytecode</a> module provides a low-level API for creating Inter code in
memory, including definitions of every Inter construct, together with reading
and writing Inter to either binary or text files. This is also where references
between one tree and another ("plugs" and "sockets") are managed, and where
"transmigration", moving code from one Inter tree to another, is done.
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="bytecode-module/index.html" class="internal">bytecode</a>.
</li><li>&#9679; Detailed overview: <a href="bytecode-module/P-wtmd.html" class="internal">What This Module Does (in bytecode)</a>.
</li><li>&#9679; For details of how binary Inter files are currently formatted, see
<a href="bytecode-module/3-iibf.html" class="internal">Inter in Binary Files (in bytecode)</a>.
</li></ul>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>The <a href="building-module/index.html" class="internal">building</a> module sits on top of <a href="bytecode-module/index.html" class="internal">bytecode</a> and provides much more
powerful facilities for constructing Inter in memory: in particular allowing
for out-of-sequence construction which follows hierarchical location maps
made in advance. The central stages of the Inform 7 compiler generate Inter
using the <a href="building-module/index.html" class="internal">building</a> API, and not by calling <a href="bytecode-module/index.html" class="internal">bytecode</a> directly.
</p>
<p class="commentary"><a href="building-module/index.html" class="internal">building</a> also contains what amounts to a pocket-sized Inform 6 compiler
of its own. It can read code in the Inform 6 programming language's syntax
and turn that into an <span class="extract"><span class="extract-syntax">inter_schema</span></span> &mdash; in effect, an AST for Inform 6, which
is a language so different from Inform 7 that they cannot sensibly have the
same AST format. But they can indeed share Inter as an intermediate representation
or IR, and they do. <a href="building-module/index.html" class="internal">building</a> contains the code which converts <span class="extract"><span class="extract-syntax">inter_schema</span></span>
trees to Inter, a process called "assimilation", and this is the main step in
building a kit like <a href="BasicInformKit/index.html" class="internal">BasicInformKit</a> from its source.
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="building-module/index.html" class="internal">building</a>.
</li><li>&#9679; Detailed overview: <a href="building-module/P-wtmd.html" class="internal">What This Module Does (in building)</a>.
</li></ul>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>The <a href="pipeline-module/index.html" class="internal">pipeline</a> module provides a flexible processing pipeline for performing
transformations on trees of Inter code. Steps in such pipelines may include
linking trees together, or transmigrating material between them, or performing
peephole optimisation, and so on. The design here is intended to make it easy
for people to tinker, and to add new, experimental processing steps as Inform
develops.
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="pipeline-module/index.html" class="internal">pipeline</a>.
</li><li>&#9679; Detailed overview: <a href="pipeline-module/P-wtmd.html" class="internal">What This Module Does (in pipeline)</a>.
</li><li>&#9679; For documentation of the mini-language used to specify new pipelines, see
the Inter manual at <a href="inter/M-pas.html" class="internal">Pipelines and Stages (in inter)</a>.
</li></ul>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. </b>The <a href="final-module/index.html" class="internal">final</a> module provides for what is usually the final step of a pipeline:
the last step of code-generation, when the final output of Inform is written to
some text file. For example, it might output a C or Inform 6 program. <a href="final-module/index.html" class="internal">final</a>
is designed to allow for new output formats to be added as Inform develops; in
particular it contains a "vanilla" algorithm for code-generating Inter trees
to vaguely C-like, procedural languages, and this is used both for C and for
Inform 6.
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="final-module/index.html" class="internal">final</a>.
</li><li>&#9679; Detailed overview: <a href="final-module/P-wtmd.html" class="internal">What This Module Does (in final)</a>.
</li></ul>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. </b>The <a href="index-module/index.html" class="internal">index</a> module generates the mini-website called the Index for an Inform 7
project, familiar to all users of the Inform app. Note that this is done from the
Inter tree alone; all information about the program which is needed to draw up
the Index is present in the Inter tree in the form of metadata constants.
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="index-module/index.html" class="internal">index</a>.
</li><li>&#9679; Detailed overview: <a href="index-module/P-wtmd.html" class="internal">What This Module Does (in index)</a>.
</li></ul>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. </b>Inter also contains the basic <a href="../../inweb/foundation-module/index.html" class="internal">foundation</a> library and some <a href="services.html" class="internal">services</a>
modules: specifically, <a href="words-module/index.html" class="internal">words</a>, <a href="html-module/index.html" class="internal">html</a> and <a href="arch-module/index.html" class="internal">arch</a>.
</p>
<!--End of weave-->
</main>
</body>
</html>