mirror of
https://github.com/ganelson/inform.git
synced 2024-06-29 05:24:57 +03:00
Kits triumphans
This commit is contained in:
parent
c2d12b19f1
commit
2b69623824
|
@ -87,8 +87,8 @@ escape notations, see the core Inform source code.
|
|||
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|.
|
||||
|
||||
|
|
7
inform7/.gitignore
vendored
7
inform7/.gitignore
vendored
|
@ -40,7 +40,8 @@ Tests/Test Inter/_Inter_Binary/
|
|||
Tests/Test Maps/_Maps_Actual/
|
||||
Tests/Test Problems/_Results_Actual/
|
||||
|
||||
Internal/Inter/basic_inform/*.interb
|
||||
Internal/Inter/basic_inform_extras/*.interb
|
||||
Internal/Inter/standard_rules/*.interb
|
||||
Internal/Inter/BasicInformKit/*.interb
|
||||
Internal/Inter/BasicInformExtrasKit/*.interb
|
||||
Internal/Inter/WorldModelKit/*.interb
|
||||
Internal/Inter/CommandParserKit/*.interb
|
||||
|
||||
|
|
10
inform7/Internal/Inter/BasicInformExtrasKit/Contents.w
Normal file
10
inform7/Internal/Inter/BasicInformExtrasKit/Contents.w
Normal file
|
@ -0,0 +1,10 @@
|
|||
Title: BasicInformExtrasKit
|
||||
Author: Graham Nelson
|
||||
Purpose: Additional Inter-level support for non-interactive fiction uses of the Inform language.
|
||||
Language: Inform 6
|
||||
Licence: Artistic License 2.0
|
||||
Web Syntax Version: 2
|
||||
|
||||
Sections
|
||||
Miscellany
|
||||
Activities
|
|
@ -1,4 +1,4 @@
|
|||
Basic Inform Extras.
|
||||
Miscellany.
|
||||
|
||||
Additions to the Basic Inform template which are needed only if the Standard
|
||||
Rules are not to be used.
|
||||
|
@ -370,8 +370,6 @@ The routines accessible from outside this segment.
|
|||
return case;
|
||||
];
|
||||
|
||||
{-segment:Activities.i6t}
|
||||
|
||||
[ PNToVP gna;
|
||||
! if (prior_named_noun == player) return story_viewpoint;
|
||||
if (prior_named_noun) gna = GetGNAOfObject(prior_named_noun);
|
|
@ -1,32 +1,31 @@
|
|||
Title: basic_inform Template Library
|
||||
Title: BasicInformKit
|
||||
Author: Graham Nelson
|
||||
Purpose: I6T source for the basic_inform library.
|
||||
Purpose: Inter-level support for the fundamentals of the Inform language.
|
||||
Language: Inform 6
|
||||
Licence: Artistic License 2.0
|
||||
Web Syntax Version: 2
|
||||
|
||||
Sections
|
||||
Main
|
||||
BlockValues
|
||||
Char
|
||||
Combinations
|
||||
Definitions
|
||||
FileIO
|
||||
Flex
|
||||
Glulx
|
||||
Utilities
|
||||
Language
|
||||
Lists
|
||||
Mathematics
|
||||
MStack
|
||||
Glulx
|
||||
ZMachine
|
||||
Paragraphing
|
||||
Mathematics
|
||||
FileIO
|
||||
Sort
|
||||
Tables
|
||||
MStack
|
||||
Rulebooks
|
||||
Flex
|
||||
BlockValues
|
||||
Text
|
||||
UnicodeData
|
||||
Char
|
||||
RegExp
|
||||
Lists
|
||||
Combinations
|
||||
RelationKind
|
||||
Relations
|
||||
RTP
|
||||
Rulebooks
|
||||
Sort
|
||||
Tables
|
||||
Text
|
||||
UnicodeData
|
||||
Utilities
|
||||
ZMachine
|
|
@ -3,6 +3,11 @@ Glulx Template.
|
|||
To start up the Glk interface for the Glulx virtual machine, and
|
||||
provide Glulx-specific printing functions.
|
||||
|
||||
@h Begin Glulx-only matter.
|
||||
|
||||
=
|
||||
#Ifdef TARGET_GLULX;
|
||||
|
||||
@h Summary.
|
||||
This segment closely parallels "ZMachine.i6t", which provides exactly
|
||||
equivalent functionality (indeed, usually the same-named functions and in
|
||||
|
@ -1954,3 +1959,8 @@ text just appears in the main window.
|
|||
@aloadb x y sp;
|
||||
@return sp;
|
||||
];
|
||||
|
||||
@h End Glulx-only matter.
|
||||
|
||||
=
|
||||
#Endif;
|
|
@ -67,9 +67,6 @@ Constant TEXT_TY_Storage_Flags = BLK_FLAG_MULTIPLE + BLK_FLAG_16_BIT;
|
|||
Constant Large_Unicode_Tables;
|
||||
#ENDIF;
|
||||
|
||||
{-segment:UnicodeData.i6t}
|
||||
{-segment:Char.i6t}
|
||||
|
||||
@h KOV Support.
|
||||
See the "BlockValues.i6t" segment for the specification of the following
|
||||
routines. Because no block values are ever stored in a text, they can
|
|
@ -2,6 +2,164 @@ Utilities Template.
|
|||
|
||||
Miscellaneous utility routines for some fundamental I6 needs.
|
||||
|
||||
@h Miscellany.
|
||||
|
||||
=
|
||||
#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;
|
||||
|
||||
@h 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;
|
||||
|
||||
|
||||
@h 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.
|
||||
|
||||
=
|
||||
|
||||
@h More.
|
||||
|
||||
=
|
||||
|
||||
Array Protect_I7_Arrays --> 16339 12345;
|
||||
|
||||
@h 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; ];
|
||||
|
||||
@h 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
|
||||
|
||||
@h 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;
|
||||
|
||||
@h 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"; ];
|
||||
|
||||
@h Saying Phrases.
|
||||
|
||||
=
|
|
@ -2,6 +2,11 @@ ZMachine Template.
|
|||
|
||||
To provide routines handling low-level Z-machine facilities.
|
||||
|
||||
@h Begin Z-only matter.
|
||||
|
||||
=
|
||||
#Ifdef TARGET_ZCODE;
|
||||
|
||||
@h Summary.
|
||||
This segment closely parallels "Glulx.i6t", which provides exactly
|
||||
equivalent functionality (indeed, usually the same-named functions and in
|
||||
|
@ -497,3 +502,8 @@ These simply wrap the relevant opcodes.
|
|||
@loadw base offset -> sp;
|
||||
@ret sp;
|
||||
];
|
||||
|
||||
@h End Z-only matter.
|
||||
|
||||
=
|
||||
#Endif; ! TARGET_ZCODE
|
|
@ -194,6 +194,23 @@ description:some text
|
|||
index-default-value:""
|
||||
specification-text:Some text in double quotation marks, perhaps with substitutions written in square brackets.
|
||||
|
||||
+SNIPPET_TY:
|
||||
apply-macro:#BASE-KIND
|
||||
singular:snippet
|
||||
plural:snippets
|
||||
|
||||
instance-of:WORD_VALUE_TY
|
||||
instance-of:SAYABLE_VALUE_TY
|
||||
default-value:101
|
||||
|
||||
i6-printing-routine:PrintSnippet
|
||||
constant-compilation-method:none
|
||||
|
||||
description:a snippet
|
||||
documentation-reference:kind_snippet
|
||||
index-default-value:<i>word 1 of command</i>
|
||||
specification-text:A fragment of the player's most recent typed command, taking in a run of consecutive words.
|
||||
|
||||
+UNICODE_CHARACTER_TY:
|
||||
apply-macro:#BASE-KIND
|
||||
singular:unicode character
|
||||
|
@ -264,23 +281,6 @@ index-priority:6
|
|||
index-default-value:verb be
|
||||
specification-text:One of the verbs which Inform knows how to conjugate.
|
||||
|
||||
+SNIPPET_TY:
|
||||
apply-macro:#BASE-KIND
|
||||
singular:snippet
|
||||
plural:snippets
|
||||
|
||||
instance-of:WORD_VALUE_TY
|
||||
instance-of:SAYABLE_VALUE_TY
|
||||
default-value:101
|
||||
|
||||
i6-printing-routine:PrintSnippet
|
||||
constant-compilation-method:none
|
||||
|
||||
description:a snippet
|
||||
documentation-reference:kind_snippet
|
||||
index-default-value:<i>word 1 of command</i>
|
||||
specification-text:A fragment of the player's most recent typed command, taking in a run of consecutive words.
|
||||
|
||||
+TABLE_TY:
|
||||
apply-macro:#BASE-KIND
|
||||
singular:table name
|
||||
|
@ -333,21 +333,6 @@ index-default-value:allow access
|
|||
description:the name of a rulebook outcome
|
||||
index-priority:6
|
||||
|
||||
+UNDERSTANDING_TY:
|
||||
apply-macro:#BASE-KIND
|
||||
singular:topic
|
||||
plural:topics
|
||||
|
||||
instance-of:WORD_VALUE_TY
|
||||
cast:TEXT_TY
|
||||
default-value:DefaultTopic
|
||||
|
||||
i6-printing-routine-actions:DA_Topic
|
||||
constant-compilation-method:special
|
||||
|
||||
description:a topic
|
||||
index-priority:0
|
||||
|
||||
+INTERMEDIATE_TY:
|
||||
apply-macro:#BASE-KIND
|
||||
|
8
inform7/Internal/Inter/BasicInformKit/kit_metadata.txt
Normal file
8
inform7/Internal/Inter/BasicInformKit/kit_metadata.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
priority: 0
|
||||
extension: Basic Inform by Graham Nelson
|
||||
dependency: if not WorldModelKit then BasicInformExtrasKit
|
||||
kinds: Core.kindt
|
||||
kinds: Files.kindt
|
||||
activate: glulx external files
|
||||
defines Main: no
|
||||
index from: Basic.indext
|
10
inform7/Internal/Inter/CommandParserKit/Contents.w
Normal file
10
inform7/Internal/Inter/CommandParserKit/Contents.w
Normal file
|
@ -0,0 +1,10 @@
|
|||
Title: CommandParserKit
|
||||
Author: Graham Nelson
|
||||
Purpose: Inter-level support for command parsing in interactive fiction.
|
||||
Language: Inform 6
|
||||
Licence: Artistic License 2.0
|
||||
Web Syntax Version: 2
|
||||
|
||||
Sections
|
||||
Parser
|
||||
Tokens
|
15
inform7/Internal/Inter/CommandParserKit/kinds/Parsing.kindt
Normal file
15
inform7/Internal/Inter/CommandParserKit/kinds/Parsing.kindt
Normal file
|
@ -0,0 +1,15 @@
|
|||
+UNDERSTANDING_TY:
|
||||
apply-macro:#BASE-KIND
|
||||
singular:topic
|
||||
plural:topics
|
||||
|
||||
instance-of:WORD_VALUE_TY
|
||||
cast:TEXT_TY
|
||||
default-value:DefaultTopic
|
||||
|
||||
i6-printing-routine-actions:DA_Topic
|
||||
constant-compilation-method:special
|
||||
|
||||
description:a topic
|
||||
index-priority:0
|
||||
|
5
inform7/Internal/Inter/CommandParserKit/kit_metadata.txt
Normal file
5
inform7/Internal/Inter/CommandParserKit/kit_metadata.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
priority: 3
|
||||
extension: Standard Rules by Graham Nelson
|
||||
dependency: if CommandParserKit then WorldModelKit
|
||||
activate: command
|
||||
kinds: Parsing.kindt
|
|
@ -1,28 +1,26 @@
|
|||
Title: standard_rules Template Library
|
||||
Title: WorldModelKit
|
||||
Author: Graham Nelson
|
||||
Purpose: I6T source for the standard_rules library.
|
||||
Purpose: Inter-level support for modelling space, time and actions in interactive fiction.
|
||||
Language: Inform 6
|
||||
Licence: Artistic License 2.0
|
||||
Web Syntax Version: 2
|
||||
|
||||
Sections
|
||||
Main
|
||||
Actions
|
||||
Activities
|
||||
Chronology
|
||||
Figures
|
||||
Miscellany
|
||||
Glulx
|
||||
ZMachine
|
||||
Light
|
||||
ListWriter
|
||||
MapRouteFinding
|
||||
Number
|
||||
OrderOfPlay
|
||||
Actions
|
||||
Activities
|
||||
Figures
|
||||
OutOfWorld
|
||||
Parser
|
||||
Printing
|
||||
RTP
|
||||
StoredAction
|
||||
Tests
|
||||
Time
|
||||
WorldModel
|
||||
ZMachine
|
||||
MapRouteFinding
|
||||
RTP
|
||||
Time
|
||||
Tests
|
||||
Chronology
|
||||
StoredAction
|
|
@ -2,6 +2,11 @@ Glulx Template.
|
|||
|
||||
To provide Glulx-specific actions.
|
||||
|
||||
@h Begin Glulx-only matter.
|
||||
|
||||
=
|
||||
#Ifdef TARGET_GLULX;
|
||||
|
||||
@h 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
|
||||
|
@ -226,3 +231,8 @@ compared to the Z-machine's: hence the |+1|.
|
|||
indirect(#actions_table-->(action+1));
|
||||
rtrue;
|
||||
];
|
||||
|
||||
@h End Glulx-only matter.
|
||||
|
||||
=
|
||||
#Endif;
|
|
@ -247,21 +247,6 @@ of language definitions, this needs to come first.
|
|||
=
|
||||
Object Compass "compass" has concealed;
|
||||
|
||||
@h 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;
|
||||
|
||||
@h 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
|
||||
|
@ -280,8 +265,6 @@ I7 source text in the Standard Rules; and the rest of the library largely
|
|||
lives here:
|
||||
|
||||
=
|
||||
{-segment:Light.i6t}
|
||||
{-segment:ListWriter.i6t}
|
||||
|
||||
@h Parser.
|
||||
The largest single block of code in the traditional I6 library part of the
|
||||
|
@ -301,8 +284,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;
|
||||
|
@ -315,7 +296,6 @@ The |Main| routine, where execution begins, and the primitive rules in the
|
|||
principal rulebooks.
|
||||
|
||||
=
|
||||
{-segment:OrderOfPlay.i6t}
|
||||
|
||||
@h Activities.
|
||||
These are numbered upwards from 0 in order of creation. The following arrays
|
||||
|
@ -359,38 +339,23 @@ 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}
|
||||
|
||||
@h 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}
|
||||
|
||||
@h Text generation.
|
||||
|
||||
@h Testing commands.
|
||||
|
||||
=
|
||||
#IFDEF DEBUG;
|
||||
{-segment:Tests.i6t}
|
||||
#ENDIF; ! DEBUG
|
||||
|
||||
@h 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.
|
||||
|
||||
@h Entries in constant lists.
|
||||
Well: most of them, anyway. In particular, all of those which are lists of
|
||||
|
@ -413,7 +378,6 @@ 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}
|
||||
|
||||
@h Grammar.
|
||||
This is the trickiest matter of timing. We had to leave the grammar lines
|
||||
|
@ -481,11 +445,3 @@ handles the heap, and there is then one further section to support each of
|
|||
the kinds of value in question.
|
||||
|
||||
=
|
||||
{-segment:StoredAction.i6t}
|
||||
|
||||
@h Signing off.
|
||||
And that's all, folks.
|
||||
|
||||
=
|
||||
! End of automatically generated I6 source
|
||||
! --------------------------------------------------------------------------
|
|
@ -3,6 +3,11 @@ Tests Template.
|
|||
The command grammar and I6 implementation for testing commands such
|
||||
as TEST, ACTIONS and PURLOIN.
|
||||
|
||||
@h All testy.
|
||||
|
||||
=
|
||||
#Ifdef DEBUG;
|
||||
|
||||
@h 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
|
||||
|
@ -532,3 +537,8 @@ Verb meta 'trace'
|
|||
Verb meta 'tree'
|
||||
* -> XTree
|
||||
* scope=testcommandnoun -> XTree;
|
||||
|
||||
@h End testy.
|
||||
|
||||
=
|
||||
#Endif;
|
|
@ -2,6 +2,11 @@ ZMachine Template.
|
|||
|
||||
To provide Z-specific actions.
|
||||
|
||||
@h Begin Z-only matter.
|
||||
|
||||
=
|
||||
#Ifdef TARGET_ZCODE;
|
||||
|
||||
@h Veneer.
|
||||
|
||||
=
|
||||
|
@ -225,3 +230,8 @@ compared to the Z-machine's: hence the |+1|.
|
|||
indirect(#actions_table-->action);
|
||||
rtrue;
|
||||
];
|
||||
|
||||
@h End Z-only matter.
|
||||
|
||||
=
|
||||
#Endif; ! TARGET_ZCODE
|
|
@ -1,5 +1,5 @@
|
|||
priority: 2
|
||||
insert: Include the Standard Rules by Graham Nelson.
|
||||
extension: Standard Rules by Graham Nelson
|
||||
kinds: Actions.kindt
|
||||
kinds: Times.kindt
|
||||
kinds: Scenes.kindt
|
||||
|
@ -7,3 +7,5 @@ kinds: Figures.kindt
|
|||
kinds: Sounds.kindt
|
||||
activate: interactive fiction
|
||||
activate: multimedia
|
||||
defines Main: yes
|
||||
index from: Standard.indext
|
|
@ -1,188 +0,0 @@
|
|||
Basic Inform Template.
|
||||
|
||||
Support for the language alone.
|
||||
|
||||
@h Contents.
|
||||
|
||||
=
|
||||
{-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;
|
||||
|
||||
@h 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;
|
||||
|
||||
|
||||
@h 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;
|
||||
|
||||
@h More.
|
||||
|
||||
=
|
||||
{-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;
|
||||
|
||||
@h 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; ];
|
||||
|
||||
@h 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
|
||||
|
||||
@h 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;
|
||||
|
||||
@h 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"; ];
|
|
@ -1,6 +0,0 @@
|
|||
priority: 0
|
||||
insert: Include Basic Inform by Graham Nelson.
|
||||
dependency: if not standard_rules then basic_inform_extras
|
||||
kinds: Core.kindt
|
||||
kinds: Files.kindt
|
||||
activate: glulx external files
|
|
@ -1 +0,0 @@
|
|||
attach: /main/basic
|
|
@ -1,10 +0,0 @@
|
|||
Title: basic_inform_extras Template Library
|
||||
Author: Graham Nelson
|
||||
Purpose: I6T source for the basic_inform_extras library.
|
||||
Language: Inform 6
|
||||
Licence: Artistic License 2.0
|
||||
Web Syntax Version: 2
|
||||
|
||||
Sections
|
||||
Main
|
||||
Activities
|
|
@ -1 +0,0 @@
|
|||
attach: /main/basic_extras
|
|
@ -1 +0,0 @@
|
|||
attach: /main/template
|
|
@ -87,6 +87,7 @@
|
|||
if: $TYPE problem
|
||||
set: $A = $PATH/_Results_Actual/$CASE.txt
|
||||
set: $I = $PATH/_Results_Ideal/$CASE.txt
|
||||
debugger: lldb -f $I7 -- `$I7OPTIONS -require-problem $CASE -project $WORK/Example.inform -variable *template=$TCACHE -pipeline-file $PIPELINE -crash-all
|
||||
fail step: $I7 `$I7OPTIONS -require-problem $CASE -project $WORK/Example.inform -variable *template=$TCACHE -pipeline-file $PIPELINE >$A 2>&1
|
||||
or: 'failed to produce its namesake Problem message' $A
|
||||
show: $A
|
||||
|
@ -100,6 +101,7 @@
|
|||
! And then the general case.
|
||||
|
||||
set: $I7CONSOLE = $WORK/Example.inform/Build/i7_output.txt
|
||||
debugger: lldb -f $I7 -- `$I7OPTIONS -format=$FORMAT -project $WORK/Example.inform -variable *template=$TCACHE -pipeline-file $PIPELINE -crash-all
|
||||
step: $I7 `$I7OPTIONS -format=$FORMAT -project $WORK/Example.inform -variable *template=$TCACHE -pipeline-file $PIPELINE >$I7CONSOLE 2>&1
|
||||
or: 'failed with Problem message(s)' $I7CONSOLE
|
||||
show: $I7CONSOLE
|
||||
|
@ -187,9 +189,9 @@
|
|||
mkdir: $PATH/_Results_Ideal
|
||||
|
||||
if: $CASE PM_Map%c*
|
||||
set: $I7OPTIONS = -basic -format=$FORMAT -noprogress -fixtime -rng -sigils -clock -log nothing -external inform7/Tests -transient $WORK/Transient -internal $INTERNAL
|
||||
set: $I7OPTIONS = -kit BasicInformKit -format=$FORMAT -noprogress -fixtime -rng -sigils -clock -log nothing -external inform7/Tests -transient $WORK/Transient -internal $INTERNAL
|
||||
else
|
||||
set: $I7OPTIONS = -basic -format=$FORMAT -noprogress -fixtime -rng -sigils -clock -log nothing -external inform7/Tests -transient $WORK/Transient -noindex -internal $INTERNAL
|
||||
set: $I7OPTIONS = -kit BasicInformKit -format=$FORMAT -noprogress -fixtime -rng -sigils -clock -log nothing -external inform7/Tests -transient $WORK/Transient -noindex -internal $INTERNAL
|
||||
endif
|
||||
|
||||
if: $VM G
|
||||
|
@ -205,6 +207,7 @@
|
|||
if: $TYPE problem
|
||||
set: $A = $PATH/_Results_Actual/$CASE.txt
|
||||
set: $I = $PATH/_Results_Ideal/$CASE.txt
|
||||
debugger: lldb -f $I7 -- `$I7OPTIONS -require-problem $CASE -project $WORK/Example.inform -variable *template=$TCACHE -pipeline-file $PIPELINE -crash-all
|
||||
fail step: $I7 `$I7OPTIONS -require-problem $CASE -project $WORK/Example.inform -variable *template=$TCACHE -pipeline-file $PIPELINE >$A 2>&1
|
||||
or: 'failed to produce its namesake Problem message' $A
|
||||
show: $A
|
||||
|
@ -218,6 +221,7 @@
|
|||
! And then the general case.
|
||||
|
||||
set: $I7CONSOLE = $WORK/Example.inform/Build/i7_output.txt
|
||||
debugger: lldb -f $I7 -- `$I7OPTIONS -format=$FORMAT -project $WORK/Example.inform -variable *template=$TCACHE -pipeline-file $PIPELINE -crash-all
|
||||
step: $I7 `$I7OPTIONS -format=$FORMAT -project $WORK/Example.inform -variable *template=$TCACHE -pipeline-file $PIPELINE >$I7CONSOLE 2>&1
|
||||
or: 'failed with Problem message(s)' $I7CONSOLE
|
||||
show: $I7CONSOLE
|
||||
|
|
|
@ -11,7 +11,10 @@ typedef struct inform_kit {
|
|||
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;
|
||||
|
@ -41,7 +44,10 @@ inform_kit *Kits::load(text_stream *name) {
|
|||
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");
|
||||
|
@ -71,6 +77,10 @@ void Kits::read_metadata(text_stream *text, text_file_position *tfp, void *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");
|
||||
|
@ -78,6 +88,8 @@ void Kits::read_metadata(text_stream *text, text_file_position *tfp, void *state
|
|||
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+)")) {
|
||||
|
@ -86,8 +98,11 @@ void Kits::read_metadata(text_stream *text, text_file_position *tfp, void *state
|
|||
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);
|
||||
}
|
||||
|
@ -117,11 +132,24 @@ void Kits::perform_ittt(void) {
|
|||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
Kits::load(I"basic_inform");
|
||||
if (CoreMain::basic_mode() == FALSE) Kits::load(I"standard_rules");
|
||||
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);
|
||||
|
@ -172,6 +200,23 @@ void Kits::activate_plugins(void) {
|
|||
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;
|
||||
}
|
||||
|
||||
@ 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
|
||||
|
@ -185,11 +230,14 @@ files of source text to be read, and quite possibly more.
|
|||
@d BASIC_MODE_INSERTED_TEXT L"Include Basic Inform by Graham Nelson.\n\n"
|
||||
|
||||
=
|
||||
void Kits::feed_early_source_text(void) {
|
||||
void Kits::feed_early_source_text(OUTPUT_STREAM) {
|
||||
inform_kit *K;
|
||||
LOOP_OVER_LINKED_LIST(K, inform_kit, kits_to_include)
|
||||
if (K->early_source)
|
||||
Feeds::feed_stream(K->early_source);
|
||||
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;
|
||||
|
|
|
@ -26,7 +26,6 @@ int this_is_a_debug_compile = FALSE; /* Destined to be compiled with debug featu
|
|||
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 */
|
||||
|
@ -111,7 +110,6 @@ int CoreMain::main(int argc, char *argv[]) {
|
|||
arguments in order to set certain pathnames or filenames, so the following
|
||||
list is not exhaustive.
|
||||
|
||||
@e BASIC_CLSW
|
||||
@e CASE_CLSW
|
||||
@e CENSUS_CLSW
|
||||
@e CLOCK_CLSW
|
||||
|
@ -120,6 +118,7 @@ list is not exhaustive.
|
|||
@e FORMAT_CLSW
|
||||
@e CRASHALL_CLSW
|
||||
@e INTERNAL_CLSW
|
||||
@e KIT_CLSW
|
||||
@e NOINDEX_CLSW
|
||||
@e NOPROGRESS_CLSW
|
||||
@e PROJECT_CLSW
|
||||
|
@ -139,8 +138,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,
|
||||
|
@ -165,6 +162,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,
|
||||
|
@ -208,6 +207,15 @@ list is not exhaustive.
|
|||
}
|
||||
}
|
||||
|
||||
@d 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@> =
|
||||
Emit::begin();
|
||||
COMPILATION_STEP(Semantics::read_preform, I"Semantics::read_preform")
|
||||
|
@ -319,9 +327,7 @@ with "Output.i6t".
|
|||
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")
|
||||
|
@ -332,62 +338,51 @@ with "Output.i6t".
|
|||
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")
|
||||
|
@ -395,15 +390,13 @@ with "Output.i6t".
|
|||
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")
|
||||
|
@ -477,13 +470,13 @@ with "Output.i6t".
|
|||
@ Metadata.
|
||||
|
||||
@<Generate metadata@> =
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -527,7 +520,6 @@ void CoreMain::go_to_log_phase(text_stream *argument) {
|
|||
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;
|
||||
|
@ -544,6 +536,7 @@ void CoreMain::switch(int id, int val, text_stream *arg, void *state) {
|
|||
/* 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;
|
||||
|
@ -565,7 +558,7 @@ void CoreMain::switch(int id, int val, text_stream *arg, void *state) {
|
|||
|
||||
/* 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;
|
||||
|
@ -591,7 +584,3 @@ void CoreMain::set_inter_pipeline(wording W) {
|
|||
Str::delete_last_character(inter_processing_pipeline);
|
||||
LOG("Setting pipeline %S\n", inter_processing_pipeline);
|
||||
}
|
||||
|
||||
int CoreMain::basic_mode(void) {
|
||||
return basic_mode;
|
||||
}
|
||||
|
|
|
@ -192,8 +192,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 (CoreMain::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;
|
||||
}
|
||||
|
|
|
@ -375,8 +375,7 @@ points", say). This is where we do it:
|
|||
@h 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
|
||||
noted down:
|
||||
|
|
|
@ -296,7 +296,7 @@ ph_usage_data Phrases::Usage::new(wording W, int coarse_mode) {
|
|||
"the idea is to create new relations.)");
|
||||
}
|
||||
}
|
||||
if ((CoreMain::basic_mode()) && (<begin-phrase-preamble>(W))) {
|
||||
if (<begin-phrase-preamble>(W)) {
|
||||
phud.to_begin = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ plugin *core_plugin, *IF_plugin, *counting_plugin, *multimedia_plugin,
|
|||
*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];
|
||||
|
||||
|
@ -79,7 +79,8 @@ For now, at least, these names should not be translated out of English.
|
|||
sounds |
|
||||
glulx external files |
|
||||
bibliographic data |
|
||||
scoring
|
||||
scoring |
|
||||
chronology
|
||||
|
||||
@ And the following matches if and only if the text in question is (a) a
|
||||
valid plugin name, and (b) the name of a plugin which is being used at
|
||||
|
@ -144,6 +145,7 @@ word_assemblage Plugins::Manage::wording(int N) {
|
|||
@e GLULX_EXTERNAL_FILES_PLUGIN_NAME
|
||||
@e BIBLIOGRAPHIC_DATA_PLUGIN_NAME
|
||||
@e SCORE_PLUGIN_NAME
|
||||
@e CHRONOLOGY_PLUGIN_NAME
|
||||
|
||||
=
|
||||
void Plugins::Manage::start(void) {
|
||||
|
@ -157,7 +159,7 @@ void Plugins::Manage::start(void) {
|
|||
|
||||
#ifdef IF_MODULE
|
||||
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, IF_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);
|
||||
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);
|
||||
|
@ -172,6 +174,7 @@ void Plugins::Manage::start(void) {
|
|||
CREATE_PLUGIN(scenes_plugin, PL::Scenes::start, FALSE, SCENES_PLUGIN_NAME, IF_PLUGIN_NAME);
|
||||
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
|
||||
CREATE_PLUGIN(figures_plugin, PL::Figures::start, FALSE, FIGURES_PLUGIN_NAME, MULTIMEDIA_PLUGIN_NAME);
|
||||
|
|
|
@ -204,9 +204,6 @@ void VirtualMachines::emit_fundamental_constants(void) {
|
|||
|
||||
if ((this_is_a_release_compile == FALSE) || (this_is_a_debug_compile))
|
||||
VirtualMachines::emit_fundamental_constant(DEBUG_HL, 1);
|
||||
|
||||
if (CoreMain::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);
|
||||
|
|
|
@ -64,7 +64,6 @@ void Hierarchy::establish(inter_tree *I) {
|
|||
@e MAX_FRAME_SIZE_NEEDED_HL
|
||||
@e RNG_SEED_AT_START_OF_PLAY_HL
|
||||
|
||||
@e BASIC_MODE_HL
|
||||
@e SUBMAIN_HL
|
||||
|
||||
@<Establish basics@> =
|
||||
|
@ -100,9 +99,8 @@ void Hierarchy::establish(inter_tree *I) {
|
|||
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);
|
||||
|
||||
@h Modules.
|
||||
|
@ -1009,10 +1007,8 @@ void Hierarchy::establish(inter_tree *I) {
|
|||
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 (CoreMain::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);
|
||||
|
|
|
@ -29,7 +29,10 @@ int SourceFiles::read_extension_source_text(extension_file *EF,
|
|||
}
|
||||
|
||||
void SourceFiles::read_primary_source_text(void) {
|
||||
Kits::feed_early_source_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);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ int suppress_panel_changes = FALSE;
|
|||
void Data::Objects::page_World(OUTPUT_STREAM) {
|
||||
#ifdef IF_MODULE
|
||||
if (existing_story_file) return; /* in this case there is no model world */
|
||||
if (CoreMain::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);
|
||||
|
|
|
@ -255,7 +255,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) && (CoreMain::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@>;
|
||||
|
|
|
@ -30,6 +30,7 @@ Tests/Test Inter/_Inter_Binary/
|
|||
Tests/Test Maps/_Maps_Actual/
|
||||
Tests/Test Problems/_Results_Actual/
|
||||
|
||||
Internal/Inter/basic_inform/*.interb
|
||||
Internal/Inter/basic_inform_extras/*.interb
|
||||
Internal/Inter/standard_rules/*.interb
|
||||
Internal/Inter/BasicInformKit/*.interb
|
||||
Internal/Inter/BasicInformExtrasKit/*.interb
|
||||
Internal/Inter/WorldModelKit/*.interb
|
||||
Internal/Inter/CommandParserKit/*.interb
|
||||
|
|
|
@ -505,7 +505,7 @@ void Kinds::Interpreter::include_templates_for_kinds(void) {
|
|||
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;
|
||||
|
@ -815,6 +815,10 @@ void Kinds::Interpreter::apply_kind_command(single_kind_command stc, kind_constr
|
|||
|
||||
@<A few kind commands contribute to linked lists in the constructor structure@> =
|
||||
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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
prepare <- *attach
|
||||
merge-template <- Main.i6t
|
||||
merge-template <- all
|
||||
parse-linked-matter
|
||||
resolve-conditional-compilation
|
||||
assimilate
|
||||
|
|
|
@ -14,12 +14,13 @@ typedef struct inter_library {
|
|||
inter_library *CodeGen::Libraries::new(pathname *P) {
|
||||
inter_library *lib = CREATE(inter_library);
|
||||
lib->location = P;
|
||||
lib->attachment_point = NULL;
|
||||
filename *F = Filenames::in_folder(P, I"library_metadata.txt");
|
||||
TextFiles::read(F, FALSE,
|
||||
NULL, FALSE, CodeGen::Libraries::read_metadata, NULL, (void *) lib);
|
||||
if (lib->attachment_point == NULL)
|
||||
Errors::nowhere("library metadata file failed to set attachment point");
|
||||
lib->attachment_point = Str::new();
|
||||
WRITE_TO(lib->attachment_point, "/main/%S", Pathnames::directory_name(P));
|
||||
// filename *F = Filenames::in_folder(P, I"kit_metadata.txt");
|
||||
// TextFiles::read(F, FALSE,
|
||||
// NULL, FALSE, CodeGen::Libraries::read_metadata, NULL, (void *) lib);
|
||||
// if (lib->attachment_point == NULL)
|
||||
// Errors::nowhere("library metadata file failed to set attachment point");
|
||||
return lib;
|
||||
}
|
||||
|
||||
|
@ -50,7 +51,7 @@ void CodeGen::Libraries::read_metadata(text_stream *text,
|
|||
inter_library *CodeGen::Libraries::find(text_stream *name, int N, pathname **PP) {
|
||||
for (int i=0; i<N; i++) {
|
||||
pathname *P = Pathnames::subfolder(PP[i], name);
|
||||
filename *F = Filenames::in_folder(P, I"library_metadata.txt");
|
||||
filename *F = Filenames::in_folder(P, I"kit_metadata.txt");
|
||||
if (TextFiles::exists(F)) return CodeGen::Libraries::new(P);
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
@ -204,8 +204,32 @@ void TemplateReader::extract(text_stream *template_file, I6T_kit *kit) {
|
|||
(*(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;
|
||||
|
@ -468,6 +492,21 @@ safely between |{-open-index}| and |{-close-index}|.
|
|||
continue;
|
||||
}
|
||||
|
||||
@h Contents section.
|
||||
|
||||
=
|
||||
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);
|
||||
}
|
||||
|
||||
@h 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
|
||||
|
|
|
@ -166,54 +166,70 @@ inform7/Internal/Languages/English/Syntax.preform: inform7/Tangled/Syntax.prefor
|
|||
|
||||
.PHONY: intertemplate
|
||||
intertemplate: \
|
||||
inform7/Internal/Inter/basic_inform/arch-16d.interb \
|
||||
inform7/Internal/Inter/basic_inform/arch-16.interb \
|
||||
inform7/Internal/Inter/basic_inform/arch-32d.interb \
|
||||
inform7/Internal/Inter/basic_inform/arch-32.interb \
|
||||
inform7/Internal/Inter/basic_inform_extras/arch-16d.interb \
|
||||
inform7/Internal/Inter/basic_inform_extras/arch-16.interb \
|
||||
inform7/Internal/Inter/basic_inform_extras/arch-32d.interb \
|
||||
inform7/Internal/Inter/basic_inform_extras/arch-32.interb \
|
||||
inform7/Internal/Inter/standard_rules/arch-16d.interb \
|
||||
inform7/Internal/Inter/standard_rules/arch-16.interb \
|
||||
inform7/Internal/Inter/standard_rules/arch-32d.interb \
|
||||
inform7/Internal/Inter/standard_rules/arch-32.interb
|
||||
inform7/Internal/Inter/BasicInformKit/arch-16d.interb \
|
||||
inform7/Internal/Inter/BasicInformKit/arch-16.interb \
|
||||
inform7/Internal/Inter/BasicInformKit/arch-32d.interb \
|
||||
inform7/Internal/Inter/BasicInformKit/arch-32.interb \
|
||||
inform7/Internal/Inter/BasicInformExtrasKit/arch-16d.interb \
|
||||
inform7/Internal/Inter/BasicInformExtrasKit/arch-16.interb \
|
||||
inform7/Internal/Inter/BasicInformExtrasKit/arch-32d.interb \
|
||||
inform7/Internal/Inter/BasicInformExtrasKit/arch-32.interb \
|
||||
inform7/Internal/Inter/WorldModelKit/arch-16d.interb \
|
||||
inform7/Internal/Inter/WorldModelKit/arch-16.interb \
|
||||
inform7/Internal/Inter/WorldModelKit/arch-32d.interb \
|
||||
inform7/Internal/Inter/WorldModelKit/arch-32.interb \
|
||||
inform7/Internal/Inter/CommandParserKit/arch-16d.interb \
|
||||
inform7/Internal/Inter/CommandParserKit/arch-16.interb \
|
||||
inform7/Internal/Inter/CommandParserKit/arch-32d.interb \
|
||||
inform7/Internal/Inter/CommandParserKit/arch-32.interb
|
||||
|
||||
inform7/Internal/Inter/basic_inform/arch-16d.interb: inform7/Internal/Inter/basic_inform/Sections/*.i6t
|
||||
$(INTERX) -architecture 16d -assimilate inform7/Internal/Inter/basic_inform
|
||||
inform7/Internal/Inter/BasicInformKit/arch-16d.interb: inform7/Internal/Inter/BasicInformKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 16d -assimilate inform7/Internal/Inter/BasicInformKit
|
||||
|
||||
inform7/Internal/Inter/basic_inform/arch-16.interb: inform7/Internal/Inter/basic_inform/Sections/*.i6t
|
||||
$(INTERX) -architecture 16 -assimilate inform7/Internal/Inter/basic_inform
|
||||
inform7/Internal/Inter/BasicInformKit/arch-16.interb: inform7/Internal/Inter/BasicInformKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 16 -assimilate inform7/Internal/Inter/BasicInformKit
|
||||
|
||||
inform7/Internal/Inter/basic_inform/arch-32d.interb: inform7/Internal/Inter/basic_inform/Sections/*.i6t
|
||||
$(INTERX) -architecture 32d -assimilate inform7/Internal/Inter/basic_inform
|
||||
inform7/Internal/Inter/BasicInformKit/arch-32d.interb: inform7/Internal/Inter/BasicInformKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 32d -assimilate inform7/Internal/Inter/BasicInformKit
|
||||
|
||||
inform7/Internal/Inter/basic_inform/arch-32.interb: inform7/Internal/Inter/basic_inform/Sections/*.i6t
|
||||
$(INTERX) -architecture 32 -assimilate inform7/Internal/Inter/basic_inform
|
||||
inform7/Internal/Inter/BasicInformKit/arch-32.interb: inform7/Internal/Inter/BasicInformKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 32 -assimilate inform7/Internal/Inter/BasicInformKit
|
||||
|
||||
inform7/Internal/Inter/basic_inform_extras/arch-16d.interb: inform7/Internal/Inter/basic_inform_extras/Sections/*.i6t
|
||||
$(INTERX) -architecture 16d -assimilate inform7/Internal/Inter/basic_inform_extras
|
||||
inform7/Internal/Inter/BasicInformExtrasKit/arch-16d.interb: inform7/Internal/Inter/BasicInformExtrasKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 16d -assimilate inform7/Internal/Inter/BasicInformExtrasKit
|
||||
|
||||
inform7/Internal/Inter/basic_inform_extras/arch-16.interb: inform7/Internal/Inter/basic_inform_extras/Sections/*.i6t
|
||||
$(INTERX) -architecture 16 -assimilate inform7/Internal/Inter/basic_inform_extras
|
||||
inform7/Internal/Inter/BasicInformExtrasKit/arch-16.interb: inform7/Internal/Inter/BasicInformExtrasKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 16 -assimilate inform7/Internal/Inter/BasicInformExtrasKit
|
||||
|
||||
inform7/Internal/Inter/basic_inform_extras/arch-32d.interb: inform7/Internal/Inter/basic_inform_extras/Sections/*.i6t
|
||||
$(INTERX) -architecture 32d -assimilate inform7/Internal/Inter/basic_inform_extras
|
||||
inform7/Internal/Inter/BasicInformExtrasKit/arch-32d.interb: inform7/Internal/Inter/BasicInformExtrasKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 32d -assimilate inform7/Internal/Inter/BasicInformExtrasKit
|
||||
|
||||
inform7/Internal/Inter/basic_inform_extras/arch-32.interb: inform7/Internal/Inter/basic_inform_extras/Sections/*.i6t
|
||||
$(INTERX) -architecture 32 -assimilate inform7/Internal/Inter/basic_inform_extras
|
||||
inform7/Internal/Inter/BasicInformExtrasKit/arch-32.interb: inform7/Internal/Inter/BasicInformExtrasKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 32 -assimilate inform7/Internal/Inter/BasicInformExtrasKit
|
||||
|
||||
inform7/Internal/Inter/standard_rules/arch-16d.interb: inform7/Internal/Inter/standard_rules/Sections/*.i6t
|
||||
$(INTERX) -architecture 16d -assimilate inform7/Internal/Inter/standard_rules
|
||||
inform7/Internal/Inter/WorldModelKit/arch-16d.interb: inform7/Internal/Inter/WorldModelKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 16d -assimilate inform7/Internal/Inter/WorldModelKit
|
||||
|
||||
inform7/Internal/Inter/standard_rules/arch-16.interb: inform7/Internal/Inter/standard_rules/Sections/*.i6t
|
||||
$(INTERX) -architecture 16 -assimilate inform7/Internal/Inter/standard_rules
|
||||
inform7/Internal/Inter/WorldModelKit/arch-16.interb: inform7/Internal/Inter/WorldModelKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 16 -assimilate inform7/Internal/Inter/WorldModelKit
|
||||
|
||||
inform7/Internal/Inter/standard_rules/arch-32d.interb: inform7/Internal/Inter/standard_rules/Sections/*.i6t
|
||||
$(INTERX) -architecture 32d -assimilate inform7/Internal/Inter/standard_rules
|
||||
inform7/Internal/Inter/WorldModelKit/arch-32d.interb: inform7/Internal/Inter/WorldModelKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 32d -assimilate inform7/Internal/Inter/WorldModelKit
|
||||
|
||||
inform7/Internal/Inter/standard_rules/arch-32.interb: inform7/Internal/Inter/standard_rules/Sections/*.i6t
|
||||
$(INTERX) -architecture 32 -assimilate inform7/Internal/Inter/standard_rules
|
||||
inform7/Internal/Inter/WorldModelKit/arch-32.interb: inform7/Internal/Inter/WorldModelKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 32 -assimilate inform7/Internal/Inter/WorldModelKit
|
||||
|
||||
inform7/Internal/Inter/CommandParserKit/arch-16d.interb: inform7/Internal/Inter/CommandParserKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 16d -assimilate inform7/Internal/Inter/CommandParserKit
|
||||
|
||||
inform7/Internal/Inter/CommandParserKit/arch-16.interb: inform7/Internal/Inter/CommandParserKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 16 -assimilate inform7/Internal/Inter/CommandParserKit
|
||||
|
||||
inform7/Internal/Inter/CommandParserKit/arch-32d.interb: inform7/Internal/Inter/CommandParserKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 32d -assimilate inform7/Internal/Inter/CommandParserKit
|
||||
|
||||
inform7/Internal/Inter/CommandParserKit/arch-32.interb: inform7/Internal/Inter/CommandParserKit/Sections/*.i6t
|
||||
$(INTERX) -architecture 32 -assimilate inform7/Internal/Inter/CommandParserKit
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Target "makers"
|
||||
|
@ -391,9 +407,10 @@ endef
|
|||
.PHONY: pages
|
||||
pages:
|
||||
$(INPOLICYX) -write-me scripts/READMEscript.txt
|
||||
$(INWEBX) inform7/Internal/Inter/basic_inform -weave-docs -weave-into docs/basic_inform
|
||||
$(INWEBX) inform7/Internal/Inter/standard_rules -weave-docs -weave-into docs/standard_rules
|
||||
$(INWEBX) inform7/Internal/Inter/basic_inform_extras -weave-docs -weave-into docs/basic_inform_extras
|
||||
$(INWEBX) inform7/Internal/Inter/BasicInformKit -weave-docs -weave-into docs/BasicInformKit
|
||||
$(INWEBX) inform7/Internal/Inter/WorldModelKit -weave-docs -weave-into docs/WorldModelKit
|
||||
$(INWEBX) inform7/Internal/Inter/CommandParserKit -weave-docs -weave-into docs/CommandParserKit
|
||||
$(INWEBX) inform7/Internal/Inter/BasicInformExtrasKit -weave-docs -weave-into docs/BasicInformExtrasKit
|
||||
$(INWEBX) inblorb -weave-docs -weave-into docs/inblorb
|
||||
$(INWEBX) indoc -weave-docs -weave-into docs/indoc
|
||||
$(INWEBX) inform7 -weave-docs -weave-into docs/inform7
|
||||
|
@ -515,12 +532,14 @@ integration: \
|
|||
$(INTERNAL)/Languages/English/Basic.indext \
|
||||
$(SRULESINPLACE) \
|
||||
$(BINFORMINPLACE) \
|
||||
$(INTERNAL)/Inter/basic_inform/arch-32d.interb \
|
||||
$(INTERNAL)/Inter/basic_inform/kit_metadata.txt \
|
||||
$(INTERNAL)/Inter/basic_inform_extras/arch-32d.interb \
|
||||
$(INTERNAL)/Inter/basic_inform_extras/kit_metadata.txt \
|
||||
$(INTERNAL)/Inter/standard_rules/arch-32d.interb \
|
||||
$(INTERNAL)/Inter/standard_rules/kit_metadata.txt \
|
||||
$(INTERNAL)/Inter/BasicInformKit/arch-32d.interb \
|
||||
$(INTERNAL)/Inter/BasicInformKit/kit_metadata.txt \
|
||||
$(INTERNAL)/Inter/BasicInformExtrasKit/arch-32d.interb \
|
||||
$(INTERNAL)/Inter/BasicInformExtrasKit/kit_metadata.txt \
|
||||
$(INTERNAL)/Inter/WorldModelKit/arch-32d.interb \
|
||||
$(INTERNAL)/Inter/WorldModelKit/kit_metadata.txt \
|
||||
$(INTERNAL)/Inter/CommandParserKit/arch-32d.interb \
|
||||
$(INTERNAL)/Inter/CommandParserKit/kit_metadata.txt \
|
||||
$(INTERNAL)/Inter/default.interpipeline \
|
||||
$(DOCEXEMPLUM) \
|
||||
$(INTERNALEXEMPLUM) \
|
||||
|
@ -619,40 +638,52 @@ endef
|
|||
|
||||
# (d) Copying the I6 template into the app
|
||||
|
||||
$(INTERNAL)/Inter/standard_rules/arch-32d.interb: \
|
||||
inform7/Internal/Inter/standard_rules/arch-32d.interb
|
||||
$(INTERNAL)/Inter/WorldModelKit/arch-32d.interb: \
|
||||
inform7/Internal/Inter/WorldModelKit/arch-32d.interb
|
||||
$(call transfer-i6-template)
|
||||
|
||||
$(INTERNAL)/Inter/basic_inform/arch-32d.interb: \
|
||||
inform7/Internal/Inter/basic_inform/arch-32d.interb
|
||||
$(INTERNAL)/Inter/CommandParserKit/arch-32d.interb: \
|
||||
inform7/Internal/Inter/CommandParserKit/arch-32d.interb
|
||||
$(call transfer-i6-template)
|
||||
|
||||
$(INTERNAL)/Inter/basic_inform/kinds/*.kindt: \
|
||||
inform7/Internal/Inter/basic_inform/kinds/*.kindt
|
||||
$(INTERNAL)/Inter/BasicInformKit/arch-32d.interb: \
|
||||
inform7/Internal/Inter/BasicInformKit/arch-32d.interb
|
||||
$(call transfer-i6-template)
|
||||
|
||||
$(INTERNAL)/Inter/basic_inform_extras/arch-32d.interb: \
|
||||
inform7/Internal/Inter/basic_inform_extras/arch-32d.interb
|
||||
$(INTERNAL)/Inter/BasicInformKit/kinds/*.kindt: \
|
||||
inform7/Internal/Inter/BasicInformKit/kinds/*.kindt
|
||||
$(call transfer-i6-template)
|
||||
|
||||
$(INTERNAL)/Inter/basic_inform_extras/kinds/*.kindt: \
|
||||
inform7/Internal/Inter/basic_inform_extras/kinds/*.kindt
|
||||
$(INTERNAL)/Inter/BasicInformExtrasKit/arch-32d.interb: \
|
||||
inform7/Internal/Inter/BasicInformExtrasKit/arch-32d.interb
|
||||
$(call transfer-i6-template)
|
||||
|
||||
$(INTERNAL)/Inter/basic_inform/kit_metadata.txt: \
|
||||
inform7/Internal/Inter/basic_inform/kit_metadata.txt
|
||||
$(INTERNAL)/Inter/BasicInformExtrasKit/kinds/*.kindt: \
|
||||
inform7/Internal/Inter/BasicInformExtrasKit/kinds/*.kindt
|
||||
$(call transfer-i6-template)
|
||||
|
||||
$(INTERNAL)/Inter/basic_inform_extras/kit_metadata.txt: \
|
||||
inform7/Internal/Inter/basic_inform_extras/kit_metadata.txt
|
||||
$(INTERNAL)/Inter/BasicInformKit/kit_metadata.txt: \
|
||||
inform7/Internal/Inter/BasicInformKit/kit_metadata.txt
|
||||
$(call transfer-i6-template)
|
||||
|
||||
$(INTERNAL)/Inter/standard_rules/kit_metadata.txt: \
|
||||
inform7/Internal/Inter/standard_rules/kit_metadata.txt
|
||||
$(INTERNAL)/Inter/BasicInformExtrasKit/kit_metadata.txt: \
|
||||
inform7/Internal/Inter/BasicInformExtrasKit/kit_metadata.txt
|
||||
$(call transfer-i6-template)
|
||||
|
||||
$(INTERNAL)/Inter/standard_rules/kinds/*.kindt: \
|
||||
inform7/Internal/Inter/standard_rules/kinds/*.kindt
|
||||
$(INTERNAL)/Inter/WorldModelKit/kit_metadata.txt: \
|
||||
inform7/Internal/Inter/WorldModelKit/kit_metadata.txt
|
||||
$(call transfer-i6-template)
|
||||
|
||||
$(INTERNAL)/Inter/WorldModelKit/kinds/*.kindt: \
|
||||
inform7/Internal/Inter/WorldModelKit/kinds/*.kindt
|
||||
$(call transfer-i6-template)
|
||||
|
||||
$(INTERNAL)/Inter/CommandParserKit/kit_metadata.txt: \
|
||||
inform7/Internal/Inter/CommandParserKit/kit_metadata.txt
|
||||
$(call transfer-i6-template)
|
||||
|
||||
$(INTERNAL)/Inter/CommandParserKit/kinds/*.kindt: \
|
||||
inform7/Internal/Inter/CommandParserKit/kinds/*.kindt
|
||||
$(call transfer-i6-template)
|
||||
|
||||
# The I6 template could be tangled by inweb, but we don't do so: instead the
|
||||
|
@ -663,36 +694,44 @@ define transfer-i6-template
|
|||
mkdir -p "$(INTERNAL)/Inter"
|
||||
rm -f $(INTERNAL)/Inter/*.i6t
|
||||
cp -R -f inform7/Internal/Inter/*.interpipeline $(INTERNAL)/Inter
|
||||
mkdir -p "$(INTERNAL)/Inter/standard_rules"
|
||||
mkdir -p "$(INTERNAL)/Inter/standard_rules/source"
|
||||
rm -f $(INTERNAL)/Inter/standard_rules/Sections/*.i6t
|
||||
rm -f $(INTERNAL)/Inter/standard_rules/*.interb
|
||||
cp -R -f inform7/Internal/Inter/standard_rules/Sections/*.i6t $(INTERNAL)/Inter/standard_rules/source
|
||||
cp -R -f inform7/Internal/Inter/standard_rules/*.interb $(INTERNAL)/Inter/standard_rules
|
||||
cp -R -f inform7/Internal/Inter/standard_rules/library_metadata.txt $(INTERNAL)/Inter/standard_rules
|
||||
cp -R -f inform7/Internal/Inter/standard_rules/kit_metadata.txt $(INTERNAL)/Inter/standard_rules
|
||||
mkdir -p "$(INTERNAL)/Inter/basic_inform"
|
||||
mkdir -p "$(INTERNAL)/Inter/basic_inform/source"
|
||||
rm -f $(INTERNAL)/Inter/basic_inform/Sections/*.i6t
|
||||
rm -f $(INTERNAL)/Inter/basic_inform/*.interb
|
||||
cp -R -f inform7/Internal/Inter/basic_inform/Sections/*.i6t $(INTERNAL)/Inter/basic_inform/source
|
||||
cp -R -f inform7/Internal/Inter/basic_inform/*.interb $(INTERNAL)/Inter/basic_inform
|
||||
cp -R -f inform7/Internal/Inter/basic_inform/library_metadata.txt $(INTERNAL)/Inter/basic_inform
|
||||
cp -R -f inform7/Internal/Inter/basic_inform/kit_metadata.txt $(INTERNAL)/Inter/basic_inform
|
||||
mkdir -p "$(INTERNAL)/Inter/basic_inform_extras"
|
||||
mkdir -p "$(INTERNAL)/Inter/basic_inform_extras/source"
|
||||
rm -f $(INTERNAL)/Inter/basic_inform_extras/Sections/*.i6t
|
||||
rm -f $(INTERNAL)/Inter/basic_inform_extras/*.interb
|
||||
cp -R -f inform7/Internal/Inter/basic_inform_extras/Sections/*.i6t $(INTERNAL)/Inter/basic_inform_extras/source
|
||||
cp -R -f inform7/Internal/Inter/basic_inform_extras/*.interb $(INTERNAL)/Inter/basic_inform_extras
|
||||
cp -R -f inform7/Internal/Inter/basic_inform_extras/library_metadata.txt $(INTERNAL)/Inter/basic_inform_extras
|
||||
cp -R -f inform7/Internal/Inter/basic_inform_extras/kit_metadata.txt $(INTERNAL)/Inter/basic_inform_extras
|
||||
mkdir -p "$(INTERNAL)/Inter/basic_inform/kinds"
|
||||
rm -f $(INTERNAL)/Inter/basic_inform/kinds/*.kindt
|
||||
cp -R -f inform7/Internal/Inter/basic_inform/kinds/*.kindt $(INTERNAL)/Inter/basic_inform/kinds
|
||||
mkdir -p "$(INTERNAL)/Inter/standard_rules/kinds"
|
||||
rm -f $(INTERNAL)/Inter/standard_rules/kinds/*.kindt
|
||||
cp -R -f inform7/Internal/Inter/standard_rules/kinds/*.kindt $(INTERNAL)/Inter/standard_rules/kinds
|
||||
mkdir -p "$(INTERNAL)/Inter/WorldModelKit"
|
||||
mkdir -p "$(INTERNAL)/Inter/WorldModelKit/source"
|
||||
rm -f $(INTERNAL)/Inter/WorldModelKit/Sections/*.i6t
|
||||
rm -f $(INTERNAL)/Inter/WorldModelKit/*.interb
|
||||
cp -R -f inform7/Internal/Inter/WorldModelKit/Sections/*.i6t $(INTERNAL)/Inter/WorldModelKit/source
|
||||
cp -R -f inform7/Internal/Inter/WorldModelKit/*.interb $(INTERNAL)/Inter/WorldModelKit
|
||||
cp -R -f inform7/Internal/Inter/WorldModelKit/library_metadata.txt $(INTERNAL)/Inter/WorldModelKit
|
||||
cp -R -f inform7/Internal/Inter/WorldModelKit/kit_metadata.txt $(INTERNAL)/Inter/WorldModelKit
|
||||
mkdir -p "$(INTERNAL)/Inter/CommandParserKit"
|
||||
mkdir -p "$(INTERNAL)/Inter/CommandParserKit/source"
|
||||
rm -f $(INTERNAL)/Inter/CommandParserKit/Sections/*.i6t
|
||||
rm -f $(INTERNAL)/Inter/CommandParserKit/*.interb
|
||||
cp -R -f inform7/Internal/Inter/CommandParserKit/Sections/*.i6t $(INTERNAL)/Inter/CommandParserKit/source
|
||||
cp -R -f inform7/Internal/Inter/CommandParserKit/*.interb $(INTERNAL)/Inter/CommandParserKit
|
||||
cp -R -f inform7/Internal/Inter/CommandParserKit/library_metadata.txt $(INTERNAL)/Inter/CommandParserKit
|
||||
cp -R -f inform7/Internal/Inter/CommandParserKit/kit_metadata.txt $(INTERNAL)/Inter/CommandParserKit
|
||||
mkdir -p "$(INTERNAL)/Inter/BasicInformKit"
|
||||
mkdir -p "$(INTERNAL)/Inter/BasicInformKit/source"
|
||||
rm -f $(INTERNAL)/Inter/BasicInformKit/Sections/*.i6t
|
||||
rm -f $(INTERNAL)/Inter/BasicInformKit/*.interb
|
||||
cp -R -f inform7/Internal/Inter/BasicInformKit/Sections/*.i6t $(INTERNAL)/Inter/BasicInformKit/source
|
||||
cp -R -f inform7/Internal/Inter/BasicInformKit/*.interb $(INTERNAL)/Inter/BasicInformKit
|
||||
cp -R -f inform7/Internal/Inter/BasicInformKit/library_metadata.txt $(INTERNAL)/Inter/BasicInformKit
|
||||
cp -R -f inform7/Internal/Inter/BasicInformKit/kit_metadata.txt $(INTERNAL)/Inter/BasicInformKit
|
||||
mkdir -p "$(INTERNAL)/Inter/BasicInformExtrasKit"
|
||||
mkdir -p "$(INTERNAL)/Inter/BasicInformExtrasKit/source"
|
||||
rm -f $(INTERNAL)/Inter/BasicInformExtrasKit/Sections/*.i6t
|
||||
rm -f $(INTERNAL)/Inter/BasicInformExtrasKit/*.interb
|
||||
cp -R -f inform7/Internal/Inter/BasicInformExtrasKit/Sections/*.i6t $(INTERNAL)/Inter/BasicInformExtrasKit/source
|
||||
cp -R -f inform7/Internal/Inter/BasicInformExtrasKit/*.interb $(INTERNAL)/Inter/BasicInformExtrasKit
|
||||
cp -R -f inform7/Internal/Inter/BasicInformExtrasKit/library_metadata.txt $(INTERNAL)/Inter/BasicInformExtrasKit
|
||||
cp -R -f inform7/Internal/Inter/BasicInformExtrasKit/kit_metadata.txt $(INTERNAL)/Inter/BasicInformExtrasKit
|
||||
mkdir -p "$(INTERNAL)/Inter/BasicInformKit/kinds"
|
||||
rm -f $(INTERNAL)/Inter/BasicInformKit/kinds/*.kindt
|
||||
cp -R -f inform7/Internal/Inter/BasicInformKit/kinds/*.kindt $(INTERNAL)/Inter/BasicInformKit/kinds
|
||||
mkdir -p "$(INTERNAL)/Inter/WorldModelKit/kinds"
|
||||
rm -f $(INTERNAL)/Inter/WorldModelKit/kinds/*.kindt
|
||||
cp -R -f inform7/Internal/Inter/WorldModelKit/kinds/*.kindt $(INTERNAL)/Inter/WorldModelKit/kinds
|
||||
endef
|
||||
|
||||
$(INTERNAL)/Inter/default.interpipeline: inform7/Internal/Inter/*.interpipeline
|
||||
|
|
Loading…
Reference in a new issue