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

186 lines
12 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 Inform7</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">
<script src="http://code.jquery.com/jquery-1.12.4.min.js"
integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script src="docs-assets/Bigfoot.js"></script>
<link href="docs-assets/Bigfoot.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><span class="unlink">inform7</span></li>
<li><a href="intern.html">inter</a></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 Inform7' generated by Inweb-->
<div class="breadcrumbs">
<ul class="crumbs"><li><a href="index.html">Home</a></li><li><b>Navigation page for Inform7</b></li></ul></div>
<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>The inform7 tool is the active part of the Inform apps familiar to end users,
but it can also be run as a command-line tool outside of the app. See the
<a href="inform7/M-cu.html" class="internal">Manual (in inform7)</a> and <a href="inform7/M-rc.html" class="internal">Reference Card (in inform7)</a>.
</p>
<ul class="items"><li>&#9679; The contents page for the inform7 web is here: <a href="inform7/index.html" class="internal">inform7</a>.
</li><li>&#9679; The command-line interface for Inform as a stand-alone tool is implemented
at <a href="inform7/1-mn.html" class="internal">Main (in inform7)</a>.
</li></ul>
<p class="commentary">Note that the inform7 is the largest of the three compiler tools, since it
contains the other two tools in their entirety.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> See <a href="inbuildn.html" class="internal">inbuildn</a> and
<a href="intern.html" class="internal">intern</a> for details of those. But inform7 also contains modules of its own
which are not found elsewhere, and those are the ones described on this page.
See <a href="structure.html" class="internal">structure</a> for the bigger picture: the modules unique to inform7 perform
just one simple-looking part of the compilation flow diagram &mdash;
</p>
<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax"> </span><span class="element-syntax">syntax</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">Stages</span><span class="plain-syntax"> </span><span class="constant-syntax">2</span><span class="plain-syntax"> </span><span class="element-syntax">to</span><span class="plain-syntax"> </span><span class="constant-syntax">4</span><span class="plain-syntax">/5</span>
<span class="plain-syntax"> |</span>
<span class="plain-syntax"> \|/</span>
<span class="plain-syntax"> </span><span class="element-syntax">Inter</span><span class="plain-syntax"> </span><span class="element-syntax">tree</span>
</pre>
<ul class="footnotetexts"><li class="footnote" id="fn:1"><p class="inwebfootnote"><sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> Or at least, all except for their command-line interfaces.
<a href="#fnref:1" title="return to text"> &#x21A9;</a></p></li></ul>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>The <a href="core-module/index.html" class="internal">core</a> module is an organiser of what happens during Stages 2 to 5,
which involve very many sub-stages. It includes a form of scheduler, queueing
up individual tasks; it provides general mechanisms for issuing problem messages;
and also a "plugin" architecture enabling language features to be added. Most
Inform users think of rooms, map connections and so on as being built in to
the language itself, but internally we take the view that there is a purist
Basic Inform language dealing only in data, and then a set of plugins to add
domain-specific gadgets to that language.
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="core-module/index.html" class="internal">core</a>.
</li><li>&#9679; Detailed overview: <a href="core-module/P-wtmd.html" class="internal">What This Module Does (in core)</a>.
</li></ul>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>The <a href="assertions-module/index.html" class="internal">assertions</a> module looks at sentences in the source text outside of
rules/phrases: often copular sentences like "X is a number which varies",
but also imperative forms like "Understand ... as ..." or rule/phrase headers
such as "To ...:".
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="assertions-module/index.html" class="internal">assertions</a>.
</li><li>&#9679; Detailed overview: <a href="assertions-module/P-wtmd.html" class="internal">What This Module Does (in assertions)</a>.
</li></ul>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>The <a href="values-module/index.html" class="internal">values</a> module parses descriptions of values and their kinds, and
contains in particular the "S-parser" (parsing fragments of the AST called
"specifications"), and the Inform typechecker, a behemoth of an algorithm
called "Dash". Typechecking in Inform is quite unlike that used in most
programming languages, partly because types are often only implied in the
language, partly because natural language blurs lines between values and types
considerably in any case.
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="values-module/index.html" class="internal">values</a>.
</li><li>&#9679; Detailed overview: <a href="values-module/P-wtmd.html" class="internal">What This Module Does (in values)</a>.
</li></ul>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. </b>The <a href="knowledge-module/index.html" class="internal">knowledge</a> module manages variables, properties, instances and so
forth, and stores knowledge of differing certainty about their values in the
form of "inferences".
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="knowledge-module/index.html" class="internal">knowledge</a>.
</li><li>&#9679; Detailed overview: <a href="knowledge-module/P-wtmd.html" class="internal">What This Module Does (in knowledge)</a>.
</li></ul>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. </b>The <a href="imperative-module/index.html" class="internal">imperative</a> module is almost a compiler-within-a-compiler, since it
parses and generates Inter code from the bodies of phrase and rule definitions.
More modern compiler-concepts such as closures and generics do make tiny
appearances here, but really it's an old-school imperative compiler.
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="imperative-module/index.html" class="internal">imperative</a>.
</li><li>&#9679; Detailed overview: <a href="imperative-module/P-wtmd.html" class="internal">What This Module Does (in imperative)</a>.
</li></ul>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. </b>The <a href="runtime-module/index.html" class="internal">runtime</a> module generates Inter code for everything other than
functions. This can be quite elaborate: whereas, say, a global variable in
Inform is likely to need only a single Inter instruction, something like
a various-to-various relation may need a large body of Inter arrays,
properties or active code in order to function at runtime. <a href="runtime-module/index.html" class="internal">runtime</a> also
writes copious and diligent metadata into the Inter tree, so that the index
can later be generated, and to make the tree more fathomable to the code
generator (or other pipeline stages) later on.
</p>
<p class="commentary">While it contains no tricky or controversial algorithms, this is in some ways the
least satisfactory module in Inform, because it remains undecided exactly what
developments in linking together Inform source text may follow. Developers
should probably not assume that the conventions used by <a href="runtime-module/index.html" class="internal">runtime</a> are stable,
for the moment.<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup>
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="runtime-module/index.html" class="internal">runtime</a>.
</li><li>&#9679; Detailed overview: <a href="runtime-module/P-wtmd.html" class="internal">What This Module Does (in runtime)</a>.
</li></ul>
<ul class="footnotetexts"><li class="footnote" id="fn:2"><p class="inwebfootnote"><sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup> If we ever do go down the road of a full-on linker, issues like this would
be part of what is nowadays called "ABI stability".
<a href="#fnref:2" title="return to text"> &#x21A9;</a></p></li></ul>
<p class="commentary firstcommentary"><a id="SP8" class="paragraph-anchor"></a><b>&#167;8. </b>The <a href="if-module/index.html" class="internal">if</a> module consists of an extensive suite of plugins (see <span class="extract"><span class="extract-syntax">core</span></span>
above) to add interactive fiction features to the Basic Inform language.
Support for scenes, a spatial map, a protagonist character, and so on are
all to be found here.
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="if-module/index.html" class="internal">if</a>.
</li><li>&#9679; Detailed overview: <a href="if-module/P-wtmd.html" class="internal">What This Module Does (in if)</a>.
</li></ul>
<p class="commentary firstcommentary"><a id="SP9" class="paragraph-anchor"></a><b>&#167;9. </b>The <a href="multimedia-module/index.html" class="internal">multimedia</a> module consists of a few plugins (see <span class="extract"><span class="extract-syntax">core</span></span> above)
to add images, sound files and external file-handling to the Basic Inform
language.
</p>
<ul class="items"><li>&#9679; Contents page of web: <a href="multimedia-module/index.html" class="internal">multimedia</a>.
</li><li>&#9679; Detailed overview: <a href="multimedia-module/P-wtmd.html" class="internal">What This Module Does (in multimedia)</a>.
</li></ul>
<p class="commentary firstcommentary"><a id="SP10" class="paragraph-anchor"></a><b>&#167;10. </b>As noted above, inform7 contains many other modules: all of those from
<a href="intern.html" class="internal">intern</a>, all of those from <a href="inbuildn.html" class="internal">inbuildn</a>, and all of the <a href="services.html" class="internal">services</a>,
together with the ubiquitous <a href="../../inweb/foundation-module/index.html" class="internal">foundation</a> library.
</p>
<!--End of weave-->
</main>
</body>
</html>