mirror of
https://github.com/ganelson/inform.git
synced 2024-07-05 00:24:22 +03:00
Tidied up metadata
This commit is contained in:
parent
bb7c9db8f8
commit
360f0de697
79
README.md
79
README.md
|
@ -84,44 +84,62 @@ assembles all those programs and resources, which fall into two categories:
|
||||||
|
|
||||||
This repository is where development is done on the following:
|
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
|
* inform7 - The core compiler in a natural-language design system for interactive fiction. - __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
|
* 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 - Libraries of code. Inform 7
|
||||||
* inform7/Internal/Extensions/Emily Short/Basic Help Menu.i7x
|
* inform7/Internal/Extensions/Emily Short/Basic Help Menu.i7x - __unversioned__
|
||||||
* inform7/Internal/Extensions/Emily Short/Basic Screen Effects.i7x
|
|
||||||
* inform7/Internal/Extensions/Emily Short/Complex Listing.i7x
|
* inform7/Internal/Extensions/Emily Short/Basic Screen Effects.i7x - __version 7/140425__
|
||||||
* inform7/Internal/Extensions/Emily Short/Glulx Entry Points.i7x
|
|
||||||
* inform7/Internal/Extensions/Emily Short/Glulx Image Centering.i7x
|
* inform7/Internal/Extensions/Emily Short/Complex Listing.i7x - __version 9__
|
||||||
* inform7/Internal/Extensions/Emily Short/Glulx Text Effects.i7x
|
|
||||||
* inform7/Internal/Extensions/Emily Short/Inanimate Listeners.i7x
|
* inform7/Internal/Extensions/Emily Short/Glulx Entry Points.i7x - __version 10/140425__
|
||||||
* inform7/Internal/Extensions/Emily Short/Locksmith.i7x
|
|
||||||
* inform7/Internal/Extensions/Emily Short/Menus.i7x
|
* inform7/Internal/Extensions/Emily Short/Glulx Image Centering.i7x - __version 4__
|
||||||
* inform7/Internal/Extensions/Emily Short/Punctuation Removal.i7x
|
|
||||||
* inform7/Internal/Extensions/Emily Short/Skeleton Keys.i7x
|
* inform7/Internal/Extensions/Emily Short/Glulx Text Effects.i7x - __version 5/140516__
|
||||||
* inform7/Internal/Extensions/Eric Eve/Epistemology.i7x
|
|
||||||
* inform7/Internal/Extensions/Graham Nelson/Approximate Metric Units.i7x
|
* inform7/Internal/Extensions/Emily Short/Inanimate Listeners.i7x - __unversioned__
|
||||||
* inform7/Internal/Extensions/Graham Nelson/English Language.i7x
|
|
||||||
* inform7/Internal/Extensions/Graham Nelson/Metric Units.i7x
|
* inform7/Internal/Extensions/Emily Short/Locksmith.i7x - __version 12__
|
||||||
* inform7/Internal/Extensions/Graham Nelson/Rideable Vehicles.i7x
|
|
||||||
* inform7/Internal/Extensions/Graham Nelson/Unicode Character Names.i7x
|
* inform7/Internal/Extensions/Emily Short/Menus.i7x - __version 3__
|
||||||
* inform7/Internal/Extensions/Graham Nelson/Unicode Full Character Names.i7x
|
|
||||||
|
* inform7/Internal/Extensions/Emily Short/Punctuation Removal.i7x - __version 5__
|
||||||
|
|
||||||
|
* inform7/Internal/Extensions/Emily Short/Skeleton Keys.i7x - __unversioned__
|
||||||
|
|
||||||
|
* inform7/Internal/Extensions/Eric Eve/Epistemology.i7x - __version 9__
|
||||||
|
|
||||||
|
* inform7/Internal/Extensions/Graham Nelson/Approximate Metric Units.i7x - __version 1__
|
||||||
|
|
||||||
|
* inform7/Internal/Extensions/Graham Nelson/English Language.i7x - __version 1__
|
||||||
|
|
||||||
|
* inform7/Internal/Extensions/Graham Nelson/Metric Units.i7x - __version 2__
|
||||||
|
|
||||||
|
* inform7/Internal/Extensions/Graham Nelson/Rideable Vehicles.i7x - __version 3__
|
||||||
|
|
||||||
|
* inform7/Internal/Extensions/Graham Nelson/Unicode Character Names.i7x - __unversioned__
|
||||||
|
|
||||||
|
* inform7/Internal/Extensions/Graham Nelson/Unicode Full Character Names.i7x - __unversioned__
|
||||||
|
|
||||||
* inform7/Internal/HTML - Files needed for generating extension documentation and the like. HTML, Javascript, CSS
|
* inform7/Internal/HTML - Files needed for generating extension documentation and the like. HTML, Javascript, CSS
|
||||||
* inform7/Internal/Languages - Natural language definition bundles
|
* inform7/Internal/Languages - Natural language definition bundles
|
||||||
* inform7/Internal/Templates - template websites for Inform 7's 'release as a website' feature
|
* inform7/Internal/Templates - template websites for Inform 7's 'release as a website' feature
|
||||||
* Internal/Templates/Classic
|
* Internal/Templates/Classic
|
||||||
* Internal/Templates/Standard
|
* 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
|
* inblorb - The packaging stage of the Inform 7 system, which releases a story file in the blorbed format. - __version 4 'Duralumin'__ - Web of InC
|
||||||
|
|
||||||
* indoc - The documentation-formatter for the Inform 7 system. Current version 4 'Didache'. Web of InC
|
* indoc - The documentation-formatter for the Inform 7 system. - __version 4 'Didache'__ - Web of InC
|
||||||
|
|
||||||
* inpolicy - A lint-like tool to check up on various policies used in Inform source code. Current version 1 'Plan A'. Web of InC
|
* inpolicy - A lint-like tool to check up on various policies used in Inform source code. - __version 1 'Plan A'__ - Web of InC
|
||||||
|
|
||||||
* inrtps - A generator of HTML pages to show for run-time problem messages in Inform. Current version 2 'Benefactive'. Web of InC
|
* inrtps - A generator of HTML pages to show for run-time problem messages in Inform. - __version 2 'Benefactive'__ - Web of InC
|
||||||
|
|
||||||
* inter - For handling intermediate Inform code Current version 1 'Axion'. Web of InC
|
* inter - For handling intermediate Inform code. - __version 1 'Axion'__ - Web of InC
|
||||||
|
|
||||||
* srules - The Standard Rules extension, included in all Inform 7 works Current . Web of Inform 7
|
* srules - The Standard Rules extension, included in all Inform 7 works. - __version 5/190315__ - Web of Inform 7
|
||||||
|
|
||||||
|
|
||||||
The "resources" directory holds a number of non-executable items of use to the
|
The "resources" directory holds a number of non-executable items of use to the
|
||||||
|
@ -153,13 +171,16 @@ Stable versions of the following are periodically copied into this repository,
|
||||||
but this is not where development on them is done, and no pull requests will
|
but this is not where development on them is done, and no pull requests will
|
||||||
be accepted. (Note that these are not git submodules.)
|
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)
|
* inform6 - The Inform 6 compiler (used by I7 as a code generator). - __version 1634 '5th March 2016'__ - from [https://github.com/DavidKinder/Inform6], maintained by [David Kinder](https://github.com/DavidKinder)
|
||||||
|
|
||||||
|
|
||||||
* inform7/Internal/Templates - template websites for Inform 7's 'release as a website' feature
|
* 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/Parchment - Z-machine in Javascript - __version 'Parchment for Inform 7 (2015-09-25)'__ - 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)
|
* inform7/Internal/Templates/Quixe - Glulx in Javascript - __version 'Quixe for Inform 7 (v. 2.1.2)'__ - from [https://github.com/erkyrath/quixe], maintained by [Andrew Plotkin](https://github.com/erkyrath)
|
||||||
|
|
||||||
|
* inform7/Internal/Templates/Vorple - Multimedia in Javascript - __version 'Vorple'__ - from [https://github.com/vorple/inform7], maintained by [Juhana Leinonen](https://github.com/vorple)
|
||||||
|
|
||||||
|
|
||||||
### Binary resources (such as image files)
|
### Binary resources (such as image files)
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@ Title: indoc
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: The documentation-formatter for the Inform 7 system.
|
Purpose: The documentation-formatter for the Inform 7 system.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
Version Number: 4
|
Version Number: 4
|
||||||
Version Name: Didache
|
Version Name: Didache
|
||||||
|
|
|
@ -7,8 +7,6 @@ Version Number: 7.10.1
|
||||||
Purpose: The core compiler in a natural-language design system for interactive fiction.
|
Purpose: The core compiler in a natural-language design system for interactive fiction.
|
||||||
Language: InC
|
Language: InC
|
||||||
Preform Language: English
|
Preform Language: English
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
|
|
||||||
Import: foundation
|
Import: foundation
|
||||||
|
|
|
@ -2,7 +2,10 @@ Command-Line Usage.
|
||||||
|
|
||||||
A brief note on using Inform 7 at the command line.
|
A brief note on using Inform 7 at the command line.
|
||||||
|
|
||||||
@h What Inform 7 is.
|
@h Disclaimer.
|
||||||
|
This is not documentation on the Inform language or its user-interface apps:
|
||||||
|
it's a technical note on how the command-line tool inside those apps is called.
|
||||||
|
|
||||||
The |inform7| executable has a few ancillary functions, but basically it
|
The |inform7| executable has a few ancillary functions, but basically it
|
||||||
takes natural language source text and compiles it to either "inter", an
|
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
|
intermediate-level code, or all the way to Inform 6 source code. In order
|
||||||
|
@ -70,28 +73,50 @@ Similarly, the Settings pane in the app contains a checkbox for "Make
|
||||||
random outcomes predictable when testing": the app achieves this by adding
|
random outcomes predictable when testing": the app achieves this by adding
|
||||||
the switch |-rng| to the above command-line call.
|
the switch |-rng| to the above command-line call.
|
||||||
|
|
||||||
|
@ If the app has a feature for systematically testing each example in an
|
||||||
|
extension project, then it should add the switch |-case A| when running
|
||||||
|
example A through inform7, |-case B| for B, and so on. This ensures that
|
||||||
|
if the compiler generates Problem messages (i,e., if those tests fail
|
||||||
|
to compile) then source-reference links will be to the right examples.
|
||||||
|
|
||||||
|
For ordinary, non-Extension, projects, this switch should not be used.
|
||||||
|
|
||||||
|
@ When the app installs a new extension (in the external area), or is run
|
||||||
|
for the first time, it should call Inform 7 to perform a "census" of the
|
||||||
|
available extensions. The compiler then looks through its internal and
|
||||||
|
external areas, and creates suitable HTML pages showing what it finds,
|
||||||
|
which it stores in a writeable area of the file system called the "transient"
|
||||||
|
directory.
|
||||||
|
|
||||||
|
The usage for this is:
|
||||||
|
|
||||||
|
|inform7/Tangled/inform7 -internal I -external E -transient T -census|
|
||||||
|
|
||||||
|
(The caller has the obligation to provide the Transient directory.)
|
||||||
|
|
||||||
|
@h Experimental Inter features.
|
||||||
|
The options |-export X|, |-import X| and |-inter X| are not final, likely
|
||||||
|
to change, and not documented.
|
||||||
|
|
||||||
@h Testing and debugging switches.
|
@h Testing and debugging switches.
|
||||||
The following switches are used only when testing or maintaining Inform,
|
The following switches are used only when testing or maintaining Inform,
|
||||||
and are unlikely to be useful to end users:
|
and are unlikely to be useful to end users. Many of these are, however,
|
||||||
(a) |-clock| times the run;
|
used in the Intest scripts for testing Inform 7 and Inblorb.
|
||||||
|
|
||||||
|
(a) |-clock| times the run.
|
||||||
(b) |-crash-all| performs a deliberate hard crash, dividing by zero, in
|
(b) |-crash-all| performs a deliberate hard crash, dividing by zero, in
|
||||||
the event of any Problem message being issues -- this makes it easier to
|
the event of any Problem message being issues -- this makes it easier to
|
||||||
obtain stack backtraces in a debugger;
|
obtain stack backtraces in a debugger.
|
||||||
(c) |-noindex| skips the production of an Index, which reduces file system
|
(c) |-noindex| skips the production of an Index, which reduces file system
|
||||||
writes in a big testing run, and also saves a little time;
|
writes in a big testing run, and also saves a little time.
|
||||||
(d) |-noprogress| suppresses console output of the "++ 26% (Binding rulebooks)"
|
(d) |-noprogress| suppresses console output of the "++ 26% (Binding rulebooks)"
|
||||||
kind;
|
kind.
|
||||||
(e) |-sigils| causes each Problem message to be preceded in console output
|
(e) |-sigils| causes each Problem message to be preceded in console output
|
||||||
by its "sigil", that is, its internal code: for example, |PM_PropertyNameTooLong|;
|
by its "sigil", that is, its internal code. A typical sigil is
|
||||||
|
|PM_PropertyNameTooLong|, where the ubiquitous PM stands for "property
|
||||||
|
message".
|
||||||
(f) |-require-problem SIGIL| tells Inform to return an exit code of 0 if
|
(f) |-require-problem SIGIL| tells Inform to return an exit code of 0 if
|
||||||
exactly this problem message is produced, and 1 otherwise;
|
exactly this problem message is produced, and 1 otherwise.
|
||||||
(g) |-case X|
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ Inform returns an exit code of 0 if successful, or else it throws errors
|
|
||||||
to |stderr| and returns 1 if unsuccessful.
|
|
||||||
|
|
||||||
@h Prehistory.
|
@h Prehistory.
|
||||||
Build 1A01 was the first rough draft of a completed compiler: but it did
|
Build 1A01 was the first rough draft of a completed compiler: but it did
|
||||||
|
|
|
@ -134,7 +134,7 @@ list is not exhaustive.
|
||||||
CommandLine::declare_textual_switch(FORMAT_CLSW, L"format", 1,
|
CommandLine::declare_textual_switch(FORMAT_CLSW, L"format", 1,
|
||||||
L"compile I6 code suitable for the virtual machine X");
|
L"compile I6 code suitable for the virtual machine X");
|
||||||
CommandLine::declare_boolean_switch(CENSUS_CLSW, L"census", 1,
|
CommandLine::declare_boolean_switch(CENSUS_CLSW, L"census", 1,
|
||||||
L"rather than compile, perform an extensions census");
|
L"perform an extensions census (rather than compile)");
|
||||||
CommandLine::declare_boolean_switch(CLOCK_CLSW, L"clock", 1,
|
CommandLine::declare_boolean_switch(CLOCK_CLSW, L"clock", 1,
|
||||||
L"time how long inform7 takes to run");
|
L"time how long inform7 takes to run");
|
||||||
CommandLine::declare_boolean_switch(DEBUG_CLSW, L"debug", 1,
|
CommandLine::declare_boolean_switch(DEBUG_CLSW, L"debug", 1,
|
||||||
|
|
|
@ -2,8 +2,6 @@ Title: core
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: The core of the Inform compiler, as a module.
|
Purpose: The core of the Inform compiler, as a module.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
|
|
||||||
Chapter 1: Configuration and Control
|
Chapter 1: Configuration and Control
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Title: core-test
|
Title: core-test
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: For testing the core compiler module in isolation from its IF layer
|
Purpose: For testing the core compiler module in isolation from its IF layer.
|
||||||
Language: C for Inform
|
Language: C for Inform
|
||||||
Declare Section Usage: Off
|
Declare Section Usage: Off
|
||||||
Web Syntax Version: 2
|
Web Syntax Version: 2
|
||||||
|
|
|
@ -2,8 +2,6 @@ Title: if
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: The interactive-fiction specific layer of Inform, as a module.
|
Purpose: The interactive-fiction specific layer of Inform, as a module.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
|
|
||||||
Chapter 1: Starting Up
|
Chapter 1: Starting Up
|
||||||
|
|
|
@ -2,8 +2,6 @@ Title: index
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: Indexing tools needed by Inform, as a module.
|
Purpose: Indexing tools needed by Inform, as a module.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
|
|
||||||
Chapter 1: Starting Up
|
Chapter 1: Starting Up
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Title: inflections-test
|
Title: inflections-test
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: For testing foundation
|
Purpose: Purpose: Unit tests for the inflections module.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
Declare Section Usage: Off
|
||||||
Web Syntax Version: 2
|
Web Syntax Version: 2
|
||||||
|
|
|
@ -2,8 +2,6 @@ Title: kinds
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: The type system used by Inform.
|
Purpose: The type system used by Inform.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
|
|
||||||
Chapter 1: Starting Up
|
Chapter 1: Starting Up
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Title: kinds-test
|
Title: kinds-test
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: For testing kinds
|
Purpose: Unit tests for the kinds module.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
Declare Section Usage: Off
|
||||||
Web Syntax Version: 2
|
Web Syntax Version: 2
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
Title: linguistics
|
Title: linguistics
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: A library of common code used by all of the Inform tools.
|
Purpose: A library of code to store grammatical categories of vocabulary.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
|
|
||||||
Chapter 1: Setting Up
|
Chapter 1: Setting Up
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Title: linguistics-test
|
Title: linguistics-test
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: For testing linguistics
|
Purpose: Unit tests for the linguistics module.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
Declare Section Usage: Off
|
||||||
Web Syntax Version: 2
|
Web Syntax Version: 2
|
||||||
|
|
|
@ -2,8 +2,6 @@ Title: multimedia
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: A multimedia extension module for Inform.
|
Purpose: A multimedia extension module for Inform.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
|
|
||||||
Chapter 1: Starting Up
|
Chapter 1: Starting Up
|
||||||
|
|
|
@ -2,8 +2,6 @@ Title: problems
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: The issuing mechanism for problem messages used by Inform.
|
Purpose: The issuing mechanism for problem messages used by Inform.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
|
|
||||||
Chapter 1: Starting Up
|
Chapter 1: Starting Up
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Title: problems-test
|
Title: problems-test
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: For testing problems
|
Purpose: Unit tests for the problems module.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
Declare Section Usage: Off
|
||||||
Web Syntax Version: 2
|
Web Syntax Version: 2
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
Title: syntax
|
Title: syntax
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: A library of common code used by all of the Inform tools.
|
Purpose: A library of code to build a parse tree and break text into sentences.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
|
|
||||||
Chapter 1: Setting Up
|
Chapter 1: Setting Up
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Title: syntax-test
|
Title: syntax-test
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: For testing foundation
|
Purpose: Unit tests for the syntax module.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
Declare Section Usage: Off
|
||||||
Web Syntax Version: 2
|
Web Syntax Version: 2
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
Title: words
|
Title: words
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: A library of common code used by all of the Inform tools.
|
Purpose: A library of code for reading natural language into a stream of words.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
|
|
||||||
Chapter 1: Setting Up
|
Chapter 1: Setting Up
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Title: words-test
|
Title: words-test
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: For testing foundation
|
Purpose: Unit tests for the words module.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
Declare Section Usage: Off
|
||||||
Web Syntax Version: 2
|
Web Syntax Version: 2
|
||||||
|
|
|
@ -82,7 +82,7 @@ to problem messages:
|
||||||
=
|
=
|
||||||
void Coverage::which_problems_are_referenced(void) {
|
void Coverage::which_problems_are_referenced(void) {
|
||||||
pathname *D = Pathnames::from_text(I"resources");
|
pathname *D = Pathnames::from_text(I"resources");
|
||||||
D = Pathnames::subfolder(I"Documentation")
|
D = Pathnames::subfolder(D, I"Documentation");
|
||||||
filename *WWI = Filenames::in_folder(D, I"Writing with Inform.txt");
|
filename *WWI = Filenames::in_folder(D, I"Writing with Inform.txt");
|
||||||
TextFiles::read(WWI, FALSE, "unable to read 'Writing with Inform' source text", TRUE,
|
TextFiles::read(WWI, FALSE, "unable to read 'Writing with Inform' source text", TRUE,
|
||||||
&Coverage::xref_harvester, NULL, NULL);
|
&Coverage::xref_harvester, NULL, NULL);
|
||||||
|
|
|
@ -154,9 +154,15 @@ void Readme::command(write_state *ws, text_stream *OUT, text_stream *command, te
|
||||||
project *P = Inversion::read(program, TRUE);
|
project *P = Inversion::read(program, TRUE);
|
||||||
DISCARD_TEXT(program);
|
DISCARD_TEXT(program);
|
||||||
if (P->current_version) {
|
if (P->current_version) {
|
||||||
WRITE("version %S '%S'", P->current_version->number, P->current_version->name);
|
WRITE("version");
|
||||||
|
if (Str::len(P->current_version->number) > 0)
|
||||||
|
WRITE(" %S", P->current_version->number);
|
||||||
|
if (Str::len(P->current_version->name) > 0)
|
||||||
|
WRITE(" '%S'", P->current_version->name);
|
||||||
if (Str::ne(P->current_version->build_code, I"9Z99"))
|
if (Str::ne(P->current_version->build_code, I"9Z99"))
|
||||||
WRITE(" (build %S)", P->current_version->build_code);
|
WRITE(" (build %S)", P->current_version->build_code);
|
||||||
|
} else {
|
||||||
|
WRITE("unversioned");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Regexp::dispose_of(&mr);
|
Regexp::dispose_of(&mr);
|
||||||
|
|
|
@ -20,6 +20,7 @@ typedef struct project {
|
||||||
struct version *current_version;
|
struct version *current_version;
|
||||||
struct text_stream *purpose;
|
struct text_stream *purpose;
|
||||||
struct text_stream *conts;
|
struct text_stream *conts;
|
||||||
|
int next_is_version;
|
||||||
MEMORY_MANAGEMENT
|
MEMORY_MANAGEMENT
|
||||||
} project;
|
} project;
|
||||||
|
|
||||||
|
@ -32,8 +33,11 @@ typedef struct version {
|
||||||
MEMORY_MANAGEMENT
|
MEMORY_MANAGEMENT
|
||||||
} version;
|
} version;
|
||||||
|
|
||||||
@ And here we turn a named web into its |project| structure. We print its
|
@ And here we take a filename or pathname, which might be to a web, with
|
||||||
current version number when we first load a project in:
|
or without a versions file; or to an extension; or to a website template;
|
||||||
|
or to the original Inform 6 source code. These all store their version
|
||||||
|
numbering differently, so we need code which is something of a Swiss army
|
||||||
|
knife.
|
||||||
|
|
||||||
=
|
=
|
||||||
project *Inversion::read(text_stream *web, int silently) {
|
project *Inversion::read(text_stream *web, int silently) {
|
||||||
|
@ -48,10 +52,26 @@ project *Inversion::read(text_stream *web, int silently) {
|
||||||
P->current_version = NULL;
|
P->current_version = NULL;
|
||||||
P->conts = Str::new();
|
P->conts = Str::new();
|
||||||
P->purpose = Str::new();
|
P->purpose = Str::new();
|
||||||
|
P->next_is_version = FALSE;
|
||||||
|
if (Str::ends_with_wide_string(web, L".i7x")) {
|
||||||
|
P->versions_file = NULL;
|
||||||
|
P->contents_file = NULL;
|
||||||
|
@<Read in the extension file@>;
|
||||||
|
} else {
|
||||||
P->versions_file = Filenames::in_folder(Pathnames::from_text(web), I"versions.txt");
|
P->versions_file = Filenames::in_folder(Pathnames::from_text(web), I"versions.txt");
|
||||||
P->contents_file = Filenames::in_folder(Pathnames::from_text(web), I"Contents.w");
|
P->contents_file = Filenames::in_folder(Pathnames::from_text(web), I"Contents.w");
|
||||||
if (TextFiles::exists(P->contents_file)) @<Read in the contents file@>;
|
if (TextFiles::exists(P->contents_file)) {
|
||||||
|
@<Read in the contents file@>;
|
||||||
|
if (TextFiles::exists(P->versions_file) == FALSE)
|
||||||
|
@<Read version from the contents file@>;
|
||||||
|
}
|
||||||
if (TextFiles::exists(P->versions_file)) @<Read in the versions file@>;
|
if (TextFiles::exists(P->versions_file)) @<Read in the versions file@>;
|
||||||
|
filename *I6_vn = Filenames::in_folder(
|
||||||
|
Pathnames::subfolder(Pathnames::from_text(web), I"inform6"), I"header.h");
|
||||||
|
if (TextFiles::exists(I6_vn)) @<Read in I6 source header file@>;
|
||||||
|
filename *template_vn = Filenames::in_folder(Pathnames::from_text(web), I"(manifest).txt");
|
||||||
|
if (TextFiles::exists(template_vn)) @<Read in template manifest file@>;
|
||||||
|
}
|
||||||
@<Print the current version number@>;
|
@<Print the current version number@>;
|
||||||
return P;
|
return P;
|
||||||
}
|
}
|
||||||
|
@ -61,14 +81,44 @@ project *Inversion::read(text_stream *web, int silently) {
|
||||||
PRINT("%S: %S %S (build %S)\n", web,
|
PRINT("%S: %S %S (build %S)\n", web,
|
||||||
P->current_version->name, P->current_version->number, P->current_version->build_code);
|
P->current_version->name, P->current_version->number, P->current_version->build_code);
|
||||||
|
|
||||||
|
@<Read in the extension file@> =
|
||||||
|
TextFiles::read(Filenames::from_text(web), FALSE, "unable to read extension", TRUE,
|
||||||
|
&Inversion::extension_harvester, NULL, P);
|
||||||
|
|
||||||
@<Read in the contents file@> =
|
@<Read in the contents file@> =
|
||||||
TextFiles::read(P->contents_file, FALSE, "unable to read contents section", TRUE,
|
TextFiles::read(P->contents_file, FALSE, "unable to read contents section", TRUE,
|
||||||
&Inversion::contents_harvester, NULL, P);
|
&Inversion::contents_harvester, NULL, P);
|
||||||
|
|
||||||
|
@<Read version from the contents file@> =
|
||||||
|
TextFiles::read(P->contents_file, FALSE, "unable to read contents section", TRUE,
|
||||||
|
&Inversion::contents_version_harvester, NULL, P);
|
||||||
|
|
||||||
@<Read in the versions file@> =
|
@<Read in the versions file@> =
|
||||||
TextFiles::read(P->versions_file, FALSE, "unable to read roster of version numbers", TRUE,
|
TextFiles::read(P->versions_file, FALSE, "unable to read roster of version numbers", TRUE,
|
||||||
&Inversion::version_harvester, NULL, P);
|
&Inversion::version_harvester, NULL, P);
|
||||||
|
|
||||||
|
@<Read in I6 source header file@> =
|
||||||
|
TextFiles::read(I6_vn, FALSE, "unable to read header file from I6 source", TRUE,
|
||||||
|
&Inversion::header_harvester, NULL, P);
|
||||||
|
|
||||||
|
@<Read in template manifest file@> =
|
||||||
|
TextFiles::read(template_vn, FALSE, "unable to read manifest file from website template", TRUE,
|
||||||
|
&Inversion::template_harvester, NULL, P);
|
||||||
|
|
||||||
|
@ The format for the contents section of a web is documented in Inweb.
|
||||||
|
|
||||||
|
=
|
||||||
|
void Inversion::extension_harvester(text_stream *text, text_file_position *tfp, void *state) {
|
||||||
|
project *P = (project *) state;
|
||||||
|
match_results mr = Regexp::create_mr();
|
||||||
|
if (Str::len(text) == 0) return;
|
||||||
|
if (Regexp::match(&mr, text, L" *Version (%c*?) of %c*begins here. *")) {
|
||||||
|
@<Ensure a current version exists@>;
|
||||||
|
P->current_version->number = Str::duplicate(mr.exp[0]);
|
||||||
|
}
|
||||||
|
Regexp::dispose_of(&mr);
|
||||||
|
}
|
||||||
|
|
||||||
@ The format for the contents section of a web is documented in Inweb.
|
@ The format for the contents section of a web is documented in Inweb.
|
||||||
|
|
||||||
=
|
=
|
||||||
|
@ -82,6 +132,17 @@ void Inversion::contents_harvester(text_stream *text, text_file_position *tfp, v
|
||||||
Regexp::dispose_of(&mr);
|
Regexp::dispose_of(&mr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Inversion::contents_version_harvester(text_stream *text, text_file_position *tfp, void *state) {
|
||||||
|
project *P = (project *) state;
|
||||||
|
match_results mr = Regexp::create_mr();
|
||||||
|
if (Str::len(text) == 0) return;
|
||||||
|
if (Regexp::match(&mr, text, L" *Version Number: *(%c*?) *")) {
|
||||||
|
@<Ensure a current version exists@>;
|
||||||
|
P->current_version->number = Str::duplicate(mr.exp[0]);
|
||||||
|
}
|
||||||
|
Regexp::dispose_of(&mr);
|
||||||
|
}
|
||||||
|
|
||||||
@ A version file contains lines which can either be a special command, or
|
@ A version file contains lines which can either be a special command, or
|
||||||
give details of a version. The commands are |Automatic| or |Manual| (the
|
give details of a version. The commands are |Automatic| or |Manual| (the
|
||||||
latter is the default), or |Sync to W|, where |W| is another project.
|
latter is the default), or |Sync to W|, where |W| is another project.
|
||||||
|
@ -119,6 +180,57 @@ void Inversion::version_harvester(text_stream *text, text_file_position *tfp, vo
|
||||||
Regexp::dispose_of(&mr);
|
Regexp::dispose_of(&mr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ Explicit code to read from |header.h| in the Inform 6 repository.
|
||||||
|
|
||||||
|
=
|
||||||
|
void Inversion::header_harvester(text_stream *text, text_file_position *tfp, void *state) {
|
||||||
|
project *P = (project *) state;
|
||||||
|
match_results mr = Regexp::create_mr();
|
||||||
|
if (Str::len(text) == 0) return;
|
||||||
|
if (Regexp::match(&mr, text, L"#define RELEASE_NUMBER (%c*?) *")) {
|
||||||
|
@<Ensure a current version exists@>;
|
||||||
|
P->current_version->number = Str::duplicate(mr.exp[0]);
|
||||||
|
}
|
||||||
|
if (Regexp::match(&mr, text, L"#define RELEASE_DATE \"(%c*?)\" *")) {
|
||||||
|
@<Ensure a current version exists@>;
|
||||||
|
P->current_version->name = Str::duplicate(mr.exp[0]);
|
||||||
|
P->current_version->date = Str::duplicate(mr.exp[0]);
|
||||||
|
}
|
||||||
|
Regexp::dispose_of(&mr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ Explicit code to read from the manifest file of a website template.
|
||||||
|
|
||||||
|
=
|
||||||
|
void Inversion::template_harvester(text_stream *text, text_file_position *tfp, void *state) {
|
||||||
|
project *P = (project *) state;
|
||||||
|
match_results mr = Regexp::create_mr();
|
||||||
|
if (Str::len(text) == 0) return;
|
||||||
|
if (Regexp::match(&mr, text, L"%[INTERPRETERVERSION%]")) {
|
||||||
|
P->next_is_version = TRUE;
|
||||||
|
} else if (P->next_is_version) {
|
||||||
|
@<Ensure a current version exists@>;
|
||||||
|
P->current_version->name = Str::duplicate(text);
|
||||||
|
P->next_is_version = FALSE;
|
||||||
|
}
|
||||||
|
Regexp::dispose_of(&mr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ And many of the above use this, which assumes there will be just one single
|
||||||
|
version number known for a program.
|
||||||
|
|
||||||
|
@<Ensure a current version exists@> =
|
||||||
|
if (P->current_version == NULL) {
|
||||||
|
version *V = CREATE(version);
|
||||||
|
V->name = NULL;
|
||||||
|
V->number = NULL;
|
||||||
|
V->build_code = I"9Z99";
|
||||||
|
V->date = NULL;
|
||||||
|
V->notes = NULL;
|
||||||
|
ADD_TO_LINKED_LIST(V, version, P->versions);
|
||||||
|
P->current_version = V;
|
||||||
|
}
|
||||||
|
|
||||||
@ The following then writes back the versions file, following a version
|
@ The following then writes back the versions file, following a version
|
||||||
increment:
|
increment:
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@ Title: inpolicy
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: A lint-like tool to check up on various policies used in Inform source code.
|
Purpose: A lint-like tool to check up on various policies used in Inform source code.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
Version Number: 1
|
Version Number: 1
|
||||||
Version Name: Plan A
|
Version Name: Plan A
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
Title: inter
|
Title: inter
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: For handling intermediate Inform code
|
Purpose: For handling intermediate Inform code.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
Version Number: 1
|
Version Number: 1
|
||||||
Version Name: Axion
|
Version Name: Axion
|
||||||
|
|
|
@ -2,8 +2,6 @@ Title: codegen
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: An embryonic code generator for I6 code.
|
Purpose: An embryonic code generator for I6 code.
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
|
|
||||||
Chapter 1: Setting Up
|
Chapter 1: Setting Up
|
||||||
|
|
|
@ -2,8 +2,6 @@ Title: inter
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: Code for dealing with intermediate-level Inform
|
Purpose: Code for dealing with intermediate-level Inform
|
||||||
Language: InC
|
Language: InC
|
||||||
Declare Section Usage: Off
|
|
||||||
Web Syntax Version: 2
|
|
||||||
Licence: Artistic License 2.0
|
Licence: Artistic License 2.0
|
||||||
|
|
||||||
Chapter 1: Setting Up
|
Chapter 1: Setting Up
|
||||||
|
|
|
@ -86,32 +86,35 @@ assembles all those programs and resources, which fall into two categories:
|
||||||
This repository is where development is done on the following:
|
This repository is where development is done on the following:
|
||||||
|
|
||||||
@define primary(program, language)
|
@define primary(program, language)
|
||||||
* @program - @purpose(@program) Current @version(@program). @language
|
* @program - @purpose(@program) - __@version(@program)__ - @language
|
||||||
@end
|
@end
|
||||||
@define book(title, path, topic)
|
@define book(title, path, topic)
|
||||||
* @title - @topic. Ebook in Indoc format, stored at path @path.
|
* @title - @topic. Ebook in Indoc format, stored at path @path.
|
||||||
@end
|
@end
|
||||||
|
@define extension(path)
|
||||||
|
* @path - __@version(@path)__
|
||||||
|
@end
|
||||||
@primary(inform7, 'Web of InC')
|
@primary(inform7, 'Web of InC')
|
||||||
* The I6 Template - The .i6t files used in code generation. Inform 6; held in inform7/Internal/I6T
|
* 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 - Libraries of code. Inform 7
|
||||||
* inform7/Internal/Extensions/Emily Short/Basic Help Menu.i7x
|
@extension('inform7/Internal/Extensions/Emily Short/Basic Help Menu.i7x')
|
||||||
* inform7/Internal/Extensions/Emily Short/Basic Screen Effects.i7x
|
@extension('inform7/Internal/Extensions/Emily Short/Basic Screen Effects.i7x')
|
||||||
* inform7/Internal/Extensions/Emily Short/Complex Listing.i7x
|
@extension('inform7/Internal/Extensions/Emily Short/Complex Listing.i7x')
|
||||||
* inform7/Internal/Extensions/Emily Short/Glulx Entry Points.i7x
|
@extension('inform7/Internal/Extensions/Emily Short/Glulx Entry Points.i7x')
|
||||||
* inform7/Internal/Extensions/Emily Short/Glulx Image Centering.i7x
|
@extension('inform7/Internal/Extensions/Emily Short/Glulx Image Centering.i7x')
|
||||||
* inform7/Internal/Extensions/Emily Short/Glulx Text Effects.i7x
|
@extension('inform7/Internal/Extensions/Emily Short/Glulx Text Effects.i7x')
|
||||||
* inform7/Internal/Extensions/Emily Short/Inanimate Listeners.i7x
|
@extension('inform7/Internal/Extensions/Emily Short/Inanimate Listeners.i7x')
|
||||||
* inform7/Internal/Extensions/Emily Short/Locksmith.i7x
|
@extension('inform7/Internal/Extensions/Emily Short/Locksmith.i7x')
|
||||||
* inform7/Internal/Extensions/Emily Short/Menus.i7x
|
@extension('inform7/Internal/Extensions/Emily Short/Menus.i7x')
|
||||||
* inform7/Internal/Extensions/Emily Short/Punctuation Removal.i7x
|
@extension('inform7/Internal/Extensions/Emily Short/Punctuation Removal.i7x')
|
||||||
* inform7/Internal/Extensions/Emily Short/Skeleton Keys.i7x
|
@extension('inform7/Internal/Extensions/Emily Short/Skeleton Keys.i7x')
|
||||||
* inform7/Internal/Extensions/Eric Eve/Epistemology.i7x
|
@extension('inform7/Internal/Extensions/Eric Eve/Epistemology.i7x')
|
||||||
* inform7/Internal/Extensions/Graham Nelson/Approximate Metric Units.i7x
|
@extension('inform7/Internal/Extensions/Graham Nelson/Approximate Metric Units.i7x')
|
||||||
* inform7/Internal/Extensions/Graham Nelson/English Language.i7x
|
@extension('inform7/Internal/Extensions/Graham Nelson/English Language.i7x')
|
||||||
* inform7/Internal/Extensions/Graham Nelson/Metric Units.i7x
|
@extension('inform7/Internal/Extensions/Graham Nelson/Metric Units.i7x')
|
||||||
* inform7/Internal/Extensions/Graham Nelson/Rideable Vehicles.i7x
|
@extension('inform7/Internal/Extensions/Graham Nelson/Rideable Vehicles.i7x')
|
||||||
* inform7/Internal/Extensions/Graham Nelson/Unicode Character Names.i7x
|
@extension('inform7/Internal/Extensions/Graham Nelson/Unicode Character Names.i7x')
|
||||||
* inform7/Internal/Extensions/Graham Nelson/Unicode Full Character Names.i7x
|
@extension('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/HTML - Files needed for generating extension documentation and the like. HTML, Javascript, CSS
|
||||||
* inform7/Internal/Languages - Natural language definition bundles
|
* inform7/Internal/Languages - Natural language definition bundles
|
||||||
* inform7/Internal/Templates - template websites for Inform 7's 'release as a website' feature
|
* inform7/Internal/Templates - template websites for Inform 7's 'release as a website' feature
|
||||||
|
@ -152,14 +155,17 @@ but this is not where development on them is done, and no pull requests will
|
||||||
be accepted. (Note that these are not git submodules.)
|
be accepted. (Note that these are not git submodules.)
|
||||||
|
|
||||||
@define secondary(program, for, maintainer, username, repository)
|
@define secondary(program, for, maintainer, username, repository)
|
||||||
* @program - @for - from [https://github.com/@username/@repository], maintained by [@maintainer](https://github.com/@username)
|
* @program - @for - __@version(@program)__ - from [https://github.com/@username/@repository], maintained by [@maintainer](https://github.com/@username)
|
||||||
@end
|
@end
|
||||||
@secondary(inform6, 'the Inform 6 compiler (used by I7 as a code generator)', 'David Kinder', DavidKinder, Inform6)
|
@secondary(inform6, 'The Inform 6 compiler (used by I7 as a code generator).', 'David Kinder', DavidKinder, Inform6)
|
||||||
|
|
||||||
|
@define template(program, for, maintainer, username, repository)
|
||||||
|
* @program - @for - __@version(@program)__ - from [https://github.com/@username/@repository], maintained by [@maintainer](https://github.com/@username)
|
||||||
|
@end
|
||||||
* inform7/Internal/Templates - template websites for Inform 7's 'release as a website' feature
|
* 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)
|
@template('inform7/Internal/Templates/Parchment', 'Z-machine in Javascript', 'Dannii Willis', curiousdannii, parchment)
|
||||||
* inform7/Internal/Templates/Quixe - from [https://github.com/erkyrath/quixe], maintained by [Andrew Plotkin](https://github.com/erkyrath)
|
@template('inform7/Internal/Templates/Quixe', 'Glulx in Javascript', 'Andrew Plotkin', erkyrath, quixe)
|
||||||
* inform7/Internal/Templates/Vorpal - from (part of) [https://github.com/vorple/inform7], maintained by [Juhana Leinonen](https://github.com/vorple)
|
@template('inform7/Internal/Templates/Vorple', 'Multimedia in Javascript', 'Juhana Leinonen', vorple, inform7)
|
||||||
|
|
||||||
### Binary resources (such as image files)
|
### Binary resources (such as image files)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Title: srules
|
Title: srules
|
||||||
Author: Graham Nelson
|
Author: Graham Nelson
|
||||||
Purpose: The Standard Rules extension, included in all Inform 7 works
|
Purpose: The Standard Rules extension, included in all Inform 7 works.
|
||||||
Version Number: 5/190315
|
Version Number: 5/190315
|
||||||
Language: Inform 7
|
Language: Inform 7
|
||||||
Web Syntax Version: 2
|
Web Syntax Version: 2
|
||||||
|
|
|
@ -51,7 +51,7 @@ this was explained in terms of Missee Lee, a black and white cat
|
||||||
living in North Oxford; named for a Cambridge-educated pirate queen in
|
living in North Oxford; named for a Cambridge-educated pirate queen in
|
||||||
the South China seas who is the heroine -- or villainess -- of the
|
the South China seas who is the heroine -- or villainess -- of the
|
||||||
tenth in Arthur Ransome's Swallows and Amazons series of children's
|
tenth in Arthur Ransome's Swallows and Amazons series of children's
|
||||||
books, {\it Missee Lee} (1941). The rule was then removed, but it
|
books, "Missee Lee" (1941). The rule was then removed, but it
|
||||||
seemed sad to delete the only mention of Missee, and all the more so
|
seemed sad to delete the only mention of Missee, and all the more so
|
||||||
since she died (at a grand old age and in mid-spring) in 2008.
|
since she died (at a grand old age and in mid-spring) in 2008.
|
||||||
|
|
||||||
|
|
|
@ -182,8 +182,8 @@ Rule for deciding whether all includes a person while dropping or throwing
|
||||||
it does not.
|
it does not.
|
||||||
|
|
||||||
@ The supplying activities are linguistically interesting, for reasons gone
|
@ The supplying activities are linguistically interesting, for reasons gone
|
||||||
into in the paper {\it Interactive Fiction, Natural Language and Semantic
|
into in the paper "Interactive Fiction, Natural Language and Semantic
|
||||||
Analysis}: English verbs do not naturally seem to feature optional nouns.
|
Analysis": English verbs do not naturally seem to feature optional nouns.
|
||||||
Indeed, we say "it rained on Tuesday" where "it" refers to nothing at all,
|
Indeed, we say "it rained on Tuesday" where "it" refers to nothing at all,
|
||||||
merely because we can't bring ourselves to leave a gap and say just "rained
|
merely because we can't bring ourselves to leave a gap and say just "rained
|
||||||
on Tuesday". A better example here would be "it sounded like rain", because
|
on Tuesday". A better example here would be "it sounded like rain", because
|
||||||
|
@ -248,7 +248,7 @@ by repeatedly calling the following activity:
|
||||||
=
|
=
|
||||||
Handling the final question is an activity. [29]
|
Handling the final question is an activity. [29]
|
||||||
|
|
||||||
@ It follows that this activity {\it must} at least sometimes do something
|
@ It follows that this activity must at least sometimes do something
|
||||||
dramatic to the execution state: perform a quit, for instance. Four
|
dramatic to the execution state: perform a quit, for instance. Four
|
||||||
primitive rules are available for the drastic things which the activity
|
primitive rules are available for the drastic things which the activity
|
||||||
might wish to do, but these are not placed in any rulebook: instead they
|
might wish to do, but these are not placed in any rulebook: instead they
|
||||||
|
@ -369,7 +369,7 @@ then a single (though often, as here, multi-paragraph) locale:
|
||||||
|
|
||||||
|Sentier Le Corbusier|
|
|Sentier Le Corbusier|
|
||||||
|A coastal walk along the rocky shore between Nice and Menton.|
|
|A coastal walk along the rocky shore between Nice and Menton.|
|
||||||
| | {\it now the locale for the room Sentier Le Corbusier:}
|
| ...now the locale for the room Sentier Le Corbusier:|
|
||||||
|A translucent jellyfish has been washed up by the waves.|
|
|A translucent jellyfish has been washed up by the waves.|
|
||||||
| |
|
| |
|
||||||
|You can also see a bucket and a spade here.|
|
|You can also see a bucket and a spade here.|
|
||||||
|
@ -387,11 +387,11 @@ When the player is in or on top of something, multiple locales are described:
|
||||||
|
|
||||||
|Sentier Le Corbusier (in the golf cart)|
|
|Sentier Le Corbusier (in the golf cart)|
|
||||||
|A coastal walk along the rocky shore between Nice and Menton.|
|
|A coastal walk along the rocky shore between Nice and Menton.|
|
||||||
| | {\it now the locale for the room Sentier Le Corbusier:}
|
| ...now the locale for the room Sentier Le Corbusier:|
|
||||||
|A translucent jellyfish has been washed up by the waves.|
|
|A translucent jellyfish has been washed up by the waves.|
|
||||||
| |
|
| |
|
||||||
|You can also see a bucket and a spade here.|
|
|You can also see a bucket and a spade here.|
|
||||||
| | {\it now the locale for the golf cart:}
|
| ...now the locale for the golf cart:|
|
||||||
|In the golf cart you can see a map of Villefranche-sur-Mer.|
|
|In the golf cart you can see a map of Villefranche-sur-Mer.|
|
||||||
|
|
||||||
To sum up, the text produced by LOOK consists of a header (produced by
|
To sum up, the text produced by LOOK consists of a header (produced by
|
||||||
|
|
|
@ -73,7 +73,7 @@ are case sensitive on the first word, so that "to say a something" and "to
|
||||||
say A something" are different.
|
say A something" are different.
|
||||||
|
|
||||||
A curiosity of the original I6 design, arising I think mostly from the need to
|
A curiosity of the original I6 design, arising I think mostly from the need to
|
||||||
save property memory in {\it Curses} (1993), the work of IF for which Inform 1
|
save property memory in "Curses" (1993), the work of IF for which Inform 1
|
||||||
had been created, is that it lacks the |print (A) ...| syntax to match the
|
had been created, is that it lacks the |print (A) ...| syntax to match the
|
||||||
other forms. The omission is made good by using a routine in the I6 library
|
other forms. The omission is made good by using a routine in the I6 library
|
||||||
instead.
|
instead.
|
||||||
|
@ -185,8 +185,8 @@ reimplements a form of Jon Ingold's former extension Text Variations, which
|
||||||
itself built on code going back to the days of I6.
|
itself built on code going back to the days of I6.
|
||||||
|
|
||||||
The head phrase here has one of the most complicated definitions in the SR,
|
The head phrase here has one of the most complicated definitions in the SR,
|
||||||
but is actually documented fairly explicitly in the {\it Extensions} chapter
|
but is actually documented fairly explicitly in the Extensions chapter
|
||||||
of {\it Writing with Inform}, so we won't repeat all that here. Essentially
|
of "Writing with Inform", so we won't repeat all that here. Essentially
|
||||||
it uses its own allocated cell of storage in an array to remember a state
|
it uses its own allocated cell of storage in an array to remember a state
|
||||||
between uses, and compiles as a switch statement based on the current state.
|
between uses, and compiles as a switch statement based on the current state.
|
||||||
|
|
||||||
|
@ -1696,7 +1696,7 @@ To decide whether the action is not silent:
|
||||||
(- (keep_silent == false) -).
|
(- (keep_silent == false) -).
|
||||||
|
|
||||||
@ The requirements of the current action can be tested. The following
|
@ The requirements of the current action can be tested. The following
|
||||||
may be reimplemented using a verb {\it to require} at some future point.
|
may be reimplemented using a verb "to require" at some future point.
|
||||||
|
|
||||||
=
|
=
|
||||||
Section SR5/4/2 - Actions, activities and rules - Action requirements (for interactive fiction language element only)
|
Section SR5/4/2 - Actions, activities and rules - Action requirements (for interactive fiction language element only)
|
||||||
|
@ -1900,7 +1900,7 @@ To decide which rulebook outcome is the outcome of the rulebook
|
||||||
@h The model world.
|
@h The model world.
|
||||||
Phrase definitions with wordings like "the story has ended" are a
|
Phrase definitions with wordings like "the story has ended" are a
|
||||||
necessary evil. The "has" here is parsed literally, not as the present
|
necessary evil. The "has" here is parsed literally, not as the present
|
||||||
tense of {\it to have}, so inflected forms like "the story had ended" are
|
tense of "to have", so inflected forms like "the story had ended" are
|
||||||
not available: nor is there any value "the story" for the subject noun
|
not available: nor is there any value "the story" for the subject noun
|
||||||
phrase to hold... and so on. Ideally, we would word all conditional phrases
|
phrase to hold... and so on. Ideally, we would word all conditional phrases
|
||||||
so as to avoid the verbs, but natural language just doesn't work that way.
|
so as to avoid the verbs, but natural language just doesn't work that way.
|
||||||
|
@ -2229,7 +2229,7 @@ To say parser command so far:
|
||||||
(- PrintCommand(); -).
|
(- PrintCommand(); -).
|
||||||
|
|
||||||
@h Miscellaneous other phrases.
|
@h Miscellaneous other phrases.
|
||||||
Again, {\it these are not part of Inform's public specification}.
|
Again, these are not part of Inform's public specification.
|
||||||
|
|
||||||
=
|
=
|
||||||
Section SR5/9/1 - Miscellaneous other phrases - Unindexed (for interactive fiction language element only)
|
Section SR5/9/1 - Miscellaneous other phrases - Unindexed (for interactive fiction language element only)
|
||||||
|
|
|
@ -59,7 +59,7 @@ Definition: a thing is held if the player is holding it.
|
||||||
@ Animate beings also have the ability to see and touch their surroundings,
|
@ Animate beings also have the ability to see and touch their surroundings,
|
||||||
but note that we only model the ability to do these things -- we do not attempt
|
but note that we only model the ability to do these things -- we do not attempt
|
||||||
to track what they actually do see or touch at any given moment, so there are
|
to track what they actually do see or touch at any given moment, so there are
|
||||||
no built-in verbs {\it to see} or {\it to touch}.
|
no built-in verbs "to see" or "to touch".
|
||||||
|
|
||||||
=
|
=
|
||||||
The verb to be able to see means the visibility relation.
|
The verb to be able to see means the visibility relation.
|
||||||
|
@ -312,22 +312,18 @@ and so on).
|
||||||
A thing has a text called a description.
|
A thing has a text called a description.
|
||||||
A thing has a text called an initial appearance.
|
A thing has a text called an initial appearance.
|
||||||
|
|
||||||
@ Lastly on things: an implication about scenery. The following sentence
|
@ Lastly on things: an implication about scenery. The following sentence looks
|
||||||
looks like an assertion much like others above ("A thing is usually inedible",
|
like an assertion much like others above ("A thing is usually inedible", for
|
||||||
for instance) -- but this is misleading. What is different is that instead of
|
instance) -- but in fact it is an "implication": it says that an object having
|
||||||
reading $K(x)\Rightarrow Q(x)$, where $K$ is a kind and $Q$ is a property,
|
one property also probably has another. The Standard Rules make only very
|
||||||
this has the form $P(x)\Rightarrow Q(x)$: it says that an object having
|
sparing use of implications. They can trip up the user (who may quite
|
||||||
property $P$ also probably has property $Q$. Such sentences are called
|
reasonably say that it is up to him what properties something has): but they
|
||||||
implications, and the Standard Rules make only very sparing use of them.
|
are invaluable if they cause Inform to make deductions which any human reader
|
||||||
They can trip up the user (who may quite reasonably say that it is up to him
|
would always make without thought.
|
||||||
what properties something has): but they are invaluable if they cause Inform
|
|
||||||
to make deductions which any human reader would always make without thought.
|
|
||||||
|
|
||||||
They can of course be overruled by explicit sentences in the source text,
|
They can of course be overruled by explicit sentences in the source text,
|
||||||
just as every sentence qualified by "usually" can.
|
just as every sentence qualified by "usually" can.
|
||||||
|
|
||||||
The handful of implications in the Standard Rules are all commented as such.
|
|
||||||
|
|
||||||
=
|
=
|
||||||
Scenery is usually fixed in place. [An implication.]
|
Scenery is usually fixed in place. [An implication.]
|
||||||
|
|
||||||
|
@ -342,8 +338,8 @@ is how we get away with having just one set of 12 direction objects, not
|
||||||
12 different ones for every location.) Implicit in that assumption is that
|
12 different ones for every location.) Implicit in that assumption is that
|
||||||
the model world occupies a "flat" Euclidean space, to use further
|
the model world occupies a "flat" Euclidean space, to use further
|
||||||
mathematical jargon: it doesn't wrap around on itself, and there are no
|
mathematical jargon: it doesn't wrap around on itself, and there are no
|
||||||
bad positions where the directions fail. (Compare the Infocom game {\it Leather
|
bad positions where the directions fail. (Compare the Infocom game "Leather
|
||||||
Goddesses of Phobos}, in which the South Pole of Mars is just such a
|
Goddesses of Phobos", in which the South Pole of Mars is just such a
|
||||||
singularity: there are three routes out of this location, all of them
|
singularity: there are three routes out of this location, all of them
|
||||||
"north". This of course required special programming, and so it would in
|
"north". This of course required special programming, and so it would in
|
||||||
an Inform 7 work, too.) More concisely:
|
an Inform 7 work, too.) More concisely:
|
||||||
|
@ -424,7 +420,7 @@ Of the rest, N/S, NE/SW, E/W, SE/NW and U/D, it's noteworthy that this
|
||||||
choice imposes a cubical grid on the world, simply because the compass
|
choice imposes a cubical grid on the world, simply because the compass
|
||||||
directions are at 45 and 90 degree angles to each other: a hexagonal
|
directions are at 45 and 90 degree angles to each other: a hexagonal
|
||||||
tessalation would be more faithful to distances (it would get rid of the
|
tessalation would be more faithful to distances (it would get rid of the
|
||||||
awkward point that a NE move is $\sqrt{2}$ times the length of a N move),
|
awkward point that a NE move is root 2 times the length of a N move),
|
||||||
but in practice the world model doesn't care much about distances, another
|
but in practice the world model doesn't care much about distances, another
|
||||||
example of its qualitative nature. A further point is that, in a
|
example of its qualitative nature. A further point is that, in a
|
||||||
three-dimensional cubic lattice, we ought to have another eight pairs
|
three-dimensional cubic lattice, we ought to have another eight pairs
|
||||||
|
@ -514,7 +510,7 @@ A door is never pushable between rooms.
|
||||||
Include (- has door, -) when defining a door.
|
Include (- has door, -) when defining a door.
|
||||||
|
|
||||||
@ "Every exit is an entrance somewhere else," as Stoppard's play
|
@ "Every exit is an entrance somewhere else," as Stoppard's play
|
||||||
{\it Rosencrantz and Guildenstern are Dead} puts it: and though not all
|
"Rosencrantz and Guildenstern are Dead" puts it: and though not all
|
||||||
I7 doors are present on both sides, they do nevertheless have two sides.
|
I7 doors are present on both sides, they do nevertheless have two sides.
|
||||||
The representation of this is quite tricky because, as Stoppard implies,
|
The representation of this is quite tricky because, as Stoppard implies,
|
||||||
it's all a matter of which side you look at it from. What we call the
|
it's all a matter of which side you look at it from. What we call the
|
||||||
|
@ -614,12 +610,6 @@ on the current one. (Doors do this for the "horizontal" spatial model
|
||||||
between rooms, whereas containers do it for the "vertical" spatial model
|
between rooms, whereas containers do it for the "vertical" spatial model
|
||||||
of objects enclosing each other.)
|
of objects enclosing each other.)
|
||||||
|
|
||||||
The following diagram shows the kinds created by the Standard Rules (bold
|
|
||||||
boxes for fundamental kinds, plain ones for discretionary additions) and
|
|
||||||
the patterns of behaviour they share (dotted boxes).
|
|
||||||
|
|
||||||
[[Fig_A_1.png width 15cm]]
|
|
||||||
|
|
||||||
@h The openability pattern.
|
@h The openability pattern.
|
||||||
To satisfy the openability pattern, a thing has to provide both of the
|
To satisfy the openability pattern, a thing has to provide both of the
|
||||||
either/or properties "open" and "openable". This entitles it to be
|
either/or properties "open" and "openable". This entitles it to be
|
||||||
|
@ -745,7 +735,7 @@ more bytes of precious Z-machine array space than they necessarily would in
|
||||||
I6. This is all part of the doctrine that in I7, all characters are equal
|
I6. This is all part of the doctrine that in I7, all characters are equal
|
||||||
in status: all can be the player, all can carry out actions. Anyway: here
|
in status: all can be the player, all can carry out actions. Anyway: here
|
||||||
are all of those I6 properties, spatchcocked into the |Class| definition
|
are all of those I6 properties, spatchcocked into the |Class| definition
|
||||||
which NI will compile for "person" -- see $\S$21 of the DM4 for details
|
which NI will compile for "person" -- see section 21 of the DM4 for details
|
||||||
of why these are needed and what they do.
|
of why these are needed and what they do.
|
||||||
|
|
||||||
=
|
=
|
||||||
|
@ -805,7 +795,7 @@ person is necessary as the domain of P in "P carries X", for instance), and
|
||||||
that too many kinds confuses the picture and imposes what may be a constraining
|
that too many kinds confuses the picture and imposes what may be a constraining
|
||||||
structure on the user, who should be free to decide for himself what concepts
|
structure on the user, who should be free to decide for himself what concepts
|
||||||
are most helpful to organise. These arguments are discussed further in the
|
are most helpful to organise. These arguments are discussed further in the
|
||||||
white paper, {\it Natural Language, Semantic Analysis and Interactive Fiction}
|
white paper, "Natural Language, Semantic Analysis and Interactive Fiction"
|
||||||
(2005), but briefly: we are minimalist but not puritanically so.
|
(2005), but briefly: we are minimalist but not puritanically so.
|
||||||
|
|
||||||
@h Men, women and animals.
|
@h Men, women and animals.
|
||||||
|
@ -865,8 +855,7 @@ fall into this category: it's intended to be used for "people" who are
|
||||||
animate but probably not intelligent, or anyway, not participants in human
|
animate but probably not intelligent, or anyway, not participants in human
|
||||||
society. It seems unusual to write "The black Labrador is a person."
|
society. It seems unusual to write "The black Labrador is a person."
|
||||||
because that sounds like an insistent assertion of rights and thus a quite
|
because that sounds like an insistent assertion of rights and thus a quite
|
||||||
different sort of statement. (Don't drown that Labrador! He's a {\it
|
different sort of statement. (Don't drown that Labrador! He's a person.)
|
||||||
person}.)
|
|
||||||
|
|
||||||
As can be seen from the tiny definition of "animal", though, it's really
|
As can be seen from the tiny definition of "animal", though, it's really
|
||||||
nothing more than a name for a position in the kinds hierarchy. There is
|
nothing more than a name for a position in the kinds hierarchy. There is
|
||||||
|
@ -907,7 +896,7 @@ kind which can be switched on or off."
|
||||||
Here again the justification boils down to tradition. Vehicles were a
|
Here again the justification boils down to tradition. Vehicles were a
|
||||||
staple ingredient of the Infocom classics, largely because of code
|
staple ingredient of the Infocom classics, largely because of code
|
||||||
originally written for the inflatable boat in the 1978-79 mainframe version
|
originally written for the inflatable boat in the 1978-79 mainframe version
|
||||||
of {\it Zork}, which was then copied through into later titles. Unlike
|
of "Zork", which was then copied through into later titles. Unlike
|
||||||
devices, though, vehicles are genuinely difficult to model, and the
|
devices, though, vehicles are genuinely difficult to model, and the
|
||||||
implementation provided by the Standard Rules would be quite a lot of
|
implementation provided by the Standard Rules would be quite a lot of
|
||||||
work for a user to manage alone. (Consider, for instance, the case when
|
work for a user to manage alone. (Consider, for instance, the case when
|
||||||
|
@ -970,8 +959,7 @@ A vehicle is usually not portable.
|
||||||
This is the final kind created in the Standard Rules, and probably the most
|
This is the final kind created in the Standard Rules, and probably the most
|
||||||
doubtful of all. It simply provides a hook to a cute and traditional feature
|
doubtful of all. It simply provides a hook to a cute and traditional feature
|
||||||
of the I6 library whereby spare possessions are automatically cleared out
|
of the I6 library whereby spare possessions are automatically cleared out
|
||||||
of the player's way: it derives from the rucksack in the 1993 IF title
|
of the player's way: it derives from the rucksack in the 1993 IF title "Curses".
|
||||||
{\it Curses}.
|
|
||||||
|
|
||||||
=
|
=
|
||||||
Section SR1/15 - Player's holdall
|
Section SR1/15 - Player's holdall
|
||||||
|
|
|
@ -457,7 +457,7 @@ indexing and rule-ordering tricks ameliorated this a little, but in the end
|
||||||
it was just a bad design: withdrawing the ability to make check, carry out
|
it was just a bad design: withdrawing the ability to make check, carry out
|
||||||
and report rules apply to multiple actions resulted in much cleaner code,
|
and report rules apply to multiple actions resulted in much cleaner code,
|
||||||
and also a clearer conceptual definition of what these rulebooks were for.
|
and also a clearer conceptual definition of what these rulebooks were for.
|
||||||
(But users still {\it didn't} like the change: actual functionality was
|
(But users still didn't like the change: actual functionality was
|
||||||
withdrawn.)
|
withdrawn.)
|
||||||
|
|
||||||
So if they are always empty and never used, why are the three rulebooks
|
So if they are always empty and never used, why are the three rulebooks
|
||||||
|
@ -691,8 +691,8 @@ which the user, or an extension included by the user, chooses to add to the
|
||||||
turn sequence rules.
|
turn sequence rules.
|
||||||
|
|
||||||
An unusual point here is that the "parse command rule" and the
|
An unusual point here is that the "parse command rule" and the
|
||||||
"generate action rule" are written such that they {\it do nothing unless
|
"generate action rule" are written such that they do nothing unless
|
||||||
the turn sequence rulebook is being followed at the top level} (by |Main|,
|
the turn sequence rulebook is being followed at the top level (by |Main|,
|
||||||
that is). This prevents them from being used recursively, which would not
|
that is). This prevents them from being used recursively, which would not
|
||||||
work properly, and enables a popular trick from the time before the 2008
|
work properly, and enables a popular trick from the time before the 2008
|
||||||
reform to keep working: we can simulate six turns going by in which the
|
reform to keep working: we can simulate six turns going by in which the
|
||||||
|
|
Loading…
Reference in a new issue