diff --git a/README.md b/README.md index 4a823bc8a..8a86043ac 100644 --- a/README.md +++ b/README.md @@ -105,14 +105,18 @@ This repository is where development is done on the following executables: * inrtps - A generator of HTML pages to show for run-time problem messages in Inform. - __version 2 'Benefactive'__ - [★ Web](docs/inrtps/index.html) - [▶ Documentation](docs/inrtps/P-ui.html) * inter - For handling intermediate Inform code. - __version 1 'Axion'__ - [★ Web](docs/inter/index.html) - [▶ Documentation](docs/inter/P-ui.html) * its modules [★ inter](docs/inter-module/index.html), [★ codegen](docs/codegen-module/index.html) -* basicinform - The Basic Inform extension, included in all projects. - __version 1__ - [★ Web](docs/basicinform/index.html) -* srules - The Standard Rules extension, included in all interactive fiction projects. - __version 6__ - [★ Web](docs/srules/index.html) -This repository also contains the webs for the Template (at the subtree inform7/Internal/Inter). These are libraries of low-level Inter code needed at run-time, whose source is written in Inform 6 notation: +Two webs give detailed expositions of the most important built-in Inform extensions (at the subtree inform7/extensions): -* basic_inform - Support for Inform as a programming language - [★ Web](docs/basic_inform/index.html) -* standard_rules - Support for Inform as an interactive fiction tool - [★ Web](docs/standard_rules/index.html) -* basic_inform_extras - Additional support needed only if the Standard Rules are not used - [★ Web](docs/basic_inform_extras/index.html) +* basic_inform - - __unversioned__ - [★ Web](docs/basic_inform/index.html) +* standard_rules - - __unversioned__ - [★ Web](docs/standard_rules/index.html) + +This repository also contains kits of Inter code (at the subtree inform7/Internal/Inter). These are libraries of code needed at run-time, and whose source is written in Inform 6 notation: + +* BasicInformKit - Support for Inform as a programming language - [★ Web](docs/BasicInformKit/index.html) +* WorldModelKit - Support for modelling space, time and actions in interactive fiction - [★ Web](docs/WorldModelKit/index.html) +* CommandParserKit - Support for parsing turn-by-turn commands in interactive fiction - [★ Web](docs/CommandParserKit/index.html) +* BasicInformExtrasKit - Additional support needed only if the Standard Rules are not used - [★ Web](docs/BasicInformExtrasKit/index.html) The inform7 subtree further contains these primary resources: diff --git a/docs/basic_inform_extras/S-at.html b/docs/BasicInformExtrasKit/S-at.html similarity index 98% rename from docs/basic_inform_extras/S-at.html rename to docs/BasicInformExtrasKit/S-at.html index 320a05278..4066c8e7f 100644 --- a/docs/basic_inform_extras/S-at.html +++ b/docs/BasicInformExtrasKit/S-at.html @@ -1,7 +1,7 @@
-To run the necessary rulebooks to carry out an activity.
+To run the necessary rulebooks to carry out an activity.
Additions to the Basic Inform template which are needed only if the Standard Rules are not to be used.
+ +Additions to the Basic Inform template which are needed only if the Standard Rules are not to be used.
I6T source for the basic_inform_extras library.
+Additional Inter-level support for non-interactive fiction uses of the Inform language.
Routines for copying, comparing, creating and destroying block values, and for reading and writing them as if they were arrays.
+Routines for copying, comparing, creating and destroying block values, and for reading and writing them as if they were arrays.
To decide whether letters are upper or lower case, and convert between the two.
+To decide whether letters are upper or lower case, and convert between the two.
Code to support the combination kind of value constructor.
+Code to support the combination kind of value constructor.
Miscellaneous constant definitions, usually providing symbolic names for otherwise inscrutable numbers, which are used throughout the template layer.
+Miscellaneous constant definitions, usually providing symbolic names for otherwise inscrutable numbers, which are used throughout the template layer.
TEMPLATE_CONFIGURATION_BITM
-
+- (This section begins Sections.)
- Continue with 'Utilities Template'
diff --git a/docs/basic_inform/S-ft.html b/docs/BasicInformKit/S-ft.html
similarity index 99%
rename from docs/basic_inform/S-ft.html
rename to docs/BasicInformKit/S-ft.html
index 49de6f255..5781e7a62 100644
--- a/docs/basic_inform/S-ft.html
+++ b/docs/BasicInformKit/S-ft.html
@@ -1,7 +1,7 @@
- S/dt
+ S/mt
@@ -9,7 +9,7 @@
-- ★
- basic_inform Template Library
- FileIO Template
Reading and writing external files, in the Glulx virtual machine only.
+- ★
- BasicInformKit
- FileIO Template
Reading and writing external files, in the Glulx virtual machine only.
- §1. Language
- §2. Structure
- §3. Instances
- §4. Errors
- §5. Glulx Material
- §6. Existence
- §7. Readiness
- §8. Open File
- §9. Close File
- §10. Get Character
- §11. Put Character
- §12. Print Line
- §13. Print Contents
- §14. Print Text
- §15. Serialising Tables
- §16. Z-Machine Stubs
- §17. Back To Core
@@ -491,7 +491,7 @@ run-time problem when there is no alternative.
-
+
diff --git a/docs/basic_inform/S-ft2.html b/docs/BasicInformKit/S-ft2.html
similarity index 99%
rename from docs/basic_inform/S-ft2.html
rename to docs/BasicInformKit/S-ft2.html
index c34d8826e..48e2ce6fd 100644
--- a/docs/basic_inform/S-ft2.html
+++ b/docs/BasicInformKit/S-ft2.html
@@ -1,7 +1,7 @@
- S/ft
+ S/rt
@@ -9,7 +9,7 @@
-- ★
- basic_inform Template Library
- Flex Template
To allocate flexible-sized blocks of memory as needed to hold arbitrary-length strings of text, stored actions or other block values.
+- ★
- BasicInformKit
- Flex Template
To allocate flexible-sized blocks of memory as needed to hold arbitrary-length strings of text, stored actions or other block values.
- §1. Blocks
- §2. Multiple Blocks
- §3. The Heap
- §4. Initialisation
- §5. Net Free Space
- §6. Make Space
- §7. Block Allocation
- §8. Errors
- §9. Merging
- §10. Recutting
- §11. Deallocation
- §12. Resizing
- §13. Block Size
- §14. Debugging Routines
@@ -721,7 +721,7 @@ only.
-
+
diff --git a/docs/basic_inform/S-gt.html b/docs/BasicInformKit/S-gt.html
similarity index 98%
rename from docs/basic_inform/S-gt.html
rename to docs/BasicInformKit/S-gt.html
index 557dd48d4..c1cf9b40f 100644
--- a/docs/basic_inform/S-gt.html
+++ b/docs/BasicInformKit/S-gt.html
@@ -1,7 +1,7 @@
- S/ft2
+ S/lt
@@ -9,11 +9,20 @@
-- ★
- basic_inform Template Library
- Glulx Template
To start up the Glk interface for the Glulx virtual machine, and provide Glulx-specific printing functions.
+- ★
- BasicInformKit
- Glulx Template
To start up the Glk interface for the Glulx virtual machine, and provide Glulx-specific printing functions.
-- §1. Summary
- §2. Variables and Arrays
- §3. Infglk
- §4. Rocks
- §5. Stubs
- §6. Starting Up
- §7. Enable Acceleration
- §8. Release Number
- §9. Keyboard Input
- §10. Buffer Functions
- §11. Dictionary Functions
- §12. SHOWVERB support
- §13. Command Tables
- §14. Random Number Generator
- §15. Memory Allocation
- §16. Audiovisual Resources
- §17. Typography
- §18. Character Casing
- §19. Glulx-Only Printing Routines
- §20. The Screen
- §21. Window Colours
- §22. Main Window
- §23. Status Line
- §24. Quotation Boxes
- §25. Veneer
+- §1. Begin Glulx-only matter
- §2. Summary
- §3. Variables and Arrays
- §4. Infglk
- §5. Rocks
- §6. Stubs
- §7. Starting Up
- §8. Enable Acceleration
- §9. Release Number
- §10. Keyboard Input
- §11. Buffer Functions
- §12. Dictionary Functions
- §13. SHOWVERB support
- §14. Command Tables
- §15. Random Number Generator
- §16. Memory Allocation
- §17. Audiovisual Resources
- §18. Typography
- §19. Character Casing
- §20. Glulx-Only Printing Routines
- §21. The Screen
- §22. Window Colours
- §23. Main Window
- §24. Status Line
- §25. Quotation Boxes
- §26. Veneer
- §27. End Glulx-only matter
-§1. Summary. This segment closely parallels "ZMachine.i6t", which provides exactly
+
+
+
+
+ #Ifdef TARGET_GLULX;
+
+
+
+
+§2. Summary. This segment closely parallels "ZMachine.i6t", which provides exactly
equivalent functionality (indeed, usually the same-named functions and in
the same order) for the Z-machine VM. This is intended to make the rest of the
template code independent of the choice of VM, although that is more of an
@@ -23,7 +32,7 @@ the parser (for instance) to call VM-neutral routines to get the data it
wants out of these arrays.
-
+
@@ -55,7 +64,7 @@ wants out of these arrays.
-§3. Infglk. This section is a verbatim copy of an invaluable I6 header file originally
+
§4. Infglk. This section is a verbatim copy of an invaluable I6 header file originally
put together by John Cater but now maintained by Andrew Plotkin. The routines
are convenient to have on hand, and also provide a canonical set of I6 names
for the many gestalt and other codes.
@@ -928,7 +937,7 @@ for the many gestalt and other codes.
-§4. Rocks. These are unique ID codes used to mark resources; think of them as inedible
+
§5. Rocks. These are unique ID codes used to mark resources; think of them as inedible
cookies.
@@ -948,7 +957,7 @@ cookies.
-§5. Stubs. These are I6 library-style entry point routines, not used by I7, but retained
+
§6. Stubs. These are I6 library-style entry point routines, not used by I7, but retained
in case I7 extensions want to do interesting things with Glulx.
@@ -961,7 +970,7 @@ in case I7 extensions want to do interesting things with Glulx.
-§6. Starting Up. VM_Initialise()
is almost the first routine called, except that the
+
§7. Starting Up. VM_Initialise()
is almost the first routine called, except that the
"starting the virtual machine" activity is allowed to go first; and,
come to think of it, memory allocation has to be set up before even that,
and that in turn calls VM_PreInitialise()
to do the absolute minimum.
@@ -1147,7 +1156,7 @@ light to the Dark Room.")
-§7. Enable Acceleration. This enables use of March 2009 extension to Glulx which optimises the speed
+
§8. Enable Acceleration. This enables use of March 2009 extension to Glulx which optimises the speed
of Inform-compiled story files by moving the work of I6 veneer routines into
the interpreter itself. It should have no effect on earlier versions of the
Glulx VM, which will lack the gestalt for this feature, but nor should it
@@ -1184,7 +1193,7 @@ do any harm.
-§8. Release Number. Like all software, IF story files have release numbers to mark revised
+
§9. Release Number. Like all software, IF story files have release numbers to mark revised
versions being circulated: unlike most software, and partly for traditional
reasons, the version number is recorded not in some print statement or
variable but is branded on, so to speak, in a specific memory location
@@ -1208,7 +1217,7 @@ of the story file header.
-§9. Keyboard Input. The VM must provide three routines for keyboard input:
+
§10. Keyboard Input. The VM must provide three routines for keyboard input:
@@ -1387,7 +1396,7 @@ to document all of that.
-§10. Buffer Functions. A "buffer", in this sense, is an array containing a stream of characters
+
§11. Buffer Functions. A "buffer", in this sense, is an array containing a stream of characters
typed from the keyboard; a "parse buffer" is an array which resolves this
into individual words, pointing to the relevant entries in the dictionary
structure. Because each VM has its own format for each of these arrays (not
@@ -1503,7 +1512,7 @@ languages of play, and is not called in the template.
-§11. Dictionary Functions. Again, the dictionary structure is differently arranged on the different VMs.
+
§12. Dictionary Functions. Again, the dictionary structure is differently arranged on the different VMs.
This is a data structure containing, in compressed form, the text of all the
words to be recognised by tokenisation (above). In I6 for Glulx, a dictionary
word is represented at run-time by its record's address in the dictionary.
@@ -1544,7 +1553,7 @@ since, on Glulx, they are the same, these are each the identity function.
-§12. SHOWVERB support. Further VM-specific tables cover actions and attributes, and these are
+
§13. SHOWVERB support. Further VM-specific tables cover actions and attributes, and these are
used by the SHOWVERB testing command.
@@ -1574,7 +1583,7 @@ used by the SHOWVERB testing command.
-§13. Command Tables. The VM is also generated containing a data structure for the grammar
+
§14. Command Tables. The VM is also generated containing a data structure for the grammar
produced by I6's Verb
and Extend
directives: this is essentially a
list of command verbs such as DROP or PUSH, together with a list of
synonyms, and then the grammar for the subsequent commands to be
@@ -1600,7 +1609,7 @@ recognised by the parser.
-§14. Random Number Generator. No routine is needed for extracting a random number, since I6's built-in
+
§15. Random Number Generator. No routine is needed for extracting a random number, since I6's built-in
random
function does that, but it's useful to abstract the process of
seeding the RNG so that it produces a repeatable sequence of "random"
numbers from here on: the necessary opcodes are different for the two VMs.
@@ -1615,7 +1624,7 @@ numbers from here on: the necessary opcodes are different for the two VMs.
-§15. Memory Allocation. This is dynamic memory allocation: something which is never practicable in
+
§16. Memory Allocation. This is dynamic memory allocation: something which is never practicable in
the Z-machine, because the whole address range is already claimed, but which
is viable on recent revisions of Glulx.
@@ -1638,7 +1647,7 @@ is viable on recent revisions of Glulx.
-§16. Audiovisual Resources. The Z-machine only barely supports figures and sound effects, so Glulx is
+
§17. Audiovisual Resources. The Z-machine only barely supports figures and sound effects, so Glulx is
the preferred VM to choose if they are wanted. Properly speaking, it's not
Glulx which supports these, but its I/O layer Glk, and implementations
of Glk are free to support them or not as they please: "cheapglk", a
@@ -1667,7 +1676,7 @@ investigate the "gestalt" to find out.
-§17. Typography. Glk makes an attempt to present typographic styles as being a matter of
+
§18. Typography. Glk makes an attempt to present typographic styles as being a matter of
semantic markup rather than controlling the actual appearance of text:
the idea is that the story file should want to print something in a
heading kind of way, and then the interpreter — guided by the player's
@@ -1694,7 +1703,7 @@ not the place to discuss whether that was a wise decision for Glk to take
-§18. Character Casing. The following are the equivalent of tolower
and toupper
, the traditional
+
§19. Character Casing. The following are the equivalent of tolower
and toupper
, the traditional
C library functions for forcing letters into lower and upper case form, for
the ZSCII character set. Note that Glulx can also use Unicode characters for
some purposes (Unicode was a relatively late addition to the Glulx standard),
@@ -1709,7 +1718,7 @@ and we make good use of this when storing text.
-§19. Glulx-Only Printing Routines. Partly because of the smallness of the range of representable values in
+
§20. Glulx-Only Printing Routines. Partly because of the smallness of the range of representable values in
the Z-machine, there is little run-time type-checking that can be done:
for instance a dictionary address cannot be distinguished from a function
address because they are encoded differently, so that a function address
@@ -1838,7 +1847,7 @@ set stored here is once again ZSCII, not Unicode.
-§20. The Screen. Our generic screen model is that the screen is made up of windows: we tend
+
§21. The Screen. Our generic screen model is that the screen is made up of windows: we tend
to refer only to two of these, the main window and the status line, but
others may also exist from time to time. Windows have unique ID numbers:
the special window ID -1 means "all windows" or "the entire screen",
@@ -1879,7 +1888,7 @@ make little sense there.
-§21. Window Colours. Our generic screen model is that the screen is made up of windows, each of
+
§22. Window Colours. Our generic screen model is that the screen is made up of windows, each of
which can have its own foreground and background colours.
@@ -1951,7 +1960,7 @@ which is greatly superior in this respect).
-§22. Main Window. The part of the screen on which commands and responses are printed, which
+
§23. Main Window. The part of the screen on which commands and responses are printed, which
ordinarily occupies almost all of the screen area.
@@ -1969,7 +1978,7 @@ status line, to the main window.
-§23. Status Line. Despite the name, the status line need not be a single line at the top of
+
§24. Status Line. Despite the name, the status line need not be a single line at the top of
the screen: that's only the conventional default arrangement. It can expand
to become the equivalent of an old-fashioned VT220 terminal, with menus
and grids and mazes displayed lovingly in character graphics, or it can
@@ -2009,7 +2018,7 @@ line; line 2 is underneath, and so on; columns are similarly numbered from
-§24. Quotation Boxes. On the Z-machine, quotation boxes are produced by stretching the status line,
+
§25. Quotation Boxes. On the Z-machine, quotation boxes are produced by stretching the status line,
but on Glulx they usually occupy windows of their own. If it isn't possible
to create such a window, so that gg_quotewin
is zero below, the quotation
text just appears in the main window.
@@ -2053,7 +2062,7 @@ text just appears in the main window.
-
+
@@ -2080,8 +2089,17 @@ text just appears in the main window.
+
+
+
+
+ #Endif;
+
+
+
+
-
+
diff --git a/docs/basic_inform/S-lt.html b/docs/BasicInformKit/S-lt.html
similarity index 98%
rename from docs/basic_inform/S-lt.html
rename to docs/BasicInformKit/S-lt.html
index 96886361f..59f6499d4 100644
--- a/docs/basic_inform/S-lt.html
+++ b/docs/BasicInformKit/S-lt.html
@@ -1,7 +1,7 @@
- S/gt
+ S/ut
@@ -9,7 +9,7 @@
-- ★
- basic_inform Template Library
- Language Template
The fundamental definitions needed by the parser and the verb library in order to specify the language of play -- that is, the language used for communications between the story file and the player.
+- ★
- BasicInformKit
- Language Template
The fundamental definitions needed by the parser and the verb library in order to specify the language of play -- that is, the language used for communications between the story file and the player.
- §1. Vocabulary
- §2. Pronouns
- §3. Descriptors
- §4. Numbers
- §5. Time
- §6. Directions
- §7. Translation
- §8. Articles
- §9. Commands
- §10. Stubs
@@ -266,7 +266,7 @@ routines:
-
+
diff --git a/docs/basic_inform/S-lt2.html b/docs/BasicInformKit/S-lt2.html
similarity index 99%
rename from docs/basic_inform/S-lt2.html
rename to docs/BasicInformKit/S-lt2.html
index af38c198c..af1e9d9bd 100644
--- a/docs/basic_inform/S-lt2.html
+++ b/docs/BasicInformKit/S-lt2.html
@@ -1,7 +1,7 @@
- S/lt
+ S/rt2
@@ -9,7 +9,7 @@
-- ★
- basic_inform Template Library
- Lists Template
Code to support the list of... kind of value constructor.
+- ★
- BasicInformKit
- Lists Template
Code to support the list of... kind of value constructor.
- §1. Block Format
- §2. KOV Support
- §3. Creation
- §4. Destruction
- §5. Copying
- §6. Comparison
- §7. Hashing
- §8. Printing
- §9. List From Description
- §10. Find Item
- §11. Insert Item
- §12. Append List
- §13. Remove Value
- §14. Remove Item Range
- §15. Remove List
- §16. Get Length
- §17. Set Length
- §18. Get Item
- §19. Write Item
- §20. Put Item
- §21. Reversing
- §22. Rotation
- §23. Sorting
@@ -850,7 +850,7 @@ we sort based not on the item values but on their values for the property
-
+
diff --git a/docs/basic_inform/S-mt.html b/docs/BasicInformKit/S-mt.html
similarity index 99%
rename from docs/basic_inform/S-mt.html
rename to docs/BasicInformKit/S-mt.html
index 5f9d40339..3b8d320ee 100644
--- a/docs/basic_inform/S-mt.html
+++ b/docs/BasicInformKit/S-mt.html
@@ -1,7 +1,7 @@
- S/lt2
+ S/prg
@@ -9,7 +9,7 @@
-- ★
- basic_inform Template Library
- Mathematics Template
Mathematical functions, especially for real numbers.
+- ★
- BasicInformKit
- Mathematics Template
Mathematical functions, especially for real numbers.
- §1. Square Root
- §2. Cube Root
- §3. Absolute value
- §4. IntegerDivide
- §5. IntegerRemainder
- §6. UnsignedCompare
- §7. SignedCompare
- §8. Printing reals
@@ -743,7 +743,7 @@ cases used to check the floating-point extensions to Glulx.
-
+
diff --git a/docs/basic_inform/S-mt2.html b/docs/BasicInformKit/S-mt2.html
similarity index 98%
rename from docs/basic_inform/S-mt2.html
rename to docs/BasicInformKit/S-mt2.html
index 6d055bd4f..c4bce970c 100644
--- a/docs/basic_inform/S-mt2.html
+++ b/docs/BasicInformKit/S-mt2.html
@@ -1,7 +1,7 @@
- S/mt
+ S/tt
@@ -9,7 +9,7 @@
-- ★
- basic_inform Template Library
- MStack Template
To allocate space on the memory stack for frames of variables to be used by rulebooks, activities and actions.
+- ★
- BasicInformKit
- MStack Template
To allocate space on the memory stack for frames of variables to be used by rulebooks, activities and actions.
- §1. The Memory Stack
- §2. Create Frame
- §3. Destroy Frame
- §4. Seek Frame
- §5. Backtrace
- §6. Access to Variables
- §7. Access to Nonexistent Variables
- §8. Rulebook Variables
- §9. Activity Variables
@@ -269,7 +269,7 @@ to see happening.)
-
+
diff --git a/docs/basic_inform/S-prg.html b/docs/BasicInformKit/S-prg.html
similarity index 99%
rename from docs/basic_inform/S-prg.html
rename to docs/BasicInformKit/S-prg.html
index 03b85f176..86c78cfae 100644
--- a/docs/basic_inform/S-prg.html
+++ b/docs/BasicInformKit/S-prg.html
@@ -1,7 +1,7 @@
- S/mt2
+ S/zt
@@ -9,7 +9,7 @@
-- ★
- basic_inform Template Library
- Paragraphing
To manage the line skips which space paragraphs out.
+- ★
- BasicInformKit
- Paragraphing
To manage the line skips which space paragraphs out.
@@ -402,7 +402,7 @@ whatever is the current language of play.
-
+
diff --git a/docs/basic_inform/S-rkt.html b/docs/BasicInformKit/S-rkt.html
similarity index 99%
rename from docs/basic_inform/S-rkt.html
rename to docs/BasicInformKit/S-rkt.html
index 58570cce7..ec2f8bc12 100644
--- a/docs/basic_inform/S-rkt.html
+++ b/docs/BasicInformKit/S-rkt.html
@@ -1,7 +1,7 @@
- S/rt
+ S/ct2
@@ -9,7 +9,7 @@
-- ★
- basic_inform Template Library
- Relation Kind Template
Code to support the relation kind.
+- ★
- BasicInformKit
- Relation Kind Template
Code to support the relation kind.
- §1. Block Format
- §2. KOV Support
- §3. Other Definitions
- §4. Tunable Parameters
- §5. Abstract Relations
- §6. Empty Relations
- §7. Creation
- §8. Destruction
- §9. Copying
- §10. Comparison
- §11. Printing
- §12. Naming
- §13. Choose Relation Handler
- §14. Valency
- §15. Double Hash Set Relation Handler
- §16. Hash List Relation Handler
- §17. Hash Table Relation Handler
- §18. Reversed Hash Table Relation Handler
- §19. Symmetric Relation Handlers
- §20. Hash Core Relation Handler
- §21. Equivalence Hash Table Relation Handler
- §22. Two-In-One Hash Table Relation Handler
- §23. Empty
@@ -2041,7 +2041,7 @@ relation to become non-empty, since that would require making up data.
-
+
diff --git a/docs/basic_inform/S-rt4.html b/docs/BasicInformKit/S-rt.html
similarity index 98%
rename from docs/basic_inform/S-rt4.html
rename to docs/BasicInformKit/S-rt.html
index 6ab7e4415..09a866f24 100644
--- a/docs/basic_inform/S-rt4.html
+++ b/docs/BasicInformKit/S-rt.html
@@ -1,15 +1,15 @@
- S/rt3
+ S/mt2
-
-- ★
- basic_inform Template Library
- Rulebooks Template
To work through the rules in a rulebook until a decision is made.
+
+- ★
- BasicInformKit
- Rulebooks Template
To work through the rules in a rulebook until a decision is made.
- §1. Latest Rule Result
- §2. Following
- §3. Specifying Outcomes
- §4. Discovering Outcomes
- §5. Printing Rule Names
- §6. Casting
- §7. Debugging
- §8. The Default Rule
@@ -314,7 +314,7 @@ occur, in so far as memory economy allows this.
-
+
diff --git a/docs/basic_inform/S-rt.html b/docs/BasicInformKit/S-rt2.html
similarity index 99%
rename from docs/basic_inform/S-rt.html
rename to docs/BasicInformKit/S-rt2.html
index bce354854..b43ffe280 100644
--- a/docs/basic_inform/S-rt.html
+++ b/docs/BasicInformKit/S-rt2.html
@@ -1,15 +1,15 @@
- S/prg
+ S/ct
-
-- ★
- basic_inform Template Library
- RegExp Template
Code to match and replace on regular expressions against indexed text strings.
+
+- ★
- BasicInformKit
- RegExp Template
Code to match and replace on regular expressions against indexed text strings.
- §1. Debugging
- §2. Algorithm
- §3. Class Codes
- §4. Packets
- §5. Nodes
- §6. Match Variables
- §7. Markers
- §8. Debugging
- §9. Compiling Tree For Substring Search
- §10. Compiling Tree For Regexp Search
- §11. Parser
- §12. Parse At Position
- §13. Backtracking
- §14. Fail Subexpressions
- §15. Erasing Constraints
- §16. Matching Literal Text
- §17. Matching Character Range
- §18. Search And Replace
- §19. Concatenation
@@ -1884,7 +1884,7 @@ which handles the special syntaxes used in search-and-replace.
-
+
diff --git a/docs/basic_inform/S-rt2.html b/docs/BasicInformKit/S-rt3.html
similarity index 99%
rename from docs/basic_inform/S-rt2.html
rename to docs/BasicInformKit/S-rt3.html
index f9b629313..6f255820e 100644
--- a/docs/basic_inform/S-rt2.html
+++ b/docs/BasicInformKit/S-rt3.html
@@ -8,8 +8,8 @@
-
-- ★
- basic_inform Template Library
- Relations Template
To manage run-time storage for relations between objects, and to find routes through relations and the map.
+
+- ★
- BasicInformKit
- Relations Template
To manage run-time storage for relations between objects, and to find routes through relations and the map.
- §1. Relation Records
- §2. Valency Adjectives
- §3. One To One Relations
- §4. Symmetric One To One Relations
- §5. Various To Various Relations
- §6. Equivalence Relations
- §7. Show Various to Various
- §8. Show One to One
- §9. Show Reversed One to One
- §10. Show Equivalence
- §11. Relation Emptying
- §12. Relation Route-Finding
- §13. One To Various Route-Finding
- §14. Various To One Route-Finding
- §15. Slow Various To Various Route-Finding
- §16. Fast Various To Various Route-Finding
- §17. Iterating Relations
@@ -1100,7 +1100,7 @@ relation in turn. (Each right-way-round relation, at any rate.)
-
+
diff --git a/docs/basic_inform/S-rt3.html b/docs/BasicInformKit/S-rt4.html
similarity index 99%
rename from docs/basic_inform/S-rt3.html
rename to docs/BasicInformKit/S-rt4.html
index 9cc69e632..13a96eede 100644
--- a/docs/basic_inform/S-rt3.html
+++ b/docs/BasicInformKit/S-rt4.html
@@ -1,15 +1,15 @@
- S/rt2
+ S/rt3
-
-- ★
- basic_inform Template Library
- RTP Template
To issue run-time problem messages, and to perform some run-time type checking which may issue such messages.
+
+- ★
- BasicInformKit
- RTP Template
To issue run-time problem messages, and to perform some run-time type checking which may issue such messages.
- §1. Reporting
- §2. Low-Level Errors
- §3. Argument Type Checking Failed
- §4. Return Type Checking Failed
- §5. Whether Provides
- §6. Scan Property Metadata
- §7. Get Either-Or Property
- §8. Set Either-Or Property
- §9. Value Property
- §10. Write Value Property
- §11. Printing Property Names
@@ -483,7 +483,7 @@ only as decimal numbers.
-
+- Back to 'Relations Template'
- (This section ends Sections.)
diff --git a/docs/basic_inform/S-st.html b/docs/BasicInformKit/S-st.html
similarity index 98%
rename from docs/basic_inform/S-st.html
rename to docs/BasicInformKit/S-st.html
index e7af3db5a..44493aedf 100644
--- a/docs/basic_inform/S-st.html
+++ b/docs/BasicInformKit/S-st.html
@@ -1,7 +1,7 @@
- S/rt4
+ S/ft
@@ -9,7 +9,7 @@
-- ★
- basic_inform Template Library
- Sort Template
To sort arrays.
+- ★
- BasicInformKit
- Sort Template
To sort arrays.
- §1. Storage
- §2. Front End
- §3. Sort Range
- §4. Comparison and Exchange
- §5. 4W37 Sort
- §6. Insertion Sort
- §7. In-Place Mergesort
@@ -253,7 +253,7 @@ implementation, which in turn follows the
-
+
diff --git a/docs/basic_inform/S-tt.html b/docs/BasicInformKit/S-tt.html
similarity index 99%
rename from docs/basic_inform/S-tt.html
rename to docs/BasicInformKit/S-tt.html
index c58b23c1c..ba6b9dcb6 100644
--- a/docs/basic_inform/S-tt.html
+++ b/docs/BasicInformKit/S-tt.html
@@ -9,7 +9,7 @@
-- ★
- basic_inform Template Library
- Tables Template
To read, write, search and allocate rows in the Table data structure.
+- ★
- BasicInformKit
- Tables Template
To read, write, search and allocate rows in the Table data structure.
- §1. Format
- §2. Find Column
- §3. Number of Rows
- §4. Blanks
- §5. Masks
- §6. Testing Blankness
- §7. Force Entry Blank
- §8. Force Entry Non-Blank
- §9. Swapping Blank Bits
- §10. Moving Blank Bits Down
- §11. Table Row Corresponding
- §12. Table Look Up Corresponding Row
- §13. Table Look Up Entry
- §14. Blank Rows
- §15. Random Row
- §16. Swap Rows
- §17. Compare Rows
- §18. Move Row Down
- §19. Shuffle
- §20. Next Row
- §21. Move Blanks to Back
- §22. Sort
- §23. Print Table to File
- §24. Read Table from File
- §25. Debugging
@@ -1082,7 +1082,7 @@ is called.
-
+
diff --git a/docs/basic_inform/S-tt2.html b/docs/BasicInformKit/S-tt2.html
similarity index 99%
rename from docs/basic_inform/S-tt2.html
rename to docs/BasicInformKit/S-tt2.html
index e8dd4b104..a86e17e4f 100644
--- a/docs/basic_inform/S-tt2.html
+++ b/docs/BasicInformKit/S-tt2.html
@@ -1,7 +1,7 @@
- S/tt
+ S/bt
@@ -9,7 +9,7 @@
-- ★
- basic_inform Template Library
- Text Template
Code to support the text kind of value.
+- ★
- BasicInformKit
- Text Template
Code to support the text kind of value.
- §1. Block Format
- §2. Extent Of Long Block
- §3. Character Set
- §4. KOV Support
- §5. Debugging
- §6. Creation
- §7. Copy Short Block
- §8. Transmutation
- §9. Mutability
- §10. Casting
- §11. Data Conversion
- §12. Z Version
- §13. Glulx Version
- §14. Comparison
- §15. Hashing
- §16. Printing
- §17. Capitalised printing
- §18. Serialisation
- §19. Unserialisation
- §20. Substitution
- §21. Perishability
- §22. Blobs
- §23. Blob Access
- §24. Get Blob
- §25. Replace Blob
- §26. Replace Text
- §27. Character Length
- §28. Get Character
- §29. Casing
- §30. Change Case
- §31. Concatenation
@@ -90,9 +90,6 @@ choosing the indexed-text character set.
Constant TEXT_TY_Storage_Flags = BLK_FLAG_MULTIPLE + BLK_FLAG_16_BIT;
Constant Large_Unicode_Tables;
#ENDIF;
-
- {-segment:UnicodeData.i6t}
- {-segment:Char.i6t}
@@ -1155,7 +1152,7 @@ expression search-and-replace is going on: see "RegExp.i6t".
-
+
diff --git a/docs/basic_inform/S-ut2.html b/docs/BasicInformKit/S-ut.html
similarity index 65%
rename from docs/basic_inform/S-ut2.html
rename to docs/BasicInformKit/S-ut.html
index c3cc3b553..cf1970cc1 100644
--- a/docs/basic_inform/S-ut2.html
+++ b/docs/BasicInformKit/S-ut.html
@@ -1,19 +1,211 @@
- S/ut
+ S/dt
-
-- ★
- basic_inform Template Library
- Utilities Template
Miscellaneous utility routines for some fundamental I6 needs.
+
+- ★
- BasicInformKit
- Utilities Template
Miscellaneous utility routines for some fundamental I6 needs.
-- §1. Saying Phrases
- §2. Kinds
- §3. GenerateRandomNumber
- §4. PrintSpaces
- §5. SwapWorkflags
- §6. TestUseOption
- §7. ZRegion
- §8. Memcpy
- §9. Arrcpy
- §10. Verbs as Values
- §11. Seed Random Number Generator Rule
- §12. Extracting Verb Numbers
- §13. Say One Of
- §14. Rounding
+- §1. Miscellany
- §2. Language of Play
- §3. VM-Specific Code
- §4. More
- §5. Print Decimal Number
- §6. Print Text
- §7. Properties
- §8. Print Or Run
- §9. Saying Phrases
- §10. Kinds
- §11. GenerateRandomNumber
- §12. PrintSpaces
- §13. SwapWorkflags
- §14. TestUseOption
- §15. ZRegion
- §16. Memcpy
- §17. Arrcpy
- §18. Verbs as Values
- §19. Seed Random Number Generator Rule
- §20. Extracting Verb Numbers
- §21. Say One Of
- §22. Rounding
-
+
+
+
+
+ #ifdef TARGET_ZCODE;
+ Constant BLOCKV_STACK_SIZE = 224;
+ #ifnot;
+ Constant BLOCKV_STACK_SIZE = DynamicMemoryAllocation/4;
+ #endif;
+
+ Array blockv_stack --> BLOCKV_STACK_SIZE;
+ Global I7SFRAME;
+
+ Global TEXT_TY_RE_Err = 0;
+ Global prior_named_noun; ! for adaptive text generation
+ Global prior_named_list; ! ditto: length of list of items
+ Global prior_named_list_gender; ! ditto: common gender of list of items, or -1
+ Global story_tense = 1; ! ditto: present tense
+ Global story_viewpoint = 2; ! ditto: second person singular
+ Global say__p = 1; Global say__pc = 0; Global say__pc_save = 0;
+ Global say__n; Global say__comp;
+ Global los_rv = false;
+ Global parameter_object; ! = I7 "parameter-object" = I7 "container in question"
+ Global parameter_value; ! not typesafe in I7
+ Array deferred_calling_list --> 27;
+ Global property_to_be_totalled; ! used to implement "total P of..."
+ Global property_loop_sign; ! $+1$ for increasing order, $-1$ for decreasing
+ Global suppress_scope_loops;
+ Global temporary_value; ! can be used anywhere side-effects can't occur
+ ! [13]
+ Global clr_fg = 1; ! foreground colour
+ Global clr_bg = 1; ! background colour
+ Global clr_fgstatus = 1; ! foreground colour of statusline
+ Global clr_bgstatus = 1; ! background colour of statusline
+ Global clr_on; ! has colour been enabled by the player?
+ Global statuswin_current; ! if writing to top window
+ Global suppress_text_substitution = false;
+ Global deadflag = 0;
+
+ ! [14]
+ Global statuswin_cursize = 0;
+ Global statuswin_size = 1;
+
+ ! [16]
+ ! Global debug_flag = 0;
+ Global debug_rules = 0;
+ Global debug_rule_nesting;
+ Global reason_the_action_failed; ! = I7 "reason the action failed"
+ Global indef_mode; ! "Indefinite" mode - ie, "take a brick"
+ ! is in this mode
+
+ ! [3]
+ Global standard_interpreter = 0;
+
+ Array LocalParking --> 64;
+
+
+
+
+§2. Language of Play. The equivalent of I6's language definition file, though here the idea is
+that a translation should have an inclusion to replace the "Language.i6t"
+segment, which contains the English definition.
+
+
+
+
+
+ Default LanguageCases 1;
+
+
+
+
+
+§3. VM-Specific Code. These sections of code contain different definitions of the same routines,
+and in some cases the same arrays, to handle low-level functions in the
+virtual machine — saving the game, performing UNDO, parsing typed text into
+dictionary word addresses and so on.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Array Protect_I7_Arrays --> 16339 12345;
+
+
+
+
+§5. Print Decimal Number. DecimalNumber
is a trivial function which just prints a number, in decimal
+digits. It is left over from the I6 library's support routines for Glulx,
+where it was intended as a stub to pass to the Glulx Glulx_PrintAnything
routine
+(which I7 does not use). In I7, however, it's also used as the default
+printing routine for new kinds of value.
+
+
+
+
+ [ DecimalNumber num; print num; ];
+
+
+
+
+§6. Print Text. The routine for printing an I7 "text" value, which might be text with or
+without substitutions.
+
+
+
+
+ [ PrintI6Text x;
+ if (x ofclass String) print (string) x;
+ if (x ofclass Routine) return (x)();
+ if (x == EMPTY_TEXT_PACKED) rfalse;
+ rtrue;
+ ];
+ [ I7_String x; TEXT_TY_Say(x); ]; ! An alternative name now used only by extensions
+
+
+
+
+§7. Properties. Some either/or properties are compiled to I6 attributes, which must be
+predeclared, so we do that first. (All other properties can simply be
+used without declaration.)
+
+
+What then follows is a table of property metadata: in particular, specifying
+which properties can be used with which I6 classes or objects. Policing
+this at run-time costs a little speed, but traps many errors of programming,
+and keeps everything typesafe. It is the price we pay for the relatively
+lenient compile-time checking of I7's "object" kind of value. To make
+it as efficient as possible, we calculate offsets into the metadata: this
+has to be done (once) at run-time, with the routine compiled.
+
+
+
+
+ Constant attributed_property_offsets_SIZE 48;
+ Array attributed_property_offsets --> attributed_property_offsets_SIZE;
+ Constant valued_property_offsets_SIZE (100 + CCOUNT_PROPERTY + INDIV_PROP_START-48);
+ Array valued_property_offsets --> valued_property_offsets_SIZE;
+
+
+
+
+§8. Print Or Run. This utility remains from the old I6 library: it essentially treats a
+property as textual and prints it where possible. Where the no_break
+flag is set, we expect the text to form only a small part of a paragraph,
+and it's inappropriate to break here: for instance, for printing the
+"printed name" of an object. Where the flag is clear, however, the text
+is expected to form its own paragraph.
+
+
+Where PrintOrRun
is used in breaking mode, which is only for a very few
+properties in I7 (indeed at present only initial
and description
),
+the routine called is given the chance to decide whether to print or not.
+It should return true
or false
according to whether it did so; this
+allows us to divide the paragraph or not accordingly.
+
+
+
+
+ [ PrintOrRun obj prop no_break pv st routine_return_value;
+ @push self; self = obj;
+ if (prop == 0) {
+ print (name) prop; routine_return_value = true;
+ } else {
+ routine_return_value = TEXT_TY_Say(obj.prop);
+ }
+ @pull self;
+ if (routine_return_value) {
+ say__p = 1;
+ if (no_break == false) {
+ new_line;
+ DivideParagraphPoint();
+ }
+ }
+
+ return routine_return_value;
+ ];
+
+ [ DA_Number n; print n; ];
+ [ DA_TruthState n; if (n==0) print "false"; else print "true"; ];
+
+
+
+
+
@@ -25,7 +217,7 @@
-
+
@@ -47,7 +239,7 @@
-§3. GenerateRandomNumber. The following uses the virtual machine's RNG (via the I6 built-in function
+
§11. GenerateRandomNumber. The following uses the virtual machine's RNG (via the I6 built-in function
random
) to produce a uniformly random integer in the range n to m
inclusive, where n and m are allowed to be either way around; so that
a random number between 17 and 4 is the same thing as a random number
@@ -69,7 +261,7 @@ to an empty range of values.
-§4. PrintSpaces. Which prints a row of n spaces, for n>= 0.
+
§12. PrintSpaces. Which prints a row of n spaces, for n>= 0.
@@ -84,7 +276,7 @@ to an empty range of values.
-§5. SwapWorkflags. Recall that we have two general-purpose temporary attributes for each object:
+
§13. SwapWorkflags. Recall that we have two general-purpose temporary attributes for each object:
workflag
and workflag2
. The following swaps their values over for every
object at once.
@@ -105,12 +297,12 @@ object at once.
-§6. TestUseOption. This routine, compiled by NI, returns true
if the supplied argument is the
+
§14. TestUseOption. This routine, compiled by NI, returns true
if the supplied argument is the
number of a use option in force for the current run of NI, and false
otherwise.
-§7. ZRegion. I7 contains many relics from I6, but here's a relic from I5: a routine which
+
§15. ZRegion. I7 contains many relics from I6, but here's a relic from I5: a routine which
used to determine the metaclass of a value, before that concept was given a
name. In I6 code, it can be implemented simply using metaclass
, as the
following shows. (The name is from "region of the Z-machine".)
@@ -130,7 +322,7 @@ following shows. (The name is from "region of the Z-machine".)
-§8. Memcpy. This is equivalent to C's memcpy function, in good ways and bad.
+
§16. Memcpy. This is equivalent to C's memcpy function, in good ways and bad.
@@ -147,7 +339,7 @@ following shows. (The name is from "region of the Z-machine".)
-§9. Arrcpy. This is not quite so efficient, but not terrible.
+
§17. Arrcpy. This is not quite so efficient, but not terrible.
@@ -167,7 +359,7 @@ following shows. (The name is from "region of the Z-machine".)
-
+
@@ -189,7 +381,7 @@ following shows. (The name is from "region of the Z-machine".)
-§11. Seed Random Number Generator Rule. Unless a seed is provided by NI, and it won't be for released story files,
+
§19. Seed Random Number Generator Rule. Unless a seed is provided by NI, and it won't be for released story files,
the VM's interpreter is supposed to start up with a good seed in its random
number generator: something usually derived from, say, the milliseconds part
of the current time of day, which is unlikely to repeat or show any pattern
@@ -214,7 +406,7 @@ of course, in a state of sin" (von Neumann).
-§12. Extracting Verb Numbers. A long tale of woe lies behind the following. Infocom games stored verb numbers
+
§20. Extracting Verb Numbers. A long tale of woe lies behind the following. Infocom games stored verb numbers
in a single byte in dictionary entries, but they did so counting downwards, so
that verb number 0 was stored as 255, 1 as 254, and so on. Inform followed
suit so that debugging of Inform 1 could be aided by using the then-available
@@ -259,7 +451,7 @@ routine was added to concentrate lookups of this field in one place.
-§13. Say One Of. These routines are described in the Extensions chapter of the Inform
+
§21. Say One Of. These routines are described in the Extensions chapter of the Inform
documentation.
@@ -309,7 +501,7 @@ documentation.
-§14. Rounding. The following rounds a numerical value t1
to the nearest unit of t2
;
+
§22. Rounding. The following rounds a numerical value t1
to the nearest unit of t2
;
for instance, if t2
is 5 then it rounds to the nearest 5. The name is an
anachronism, as it's used for all kinds of value.
@@ -327,7 +519,7 @@ anachronism, as it's used for all kinds of value.
-
+
diff --git a/docs/basic_inform/S-ut.html b/docs/BasicInformKit/S-ut2.html
similarity index 99%
rename from docs/basic_inform/S-ut.html
rename to docs/BasicInformKit/S-ut2.html
index 34c243e00..3a44ac507 100644
--- a/docs/basic_inform/S-ut.html
+++ b/docs/BasicInformKit/S-ut2.html
@@ -8,8 +8,8 @@
-
-- ★
- basic_inform Template Library
- UnicodeData Template
To tabulate casings in the character set.
+
+- ★
- BasicInformKit
- UnicodeData Template
To tabulate casings in the character set.
@@ -192,7 +192,7 @@ not included in the ranges below is not a letter.
-
+
diff --git a/docs/basic_inform/S-zt.html b/docs/BasicInformKit/S-zt.html
similarity index 95%
rename from docs/basic_inform/S-zt.html
rename to docs/BasicInformKit/S-zt.html
index a1e75bf92..a19f01b5c 100644
--- a/docs/basic_inform/S-zt.html
+++ b/docs/BasicInformKit/S-zt.html
@@ -1,7 +1,7 @@
- S/ut2
+ S/gt
@@ -9,11 +9,20 @@
-- ★
- basic_inform Template Library
- ZMachine Template
To provide routines handling low-level Z-machine facilities.
+- ★
- BasicInformKit
- ZMachine Template
To provide routines handling low-level Z-machine facilities.
-- §1. Summary
- §2. Variables and Arrays
- §3. Enable Acceleration
- §4. Release Number
- §5. Keyboard Input
- §6. Buffer Functions
- §7. Dictionary Functions
- §8. Command Tables
- §9. SHOWVERB support
- §10. RNG
- §11. Memory Allocation
- §12. Audiovisual Resources
- §13. Typography
- §14. Character Casing
- §15. The Screen
- §16. Window Colours
- §17. Main Window
- §18. Status Line
- §19. Quotation Boxes
- §20. Undo
- §21. Veneer
+- §1. Begin Z-only matter
- §2. Summary
- §3. Variables and Arrays
- §4. Enable Acceleration
- §5. Release Number
- §6. Keyboard Input
- §7. Buffer Functions
- §8. Dictionary Functions
- §9. Command Tables
- §10. SHOWVERB support
- §11. RNG
- §12. Memory Allocation
- §13. Audiovisual Resources
- §14. Typography
- §15. Character Casing
- §16. The Screen
- §17. Window Colours
- §18. Main Window
- §19. Status Line
- §20. Quotation Boxes
- §21. Undo
- §22. Veneer
- §23. End Z-only matter
-§1. Summary. This segment closely parallels "Glulx.i6t", which provides exactly
+
+
+
+
+ #Ifdef TARGET_ZCODE;
+
+
+
+
+§2. Summary. This segment closely parallels "Glulx.i6t", which provides exactly
equivalent functionality (indeed, usually the same-named functions and in
the same order) for the Glulx VM. This is intended to make the rest of the
template code independent of the choice of VM, although that is more of an
@@ -23,7 +32,7 @@ the parser (for instance) to call VM-neutral routines to get the data it
wants out of these arrays.
-
+
@@ -46,7 +55,7 @@ wants out of these arrays.
-§3. Enable Acceleration. This rule enables use of March 2009 extension to Glulx which optimises the speed
+
§4. Enable Acceleration. This rule enables use of March 2009 extension to Glulx which optimises the speed
of Inform-compiled story files, so for the Z-machine it has no effect.
@@ -59,7 +68,7 @@ of Inform-compiled story files, so for the Z-machine it has no effect.
-§4. Release Number. Like all software, IF story files have release numbers to mark revised
+
§5. Release Number. Like all software, IF story files have release numbers to mark revised
versions being circulated: unlike most software, and partly for traditional
reasons, the version number is recorded not in some print statement or
variable but is branded on, so to speak, in a specific memory location
@@ -80,7 +89,7 @@ of the story file header.
-§5. Keyboard Input. The VM must provide three routines for keyboard input:
+
§6. Keyboard Input. The VM must provide three routines for keyboard input:
@@ -122,7 +131,7 @@ to document all of that.
-§6. Buffer Functions. A "buffer", in this sense, is an array containing a stream of characters
+
§7. Buffer Functions. A "buffer", in this sense, is an array containing a stream of characters
typed from the keyboard; a "parse buffer" is an array which resolves this
into individual words, pointing to the relevant entries in the dictionary
structure. Because each VM has its own format for each of these arrays (not
@@ -189,7 +198,7 @@ languages of play, and is not called in the template.
-§7. Dictionary Functions. Again, the dictionary structure is differently arranged on the different VMs.
+
§8. Dictionary Functions. Again, the dictionary structure is differently arranged on the different VMs.
This is a data structure containing, in compressed form, the text of all the
words to be recognised by tokenisation (above). In I6 for Z, a dictionary word
value is represented at run-time by its record number in the dictionary,
@@ -219,7 +228,7 @@ convert between record numbers and dictionary addresses.
-§8. Command Tables. The VM is also generated containing a data structure for the grammar
+
§9. Command Tables. The VM is also generated containing a data structure for the grammar
produced by I6's Verb
and Extend
directives: this is essentially a
list of command verbs such as DROP or PUSH, together with a list of
synonyms, and then the grammar for the subsequent commands to be
@@ -242,7 +251,7 @@ recognised by the parser.
-§9. SHOWVERB support. Further VM-specific tables cover actions and attributes, and these are
+
§10. SHOWVERB support. Further VM-specific tables cover actions and attributes, and these are
used by the SHOWVERB testing command.
@@ -268,7 +277,7 @@ used by the SHOWVERB testing command.
-§10. RNG. No routine is needed for extracting a random number, since I6's built-in
+
§11. RNG. No routine is needed for extracting a random number, since I6's built-in
random
function does that, but it's useful to abstract the process of
seeding the RNG so that it produces a repeatable sequence of "random"
numbers from here on: the necessary opcodes are different for the two VMs.
@@ -284,7 +293,7 @@ numbers from here on: the necessary opcodes are different for the two VMs.
-§11. Memory Allocation. This is dynamic memory allocation: something which is never practicable in
+
§12. Memory Allocation. This is dynamic memory allocation: something which is never practicable in
the Z-machine, because the whole address range is already claimed, but which
is viable on recent revisions of Glulx.
@@ -301,7 +310,7 @@ is viable on recent revisions of Glulx.
-§12. Audiovisual Resources. The Z-machine only barely supports figures and sound effects, and only in
+
§13. Audiovisual Resources. The Z-machine only barely supports figures and sound effects, and only in
version 6 of the Z-machine, which Inform 7 no longer supports. Sound effects
have a longer pedigree and Infocom used them on some version 5 and even some
version 3 works: really, though, from an Inform point of view we would prefer
@@ -321,7 +330,7 @@ long-gone formats.)
-§13. Typography. Relatively few typographic effects are available on the Z-machine, so that
+
§14. Typography. Relatively few typographic effects are available on the Z-machine, so that
many of the semantic markups for text which would be distinguishable on
Glulx are indistinguishable here.
@@ -338,7 +347,7 @@ Glulx are indistinguishable here.
-§14. Character Casing. The following are the equivalent of tolower
and toupper
, the traditional
+
§15. Character Casing. The following are the equivalent of tolower
and toupper
, the traditional
C library functions for forcing letters into lower and upper case form, for
the ZSCII character set.
@@ -398,7 +407,7 @@ the ZSCII character set.
-§15. The Screen. Our generic screen model is that the screen is made up of windows: we tend
+
§16. The Screen. Our generic screen model is that the screen is made up of windows: we tend
to refer only to two of these, the main window and the status line, but
others may also exist from time to time. Windows have unique ID numbers:
the special window ID -1 means "all windows" or "the entire screen",
@@ -433,7 +442,7 @@ in order to keep it accurate.
-§16. Window Colours. Each window can have its own foreground and background colours.
+
§17. Window Colours. Each window can have its own foreground and background colours.
The colour of individual letters or words of type is not controllable in
@@ -476,7 +485,7 @@ which is greatly superior in this respect).
-§17. Main Window. The part of the screen on which commands and responses are printed, which
+
§18. Main Window. The part of the screen on which commands and responses are printed, which
ordinarily occupies almost all of the screen area.
@@ -499,7 +508,7 @@ emulates the Glulx model of window rather than text colours.
-§18. Status Line. Despite the name, the status line need not be a single line at the top of
+
§19. Status Line. Despite the name, the status line need not be a single line at the top of
the screen: that's only the conventional default arrangement. It can expand
to become the equivalent of an old-fashioned VT220 terminal, with menus
and grids and mazes displayed lovingly in character graphics, or it can
@@ -544,11 +553,11 @@ line; line 2 is underneath, and so on; columns are similarly numbered from
-§19. Quotation Boxes. No routine is needed to produce quotation boxes: the I6 box
statement
+
§20. Quotation Boxes. No routine is needed to produce quotation boxes: the I6 box
statement
generates the necessary Z-machine opcodes all by itself.
-§20. Undo. These simply wrap the relevant opcodes.
+
§21. Undo. These simply wrap the relevant opcodes.
@@ -566,7 +575,7 @@ generates the necessary Z-machine opcodes all by itself.
-
+
@@ -601,8 +610,17 @@ generates the necessary Z-machine opcodes all by itself.
+
+
+
+
+ #Endif; ! TARGET_ZCODE
+
+
+
+
-
- Back to 'Utilities Template'
- (This section ends Sections.)
+
diff --git a/docs/basicinform/crumbs.gif b/docs/BasicInformKit/crumbs.gif
similarity index 100%
rename from docs/basicinform/crumbs.gif
rename to docs/BasicInformKit/crumbs.gif
diff --git a/docs/BasicInformKit/index.html b/docs/BasicInformKit/index.html
new file mode 100644
index 000000000..cbae155cd
--- /dev/null
+++ b/docs/BasicInformKit/index.html
@@ -0,0 +1,111 @@
+
+
+ BasicInformKit
+
+
+
+
+
+
+ - ★
- BasicInformKit
+ Inter-level support for the fundamentals of the Inform language.
+
+ -
+ Miscellaneous constant definitions, usually providing symbolic names for otherwise inscrutable numbers, which are used throughout the template layer.
+
Support for parsing integers.
+Support for parsing integers.
The parser for turning the text of the typed command into a proposed action by the player.
+The parser for turning the text of the typed command into a proposed action by the player.
Inter-level support for command parsing in interactive fiction.
+To try actions by people in the model world, processing the necessary rulebooks.
+To try actions by people in the model world, processing the necessary rulebooks.
To run the necessary rulebooks to carry out an activity.
+To run the necessary rulebooks to carry out an activity.
To record information now which will be needed later, when a condition phrased in the perfect tense is tested.
+To record information now which will be needed later, when a condition phrased in the perfect tense is tested.
To display figures and play sound effects.
+To display figures and play sound effects.
To provide Glulx-specific actions.
+To provide Glulx-specific actions.
-§1. GlkList Command. GLKLIST is a testing command best used by those who understand Glulx and its +
+ + ++ #Ifdef TARGET_GLULX; ++ + + +
§2. GlkList Command. GLKLIST is a testing command best used by those who understand Glulx and its ways: it isn't documented in the I7 manual, because it is pretty inscrutable for "real" users, but it's probably worth keeping just the same.
@@ -70,7 +79,7 @@ for "real" users, but it's probably worth keeping just the same. -§2. Undo. These are really emulations of the Z-machine's conventions on UNDO: Glulx's +
§3. Undo. These are really emulations of the Z-machine's conventions on UNDO: Glulx's undo opcodes used different result codes while providing essentially the same functionality, for reasons which are opaque, but no trouble is caused thereby.
@@ -91,7 +100,7 @@ functionality, for reasons which are opaque, but no trouble is caused thereby. - +@@ -105,7 +114,7 @@ functionality, for reasons which are opaque, but no trouble is caused thereby. - +@@ -121,7 +130,7 @@ functionality, for reasons which are opaque, but no trouble is caused thereby. - +@@ -142,7 +151,7 @@ functionality, for reasons which are opaque, but no trouble is caused thereby. - +@@ -173,7 +182,7 @@ functionality, for reasons which are opaque, but no trouble is caused thereby. -§7. Verify The Story File Rule. This is a fossil now, really, but in the days of Infocom, the 110K story +
§8. Verify The Story File Rule. This is a fossil now, really, but in the days of Infocom, the 110K story file occupying an entire disc was a huge data set: floppy discs were by no means a reliable medium, and cheap hardware often used hit-and-miss components, as on the notorious Commodore 64 disc controller. If somebody @@ -198,7 +207,7 @@ opcode, and so Glulx followed suit.
-§8. Switch Transcript On Rule.
+§9. Switch Transcript On Rule.
@@ -223,7 +232,7 @@ opcode, and so Glulx followed suit. -§9. Switch Transcript Off Rule.
+§10. Switch Transcript Off Rule.
@@ -238,7 +247,7 @@ opcode, and so Glulx followed suit. -§10. Announce Story File Version Rule.
+§11. Announce Story File Version Rule.
@@ -260,7 +269,7 @@ opcode, and so Glulx followed suit. -§11. Descend To Specific Action Rule. There are 100 or so actions, typically, and this rule is for efficiency's +
§12. Descend To Specific Action Rule. There are 100 or so actions, typically, and this rule is for efficiency's sake: rather than perform 100 or so comparisons to see which routine to call, we indirect through a jump table. The routines called are the
+ + + +-Sub
routines: thus, for instance, ifaction
is##Wait
thenWaitSub
is @@ -283,8 +292,17 @@ compared to the Z-machine's: hence the+ #Endif; ++ + +
-
The determination of light, visibility and physical access.
+The determination of light, visibility and physical access.
A flexible object-lister taking care of plurals, inventory information, various formats and so on.
+A flexible object-lister taking care of plurals, inventory information, various formats and so on.
Testing and changing the fundamental spatial relations.
+Testing and changing the fundamental spatial relations.
This is the superstructure of the file of I6 code output by NI: from ICL commands at the top down to the signing-off comments at the bottom.
+This is the superstructure of the file of I6 code output by NI: from ICL commands at the top down to the signing-off comments at the bottom.
-§1. ICL Commands. The Inform Control Language is a mini-language for controlling the I6 compiler, able to set command-line switches, memory settings and so on. I6 ordinarily @@ -271,26 +271,7 @@ of language definitions, this needs to come first.
-§6. VM-Specific Code. These sections of code contain different definitions of the same routines, -and in some cases the same arrays, to handle low-level functions in the -virtual machine — saving the game, performing UNDO, parsing typed text into -dictionary word addresses and so on. -
- - -- #Ifdef TARGET_GLULX; - {-segment:Glulx.i6t} - #Endif; - - #Ifdef TARGET_ZCODE; - {-segment:ZMachine.i6t} - #Endif; -- - - -
§7. Score and Rankings Table. The following command tells NI to compile constant definitions for INITIAL_MAX_SCORE
+
§6. Score and Rankings Table. The following command tells NI to compile constant definitions for INITIAL_MAX_SCORE
and/or RANKING_TABLE
, in cases where there are scores and rankings. If there's
no ranking table, RANKING_TABLE
is left undefined, so that we can #ifdef
this
possibility later.
@@ -303,7 +284,7 @@ possibility later.
§8. The Old Library. The I6 library consisted essentially of the parser, the verb routines, and +
§7. The Old Library. The I6 library consisted essentially of the parser, the verb routines, and a pile of utilities and world-modelling code, of which the biggest single component was the list-writer. The parser lives on below; the verb routines are gone, with the equivalent functionality having moved upstairs into @@ -313,13 +294,11 @@ lives here:
- {-segment:Light.i6t} - {-segment:ListWriter.i6t}-
§9. Parser. The largest single block of code in the traditional I6 library part of the +
§8. Parser. The largest single block of code in the traditional I6 library part of the template layer is the parser.
@@ -340,8 +319,6 @@ If it is ever discovered to contain the wrong data, the alarm sounds.Object InformParser "(Inform Parser)" has proper; - {-segment:Parser.i6t} - [ ParserError error_type; if (error_type) PrintSingleParagraph(error_type); rfalse; @@ -352,18 +329,17 @@ If it is ever discovered to contain the wrong data, the alarm sounds. -§10. Order of Play. The
Main
routine, where execution begins, and the primitive rules in the +§9. Order of Play. The
Main
routine, where execution begins, and the primitive rules in the principal rulebooks.- {-segment:OrderOfPlay.i6t}-§11. Activities. These are numbered upwards from 0 in order of creation. The following arrays +
§10. Activities. These are numbered upwards from 0 in order of creation. The following arrays taken together provide, for each activity number: (i) the rulebook numbers for the before, for, and after stages of the activity, and (ii) a flag indicating whether the activity is "future action"-capable, that is, is @@ -372,94 +348,79 @@ might result from the current grammar line being parsed. (This is called the "action to be", hence "atb".)
-§12. Object Tree. The I6 object tree contains
Class
definitions as well as objects, but +§11. Object Tree. The I6 object tree contains
-Class
definitions as well as objects, but we precede both with a pseudo-object calledproperty_numberspace_forcer
. It does nothing except to ensure that properties are declared in I6 in the same sequence as I7 (which need not otherwise happen); it plays no part in play, and is not a valid I7 "object" value.§13. Tables. The initial state of the I6 arrays corresponding to each I7 table: see +
§12. Tables. The initial state of the I6 arrays corresponding to each I7 table: see "Tables.i6t" for details.
-§14. Equations. Routines to evaluate from equations. +
§13. Equations. Routines to evaluate from equations.
- + -§16. Phrases. The following innocent-looking commands tell NI to compile I6 definitions +
§15. Phrases. The following innocent-looking commands tell NI to compile I6 definitions for all of the rules which are not I6-written primitives, and also for adjective definitions, so it results in a fairly enormous cataract of code.
-§17. Rulebooks. The literally hundreds of rulebooks are set up here. (In the end a rulebook +
§16. Rulebooks. The literally hundreds of rulebooks are set up here. (In the end a rulebook is only a (word) array of rule addresses, terminated with a
- + -NULL
.)§19. The New Library. The gleaming, aluminium and glass extension to the library: almost all of it +
§18. The New Library. The gleaming, aluminium and glass extension to the library: almost all of it material new in I7 usage.
- - {-segment:Actions.i6t} - {-segment:Activities.i6t} - {-segment:Figures.i6t} - {-segment:OutOfWorld.i6t} - {-segment:Printing.i6t} - {-segment:WorldModel.i6t} - {-segment:MapRouteFinding.i6t} - {-segment:RTP.i6t}-§20. Parsing Tokens. GPRs, scope and noun filters to be used in grammar lines, but no actual +
§19. Parsing Tokens. GPRs, scope and noun filters to be used in grammar lines, but no actual grammar lines as yet.
- {-segment:Number.i6t} - {-segment:Time.i6t}- + - +- #IFDEF DEBUG; - {-segment:Tests.i6t} - #ENDIF; ! DEBUG-§23. I6 Inclusions. This paragraph contains no code, by default: it's a hook on which to hang +
§22. I6 Inclusions. This paragraph contains no code, by default: it's a hook on which to hang verbatim I6 material.
- ! "Include (- ... -)" inclusions with no specified position appear here.
-§24. Entries in constant lists. Well: most of them, anyway. In particular, all of those which are lists of +
§23. Entries in constant lists. Well: most of them, anyway. In particular, all of those which are lists of texts with substitution will be swept up, which is important for timing reasons. A second round later on will catch any later ones.
-§25. To Phrases. We now compile all of the remaining code in the source text: the "To..." +
§24. To Phrases. We now compile all of the remaining code in the source text: the "To..." phrases and all of their attendant text routines, loop-over-scope routines and so on.
@@ -471,18 +432,17 @@ because a text substitution might contain references to the past, or involve propositions which must be deferred into routines. -§26. Chronology. Similarly, this is where we wrap up all references to past tenses: after this +
§25. Chronology. Similarly, this is where we wrap up all references to past tenses: after this point, we cannot safely compile any I7 condition in the past tense.
- {-segment:Chronology.i6t}-§27. Grammar. This is the trickiest matter of timing. We had to leave the grammar lines +
§26. Grammar. This is the trickiest matter of timing. We had to leave the grammar lines until now because the past-tense code above might have needed to investigate whether the player's command matched a given pattern at some time in the past (a case which arose naturally in one of the example games, so which @@ -509,7 +469,7 @@ needed.
-§28. Deferred Propositions. Most conditions, such as "the score is 10", and descriptions, such as +
§27. Deferred Propositions. Most conditions, such as "the score is 10", and descriptions, such as "open doors which are in lighted rooms", are translated by NI into propositions in a form of predicate calculus. Sometimes these can be compiled immediately to I6 code, but other times they involve complicated @@ -517,7 +477,7 @@ searches and have to be "deferred" into special routines which will perform them. This is where we compile those routines.
-§29. Miscellaneous Loose Ends. And we still aren't done, because we still have: +
§28. Miscellaneous Loose Ends. And we still aren't done, because we still have:
@@ -551,7 +511,7 @@ the counters, and therefore the amount of storage we need to allocate. -§30. Block Values. These are values which are pointers to more elaborate data on the memory heap, +
§29. Block Values. These are values which are pointers to more elaborate data on the memory heap, rather than values in themselves: they point to "blocks". A section of code handles the heap, and there is then one further section to support each of the kinds of value in question. @@ -559,24 +519,12 @@ the kinds of value in question.
- {-segment:StoredAction.i6t} -- - - -§31. Signing off. And that's all, folks. -
- - -- ! End of automatically generated I6 source - ! --------------------------------------------------------------------------
-
The sequence of events in play: the Main routine which runs the startup rulebook, the turn sequence rulebook and the shutdown rulebook; and most of the I6 definitions of primitive rules in those rulebooks.
+The sequence of events in play: the Main routine which runs the startup rulebook, the turn sequence rulebook and the shutdown rulebook; and most of the I6 definitions of primitive rules in those rulebooks.
To implement some of the out of world actions.
+To implement some of the out of world actions.
To manage the line skips which space paragraphs out, and to handle the printing of names of objects, pieces of text and numbers.
+ +To manage the line skips which space paragraphs out, and to handle the printing of names of objects, pieces of text and numbers.
To issue run-time problem messages arising from the world model.
+To issue run-time problem messages arising from the world model.
Code to support the stored action kind of value.
+Code to support the stored action kind of value.
Support for parsing and printing times of day.
+ +Support for parsing and printing times of day.
The command grammar and I6 implementation for testing commands such as TEST, ACTIONS and PURLOIN.
+ +The command grammar and I6 implementation for testing commands such as TEST, ACTIONS and PURLOIN.
-§1. Abstract Command. The code below is compiled only if the symbol DEBUG
is defined, which it
+
+ #Ifdef DEBUG; ++ + + +
§2. Abstract Command. The code below is compiled only if the symbol DEBUG
is defined, which it
always is for normal runs in the Inform user interface, but not for Release
runs.
§2. Actions Command. ACTIONS turns tracing of actions on. +
§3. Actions Command. ACTIONS turns tracing of actions on.
@@ -61,7 +70,7 @@ moves an object to a new position in the object tree. -§3. Gonear Command. GONEAR teleports the player to the vicinity of some named item. +
§4. Gonear Command. GONEAR teleports the player to the vicinity of some named item.
@@ -73,7 +82,7 @@ moves an object to a new position in the object tree. -§4. Purloin Command. To PURLOIN is to acquire something without reference to any rules on accessibility. +
§5. Purloin Command. To PURLOIN is to acquire something without reference to any rules on accessibility.
@@ -88,7 +97,7 @@ moves an object to a new position in the object tree. -§5. Random Command. RANDOM forces the random-number generator to a predictable seed value. +
§6. Random Command. RANDOM forces the random-number generator to a predictable seed value.
@@ -102,7 +111,7 @@ moves an object to a new position in the object tree. -§6. Relations Command. RELATIONS lists the current state of the mutable relations. +
§7. Relations Command. RELATIONS lists the current state of the mutable relations.
@@ -120,7 +129,7 @@ moves an object to a new position in the object tree. -§7. Responses Command. RESPONSES lists the known responses. +
§8. Responses Command. RESPONSES lists the known responses.
@@ -189,7 +198,7 @@ moves an object to a new position in the object tree. -§8. Rules Command. RULES changes the level of rule tracing. +
§9. Rules Command. RULES changes the level of rule tracing.
@@ -211,7 +220,7 @@ moves an object to a new position in the object tree. -§9. Scenes Command. SCENES switches scene-change tracing on or off, and also shows the current position. +
§10. Scenes Command. SCENES switches scene-change tracing on or off, and also shows the current position.
@@ -229,7 +238,7 @@ moves an object to a new position in the object tree. -§10. Scope Command. SCOPE prints a numbered list of all objects in scope to the player. +
§11. Scope Command. SCOPE prints a numbered list of all objects in scope to the player.
@@ -245,7 +254,7 @@ moves an object to a new position in the object tree. -§11. Showheap Command. SHOWHEAP is for debugging the memory heap, and is intended for Inform +
§12. Showheap Command. SHOWHEAP is for debugging the memory heap, and is intended for Inform maintainers rather than users.
@@ -258,7 +267,7 @@ maintainers rather than users. -§12. ShowMe Command. SHOWME is probably the most useful testing command: it shows the state of the +
§13. ShowMe Command. SHOWME is probably the most useful testing command: it shows the state of the current room, or a named item.
@@ -338,7 +347,7 @@ current room, or a named item. -§13. Showverb Command. SHOWVERB is a holdover from old I6 days, but still quite useful. It writes +
§14. Showverb Command. SHOWVERB is a holdover from old I6 days, but still quite useful. It writes out the I6 command verb grammar for the supplied command.
@@ -410,7 +419,7 @@ out the I6 command verb grammar for the supplied command. -§14. Test Command. TEST runs a short script of commands from the source text. +
§15. Test Command. TEST runs a short script of commands from the source text.
@@ -491,7 +500,7 @@ out the I6 command verb grammar for the supplied command. -§15. Trace Command. Another holdover from I6: TRACE sets the level of parser tracing, on a scale +
§16. Trace Command. Another holdover from I6: TRACE sets the level of parser tracing, on a scale of 0 (off, the default) to 5.
@@ -509,7 +518,7 @@ of 0 (off, the default) to 5. -§16. Tree Command. TREE prints out the I6 object tree, though this is not always very helpful +
§17. Tree Command. TREE prints out the I6 object tree, though this is not always very helpful in I7 terms. It should arguably be withdrawn, but doesn't seem to do any harm.
@@ -539,7 +548,7 @@ in I7 terms. It should arguably be withdrawn, but doesn't seem to do any harm. -§17. Grammar. In the old I6 parser, testing commands had their own scope hardwired in to the +
§18. Grammar. In the old I6 parser, testing commands had their own scope hardwired in to the
code: this worked by comparing the verb command word directly against 'scope'
and the like. That would go wrong if the testing commands were translated into
other languages, and was a crude design at best. The following scope token is
@@ -613,8 +622,17 @@ not picked up) and able to accept multiple objects.
+ #Endif; ++ + +
Testing and changing the fundamental spatial relations.
+Testing and changing the fundamental spatial relations.
To provide Z-specific actions.
+To provide Z-specific actions.
-+ #Ifdef TARGET_ZCODE; ++ + + +
@@ -104,7 +113,7 @@ - +@@ -117,7 +126,7 @@ - +@@ -133,7 +142,7 @@ - +@@ -148,7 +157,7 @@ - +@@ -165,7 +174,7 @@ -§6. Verify The Story File Rule. This is a fossil now, really, but in the days of Infocom, the 110K story +
§7. Verify The Story File Rule. This is a fossil now, really, but in the days of Infocom, the 110K story file occupying an entire disc was a huge data set: floppy discs were by no means a reliable medium, and cheap hardware often used hit-and-miss components, as on the notorious Commodore 64 disc controller. If somebody @@ -192,7 +201,7 @@ opcode, and so Glulx followed suit.
-§7. Switch Transcript On Rule.
+§8. Switch Transcript On Rule.
@@ -209,7 +218,7 @@ opcode, and so Glulx followed suit. -§8. Switch Transcript Off Rule.
+§9. Switch Transcript Off Rule.
@@ -226,7 +235,7 @@ opcode, and so Glulx followed suit. -§9. Announce Story File Version Rule.
+§10. Announce Story File Version Rule.
@@ -255,7 +264,7 @@ opcode, and so Glulx followed suit. -§10. Descend To Specific Action Rule. There are 100 or so actions, typically, and this rule is for efficiency's +
§11. Descend To Specific Action Rule. There are 100 or so actions, typically, and this rule is for efficiency's sake: rather than perform 100 or so comparisons to see which routine to call, we indirect through a jump table. The routines called are the
+ + + +-Sub
routines: thus, for instance, ifaction
is##Wait
thenWaitSub
is @@ -278,8 +287,17 @@ compared to the Z-machine's: hence the+ #Endif; ! TARGET_ZCODE ++ + +
-
Inter-level support for modelling space, time and actions in interactive fiction.
+Support for the language alone.
- -- {-segment:Definitions.i6t} - - #ifdef TARGET_ZCODE; - Constant BLOCKV_STACK_SIZE = 224; - #ifnot; - Constant BLOCKV_STACK_SIZE = DynamicMemoryAllocation/4; - #endif; - - Array blockv_stack --> BLOCKV_STACK_SIZE; - Global I7SFRAME; - - Global TEXT_TY_RE_Err = 0; - Global prior_named_noun; ! for adaptive text generation - Global prior_named_list; ! ditto: length of list of items - Global prior_named_list_gender; ! ditto: common gender of list of items, or -1 - Global story_tense = 1; ! ditto: present tense - Global story_viewpoint = 2; ! ditto: second person singular - Global say__p = 1; Global say__pc = 0; Global say__pc_save = 0; - Global say__n; Global say__comp; - Global los_rv = false; - Global parameter_object; ! = I7 "parameter-object" = I7 "container in question" - Global parameter_value; ! not typesafe in I7 - Array deferred_calling_list --> 27; - Global property_to_be_totalled; ! used to implement "total P of..." - Global property_loop_sign; ! $+1$ for increasing order, $-1$ for decreasing - Global suppress_scope_loops; - Global temporary_value; ! can be used anywhere side-effects can't occur - ! [13] - Global clr_fg = 1; ! foreground colour - Global clr_bg = 1; ! background colour - Global clr_fgstatus = 1; ! foreground colour of statusline - Global clr_bgstatus = 1; ! background colour of statusline - Global clr_on; ! has colour been enabled by the player? - Global statuswin_current; ! if writing to top window - Global suppress_text_substitution = false; - Global deadflag = 0; - - ! [14] - Global statuswin_cursize = 0; - Global statuswin_size = 1; - - ! [16] - ! Global debug_flag = 0; - Global debug_rules = 0; - Global debug_rule_nesting; - Global reason_the_action_failed; ! = I7 "reason the action failed" - Global indef_mode; ! "Indefinite" mode - ie, "take a brick" - ! is in this mode - - ! [3] - Global standard_interpreter = 0; - - Array LocalParking --> 64; -- - - -
§2. Language of Play. The equivalent of I6's language definition file, though here the idea is -that a translation should have an inclusion to replace the "Language.i6t" -segment, which contains the English definition. -
- - -- {-segment:Language.i6t} - - Default LanguageCases 1; - -- - - -
§3. VM-Specific Code. These sections of code contain different definitions of the same routines, -and in some cases the same arrays, to handle low-level functions in the -virtual machine — saving the game, performing UNDO, parsing typed text into -dictionary word addresses and so on. -
- - -- #Ifdef TARGET_GLULX; - {-segment:Glulx.i6t} - #Endif; - - #Ifdef TARGET_ZCODE; - {-segment:ZMachine.i6t} - #Endif; -- - - - - - -
- {-segment:Paragraphing.i6t} - {-segment:Mathematics.i6t} - {-segment:FileIO.i6t} - {-segment:Sort.i6t} - {-segment:Tables.i6t} - {-segment:MStack.i6t} - {-segment:Rulebooks.i6t} - {-segment:Flex.i6t} - {-segment:BlockValues.i6t} - {-segment:Text.i6t} - {-segment:RegExp.i6t} - {-segment:Lists.i6t} - {-segment:Combinations.i6t} - {-segment:RelationKind.i6t} - {-segment:Relations.i6t} - {-segment:RTP.i6t} - {-segment:Utilities.i6t} - - Array Protect_I7_Arrays --> 16339 12345; -- - - -
§5. Print Decimal Number. DecimalNumber
is a trivial function which just prints a number, in decimal
-digits. It is left over from the I6 library's support routines for Glulx,
-where it was intended as a stub to pass to the Glulx Glulx_PrintAnything
routine
-(which I7 does not use). In I7, however, it's also used as the default
-printing routine for new kinds of value.
-
- [ DecimalNumber num; print num; ]; -- - - -
§6. Print Text. The routine for printing an I7 "text" value, which might be text with or -without substitutions. -
- - -- [ PrintI6Text x; - if (x ofclass String) print (string) x; - if (x ofclass Routine) return (x)(); - if (x == EMPTY_TEXT_PACKED) rfalse; - rtrue; - ]; - [ I7_String x; TEXT_TY_Say(x); ]; ! An alternative name now used only by extensions -- - - -
§7. Properties. Some either/or properties are compiled to I6 attributes, which must be -predeclared, so we do that first. (All other properties can simply be -used without declaration.) -
- -What then follows is a table of property metadata: in particular, specifying -which properties can be used with which I6 classes or objects. Policing -this at run-time costs a little speed, but traps many errors of programming, -and keeps everything typesafe. It is the price we pay for the relatively -lenient compile-time checking of I7's "object" kind of value. To make -it as efficient as possible, we calculate offsets into the metadata: this -has to be done (once) at run-time, with the routine compiled. -
- - -- Constant attributed_property_offsets_SIZE 48; - Array attributed_property_offsets --> attributed_property_offsets_SIZE; - Constant valued_property_offsets_SIZE (100 + CCOUNT_PROPERTY + INDIV_PROP_START-48); - Array valued_property_offsets --> valued_property_offsets_SIZE; -- - - -
§8. Print Or Run. This utility remains from the old I6 library: it essentially treats a
-property as textual and prints it where possible. Where the no_break
-flag is set, we expect the text to form only a small part of a paragraph,
-and it's inappropriate to break here: for instance, for printing the
-"printed name" of an object. Where the flag is clear, however, the text
-is expected to form its own paragraph.
-
Where PrintOrRun
is used in breaking mode, which is only for a very few
-properties in I7 (indeed at present only initial
and description
),
-the routine called is given the chance to decide whether to print or not.
-It should return true
or false
according to whether it did so; this
-allows us to divide the paragraph or not accordingly.
-
- [ PrintOrRun obj prop no_break pv st routine_return_value; - @push self; self = obj; - if (prop == 0) { - print (name) prop; routine_return_value = true; - } else { - routine_return_value = TEXT_TY_Say(obj.prop); - } - @pull self; - if (routine_return_value) { - say__p = 1; - if (no_break == false) { - new_line; - DivideParagraphPoint(); - } - } - - return routine_return_value; - ]; - - [ DA_Number n; print n; ]; - [ DA_TruthState n; if (n==0) print "false"; else print "true"; ]; -- - - -
The global variable say__n
tracks the last number printed. For the "in
words" definition, we need to set it by hand, since Inform doesn't otherwise
realise that number-printing is what we are doing here. For definitions of
-functions such as STextSubstitution
, see the source for the basic_inform
-template library, which is also where say__n
is defined.
+functions such as STextSubstitution
, see the source for BasicInformKit
,
+which is also where say__n
is defined.
See test case BIP-Say
.
diff --git a/docs/basicinform/S-prm.html b/docs/basic_inform/S-prm.html
similarity index 96%
rename from docs/basicinform/S-prm.html
rename to docs/basic_inform/S-prm.html
index 8869e49b8..dcbcc3310 100644
--- a/docs/basicinform/S-prm.html
+++ b/docs/basic_inform/S-prm.html
@@ -203,19 +203,7 @@ want to avoid it whenever possible.)
§10. Inform source text has a core of basic computational abilities, and then -a whole set of additional elements to handle IF. We want all of those to be -used, so: -
- - -
- Use interactive fiction language elements. Use multimedia language elements.
-
-
-
-
-§11. Some Inform 7 projects are rather heavy-duty by the expectations of the +
§10. Some Inform 7 projects are rather heavy-duty by the expectations of the Inform 6 compiler (which it uses as a code-generator): I6 was written fifteen years earlier, when computers were unimaginably smaller and slower. So many of its default memory settings need to be raised to higher maxima. diff --git a/docs/basic_inform/index.html b/docs/basic_inform/index.html index 64226b173..ce38dbefc 100644 --- a/docs/basic_inform/index.html +++ b/docs/basic_inform/index.html @@ -1,111 +1,31 @@
-I6T source for the basic_inform library.
+The Basic Inform extension, included in all projects.
The Basic Inform extension, included in all projects.
-The function CodeGen::Libraries::new appears nowhere else.
+The function CodeGen::Libraries::location appears nowhere else.
+The function CodeGen::Libraries::URL appears nowhere else.
The function CodeGen::Libraries::read_metadata appears nowhere else.
diff --git a/docs/codegen-module/2-itr.html b/docs/codegen-module/2-itr.html index 355aff513..17060a9f8 100644 --- a/docs/codegen-module/2-itr.html +++ b/docs/codegen-module/2-itr.html @@ -11,7 +11,7 @@Inform 6 meta-language is the language used by template files (with extension |.i6t|); we need tp be able to read it here in order to assimilate template code.
-§1. Interventions. The user (or an extension used by the user) is allowed to register gobbets
of I6T code to be used before, instead of, or after any whole segment or
@@ -269,8 +269,32 @@ and therefore no interventions will have happened.)
(*(kit->raw_callback))(SP, kit);
}
+ typedef struct contents_section_state {
+ struct linked_list *sects; of text_stream
+ int active;
+ } contents_section_state;
+
void TemplateReader::interpret(OUTPUT_STREAM, text_stream *sf,
text_stream *segment_name, int N_escape, I6T_kit *kit) {
+ if (Str::eq(segment_name, I"all")) {
+ for (int area=0; area<kit->no_i6t_file_areas; area++) {
+ pathname *P = Pathnames::up(kit->i6t_files[area]);
+ filename *F = Filenames::in_folder(P, I"Contents.w");
+ if (TextFiles::exists(F)) {
+ contents_section_state CSS;
+ CSS.active = FALSE;
+ CSS.sects = NEW_LINKED_LIST(text_stream);
+ TextFiles::read(F, FALSE,
+ NULL, FALSE, TemplateReader::read_contents, NULL, (void *) &CSS);
+ text_stream *segment;
+ LOOP_OVER_LINKED_LIST(segment, text_stream, CSS.sects)
+ TemplateReader::interpret(OUT, sf, segment, N_escape, kit);
+ return;
+ }
+ }
+ TemplateReader::error("unable to find a contents section to read 'all'", I"Contents.w");
+ return;
+ }
FILE *Input_File = NULL;
TEMPORARY_TEXT(heading_name);
int skip_part = FALSE, comment = TRUE;
@@ -307,6 +331,8 @@ and therefore no interventions will have happened.)
The function TemplateReader::interpret is used in §3, §10.2.4.3.1.
+The structure contents_section_state is private to this section.
+§10.1. We look for the .i6t
files in a list of possible locations supplied as
part of the I6T kit.
{-open-index}<
This code is used in §10.2.4.3.
-§11. Template errors. Errors here used to be basically failed assertions, but inevitably people
+
+
+
+
+ void TemplateReader::read_contents(text_stream *text, text_file_position *tfp, void *state) {
+ contents_section_state *CSS = (contents_section_state *) state;
+ match_results mr = Regexp::create_mr();
+ if (Regexp::match(&mr, text, L"Sections"))
+ CSS->active = TRUE;
+ if ((Regexp::match(&mr, text, L" (%c+)")) && (CSS->active)) {
+ WRITE_TO(mr.exp[0], ".i6t");
+ ADD_TO_LINKED_LIST(Str::duplicate(mr.exp[0]), text_stream, CSS->sects);
+ }
+ Regexp::dispose_of(&mr);
+ }
+
+
+
+
+The function TemplateReader::read_contents is used in §10.
+
+§12. Template errors. Errors here used to be basically failed assertions, but inevitably people
reported that as a bug (0001596). It was never intended that I6T coding
be part of the outside-facing language, but for a handful of people
using template-hacking there are a handful of cases that can't be avoided, so...
@@ -686,7 +733,7 @@ using template-hacking there are a handful of cases that can't be avoided, so...
-The function TemplateReader::error is used in §4, §10.1, §10.2.2, §10.2.3, §10.2.4.2, 2/lnk (§2), 2/rcc (§2, §2.4, §2.2.2, §2.5, §2.6), 2/alm (§2.1.2, §2.2.1).
+The function TemplateReader::error is used in §4, §10, §10.1, §10.2.2, §10.2.3, §10.2.4.2, 2/lnk (§2), 2/rcc (§2, §2.4, §2.2.2, §2.5, §2.6), 2/alm (§2.1.2, §2.2.1).
diff --git a/docs/core-module/1-cm.html b/docs/core-module/1-cm.html
index 50020ac08..8f6965849 100644
--- a/docs/core-module/1-cm.html
+++ b/docs/core-module/1-cm.html
@@ -114,6 +114,9 @@
enum value_holster_array_MT
enum adjective_iname_holder_MT
enum label_namespace_MT
+ enum inform_kit_MT
+ enum inform_kit_ittt_MT
+ enum element_activation_MT
§3. Deep breath, then: the following macros define several hundred functions.
@@ -188,6 +191,9 @@
ALLOCATE_INDIVIDUALLY(runtime_kind_structure)
ALLOCATE_INDIVIDUALLY(adjective_iname_holder)
ALLOCATE_INDIVIDUALLY(label_namespace)
+ ALLOCATE_INDIVIDUALLY(inform_kit)
+ ALLOCATE_INDIVIDUALLY(inform_kit_ittt)
+ ALLOCATE_INDIVIDUALLY(element_activation)
@@ -544,7 +550,7 @@ we need to use the equivalent of traditional The function CoreModule::end appears nowhere else.
-
+
diff --git a/docs/core-module/1-kts.html b/docs/core-module/1-kts.html
new file mode 100644
index 000000000..5ccc44b71
--- /dev/null
+++ b/docs/core-module/1-kts.html
@@ -0,0 +1,314 @@
+
+
+
+ 1/cm
+
+
+
+
+
+
+
+A kit is a combination of Inter code with an Inform 7 extension.
+
+
+
+
+
+
+
+ typedef struct inform_kit {
+ struct text_stream *name;
+ struct inter_library *lib;
+ struct text_stream *early_source;
+ struct linked_list *ittt; of inform_kit_ittt
+ struct linked_list *kind_definitions; of text_stream
+ struct linked_list *extensions; of text_stream
+ struct linked_list *activations; of element_activation
+ struct text_stream *index_template;
+ int defines_Main;
+ int priority;
+ MEMORY_MANAGEMENT
+ } inform_kit;
+
+ typedef struct inform_kit_ittt {
+ struct text_stream *if_name;
+ int if_included;
+ struct text_stream *then_name;
+ MEMORY_MANAGEMENT
+ } inform_kit_ittt;
+
+ typedef struct element_activation {
+ struct text_stream *element_name;
+ int activate;
+ MEMORY_MANAGEMENT
+ } element_activation;
+
+ inform_kit *Kits::load(text_stream *name) {
+ inform_kit *K = CREATE(inform_kit);
+ K->name = Str::duplicate(name);
+ K->lib = CodeGen::Libraries::find(name, NO_FS_AREAS, pathname_of_inter_resources);
+ if (K->lib == NULL) {
+ WRITE_TO(STDERR, "Cannot find kit '%S'\n", name);
+ Problems::Fatal::issue("Unable to find one of the Inform support kits");
+ }
+ K->early_source = NULL;
+ K->priority = 10;
+ K->ittt = NEW_LINKED_LIST(inform_kit_ittt);
+ K->kind_definitions = NEW_LINKED_LIST(text_stream);
+ K->extensions = NEW_LINKED_LIST(text_stream);
+ K->activations = NEW_LINKED_LIST(element_activation);
+ K->defines_Main = FALSE;
+ K->index_template = NULL;
+
+ pathname *P = CodeGen::Libraries::location(K->lib);
+ filename *F = Filenames::in_folder(P, I"kit_metadata.txt");
+ TextFiles::read(F, FALSE,
+ NULL, FALSE, Kits::read_metadata, NULL, (void *) K);
+
+ return K;
+ }
+
+ void Kits::dependency(inform_kit *K, text_stream *if_text, int inc, text_stream *then_text) {
+ inform_kit_ittt *ITTT = CREATE(inform_kit_ittt);
+ ITTT->if_name = Str::duplicate(if_text);
+ ITTT->if_included = inc;
+ ITTT->then_name = Str::duplicate(then_text);
+ ADD_TO_LINKED_LIST(ITTT, inform_kit_ittt, K->ittt);
+ }
+
+ void Kits::activation(inform_kit *K, text_stream *name, int act) {
+ element_activation *EA = CREATE(element_activation);
+ EA->element_name = Str::duplicate(name);
+ EA->activate = act;
+ ADD_TO_LINKED_LIST(EA, element_activation, K->activations);
+ }
+
+ void Kits::read_metadata(text_stream *text, text_file_position *tfp, void *state) {
+ inform_kit *K = (inform_kit *) state;
+ match_results mr = Regexp::create_mr();
+ if ((Str::is_whitespace(text)) || (Regexp::match(&mr, text, L" *#%c*"))) {
+ ;
+ } else if (Regexp::match(&mr, text, L"defines Main: yes")) {
+ K->defines_Main = TRUE;
+ } else if (Regexp::match(&mr, text, L"defines Main: no")) {
+ K->defines_Main = FALSE;
+ } else if (Regexp::match(&mr, text, L"insert: (%c*)")) {
+ K->early_source = Str::duplicate(mr.exp[0]);
+ WRITE_TO(K->early_source, "\n\n");
+ } else if (Regexp::match(&mr, text, L"priority: (%d*)")) {
+ K->priority = Str::atoi(mr.exp[0], 0);
+ } else if (Regexp::match(&mr, text, L"kinds: (%C+)")) {
+ ADD_TO_LINKED_LIST(Str::duplicate(mr.exp[0]), text_stream, K->kind_definitions);
+ } else if (Regexp::match(&mr, text, L"extension: (%c+)")) {
+ ADD_TO_LINKED_LIST(Str::duplicate(mr.exp[0]), text_stream, K->extensions);
+ } else if (Regexp::match(&mr, text, L"activate: (%c+)")) {
+ Kits::activation(K, mr.exp[0], TRUE);
+ } else if (Regexp::match(&mr, text, L"deactivate: (%c+)")) {
+ Kits::activation(K, mr.exp[0], FALSE);
+ } else if (Regexp::match(&mr, text, L"dependency: if (%C+) then (%C+)")) {
+ Kits::dependency(K, mr.exp[0], TRUE, mr.exp[1]);
+ } else if (Regexp::match(&mr, text, L"dependency: if not (%C+) then (%C+)")) {
+ Kits::dependency(K, mr.exp[0], FALSE, mr.exp[1]);
+ } else if (Regexp::match(&mr, text, L"index from: (%c*)")) {
+ K->index_template = Str::duplicate(mr.exp[0]);
+ } else {
+ Errors::in_text_file("illegible line in kit metadata file", tfp);
+ WRITE_TO(STDERR, "'%S'\n", text);
+ }
+ Regexp::dispose_of(&mr);
+ }
+
+ int Kits::loaded(text_stream *name) {
+ inform_kit *K;
+ LOOP_OVER(K, inform_kit)
+ if (Str::eq(K->name, name))
+ return TRUE;
+ return FALSE;
+ }
+
+ void Kits::perform_ittt(void) {
+ int changes_made = TRUE;
+ while (changes_made) {
+ changes_made = FALSE;
+ inform_kit *K;
+ LOOP_OVER(K, inform_kit) {
+ inform_kit_ittt *ITTT;
+ LOOP_OVER_LINKED_LIST(ITTT, inform_kit_ittt, K->ittt)
+ if ((Kits::loaded(ITTT->then_name) == FALSE) &&
+ (Kits::loaded(ITTT->if_name) == ITTT->if_included)) {
+ Kits::load(ITTT->then_name);
+ changes_made = TRUE;
+ }
+ }
+ }
+ }
+
+ linked_list *kits_requested = NULL;
+ linked_list *kits_to_include = NULL;
+ void Kits::request(text_stream *name) {
+ if (kits_requested == NULL) kits_requested = NEW_LINKED_LIST(text_stream);
+ text_stream *kit_name;
+ LOOP_OVER_LINKED_LIST(kit_name, text_stream, kits_requested)
+ if (Str::eq(kit_name, name))
+ return;
+ ADD_TO_LINKED_LIST(Str::duplicate(name), text_stream, kits_requested);
+ }
+
+ void Kits::determine(void) {
+ if (kits_requested == NULL) Kits::request(I"CommandParserKit");
+ Kits::request(I"BasicInformKit");
+ text_stream *kit_name;
+ LOOP_OVER_LINKED_LIST(kit_name, text_stream, kits_requested)
+ Kits::load(kit_name);
+
+ Kits::perform_ittt();
+
+ kits_to_include = NEW_LINKED_LIST(inform_kit);
+ for (int p=0; p<100; p++) {
+ inform_kit *K;
+ LOOP_OVER(K, inform_kit)
+ if (K->priority == p)
+ ADD_TO_LINKED_LIST(K, inform_kit, kits_to_include);
+ }
+ inform_kit *K;
+ LOOP_OVER_LINKED_LIST(K, inform_kit, kits_to_include)
+ LOG("Using Inform kit '%S' (priority %d).\n", K->name, K->priority);
+ }
+
+ void Kits::load_types(void) {
+ inform_kit *K;
+ LOOP_OVER_LINKED_LIST(K, inform_kit, kits_to_include) {
+ text_stream *segment;
+ LOOP_OVER_LINKED_LIST(segment, text_stream, K->kind_definitions) {
+ pathname *P = CodeGen::Libraries::location(K->lib);
+ P = Pathnames::subfolder(P, I"kinds");
+ filename *F = Filenames::in_folder(P, segment);
+ LOG("Loading kinds definitions from %f\n", F);
+ I6T::interpret_kindt(F);
+ }
+ }
+ }
+
+ void Kits::activate_plugins(void) {
+ LOG("Activate plugins...\n");
+ Plugins::Manage::activate(CORE_PLUGIN_NAME);
+ inform_kit *K;
+ LOOP_OVER_LINKED_LIST(K, inform_kit, kits_to_include) {
+ element_activation *EA;
+ LOOP_OVER_LINKED_LIST(EA, element_activation, K->activations) {
+ int S = Plugins::Manage::parse(EA->element_name);
+ if (S == -1)
+ Problems::Issue::sentence_problem(_p_(Untestable),
+ "one of the Inform kits made reference to a language segment which does not exist",
+ "which strongly suggests that Inform is not properly installed.");
+ if (S >= 0) {
+ if (EA->activate) Plugins::Manage::activate(S);
+ else Plugins::Manage::deactivate(S);
+ }
+ }
+ }
+ Plugins::Manage::show(DL, "Included", TRUE);
+ Plugins::Manage::show(DL, "Excluded", FALSE);
+ }
+
+ int Kits::Main_defined(void) {
+ inform_kit *K;
+ LOOP_OVER_LINKED_LIST(K, inform_kit, kits_to_include)
+ if (K->defines_Main)
+ return TRUE;
+ return FALSE;
+ }
+
+ text_stream *Kits::index_template(void) {
+ text_stream *I = NULL;
+ inform_kit *K;
+ LOOP_OVER_LINKED_LIST(K, inform_kit, kits_to_include)
+ if (K->index_template)
+ I = K->index_template;
+ return I;
+ }
+
+
+
+
+The function Kits::load appears nowhere else.
+
+The function Kits::dependency appears nowhere else.
+
+The function Kits::activation appears nowhere else.
+
+The function Kits::read_metadata appears nowhere else.
+
+The function Kits::loaded appears nowhere else.
+
+The function Kits::perform_ittt appears nowhere else.
+
+The function Kits::request is used in 1/mr (§6).
+
+The function Kits::determine is used in 1/mr (§4.8).
+
+The function Kits::load_types is used in 1/mr (§4.10).
+
+The function Kits::activate_plugins is used in 1/mr (§4.10).
+
+The function Kits::Main_defined is used in 1/mr (§4.15).
+
+The function Kits::index_template is used in 1/mr (§4.17).
+
+The structure inform_kit is accessed in 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
+
+The structure inform_kit_ittt is private to this section.
+
+The structure element_activation is accessed in 5/lp and here.
+
+§2. In particular, every source text read into Inform is automatically prefixed by
+the following eight words — if Inform were a computer, this would be the BIOS
+which boots up its operating system. (In that the rest of the creation of the
+I7 world model is handled by source text in the Standard Rules.)
+
+
+Because of this mandatory insertion, one extension, the Standard Rules, is
+compulsorily included in every run. So there will certainly be at least two
+files of source text to be read, and quite possibly more.
+
+
+
+
+ define MANDATORY_INSERTED_TEXT L"Include Basic Inform by Graham Nelson. Include the Standard Rules by Graham Nelson.\n\n"
+ define BASIC_MODE_INSERTED_TEXT L"Include Basic Inform by Graham Nelson.\n\n"
+
+
+
+ void Kits::feed_early_source_text(OUTPUT_STREAM) {
+ inform_kit *K;
+ LOOP_OVER_LINKED_LIST(K, inform_kit, kits_to_include) {
+ text_stream *X;
+ LOOP_OVER_LINKED_LIST(X, text_stream, K->extensions)
+ WRITE("Include %S.\n\n", X);
+ if (K->early_source) WRITE("%S\n\n", K->early_source);
+ }
+ }
+
+ linked_list *requirements_list = NULL;
+ linked_list *Kits::list_of_inter_libraries(void) {
+ requirements_list = NEW_LINKED_LIST(inter_library);
+ inform_kit *K;
+ LOOP_OVER_LINKED_LIST(K, inform_kit, kits_to_include)
+ ADD_TO_LINKED_LIST(K->lib, inter_library, requirements_list);
+ return requirements_list;
+ }
+
+
+
+
+The function Kits::feed_early_source_text is used in 3/rst (§3).
+
+The function Kits::list_of_inter_libraries is used in 1/mr (§4.16).
+
+
+
+
+
+
+
diff --git a/docs/core-module/1-mr.html b/docs/core-module/1-mr.html
index ac4fe9a41..960de7b7a 100644
--- a/docs/core-module/1-mr.html
+++ b/docs/core-module/1-mr.html
@@ -38,7 +38,6 @@ command-line option.
int this_is_a_release_compile = FALSE; Omit sections of source text marked not for release
int existing_story_file = FALSE; Ignore source text to blorb existing story file?
int rng_seed_at_start_of_play = 0; The seed value, or 0 if not seeded
- int basic_mode = FALSE; Inform running as a pared-down, non-IF language
int census_mode = FALSE; Inform running only to update extension documentation
text_stream *story_filename_extension = NULL; What story file we will eventually have
int show_progress_indicator = TRUE; Produce percentage of progress messages
@@ -107,20 +106,21 @@ Inform 6 code is complete.
if (census_mode)
Extensions::Files::handle_census_mode();
else {
- <Perform lexical analysis 4.8>;
- <Perform semantic analysis 4.9>;
- <Read the assertions in two passes 4.10>;
- <Make the model world 4.11>;
- <Tables and grammar 4.12>;
- <Phrases and rules 4.13>;
- <Generate inter 4.14>;
- <Convert inter to Inform 6 4.15>;
- <Generate metadata 4.16>;
- <Post mortem logging 4.17>;
+ <Work out our kit requirements 4.8>;
+ <Perform lexical analysis 4.9>;
+ <Perform semantic analysis 4.10>;
+ <Read the assertions in two passes 4.11>;
+ <Make the model world 4.12>;
+ <Tables and grammar 4.13>;
+ <Phrases and rules 4.14>;
+ <Generate inter 4.15>;
+ <Convert inter to Inform 6 4.16>;
+ <Generate metadata 4.17>;
+ <Post mortem logging 4.18>;
}
}
clock_t end = clock();
- <Shutdown and rennab 4.18>;
+ <Shutdown and rennab 4.19>;
if (problem_count > 0) Problems::Fatal::exit(1);
return 0;
}
@@ -159,7 +159,6 @@ list is not exhaustive.
- enum BASIC_CLSW
enum CASE_CLSW
enum CENSUS_CLSW
enum CLOCK_CLSW
@@ -168,6 +167,7 @@ list is not exhaustive.
enum FORMAT_CLSW
enum CRASHALL_CLSW
enum INTERNAL_CLSW
+ enum KIT_CLSW
enum NOINDEX_CLSW
enum NOPROGRESS_CLSW
enum PROJECT_CLSW
@@ -192,8 +192,6 @@ list is not exhaustive.
CommandLine::declare_textual_switch(FORMAT_CLSW, L"format", 1,
L"compile I6 code suitable for the virtual machine X");
- CommandLine::declare_boolean_switch(BASIC_CLSW, L"basic", 1,
- L"run a basic non-IF version of the Inform language");
CommandLine::declare_boolean_switch(CENSUS_CLSW, L"census", 1,
L"perform an extensions census (rather than compile)");
CommandLine::declare_boolean_switch(CLOCK_CLSW, L"clock", 1,
@@ -218,6 +216,8 @@ list is not exhaustive.
L"return 0 unless exactly this Problem message is generated (for testing)");
CommandLine::declare_switch(PIPELINE_CLSW, L"pipeline", 2,
L"specify code-generation pipeline");
+ CommandLine::declare_switch(KIT_CLSW, L"kit", 2,
+ L"load the Inform kit called X");
CommandLine::declare_switch(PIPELINE_FILE_CLSW, L"pipeline-file", 2,
L"specify code-generation pipeline from file X");
CommandLine::declare_switch(PIPELINE_VARIABLE_CLSW, L"variable", 2,
@@ -297,6 +297,14 @@ list is not exhaustive.
if (cs > 0) LOG(".... " #routine "() took %dcs\n", cs);
}
}
+ define COMPILATION_STEP_IF(plugin, routine, mark) {
+ if ((problem_count == 0) && (Plugins::Manage::plugged_in(plugin))) {
+ clock_t now = clock();
+ routine();
+ int cs = ((int) (clock() - now)) / (CLOCKS_PER_SEC/100);
+ if (cs > 0) LOG(".... " #routine "() took %dcs\n", cs);
+ }
+ }
<Boot up the compiler 4.7> =
@@ -317,7 +325,20 @@ list is not exhaustive.
This code is used in §4.
§4.8.
- <Perform lexical analysis 4.8> =
+ <Work out our kit requirements 4.8> =
+
+
+
+
+ COMPILATION_STEP(Kits::determine, I"Kits::determine")
+
+
+
+
+ This code is used in §4.
+
+ §4.9.
+ <Perform lexical analysis 4.9> =
@@ -332,21 +353,23 @@ list is not exhaustive.
This code is used in §4.
- §4.9.
- <Perform semantic analysis 4.9> =
+ §4.10.
+ <Perform semantic analysis 4.10> =
ProgressBar::update_progress_bar(1, 0);
if (problem_count == 0) CoreMain::go_to_log_phase(I"Semantic analysis Ia");
+ COMPILATION_STEP(Kits::activate_plugins, I"Kits::activate_plugins");
COMPILATION_STEP(ParseTreeUsage::plant_parse_tree, I"ParseTreeUsage::plant_parse_tree")
COMPILATION_STEP(StructuralSentences::break_source, I"StructuralSentences::break_source")
COMPILATION_STEP(Extensions::Inclusion::traverse, I"Extensions::Inclusion::traverse")
COMPILATION_STEP(Sentences::Headings::satisfy_dependencies, I"Sentences::Headings::satisfy_dependencies")
if (problem_count == 0) CoreMain::go_to_log_phase(I"Initialise language semantics");
- if (problem_count == 0) Plugins::Manage::load_types();
+ COMPILATION_STEP(Plugins::Manage::start_plugins, I"Plugins::Manage::start_plugins");
+ COMPILATION_STEP(Kits::load_types, I"Kits::load_types");
COMPILATION_STEP(BinaryPredicates::make_built_in, I"BinaryPredicates::make_built_in")
COMPILATION_STEP(NewVerbs::add_inequalities, I"NewVerbs::add_inequalities")
@@ -376,8 +399,8 @@ list is not exhaustive.
This code is used in §4.
- §4.10.
- <Read the assertions in two passes 4.10> =
+ §4.11.
+ <Read the assertions in two passes 4.11> =
@@ -395,8 +418,8 @@ list is not exhaustive.
This code is used in §4.
- §4.11.
- <Make the model world 4.11> =
+ §4.12.
+ <Make the model world 4.12> =
@@ -420,8 +443,8 @@ list is not exhaustive.
This code is used in §4.
- §4.12.
- <Tables and grammar 4.12> =
+ §4.13.
+ <Tables and grammar 4.13> =
@@ -437,8 +460,8 @@ list is not exhaustive.
This code is used in §4.
- §4.13.
- <Phrases and rules 4.13> =
+ §4.14.
+ <Phrases and rules 4.14> =
@@ -462,14 +485,14 @@ list is not exhaustive.
This code is used in §4.
- §4.14. This is where we hand over to regular template files — containing code
+
§4.15. This is where we hand over to regular template files — containing code
passed through as I6 source, as well as a few further commands — starting
with "Output.i6t".
- <Generate inter 4.14> =
+ <Generate inter 4.15> =
@@ -478,13 +501,10 @@ list is not exhaustive.
if (problem_count == 0) CoreMain::go_to_log_phase(I"Generating inter");
COMPILATION_STEP(UseOptions::compile_icl_commands, I"UseOptions::compile_icl_commands")
COMPILATION_STEP(VirtualMachines::compile_build_number, I"VirtualMachines::compile_build_number")
- COMPILATION_STEP(Plugins::Manage::define_IFDEF_symbols, I"Plugins::Manage::define_IFDEF_symbols")
COMPILATION_STEP(PL::Bibliographic::compile_constants, I"PL::Bibliographic::compile_constants")
COMPILATION_STEP(Extensions::Files::ShowExtensionVersions_routine, I"Extensions::Files::ShowExtensionVersions_routine")
COMPILATION_STEP(Kinds::Constructors::compile_I6_constants, I"Kinds::Constructors::compile_I6_constants")
- if (basic_mode == FALSE) {
- COMPILATION_STEP(PL::Score::compile_max_score, I"PL::Score::compile_max_score")
- }
+ COMPILATION_STEP_IF(scoring_plugin, PL::Score::compile_max_score, I"PL::Score::compile_max_score")
COMPILATION_STEP(UseOptions::TestUseOption_routine, I"UseOptions::TestUseOption_routine")
COMPILATION_STEP(Activities::compile_activity_constants, I"Activities::compile_activity_constants")
COMPILATION_STEP(Activities::Activity_before_rulebooks_array, I"Activities::Activity_before_rulebooks_array")
@@ -495,62 +515,51 @@ list is not exhaustive.
COMPILATION_STEP(Kinds::RunTime::compile_data_type_support_routines, I"Kinds::RunTime::compile_data_type_support_routines")
COMPILATION_STEP(Kinds::RunTime::I7_Kind_Name_routine, I"Kinds::RunTime::I7_Kind_Name_routine")
COMPILATION_STEP(World::Compile::compile, I"World::Compile::compile")
- if (basic_mode == FALSE) {
- COMPILATION_STEP(PL::Backdrops::write_found_in_routines, I"PL::Backdrops::write_found_in_routines")
- COMPILATION_STEP(PL::Map::write_door_dir_routines, I"PL::Map::write_door_dir_routines")
- COMPILATION_STEP(PL::Map::write_door_to_routines, I"PL::Map::write_door_to_routines")
- COMPILATION_STEP(PL::Parsing::Tokens::General::write_parse_name_routines, I"PL::Parsing::Tokens::General::write_parse_name_routines")
- COMPILATION_STEP(PL::Regions::write_regional_found_in_routines, I"PL::Regions::write_regional_found_in_routines")
- }
+ COMPILATION_STEP_IF(backdrops_plugin, PL::Backdrops::write_found_in_routines, I"PL::Backdrops::write_found_in_routines")
+ COMPILATION_STEP_IF(map_plugin, PL::Map::write_door_dir_routines, I"PL::Map::write_door_dir_routines")
+ COMPILATION_STEP_IF(map_plugin, PL::Map::write_door_to_routines, I"PL::Map::write_door_to_routines")
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::Tokens::General::write_parse_name_routines, I"PL::Parsing::Tokens::General::write_parse_name_routines")
+ COMPILATION_STEP_IF(regions_plugin, PL::Regions::write_regional_found_in_routines, I"PL::Regions::write_regional_found_in_routines")
COMPILATION_STEP(Tables::complete, I"Tables::complete")
COMPILATION_STEP(Tables::Support::compile, I"Tables::Support::compile")
COMPILATION_STEP(Equations::compile, I"Equations::compile")
- if (basic_mode == FALSE) {
- COMPILATION_STEP(PL::Actions::Patterns::Named::compile, I"PL::Actions::Patterns::Named::compile")
- COMPILATION_STEP(PL::Actions::ActionData, I"PL::Actions::ActionData")
- COMPILATION_STEP(PL::Actions::ActionCoding_array, I"PL::Actions::ActionCoding_array")
- COMPILATION_STEP(PL::Actions::ActionHappened, I"PL::Actions::ActionHappened")
- COMPILATION_STEP(PL::Actions::compile_action_routines, I"PL::Actions::compile_action_routines")
- COMPILATION_STEP(PL::Parsing::Lines::MistakeActionSub_routine, I"PL::Parsing::Lines::MistakeActionSub_routine")
- }
+ COMPILATION_STEP_IF(actions_plugin, PL::Actions::Patterns::Named::compile, I"PL::Actions::Patterns::Named::compile")
+ COMPILATION_STEP_IF(actions_plugin, PL::Actions::ActionData, I"PL::Actions::ActionData")
+ COMPILATION_STEP_IF(actions_plugin, PL::Actions::ActionCoding_array, I"PL::Actions::ActionCoding_array")
+ COMPILATION_STEP_IF(actions_plugin, PL::Actions::ActionHappened, I"PL::Actions::ActionHappened")
+ COMPILATION_STEP_IF(actions_plugin, PL::Actions::compile_action_routines, I"PL::Actions::compile_action_routines")
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::Lines::MistakeActionSub_routine, I"PL::Parsing::Lines::MistakeActionSub_routine")
COMPILATION_STEP(Phrases::Manager::compile_first_block, I"Phrases::Manager::compile_first_block")
COMPILATION_STEP(Phrases::Manager::compile_rulebooks, I"Phrases::Manager::compile_rulebooks")
COMPILATION_STEP(Phrases::Manager::rulebooks_array, I"Phrases::Manager::rulebooks_array")
- if (basic_mode == FALSE) {
- COMPILATION_STEP(PL::Scenes::DetectSceneChange_routine, I"PL::Scenes::DetectSceneChange_routine")
- COMPILATION_STEP(PL::Scenes::ShowSceneStatus_routine, I"PL::Scenes::ShowSceneStatus_routine")
- }
+ COMPILATION_STEP_IF(scenes_plugin, PL::Scenes::DetectSceneChange_routine, I"PL::Scenes::DetectSceneChange_routine")
+ COMPILATION_STEP_IF(scenes_plugin, PL::Scenes::ShowSceneStatus_routine, I"PL::Scenes::ShowSceneStatus_routine")
COMPILATION_STEP(PL::Files::arrays, I"PL::Files::arrays")
COMPILATION_STEP(Rulebooks::rulebook_var_creators, I"Rulebooks::rulebook_var_creators")
COMPILATION_STEP(Activities::activity_var_creators, I"Activities::activity_var_creators")
COMPILATION_STEP(Relations::IterateRelations, I"Relations::IterateRelations")
COMPILATION_STEP(Phrases::Manager::RulebookNames_array, I"Phrases::Manager::RulebookNames_array")
COMPILATION_STEP(Phrases::Manager::RulePrintingRule_routine, I"Phrases::Manager::RulePrintingRule_routine")
- if (basic_mode == FALSE) {
- COMPILATION_STEP(PL::Parsing::Verbs::prepare, I"PL::Parsing::Verbs::prepare")
- COMPILATION_STEP(PL::Parsing::Verbs::compile_conditions, I"PL::Parsing::Verbs::compile_conditions")
- COMPILATION_STEP(PL::Parsing::Tokens::Values::number, I"PL::Parsing::Tokens::Values::number")
- COMPILATION_STEP(PL::Parsing::Tokens::Values::truth_state, I"PL::Parsing::Tokens::Values::truth_state")
- COMPILATION_STEP(PL::Parsing::Tokens::Values::time, I"PL::Parsing::Tokens::Values::time")
- COMPILATION_STEP(PL::Parsing::Tokens::Values::compile_type_gprs, I"PL::Parsing::Tokens::Values::compile_type_gprs")
- }
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::Verbs::prepare, I"PL::Parsing::Verbs::prepare")
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::Verbs::compile_conditions, I"PL::Parsing::Verbs::compile_conditions")
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::Tokens::Values::number, I"PL::Parsing::Tokens::Values::number")
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::Tokens::Values::truth_state, I"PL::Parsing::Tokens::Values::truth_state")
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::Tokens::Values::time, I"PL::Parsing::Tokens::Values::time")
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::Tokens::Values::compile_type_gprs, I"PL::Parsing::Tokens::Values::compile_type_gprs")
COMPILATION_STEP(NewVerbs::ConjugateVerb, I"NewVerbs::ConjugateVerb")
COMPILATION_STEP(Adjectives::Meanings::agreements, I"Adjectives::Meanings::agreements")
- if (basic_mode == FALSE) {
- if ((this_is_a_release_compile == FALSE) || (this_is_a_debug_compile)) {
- COMPILATION_STEP(PL::Parsing::TestScripts::write_text, I"PL::Parsing::TestScripts::write_text")
- COMPILATION_STEP(PL::Parsing::TestScripts::TestScriptSub_routine, I"PL::Parsing::TestScripts::TestScriptSub_routine")
- COMPILATION_STEP(PL::Parsing::TestScripts::InternalTestCases_routine, I"PL::Parsing::TestScripts::InternalTestCases_routine")
- } else {
- COMPILATION_STEP(PL::Parsing::TestScripts::TestScriptSub_stub_routine, I"PL::Parsing::TestScripts::TestScriptSub_stub_routine")
- }
+ if ((this_is_a_release_compile == FALSE) || (this_is_a_debug_compile)) {
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::TestScripts::write_text, I"PL::Parsing::TestScripts::write_text")
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::TestScripts::TestScriptSub_routine, I"PL::Parsing::TestScripts::TestScriptSub_routine")
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::TestScripts::InternalTestCases_routine, I"PL::Parsing::TestScripts::InternalTestCases_routine")
+ } else {
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::TestScripts::TestScriptSub_stub_routine, I"PL::Parsing::TestScripts::TestScriptSub_stub_routine")
}
COMPILATION_STEP(Lists::check, I"Lists::check")
COMPILATION_STEP(Lists::compile, I"Lists::compile")
- if (basic_mode) {
+ if (Kits::Main_defined() == FALSE)
COMPILATION_STEP(Phrases::invoke_to_begin, I"Phrases::invoke_to_begin")
- }
COMPILATION_STEP(Phrases::Manager::compile_as_needed, I"Phrases::Manager::compile_as_needed")
COMPILATION_STEP(Strings::compile_responses, I"Strings::compile_responses")
COMPILATION_STEP(Lists::check, I"Lists::check")
@@ -558,15 +567,13 @@ list is not exhaustive.
COMPILATION_STEP(Relations::compile_defined_relations, I"Relations::compile_defined_relations")
COMPILATION_STEP(Phrases::Manager::compile_as_needed, I"Phrases::Manager::compile_as_needed")
COMPILATION_STEP(Strings::TextSubstitutions::allow_no_further_text_subs, I"Strings::TextSubstitutions::allow_no_further_text_subs")
- if (basic_mode == FALSE) {
- COMPILATION_STEP(PL::Parsing::Tokens::Filters::compile, I"PL::Parsing::Tokens::Filters::compile")
- COMPILATION_STEP(Chronology::past_actions_i6_routines, I"Chronology::past_actions_i6_routines")
- COMPILATION_STEP(Chronology::chronology_extents_i6_escape, I"Chronology::chronology_extents_i6_escape")
- COMPILATION_STEP(Chronology::past_tenses_i6_escape, I"Chronology::past_tenses_i6_escape")
- COMPILATION_STEP(Chronology::allow_no_further_past_tenses, I"Chronology::allow_no_further_past_tenses")
- COMPILATION_STEP(PL::Parsing::Verbs::compile_all, I"PL::Parsing::Verbs::compile_all")
- COMPILATION_STEP(PL::Parsing::Tokens::Filters::compile, I"PL::Parsing::Tokens::Filters::compile")
- }
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::Tokens::Filters::compile, I"PL::Parsing::Tokens::Filters::compile")
+ COMPILATION_STEP_IF(actions_plugin, Chronology::past_actions_i6_routines, I"Chronology::past_actions_i6_routines")
+ COMPILATION_STEP_IF(chronology_plugin, Chronology::chronology_extents_i6_escape, I"Chronology::chronology_extents_i6_escape")
+ COMPILATION_STEP_IF(chronology_plugin, Chronology::past_tenses_i6_escape, I"Chronology::past_tenses_i6_escape")
+ COMPILATION_STEP_IF(chronology_plugin, Chronology::allow_no_further_past_tenses, I"Chronology::allow_no_further_past_tenses")
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::Verbs::compile_all, I"PL::Parsing::Verbs::compile_all")
+ COMPILATION_STEP_IF(parsing_plugin, PL::Parsing::Tokens::Filters::compile, I"PL::Parsing::Tokens::Filters::compile")
COMPILATION_STEP(Properties::Measurement::compile_MADJ_routines, I"Properties::Measurement::compile_MADJ_routines")
COMPILATION_STEP(Calculus::Propositions::Deferred::compile_remaining_deferred, I"Calculus::Propositions::Deferred::compile_remaining_deferred")
COMPILATION_STEP(Calculus::Deferrals::allow_no_further_deferrals, I"Calculus::Deferrals::allow_no_further_deferrals")
@@ -590,8 +597,8 @@ list is not exhaustive.
This code is used in §4.
- §4.15.
- <Convert inter to Inform 6 4.15> =
+ §4.16.
+ <Convert inter to Inform 6 4.16> =
@@ -612,7 +619,7 @@ list is not exhaustive.
else
CodeGen::Architecture::set(I"32");
}
- <Ensure inter pipeline variables dictionary 4.15.1>;
+ <Ensure inter pipeline variables dictionary 4.16.1>;
Str::copy(Dictionaries::create_text(pipeline_vars, I"*in"), I"*memory");
Str::copy(Dictionaries::create_text(pipeline_vars, I"*out"), Filenames::get_leafname(filename_of_compiled_i6_code));
codegen_pipeline *SS = NULL;
@@ -633,27 +640,8 @@ list is not exhaustive.
if (SS == NULL)
Problems::Fatal::issue("The Inter pipeline description contained errors");
CodeGen::Pipeline::set_repository(SS, Emit::tree());
- linked_list *requirements_list = NEW_LINKED_LIST(inter_library);
- inter_library *bi =
- CodeGen::Libraries::find(I"basic_inform", NO_FS_AREAS, pathname_of_inter_resources);
- if (bi == NULL)
- Problems::Fatal::issue("The Basic Inform inter library cannot be found");
- ADD_TO_LINKED_LIST(bi, inter_library, requirements_list);
- if (basic_mode == FALSE) {
- inter_library *stdr =
- CodeGen::Libraries::find(I"standard_rules", NO_FS_AREAS, pathname_of_inter_resources);
- if (stdr == NULL)
- Problems::Fatal::issue("The Standard Rules inter library cannot be found");
- ADD_TO_LINKED_LIST(stdr, inter_library, requirements_list);
- } else {
- inter_library *bix =
- CodeGen::Libraries::find(I"basic_inform_extras", NO_FS_AREAS, pathname_of_inter_resources);
- if (bix == NULL)
- Problems::Fatal::issue("The The Basic Inform (extras) inter library cannot be found");
- ADD_TO_LINKED_LIST(bix, inter_library, requirements_list);
- }
CodeGen::Pipeline::run(Filenames::get_path_to(filename_of_compiled_i6_code),
- SS, NO_FS_AREAS, pathname_of_inter_resources, requirements_list);
+ SS, NO_FS_AREAS, pathname_of_inter_resources, Kits::list_of_inter_libraries());
}
LOG("Back end elapsed time: %dcs\n", ((int) (clock() - front_end)) / (CLOCKS_PER_SEC/100));
}
@@ -666,8 +654,8 @@ list is not exhaustive.
This code is used in §4.
- §4.15.1.
- <Ensure inter pipeline variables dictionary 4.15.1> =
+ §4.16.1.
+ <Ensure inter pipeline variables dictionary 4.16.1> =
@@ -679,25 +667,25 @@ list is not exhaustive.
- This code is used in §4.15, §6.
+ This code is used in §4.16, §6.
-
- <Generate metadata 4.16> =
+ <Generate metadata 4.17> =
- if (basic_mode == FALSE)
+ if (Plugins::Manage::plugged_in(bibliographic_plugin))
PL::Bibliographic::Release::write_ifiction_and_blurb();
if (problem_count == 0) {
natural_language *nl = NaturalLanguages::English();
filename *index_template =
Filenames::in_folder(nl->nl_bundle_path,
- (basic_mode)?(I"Basic.indext"):(I"Standard.indext"));
+ Kits::index_template());
I6T::interpret_indext(index_template);
}
@@ -706,8 +694,8 @@ list is not exhaustive.
This code is used in §4.
- §4.17.
- <Post mortem logging 4.17> =
+ §4.18.
+ <Post mortem logging 4.18> =
@@ -726,8 +714,8 @@ list is not exhaustive.
This code is used in §4.
- §4.18.
- <Shutdown and rennab 4.18> =
+ §4.19.
+ <Shutdown and rennab 4.19> =
@@ -768,7 +756,7 @@ list is not exhaustive.
- The function CoreMain::go_to_log_phase is used in §4.8, §4.9, §4.10, §4.11, §4.12, §4.13, §4.14, §4.15.
+ The function CoreMain::go_to_log_phase is used in §4.9, §4.10, §4.11, §4.12, §4.13, §4.14, §4.15, §4.16.
@@ -777,7 +765,6 @@ list is not exhaustive.
void CoreMain::switch(int id, int val, text_stream *arg, void *state) {
switch (id) {
Miscellaneous boolean settings
- case BASIC_CLSW: basic_mode = val; break;
case CENSUS_CLSW: census_mode = val; break;
case CLOCK_CLSW: report_clock_time = val; break;
case CRASHALL_CLSW: debugger_mode = val; crash_on_all_errors = val; break;
@@ -794,6 +781,7 @@ list is not exhaustive.
Other settings
case FORMAT_CLSW: story_filename_extension = Str::duplicate(arg); break;
case CASE_CLSW: HTMLFiles::set_source_link_case(arg); break;
+ case KIT_CLSW: Kits::request(arg); break;
case REQUIRE_PROBLEM_CLSW: Problems::Fatal::require(arg); break;
case PIPELINE_CLSW: inter_processing_pipeline = Str::duplicate(arg); break;
case PIPELINE_FILE_CLSW: inter_processing_file = Str::duplicate(arg); break;
@@ -803,7 +791,7 @@ list is not exhaustive.
if (Str::get_first_char(arg) != '*') {
Errors::fatal("-variable names must begin with '*'");
} else {
- <Ensure inter pipeline variables dictionary 4.15.1>;
+ <Ensure inter pipeline variables dictionary 4.16.1>;
Str::copy(Dictionaries::create_text(pipeline_vars, mr.exp[0]), mr.exp[1]);
}
} else {
@@ -815,7 +803,7 @@ list is not exhaustive.
Useful pathnames
case PROJECT_CLSW:
- if (Str::includes(arg, I"#2oetMiq9bqxoxY")) basic_mode = TRUE;
+ if (Str::includes(arg, I"#2oetMiq9bqxoxY")) Kits::request(I"BasicInformKit");
Locations::set_project(arg); break;
case INTERNAL_CLSW: Locations::set_internal(arg); break;
case EXTERNAL_CLSW: Locations::set_external(arg); break;
@@ -841,10 +829,6 @@ list is not exhaustive.
Str::delete_last_character(inter_processing_pipeline);
LOG("Setting pipeline %S\n", inter_processing_pipeline);
}
-
- int CoreMain::basic_mode(void) {
- return basic_mode;
- }
@@ -857,8 +841,6 @@ list is not exhaustive.
The function CoreMain::set_inter_pipeline is used in 26/uo (§11.2).
- The function CoreMain::basic_mode appears nowhere else.
-
- (This section begins Chapter 1: Configuration and Control.)
- Continue with 'Core Module'
diff --git a/docs/core-module/1-pp.html b/docs/core-module/1-pp.html
index 490b1a914..7b0d6ef51 100644
--- a/docs/core-module/1-pp.html
+++ b/docs/core-module/1-pp.html
@@ -1,7 +1,7 @@
- 1/cm
+ 1/kts
@@ -64,7 +64,7 @@ progress bar with a rubric beneath it.
-The function ProgressBar::update_progress_bar is used in 1/mr (§4.8, §4.9, §4.10, §4.13, §4.14), 22/cs (§4), 22/ph (§12.1).
+The function ProgressBar::update_progress_bar is used in 1/mr (§4.9, §4.10, §4.11, §4.14, §4.15), 22/cs (§4), 22/ph (§12.1).
The function ProgressBar::final_state_of_progress_bar is used in 2/up (§2.3).
@@ -94,7 +94,7 @@ a final status indicator.
The function ProgressBar::end_outcome is used in 2/up (§2.2, §2.3).
-
+
diff --git a/docs/core-module/12-cdp.html b/docs/core-module/12-cdp.html
index a2619b23e..5e46a0856 100644
--- a/docs/core-module/12-cdp.html
+++ b/docs/core-module/12-cdp.html
@@ -79,7 +79,7 @@ which create routines which... and so on.
-The function Calculus::Propositions::Deferred::compile_remaining_deferred is used in 1/mr (§4.14).
+The function Calculus::Propositions::Deferred::compile_remaining_deferred is used in 1/mr (§4.15).
The function Calculus::Propositions::Deferred::compilation_coroutine is used in 22/cs (§14).
diff --git a/docs/core-module/12-dtd.html b/docs/core-module/12-dtd.html
index aca7c460d..429ee5b4a 100644
--- a/docs/core-module/12-dtd.html
+++ b/docs/core-module/12-dtd.html
@@ -68,7 +68,7 @@ all deferral requests are redeemed — they would then never be reached.
-The function Calculus::Deferrals::allow_no_further_deferrals is used in 1/mr (§4.14).
+The function Calculus::Deferrals::allow_no_further_deferrals is used in 1/mr (§4.15).
§4. Deferral requests. The following fills out the paperwork to request a deferred proposition.
diff --git a/docs/core-module/13-rsfk.html b/docs/core-module/13-rsfk.html
index 5470d2913..06531908e 100644
--- a/docs/core-module/13-rsfk.html
+++ b/docs/core-module/13-rsfk.html
@@ -855,7 +855,7 @@ K, we have also seen its bases.
-The function Kinds::RunTime::compile_structures is used in 1/mr (§4.14).
+The function Kinds::RunTime::compile_structures is used in 1/mr (§4.15).
§16.1.
<Compile the runtime ID structure for this kind 16.1> =
@@ -1057,7 +1057,7 @@ property values, table entries, list items) of pointer-value kinds:
-The function Kinds::RunTime::compile_heap_allocator is used in 1/mr (§4.14).
+The function Kinds::RunTime::compile_heap_allocator is used in 1/mr (§4.15).
§18.1. By now, we know that we need at least total_heap_allocation
bytes on the
heap, but the initial heap size has to be a power of 2, so we compute the
@@ -1528,13 +1528,13 @@ each such kind, and needed at run-time.
The function Kinds::RunTime::emit appears nowhere else.
-The function Kinds::RunTime::kind_declarations is used in 1/mr (§4.10).
+The function Kinds::RunTime::kind_declarations is used in 1/mr (§4.11).
The function Kinds::RunTime::compile_nnci is used in §18.1.
-The function Kinds::RunTime::compile_instance_counts is used in 1/mr (§4.13).
+The function Kinds::RunTime::compile_instance_counts is used in 1/mr (§4.14).
-The function Kinds::RunTime::compile_data_type_support_routines is used in 1/mr (§4.14).
+The function Kinds::RunTime::compile_data_type_support_routines is used in 1/mr (§4.15).
§24.1. A slightly bogus case first. If the source text declares a kind but never
gives any enumerated values or literal patterns, then such values will never
@@ -2409,7 +2409,7 @@ Z-machine array space.
-The function Kinds::RunTime::I7_Kind_Name_routine is used in 1/mr (§4.14).
+The function Kinds::RunTime::I7_Kind_Name_routine is used in 1/mr (§4.15).
diff --git a/docs/core-module/15-epv.html b/docs/core-module/15-epv.html
index d639b10fc..fd066ec9a 100644
--- a/docs/core-module/15-epv.html
+++ b/docs/core-module/15-epv.html
@@ -293,7 +293,7 @@ For now, though, we make a parallel decision here.
-The function Properties::Emit::allocate_attributes is used in 1/mr (§4.11).
+The function Properties::Emit::allocate_attributes is used in 1/mr (§4.12).
§3.1.
<Any either/or property which some value can hold is ineligible 3.1> =
diff --git a/docs/core-module/15-ma.html b/docs/core-module/15-ma.html
index ed02718b8..56973da4d 100644
--- a/docs/core-module/15-ma.html
+++ b/docs/core-module/15-ma.html
@@ -183,7 +183,7 @@ definition structure stands incomplete for a while. Filling it in is called
-The function Properties::Measurement::validate_definitions is used in 1/mr (§4.11).
+The function Properties::Measurement::validate_definitions is used in 1/mr (§4.12).
@@ -661,7 +661,7 @@ can't normally be unravelled at compile time.
-The function Properties::Measurement::compile_MADJ_routines is used in 1/mr (§4.14).
+The function Properties::Measurement::compile_MADJ_routines is used in 1/mr (§4.15).
§14. Comparative forms. For timing reasons, these are made all at once, and later than when the headword
adjectives and superlatives are made.
diff --git a/docs/core-module/15-pr.html b/docs/core-module/15-pr.html
index 1b63285c1..b4d65daed 100644
--- a/docs/core-module/15-pr.html
+++ b/docs/core-module/15-pr.html
@@ -87,7 +87,7 @@ a value with the owner; it isn't that either/or properties are unloved.)
-The structure property is accessed in 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/rv, 14/lv, 14/ds2, 15/ep, 15/vp, 15/cp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/ph, 22/pu, 22/dptd, 22/po, 22/pav, 22/tp, 25/cii, 26/uo, 26/ts and here.
+The structure property is accessed in 1/kts, 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/rv, 14/lv, 14/ds2, 15/ep, 15/vp, 15/cp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/ph, 22/pu, 22/dptd, 22/po, 22/pav, 22/tp, 25/cii, 26/uo, 26/ts and here.
§3. The only four properties which have special significance to core Inform
(though plugins are interested in many others):
@@ -1084,11 +1084,11 @@ we find it, we compile it and return The function Properties::emit_single is used in 27/ei (§3).
-The function Properties::emit is used in 1/mr (§4.11).
+The function Properties::emit is used in 1/mr (§4.12).
The function Properties::emit_default_values appears nowhere else.
-The function Properties::annotate_attributes is used in 1/mr (§4.13).
+The function Properties::annotate_attributes is used in 1/mr (§4.14).
The function Properties::emit_instance_permissions is used in 5/ins (§34).
diff --git a/docs/core-module/16-cmw.html b/docs/core-module/16-cmw.html
index 313975eea..d7564f4f1 100644
--- a/docs/core-module/16-cmw.html
+++ b/docs/core-module/16-cmw.html
@@ -71,7 +71,7 @@ aren't allowed to add I7-accessible properties.)
-The function World::complete is used in 1/mr (§4.11).
+The function World::complete is used in 1/mr (§4.12).
§1.1. The model world is a broth with many cooks. On the one hand, we have the
various different INFSs, with their different needs — a various-to-various
@@ -311,7 +311,7 @@ about the Portal, to stand.
-The function World::complete_additions is used in 1/mr (§4.12).
+The function World::complete_additions is used in 1/mr (§4.13).
diff --git a/docs/core-module/16-cmw2.html b/docs/core-module/16-cmw2.html
index c692ddee8..876994138 100644
--- a/docs/core-module/16-cmw2.html
+++ b/docs/core-module/16-cmw2.html
@@ -60,7 +60,7 @@ to write anything, then put the same question to the subjects.
-The function World::Compile::compile is used in 1/mr (§4.14).
+The function World::Compile::compile is used in 1/mr (§4.15).
diff --git a/docs/core-module/17-rs.html b/docs/core-module/17-rs.html
index 625fcc475..7757d24a8 100644
--- a/docs/core-module/17-rs.html
+++ b/docs/core-module/17-rs.html
@@ -398,7 +398,7 @@ track of the content of each response.
-The function Strings::compile_responses is used in 1/mr (§4.14).
+The function Strings::compile_responses is used in 1/mr (§4.15).
§7.1. Note that each rule is allowed to tell us that it already has a better
text for the response than the one we first created.
diff --git a/docs/core-module/17-tl.html b/docs/core-module/17-tl.html
index 99c9094a8..324e97d25 100644
--- a/docs/core-module/17-tl.html
+++ b/docs/core-module/17-tl.html
@@ -437,7 +437,7 @@ number -1
).
-The function Strings::TextLiterals::compile is used in 1/mr (§4.14).
+The function Strings::TextLiterals::compile is used in 1/mr (§4.15).
The function Strings::TextLiterals::traverse_lts appears nowhere else.
diff --git a/docs/core-module/17-ts.html b/docs/core-module/17-ts.html
index 8dc240bc5..55848c1ad 100644
--- a/docs/core-module/17-ts.html
+++ b/docs/core-module/17-ts.html
@@ -162,7 +162,7 @@ to do but panic.
-The function Strings::TextSubstitutions::allow_no_further_text_subs is used in 1/mr (§4.14).
+The function Strings::TextSubstitutions::allow_no_further_text_subs is used in 1/mr (§4.15).
§7. For some years these were compiled to routines verbosely called
text_routine_1
and so on, but no longer:
diff --git a/docs/core-module/18-lc.html b/docs/core-module/18-lc.html
index cf67dd572..b09dff716 100644
--- a/docs/core-module/18-lc.html
+++ b/docs/core-module/18-lc.html
@@ -378,7 +378,7 @@ problem messages out into the open —
-The function Lists::check is used in 1/mr (§4.14).
+The function Lists::check is used in 1/mr (§4.15).
§11. That leaves just the compilation of lists at run-time. This used to be a
complex dance with initialisation code interleaved with heap construction,
@@ -439,7 +439,7 @@ so there was once a two-page explanation here, but it is now blessedly simple.
-The function Lists::compile is used in 1/mr (§4.14).
+The function Lists::compile is used in 1/mr (§4.15).
§12.1. These are I6 word arrays, with the contents:
diff --git a/docs/core-module/19-rsft.html b/docs/core-module/19-rsft.html
index d03e5fd1d..4ac17b140 100644
--- a/docs/core-module/19-rsft.html
+++ b/docs/core-module/19-rsft.html
@@ -28,7 +28,7 @@
-The function Tables::Support::compile is used in 1/mr (§4.14).
+The function Tables::Support::compile is used in 1/mr (§4.15).
§1.1.
<Compile the data structures for entry storage 1.1> =
@@ -515,7 +515,7 @@ table values and prints the (title-cased) name of the one which matches.
-The function Tables::Support::compile_print_table_names is used in 1/mr (§4.12).
+The function Tables::Support::compile_print_table_names is used in 1/mr (§4.13).
diff --git a/docs/core-module/19-tb.html b/docs/core-module/19-tb.html
index 376a97c70..f1ecf1bd3 100644
--- a/docs/core-module/19-tb.html
+++ b/docs/core-module/19-tb.html
@@ -121,7 +121,7 @@ established names of tables and columns:
-The function Tables::traverse_to_create is used in 1/mr (§4.9).
+The function Tables::traverse_to_create is used in 1/mr (§4.10).
The function Tables::visit_to_create appears nowhere else.
@@ -148,7 +148,7 @@ see below.
-The function Tables::traverse_to_stock is used in 1/mr (§4.10, §4.13).
+The function Tables::traverse_to_stock is used in 1/mr (§4.11, §4.14).
§8. Last and least: a traverse existing just to issue a problem message in a
case which Inform can often cope with, but which the experience of users
@@ -177,7 +177,7 @@ suggests is never a good idea.
-The function Tables::check_tables_for_kind_clashes is used in 1/mr (§4.12).
+The function Tables::check_tables_for_kind_clashes is used in 1/mr (§4.13).
§9. Table basics. The following makes a blank structure for a table, but it isn't valid until
some of these fields have been properly filled in.
@@ -1590,7 +1590,7 @@ people — it needs to be "yourself" instead, since "player" is a variable.
-The function Tables::complete is used in 1/mr (§4.14).
+The function Tables::complete is used in 1/mr (§4.15).
§26.1. For the actual code, see below.
diff --git a/docs/core-module/19-tc.html b/docs/core-module/19-tc.html
index 28fce676d..f0fdb31de 100644
--- a/docs/core-module/19-tc.html
+++ b/docs/core-module/19-tc.html
@@ -46,7 +46,7 @@ predicate associated with each possible table column C.
-The structure table_column is accessed in 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
+The structure table_column is accessed in 1/kts, 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
§3. When a column appears in a particular table, this is recorded with the
following structure. Note that it's possible for a kind to be named explicitly,
diff --git a/docs/core-module/20-eq.html b/docs/core-module/20-eq.html
index c946490c2..0d0c27e0a 100644
--- a/docs/core-module/20-eq.html
+++ b/docs/core-module/20-eq.html
@@ -70,7 +70,7 @@ instance has its own equation_symbol
-The structure equation_symbol is accessed in 2/sq, 2/si, 3/pd, 5/lp, 5/ut, 5/un, 5/ins, 5/nv, 6/rlt, 6/nv, 7/ss, 7/hdn, 7/ns, 7/oaf, 7/rs, 8/ie, 8/ec, 8/ed, 8/ed2, 9/tfa, 9/tbath, 9/rpt, 9/tc, 9/ma, 9/pk, 9/rk, 9/ass, 9/imp, 9/pd, 10/teav, 10/cap, 11/ap, 11/pr, 11/bas, 11/tc, 11/sm, 12/dtd, 12/cdp, 14/rv, 14/lv, 14/cn, 14/ds, 14/ds2, 15/pr, 15/ep, 15/vp, 15/cp, 15/spr, 16/is, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/rsft, 19/tod, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/ph, 22/pu, 22/dptd, 22/po, 22/pav, 22/tp, 22/tp2, 23/ad, 24/lv, 24/sf, 25/in, 25/pi, 25/cii, 25/cp, 26/uo, 26/tti, 26/pc, 26/ts, 27/cm and here.
+The structure equation_symbol is accessed in 1/kts, 2/sq, 2/si, 3/pd, 5/lp, 5/ut, 5/un, 5/ins, 5/nv, 6/rlt, 6/nv, 7/ss, 7/hdn, 7/ns, 7/oaf, 7/rs, 8/ie, 8/ec, 8/ed, 8/ed2, 9/tfa, 9/tbath, 9/rpt, 9/tc, 9/ma, 9/pk, 9/rk, 9/ass, 9/imp, 9/pd, 10/teav, 10/cap, 11/ap, 11/pr, 11/bas, 11/tc, 11/sm, 12/dtd, 12/cdp, 14/rv, 14/lv, 14/cn, 14/ds, 14/ds2, 15/pr, 15/ep, 15/vp, 15/cp, 15/spr, 16/is, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/rsft, 19/tod, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/ph, 22/pu, 22/dptd, 22/po, 22/pav, 22/tp, 22/tp2, 23/ad, 24/lv, 24/sf, 25/in, 25/pi, 25/cii, 25/cp, 26/uo, 26/tti, 26/pc, 26/ts, 27/cm and here.
§4. In addition, there are some standing symbols used by all equations: the
constant "pi", for example. They're stored in this linked list:
@@ -183,7 +183,7 @@ value pi
.
-The function Equations::traverse_to_create is used in 1/mr (§4.9).
+The function Equations::traverse_to_create is used in 1/mr (§4.10).
The function Equations::visit_to_create appears nowhere else.
@@ -419,7 +419,7 @@ source text:
-The function Equations::traverse_to_stock is used in 1/mr (§4.13).
+The function Equations::traverse_to_stock is used in 1/mr (§4.14).
§13. And, as with creation, Equations::examine
is called explicitly in the meaning
list converter when an equation is found inline. So in all cases, we call the
@@ -2197,7 +2197,7 @@ for equations a value; they are never called.
-The function Equations::compile is used in 1/mr (§4.14).
+The function Equations::compile is used in 1/mr (§4.15).
§44. These identifiers are used to compile equation names as values, so:
diff --git a/docs/core-module/21-ac.html b/docs/core-module/21-ac.html
index 943b4917d..b2909bd09 100644
--- a/docs/core-module/21-ac.html
+++ b/docs/core-module/21-ac.html
@@ -48,7 +48,7 @@
-The structure activity is accessed in 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
+The structure activity is accessed in 1/kts, 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
The structure activity_list is accessed in 3/pd, 5/lp, 5/ut, 5/un, 5/ins, 6/rlt, 6/nv, 7/ss, 7/hdn, 7/ns, 7/oaf, 7/rs, 8/ie, 8/ec, 8/ed, 9/tfa, 9/tbath, 9/rpt, 9/tc, 9/ma, 9/rk, 9/ass, 9/imp, 9/pd, 10/teav, 10/cap, 11/ap, 11/pr, 11/bas, 11/tc, 11/sm, 12/dtd, 12/cdp, 14/rv, 14/lv, 14/cn, 14/ds, 14/ds2, 15/cp, 16/is, 16/in, 19/tb, 19/rsft, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 22/ph, 22/tp, 22/tp2, 23/ad, 24/lv, 24/sf, 25/in, 25/pi, 25/cii, 25/cp, 26/uo, 26/tti, 26/pc, 26/ts, 27/cm and here.
@@ -461,7 +461,7 @@ noun for it; for example, the "announcing activity".
The function Activities::add_variable is used in 9/ma (§3.3.25.1).
-The function Activities::activity_var_creators is used in 1/mr (§4.14).
+The function Activities::activity_var_creators is used in 1/mr (§4.15).
@@ -907,15 +907,15 @@ values, of the kind to which the activity applies.
The function Activities::emit_activity_list is used in 22/prcd (§10.5).
-The function Activities::compile_activity_constants is used in 1/mr (§4.14).
+The function Activities::compile_activity_constants is used in 1/mr (§4.15).
-The function Activities::Activity_before_rulebooks_array is used in 1/mr (§4.14).
+The function Activities::Activity_before_rulebooks_array is used in 1/mr (§4.15).
-The function Activities::Activity_for_rulebooks_array is used in 1/mr (§4.14).
+The function Activities::Activity_for_rulebooks_array is used in 1/mr (§4.15).
-The function Activities::Activity_after_rulebooks_array is used in 1/mr (§4.14).
+The function Activities::Activity_after_rulebooks_array is used in 1/mr (§4.15).
-The function Activities::Activity_atb_rulebooks_array is used in 1/mr (§4.14).
+The function Activities::Activity_atb_rulebooks_array is used in 1/mr (§4.15).
The function Activities::annotate_list_for_cross_references is used in 22/prcd (§10.5).
diff --git a/docs/core-module/21-fao.html b/docs/core-module/21-fao.html
index fadbe90fb..6bf6f703f 100644
--- a/docs/core-module/21-fao.html
+++ b/docs/core-module/21-fao.html
@@ -117,7 +117,7 @@ its outcomes.
-The structure named_rulebook_outcome is accessed in 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/rv, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
+The structure named_rulebook_outcome is accessed in 1/kts, 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/rv, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
The structure rulebook_outcome is accessed in 3/pd, 5/lp, 5/ut, 5/un, 5/ins, 6/rlt, 6/nv, 7/ss, 7/hdn, 7/ns, 7/oaf, 7/rs, 8/ie, 8/ec, 8/ed, 9/tfa, 9/tbath, 9/rpt, 9/tc, 9/ma, 9/rk, 9/ass, 9/imp, 9/pd, 10/teav, 10/cap, 11/ap, 11/pr, 11/bas, 11/tc, 11/sm, 12/dtd, 12/cdp, 14/rv, 14/lv, 14/cn, 14/ds, 14/ds2, 15/cp, 16/is, 16/in, 19/tb, 19/rsft, 19/tod, 20/eq, 21/rl, 21/rl2, 21/rps, 21/sv, 21/ac, 22/ph, 22/tp, 22/tp2, 23/ad, 24/lv, 24/sf, 25/in, 25/pi, 25/cii, 25/cp, 26/uo, 26/tti, 26/pc, 26/ts, 27/cm and here.
@@ -608,7 +608,7 @@ can be used in a void context as a sort of return-from-rule phrase.
The function Rulebooks::Outcomes::index_outcomes is used in 21/rl2 (§15).
-The function Rulebooks::Outcomes::RulebookOutcomePrintingRule is used in 1/mr (§4.13).
+The function Rulebooks::Outcomes::RulebookOutcomePrintingRule is used in 1/mr (§4.14).
The function Rulebooks::Outcomes::get_default_value is used in 13/rsfk (§5).
diff --git a/docs/core-module/21-rl.html b/docs/core-module/21-rl.html
index 88cf4f72b..93b0f6439 100644
--- a/docs/core-module/21-rl.html
+++ b/docs/core-module/21-rl.html
@@ -85,7 +85,7 @@ see below.
-The structure rule is accessed in 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/prcd, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
+The structure rule is accessed in 1/kts, 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/prcd, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
@@ -275,8 +275,10 @@ kind is considered to be action-based and resulting in nothing.
kind *Rules::to_kind(rule *R) {
kind *K = R->kind_of_rule;
if (K == NULL) {
- if (basic_mode) K = Kinds::binary_construction(CON_rule, K_nil, K_nil);
- else K = Kinds::binary_construction(CON_rule, K_action_name, K_nil);
+ if (Plugins::Manage::plugged_in(actions_plugin))
+ K = Kinds::binary_construction(CON_rule, K_action_name, K_nil);
+ else
+ K = Kinds::binary_construction(CON_rule, K_nil, K_nil);
}
return K;
}
@@ -1371,7 +1373,7 @@ I wonder how useful this really is, but it was much requested at one time.
The function Rules::rule_defines_response is used in 17/ts (§11), 17/rs (§4, §7.1, §7.3.1, §12.1.1).
- The function Rules::check_response_usages is used in 1/mr (§4.14).
+ The function Rules::check_response_usages is used in 1/mr (§4.15).
The function Rules::now_rule_defines_response is used in 17/rs (§12.1.1), 26/tti (§7).
diff --git a/docs/core-module/21-rl2.html b/docs/core-module/21-rl2.html
index d8e397f5e..b156c5e41 100644
--- a/docs/core-module/21-rl2.html
+++ b/docs/core-module/21-rl2.html
@@ -673,7 +673,7 @@ built (for instance, scene endings).
The function Rulebooks::get_stv_creator_iname is used in §14.1.
-The function Rulebooks::rulebook_var_creators is used in 1/mr (§4.14).
+The function Rulebooks::rulebook_var_creators is used in 1/mr (§4.15).
§14.1.
<Make slow lookup routine 14.1> =
diff --git a/docs/core-module/21-sv.html b/docs/core-module/21-sv.html
index 1f40cee82..ecc7bef89 100644
--- a/docs/core-module/21-sv.html
+++ b/docs/core-module/21-sv.html
@@ -50,7 +50,7 @@
-The structure stacked_variable is accessed in 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
+The structure stacked_variable is accessed in 1/kts, 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
The structure stacked_variable_list is accessed in 3/pd, 5/lp, 5/ut, 5/un, 5/ins, 6/rlt, 6/nv, 7/ss, 7/hdn, 7/ns, 7/oaf, 7/rs, 8/ie, 8/ec, 8/ed, 9/tfa, 9/tbath, 9/rpt, 9/tc, 9/ma, 9/rk, 9/ass, 9/imp, 9/pd, 10/teav, 10/cap, 11/ap, 11/pr, 11/bas, 11/tc, 11/sm, 12/dtd, 12/cdp, 14/rv, 14/lv, 14/cn, 14/ds, 14/ds2, 15/cp, 16/is, 16/in, 19/tb, 19/rsft, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/ac, 22/ph, 22/tp, 22/tp2, 23/ad, 24/lv, 24/sf, 25/in, 25/pi, 25/cii, 25/cp, 26/uo, 26/tti, 26/pc, 26/ts, 27/cm and here.
diff --git a/docs/core-module/22-cs.html b/docs/core-module/22-cs.html
index 2f5b64777..72bc9621d 100644
--- a/docs/core-module/22-cs.html
+++ b/docs/core-module/22-cs.html
@@ -89,7 +89,7 @@ name of a new constant.
-The function Phrases::Manager::traverse_for_names is used in 1/mr (§4.9).
+The function Phrases::Manager::traverse_for_names is used in 1/mr (§4.10).
The function Phrases::Manager::visit_for_names appears nowhere else.
@@ -200,7 +200,7 @@ placement later on.
-The function Phrases::Manager::traverse is used in 1/mr (§4.13).
+The function Phrases::Manager::traverse is used in 1/mr (§4.14).
The function Phrases::Manager::visit_to_count appears nowhere else.
@@ -227,7 +227,7 @@ counting local variables, whose names only exist fleetingly).
-The function Phrases::Manager::register_meanings is used in 1/mr (§4.13).
+The function Phrases::Manager::register_meanings is used in 1/mr (§4.14).
§6. Noon. When the final phrase is registered, the hour chimes. From this point
onwards, there's no longer any text which can't be parsed because some
@@ -276,7 +276,7 @@ correctly refer to the most recently mentioned action.
-The function Phrases::Manager::parse_rule_parameters is used in 1/mr (§4.13).
+The function Phrases::Manager::parse_rule_parameters is used in 1/mr (§4.14).
§8. We can finally make the automatic placements of rules into rulebooks: so
our "fire alarm rule" will at last be placed in the "Instead" rulebook. The
@@ -296,7 +296,7 @@ PHRCDs are used to make sure it appears in the right position.
-The function Phrases::Manager::add_rules_to_rulebooks is used in 1/mr (§4.13).
+The function Phrases::Manager::add_rules_to_rulebooks is used in 1/mr (§4.14).
§9. It might seem as if the rulebooks are now complete, but this is not true,
because we still have to take care of manual placements like:
@@ -333,7 +333,7 @@ only conditionally, or substituted by other rules.
-The function Phrases::Manager::parse_rule_placements is used in 1/mr (§4.13).
+The function Phrases::Manager::parse_rule_placements is used in 1/mr (§4.14).
The function Phrases::Manager::visit_to_parse_placements appears nowhere else.
@@ -363,7 +363,7 @@ adjective definitions.
-The function Phrases::Manager::compile_first_block is used in 1/mr (§4.14).
+The function Phrases::Manager::compile_first_block is used in 1/mr (§4.15).
§10.1.
<Count up the scale of the task 10.1> =
@@ -549,8 +549,7 @@ points", say). This is where we do it:
§11. Late Afternoon. Rules are pretty well sorted out now, but we still need to compile some I6
to show how they fit together. These miscellaneous function calls can happen
-in any order, as suits the needs of the Main.i6t
script, so long as they
-all occur in the late afternoon.
+in any order, so long as they all occur in the late afternoon.
First, rules set to go off at a particular time need to have their timings
@@ -599,11 +598,11 @@ noted down:
-The function Phrases::Manager::rulebooks_array is used in 1/mr (§4.14).
+The function Phrases::Manager::rulebooks_array is used in 1/mr (§4.15).
-The function Phrases::Manager::compile_rulebooks is used in 1/mr (§4.14).
+The function Phrases::Manager::compile_rulebooks is used in 1/mr (§4.15).
-The function Phrases::Manager::RulebookNames_array is used in 1/mr (§4.14).
+The function Phrases::Manager::RulebookNames_array is used in 1/mr (§4.15).
§13. And finally, just as the sun slips below the horizon, we compile the code
which prints out values of the kind "rule" at run-time — for example, taking
@@ -621,7 +620,7 @@ printing out "fire alarm rule".
-The function Phrases::Manager::RulePrintingRule_routine is used in 1/mr (§4.14).
+The function Phrases::Manager::RulePrintingRule_routine is used in 1/mr (§4.15).
§14. Evening. The twilight gathers, but our work is far from done. Recall that we have
accumulated compilation requests for "To..." phrases, but haven't actually
@@ -693,7 +692,7 @@ can be called multiple times in the course of the evening.)
-The function Phrases::Manager::compile_as_needed is used in 1/mr (§4.14).
+The function Phrases::Manager::compile_as_needed is used in 1/mr (§4.15).
diff --git a/docs/core-module/22-pav.html b/docs/core-module/22-pav.html
index aef93007a..e0d33b683 100644
--- a/docs/core-module/22-pav.html
+++ b/docs/core-module/22-pav.html
@@ -41,7 +41,7 @@ own right, a functional-programming sort of device. For example:
-The structure constant_phrase is accessed in 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 25/cii, 26/uo, 26/ts and here.
+The structure constant_phrase is accessed in 1/kts, 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 25/cii, 26/uo, 26/ts and here.
§3. Here we create a new named phrase ("doubling", say):
@@ -188,7 +188,7 @@ an I6 routine name, but no: it compiles to a small array called a "closure".
-The function Phrases::Constants::compile_closures is used in 1/mr (§4.14).
+The function Phrases::Constants::compile_closures is used in 1/mr (§4.15).
§8.1. The closure array consists of three words: the strong kind ID, the address
of the routine, and the text of the name. (The latter enables us to print
diff --git a/docs/core-module/22-ph.html b/docs/core-module/22-ph.html
index fb624670c..a3ae635b2 100644
--- a/docs/core-module/22-ph.html
+++ b/docs/core-module/22-ph.html
@@ -693,7 +693,7 @@ response to "requests". All other phrases are compiled just once.
-The function Phrases::invoke_to_begin is used in 1/mr (§4.14).
+The function Phrases::invoke_to_begin is used in 1/mr (§4.15).
diff --git a/docs/core-module/22-po.html b/docs/core-module/22-po.html
index d2e88dab7..b14ad33fd 100644
--- a/docs/core-module/22-po.html
+++ b/docs/core-module/22-po.html
@@ -59,7 +59,7 @@ valid as values, since a condition is not also a value in Inform 7.
-The structure phrase_option is accessed in 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/pav, 25/cii, 26/uo, 26/ts and here.
+The structure phrase_option is accessed in 1/kts, 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/pav, 25/cii, 26/uo, 26/ts and here.
§4. Creation. By default, a phrase has no options.
diff --git a/docs/core-module/22-pu.html b/docs/core-module/22-pu.html
index 04b90dddd..1ad21c557 100644
--- a/docs/core-module/22-pu.html
+++ b/docs/core-module/22-pu.html
@@ -464,7 +464,7 @@ effects — see below.)
"the idea is to create new relations.)");
}
}
- if ((basic_mode) && (<begin-phrase-preamble>(W))) {
+ if (<begin-phrase-preamble>(W)) {
phud.to_begin = TRUE;
}
diff --git a/docs/core-module/22-tp2.html b/docs/core-module/22-tp2.html
index be1d72d58..1e1b3cce0 100644
--- a/docs/core-module/22-tp2.html
+++ b/docs/core-module/22-tp2.html
@@ -91,9 +91,9 @@ defined as "At 9:00 AM: ..." But two values are special:
-The function Phrases::Timed::TimedEventsTable is used in 1/mr (§4.14), 22/cs (§11).
+The function Phrases::Timed::TimedEventsTable is used in 1/mr (§4.15), 22/cs (§11).
-The function Phrases::Timed::TimedEventTimesTable is used in 1/mr (§4.14), 22/cs (§11).
+The function Phrases::Timed::TimedEventTimesTable is used in 1/mr (§4.15), 22/cs (§11).
§5. That's it, really: everything else is just indexing.
@@ -144,7 +144,7 @@ arguably shouldn't block compilation. Then again...
-The function Phrases::Timed::check_for_unused is used in 1/mr (§4.14).
+The function Phrases::Timed::check_for_unused is used in 1/mr (§4.15).
§7. And here's the actual index segment.
diff --git a/docs/core-module/23-ad.html b/docs/core-module/23-ad.html
index 8a39c33bf..c59359982 100644
--- a/docs/core-module/23-ad.html
+++ b/docs/core-module/23-ad.html
@@ -182,7 +182,7 @@ the doubled use of colons is unfortunate.)
-The function Phrases::Adjectives::traverse is used in 1/mr (§4.9).
+The function Phrases::Adjectives::traverse is used in 1/mr (§4.10).
The function Phrases::Adjectives::look_for_headers appears nowhere else.
diff --git a/docs/core-module/24-ch.html b/docs/core-module/24-ch.html
index d04b4eb10..7c341b734 100644
--- a/docs/core-module/24-ch.html
+++ b/docs/core-module/24-ch.html
@@ -325,7 +325,7 @@ late to create any further past tense references, so:
-The function Chronology::allow_no_further_past_tenses is used in 1/mr (§4.14).
+The function Chronology::allow_no_further_past_tenses is used in 1/mr (§4.15).
§6. The {-A}
("past actions") escape.
A series of if
statements checking whether each past-tense action is now
@@ -404,7 +404,7 @@ ever tampered with.
-The function Chronology::past_actions_i6_routines is used in 1/mr (§4.14).
+The function Chronology::past_actions_i6_routines is used in 1/mr (§4.15).
@@ -454,7 +454,7 @@ ever tampered with.
-The function Chronology::past_tenses_i6_escape is used in 1/mr (§4.14).
+The function Chronology::past_tenses_i6_escape is used in 1/mr (§4.15).
§7.1.
<Unpack the past 7.1> =
@@ -931,7 +931,7 @@ times".
-The function Chronology::chronology_extents_i6_escape is used in 1/mr (§4.14).
+The function Chronology::chronology_extents_i6_escape is used in 1/mr (§4.15).
- Back to 'Stack Frames'
- (This section ends Chapter 24: Compilation Context.)
diff --git a/docs/core-module/26-iti.html b/docs/core-module/26-iti.html
index 455560994..3f1a5f95d 100644
--- a/docs/core-module/26-iti.html
+++ b/docs/core-module/26-iti.html
@@ -51,8 +51,8 @@ and +)
Inform 7 escape
- void I6T::interpret_kindt(text_stream *segment_name) {
- I6T::interpreter_shared(KINDT_MODE, NULL, NULL, segment_name, -1, NULL);
+ void I6T::interpret_kindt(filename *segment_file) {
+ I6T::interpreter_shared(KINDT_MODE, NULL, NULL, NULL, -1, segment_file);
}
void I6T::interpret_indext(filename *indext_file) {
@@ -67,9 +67,9 @@ and +)
Inform 7 escape
-The function I6T::interpret_kindt is used in 26/pl (§13).
+The function I6T::interpret_kindt is used in 1/kts (§1).
-The function I6T::interpret_indext is used in 1/mr (§4.16).
+The function I6T::interpret_indext is used in 1/mr (§4.17).
The function I6T::interpret_i6t is used in 26/i6i (§7, §8), 26/uo (§17).
@@ -170,6 +170,7 @@ file.
} else if (index_template) {
Input_File = Filenames::fopen(index_template, "r");
if (Input_File == NULL) {
+ LOG("Filename was %f\n", index_template);
Problems::Issue::unlocated_problem(_p_(BelievedImpossible), or anyway not usefully testable
"I couldn't open the template file for the index.");
}
diff --git a/docs/core-module/26-jl.html b/docs/core-module/26-jl.html
index 1c3ee9b96..91eeef77b 100644
--- a/docs/core-module/26-jl.html
+++ b/docs/core-module/26-jl.html
@@ -181,7 +181,7 @@ specification --> 0
The function JumpLabels::allocate_counter is used in 25/cii (§3.4.6).
-The function JumpLabels::compile_necessary_storage is used in 1/mr (§4.14).
+The function JumpLabels::compile_necessary_storage is used in 1/mr (§4.15).
diff --git a/docs/core-module/26-pl.html b/docs/core-module/26-pl.html
index e5a2d4a42..74b16fb23 100644
--- a/docs/core-module/26-pl.html
+++ b/docs/core-module/26-pl.html
@@ -31,9 +31,6 @@
void *starter_routine;
int now_plugged_in;
int stores_data;
- int has_been_set_explicitly;
- char *has_template_file;
- struct inter_name *IFDEF_iname;
MEMORY_MANAGEMENT
} plugin;
@@ -53,7 +50,7 @@
*devices_plugin, *showme_plugin,
*times_plugin, *scenes_plugin, *scoring_plugin,
*figures_plugin, *sounds_plugin, *files_plugin,
- *bibliographic_plugin;
+ *bibliographic_plugin, *chronology_plugin;
plugin *registered_plugins[MAX_PLUGINS];
@@ -108,7 +105,8 @@ the rest — using it uses all of them.
sounds |
glulx external files |
bibliographic data |
- scoring
+ scoring |
+ chronology
@@ -152,9 +150,17 @@ present.
P->plugin_number = NA;
P->set_name = Plugins::Manage::wording(NA2);
P->set_number = NA2;
- P->has_template_file = NULL;
- P->IFDEF_iname = NULL;
- P->has_been_set_explicitly = FALSE;
+ registered_plugins[NA] = P;
+ if (P->allocation_id >= MAX_PLUGINS) internal_error("Too many plugins");
+ define CREATE_STARTLESS_PLUGIN(P, mem, NA, NA2)
+ P = CREATE(plugin);
+ P->starter_routine = NULL;
+ P->now_plugged_in = FALSE;
+ P->stores_data = mem;
+ P->plugin_name = Plugins::Manage::wording(NA);
+ P->plugin_number = NA;
+ P->set_name = Plugins::Manage::wording(NA2);
+ P->set_number = NA2;
registered_plugins[NA] = P;
if (P->allocation_id >= MAX_PLUGINS) internal_error("Too many plugins");
@@ -184,32 +190,23 @@ present.
enum GLULX_EXTERNAL_FILES_PLUGIN_NAME
enum BIBLIOGRAPHIC_DATA_PLUGIN_NAME
enum SCORE_PLUGIN_NAME
+ enum CHRONOLOGY_PLUGIN_NAME
void Plugins::Manage::start(void) {
Plugins::Call::initialise_calls();
- CREATE_PLUGIN(core_plugin, Plugins::Manage::start_core, FALSE, CORE_PLUGIN_NAME, CORE_PLUGIN_NAME);
- core_plugin->now_plugged_in = TRUE;
- core_plugin->has_template_file = "Core";
+ CREATE_STARTLESS_PLUGIN(core_plugin, FALSE, CORE_PLUGIN_NAME, CORE_PLUGIN_NAME);
+ CREATE_STARTLESS_PLUGIN(IF_plugin, FALSE, IF_PLUGIN_NAME, IF_PLUGIN_NAME);
+ CREATE_STARTLESS_PLUGIN(multimedia_plugin, FALSE, MULTIMEDIA_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
+
CREATE_PLUGIN(counting_plugin, PL::Counting::start, TRUE, INSTANCE_COUNTING_PLUGIN_NAME, CORE_PLUGIN_NAME);
- counting_plugin->now_plugged_in = TRUE;
-
- CREATE_PLUGIN(IF_plugin, Plugins::Manage::deactivated_start, FALSE, IF_PLUGIN_NAME, IF_PLUGIN_NAME);
-
- CREATE_PLUGIN(multimedia_plugin, Plugins::Manage::deactivated_start, FALSE, MULTIMEDIA_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
-
- #ifndef IF_MODULE
- IF_plugin->now_plugged_in = FALSE;
- #endif
#ifdef IF_MODULE
- IF_plugin->now_plugged_in = TRUE;
- CREATE_PLUGIN(naming_plugin, PL::Naming::start, FALSE, NAMING_PLUGIN_NAME, IF_PLUGIN_NAME);
- CREATE_PLUGIN(parsing_plugin, PL::Parsing::Visibility::start, FALSE, COMMAND_PLUGIN_NAME, IF_PLUGIN_NAME);
+ CREATE_PLUGIN(naming_plugin, PL::Naming::start, FALSE, NAMING_PLUGIN_NAME, CORE_PLUGIN_NAME);
+ CREATE_PLUGIN(parsing_plugin, PL::Parsing::Visibility::start, FALSE, COMMAND_PLUGIN_NAME, COMMAND_PLUGIN_NAME);
CREATE_PLUGIN(actions_plugin, PL::Actions::start, FALSE, ACTIONS_PLUGIN_NAME, IF_PLUGIN_NAME);
- actions_plugin->has_template_file = "Actions";
CREATE_PLUGIN(spatial_plugin, PL::Spatial::start, TRUE, SPATIAL_MODEL_PLUGIN_NAME, IF_PLUGIN_NAME);
CREATE_PLUGIN(map_plugin, PL::Map::start, FALSE, MAPPING_PLUGIN_NAME, IF_PLUGIN_NAME);
CREATE_PLUGIN(persons_plugin, PL::Persons::start, FALSE, PERSONS_PLUGIN_NAME, IF_PLUGIN_NAME);
@@ -219,50 +216,30 @@ present.
CREATE_PLUGIN(backdrops_plugin, PL::Backdrops::start, FALSE, BACKDROPS_PLUGIN_NAME, IF_PLUGIN_NAME);
CREATE_PLUGIN(devices_plugin, PL::Devices::start, FALSE, DEVICES_PLUGIN_NAME, IF_PLUGIN_NAME);
CREATE_PLUGIN(showme_plugin, PL::Showme::start, FALSE, SHOWME_PLUGIN_NAME, IF_PLUGIN_NAME);
-
CREATE_PLUGIN(times_plugin, PL::TimesOfDay::start, FALSE, TIMES_OF_DAY_PLUGIN_NAME, IF_PLUGIN_NAME);
- times_plugin->has_template_file = "Times";
CREATE_PLUGIN(scenes_plugin, PL::Scenes::start, FALSE, SCENES_PLUGIN_NAME, IF_PLUGIN_NAME);
- scenes_plugin->has_template_file = "Scenes";
CREATE_PLUGIN(bibliographic_plugin, PL::Bibliographic::start, FALSE, BIBLIOGRAPHIC_DATA_PLUGIN_NAME, IF_PLUGIN_NAME);
#endif
+ CREATE_STARTLESS_PLUGIN(chronology_plugin, FALSE, CHRONOLOGY_PLUGIN_NAME, IF_PLUGIN_NAME);
#ifdef MULTIMEDIA_MODULE
- multimedia_plugin->now_plugged_in = TRUE;
-
CREATE_PLUGIN(figures_plugin, PL::Figures::start, FALSE, FIGURES_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
- figures_plugin->has_template_file = "Figures";
-
CREATE_PLUGIN(sounds_plugin, PL::Sounds::start, FALSE, SOUNDS_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
- sounds_plugin->has_template_file = "Sounds";
-
CREATE_PLUGIN(files_plugin, PL::Files::start, FALSE, GLULX_EXTERNAL_FILES_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
- files_plugin->has_template_file = "Files";
#endif
#ifndef MULTIMEDIA_MODULE
- multimedia_plugin->now_plugged_in = FALSE;
- CREATE_PLUGIN(figures_plugin, Plugins::Manage::deactivated_start, FALSE, FIGURES_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
- CREATE_PLUGIN(sounds_plugin, Plugins::Manage::deactivated_start, FALSE, SOUNDS_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
- CREATE_PLUGIN(files_plugin, Plugins::Manage::deactivated_start, FALSE, GLULX_EXTERNAL_FILES_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
+ CREATE_STARTLESS_PLUGIN(figures_plugin, FALSE, FIGURES_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
+ CREATE_STARTLESS_PLUGIN(sounds_plugin, FALSE, SOUNDS_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
+ CREATE_STARTLESS_PLUGIN(files_plugin, FALSE, GLULX_EXTERNAL_FILES_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
#endif
}
-
- void Plugins::Manage::deactivated_start(void) {
- }
-
- void Plugins::Manage::start_core(void) {
- }
The function Plugins::Manage::start is used in 1/mr (§4.7).
-The function Plugins::Manage::deactivated_start appears nowhere else.
-
-The function Plugins::Manage::start_core appears nowhere else.
-
§9. Although most of Inform's brain remains the same, the outermost part can
be put together from whatever skills are required: our modular oblongata,
if you will. So, in principle, sentences like:
@@ -298,96 +275,68 @@ combinations; so this is really a provisional feature for now.)
with the following.
-
-
- <use-language-element-sentence-subject> ::=
- no <plugin-name> | ==> PLUGIN_REMOVAL_OFFSET + R[1]
- <plugin-name> | ==> R[1]
- ... ==> <Issue PM_NoSuchLanguageElement problem 9.1>
-
-
-
-
-§9.1.
-<Issue PM_NoSuchLanguageElement problem 9.1> =
-
-
-
-
- *X = -1;
- Problems::Issue::sentence_problem(_p_(PM_NoSuchLanguageElement),
- "this seems to ask to include or exclude a language feature which "
- "I don't recognise the name of",
- "possibly because you've borrowed it from a different version of "
- "Inform, or forgotten what these are called? You can see the current "
- "configuration at the bottom of the Contents index.");
-
-
-
-
-This code is used in §9.
-
-
- define PLUGIN_REMOVAL_OFFSET MAX_PLUGINS+1
-
-
- void Plugins::Manage::plug_in(wording W) {
+ int Plugins::Manage::parse(text_stream *S) {
+ if (Str::eq(S, I"core")) return CORE_PLUGIN_NAME;
+ if (Str::eq(S, I"instance counting")) return INSTANCE_COUNTING_PLUGIN_NAME;
+ if (Str::eq(S, I"interactive fiction")) return IF_PLUGIN_NAME;
+ if (Str::eq(S, I"multimedia")) return MULTIMEDIA_PLUGIN_NAME;
+ if (Str::eq(S, I"naming")) return NAMING_PLUGIN_NAME;
+ if (Str::eq(S, I"command")) return COMMAND_PLUGIN_NAME;
+ if (Str::eq(S, I"actions")) return ACTIONS_PLUGIN_NAME;
+ if (Str::eq(S, I"spatial model")) return SPATIAL_MODEL_PLUGIN_NAME;
+ if (Str::eq(S, I"mapping")) return MAPPING_PLUGIN_NAME;
+ if (Str::eq(S, I"persons")) return PERSONS_PLUGIN_NAME;
+ if (Str::eq(S, I"player")) return PLAYER_PLUGIN_NAME;
+ if (Str::eq(S, I"regions")) return REGIONS_PLUGIN_NAME;
+ if (Str::eq(S, I"backdrops")) return BACKDROPS_PLUGIN_NAME;
+ if (Str::eq(S, I"devices")) return DEVICES_PLUGIN_NAME;
+ if (Str::eq(S, I"showme")) return SHOWME_PLUGIN_NAME;
+ if (Str::eq(S, I"times of day")) return TIMES_OF_DAY_PLUGIN_NAME;
+ if (Str::eq(S, I"scenes")) return SCENES_PLUGIN_NAME;
+ if (Str::eq(S, I"figures")) return FIGURES_PLUGIN_NAME;
+ if (Str::eq(S, I"sounds")) return SOUNDS_PLUGIN_NAME;
+ if (Str::eq(S, I"glulx external files")) return GLULX_EXTERNAL_FILES_PLUGIN_NAME;
+ if (Str::eq(S, I"bibliographic data")) return BIBLIOGRAPHIC_DATA_PLUGIN_NAME;
+ if (Str::eq(S, I"scoring")) return SCORE_PLUGIN_NAME;
+ return -1;
+ }
+
+ void Plugins::Manage::activate(int N) {
+ if (N < 0) return;
plugin *P;
- if (<use-language-element-sentence-subject>(W)) {
- int plugin_number = <<r>>;
- int new_state = TRUE;
- if (plugin_number >= PLUGIN_REMOVAL_OFFSET) {
- new_state = FALSE;
- plugin_number -= PLUGIN_REMOVAL_OFFSET;
- }
- LOOP_OVER(P, plugin) {
- int definiteness = UNKNOWN_CE;
- if (P->plugin_number == plugin_number) definiteness = CERTAIN_CE;
- if (P->set_number == plugin_number) definiteness = LIKELY_CE;
- if (definiteness != UNKNOWN_CE) {
- if ((definiteness == LIKELY_CE) && (P->has_been_set_explicitly)) continue;
- if (P == core_plugin) {
- if (new_state == FALSE) <Issue problem for trying to remove the core 10.1>;
- plugin *Q;
- LOOP_OVER(Q, plugin) Q->now_plugged_in = FALSE;
- }
- P->now_plugged_in = new_state;
- P->has_been_set_explicitly = TRUE;
- }
- }
- }
+ LOOP_OVER(P, plugin)
+ if ((P->set_number == N) || (P->plugin_number == N))
+ P->now_plugged_in = TRUE;
#ifndef IF_MODULE
- LOOP_OVER(P, plugin)
- if (P->set_number == IF_PLUGIN_NAME)
- P->now_plugged_in = FALSE;
+ Plugins::Manage::deactivate(IF_PLUGIN_NAME)
#endif
- if (basic_mode) {
- LOOP_OVER(P, plugin)
- if ((P->set_number == IF_PLUGIN_NAME) &&
- (P->plugin_number != NAMING_PLUGIN_NAME))
- P->now_plugged_in = FALSE;
- }
#ifndef MULTIMEDIA_MODULE
- LOOP_OVER(P, plugin)
- if (P->set_number == MULTIMEDIA_PLUGIN_NAME)
- P->now_plugged_in = FALSE;
+ Plugins::Manage::deactivate(MULTIMEDIA_PLUGIN_NAME)
#endif
- if (basic_mode) {
- LOOP_OVER(P, plugin)
- if ((P->set_number == MULTIMEDIA_PLUGIN_NAME) &&
- (P->plugin_number != GLULX_EXTERNAL_FILES_PLUGIN_NAME))
- P->now_plugged_in = FALSE;
- }
+ }
+
+ void Plugins::Manage::deactivate(int N) {
+ if (N < 0) return;
+ plugin *P;
+ LOOP_OVER(P, plugin)
+ if ((P->set_number == N) || (P->plugin_number == N)) {
+ if (P->set_number == CORE_PLUGIN_NAME) <Issue problem for trying to remove the core 10.1>
+ else P->now_plugged_in = FALSE;
+ }
}
-The function Plugins::Manage::plug_in is used in 7/ss (§5).
+The function Plugins::Manage::parse is used in 1/kts (§1).
+
+The function Plugins::Manage::activate is used in 1/kts (§1).
+
+The function Plugins::Manage::deactivate is used in 1/kts (§1).
§10.1.
<Issue problem for trying to remove the core 10.1> =
@@ -395,7 +344,7 @@ with the following.
- Problems::Issue::sentence_problem(_p_(PM_DontRemoveTheCore),
+ Problems::Issue::sentence_problem(_p_(Untestable),
"the core of the Inform language cannot be removed",
"because then what should we do? What should we ever do?");
return;
@@ -405,11 +354,20 @@ with the following.
This code is used in §10.
-§11. And, we're as good as our word because —
+
§11. It's kind of incredible that C's grammar for round brackets is unambiguous.
+ void Plugins::Manage::start_plugins(void) {
+ plugin *P;
+ LOOP_OVER(P, plugin)
+ if (P->now_plugged_in) {
+ void (*start)() = (void (*)()) P->starter_routine;
+ if (start) (*start)();
+ }
+ }
+
void Plugins::Manage::show_configuration(OUTPUT_STREAM) {
HTML_OPEN("p");
Index::anchor(OUT, I"CONFIG");
@@ -431,50 +389,6 @@ with the following.
if (c == 0) WRITE("<i>none</i>");
WRITE(".\n");
}
-
-
-
-
-The function Plugins::Manage::show_configuration is used in 26/vm (§19).
-
-The function Plugins::Manage::show appears nowhere else.
-
-
-
-
-
- void Plugins::Manage::define_IFDEF_symbols(void) {
- plugin *P;
- LOOP_OVER(P, plugin)
- if ((P->now_plugged_in) && (P->IFDEF_iname)) {
- Emit::named_numeric_constant(P->IFDEF_iname, 0);
- }
- }
-
-
-
-
-The function Plugins::Manage::define_IFDEF_symbols is used in 1/mr (§4.14).
-
-
-
-
-
- void Plugins::Manage::load_types(void) {
- plugin *P;
- LOOP_OVER(P, plugin)
- if (P->now_plugged_in) {
- void (*start)() = (void (*)()) P->starter_routine;
- (*start)();
- if (P->has_template_file) {
- TEMPORARY_TEXT(segment_name);
- WRITE_TO(segment_name, "%s.kindt", P->has_template_file);
- I6T::interpret_kindt(segment_name);
- DISCARD_TEXT(segment_name);
- }
- }
- }
int Plugins::Manage::plugged_in(plugin *P) {
return P->now_plugged_in;
@@ -483,9 +397,13 @@ with the following.
-The function Plugins::Manage::load_types is used in 1/mr (§4.9).
+The function Plugins::Manage::start_plugins is used in 1/mr (§4.10).
-The function Plugins::Manage::plugged_in is used in 16/ic (§15).
+The function Plugins::Manage::show_configuration is used in 26/vm (§19).
+
+The function Plugins::Manage::show is used in 1/kts (§1).
+
+The function Plugins::Manage::plugged_in is used in 1/mr (§4.7, §4.17), 5/ipw (§2), 9/rpt (§9.5), 16/ic (§15), 21/rl (§8).
diff --git a/docs/core-module/26-ts.html b/docs/core-module/26-ts.html
index 2df7ed1f0..6480ab74a 100644
--- a/docs/core-module/26-ts.html
+++ b/docs/core-module/26-ts.html
@@ -43,7 +43,7 @@ attached.
-The structure test_scenario is accessed in 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 22/tp, 25/cii, 25/cp, 26/uo and here.
+The structure test_scenario is accessed in 1/kts, 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 22/tp, 25/cii, 25/cp, 26/uo and here.
@@ -531,11 +531,11 @@ without notice.
The function PL::Parsing::TestScripts::check_test_command is used in §8.1.
-The function PL::Parsing::TestScripts::write_text is used in 1/mr (§4.14).
+The function PL::Parsing::TestScripts::write_text is used in 1/mr (§4.15).
-The function PL::Parsing::TestScripts::TestScriptSub_stub_routine is used in 1/mr (§4.14).
+The function PL::Parsing::TestScripts::TestScriptSub_stub_routine is used in 1/mr (§4.15).
-The function PL::Parsing::TestScripts::TestScriptSub_routine is used in 1/mr (§4.14).
+The function PL::Parsing::TestScripts::TestScriptSub_routine is used in 1/mr (§4.15).
@@ -685,7 +685,7 @@ without notice.
The function PL::Parsing::TestScripts::new_internal is used in §9.
-The function PL::Parsing::TestScripts::InternalTestCases_routine is used in 1/mr (§4.14).
+The function PL::Parsing::TestScripts::InternalTestCases_routine is used in 1/mr (§4.15).
The function PL::Parsing::TestScripts::begin_internal_reporting is used in 20/eq (§52).
diff --git a/docs/core-module/26-uo.html b/docs/core-module/26-uo.html
index 7f58c3e2d..7aeb24b1b 100644
--- a/docs/core-module/26-uo.html
+++ b/docs/core-module/26-uo.html
@@ -55,7 +55,7 @@ set a use option applying only to itself.
-The structure use_option is accessed in 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/ts and here.
+The structure use_option is accessed in 1/kts, 2/sq, 2/si, 5/ins, 5/nv, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/ts and here.
§3. Five of the pragma-like settings are stored here:
@@ -603,7 +603,7 @@ and problem messages must be issued.)
-The function UseOptions::compile is used in 1/mr (§4.11).
+The function UseOptions::compile is used in 1/mr (§4.12).
§18. I6 memory settings need to be issued as ICL commands at the top of the I6
source code: see the DM4 for details.
@@ -628,7 +628,7 @@ source code: see the DM4 for details.
-The function UseOptions::compile_icl_commands is used in 1/mr (§4.14).
+The function UseOptions::compile_icl_commands is used in 1/mr (§4.15).
§19. Now for indexing, where there's nothing much to see.
@@ -793,7 +793,7 @@ one to test them, one to print them.
-The function UseOptions::TestUseOption_routine is used in 1/mr (§4.14).
+The function UseOptions::TestUseOption_routine is used in 1/mr (§4.15).
§21.1.
<Compile the TestUseOption routine 21.1> =
@@ -916,7 +916,7 @@ one to test them, one to print them.
The function UseOptions::ranking_table_given appears nowhere else.
-The function UseOptions::configure_template is used in 1/mr (§4.14).
+The function UseOptions::configure_template is used in 1/mr (§4.15).
diff --git a/docs/core-module/26-vm.html b/docs/core-module/26-vm.html
index fa85fd42b..ffd097c04 100644
--- a/docs/core-module/26-vm.html
+++ b/docs/core-module/26-vm.html
@@ -172,7 +172,7 @@ target VM are 16 or 32 bits wide:
-The function VirtualMachines::is_16_bit is used in §8, §20, §22, 1/mr (§4.15), 5/lp (§12.2, §18.3), 6/rlt (§14), 13/rsfk (§18.1, §20), 25/cii (§3.5.8.3).
+The function VirtualMachines::is_16_bit is used in §8, §20, §22, 1/mr (§4.16), 5/lp (§12.2, §18.3), 6/rlt (§14), 13/rsfk (§18.1, §20), 25/cii (§3.5.8.3).
@@ -272,9 +272,6 @@ value for each possible word size.
if ((this_is_a_release_compile == FALSE) || (this_is_a_debug_compile))
VirtualMachines::emit_fundamental_constant(DEBUG_HL, 1);
- if (basic_mode)
- VirtualMachines::emit_fundamental_constant(BASIC_MODE_HL, 1);
-
if (table_of_VM_data[target_VM].VM_code == Z_VM) {
VirtualMachines::emit_fundamental_constant(TARGET_ZCODE_HL, 1);
VirtualMachines::emit_fundamental_constant(DICT_WORD_SIZE_HL, 6);
@@ -336,7 +333,7 @@ Inform's own version number), but it belongs nowhere else either, so:
-The function VirtualMachines::compile_build_number is used in 1/mr (§4.14).
+The function VirtualMachines::compile_build_number is used in 1/mr (§4.15).
§11. The limits are different on each platform. On Z, the maximum is fixed
at 15, but Glulx allows it to be set with an I6 memory setting.
diff --git a/docs/core-module/27-cm.html b/docs/core-module/27-cm.html
index a26de5a32..066b40afb 100644
--- a/docs/core-module/27-cm.html
+++ b/docs/core-module/27-cm.html
@@ -95,7 +95,7 @@ level-0 headings, which are the nodes from which these blocks of source text han
-The function Modules::traverse_to_define is used in 1/mr (§4.9).
+The function Modules::traverse_to_define is used in 1/mr (§4.10).
The function Modules::look_for_cu appears nowhere else.
diff --git a/docs/core-module/27-ei.html b/docs/core-module/27-ei.html
index 256104379..bb39039da 100644
--- a/docs/core-module/27-ei.html
+++ b/docs/core-module/27-ei.html
@@ -87,7 +87,7 @@
-The function Emit::tree is used in §3, §4, 1/mr (§4.15), 4/am (§30, §34.2, §35, §43), 5/lp (§19, §19.1, §19.2, §19.3, §19.3.1, §19.3.1.1, §19.3.2, §19.2.1, §19.2.2, §27, §27.2, §27.3, §27.3.1, §27.3.2, §27.3.3, §27.3.4, §28), 5/un (§1), 5/ins (§29), 5/nv (§10, §12, §16, §25), 6/bp (§25, §33, §42), 6/rlt (§14, §15, §15.2, §15.2.1, §15.2.2, §15.2.3, §15.2.4, §15.2.5, §15.2.5.1, §15.2.6, §15.2.7, §15.2.8, §15.2.9, §15.2.10, §15.2.11, §15.2.12, §15.2.9.1, §15.2.10.1, §15.2.12.1, §17, §29, §29.1, §29.2, §29.3, §29.4, §29.5, §29.6, §30), 6/nv (§17, §18, §18.1, §18.2, §18.1.2, §18.1.2.1, §18.1.2.2, §19), 8/ef (§16, §19), 11/tr (§10), 12/is (§7, §7.3, §8), 12/ca (§5.2), 12/dtd (§7, §7.1, §7.1.1, §7.1.2, §8, §9, §9.1, §10, §11, §13, §15, §16, §17, §18, §19, §20, §22, §23, §25, §26, §27), 12/cad (§7), 12/cdp (§2.1.6, §2.1.6.1, §2.1.6.1.2.2, §2.1.6.1.2.3.2, §2.1.6.1.2.3.3, §2.1.6.1.2.3.5, §2.1.6.1.2.3.7, §2.1.6.1.2.4, §2.1.6.1.2.5, §2.1.6.1.2.3.3.1, §2.1.6.1.2.6, §2.1.6.1.2.2.1, §2.1.6.1.4, §2.1.6.1.2.2.2, §2.1.6.1.2.2.2.1, §2.1.6.1.6, §2.1.6.1.7, §2.1.6.1.8, §2.1.6.1.2.2.3, §2.1.6.1.9, §2.1.6.1.10, §2.1.6.1.2.2.4, §2.1.6.1.11, §2.1.6.1.2.2.5, §2.1.6.1.13, §2.1.6.1.14, §2.1.6.1.2.2.6, §2.1.6.1.2.2.6.1, §2.1.6.1.15, §2.1.6.1.17, §2.1.6.1.2.2.7, §2.1.6.1.18), 13/kak (§2), 13/ca (§1, §1.2, §1.3, §1.4, §1.5, §1.6, §1.7, §1.8, §1.9, §1.10, §1.11, §1.12, §1.13), 13/rsfk (§4, §5, §7, §9, §12, §16.3, §19, §24, §24.1, §24.2, §24.3, §24.4.1, §24.4.2, §24.5, §24.5.1, §24.6.1, §24.6.2, §24.6.3, §24.6.4, §24.6.5, §24.6.6, §25), 14/rv (§24.3), 14/lv (§14.1, §14.3, §14.3.2, §14.4, §14.5), 14/cn (§16, §16.1, §16.2, §16.3), 14/cfs (§7, §8), 15/pr (§21), 15/ma (§13), 15/epv (§4), 16/is (§29), 17/tl (§14.2), 17/ts (§8, §11, §11.1), 17/rs (§5, §6.1, §6.2, §7.2, §7.3, §12.1.1), 19/tc (§8), 19/rsft (§1.2, §2), 20/eq (§43, §48), 21/rl (§9, §11, §11.1, §11.2, §20, §20.1, §20.2, §21, §22.1), 21/rb (§22, §23, §24.1.1, §24.1.2, §24.1.3, §24.1.4, §24.1.5, §24.1.3.1), 21/rl2 (§14, §14.1, §20), 21/fao (§10), 21/sv (§3, §3.1, §3.2), 21/ac (§8, §14), 22/cs (§8), 22/ph (§13), 22/pu (§18), 22/prcd (§10, §10.2, §10.3, §10.4, §10.5, §10.1.1.1), 22/pav (§9.2), 22/tp (§8, §10), 22/tp2 (§4), 23/abc (§1), 24/lv (§10, §28, §29, §41, §43, §45, §47), 24/pb (§14, §17), 24/ch (§3, §3.1, §4, §6, §7, §7.1, §7.2, §7.3, §7.4, §7.4.1, §7.5, §8), 25/ci (§3, §3.2.3, §3.2.3.2, §3.2.3.1.1, §3.2.3.3, §3.2.3.6, §3.2.3.4.1, §3.2.3.3.1.2, §3.2.3.4.1.1, §3.2.3.3.1.2.1, §3.2.3.3.1.3, §4.2), 25/ciac (§2, §2.1), 25/cii (§1.2.1, §2, §3.1, §3.2.3, §3.2.4, §3.2.5, §3.2.6, §3.4.1, §3.4.2, §3.4.3, §3.1.1.4.7.1, §3.1.1.4.9, §3.1.1.4.10, §3.1.1.4.11, §3.5.1, §3.5.3, §3.5.8, §3.5.8.1, §3.5.8.2, §3.5.8.3, §3.5.9, §3.6.1, §3.6.2, §3.6.3, §8), 25/cp (§3.3.1, §5, §5.2.1, §5.3.4, §5.3.5, §5.3.5.1, §5.3.5.2, §5.3.5.3, §5.4.3, §5.4.4, §5.4.5, §6), 26/vm (§9, §10), 26/uo (§21.1, §21.2, §22), 26/lt (§4.1), 26/ct (§7), 26/rt (§3, §4, §4.1, §4.1.2, §4.1.3, §4.1.4, §4.1.5), 26/ts (§10, §11, §12), 27/hr (§4), 27/cm (§2).
+The function Emit::tree is used in §3, §4, 1/mr (§4.16), 4/am (§30, §34.2, §35, §43), 5/lp (§19, §19.1, §19.2, §19.3, §19.3.1, §19.3.1.1, §19.3.2, §19.2.1, §19.2.2, §27, §27.2, §27.3, §27.3.1, §27.3.2, §27.3.3, §27.3.4, §28), 5/un (§1), 5/ins (§29), 5/nv (§10, §12, §16, §25), 6/bp (§25, §33, §42), 6/rlt (§14, §15, §15.2, §15.2.1, §15.2.2, §15.2.3, §15.2.4, §15.2.5, §15.2.5.1, §15.2.6, §15.2.7, §15.2.8, §15.2.9, §15.2.10, §15.2.11, §15.2.12, §15.2.9.1, §15.2.10.1, §15.2.12.1, §17, §29, §29.1, §29.2, §29.3, §29.4, §29.5, §29.6, §30), 6/nv (§17, §18, §18.1, §18.2, §18.1.2, §18.1.2.1, §18.1.2.2, §19), 8/ef (§16, §19), 11/tr (§10), 12/is (§7, §7.3, §8), 12/ca (§5.2), 12/dtd (§7, §7.1, §7.1.1, §7.1.2, §8, §9, §9.1, §10, §11, §13, §15, §16, §17, §18, §19, §20, §22, §23, §25, §26, §27), 12/cad (§7), 12/cdp (§2.1.6, §2.1.6.1, §2.1.6.1.2.2, §2.1.6.1.2.3.2, §2.1.6.1.2.3.3, §2.1.6.1.2.3.5, §2.1.6.1.2.3.7, §2.1.6.1.2.4, §2.1.6.1.2.5, §2.1.6.1.2.3.3.1, §2.1.6.1.2.6, §2.1.6.1.2.2.1, §2.1.6.1.4, §2.1.6.1.2.2.2, §2.1.6.1.2.2.2.1, §2.1.6.1.6, §2.1.6.1.7, §2.1.6.1.8, §2.1.6.1.2.2.3, §2.1.6.1.9, §2.1.6.1.10, §2.1.6.1.2.2.4, §2.1.6.1.11, §2.1.6.1.2.2.5, §2.1.6.1.13, §2.1.6.1.14, §2.1.6.1.2.2.6, §2.1.6.1.2.2.6.1, §2.1.6.1.15, §2.1.6.1.17, §2.1.6.1.2.2.7, §2.1.6.1.18), 13/kak (§2), 13/ca (§1, §1.2, §1.3, §1.4, §1.5, §1.6, §1.7, §1.8, §1.9, §1.10, §1.11, §1.12, §1.13), 13/rsfk (§4, §5, §7, §9, §12, §16.3, §19, §24, §24.1, §24.2, §24.3, §24.4.1, §24.4.2, §24.5, §24.5.1, §24.6.1, §24.6.2, §24.6.3, §24.6.4, §24.6.5, §24.6.6, §25), 14/rv (§24.3), 14/lv (§14.1, §14.3, §14.3.2, §14.4, §14.5), 14/cn (§16, §16.1, §16.2, §16.3), 14/cfs (§7, §8), 15/pr (§21), 15/ma (§13), 15/epv (§4), 16/is (§29), 17/tl (§14.2), 17/ts (§8, §11, §11.1), 17/rs (§5, §6.1, §6.2, §7.2, §7.3, §12.1.1), 19/tc (§8), 19/rsft (§1.2, §2), 20/eq (§43, §48), 21/rl (§9, §11, §11.1, §11.2, §20, §20.1, §20.2, §21, §22.1), 21/rb (§22, §23, §24.1.1, §24.1.2, §24.1.3, §24.1.4, §24.1.5, §24.1.3.1), 21/rl2 (§14, §14.1, §20), 21/fao (§10), 21/sv (§3, §3.1, §3.2), 21/ac (§8, §14), 22/cs (§8), 22/ph (§13), 22/pu (§18), 22/prcd (§10, §10.2, §10.3, §10.4, §10.5, §10.1.1.1), 22/pav (§9.2), 22/tp (§8, §10), 22/tp2 (§4), 23/abc (§1), 24/lv (§10, §28, §29, §41, §43, §45, §47), 24/pb (§14, §17), 24/ch (§3, §3.1, §4, §6, §7, §7.1, §7.2, §7.3, §7.4, §7.4.1, §7.5, §8), 25/ci (§3, §3.2.3, §3.2.3.2, §3.2.3.1.1, §3.2.3.3, §3.2.3.6, §3.2.3.4.1, §3.2.3.3.1.2, §3.2.3.4.1.1, §3.2.3.3.1.2.1, §3.2.3.3.1.3, §4.2), 25/ciac (§2, §2.1), 25/cii (§1.2.1, §2, §3.1, §3.2.3, §3.2.4, §3.2.5, §3.2.6, §3.4.1, §3.4.2, §3.4.3, §3.1.1.4.7.1, §3.1.1.4.9, §3.1.1.4.10, §3.1.1.4.11, §3.5.1, §3.5.3, §3.5.8, §3.5.8.1, §3.5.8.2, §3.5.8.3, §3.5.9, §3.6.1, §3.6.2, §3.6.3, §8), 25/cp (§3.3.1, §5, §5.2.1, §5.3.4, §5.3.5, §5.3.5.1, §5.3.5.2, §5.3.5.3, §5.4.3, §5.4.4, §5.4.5, §6), 26/vm (§9, §10), 26/uo (§21.1, §21.2, §22), 26/lt (§4.1), 26/ct (§7), 26/rt (§3, §4, §4.1, §4.1.2, §4.1.3, §4.1.4, §4.1.5), 26/ts (§10, §11, §12), 27/hr (§4), 27/cm (§2).
The function Emit::begin is used in 1/mr (§4.7).
@@ -722,7 +722,7 @@ insert them into the Inter stream close to the top.
The function Emit::named_generic_constant appears nowhere else.
-The function Emit::named_numeric_constant is used in 6/rlt (§20.3), 13/kak (§5), 13/rsfk (§24), 21/ac (§6), 22/cs (§8), 24/ch (§8), 26/vm (§9), 26/uo (§21, §22), 26/pl (§12).
+The function Emit::named_numeric_constant is used in 6/rlt (§20.3), 13/kak (§5), 13/rsfk (§24), 21/ac (§6), 22/cs (§8), 24/ch (§8), 26/vm (§9), 26/uo (§21, §22).
The function Emit::hold_numeric_constant appears nowhere else.
diff --git a/docs/core-module/27-hr.html b/docs/core-module/27-hr.html
index 85c51b37c..a2dc656e3 100644
--- a/docs/core-module/27-hr.html
+++ b/docs/core-module/27-hr.html
@@ -81,7 +81,6 @@
enum CCOUNT_QUOTATIONS_HL
enum MAX_FRAME_SIZE_NEEDED_HL
enum RNG_SEED_AT_START_OF_PLAY_HL
- enum BASIC_MODE_HL
enum SUBMAIN_HL
§1.2.
@@ -122,9 +121,8 @@
HierarchyLocations::con(I, WORDSIZE_HL, I"WORDSIZE", Translation::same(), veneer);
HierarchyLocations::con(I, INDIV_PROP_START_HL, I"INDIV_PROP_START", Translation::same(), veneer);
- submodule_identity *basic_extras = Packaging::register_submodule(I"basic_extras");
+ submodule_identity *basic_extras = Packaging::register_submodule(I"BasicInformExtrasKit");
location_requirement generic_basic_extras = HierarchyLocations::generic_submodule(I, basic_extras);
- HierarchyLocations::con(I, BASIC_MODE_HL, I"BASIC_MODE", Translation::same(), generic_basic_extras);
HierarchyLocations::func(I, SUBMAIN_HL, I"Submain_fn", Translation::to(I"Submain"), generic_basic_extras);
@@ -1301,10 +1299,8 @@
location_requirement in_K_number = HierarchyLocations::this_exotic_package(K_NUMBER_XPACKAGE);
HierarchyLocations::func(I, DECIMAL_TOKEN_INNER_HL, I"gpr_fn", Translation::to(I"DECIMAL_TOKEN_INNER"), in_K_number);
- if (basic_mode == FALSE) {
- location_requirement in_K_time = HierarchyLocations::this_exotic_package(K_TIME_XPACKAGE);
- HierarchyLocations::func(I, TIME_TOKEN_INNER_HL, I"gpr_fn", Translation::to(I"TIME_TOKEN_INNER"), in_K_time);
- }
+ location_requirement in_K_time = HierarchyLocations::this_exotic_package(K_TIME_XPACKAGE);
+ HierarchyLocations::func(I, TIME_TOKEN_INNER_HL, I"gpr_fn", Translation::to(I"TIME_TOKEN_INNER"), in_K_time);
location_requirement in_K_truth_state = HierarchyLocations::this_exotic_package(K_TRUTH_STATE_XPACKAGE);
HierarchyLocations::func(I, TRUTH_STATE_TOKEN_INNER_HL, I"gpr_fn", Translation::to(I"TRUTH_STATE_TOKEN_INNER"), in_K_truth_state);
diff --git a/docs/core-module/3-nl.html b/docs/core-module/3-nl.html
index cb99119d2..3bd2a2070 100644
--- a/docs/core-module/3-nl.html
+++ b/docs/core-module/3-nl.html
@@ -427,7 +427,7 @@ this because we need access to it very quickly when parsing text substitutions.)
-The function NaturalLanguages::English is used in 1/mr (§4.16), 4/its (§7).
+The function NaturalLanguages::English is used in 1/mr (§4.17), 4/its (§7).
The function NaturalLanguages::set_language_of_play appears nowhere else.
diff --git a/docs/core-module/3-rst.html b/docs/core-module/3-rst.html
index 985dc7837..c72b61ae2 100644
--- a/docs/core-module/3-rst.html
+++ b/docs/core-module/3-rst.html
@@ -18,25 +18,10 @@
§2. The source text is drawn almost entirely from the primary source file and
the extensions, but Inform does also inject small amounts of source text of
its own (for instance, when a new kind is created, the kind interpreter
-does this).
+does this), and some extensions, such as Basic Inform, need to be given
+inclusion sentences — see Kits.
-In particular, every source text read into Inform is automatically prefixed by
-the following eight words — if Inform were a computer, this would be the BIOS
-which boots up its operating system. (In that the rest of the creation of the
-I7 world model is handled by source text in the Standard Rules.)
-
-
-Because of this mandatory insertion, one extension, the Standard Rules, is
-compulsorily included in every run. So there will certainly be at least two
-files of source text to be read, and quite possibly more.
-
-
-
-
- define MANDATORY_INSERTED_TEXT L"Include Basic Inform by Graham Nelson. Include the Standard Rules by Graham Nelson.\n\n"
- define BASIC_MODE_INSERTED_TEXT L"Include Basic Inform by Graham Nelson.\n\n"
-
source_file *primary_source_file = NULL; first to be opened
@@ -61,10 +46,10 @@ primary source text.
}
void SourceFiles::read_primary_source_text(void) {
- if (basic_mode)
- Feeds::feed_text(BASIC_MODE_INSERTED_TEXT);
- else
- Feeds::feed_text(MANDATORY_INSERTED_TEXT);
+ TEMPORARY_TEXT(early);
+ Kits::feed_early_source_text(early);
+ if (Str::len(early) > 0) Feeds::feed_stream(early);
+ DISCARD_TEXT(early);
SourceFiles::read_further_mandatory_text();
SourceFiles::read_file(filename_of_i7_source, I"your source text", NULL, FALSE);
}
@@ -74,7 +59,7 @@ primary source text.
The function SourceFiles::read_extension_source_text is used in 8/ie (§5.2).
-The function SourceFiles::read_primary_source_text is used in 1/mr (§4.8).
+The function SourceFiles::read_primary_source_text is used in 1/mr (§4.9).
§4. The following reads in the text of the optional file of use options, if
this has been created, producing no problem message if it hasn't.
diff --git a/docs/core-module/4-am.html b/docs/core-module/4-am.html
index 48c19c831..7108a9bc3 100644
--- a/docs/core-module/4-am.html
+++ b/docs/core-module/4-am.html
@@ -1976,7 +1976,7 @@ prefaced "(of a rulebook)", "(of an activity)", and so on.
-The function Adjectives::Meanings::agreements is used in 1/mr (§4.14).
+The function Adjectives::Meanings::agreements is used in 1/mr (§4.15).
The function Adjectives::Meanings::emit is used in 25/ci (§3.1, §3.2.3.3.1, §3.2.3.4.1).
diff --git a/docs/core-module/5-ipw.html b/docs/core-module/5-ipw.html
index 5ef1c1a90..910c0e4ec 100644
--- a/docs/core-module/5-ipw.html
+++ b/docs/core-module/5-ipw.html
@@ -69,7 +69,7 @@ instance) Spatial.
void Data::Objects::page_World(OUTPUT_STREAM) {
#ifdef IF_MODULE
if (existing_story_file) return; in this case there is no model world
- if (basic_mode) return; in this case there is no model world
+ if (Plugins::Manage::plugged_in(map_plugin) == FALSE) return; in this case there is no model world
PL::SpatialMap::establish_benchmark_room();
PL::EPSMap::traverse_for_map_parameters(1);
diff --git a/docs/core-module/5-lp.html b/docs/core-module/5-lp.html
index fdfbc6818..9e77cadb3 100644
--- a/docs/core-module/5-lp.html
+++ b/docs/core-module/5-lp.html
@@ -194,7 +194,7 @@ The rightmost element e_{n-1} is the least significant numerically.
-The structure literal_pattern_element is private to this section.
+The structure literal_pattern_element is accessed in 1/kts and here.
§8. For the sake of printing, we can specify which notation is to be used in
printing a value back. For instance,
@@ -3924,7 +3924,7 @@ set.
- The function LiteralPatterns::define_named_phrases is used in 1/mr (§4.13).
+ The function LiteralPatterns::define_named_phrases is used in 1/mr (§4.14).
§40.1. These text substitutions correspond exactly neither to the LPs nor to the
names. For instance, "in tonnes" produces a text substitution which takes
diff --git a/docs/core-module/5-nv.html b/docs/core-module/5-nv.html
index e496b224f..07a47cbb9 100644
--- a/docs/core-module/5-nv.html
+++ b/docs/core-module/5-nv.html
@@ -67,7 +67,7 @@ exist; we can simply record inferences about its value.
The structure nonlocal_variable_emission is private to this section.
-The structure nonlocal_variable is accessed in 2/sq, 2/si, 5/ins, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
+The structure nonlocal_variable is accessed in 1/kts, 2/sq, 2/si, 5/ins, 8/ed2, 9/ma, 9/pk, 11/sm, 14/lv, 14/ds2, 15/pr, 15/ep, 15/vp, 15/spr, 16/in, 16/cmw, 17/rs, 19/tc, 19/tb, 19/tod, 20/eq, 21/rl, 21/rl2, 21/fao, 21/rps, 21/sv, 21/ac, 22/pu, 22/dptd, 22/po, 22/pav, 25/cii, 26/uo, 26/ts and here.
§3. These three special NLVs are used for the "notable" hacky Standard Rules
variables mentioned below:
diff --git a/docs/core-module/5-un.html b/docs/core-module/5-un.html
index e662a3ca2..c2efbcb62 100644
--- a/docs/core-module/5-un.html
+++ b/docs/core-module/5-un.html
@@ -100,7 +100,7 @@ instance, the Standard Rules want the player-character object to be called
-The function UseNouns::name_all is used in 1/mr (§4.11).
+The function UseNouns::name_all is used in 1/mr (§4.12).
The function UseNouns::visit_to_name appears nowhere else.
diff --git a/docs/core-module/6-bp.html b/docs/core-module/6-bp.html
index 78e7a6a5b..5f129cc76 100644
--- a/docs/core-module/6-bp.html
+++ b/docs/core-module/6-bp.html
@@ -1324,7 +1324,7 @@ above. This happens very early in compilation.
-The function BinaryPredicates::make_built_in is used in 1/mr (§4.9).
+The function BinaryPredicates::make_built_in is used in 1/mr (§4.10).
§46. Other property-based relations.
@@ -1349,7 +1349,7 @@ above. This happens very early in compilation.
-The function BinaryPredicates::make_built_in_further is used in 1/mr (§4.11).
+The function BinaryPredicates::make_built_in_further is used in 1/mr (§4.12).
diff --git a/docs/core-module/6-nv.html b/docs/core-module/6-nv.html
index d331c3547..736efa9f2 100644
--- a/docs/core-module/6-nv.html
+++ b/docs/core-module/6-nv.html
@@ -90,7 +90,7 @@ cleared.)
-The function NewVerbs::add_inequalities is used in 1/mr (§4.9).
+The function NewVerbs::add_inequalities is used in 1/mr (§4.10).
The function NewVerbs::add_inequalities_inner appears nowhere else.
@@ -1034,7 +1034,7 @@ foreign verbs (4).
The function NewVerbs::ConjugateVerbDefinitions is used in 27/ei (§2).
-The function NewVerbs::ConjugateVerb is used in 1/mr (§4.14).
+The function NewVerbs::ConjugateVerb is used in 1/mr (§4.15).
§18.1.
<Compile ConjugateVerb routine 18.1> =
@@ -1088,7 +1088,6 @@ foreign verbs (4).
if (meaning) {
BinaryPredicates::mark_as_needed(meaning);
rel_iname = meaning->bp_iname;
- LOG("Meaningful! %n\n", rel_iname);
}
Produce::inv_primitive(Emit::tree(), CASE_BIP);
@@ -1193,7 +1192,6 @@ foreign verbs (4).
if (meaning) {
BinaryPredicates::mark_as_needed(meaning);
rel_iname = meaning->bp_iname;
- LOG("Meaningful 2! %n\n", rel_iname);
}
@@ -1560,7 +1558,7 @@ usages to the debugging log.
The function NewVerbs::log is used in 7/ptu (§17.1).
-The function NewVerbs::log_all is used in 1/mr (§4.17).
+The function NewVerbs::log_all is used in 1/mr (§4.18).
§25. Index tabulation. The following produces the table of verbs in the Phrasebook Index page.
diff --git a/docs/core-module/6-rlt.html b/docs/core-module/6-rlt.html
index a4d2e9dfc..d61043775 100644
--- a/docs/core-module/6-rlt.html
+++ b/docs/core-module/6-rlt.html
@@ -1233,7 +1233,7 @@ logical properties of the two terms of the BP being defined.
The function Relations::compile_defined_relation_constant appears nowhere else.
- The function Relations::compile_defined_relation_constants is used in 1/mr (§4.14).
+ The function Relations::compile_defined_relation_constants is used in 1/mr (§4.15).
@@ -2385,7 +2385,7 @@ logical properties of the two terms of the BP being defined.
- The function Relations::IterateRelations is used in 1/mr (§4.14).
+ The function Relations::IterateRelations is used in 1/mr (§4.15).
§18. The bitmap for various-to-various relations. It is unavoidable that a general V-to-V relation will take at least LR bits
of storage, where L is the size of the left domain and R the size of the
@@ -3146,7 +3146,7 @@ logical properties of the two terms of the BP being defined.
- The function Relations::compile_defined_relations is used in 1/mr (§4.14).
+ The function Relations::compile_defined_relations is used in 1/mr (§4.15).
§29.1.
<Compile RProperty routine 29.1> =
diff --git a/docs/core-module/7-hdn.html b/docs/core-module/7-hdn.html
index 5bef83f2c..9334122e5 100644
--- a/docs/core-module/7-hdn.html
+++ b/docs/core-module/7-hdn.html
@@ -513,7 +513,7 @@ begin by removing any existing relationships between the heading nodes.
-The function Sentences::Headings::make_tree is used in §10, §27.3, 1/mr (§4.9).
+The function Sentences::Headings::make_tree is used in §10, §27.3, 1/mr (§4.10).
§12.1. Note that the loop over headings below loops through all those which were
created by the memory manager: which is to say, all of them except for the
@@ -831,7 +831,7 @@ But when the following is called, we do know that.
-The function Sentences::Headings::satisfy_dependencies is used in 1/mr (§4.9).
+The function Sentences::Headings::satisfy_dependencies is used in 1/mr (§4.10).
§20. And now the code to check an individual heading's usage. This whole
thing is carefully timed so that we can still afford to cut up and rearrange
@@ -1702,7 +1702,7 @@ Version", contains the Inform build number in its usual form: "4Q34", for instan
-The function Sentences::Headings::write_as_xml is used in 1/mr (§4.9).
+The function Sentences::Headings::write_as_xml is used in 1/mr (§4.10).
The function Sentences::Headings::write_headings_as_xml_inner appears nowhere else.
diff --git a/docs/core-module/7-ns.html b/docs/core-module/7-ns.html
index bc4004f19..f2b9da5a8 100644
--- a/docs/core-module/7-ns.html
+++ b/docs/core-module/7-ns.html
@@ -152,7 +152,7 @@ in quick succession, the second run-through does nothing.)
-The function Sentences::VPs::traverse is used in 1/mr (§4.9).
+The function Sentences::VPs::traverse is used in 1/mr (§4.10).
The function Sentences::VPs::visit appears nowhere else.
diff --git a/docs/core-module/7-oaf.html b/docs/core-module/7-oaf.html
index 6b8ae6407..d37080cd3 100644
--- a/docs/core-module/7-oaf.html
+++ b/docs/core-module/7-oaf.html
@@ -90,7 +90,7 @@ not be treated as a possessive, and expunge them.
The function Sentences::Rearrangement::further_material appears nowhere else.
-The function Sentences::Rearrangement::tidy_up_ofs_and_froms is used in 1/mr (§4.9).
+The function Sentences::Rearrangement::tidy_up_ofs_and_froms is used in 1/mr (§4.10).
§4. The following array is used only by Traversals 1 to 3, and is how we
remember direction names.
diff --git a/docs/core-module/7-ptu.html b/docs/core-module/7-ptu.html
index 234594964..6421fa94a 100644
--- a/docs/core-module/7-ptu.html
+++ b/docs/core-module/7-ptu.html
@@ -879,11 +879,11 @@ be such that their head nodes each pass this test:
The function ParseTreeUsage::write_to_file appears nowhere else.
-The function ParseTreeUsage::plant_parse_tree is used in 1/mr (§4.9).
+The function ParseTreeUsage::plant_parse_tree is used in 1/mr (§4.10).
-The function ParseTreeUsage::verify is used in 1/mr (§4.9).
+The function ParseTreeUsage::verify is used in 1/mr (§4.10).
-The function ParseTreeUsage::write_main_source_to_log is used in 1/mr (§4.17).
+The function ParseTreeUsage::write_main_source_to_log is used in 1/mr (§4.18).
diff --git a/docs/core-module/7-rs.html b/docs/core-module/7-rs.html
index 4211dc3a7..2a7012dab 100644
--- a/docs/core-module/7-rs.html
+++ b/docs/core-module/7-rs.html
@@ -83,7 +83,7 @@ on childless nodes, it cannot ever act on the same node twice.
-The function Sentences::RuleSubtrees::register_recently_lexed_phrases is used in 1/mr (§4.9), 5/lp (§40, §41), 7/oaf (§3), 15/ma (§11.4).
+The function Sentences::RuleSubtrees::register_recently_lexed_phrases is used in 1/mr (§4.10), 5/lp (§40, §41), 7/oaf (§3), 15/ma (§11.4).
§5. Command nodes are demoted to be children of routine nodes:
@@ -2181,7 +2181,7 @@ are added, they can fairly simply be put here.
The function Sentences::RuleSubtrees::csp_new appears nowhere else.
-The function Sentences::RuleSubtrees::create_standard_csps is used in 1/mr (§4.8).
+The function Sentences::RuleSubtrees::create_standard_csps is used in 1/mr (§4.9).
The function Sentences::RuleSubtrees::log_control_structure is used in 7/ptu (§17.2).
diff --git a/docs/core-module/7-ss.html b/docs/core-module/7-ss.html
index 26c6ed790..2575a460f 100644
--- a/docs/core-module/7-ss.html
+++ b/docs/core-module/7-ss.html
@@ -88,7 +88,9 @@
void StructuralSentences::new_language(wording W) {
- Plugins::Manage::plug_in(W);
+ Problems::Issue::sentence_problem(_p_(PM_UseElementWithdrawn),
+ "the ability to activate or deactivate compiler elements in source text has been withdrawn",
+ "in favour of a new system with Inform kits.");
}
@@ -119,7 +121,7 @@ text has now officially been read.
-The function StructuralSentences::declare_source_loaded is used in 1/mr (§4.9).
+The function StructuralSentences::declare_source_loaded is used in 1/mr (§4.10).
§8. Sentence breaking. The Sentences::break
routine is used for long stretches of text,
normally entire files. The following provides a way for the .i6t
@@ -149,7 +151,7 @@ though: extensions, including the Standard Rules, have yet to be read.)
-The function StructuralSentences::break_source is used in 1/mr (§4.9).
+The function StructuralSentences::break_source is used in 1/mr (§4.10).
§9. Sentences in the source text are of five categories: dividing sentences,
which divide up the source into segments; structural sentences, which split
diff --git a/docs/core-module/8-ef.html b/docs/core-module/8-ef.html
index 5ac4b1827..02e0b4401 100644
--- a/docs/core-module/8-ef.html
+++ b/docs/core-module/8-ef.html
@@ -533,7 +533,7 @@ check that they have been met.
-The function Extensions::Files::check_versions is used in 1/mr (§4.9).
+The function Extensions::Files::check_versions is used in 1/mr (§4.10).
§19. Credit for extensions. Here we compile an I6 routine to print out credits for all the extensions
present in the compiled work. This is important because the extensions
@@ -629,7 +629,7 @@ feelings of modesty.
-The function Extensions::Files::ShowExtensionVersions_routine is used in 1/mr (§4.14).
+The function Extensions::Files::ShowExtensionVersions_routine is used in 1/mr (§4.15).
§20. The actual credit consists of a single line, with name, version number
and author. These are printed as I6 strings, hence the ISO encoding.
diff --git a/docs/core-module/8-ie.html b/docs/core-module/8-ie.html
index c11ab9e07..f84757638 100644
--- a/docs/core-module/8-ie.html
+++ b/docs/core-module/8-ie.html
@@ -58,7 +58,7 @@ guaranteed to be no INCLUDE nodes remaining in the parse tree.
-The function Extensions::Inclusion::traverse is used in 1/mr (§4.9).
+The function Extensions::Inclusion::traverse is used in 1/mr (§4.10).
The function Extensions::Inclusion::visit appears nowhere else.
diff --git a/docs/core-module/9-rpt.html b/docs/core-module/9-rpt.html
index 669230099..01fb21c99 100644
--- a/docs/core-module/9-rpt.html
+++ b/docs/core-module/9-rpt.html
@@ -401,7 +401,7 @@ has the marble and the box as its children, the relationship being containment.
Assertions::Refiner::refine(p->down, creation_rule);
#ifdef IF_MODULE
binary_predicate *bp = ParseTree::get_relationship(p);
- if ((bp) && (basic_mode == FALSE)) {
+ if ((bp) && (Plugins::Manage::plugged_in(map_plugin))) {
instance *dir = PL::MapDirections::get_mapping_direction(BinaryPredicates::get_reversal(bp));
if (dir == NULL) dir = PL::MapDirections::get_mapping_direction(bp);
if (dir) <Make the relation one which refers to a map direction 9.5.1>;
diff --git a/docs/core-module/9-tfa.html b/docs/core-module/9-tfa.html
index ca25208aa..e0fcaca15 100644
--- a/docs/core-module/9-tfa.html
+++ b/docs/core-module/9-tfa.html
@@ -159,7 +159,7 @@ we don't bother to print details of the closing
-The function Assertions::Traverse::traverse is used in 1/mr (§4.10).
+The function Assertions::Traverse::traverse is used in 1/mr (§4.11).
§7.1. Here's a tricky timing problem, or rather, here's the fix for it. Assemblies
are made when the kinds of objects are set, and they're made by inserting
diff --git a/docs/core-module/index.html b/docs/core-module/index.html
index 523c9c708..745998df1 100644
--- a/docs/core-module/index.html
+++ b/docs/core-module/index.html
@@ -23,6 +23,10 @@
-
Setting up the use of this module.
+
+ Kits -
+ A kit is a combination of Inter code with an Inform 7 extension.
+
Progress Percentages -
This tiny section, the Lichtenstein of Inform, prints percentage of completion estimates onto |stderr| so that the host application can intercept them and update its graphical progress bar.
diff --git a/docs/inform7/1-mn.html b/docs/inform7/1-mn.html
index 89fe5a097..c8af38506 100644
--- a/docs/inform7/1-mn.html
+++ b/docs/inform7/1-mn.html
@@ -43,7 +43,7 @@ when they want I7 to run.
-The function main is used in 2/pt (§52), 2/pl2 (§3.1), 2/pck (§3), 2/cnn (§1), 3/rst (§6), 4/am (§26.1), 8/ef (§26), 8/ed2 (§3.2), 10/varc (§14), 19/tb (§27, §27.1, §27.1.3, §29), 21/rl2 (§23), 22/ph (§4), 22/pu (§3), 26/uo (§11.1), 27/cm (§1), 1/bs (§2), 3/fc (§1), 3/sm (§36, §36.1, §38), 3/em2 (§24), 4/ap (§2), 2/hf (§6).
+The function main is used in 2/pt (§52), 2/pl2 (§3.1), 2/pck (§3), 2/cnn (§1), 3/rst (§6), 4/am (§26.1), 8/ef (§26), 8/ed2 (§3.2), 10/varc (§14), 19/tb (§27, §27.1, §27.1.3, §29), 21/rl2 (§23), 22/ph (§4), 22/pu (§3), 26/uo (§11.1), 27/cm (§1), 1/bs (§2), 1/lbr (§1), 3/fc (§1), 3/sm (§36, §36.1, §38), 3/em2 (§24), 4/ap (§2), 2/hf (§6).
§3. 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
diff --git a/docs/inter/1-mn.html b/docs/inter/1-mn.html
index e10365728..e926b40f1 100644
--- a/docs/inter/1-mn.html
+++ b/docs/inter/1-mn.html
@@ -123,7 +123,7 @@
-The function main is used in 2/pck (§3), 2/cnn (§1), 1/bs (§2), 3/fc (§1).
+The function main is used in 2/pck (§3), 2/cnn (§1), 1/bs (§2), 1/lbr (§1), 3/fc (§1).
diff --git a/docs/kinds-module/2-ki.html b/docs/kinds-module/2-ki.html
index 36f80a49d..c578040c6 100644
--- a/docs/kinds-module/2-ki.html
+++ b/docs/kinds-module/2-ki.html
@@ -790,7 +790,7 @@ even have started yet. So we simply remember our intention to insert the text:
void Kinds::Interpreter::transcribe_kind_template(kind_template_definition *ttd, kind_constructor *con) {
if (ttd == NULL) internal_error("tried to transcribe missing source text template");
#ifdef CORE_MODULE
- if ((CoreMain::basic_mode()) && (Str::eq(ttd->template_name, I"*UNDERSTOOD-VARIABLE")))
+ if ((Plugins::Manage::plugged_in(parsing_plugin) == FALSE) && (Str::eq(ttd->template_name, I"*UNDERSTOOD-VARIABLE")))
return;
#endif
text_stream *p = ttd->template_text;
@@ -1273,6 +1273,10 @@ concatenated with newlines dividing them, in a text stream.
if (tcc == cast_KCC) {
+ #ifdef CORE_MODULE
+ if ((Str::eq(stc.constructor_argument, I"SNIPPET_TY")) &&
+ (Plugins::Manage::plugged_in(parsing_plugin) == FALSE)) return;
+ #endif
kind_constructor_casting_rule *dtcr = CREATE(kind_constructor_casting_rule);
dtcr->next_casting_rule = con->first_casting_rule;
con->first_casting_rule = dtcr;
diff --git a/docs/srules/index.html b/docs/srules/index.html
deleted file mode 100644
index 44abf6b07..000000000
--- a/docs/srules/index.html
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
- srules 6
-
-
-
-
-
-
-
- ★
- srules 6
- The Standard Rules extension, included in all interactive fiction projects.
-
-
- -
-
Preamble -
- The titling line and rubric, use options and a few other preliminaries before the Standard Rules get properly started.
-
- -
-
Physical World Model -
- Spatial relationships; the hierarchy of kinds used to model things and places, and their properties.
-
- -
-
Variables and Rulebooks -
- The global variables and those built-in rulebooks which do not belong either to specific actions or to specific activities.
-
- -
-
Activities -
- The built-in activities and their default stock of rules; and in particular, the locale description mechanism.
-
- -
-
Actions -
- The standard stock of actions, along with the rules which define them; and the command grammar which requests them.
-
- -
-
Command Grammar -
- The default grammar for parsing typed commands in play.
-
- -
-
Phrase Definitions -
- Additional phrases to do with interactive fiction, to add to the much larger collection provided by Basic Inform; and the final sign-off of the Standard Rules extension, including its minimal documentation.
-
-
-
-
-
-
-
diff --git a/docs/srules/S-act.html b/docs/standard_rules/S-act.html
similarity index 99%
rename from docs/srules/S-act.html
rename to docs/standard_rules/S-act.html
index 9f66efd8b..aae0960e0 100644
--- a/docs/srules/S-act.html
+++ b/docs/standard_rules/S-act.html
@@ -26,7 +26,7 @@ concern implementation.
- Part Four - Activities (for interactive fiction language element only)
+ Part Four - Activities
diff --git a/docs/srules/S-act2.html b/docs/standard_rules/S-act2.html
similarity index 99%
rename from docs/srules/S-act2.html
rename to docs/standard_rules/S-act2.html
index 3c2e039c8..278f14a7e 100644
--- a/docs/srules/S-act2.html
+++ b/docs/standard_rules/S-act2.html
@@ -25,7 +25,7 @@ and subheadings used in the Actions page of the Index.
- Part Five - Actions (for interactive fiction language element only)
+ Part Five - Actions
Section 1 - Verbs needed for adaptive text
diff --git a/docs/srules/S-cg.html b/docs/standard_rules/S-cg.html
similarity index 100%
rename from docs/srules/S-cg.html
rename to docs/standard_rules/S-cg.html
diff --git a/docs/standard_rules/S-lt3.html b/docs/standard_rules/S-lt3.html
deleted file mode 100644
index 0d4776100..000000000
--- a/docs/standard_rules/S-lt3.html
+++ /dev/null
@@ -1,1199 +0,0 @@
-
-
-
- S/lt2
-
-
-
-
-
-
-
-
- ★
- standard_rules Template Library
- ListWriter Template
A flexible object-lister taking care of plurals, inventory information, various formats and so on.
-
-- §1. Specification
- §2. Memory
- §3. WriteListOfMarkedObjects
- §4. List Number and Gender
- §5. List Writer Regard Storage
- §6. Response Printing
- §7. About Iterator Functions
- §8. Marked List Iterator
- §9. Concealment
- §10. Coalesce Marked List
- §11. Object Tree Iterator
- §12. Coalesce Object Tree
- §13. GroupChildren
- §14. WriteListFrom
- §15. Standard Contents Listing Rule
- §16. Partitioning
- §17. Partition List
- §18. Equivalence Relation
- §19. Grouping
- §20. Write List Recursively
- §21. Write Multiple Class Group
- §22. Write Single Class Group
- §23. Write After Entry
- §24. Internal Rule
-
-§1. Specification. The list-writer is called by one of the following function calls:
-
-
-
-
-- (1)
WriteListOfMarkedObjects(style)
, where the set of objects listed is
-understood to be exactly those with the workflag2
attribute set, and
-- (a) the
style
is a sum of *_BIT
constants as defined in "Definitions.i6t".
-
-
-
-
-- (2)
WriteListFrom(obj, style, depth, noactivity, iterator)
, where only the
-first two parameters are compulsory:
-- (a) the set of objects listed begins with
obj
;
- - (b) the
style
is a sum of *_BIT
constants as defined in "Definitions.i6t";
- - (c) the
depth
is the recursion depth within the list — ordinarily 0, but
-by supplying a higher value, we can simulate a sublist of another list;
- - (d)
noactivity
is a flag which forces the list-writer to ignore the
-"listing the contents of" activity (in cases where it would otherwise consult
-this): by default this is false
;
- - (e)
iterator
is an iterator function which provides the objects in sequence.
-
-
-WriteListOfMarkedObjects
is simply a front-end which supplies suitable
-parameters for WriteListFrom
.
-
-
-The iterator function is by default ObjectTreeIterator
. This defines the
-sequence of objects as being the children of the parent of obj
, in object
-tree sequence (that is: child(parent(obj))
is first). Moreover, when using
-ObjectTreeIterator
, the "listing the contents of" activity is carried out,
-unless noactivity
is set.
-
-
-We also provide the iterator function MarkedListIterator
, which defines
-the sequence of objects as being the list in the word array
-MarkedObjectArray
with length MarkedObjectLength
. Here the "listing
-the contents of" activity is never used, since the objects are not
-necessarily the contents of any single thing. This of course is the
-iterator used by WriteListOfMarkedObjects(style)
: it works by filling
-this array with all the objects having workflag2
set.
-
-
-The full specification for iterator functions is given below.
-
-
-The list-writer automatically groups adjacent and indistinguishable terms
-in the sequence into plurals, and carries out the "printing the plural
-name" activity to handle these. Doing this alone would result in text such
-as "You can see a cake, three coins, an onion, and two coins here",
-where the five coins are mentioned in two clauses because they happen not
-to be adjacent in the list. The list-writer therefore carries out the activity
-"grouping together" to see if the user would like to tie certain objects
-together into a single entry: what this does is to set suitable list_together
-properties for the objects. NI has already given plural objects a similar
-list_together
property. The net effect is that any entries in the list with
-a non-blank value of list_together
must be adjacent to each other.
-
-
-We could achieve that by sorting the list in order of list_together
value,
-but that would result in drastic movements, whereas we want to upset the
-original ordering as little as possible. So instead we use a process called
-coalescing the list. This is such that for every value L!= 0
-of list_together
, every entry with that value is moved back in the list
-to follow the first entry with that value. Thus if the original order is
-x_1, x_2, ..., x_N then x_j still precedes x_k in coalesced order
-unless there exists i<j<k such that L(i) = L(k) != 0 and L(j)!= L(i).
-This is as stable as it can be while achieving the "interval" property
-that non-zero L values occur in contiguous runs.
-
-
-We therefore obtain text such as "You can see a cake, five coins, the tiles
-W, X, Y and Z from a Scrabble set, and an onion here." where the coins and
-the Scrabble tiles have been coalesced together in the list.
-
-
-It's important to note that the default ObjectTreeIterator
has the
-side-effect of actually reordering the object tree: it rearranges the children
-being listed so that they appear in the tree in coalesced order. The
-MarkedListIterator
used by WriteListOfMarkedObjects
has the same
-side-effect if the marked objects all happen to share a common parent.
-It might seem odd for a list-writer to have side effects at all, but the
-idea is that occasional coalescing improves the quality of play in many
-small ways — for instance, the sequence of matches to TAKE ALL is tidier —
-and that coalescing has a small speed cost, so we want to do it as little
-as possible. (The latter was more of a consideration for I6: interpreters
-are faster nowadays.)
-
-
-This specification is somewhat stronger than that of the I6 library's
-traditional list-writer, because
-
-
-- (i) it supports arbitrary lists of objects, not just children of specific
-parents, while still allowing coalesced and grouped lists,
-
- (ii) it can be used recursively in all cases,
-
- (iii) it uses its own memory, rather than borrowing memory from the parser,
-so that it can safely be used while the parser is working, and
-
- (iv) it manages this memory more flexibly and without silently failing by
-buffer overruns on unexpectedly large lists.
-
-The I7 version of WriteListFrom
, when using ObjectTreeIterator
, differs
-from the I6 version in that the object o
is required to be the child
of
-its parent
, that is, to be the eldest child. (So in effect it's a function
-of parents, not children, but we retain the form for familiarity's sake.)
-In practice this was invariably the way WriteListFrom
was used even in
-I6 days.
-
-
-Finally, the ISARE_BIT
is differently interpreted in I7: instead of printing
-something like " are ducks and drakes", as it would have done in I6, the
-initial space is now suppressed and we instead print "are ducks and drakes".
-
-
-§2. Memory. The list-writer needs to dynamically allocate temporary array space of a known
-size, in such a way that the array is effectively on the local stack frame:
-if only either the Z-machine or Glulx supported a stack in memory, this would
-be no problem, but they do not and we must therefore use the following.
-
-
-The size of the stack is such that it can support a list which includes every
-object and recurses in turn to most other objects: in practice, this never
-happens. It would be nice to allocate more just in case, but the Z-machine is
-desperately short of array memory.
-
-
-
-
- Constant REQUISITION_STACK_SIZE = 3*ICOUNT_OBJECT;
- Array requisition_stack --> REQUISITION_STACK_SIZE;
- Global requisition_stack_pointer = 0;
-
- [ RequisitionStack len top addr;
- top = requisition_stack_pointer + len;
- if (top > REQUISITION_STACK_SIZE) return false;
- addr = requisition_stack + requisition_stack_pointer*WORDSIZE;
- ! print "Allocating ", addr, " at pointer ", requisition_stack_pointer, "^";
- requisition_stack_pointer = top;
- return addr;
- ];
-
- [ FreeStack addr;
- if (addr == 0) return;
- requisition_stack_pointer = (addr - requisition_stack)/WORDSIZE;
- ];
-
-
-
-
-§3. WriteListOfMarkedObjects. This routine will use the MarkedListIterator
. That means it has to create
-an array containing the object numbers of every object with the workflag2
-attribute set, placing the address of this array in MarkedObjectArray
and
-the length in MarkedObjectLength
. Note that we preserve any existing
-marked list on the stack (using the assembly-language instructions @push
-and @pull
) for the duration of our use.
-
-
-While the final order of this list will depend on what it looks like after
-coalescing, the initial order is also important. If all of the objects have
-a common parent in the object tree, then we coalesce those objects and
-place the list in object tree order. But if not, we place the list in
-object number order (which is essentially the order of traversal of the
-initial state of the object tree: thus objects in Room A will all appear
-before objects in Room B if A was created before B in the source text).
-
-
-
-
- Global MarkedObjectArray = 0;
- Global MarkedObjectLength = 0;
-
- [ WriteListOfMarkedObjects in_style
- obj common_parent first mixed_parentage length g gc;
-
- gc = -2;
- objectloop (obj ofclass Object && obj has workflag2) {
- length++;
- if (first == nothing) { first = obj; common_parent = parent(obj); }
- else { if (parent(obj) ~= common_parent) mixed_parentage = true; }
- g = GetGNAOfObject(obj); g = g%3;
- if (gc == -2) gc = g;
- else if (gc ~= g) gc = -1;
- }
- if (mixed_parentage) common_parent = nothing;
-
- if (length == 0) {
- if (in_style & ISARE_BIT ~= 0) LIST_WRITER_INTERNAL_RM('W');
- else if (in_style & CFIRSTART_BIT ~= 0) LIST_WRITER_INTERNAL_RM('X');
- else LIST_WRITER_INTERNAL_RM('Y');
- } else {
- @push MarkedObjectArray; @push MarkedObjectLength;
- MarkedObjectArray = RequisitionStack(length);
- MarkedObjectLength = length;
- if (MarkedObjectArray == 0) return RunTimeProblem(RTP_LISTWRITERMEMORY);
-
- if (common_parent) {
- ObjectTreeCoalesce(child(common_parent));
- length = 0;
- objectloop (obj in common_parent) ! object tree order
- if (obj has workflag2) MarkedObjectArray-->length++ = obj;
- } else {
- length = 0;
- objectloop (obj ofclass Object) ! object number order
- if (obj has workflag2) MarkedObjectArray-->length++ = obj;
- }
-
- WriteListFrom(first, in_style, 0, false, MarkedListIterator);
-
- FreeStack(MarkedObjectArray);
- @pull MarkedObjectLength; @pull MarkedObjectArray;
- }
- prior_named_list = length;
- prior_named_list_gender = gc;
- return;
- ];
-
-
-
-
-§4. List Number and Gender. As a brief parenthesis, the same algorithm can be used to work out the
-prior named list number and gender for everything matching a description.
-
-
-
-
- [ RegardingMarkedObjects
- obj length g gc;
- gc = -2;
- objectloop (obj ofclass Object && obj has workflag2) {
- length++;
- g = GetGNAOfObject(obj); g = g%3;
- if (gc == -2) {
- gc = g;
- prior_named_noun = obj;
- } else if (gc ~= g) gc = -1;
- }
- prior_named_list = length;
- prior_named_list_gender = gc;
- if (length == 0) { prior_named_noun = nothing; prior_named_list_gender = -1; }
- return;
- ];
-
- [ RegardingSingleObject obj;
- prior_named_list = 1;
- prior_named_list_gender = -1;
- prior_named_noun = obj;
- ];
-
- [ RegardingNumber n;
- prior_named_list = n;
- prior_named_list_gender = -1;
- prior_named_noun = nothing;
- ];
-
- [ PNToVP gna;
- if (prior_named_noun == player) return story_viewpoint;
- if (prior_named_noun) gna = GetGNAOfObject(prior_named_noun);
- if (((gna%6)/3 == 1) || (prior_named_list >= 2)) return 6;
- return 3;
- ];
-
-
-
-
-§5. List Writer Regard Storage. This is somewhat hacky, but enables "[regarding list writer internals]".
-
-
-
-
- Array LWI_Storage --> 1 (-1) nothing;
- [ SetLWI a b c;
- LWI_Storage-->0 = a;
- LWI_Storage-->1 = b;
- LWI_Storage-->2 = c;
- ];
- [ RegardingLWI;
- prior_named_list = LWI_Storage-->0;
- prior_named_list_gender = LWI_Storage-->1;
- prior_named_noun = LWI_Storage-->2;
- ];
-
-
-
-
-§6. Response Printing. From which:
-
-
-
-
- [ ResponseViaActivity R;
- @push prior_named_noun; @push prior_named_list; @push prior_named_list_gender;
- RegardingSingleObject(nothing);
- CarryOutActivity(PRINTING_RESPONSE_ACT, R);
- @pull prior_named_list_gender; @pull prior_named_list; @pull prior_named_noun;
- ];
-
-
-
-
-§7. About Iterator Functions. Suppose Iter
is an iterator function and that we have a "raw list"
-x_1, x_2, ..., x_n of objects. Of these, the iterator function will
-choose a sublist of "qualifying" objects. It is called with arguments
-
-
-
-
-
-
- Iter(obj, depth, L, function)
-
-
-where the obj
is required to be x_j for some j and the function is one
-of the *_ITF
constants defined below:
-
-
-
-
-- (a) On
START_ITF
, we return x_1, or nothing
if the list is empty.
-
-- (b) On
SEEK_ITF
, we return the smallest k>= j such that x_k qualifies,
-or nothing
if none of x_j, x_{j+1}, ..., x_n qualify.
-
-- (c) On
ADVANCE_ITF
, we return the smallest k > j such that x_k qualifies,
-or nothing
if none of x_{j+1}, x_{j+2} ..., x_n qualify.
-
-- (d) On
COALESCE_ITF
, we coalesce the entire list (not merely the qualifying
-entries) and return the new x_1, or nothing
if the list is empty.
-
-Thus, given any x_i, we can produce the sublist of qualifying entries by
-performing START_ITF
on x_i, then SEEK_ITF
, to produce q_1; then
-ADVANCE_ITF
to produce q_2, and so on until nothing
is returned, when
-there are no more qualifying entries. SEEK_ITF
and ADVANCE_ITF
always
-return qualifying objects, or nothing
; but START_ITF
and COALESCE_ITF
-may return a non-qualifying object, since there's no reason why x_1 should
-qualify in any ordering.
-
-
-The iterator can make its own choice of which entries qualify, and of what
-the raw list is; depth
is supplied to help in that decision. But if L
-is non-zero then the iterator is required to disqualify any entry whose
-list_together
value is not L
.
-
-
-
-
- Constant SEEK_ITF = 0;
- Constant ADVANCE_ITF = 1;
- Constant COALESCE_ITF = 2;
- Constant START_ITF = 3;
-
- ! Constant DBLW; ! Uncomment this to provide debugging information at run-time
-
-
-
-
-§8. Marked List Iterator. Here the raw list is provided by the MarkedObjectArray
, which is convenient
-for coalescing, but not so helpful for translating the obj
parameter into
-the i such that it is x_i. We simply search from the beginning to do
-this, which combined with other code using the iterator makes for some
-unnecessary O(n^2) calculations. But it saves memory and nuisance, and the
-iterator is used only with printing to the screen, which never needs to be
-very rapid anyway (because the player can only read very slowly).
-
-
-
-
- [ MarkedListIterator obj depth required_lt function i;
- if (obj == nothing) return nothing;
- if (required_lt == 0) required_lt = EMPTY_TEXT_VALUE;
- switch(function) {
- START_ITF: return MarkedObjectArray-->0;
- COALESCE_ITF: return MarkedListCoalesce();
- SEEK_ITF, ADVANCE_ITF:
- for (i=0: i<MarkedObjectLength: i++)
- if (MarkedObjectArray-->i == obj) {
- if (function == ADVANCE_ITF) i++;
- for (:i<MarkedObjectLength: i++) {
- obj = MarkedObjectArray-->i;
- if ((LT_Compare(required_lt, EMPTY_TEXT_VALUE) ~= 0) &&
- (LT_Compare(obj.list_together, required_lt) ~= 0)) continue;
- if ((c_style & WORKFLAG_BIT) && (depth==0) && (obj hasnt workflag))
- continue;
- if ((c_style & CONCEAL_BIT) && (ConcealedFromLists(obj))) continue;
- return obj;
- }
- return nothing;
- }
- }
- return nothing;
- ];
-
-
-
-
-§9. Concealment. This is the definition of concealment used by the list-writer, and means that,
-for example, the "deciding the concealed possessions" activity is taken into
-account.
-
-
-
-
- [ ConcealedFromLists obj c;
- if ((obj has concealed) || (obj has scenery)) rtrue;
- c = parent(obj);
- if ((c) && (c ofclass K5_container or K6_supporter) && (TestConcealment(c, obj))) rtrue;
- rfalse;
- ];
-
-
-
-
-§10. Coalesce Marked List. The return value is the new first entry in the raw list.
-
-
-
-
- [ MarkedListCoalesce o i lt l swap m;
- for (i=0: i<MarkedObjectLength: i++) {
- lt = (MarkedObjectArray-->i).list_together;
- if (LT_Compare(lt, EMPTY_TEXT_VALUE) ~= 0) {
- ! Find first object in list after contiguous run with this list_together value:
- for (i++: (i<MarkedObjectLength) &&
- (LT_Compare((MarkedObjectArray-->i).list_together, lt) == 0): i++) ;
- ! If the contiguous run extends to end of list, the list is now perfect:
- if (i == MarkedObjectLength) return MarkedObjectArray-->0;
- ! And otherwise we look to see if any future entries belong in the earlier run:
- for (l=i+1: l<MarkedObjectLength: l++)
- if (LT_Compare((MarkedObjectArray-->l).list_together, lt) == 0) {
- ! Yes, they do: so we perform a rotation to insert it before element i:
- swap = MarkedObjectArray-->l;
- for (m=l: m>i: m--) MarkedObjectArray-->m = MarkedObjectArray-->(m-1);
- MarkedObjectArray-->i = swap;
- ! And now the run is longer:
- i++;
- if (i == MarkedObjectLength) return MarkedObjectArray-->0;
- }
- i--;
- }
- }
- return MarkedObjectArray-->0;
- ];
-
-
-
-
-§11. Object Tree Iterator. Here the raw list is the list of all children of a given parent: since the
-argument obj
is required to be a member of the raw list, we can use
-parent(obj)
to find it. Now seeking and advancing are fast, but coalescing
-is slower.
-
-
-
-
- Global list_filter_routine;
-
- [ ObjectTreeIterator obj depth required_lt function;
- if ((obj == nothing) || (parent(obj) == nothing)) return nothing;
- if (function == START_ITF) obj = child(parent(obj));
- if (function == COALESCE_ITF) return ObjectTreeCoalesce(obj);
- if (function == ADVANCE_ITF) obj = sibling(obj);
- if (required_lt == 0) required_lt = EMPTY_TEXT_VALUE;
- for (:: obj = sibling(obj)) {
- if (obj == nothing) return nothing;
- !if (function == ADVANCE_ITF) print "Considering ", (the) obj, ": ", (TEXT_TY_Say) obj.list_together, ": ", (TEXT_TY_Say) required_lt, ": ", ": ", (TEXT_TY_Say) lt_value, ": ", LT_Compare(obj.list_together, required_lt), "^";
- if ((LT_Compare(required_lt, EMPTY_TEXT_VALUE) ~= 0) &&
- (LT_Compare(obj.list_together, required_lt) ~= 0)) continue;
- if ((c_style & WORKFLAG_BIT) && (depth==0) && (obj hasnt workflag)) continue;
- if (obj hasnt list_filter_permits) continue;
- if ((c_style & CONCEAL_BIT) && (ConcealedFromLists(obj))) continue;
- return obj;
- }
- ];
-
-
-
-
-§12. Coalesce Object Tree. Again, the return value is the new first entry in the raw list.
-
-
-
-
- [ ObjectTreeCoalesce obj memb lt later;
- #Ifdef DBLW; print "^^Sorting out: "; DiagnoseSortList(obj); #Endif;
- .StartAgain;
- for (memb=obj: memb~=nothing: memb=sibling(memb)) {
- lt = memb.list_together;
- if (LT_Compare(lt, EMPTY_TEXT_VALUE) ~= 0) {
- ! Find first object in list after contiguous run with this list_together value:
- for (memb=sibling(memb):
- (memb) && (LT_Compare(memb.list_together, lt) == 0): memb = sibling(memb)) ;
- ! If the contiguous run extends to end of list, the list is now perfect:
- if (memb == 0) return obj;
- ! And otherwise we look to see if any future entries belong in the earlier run:
- for (later=sibling(memb): later: later=sibling(later))
- if (LT_Compare(later.list_together, lt) == 0) {
- ! Yes, they do: so we perform a regrouping of the list and start again:
- obj = GroupChildren(parent(obj), lt);
- #Ifdef DBLW; print "^^Sorted to: "; DiagnoseSortList(obj); #Endif;
- jump StartAgain;
- }
- }
- }
- return obj;
- ];
-
-
-
-
-§13. GroupChildren. The following runs through the child-objects of par
in the I6 object tree,
-and moves those having a given list_property
property value together, to
-become the eldest children. It preserves the ordering in between those
-objects, and also in between those not having that property value.
-
-
-We do this by temporarily moving objects into and out of in_obj
and out_obj
,
-objects which in all other circumstances never have children in the tree.
-
-
-
-
- [ GroupChildren par value;
- while (child(par) ~= 0) {
- if (LT_Compare(child(par).list_together, value) ~= 0)
- move child(par) to out_obj;
- else
- move child(par) to in_obj;
- }
- while (child(in_obj) ~= 0) move child(in_obj) to par;
- while (child(out_obj) ~= 0) move child(out_obj) to par;
- return child(par);
- ];
-
- #Ifdef DBLW;
- [ DiagnoseSortList obj memb;
- for (memb=child(obj): memb~=nothing: memb=sibling(memb)) print memb, " --> "; new_line;
- ];
- #Endif;
-
-
-
-
-§14. WriteListFrom. And here we go at last. Or at any rate we initialise the quartet of global
-variables detailing the current list-writing process, and begin.
-
-
-
-
- [ WriteListFrom first in_style depth noactivity iter a ol;
- @push c_iterator; @push c_style; @push c_depth; @push c_margin;
- if (iter) c_iterator = iter; else c_iterator = ObjectTreeIterator;
- c_style = in_style; c_depth = depth;
- c_margin = 0; if (in_style & EXTRAINDENT_BIT) c_margin = 1;
-
- objectloop (a ofclass Object) {
- give a list_filter_permits;
- if ((list_filter_routine) && (list_filter_routine(a) == false))
- give a ~list_filter_permits;
- }
-
- first = c_iterator(first, depth, 0, START_ITF);
- if (first == nothing) {
- if (in_style & ISARE_BIT ~= 0) LIST_WRITER_INTERNAL_RM('W');
- else LIST_WRITER_INTERNAL_RM('Y');
- if (in_style & NEWLINE_BIT ~= 0) new_line;
- } else {
- if ((noactivity) || (iter)) {
- WriteListR(first, c_depth, true);
- say__p = 1;
- } else {
- objectloop (ol provides list_together)
- BlkValueCopy(ol.list_together, EMPTY_TEXT_VALUE);
- CarryOutActivity(LISTING_CONTENTS_ACT, parent(first));
- }
- }
-
- @pull c_margin; @pull c_depth; @pull c_style; @pull c_iterator;
- ];
-
-
-
-
-§15. Standard Contents Listing Rule. The default for the listing contents activity is to call this rule in its
-"for" stage: note that this suppresses the use of the activity, to avoid
-an infinite regress. The activity is used only for the default
-ObjectTreeIterator
, so there is no need to specify which is used.
-
-
-
-
- [ STANDARD_CONTENTS_LISTING_R;
- WriteListFrom(child(parameter_value), c_style, c_depth, true);
- ];
-
-
-
-
-§16. Partitioning. Given qualifying objects x_1, ..., x_j, we partition them into classes of
-the equivalence relation x_i~ x_j if and only
-
-
-
-
-- (i) they both have a
plural
property (not necessarily the same), and
- - (ii) neither will cause the list-maker to recurse downwards to show the
-objects inside or on top of them, and
-
- (iii) if they cause the list-maker to add information about whether they
-are worn, lighted or open, then it will add the same information about both, and
-
- (iv) they are considered identical by the parser, in that they respond to the
-same syntaxes of name: so that it is impossible to find a TAKE X command such
-that X matches one and not the other.
-
-The equivalence classes are numbered consecutively upwards from 1 to n,
-in order of first appearance in the list. For each object x_i,
-partition_classes->(i-1)
is the number of its equivalence class. For each
-equivalence class number c, partition_class_sizes->c
is the number of
-objects in this class.
-
-
-
-
- #Ifdef DBLW;
- Global DBLW_no_classes; Global DBLW_no_objs;
- [ DebugPartition partition_class_sizes partition_classes first depth i k o;
- print "[Length of list is ", DBLW_no_objs, " with ", k, " plural.]^";
- print "[Partitioned into ", DBLW_no_classes, " equivalence classes.]^";
- for (i=1: i<=DBLW_no_classes : i++) {
- print "Class ", i, " has size ", partition_class_sizes->i, "^";
- }
- for (k=0, o=first: k<DBLW_no_objs : k++, o = c_iterator(o, depth, lt_value, ADVANCE_ITF)) {
- print "Entry ", k, " has class ", partition_classes->k,
- " represented by ", o, " with L=", o.list_together, "^";
- }
- ];
- #Endif;
-
-
-
-
-§17. Partition List. The following creates the partition_classes
and partition_class_sizes
-accordingly. We return n, the number of classes.
-
-
-
-
- [ PartitionList first no_objs depth partition_classes partition_class_sizes
- i k l n m;
- for (i=0: i<no_objs: i++) partition_classes->i = 0;
- n = 1;
- for (i=first, k=0: k<no_objs: i=c_iterator(i, depth, lt_value, ADVANCE_ITF), k++)
- if (partition_classes->k == 0) {
- partition_classes->k = n; partition_class_sizes->n = 1;
- for (l=c_iterator(i, depth, lt_value, ADVANCE_ITF), m=k+1:
- (l~=0) && (m<no_objs):
- l=c_iterator(l, depth, lt_value, ADVANCE_ITF), m++) {
- if ((partition_classes->m == 0) && (ListEqual(i, l))) {
- if (partition_class_sizes->n < 255) (partition_class_sizes->n)++;
- partition_classes->m = n;
- }
- }
- if (n < 255) n++;
- }
- n--;
- #Ifdef DBLW;
- DBLW_no_classes = n; DBLW_no_objs = no_objs;
- DebugPartition(partition_class_sizes, partition_classes, first, depth);
- #Endif;
- return n;
- ];
-
-
-
-
-§18. Equivalence Relation. The above algorithm will fail unless ListEqual
is indeed reflexive, symmetric
-and transitive, which ultimately depends on the care with which Identical
-is implemented, which in turn hangs on the parse_noun
properties compiled
-by NI. But this seems to be sound.
-
-
-
-
- [ ListEqual o1 o2;
- if ((o1.plural == 0) || (o2.plural == 0)) rfalse;
- if (child(o1) ~= 0 && WillRecurs(o1) ~= 0) rfalse;
- if (child(o2) ~= 0 && WillRecurs(o2) ~= 0) rfalse;
- if (c_style & (FULLINV_BIT + PARTINV_BIT) ~= 0) {
- if ((o1 hasnt worn && o2 has worn) || (o2 hasnt worn && o1 has worn)) rfalse;
- if ((o1 hasnt light && o2 has light) || (o2 hasnt light && o1 has light)) rfalse;
- if (o1 has container) {
- if (o2 hasnt container) rfalse;
- if ((o1 has open && o2 hasnt open) || (o2 has open && o1 hasnt open))
- rfalse;
- }
- else if (o2 has container)
- rfalse;
- }
- return Identical(o1, o2);
- ];
-
- [ WillRecurs o;
- if (c_style & ALWAYS_BIT ~= 0) rtrue;
- if (c_style & RECURSE_BIT == 0) rfalse;
- if ((o has supporter) || ((o has container) && (o has open or transparent))) rtrue;
- rfalse;
- ];
-
-
-
-
-§19. Grouping. A "group" is a maximally-sized run of one or more adjacent partition
-classes in the list whose first members have a common value of
-list_together
which is a routine or string, and which is not equal to
-lt_value
, the current grouping value. (As we see below, it's by setting
-lt_value
that we restrict attention to a particular group: if we reacted
-to that as a list_together
value here, then we would simply go around in
-circles, and never be able to see the individual objects in the group.)
-
-
-For instance, suppose we have objects with list_together
values as follows,
-where R_1 and R_2 are addresses of routines:
-
-
-
-
-
-
- coin| ($R_1$), |coin| ($R_1$), |box| ($R_2$), |statuette| (0), |coin| ($R_1$), |box
- (R_2)
-
-Then the partition is 1, 1, 2, 3, 1, 2, so that the final output will be
-something like "three coins, two boxes and a statuette" — with three
-grouped terms. Here each partition class is the only member in its group,
-so the number of groups is the same as the number of classes. (The above
-list is not coalesced, so the R_1 values, for instance, are not
-contiguous: we need to work in general with non-coalesced lists because
-not every iterator function will be able to coalesce fully.)
-
-
-But if we have something like this:
-
-
-
-
-
-
- coin| ($R_1$), |Q| ($R_2$), |W| ($R_2$), |coin| ($R_1$), |statuette| (0), |E| ($R_2$), |R
- (R_2)
-
-then the partition is 1, 2, 3, 1, 4, 5, 6 and we have six classes in all.
-But classes 2 and 3 are grouped together, as are classes 5 and 6, so we
-end up with a list having just four groups: "two coins, the letters Q and
-W from a Scrabble set, a statuette and the letters E and R from a Scrabble
-set". (Again, this list has not been fully coalesced: if it had been, it
-would be reordered coin
, coin
, Q
, W
, E
, R
, statuette
, with
-partition 1, 1, 2, 3, 4, 5, 6, and three groups: "two coins, the letters Q,
-W, E and R from a Scrabble set and a statuette".)
-
-
-The reason we do not group together classes with a common non-zero
-list_together
which is not a routine or string is that low values
-of list_together
are used in coalescing the list into a pleasing order
-(say, moving all of the key-like items together) but not in grouping: see
-list_together
in the Inform Designer's Manual, 4th edition.
-
-
-We calculate the number of groups by starting with the number of classes
-and then subtracting one each time two adjacent classes share list_together
-in the above sense.
-
-
-
-
- [ NumberOfGroupsInList o no_classes depth partition_classes partition_class_sizes
- no_groups cl memb k current_lt lt;
- current_lt = EMPTY_TEXT_VALUE;
- lt = EMPTY_TEXT_VALUE;
- no_groups = no_classes;
- for (cl=1, memb=o, k=0: cl<=no_classes: cl++) {
- ! Advance to first member of class number cl
- while (partition_classes->k ~= cl) {
- k++; memb = c_iterator(memb, depth, lt_value, ADVANCE_ITF);
- }
- if (memb) { ! In case of accidents, but should always happen
- lt = memb.list_together;
- if ((LT_Compare(lt, lt_value) ~= 0) &&
- (LT_Compare(lt, EMPTY_TEXT_VALUE) ~= 0) &&
- (LT_Compare(lt, current_lt) == 0)) {
- no_groups--;
- }
- current_lt = lt;
- }
- }
- #Ifdef DBLW; print "[There are ", no_groups, " groups.]^"; #Endif;
- return no_groups;
- ];
-
- [ LT_Compare lt1 lt2;
- if (lt1 == lt2) return 0;
- if (lt1 == 0) lt1 = EMPTY_TEXT_VALUE;
- if (lt2 == 0) lt2 = EMPTY_TEXT_VALUE;
- if (TEXT_TY_IsSubstituted(lt1) == false) {
- if (TEXT_TY_IsSubstituted(lt2) == false) return (lt1-->1)-(lt2-->1);
- return -1;
- }
- if (TEXT_TY_IsSubstituted(lt2) == false) {
- return -1;
- }
- return BlkValueCompare(lt1, lt2);
- ];
-
-
-
-
-§20. Write List Recursively. The big one: WriteListR
is the heart of the list-writer.
-
-
-
-
- [ WriteListR o depth from_start
- partition_classes partition_class_sizes
- cl memb index k2 l m no_classes q groups_to_do current_lt;
- if (o == nothing) return; ! An empty list: no output
-
- if (from_start) {
- o = c_iterator(o, depth, 0, COALESCE_ITF); ! Coalesce list and choose new start
- }
- o = c_iterator(o, depth, 0, SEEK_ITF); ! Find first entry in list from o
- if (o == nothing) return;
-
- ! Count index = length of list
- for (memb=o, index=0: memb: memb=c_iterator(memb, depth, lt_value, ADVANCE_ITF)) index++;
-
- if (c_style & ISARE_BIT ~= 0) {
- SetLWI(index, -1, o);
- LIST_WRITER_INTERNAL_RM('V', o);
- if (c_style & NEWLINE_BIT ~= 0) print ":^";
- else print (char) ' ';
- c_style = c_style - ISARE_BIT;
- }
-
- partition_classes = RequisitionStack(index/WORDSIZE + 2);
- partition_class_sizes = RequisitionStack(index/WORDSIZE + 2);
- if ((partition_classes == 0) || (partition_class_sizes == 0))
- return RunTimeProblem(RTP_LISTWRITERMEMORY);
-
- no_classes =
- PartitionList(o, index, depth, partition_classes, partition_class_sizes);
-
- groups_to_do =
- NumberOfGroupsInList(o, no_classes, depth, partition_classes, partition_class_sizes);
-
- for (cl=1, memb=o, index=0, current_lt=EMPTY_TEXT_VALUE: groups_to_do>0: cl++) {
- ! Set memb to first object of partition class cl
- while (partition_classes->index ~= cl) {
- index++; memb=c_iterator(memb, depth, lt_value, ADVANCE_ITF);
- if (memb==0) { print "*** Error in list-writer ***^"; return; }
- }
-
- #Ifdef DBLW;
- ! DebugPartition(partition_class_sizes, partition_classes, o, depth);
- print "^[Class ", cl, " of ", no_classes, ": first object ", memb,
- " (", memb.list_together, "); groups_to_do ", groups_to_do, ",
- current_lt=", current_lt, " listing_size=", listing_size,
- " lt_value=", lt_value, " memb.list_together=", memb.list_together, "]^";
- #Endif;
-
- if ((LT_Compare(memb.list_together, lt_value) == 0) ||
- (LT_Compare(memb.list_together, EMPTY_TEXT_VALUE) == 0)) current_lt = EMPTY_TEXT_VALUE;
- else {
- if (LT_Compare(memb.list_together, current_lt) == 0) continue;
-
- ! Otherwise this class begins a new group
- @push listing_size;
- q = memb; listing_size = 1; l = index; m = cl;
- while (m < no_classes &&
- (LT_Compare(q.list_together, memb.list_together) == 0)) {
- m++;
- while (partition_classes->l ~= m) {
- l++; q = c_iterator(q, depth, lt_value, ADVANCE_ITF);
- }
- if (LT_Compare(q.list_together, memb.list_together) == 0)
- listing_size++;
- }
-
- if (listing_size > 1) {
- ! The new group contains more than one partition class
- WriteMultiClassGroup(cl, memb, depth, partition_class_sizes);
- current_lt = memb.list_together;
- jump GroupComplete;
- }
- current_lt = EMPTY_TEXT_VALUE;
- @pull listing_size;
- }
-
- WriteSingleClassGroup(cl, memb, depth, partition_class_sizes->cl);
-
- .GroupComplete;
- groups_to_do--;
- if (c_style & ENGLISH_BIT ~= 0) {
- if (groups_to_do == 1) {
- if (TEMPLATE_CONFIGURATION_BITMAP & SERIAL_COMMA_TCBIT) {
- if (cl > 1) print ",";
- }
- LIST_WRITER_INTERNAL_RM('C');
- }
- if (groups_to_do > 1) print ", ";
- }
- }
-
- FreeStack(partition_class_sizes);
- FreeStack(partition_classes);
- ]; ! end of WriteListR
-
-
-
-
-§21. Write Multiple Class Group. The text of a single group which contains more than one partition class.
-We carry out the "grouping together" activity, so that the user can add
-text fore and aft — this is how groups of objects such as "X, Y and Z"
-can be fluffed up to "the letters X, Y and Z from a Scrabble set" —
-but the default is simple: we print the grouped items by calling
-WriteListR
once again, but this time starting from X, and where
-lt_value
is set to the common list_together
value of X, Y and Z.
-(That restricts the list to just the objects in this group.) Because
-lt_value
is set to this value, the grouping code won't then group X, Y
-and Z again, and they will instead be individual classes in the new
-list — so each will end up being sent, in turn, to WriteSingleClassGroup
-below, and that is where they are printed.
-
-
-
-
- [ WriteMultiClassGroup cl memb depth partition_class_sizes pv q k2 l;
- ! Save the style, because the activity below is allowed to change it
- q = c_style;
- if (c_style & INDENT_BIT ~= 0) PrintSpaces(2*(depth+c_margin));
-
- BeginActivity(GROUPING_TOGETHER_ACT, memb);
-
- if (ForActivity(GROUPING_TOGETHER_ACT, memb)) {
- c_style = c_style &~ NEWLINE_BIT;
- } else {
- pv = memb.list_together;
- if (TEXT_TY_IsSubstituted(pv) == false) {
- inventory_stage = 1;
- parser_one = memb; parser_two = depth + c_margin;
- if ((pv-->1)() == 1) jump Omit__Sublist2;
- } else if (pv) {
- ! Set k2 to the number of objects covered by the group
- k2 = 0;
- for (l=0 : l<listing_size : l++) k2 = k2 + partition_class_sizes->(l+cl);
- EnglishNumber(k2); print " ";
- print (TEXT_TY_Say) pv;
- if (c_style & ENGLISH_BIT ~= 0) print " (";
- if (c_style & INDENT_BIT ~= 0) print ":^";
- }
-
- c_margin++;
- @push lt_value; @push listing_together; @push listing_size;
-
- lt_value = memb.list_together; listing_together = memb;
- #Ifdef DBLW; print "^^DOWN lt_value = ", lt_value, " listing_together = ", memb, "^^";
- @push DBLW_no_classes; @push DBLW_no_objs; #Endif;
- WriteListR(memb, depth, false);
- #Ifdef DBLW; print "^^UP^^"; @pull DBLW_no_objs; @pull DBLW_no_classes; #Endif;
-
- @pull listing_size; @pull listing_together; @pull lt_value;
- c_margin--;
-
- pv = memb.list_together;
- if (TEXT_TY_IsSubstituted(pv) == false) {
- inventory_stage = 2;
- parser_one = memb; parser_two = depth+c_margin;
- (pv-->1)();
- } else if (LT_Compare(pv, EMPTY_TEXT_VALUE) ~= 0) {
- if (q & ENGLISH_BIT ~= 0) print ")";
- }
- .Omit__Sublist2;
- }
-
- EndActivity(GROUPING_TOGETHER_ACT, memb);
-
- ! If the NEWLINE_BIT has been forced by the activity, act now
- ! before it vanishes...
- if (q & NEWLINE_BIT ~= 0 && c_style & NEWLINE_BIT == 0) new_line;
-
- ! ...when the original style is restored again:
- c_style = q;
- ];
-
-
-
-
-§22. Write Single Class Group. The text of a single group which contains exactly one partition class.
-Because of the way the multiple-class case recurses, every class ends up
-in this routine sooner or later; this is the place where the actual
-name of an object is printed, at long last.
-
-
-
-
- [ WriteSingleClassGroup cl memb depth size q;
- q = c_style;
- if (c_style & INDENT_BIT) PrintSpaces(2*(depth+c_margin));
- if (size == 1) {
- if (c_style & NOARTICLE_BIT ~= 0) print (name) memb;
- else {
- if (c_style & DEFART_BIT) {
- if ((cl == 1) && (c_style & CFIRSTART_BIT)) print (The) memb;
- else print (the) memb;
- } else {
- if ((cl == 1) && (c_style & CFIRSTART_BIT)) print (CIndefArt) memb;
- else print (a) memb;
- }
- }
- } else {
- if (c_style & DEFART_BIT) {
- if ((cl == 1) && (c_style & CFIRSTART_BIT)) PrefaceByArticle(memb, 0, size);
- else PrefaceByArticle(memb, 1, size);
- }
- @push listing_size; listing_size = size;
- CarryOutActivity(PRINTING_A_NUMBER_OF_ACT, memb);
- @pull listing_size;
- }
- if ((size > 1) && (memb hasnt pluralname)) {
- give memb pluralname;
- WriteAfterEntry(memb, depth);
- give memb ~pluralname;
- } else WriteAfterEntry(memb, depth);
- c_style = q;
- ];
-
-
-
-
-§23. Write After Entry. Each entry can be followed by supplementary, usually parenthetical, information:
-exactly what, depends on the style. The extreme case is when the style, and
-the object, call for recursion to list the object-tree contents: this is
-achieved by calling WriteListR
, using the ObjectTreeIterator
(whatever
-the iterator used at the top level) and increasing the depth by 1.
-
-
-
-
- [ WriteAfterEntry o depth
- p recurse_flag parenth_flag eldest_child child_count combo;
-
- inventory_stage = 2;
- if (c_style & PARTINV_BIT) {
- BeginActivity(PRINTING_ROOM_DESC_DETAILS_ACT, o);
- if (ForActivity(PRINTING_ROOM_DESC_DETAILS_ACT, o) == false) {
- combo = 0;
- if (o has light && location hasnt light) combo=combo+1;
- if (o has container && o hasnt open) combo=combo+2;
- if ((o has container && (o has open || o has transparent))
- && (child(o)==0)) combo=combo+4;
- if (combo) LIST_WRITER_INTERNAL_RM('A'); ! space and open bracket
- switch (combo) {
- 1: LIST_WRITER_INTERNAL_RM('D', o);
- 2: LIST_WRITER_INTERNAL_RM('E', o);
- 3: LIST_WRITER_INTERNAL_RM('H', o);
- 4: LIST_WRITER_INTERNAL_RM('F', o);
- 5: LIST_WRITER_INTERNAL_RM('I', o);
- 6: LIST_WRITER_INTERNAL_RM('G', o);
- 7: LIST_WRITER_INTERNAL_RM('J', o);
- }
- if (combo) LIST_WRITER_INTERNAL_RM('B'); ! close bracket
- }
- EndActivity(PRINTING_ROOM_DESC_DETAILS_ACT, o);
- } ! end of PARTINV_BIT processing
-
- if (c_style & FULLINV_BIT) {
- BeginActivity(PRINTING_INVENTORY_DETAILS_ACT, o);
- if (ForActivity(PRINTING_INVENTORY_DETAILS_ACT, o) == false) {
- if (o has light && o has worn) { LIST_WRITER_INTERNAL_RM('A'); LIST_WRITER_INTERNAL_RM('K', o); parenth_flag = true; }
- else {
- if (o has light) { LIST_WRITER_INTERNAL_RM('A'); LIST_WRITER_INTERNAL_RM('D', o); parenth_flag = true; }
- if (o has worn) { LIST_WRITER_INTERNAL_RM('A'); LIST_WRITER_INTERNAL_RM('L', o); parenth_flag = true; }
- }
-
- if (o has container) {
- if (o has openable) {
- if (parenth_flag) {
- if (TEMPLATE_CONFIGURATION_BITMAP & SERIAL_COMMA_TCBIT)
- print ",";
- LIST_WRITER_INTERNAL_RM('C');
- } else LIST_WRITER_INTERNAL_RM('A', o);
- if (o has open) {
- if (child(o)) LIST_WRITER_INTERNAL_RM('M', o);
- else LIST_WRITER_INTERNAL_RM('N', o);
- } else {
- if (o has lockable && o has locked) LIST_WRITER_INTERNAL_RM('P', o);
- else LIST_WRITER_INTERNAL_RM('O', o);
- }
- parenth_flag = true;
- }
- else {
- if (child(o)==0 && o has transparent) {
- if (parenth_flag) { LIST_WRITER_INTERNAL_RM('C'); LIST_WRITER_INTERNAL_RM('F'); }
- else { LIST_WRITER_INTERNAL_RM('A'); LIST_WRITER_INTERNAL_RM('F'); LIST_WRITER_INTERNAL_RM('B'); }
- }
- }
- }
- if (parenth_flag) LIST_WRITER_INTERNAL_RM('B');
- }
- EndActivity(PRINTING_INVENTORY_DETAILS_ACT, o);
- } ! end of FULLINV_BIT processing
-
- child_count = 0;
- eldest_child = nothing;
- objectloop (p in o)
- if ((c_style & CONCEAL_BIT == 0) || (ConcealedFromLists(p) == false))
- if (p has list_filter_permits) {
- child_count++;
- if (eldest_child == nothing) eldest_child = p;
- }
-
- if (child_count && (c_style & ALWAYS_BIT)) {
- if (c_style & ENGLISH_BIT) { print " "; LIST_WRITER_INTERNAL_RM('Q', o); print " "; }
- recurse_flag = true;
- }
-
- if (child_count && (c_style & RECURSE_BIT)) {
- if (o has supporter) {
- if (c_style & ENGLISH_BIT) {
- if (c_style & TERSE_BIT) {
- LIST_WRITER_INTERNAL_RM('A', o);
- LIST_WRITER_INTERNAL_RM('R', o);
- } else LIST_WRITER_INTERNAL_RM('S', o);
- }
- recurse_flag = true;
- }
- if (o has container && (o has open || o has transparent)) {
- if (c_style & ENGLISH_BIT) {
- if (c_style & TERSE_BIT) {
- LIST_WRITER_INTERNAL_RM('A', o);
- LIST_WRITER_INTERNAL_RM('T', o);
- } else LIST_WRITER_INTERNAL_RM('U', o);
- }
- recurse_flag = true;
- }
- }
-
- if (recurse_flag && (c_style & ENGLISH_BIT)) {
- SetLWI(child_count, -1, eldest_child);
- LIST_WRITER_INTERNAL_RM('V', o); print " ";
- }
-
- if (c_style & NEWLINE_BIT) new_line;
-
- if (recurse_flag) {
- o = child(o);
- @push lt_value; @push listing_together; @push listing_size;
- @push c_iterator;
- c_iterator = ObjectTreeIterator;
- lt_value = EMPTY_TEXT_VALUE; listing_together = 0; listing_size = 0;
- WriteListR(o, depth+1, true);
- @pull c_iterator;
- @pull listing_size; @pull listing_together; @pull lt_value;
- if (c_style & TERSE_BIT) LIST_WRITER_INTERNAL_RM('B');
- }
- ];
-
-
-
-
-§24. Internal Rule. This rule does nothing in itself; it exists as a placeholder for the
-response texts used by the list-writer.
-
-
-
-
- [ LIST_WRITER_INTERNAL_R;
- ];
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/srules/S-pd.html b/docs/standard_rules/S-pd.html
similarity index 95%
rename from docs/srules/S-pd.html
rename to docs/standard_rules/S-pd.html
index cbb7cc61e..26e8662bc 100644
--- a/docs/srules/S-pd.html
+++ b/docs/standard_rules/S-pd.html
@@ -23,7 +23,7 @@ model of the passage of time in Basic Inform, so:
Chapter 1 - Saying
- Section 1 - Time Values (for interactive fiction language element only)
+ Section 1 - Time Values
To say (something - time) in words
(documented at phs_timewords):
@@ -325,7 +325,7 @@ silently, then any action X itself tries should also be tried silently.
Chapter 3 - Actions, activities and rules
- Section 1 - Trying actions (for interactive fiction language element only)
+ Section 1 - Trying actions
To try (S - action)
(documented at ph_try):
@@ -348,7 +348,7 @@ may be reimplemented using a verb "to require" at some future point.
- Section 2 - Action requirements (for interactive fiction language element only)
+ Section 2 - Action requirements
To decide whether the action requires a touchable noun
(documented at ph_requirestouch):
@@ -403,7 +403,7 @@ prevents this.
- Section 3 - Stop or continue (for interactive fiction language element only)
+ Section 3 - Stop or continue
To stop the action
(documented at ph_stopaction):
@@ -419,7 +419,7 @@ prevents this.
- Section 4 - Actions as values (for interactive fiction language element only)
+ Section 4 - Actions as values
To decide what action is the current action
(documented at ph_currentaction):
@@ -458,7 +458,7 @@ so as to avoid the verbs, but natural language just doesn't work that way.
Chapter 4 - The Model World
- Section 1 - Ending the story (for interactive fiction language element only)
+ Section 1 - Ending the story
To end the story
(documented at ph_end):
@@ -496,7 +496,7 @@ so as to avoid the verbs, but natural language just doesn't work that way.
- Section 2 - Times of day (for interactive fiction language element only)
+ Section 2 - Times of day
To decide which number is the minutes part of (t - time)
(documented at ph_minspart):
@@ -543,7 +543,7 @@ day, the latter at the very beginning.
- Section 3 - Durations (for interactive fiction language element only)
+ Section 3 - Durations
To decide which time is (n - number) minutes
(documented at ph_durationmins):
@@ -560,7 +560,7 @@ day, the latter at the very beginning.
- Section 4 - Timed events (for interactive fiction language element only)
+ Section 4 - Timed events
To (R - rule) in (t - number) turn/turns from now
(documented at ph_turnsfromnow):
@@ -580,7 +580,7 @@ day, the latter at the very beginning.
- Section 5 - Scenes (for interactive fiction language element only)
+ Section 5 - Scenes
To decide if (sc - scene) has happened
(documented at ph_hashappened):
@@ -603,7 +603,7 @@ day, the latter at the very beginning.
- Section 6 - Timing of scenes (for interactive fiction language element only)
+ Section 6 - Timing of scenes
To decide which time is the time since (sc - scene) began
(documented at ph_scenetimesincebegan):
@@ -626,7 +626,7 @@ day, the latter at the very beginning.
- Section 7 - Player's identity and location (for interactive fiction language element only)
+ Section 7 - Player's identity and location
To decide whether in darkness
(documented at ph_indarkness):
@@ -640,7 +640,7 @@ day, the latter at the very beginning.
- Section 8 - Moving and removing things (for interactive fiction language element only)
+ Section 8 - Moving and removing things
To move (something - object) to (something else - object),
without printing a room description
@@ -666,7 +666,7 @@ day, the latter at the very beginning.
- Section 9 - The map (for interactive fiction language element only)
+ Section 9 - The map
To decide which room is location of (O - object)
(documented at ph_locationof):
@@ -707,7 +707,7 @@ day, the latter at the very beginning.
- Section 10 - Route-finding (for interactive fiction language element only)
+ Section 10 - Route-finding
To decide which object is best route from (R1 - object) to (R2 - object),
using doors or using even locked doors
@@ -736,7 +736,7 @@ day, the latter at the very beginning.
- Section 11 - The object tree (for interactive fiction language element only)
+ Section 11 - The object tree
To decide which object is holder of (something - object)
(documented at ph_holder):
@@ -773,7 +773,7 @@ is a kind of value which doesm't exist in Basic Inform.
- Section 2 - The player's command (for interactive fiction language element only)
+ Section 2 - The player's command
To decide if (S - a snippet) matches (T - a topic)
(documented at ph_snippetmatches):
@@ -796,7 +796,7 @@ is a kind of value which doesm't exist in Basic Inform.
- Section 3 - Changing the player's command (for interactive fiction language element only)
+ Section 3 - Changing the player's command
To change the text of the player's command to (T - text)
(documented at ph_changecommand):
@@ -819,7 +819,7 @@ is a kind of value which doesm't exist in Basic Inform.
- Section 4 - Scope and pronouns (for interactive fiction language element only)
+ Section 4 - Scope and pronouns
To place (O - an object) in scope, but not its contents
(documented at ph_placeinscope):
@@ -890,7 +890,7 @@ used only by extensions built in to Inform; they may change at any time.
Chapter 6 - Deprecated or private phrases - Unindexed
- Section 1 - Spatial modelling - Unindexed (for interactive fiction language element only)
+ Section 1 - Spatial modelling - Unindexed
@@ -940,7 +940,7 @@ its further use.
- Section 2 - Room descriptions - Unindexed (for interactive fiction language element only)
+ Section 2 - Room descriptions - Unindexed
To produce a room description with going spacing conventions:
(- LookAfterGoing(); -).
@@ -985,7 +985,7 @@ to make user-defined actions convert, and some of the examples show this.)
- Section 3 - Action conversion - Unindexed (for interactive fiction language element only)
+ Section 3 - Action conversion - Unindexed
To convert to (AN - an action name) on (O - an object):
(- return GVS_Convert({AN},{O},0); -) - in to only.
@@ -1006,7 +1006,7 @@ work out all right.
- Section 4 - Surreptitious violation of invariants - Unindexed (for interactive fiction language element only)
+ Section 4 - Surreptitious violation of invariants - Unindexed
To surreptitiously move (something - object) to (something else - object):
(- move {something} to {something else}; -).
@@ -1023,7 +1023,7 @@ work out all right.
- Section 5 - Capitalised list-writing - Unindexed (for interactive fiction language element only)
+ Section 5 - Capitalised list-writing - Unindexed
To say list-writer list of marked objects: (-
WriteListOfMarkedObjects(ENGLISH_BIT);
@@ -1041,7 +1041,7 @@ the sake of a string comparison, and not shown on screen.
- Section 6 - Printing names - Unindexed (for interactive fiction language element only)
+ Section 6 - Printing names - Unindexed
To decide if expanding text for comparison purposes:
(- say__comp -).
@@ -1056,7 +1056,7 @@ when that would be.)
- Section 7 - Command parsing - Unindexed (for interactive fiction language element only)
+ Section 7 - Command parsing - Unindexed
To decide whether the I6 parser is running multiple actions:
(- (multiflag==1) -).
diff --git a/docs/srules/S-prm.html b/docs/standard_rules/S-prm.html
similarity index 100%
rename from docs/srules/S-prm.html
rename to docs/standard_rules/S-prm.html
diff --git a/docs/srules/S-pwm.html b/docs/standard_rules/S-pwm.html
similarity index 99%
rename from docs/srules/S-pwm.html
rename to docs/standard_rules/S-pwm.html
index c7c1944ce..99041c4b3 100644
--- a/docs/srules/S-pwm.html
+++ b/docs/standard_rules/S-pwm.html
@@ -19,7 +19,7 @@ world-modelling terms.
- Part Two - The Physical World Model (for interactive fiction language element only)
+ Part Two - The Physical World Model
Chapter 1 - Verbs and Relations
diff --git a/docs/srules/S-var.html b/docs/standard_rules/S-var.html
similarity index 99%
rename from docs/srules/S-var.html
rename to docs/standard_rules/S-var.html
index a0fce145e..4375fb5ff 100644
--- a/docs/srules/S-var.html
+++ b/docs/standard_rules/S-var.html
@@ -31,7 +31,7 @@ has a "translates into I6" sentence.
- Part Three - Variables and Rulebooks (for interactive fiction language element only)
+ Part Three - Variables and Rulebooks
Chapter 1 - Variables
diff --git a/docs/standard_rules/index.html b/docs/standard_rules/index.html
index 8171c21f2..44abf6b07 100644
--- a/docs/standard_rules/index.html
+++ b/docs/standard_rules/index.html
@@ -1,95 +1,43 @@
- standard_rules Template Library
+ srules 6
-
- ★
- standard_rules Template Library
- I6T source for the standard_rules library.
+ - ★
- srules 6
+ The Standard Rules extension, included in all interactive fiction projects.
-
-
Output Template -
- This is the superstructure of the file of I6 code output by NI: from ICL commands at the top down to the signing-off comments at the bottom.
+ Preamble -
+ The titling line and rubric, use options and a few other preliminaries before the Standard Rules get properly started.
-
-
Actions Template -
- To try actions by people in the model world, processing the necessary rulebooks.
+ Physical World Model -
+ Spatial relationships; the hierarchy of kinds used to model things and places, and their properties.
-
-
Activities Template -
- To run the necessary rulebooks to carry out an activity.
+ Variables and Rulebooks -
+ The global variables and those built-in rulebooks which do not belong either to specific actions or to specific activities.
-
-
Chronology Template -
- To record information now which will be needed later, when a condition phrased in the perfect tense is tested.
+ Activities -
+ The built-in activities and their default stock of rules; and in particular, the locale description mechanism.
-
-
Figures Template -
- To display figures and play sound effects.
+ Actions -
+ The standard stock of actions, along with the rules which define them; and the command grammar which requests them.
-
-
Glulx Template -
- To provide Glulx-specific actions.
+ Command Grammar -
+ The default grammar for parsing typed commands in play.
-
-
Light Template -
- The determination of light, visibility and physical access.
-
- -
-
ListWriter Template -
- A flexible object-lister taking care of plurals, inventory information, various formats and so on.
-
- -
-
MapRouteFinding -
- Testing and changing the fundamental spatial relations.
-
- -
-
Number Template -
- Support for parsing integers.
-
- -
-
OrderOfPlay Template -
- The sequence of events in play: the Main routine which runs the startup rulebook, the turn sequence rulebook and the shutdown rulebook; and most of the I6 definitions of primitive rules in those rulebooks.
-
- -
-
OutOfWorld Template -
- To implement some of the out of world actions.
-
- -
-
Parser Template -
- The parser for turning the text of the typed command into a proposed action by the player.
-
- -
-
Printing Template -
- To manage the line skips which space paragraphs out, and to handle the printing of names of objects, pieces of text and numbers.
-
- -
-
RTP Template -
- To issue run-time problem messages arising from the world model.
-
- -
-
StoredAction Template -
- Code to support the stored action kind of value.
-
- -
-
Tests Template -
- The command grammar and I6 implementation for testing commands such as TEST, ACTIONS and PURLOIN.
-
- -
-
Time Template -
- Support for parsing and printing times of day.
-
- -
-
WorldModel Template -
- Testing and changing the fundamental spatial relations.
-
- -
-
ZMachine Template -
- To provide Z-specific actions.
+ Phrase Definitions -
+ Additional phrases to do with interactive fiction, to add to the much larger collection provided by Basic Inform; and the final sign-off of the Standard Rules extension, including its minimal documentation.
diff --git a/docs/webs.html b/docs/webs.html
index 40c630558..5550b66c1 100644
--- a/docs/webs.html
+++ b/docs/webs.html
@@ -115,29 +115,33 @@ These pages showcase the woven form, and are for human eyes only.
The two extensions (though their use is compulsory) which, though themselves written in Inform, create the Inform language:
-
-
★ basicinform -
+
★ basic_inform -
version 1
- The Basic Inform extension, included in all projects.
-
-
★ srules -
+
★ standard_rules -
version 6
- The Standard Rules extension, included in all interactive fiction projects.
- The template libraries of run-time code which support these extensions:
+ The kits of Inter code which support low-level features of the language:
-
-
★ basic_inform -
+
★ BasicInformKit -
support for Inform as a programming language.
-
-
★ standard_rules -
- support for Inform as an interactive fiction tool.
+ ★ WorldModelKit -
+ support for modelling space, time and actions in interactive fiction.
-
-
★ basic_inform_extras -
+
★ CommandParserKit -
+ support for parsing turn-by-turn commands in interactive fiction.
+
+ -
+
★ BasicInformExtrasKit -
additional support needed only if the Standard Rules are not used.
diff --git a/basicinform/Contents.w b/inform7/extensions/basic_inform/Contents.w
similarity index 100%
rename from basicinform/Contents.w
rename to inform7/extensions/basic_inform/Contents.w
diff --git a/basicinform/Sections/Adjectival Definitions.w b/inform7/extensions/basic_inform/Sections/Adjectival Definitions.w
similarity index 100%
rename from basicinform/Sections/Adjectival Definitions.w
rename to inform7/extensions/basic_inform/Sections/Adjectival Definitions.w
diff --git a/basicinform/Sections/Miscellaneous Definitions.w b/inform7/extensions/basic_inform/Sections/Miscellaneous Definitions.w
similarity index 100%
rename from basicinform/Sections/Miscellaneous Definitions.w
rename to inform7/extensions/basic_inform/Sections/Miscellaneous Definitions.w
diff --git a/basicinform/Sections/Phrase Definitions.w b/inform7/extensions/basic_inform/Sections/Phrase Definitions.w
similarity index 100%
rename from basicinform/Sections/Phrase Definitions.w
rename to inform7/extensions/basic_inform/Sections/Phrase Definitions.w
diff --git a/basicinform/Sections/Preamble.w b/inform7/extensions/basic_inform/Sections/Preamble.w
similarity index 100%
rename from basicinform/Sections/Preamble.w
rename to inform7/extensions/basic_inform/Sections/Preamble.w
diff --git a/srules/Contents.w b/inform7/extensions/standard_rules/Contents.w
similarity index 100%
rename from srules/Contents.w
rename to inform7/extensions/standard_rules/Contents.w
diff --git a/srules/Sections/Actions.w b/inform7/extensions/standard_rules/Sections/Actions.w
similarity index 100%
rename from srules/Sections/Actions.w
rename to inform7/extensions/standard_rules/Sections/Actions.w
diff --git a/srules/Sections/Activities.w b/inform7/extensions/standard_rules/Sections/Activities.w
similarity index 100%
rename from srules/Sections/Activities.w
rename to inform7/extensions/standard_rules/Sections/Activities.w
diff --git a/srules/Sections/Command Grammar.w b/inform7/extensions/standard_rules/Sections/Command Grammar.w
similarity index 100%
rename from srules/Sections/Command Grammar.w
rename to inform7/extensions/standard_rules/Sections/Command Grammar.w
diff --git a/srules/Sections/Phrase Definitions.w b/inform7/extensions/standard_rules/Sections/Phrase Definitions.w
similarity index 100%
rename from srules/Sections/Phrase Definitions.w
rename to inform7/extensions/standard_rules/Sections/Phrase Definitions.w
diff --git a/srules/Sections/Physical World Model.w b/inform7/extensions/standard_rules/Sections/Physical World Model.w
similarity index 100%
rename from srules/Sections/Physical World Model.w
rename to inform7/extensions/standard_rules/Sections/Physical World Model.w
diff --git a/srules/Sections/Preamble.w b/inform7/extensions/standard_rules/Sections/Preamble.w
similarity index 100%
rename from srules/Sections/Preamble.w
rename to inform7/extensions/standard_rules/Sections/Preamble.w
diff --git a/srules/Sections/Variables and Rulebooks.w b/inform7/extensions/standard_rules/Sections/Variables and Rulebooks.w
similarity index 100%
rename from srules/Sections/Variables and Rulebooks.w
rename to inform7/extensions/standard_rules/Sections/Variables and Rulebooks.w
diff --git a/scripts/READMEscript.txt b/scripts/READMEscript.txt
index fc0ad9434..931f87ef2 100644
--- a/scripts/READMEscript.txt
+++ b/scripts/READMEscript.txt
@@ -121,14 +121,18 @@ This repository is where development is done on the following executables:
@primaryd(inrtps, 'Web of InC', 'P-ui')
@primaryd(inter, 'Web of InC', 'P-ui')
* its modules [★ inter](docs/inter-module/index.html), [★ codegen](docs/codegen-module/index.html)
-@primary(basicinform, 'Web of Inform 7')
-@primary(srules, 'Web of Inform 7')
-This repository also contains the webs for the Template (at the subtree inform7/Internal/Inter). These are libraries of low-level Inter code needed at run-time, whose source is written in Inform 6 notation:
+Two webs give detailed expositions of the most important built-in Inform extensions (at the subtree inform7/extensions):
-@primaryl(basic_inform, 'Web of Inform 6', 'Support for Inform as a programming language')
-@primaryl(standard_rules, 'Web of Inform 6', 'Support for Inform as an interactive fiction tool')
-@primaryl(basic_inform_extras, 'Web of Inform 6', 'Additional support needed only if the Standard Rules are not used')
+@primary(basic_inform, 'Web of Inform 7')
+@primary(standard_rules, 'Web of Inform 7')
+
+This repository also contains kits of Inter code (at the subtree inform7/Internal/Inter). These are libraries of code needed at run-time, and whose source is written in Inform 6 notation:
+
+@primaryl(BasicInformKit, 'Web of Inform 6', 'Support for Inform as a programming language')
+@primaryl(WorldModelKit, 'Web of Inform 6', 'Support for modelling space, time and actions in interactive fiction')
+@primaryl(CommandParserKit, 'Web of Inform 6', 'Support for parsing turn-by-turn commands in interactive fiction')
+@primaryl(BasicInformExtrasKit, 'Web of Inform 6', 'Additional support needed only if the Standard Rules are not used')
The inform7 subtree further contains these primary resources:
@@ -236,8 +240,8 @@ be edited. To make changes, edit scripts/READMEscript.txt and re-generate.
@define xweb(program)
★ @program -
- @version(@program)
- - @purpose(@program)
+ @version(inform7/extensions/@program)
+ - @purpose(inform7/extensions/@program)
@end
@define subweb(owner, program)
@@ -313,15 +317,16 @@ These pages showcase the woven form, and are for human eyes only.
The two extensions (though their use is compulsory) which, though themselves written in Inform, create the Inform language:
- @xweb('basicinform')
- @xweb('srules')
+ @xweb('basic_inform')
+ @xweb('standard_rules')
- The template libraries of run-time code which support these extensions:
+ The kits of Inter code which support low-level features of the language:
- @webt('basic_inform', 'support for Inform as a programming language.')
- @webt('standard_rules', 'support for Inform as an interactive fiction tool.')
- @webt('basic_inform_extras', 'additional support needed only if the Standard Rules are not used.')
+ @webt('BasicInformKit', 'support for Inform as a programming language.')
+ @webt('WorldModelKit', 'support for modelling space, time and actions in interactive fiction.')
+ @webt('CommandParserKit', 'support for parsing turn-by-turn commands in interactive fiction.')
+ @webt('BasicInformExtrasKit', 'additional support needed only if the Standard Rules are not used.')
Other webs in this repository:
diff --git a/scripts/makescript.txt b/scripts/makescript.txt
index c8d735a19..25662b2de 100644
--- a/scripts/makescript.txt
+++ b/scripts/makescript.txt
@@ -286,14 +286,14 @@ BINFORM = inform7/Internal/Extensions/Graham\ Nelson/Basic\ Inform.i7x
.PHONY: srules
srules: $(SRULES)
-$(SRULES): srules/Contents.w srules/Sections/*.w basicinform/Contents.w basicinform/Sections/*.w
- $(INWEBX) srules -tangle-to $(SRULES)
- $(INWEBX) basicinform -tangle-to $(BINFORM)
+$(SRULES): inform7/extensions/standard_rules/Contents.w inform7/extensions/standard_rules/Sections/*.w inform7/extensions/basic_inform/Contents.w inform7/extensions/basic_inform/Sections/*.w
+ $(INWEBX) inform7/extensions/standard_rules -tangle-to $(SRULES)
+ $(INWEBX) inform7/extensions/basic_inform -tangle-to $(BINFORM)
.PHONY: forcesrules
forcesrules:
- $(INWEBX) srules -tangle-to $(SRULES)
- $(INWEBX) basicinform -tangle-to $(BINFORM)
+ $(INWEBX) inform7/extensions/standard_rules -tangle-to $(SRULES)
+ $(INWEBX) inform7/extensions/basic_inform -tangle-to $(BINFORM)
# -----------------------------------------------------------------------------
# Target "tools"
@@ -436,8 +436,8 @@ pages:
$(INWEBX) inter/inter-module -weave-docs -weave-into docs/inter-module
$(INWEBX) inter/codegen-module -weave-docs -weave-into docs/codegen-module
$(INWEBX) inter/building-module -weave-docs -weave-into docs/building-module
- $(INWEBX) srules -weave-docs -weave-into docs/srules
- $(INWEBX) basicinform -weave-docs -weave-into docs/basicinform
+ $(INWEBX) inform7/extensions/standard_rules -weave-docs -weave-into docs/standard_rules
+ $(INWEBX) inform7/extensions/basic_inform -weave-docs -weave-into docs/basic_inform
# -----------------------------------------------------------------------------
# Target "clean"