1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-03 07:24:58 +03:00
inform7/docs/webs.html
2020-03-28 19:42:53 +00:00

521 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>Overview</title>
<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="inweb.css" rel="stylesheet" rev="stylesheet" type="text/css"><style type="text/css">
/* This is a CSS file for pages woven by the literate programming tool inweb */
/* We'll start with syntax colouring, since everyone likes to toy with this: */
.cwebmacrotext { color: #000000; font-weight: bold; } /* The name of a web macro */
.functiontext { color: #C00000; } /* When a C function is being defined */
.string { color: #408040; } /* A double-quoted C literal string */
.character { color: #204020; } /* A single-quoted C literal character */
.constant { color: #204020; } /* A named constant */
.element { color: #40407f; } /* A C structure element */
.identifier { color: #4040ff; } /* An identifier */
.reserved { color: #600000; } /* A reserved word */
/* Comments at the end of lines are rendered like so: */
.comment {
font: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
color: #404040;
font-style:italic;
}
/* The name of a web macro when being used: */
.cwebmacro {
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
text-decoration: none;
color: #000000; font-weight: bold;
}
.cwebmacronumber {
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
font-size: 80%;
text-decoration: none;
color: #000000;
}
/* And when being defined: */
.cwebmacrodefn {
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
text-decoration: none;
color: #000000; font-weight: bold;
font-weight:bold;
}
/* Now some generalities: */
body {
background-color: #ffffff;
margin: 8px;
font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif;
font-size: 16px;
line-height: 24px;
background-color: transparent;
-webkit-font-smoothing: antialiased;
}
/* Forms of paragraph: */
p {
margin: 0;
padding-top: 5px;
padding-bottom: 5px;
clear: both;
}
/* Where an inweb paragraph begins: */
p.inwebparagraph {
width: 60em;
line-height: 150%;
padding-top: 15px;
padding-bottom: 5px;
}
/* If a web macro definition begins in its own paragraph, this is it: */
p.macrodefinition {
padding-top: 0px;
padding-bottom: 0px;
margin-left: 30px;
}
/* The endnotes at the foot of code: "The function foo_bar is used in ..." */
p.endnote {
font-size: 0.8em;
padding-top: 0px;
padding-bottom: 0px;
margin-left: 30px;
text-decoration:none;
color: #000000;
}
/* The Purpose slug: */
p.purpose {
width: 60em;
line-height: 150%;
font-size: 1em;
font-style:italic;
margin-left: 15px;
}
/* Blocks of code appear in these */
pre {
font-family: Monaco, monospace;
}
pre.display {
padding: 3px;
margin-top: 5px;
margin-bottom: 5px;
margin-left: 30px;
margin-right: 10px;
background: #f8f8f8;
border-width: 1px;
border-style: solid solid solid solid;
border-color: #ccc;
word-wrap: break-word;
white-space: pre-wrap;
}
pre.displaydefn {
padding: 3px;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 10px;
background: #f8f8f8;
border-width: 1px;
border-style: solid solid solid solid;
border-color: #ccc;
word-wrap: break-word;
white-space: pre-wrap;
}
pre.definitions {
padding-top: 0px;
margin-top: 0px;
margin-left: 0px;
margin-right: 10px;
word-wrap: break-word;
white-space: pre-wrap;
}
/* The following are for breadcrumbs of links: */
ul, li {
list-style-type:none;
padding:0;
margin:0;
}
.crumbs {
border:1px solid #dedede;
height:3.45em;
}
.crumbs li {
float:left;
line-height:2.3em;
padding-left:.75em;
color:#333;
font-size: 1.5em;
}
.crumbs li a {
display:block;
padding:0 15px 0 0;
background:url(crumbs.gif) no-repeat right center;
}
.crumbs li a:link, #crumbs li a:visited {
text-decoration:none;
color:#333;
}
.crumbs li a:hover, #crumbs li a:focus {
color:#dd2c0d;
}
/* This is for items in lists from inweb source: */
ul.items {
margin-top: 3px;
margin-bottom: 3px;
}
ul.items li {
margin-top: 1px;
margin-bottom: 1px;
margin-left: 15px;
}
/* And this is for each section's table of contents: */
ul.toc {
margin-top: 3px;
margin-bottom: 3px;
}
ul.toc li {
float:left;
margin-left: 15px;
color:#000;
}
ul.toc li a {
display:block;
}
ul.toc li a:link, ul.toc li a:visited {
text-decoration:none;
color:#000;
}
ul.toc li a:hover, ul.toc li a:focus {
color:#dd2c0d;
}
hr.tocbar {
clear: both;
margin-top:3px;
margin-bottom:3px;
color:#333;
border:0
background-color:#333;
}
/* This is for cross-reference links ("This code is used in ...") */
p.endnote:link, p.endnote:visited, p.endnote:hover, p.endnote:focus {
text-decoration:none;
color:#000;
}
p.endnote a:link, p.endnote a:visited {
text-decoration:none;
color:#000;
}
p.endnote a:hover, p.endnote a:focus {
text-decoration:none;
color:#dd2c0d;
}
/* Now for the index page */
p.heading {
margin-top: 2px;
margin-bottom: 2px;
font-size: 20
}
p.chapter {
font-size: 14
}
p.tight {
font-size: 12
}
p.tightin {
padding-left: 25px;
font-size: 12
}
.chapterlist li {
padding-top: 8px;
padding-left: 16px;
}
.chaptertitle {
font-weight: bold;
}
.chapterlist .sectionlist li {
padding-left: 48px;
}
span.definitionkeyword {
color:#801010;
font-weight:bold;
}
span.extract {
font-size: 15px;
border: 1px solid #e8e8e8;
border-radius: 3px;
background-color: #eef;
width: 100%;
padding: 3px;
}
nav[role="navigation"] {
width: 180px;
position: fixed;
overflow: scroll;
left: 0;
top: 0;
bottom: 0;
background: #FAFAFA;
border-right: 1px solid #e6e6e6;
padding: 20px 30px
}
nav[role="navigation"] ul {
border-top: 1px solid #e6e6e6;
font-weight: 400;
margin-bottom: 30px;
list-style: none
}
nav[role="navigation"] ul ul {
list-style: none
}
nav[role="navigation"] ul li {
border-bottom: 1px solid #e6e6e6
}
nav[role="navigation"] ul li.active {
border-bottom: 1px solid #333
}
nav[role="navigation"] ul li.active a {
font-weight: 700
}
nav[role="navigation"] h1 a:link {
color: #333;
text-decoration: none;
display: block;
}
nav[role="navigation"] h1 a:visited {
color: #333
}
nav[role="navigation"] h1 a:active {
font-weight: 700
}
nav[role="navigation"] h1 a:hover {
color: #dd2c0d
}
nav[role="navigation"] ul li a:link {
color: #333;
text-decoration: none;
text-transform: uppercase;
letter-spacing: 1px;
font-size: 12px;
display: block;
padding: 10px 10px 2px 2px
}
nav[role="navigation"] ul li a:visited {
color: #333
}
nav[role="navigation"] ul li a:active {
font-weight: 700
}
nav[role="navigation"] ul li a:hover {
color: #dd2c0d
}
nav[role="navigation"] ul li ul {
margin-bottom: 10px;
border-top: none
}
nav[role="navigation"] ul li ul li {
border-bottom: none;
padding: 0.1em
}
nav[role="navigation"] ul li ul li.active {
border-bottom: none
}
nav[role="navigation"] ul li ul li.active a {
font-weight: 700
}
nav[role="navigation"] ul li ul a:link {
color: #dd2c0d;
text-decoration: none;
text-transform: none;
letter-spacing: 0;
font-size: 12px;
display: block;
margin-left: 15px;
padding: 0 0 3px;
border-bottom: none;
font-weight: 300
}
nav[role="navigation"] ul li ul a:hover {
text-decoration: underline
}
nav[role="navigation"] h2 {
font-size: 0.95em;
text-transform: lowercase;
font-variant: small-caps;
color: #999;
padding-bottom: 0.5em
}
nav[role="navigation"] h1 {
margin-top: 0em
}
main {
max-width: 1024px;
min-width: 320px;
margin-left: 250px;
min-height: 100%;
height: auto !important;
height: 100%
}
#logo {
text-indent: -9999px;
height: 48px;
width: 100%;
margin-top: 20px;
margin-bottom: 0.5em;
padding-bottom: 10px
}
#logo a {
display: block;
width: 190px;
height: 48px;
background-image: url("/assets/images/swift.svg");
background-repeat: no-repeat;
background-size: 190px 48px;
background-position-x: -8px
}
</style>
</head>
<body>
<nav role="navigation">
<h1>Sources</h1>
<ul>
<li><a href="compiler.html">compiler tools</a></li>
<li><a href="other.html">other tools</a></li>
<li><a href="extensions.html">extensions and kits</a></li>
<li><a href="units.html">unit test tools</a></li>
</ul>
</nav>
<main role="main">
<!--Weave of 'Complete Program' generated by 7-->
<ul class="crumbs"><li><b>Overview</b></li></ul><p class="inwebparagraph"><a id="SP1"></a><b>&#167;1. </b>This website holds human-readable, or "woven", forms of the source code for
the Inform programming language and its associated tools. To download and
build Inform, go to the repository's front page and follow the instructions
there. These pages are purely to help maintainers of Inform, or anyone
interested in looking under the hood, to see how it works.
</p>
<p class="inwebparagraph">This source code is platform-independent, and provides Inform as a set of
command-line utilities following Unix conventions. Most writers using
Inform do so through a user interface provided by an app, and those apps
have their own repositories holding source code which is very much not
platform-independent. But the tools here form the engine inside each of them.
</p>
<p class="inwebparagraph"><a id="SP2"></a><b>&#167;2. </b>The Inform software uses literate programming, a doctrine invented by Donald
Knuth. Under LP, a single program is called a "web", and can either be
"woven" for humans to read or "tangled" for computers to compile. You are
reading the woven form. There are around 30 webs in this repository,
though half of those make modules rather than stand-alone programs, so
the actual number of programs is smaller.
</p>
<p class="inwebparagraph">The <code class="display"><span class="extract">inweb</span></code> and <code class="display"><span class="extract">intest</span></code> repositories also contain webs, and have pages
similar to this one where they can be seen. In particular, <code class="display"><span class="extract">inweb</span></code> contains
a web of a module called <code class="display"><span class="extract">foundation</span></code> which is used by all of the command-line
tools associated with Inform, and which provides utility functions for
memory-management and the like, but contains none of the logic guiding how
a program should run or what it should do. For convenience, some of these
pages provide links to <code class="display"><span class="extract">foundation</span></code>.
</p>
<p class="inwebparagraph"><a id="SP3"></a><b>&#167;3. </b>The webs here are divided up as follows:
</p>
<ul class="items"><li>(a) The Inform 7 compiler reads in natural-language source text and writes out
a program for a conventional programming language, normally the C-like
Inform 6. Its three phases are each provided as stand-alone tools: <code class="display"><span class="extract">inbuild</span></code>,
the front end; <code class="display"><span class="extract">inform7</span></code>, the core; and <code class="display"><span class="extract">inter</span></code>, the back end.
</li><li>(b) Other command-line tools are useful for building or working with Inform,
but do not involve compilation: <code class="display"><span class="extract">inblorb</span></code>, a packaging manager; <code class="display"><span class="extract">indoc</span></code>, to
format documentation; <code class="display"><span class="extract">inpolicy</span></code>, a lint-like tool for checking Inform's source
code; and <code class="display"><span class="extract">inrtps</span></code>, to format run-time problem messages.
</li><li>(c) Wnenever Inform 7 runs, it also reads in an "extension" piece of source
text called <code class="display"><span class="extract">Basic Inform</span></code>, defining the language, and it often then also reads
another called <code class="display"><span class="extract">Standard Rules</span></code>, enabling it to be used for interactive
fiction. It also uses precompiled libraries of code called "kits".
</li></ul>
<!--End of weave-->
</main>
</body>
</html>