Reorganised main inform repository
29
.gitignore
vendored
|
@ -6,24 +6,21 @@ gameinfo.dbg
|
|||
|
||||
makefile
|
||||
|
||||
intest/
|
||||
inweb/
|
||||
|
||||
Changes/Output/
|
||||
Changes/Output/META-INF/
|
||||
Changes/Output/OEBPS/
|
||||
Changes/Output/OEBPS/Images/
|
||||
Documentation/Output/
|
||||
Documentation/Output/META-INF/
|
||||
Documentation/Output/OEBPS/
|
||||
Documentation/Output/OEBPS/Images/
|
||||
Documentation/Examples/_Results_Actual/
|
||||
resources/Changes/Output/
|
||||
resources/Changes/Output/META-INF/
|
||||
resources/Changes/Output/OEBPS/
|
||||
resources/Changes/Output/OEBPS/Images/
|
||||
resources/Documentation/Output/
|
||||
resources/Documentation/Output/META-INF/
|
||||
resources/Documentation/Output/OEBPS/
|
||||
resources/Documentation/Output/OEBPS/Images/
|
||||
resources/Documentation/Examples/_Results_Actual/
|
||||
*/_Results_Actual/
|
||||
|
||||
Internal/Extensions/Graham Nelson/Standard Rules.i7x
|
||||
Internal/I6T/
|
||||
Internal/Languages/English/Syntax.preform
|
||||
Internal/Miscellany/definitions.html
|
||||
inform7/Internal/Extensions/Graham Nelson/Standard Rules.i7x
|
||||
inform7/Internal/I6T/
|
||||
inform7/Internal/Languages/English/Syntax.preform
|
||||
inform7/Internal/Miscellany/definitions.html
|
||||
|
||||
retrospective/*/cBlorb
|
||||
retrospective/*/ni
|
||||
|
|
96
README.md
|
@ -86,6 +86,31 @@ This repository is where development is done on the following:
|
|||
|
||||
* inform7 - The core compiler in a natural-language design system for interactive fiction. Current version 7.10.1 'Krypton' (build 6Q21). Web of InC
|
||||
|
||||
* The I6 Template - The .i6t files used in code generation. Inform 6; held in inform7/Internal/I6T
|
||||
* inform7/Internal/Extensions - Libraries of code. Inform 7
|
||||
* inform7/Internal/Extensions/Emily Short/Basic Help Menu.i7x
|
||||
* inform7/Internal/Extensions/Emily Short/Basic Screen Effects.i7x
|
||||
* inform7/Internal/Extensions/Emily Short/Complex Listing.i7x
|
||||
* inform7/Internal/Extensions/Emily Short/Glulx Entry Points.i7x
|
||||
* inform7/Internal/Extensions/Emily Short/Glulx Image Centering.i7x
|
||||
* inform7/Internal/Extensions/Emily Short/Glulx Text Effects.i7x
|
||||
* inform7/Internal/Extensions/Emily Short/Inanimate Listeners.i7x
|
||||
* inform7/Internal/Extensions/Emily Short/Locksmith.i7x
|
||||
* inform7/Internal/Extensions/Emily Short/Menus.i7x
|
||||
* inform7/Internal/Extensions/Emily Short/Punctuation Removal.i7x
|
||||
* inform7/Internal/Extensions/Emily Short/Skeleton Keys.i7x
|
||||
* inform7/Internal/Extensions/Eric Eve/Epistemology.i7x
|
||||
* inform7/Internal/Extensions/Graham Nelson/Approximate Metric Units.i7x
|
||||
* inform7/Internal/Extensions/Graham Nelson/English Language.i7x
|
||||
* inform7/Internal/Extensions/Graham Nelson/Metric Units.i7x
|
||||
* inform7/Internal/Extensions/Graham Nelson/Rideable Vehicles.i7x
|
||||
* inform7/Internal/Extensions/Graham Nelson/Unicode Character Names.i7x
|
||||
* inform7/Internal/Extensions/Graham Nelson/Unicode Full Character Names.i7x
|
||||
* inform7/Internal/HTML - Files needed for generating extension documentation and the like. HTML, Javascript, CSS
|
||||
* inform7/Internal/Languages - Natural language definition bundles
|
||||
* inform7/Internal/Templates - template websites for Inform 7's 'release as a website' feature
|
||||
* Internal/Templates/Classic
|
||||
* Internal/Templates/Standard
|
||||
* inblorb - The packaging stage of the Inform 7 system, which releases a story file in the blorbed format. Current version 4 'Duralumin'. Web of InC
|
||||
|
||||
* indoc - The documentation-formatter for the Inform 7 system. Current version 4 'Didache'. Web of InC
|
||||
|
@ -98,45 +123,20 @@ This repository is where development is done on the following:
|
|||
|
||||
* srules - The Standard Rules extension, included in all Inform 7 works Current . Web of Inform 7
|
||||
|
||||
* Changes to Inform - A detailed change history of Inform 7. Ebook in Indoc format, stored at path Changes.
|
||||
|
||||
* Writing with Inform and the Inform Recipe Book - The main Inform documentation, as seen in the apps, and in standalone Epubs. Ebook in Indoc format, stored at path Documentation.
|
||||
The "resources" directory holds a number of non-executable items of use to the
|
||||
Inform UI applications, and to Inform websites:
|
||||
|
||||
* retrospective - ANSI C source and resources needed to build (some) previous versions of Inform 7
|
||||
* Changes to Inform - A detailed change history of Inform 7. Ebook in Indoc format, stored at path resources/Changes.
|
||||
|
||||
* Outcome Pages - Inrtps uses these to generate HTML outcome pages (such as those showing Problem messages in the app)
|
||||
* Writing with Inform and the Inform Recipe Book - The main Inform documentation, as seen in the apps, and in standalone Epubs. Ebook in Indoc format, stored at path resources/Documentation.
|
||||
|
||||
* The I6 Template - The .i6t files used in code generation. Inform 6; held in Internal/I6T
|
||||
* resources/Outcome Pages - Inrtps uses these to generate HTML outcome pages (such as those showing Problem messages in the app)
|
||||
* resources/Sample Projects - Two small interactive fictions, 'Disenchantment Bay' and 'Onyx', presented as samples in the app. Inform 7
|
||||
|
||||
* Internal/Extensions - Libraries of code. Inform 7
|
||||
* Internal/Extensions/Emily Short/Basic Help Menu.i7x
|
||||
* Internal/Extensions/Emily Short/Basic Screen Effects.i7x
|
||||
* Internal/Extensions/Emily Short/Complex Listing.i7x
|
||||
* Internal/Extensions/Emily Short/Glulx Entry Points.i7x
|
||||
* Internal/Extensions/Emily Short/Glulx Image Centering.i7x
|
||||
* Internal/Extensions/Emily Short/Glulx Text Effects.i7x
|
||||
* Internal/Extensions/Emily Short/Inanimate Listeners.i7x
|
||||
* Internal/Extensions/Emily Short/Locksmith.i7x
|
||||
* Internal/Extensions/Emily Short/Menus.i7x
|
||||
* Internal/Extensions/Emily Short/Punctuation Removal.i7x
|
||||
* Internal/Extensions/Emily Short/Skeleton Keys.i7x
|
||||
* Internal/Extensions/Eric Eve/Epistemology.i7x
|
||||
* Internal/Extensions/Graham Nelson/Approximate Metric Units.i7x
|
||||
* Internal/Extensions/Graham Nelson/English Language.i7x
|
||||
* Internal/Extensions/Graham Nelson/Metric Units.i7x
|
||||
* Internal/Extensions/Graham Nelson/Rideable Vehicles.i7x
|
||||
* Internal/Extensions/Graham Nelson/Unicode Character Names.i7x
|
||||
* Internal/Extensions/Graham Nelson/Unicode Full Character Names.i7x
|
||||
|
||||
* Internal/HTML - Files needed for generating extension documentation and the like. HTML, Javascript, CSS
|
||||
|
||||
* Internal/Languages - Natural language definition bundles
|
||||
|
||||
* Sample Projects - Two small interactive fictions, 'Disenchantment Bay' and 'Onyx', presented as samples in the app. Inform 7
|
||||
|
||||
* Internal/Templates - template websites for Inform 7's 'release as a website' feature
|
||||
* Internal/Templates/Classic
|
||||
* Internal/Templates/Standard
|
||||
Finally, the "retrospective" directory holds ANSI C source and resources needed
|
||||
to build (some) previous versions of Inform 7. At present, this is only sketchily
|
||||
put together.
|
||||
|
||||
Notes:
|
||||
|
||||
|
@ -156,27 +156,27 @@ be accepted. (Note that these are not git submodules.)
|
|||
* inform6 - the Inform 6 compiler (used by I7 as a code generator) - from [https://github.com/DavidKinder/Inform6], maintained by [David Kinder](https://github.com/DavidKinder)
|
||||
|
||||
|
||||
* Internal/Templates - template websites for Inform 7's 'release as a website' feature
|
||||
* Internal/Templates/Parchment - from [https://github.com/curiousdannii/parchment], maintained by [Dannii Willis](https://github.com/curiousdannii)
|
||||
* Internal/Templates/Quixe - from [https://github.com/erkyrath/quixe], maintained by [Andrew Plotkin](https://github.com/erkyrath)
|
||||
* Internal/Templates/Vorpal - from (part of) [https://github.com/vorple/inform7], maintained by [Juhana Leinonen](https://github.com/vorple)
|
||||
* inform7/Internal/Templates - template websites for Inform 7's 'release as a website' feature
|
||||
* inform7/Internal/Templates/Parchment - from [https://github.com/curiousdannii/parchment], maintained by [Dannii Willis](https://github.com/curiousdannii)
|
||||
* inform7/Internal/Templates/Quixe - from [https://github.com/erkyrath/quixe], maintained by [Andrew Plotkin](https://github.com/erkyrath)
|
||||
* inform7/Internal/Templates/Vorpal - from (part of) [https://github.com/vorple/inform7], maintained by [Juhana Leinonen](https://github.com/vorple)
|
||||
|
||||
### Binary resources (such as image files)
|
||||
|
||||
* Imagery/app_images - icons for the Inform app and its many associated files, in MacOS format
|
||||
* Imagery/bg_images - background textures used in the Index generated by Inform
|
||||
* Imagery/doc_images - miscellaneous images needed by the documentation
|
||||
* Imagery/map_icons - images needed for the World pane of the Index generated by Inform
|
||||
* Imagery/outcome_images - images used on outcome pages
|
||||
* Imagery/scene_icons - images needed for the Scenes pane of the Index generated by Inform
|
||||
* Internal/Miscellany - default cover art, the Introduction to IF and Postcard PDFs
|
||||
* resources/Imagery/app_images - icons for the Inform app and its many associated files, in MacOS format
|
||||
* resources/Imagery/bg_images - background textures used in the Index generated by Inform
|
||||
* resources/Imagery/doc_images - miscellaneous images needed by the documentation
|
||||
* resources/Imagery/map_icons - images needed for the World pane of the Index generated by Inform
|
||||
* resources/Imagery/outcome_images - images used on outcome pages
|
||||
* resources/Imagery/scene_icons - images needed for the Scenes pane of the Index generated by Inform
|
||||
* resources/Internal/Miscellany - default cover art, the Introduction to IF and Postcard PDFs
|
||||
|
||||
### Other files and folders in this repository
|
||||
|
||||
* docs - Woven forms of the webs, for serving by GitHub Pages
|
||||
* gitignorescript.txt - Inweb uses this to generate the .gitignore file at the root of the repository
|
||||
* makescript.txt - Inweb uses this to generate a makefile at the root of the repository
|
||||
* READMEscript.txt - Inpolicy uses this to generate the README.md file for the repository
|
||||
* scripts/gitignorescript.txt - Inweb uses this to generate the .gitignore file at the root of the repository
|
||||
* scripts/makescript.txt - Inweb uses this to generate a makefile at the root of the repository
|
||||
* scripts/READMEscript.txt - Inpolicy uses this to generate the README.md file for the repository
|
||||
|
||||
### Colophon
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
set: $I6 = inform6/Tangled/inform6
|
||||
set: $I7 = inform7/Tangled/inform7
|
||||
set: $INBLORB = inblorb/Tangled/inblorb
|
||||
set: $INTERNAL = Internal
|
||||
set: $INTERNAL = inform7/Internal
|
||||
set: $WORKSPACE = ../intest/Workspace
|
||||
|
||||
set: $INTERCHAIN = link:Output.i6t,parse-linked-matter,resolve-conditional-compilation,assimilate,make-identifiers-unique,reconcile-verbs,generate-i6:*
|
||||
|
|
|
@ -2,45 +2,21 @@
|
|||
|
||||
A shell for the modules which actually form the compiler.
|
||||
|
||||
@h Build identity.
|
||||
First we define the build, using a notation which tangles out to the current
|
||||
build number as specified in the contents section of this web.
|
||||
@ The source code for the Inform 7 compiler is modularised, and each module
|
||||
has its own web, leaving very little here. (To get a sense of how Inform works,
|
||||
read the web for the Core module, and dip into the others as needed.)
|
||||
|
||||
Each time the master copy of NI is modified and recompiled, the build
|
||||
number (digit-letter-digit-digit) is advanced. Build numbers do not reflect
|
||||
a hierarchical branching of the source, but are simply a way to encode a
|
||||
large number in four printable digits. Letters I and O are skipped, and the
|
||||
tailing two digits run from 01 to 99.
|
||||
|
||||
Build 1A01 was the first rough draft of a completed compiler: but it did
|
||||
not synchronise fully with the OS X Inform application until 1G22 and
|
||||
private beta-testing did not begin until 1J34. Other milestones include
|
||||
time (1B92), tables (1C86), component parts (1E60), indexing (1F46),
|
||||
systematic memory allocation (1J53), pattern matching (1M11), the map index
|
||||
(1P97), extension documentation support (1S39) and activities (1T89). The
|
||||
first round of testing, a heroic effort by Emily Short and Sonja Kesserich,
|
||||
came informally to an end at around the 1V50 build, after which a general
|
||||
rewriting exercise began. Minor changes needed for David Kinder's Windows
|
||||
port began to be made with 1W80, but the main aims were to increase speed
|
||||
and to improve clarity of source code. Hashing algorithms adapted to
|
||||
word-based syntax were introduced in 1Z50; the prototype parser was then
|
||||
comprehensively rewritten using a unified system to handle ambiguities and
|
||||
avoid blind alleys. A time trial of 2D52 against 1V59 on the same, very
|
||||
large, source text showed a speed increase of a factor of four. A second
|
||||
stage of rewriting, to generalise binary predicates and improve grammatical
|
||||
accuracy, began with 2D70. By the time of the first public beta release,
|
||||
3K27, the testing tool |inform-test| had been written (it subsequently
|
||||
evolved into today's |intest|), and Emily Short's extensive suite of Examples
|
||||
had been worked into the verification process for builds. The history since
|
||||
3K27 is recorded in the published change log.
|
||||
First, some identification:
|
||||
|
||||
@d INTOOL_NAME "inform7"
|
||||
@d INFORM7_BUILD "inform7 [[Build Number]]"
|
||||
@d HUMAN_READABLE_INTOOL_NAME "Inform 7"
|
||||
|
||||
@h Main itself.
|
||||
On some platforms the core Inform compiler is a separate command-line tool,
|
||||
but on others it's compiled into the body of an application. So:
|
||||
@ On some platforms the core Inform compiler is a separate command-line tool,
|
||||
so that execution should begin with |main()|, as in all C programs. But some
|
||||
Inform UI applications need to compile it into the body of a larger program:
|
||||
those should define the symbol |SUPPRESS_MAIN| and call |Main::core_inform_main()|
|
||||
when they want I7 to run.
|
||||
|
||||
=
|
||||
#ifndef SUPPRESS_MAIN
|
||||
|
@ -49,12 +25,26 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
#endif
|
||||
|
||||
@ All our modules have to be started up and shut down, so we take care of that
|
||||
with one more intermediary:
|
||||
@ Either way, that brings us here. All our modules have to be started up and
|
||||
shut down, so we take care of that with one more intermediary. These modules
|
||||
fall into four categories:
|
||||
|
||||
(a) Libraries of code providing services to the compiler but containing
|
||||
none of its logic: Foundation, Words, Inflections, Syntax, Linguistics,
|
||||
Kinds, Problems, Index. Foundation is shared with numerous other tools,
|
||||
and is part of the Inweb repository.
|
||||
|
||||
(b) Core, the front end of the compiler for the basic Inform 7 language.
|
||||
|
||||
(c) Inter and Codegen, the back end. These modules are shared with the
|
||||
command-line tool Inter.
|
||||
|
||||
(d) Extensions to the Inform 7 language for interactive fiction: IF,
|
||||
Multimedia.
|
||||
|
||||
=
|
||||
int Main::core_inform_main(int argc, char *argv[]) {
|
||||
Foundation::start();
|
||||
Foundation::start(); /* must be started first */
|
||||
WordsModule::start();
|
||||
InflectionsModule::start();
|
||||
SyntaxModule::start();
|
||||
|
@ -82,6 +72,6 @@ int Main::core_inform_main(int argc, char *argv[]) {
|
|||
IndexModule::end();
|
||||
InterModule::end();
|
||||
CodegenModule::end();
|
||||
Foundation::end();
|
||||
Foundation::end(); /* must be ended last */
|
||||
return rv;
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 599 B After Width: | Height: | Size: 599 B |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 420 B |
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 469 B |
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
@ -1,14 +0,0 @@
|
|||
% Start with the standard cover sheet:
|
||||
|
||||
[[Cover Sheet]]
|
||||
|
||||
\pdfximage width 8cm{../Figures/Syntax-cover.pdf}
|
||||
\smallskip\noindent
|
||||
\hbox to\hsize{\pdfrefximage \pdflastximage\hfill}
|
||||
\smallskip
|
||||
|
||||
% and now add:
|
||||
|
||||
\noindent{\it
|
||||
}
|
||||
\vfill\eject
|
|
@ -1,44 +0,0 @@
|
|||
% Start with the standard cover sheet:
|
||||
|
||||
[[Cover Sheet]]
|
||||
|
||||
% and now add:
|
||||
|
||||
\noindent{\it
|
||||
Inform is a natural-language design system for interactive fiction, first
|
||||
created in 1993. To most users it seems a single unified tool, but in fact
|
||||
is made up of core software, common to all platforms, combined with
|
||||
substantial user interfaces written independently for Mac OS X, Windows and
|
||||
Linux, and with documentation and examples. The core material is in turn
|
||||
divided into:
|
||||
\medskip\par\noindent
|
||||
Chapters 1 to 14: the source code to the NI compiler, written in C
|
||||
\medskip\par\noindent
|
||||
Appendix A: the Standard Rules, written in Inform 7
|
||||
\medskip\par\noindent
|
||||
Appendix B: the template layer, written in Inform 6
|
||||
\medskip\par\noindent
|
||||
Each of these chapter blocks is divided up into one or more named sections,
|
||||
which have both full names (``Grammar Lines'') and abbreviations (|12/gl|,
|
||||
the 12 signifying Chapter 12). Finally, each section is divided into
|
||||
numbered ``paragraphs'', some named and others not. Code can thus be
|
||||
approximately located by ``postal codes'' such as |12/gl|.$\S$7.
|
||||
\medskip\par\noindent
|
||||
Of its nature, Inform must perform a computational task which is difficult
|
||||
to specify formally, particularly since part of its aim is to cope well
|
||||
with incorrect input from an inexperienced user. It has become a complex
|
||||
program some 120,000 lines in length, and like all such it must mitigate
|
||||
its complexity using internal stylistic conventions and principles of
|
||||
organisation. To this end it follows the ``literate programming'' dogma of
|
||||
Donald Knuth, an idea which had in any case influenced Inform's own design.
|
||||
In LP, a single source (``web'') is both ``tangled'' into a functional form
|
||||
and also ``woven'' into a typeset form suitable for human readers. Inform
|
||||
uses its own LP tool, |inweb|, an adaptation of Knuth's |CWEB| which scales
|
||||
better to large multi-target projects.
|
||||
\medskip\par\noindent
|
||||
The Inform project's main goal is to publish the entire core Inform code
|
||||
base, beginning in April 2008 with public drafts of Appendices A and B,
|
||||
approximately 600pp of material. These use only the simplest form of LP
|
||||
where tangling is minimal, and the reader needs no previous experience of
|
||||
the genre.
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
[[Repeat Chapter]]
|
||||
[[Chapter Title]]: [[Chapter Lines]] lines
|
||||
[[End Repeat]]
|
||||
|
||||
[[Repeat Chapter]]
|
||||
[[Repeat Section]]
|
||||
[[Section Mean]] [[Section Title]]: [[Section Code]]: [[Section Lines]] lines, [[Section Paragraphs]] pars
|
||||
[[End Repeat]]
|
||||
[[End Repeat]]
|
|
@ -2,9 +2,98 @@ Command-Line Usage.
|
|||
|
||||
A brief note on using Inform 7 at the command line.
|
||||
|
||||
@h Introduction.
|
||||
@h What Inform 7 is.
|
||||
The |inform7| executable has a few ancillary functions, but basically it
|
||||
takes natural language source text and compiles it to either "inter", an
|
||||
intermediate-level code, or all the way to Inform 6 source code. In order
|
||||
to run, it needs access to numerous resources, and many of its command-line
|
||||
switches exist to specify where those are to be found.
|
||||
|
||||
If you are using Inform 7 at the command line, the executable should be
|
||||
stored at |inform/inform7/Tangled/inform7|. In these notes we will assume
|
||||
the current working directory is |inform|. To test that it has been built,
|
||||
try:
|
||||
|
||||
|inform7/Tangled/inform7 -help|
|
||||
|
||||
@h Basic usage.
|
||||
The full range of options is complex, so it seems helpful to start by showing
|
||||
what the Inform UI apps typically call when the user clicks "Go":
|
||||
|
||||
|inform7/Tangled/inform7 -internal I -external E -project P -format=F|
|
||||
|
||||
for suitable pathnames |I|, |E|, |P| and a choice of |F|. To dispose of this
|
||||
first, |-format=ulx| tells Inform to compile to the Glulx story file, and
|
||||
|-format=z8| to (version 8 of) the Z-machine.
|
||||
|
||||
The project |P| is the directory holding the project to compile, such as
|
||||
|Bronze.inform|. On MacOS, this will be a bundle, and will look like an
|
||||
opaque binary file in the Finder, but it is a directory nevertheless.
|
||||
|
||||
The directories |I| and |E| tell Inform where to find its resources. Internal
|
||||
means "inside the app" -- in other words, fixed material supplied with Inform
|
||||
and always present; external means "outside the app", and is where the user
|
||||
installs her own choice of extra resources.
|
||||
|
||||
@ If no |-internal I| is given on the command line, Inform 7 tries to find
|
||||
out where it is installed in the file system. There is no completely foolproof,
|
||||
cross-platform way to know this (on some Unixes, a program cannot determine
|
||||
its own location), so Inform decides by the following set of rules:
|
||||
|
||||
(a) If the user, at the command line, specified |-at P|, for some path
|
||||
|P|, then we use that.
|
||||
(b) Otherwise, if the host operating system can indeed tell us where the
|
||||
executable is, we use that. This is currently implemented only on MacOS,
|
||||
Windows and Linux.
|
||||
(c) Otherwise, if the environment variable |$INFORM7_PATH| exists and is
|
||||
non-empty, we use that.
|
||||
(d) And if all else fails, we assume that the location is |inform7|, with
|
||||
respect to the current working directory.
|
||||
|
||||
The default value for |-internal| is then the subdirectory |Internal| of
|
||||
this location: for example, |inform7/Internal|.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ni "-internal" "/Users/gnelson/Natural Inform/Inform.app/Contents/Resources/Internal" "-external" "/Users/gnelson/Library/Inform" "-project" "/Users/gnelson/Natural Inform/Worked Examples/Buggy.inform" "-format=ulx"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|inform7/Tangled/inform7 [OPTIONS] [SOURCETEXT]|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ Inform returns an exit code of 0 if successful, or else it throws errors
|
||||
to |stderr| and returns 1 if unsuccessful.
|
||||
|
||||
@h Prehistory.
|
||||
Build 1A01 was the first rough draft of a completed compiler: but it did
|
||||
not synchronise fully with the OS X Inform application until 1G22 and
|
||||
private beta-testing did not begin until 1J34. Other milestones include
|
||||
time (1B92), tables (1C86), component parts (1E60), indexing (1F46),
|
||||
systematic memory allocation (1J53), pattern matching (1M11), the map index
|
||||
(1P97), extension documentation support (1S39) and activities (1T89). The
|
||||
first round of testing, a heroic effort by Emily Short and Sonja Kesserich,
|
||||
came informally to an end at around the 1V50 build, after which a general
|
||||
rewriting exercise began. Minor changes needed for David Kinder's Windows
|
||||
port began to be made with 1W80, but the main aims were to increase speed
|
||||
and to improve clarity of source code. Hashing algorithms adapted to
|
||||
word-based syntax were introduced in 1Z50; the prototype parser was then
|
||||
comprehensively rewritten using a unified system to handle ambiguities and
|
||||
avoid blind alleys. A time trial of 2D52 against 1V59 on the same, very
|
||||
large, source text showed a speed increase of a factor of four. A second
|
||||
stage of rewriting, to generalise binary predicates and improve grammatical
|
||||
accuracy, began with 2D70. By the time of the first public beta release,
|
||||
3K27, the testing tool |inform-test| had been written (it subsequently
|
||||
evolved into today's |intest|), and Emily Short's extensive suite of Examples
|
||||
had been worked into the verification process for builds. The history since
|
||||
3K27 is recorded in the published change log.
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
-if osx -cases [Index] 'inform7/Tests/Test Index'
|
||||
-if osx -cases [Map] 'inform7/Tests/Test Maps'
|
||||
-if osx -cases [Release] 'inform7/Tests/Test Releases'
|
||||
-extension [Main] 'Internal/Extensions/Emily Short/Complex Listing.i7x'
|
||||
-extension [Main] 'Internal/Extensions/Emily Short/Inanimate Listeners.i7x'
|
||||
-extension [Main] 'Internal/Extensions/Emily Short/Locksmith.i7x'
|
||||
-extension [Main] 'Internal/Extensions/Emily Short/Punctuation Removal.i7x'
|
||||
-extension [Main] 'Internal/Extensions/Emily Short/Skeleton Keys.i7x'
|
||||
-extensions [Main] 'Internal/Extensions/Graham Nelson'
|
||||
-extension [Main] 'inform7/Internal/Extensions/Emily Short/Complex Listing.i7x'
|
||||
-extension [Main] 'inform7/Internal/Extensions/Emily Short/Inanimate Listeners.i7x'
|
||||
-extension [Main] 'inform7/Internal/Extensions/Emily Short/Locksmith.i7x'
|
||||
-extension [Main] 'inform7/Internal/Extensions/Emily Short/Punctuation Removal.i7x'
|
||||
-extension [Main] 'inform7/Internal/Extensions/Emily Short/Skeleton Keys.i7x'
|
||||
-extensions [Main] 'inform7/Internal/Extensions/Graham Nelson'
|
||||
-examples [Main] Documentation/Examples
|
||||
-problems [Main] 'inform7/Tests/Test Problems'
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
|
||||
set: $I6 = inform6/Tangled/inform6
|
||||
set: $I7 = inform7/Tangled/inform7
|
||||
set: $INTERNAL = Internal
|
||||
set: $INTERNAL = inform7/Internal
|
||||
set: $WORKSPACE = intest/Workspace
|
||||
set: $ZINT = inform6/Tests/Assistants/dumb-frotz/dumb-frotz
|
||||
set: $GINT = inform6/Tests/Assistants/dumb-glulx/glulxe/glulxe
|
||||
|
@ -75,9 +75,9 @@
|
|||
endif
|
||||
|
||||
if: $VM G
|
||||
set: $SRINTERB = Internal/I6T/sr-G.interb
|
||||
set: $SRINTERB = inform7/Internal/I6T/sr-G.interb
|
||||
else
|
||||
set: $SRINTERB = Internal/I6T/sr-Z.interb
|
||||
set: $SRINTERB = inform7/Internal/I6T/sr-Z.interb
|
||||
endif
|
||||
! if: $CASE Imp_%c*
|
||||
! set: $INTERCHAIN = import:$SRINTERB,link:Output.i6t,parse-linked-matter,resolve-conditional-compilation,assimilate,make-identifiers-unique,reconcile-verbs,generate-inter:haha.txt,generate-i6:*
|
||||
|
@ -149,7 +149,7 @@
|
|||
-recipe [Index]
|
||||
|
||||
set: $I7 = inform7/Tangled/inform7
|
||||
set: $INTERNAL = Internal
|
||||
set: $INTERNAL = inform7/Internal
|
||||
set: $WORKSPACE = intest/Workspace
|
||||
|
||||
! This recipe is for testing that the index in a sample project is correct.
|
||||
|
@ -243,7 +243,7 @@
|
|||
-recipe [Map]
|
||||
|
||||
set: $I7 = inform7/Tangled/inform7
|
||||
set: $INTERNAL = Internal
|
||||
set: $INTERNAL = inform7/Internal
|
||||
set: $WORKSPACE = intest/Workspace
|
||||
|
||||
set: $VM = G
|
||||
|
@ -279,7 +279,7 @@
|
|||
|
||||
set: $I7 = inform7/Tangled/inform7
|
||||
set: $INTER = inter/Tangled/inter
|
||||
set: $INTERNAL = Internal
|
||||
set: $INTERNAL = inform7/Internal
|
||||
set: $WORKSPACE = intest/Workspace
|
||||
|
||||
! First we decide whether to compile it for the Z-machine or Glulx.
|
||||
|
@ -341,7 +341,7 @@
|
|||
-recipe [Release]
|
||||
|
||||
set: $I7 = inform7/Tangled/inform7
|
||||
set: $INTERNAL = Internal
|
||||
set: $INTERNAL = inform7/Internal
|
||||
set: $WORKSPACE = intest/Workspace
|
||||
|
||||
set: $VM = G
|
||||
|
|
|
@ -56,21 +56,12 @@ int model_world_under_construction = FALSE; /* World model is being constructed
|
|||
int model_world_constructed = FALSE; /* World model is now constructed */
|
||||
int indexing_stage = FALSE; /* Everything is done except indexing */
|
||||
|
||||
@ Either way, execution really begins in the |core_inform_main| routine, which
|
||||
takes command-line arguments with the standard parameters |argc| and |argv|.
|
||||
In practice it consists only of command-line processing and the minimum setup
|
||||
necessary to get the meta-language interpreter running, so that it can then
|
||||
hand over to the template file |Main.i6t|.
|
||||
|
||||
Inform returns only two possible values to the shell, either here or via
|
||||
|exit(1)| in the case of fatal errors: 0 if it completed its run with no
|
||||
errors, 1 if errors were produced.
|
||||
|
||||
=
|
||||
@ =
|
||||
int report_clock_time = FALSE;
|
||||
time_t right_now;
|
||||
int export_mode = FALSE, import_mode = FALSE;
|
||||
text_stream *inter_processing_chain = NULL;
|
||||
pathname *path_to_inform7 = NULL;
|
||||
|
||||
int CoreMain::main(int argc, char *argv[]) {
|
||||
clock_t start = clock();
|
||||
|
@ -78,6 +69,7 @@ int CoreMain::main(int argc, char *argv[]) {
|
|||
@<Register command-line arguments@>;
|
||||
int proceed = CommandLine::read(argc, argv, NULL, &CoreMain::switch, &CoreMain::bareword);
|
||||
if (proceed) {
|
||||
@<Establish our location in the file system@>;
|
||||
@<With that done, configure all other settings@>;
|
||||
@<Open the debugging log and the problems report@>;
|
||||
@<Boot up the compiler@>;
|
||||
|
@ -183,6 +175,11 @@ list is not exhaustive.
|
|||
CommandLine::declare_switch(TRANSIENT_CLSW, L"transient", 2,
|
||||
L"use X for transient data such as the extensions census");
|
||||
|
||||
@<Establish our location in the file system@> =
|
||||
path_to_inform7 = Pathnames::installation_path("INFORM7_PATH", I"inform7");
|
||||
pathname *def_int = Pathnames::subfolder(Pathnames::up(path_to_inform7), I"Internal");
|
||||
Locations::set_default_internal(def_int);
|
||||
|
||||
@<With that done, configure all other settings@> =
|
||||
VirtualMachines::set_identifier(story_filename_extension);
|
||||
if (Locations::set_defaults(census_mode) == FALSE)
|
||||
|
|
|
@ -86,6 +86,11 @@ void Locations::set_internal(text_stream *loc) {
|
|||
pathname_of_area[INTERNAL_FS_AREA] = Pathnames::from_text(loc);
|
||||
}
|
||||
|
||||
void Locations::set_default_internal(pathname *P) {
|
||||
if (pathname_of_area[INTERNAL_FS_AREA] == NULL)
|
||||
pathname_of_area[INTERNAL_FS_AREA] = P;
|
||||
}
|
||||
|
||||
void Locations::set_external(text_stream *loc) {
|
||||
pathname_of_area[EXTERNAL_FS_AREA] = Pathnames::from_text(loc);
|
||||
}
|
||||
|
|