diff --git a/docs/codegen-module/2-inv.html b/docs/codegen-module/2-inv.html index a61f9c044..961e1114a 100644 --- a/docs/codegen-module/2-inv.html +++ b/docs/codegen-module/2-inv.html @@ -29,19 +29,42 @@ if (Str::ne(M->package_name->symbol_name, I"template")) { INDENT; for (inter_package *SM = M->child_package; SM; SM = SM->next_package) { - WRITE("%S:\n", SM->package_name->symbol_name); - INDENT; - int pos = 0; - for (inter_package *R = SM->child_package; R; R = R->next_package) { - text_stream *name = CodeGen::Inventory::read_metadata(R, I"`name"); - if (name == NULL) name = R->package_name->symbol_name; - if (pos > 0) WRITE(", "); - pos += Str::len(name) + 2; - if (pos > 80) { WRITE("\n"); pos = Str::len(name) + 2; } - WRITE("%S", name); - } - if (pos > 0) WRITE("\n"); - OUTDENT; + if (SM->child_package) { + WRITE("%S:\n", SM->package_name->symbol_name); + INDENT; + for (inter_package *R = SM->child_package; R; R = R->next_package) + CodeGen::unmark(R->package_name); + for (inter_package *R = SM->child_package; R; R = R->next_package) { + if (CodeGen::marked(R->package_name)) continue; + inter_symbol *ptype = Inter::Packages::type(R); + OUTDENT; + WRITE(" %S ", ptype->symbol_name); + int N = 1; + for (inter_package *R2 = R->next_package; R2; R2 = R2->next_package) + if (Inter::Packages::type(R2) == ptype) + N++; + WRITE("x %d: ", N); + INDENT; + int pos = Str::len(ptype->symbol_name) + 7; + int first = TRUE; + for (inter_package *R2 = R; R2; R2 = R2->next_package) { + if (Inter::Packages::type(R2) == ptype) { + text_stream *name = CodeGen::Inventory::read_metadata(R2, I"`name"); + if (name == NULL) name = R2->package_name->symbol_name; + if ((pos > 0) && (first == FALSE)) WRITE(", "); + pos += Str::len(name) + 2; + if (pos > 80) { WRITE("\n"); pos = Str::len(name) + 2; } + WRITE("%S", name); + CodeGen::mark(R2->package_name); + first = FALSE; + } + } + if (pos > 0) WRITE("\n"); + } + for (inter_package *R = SM->child_package; R; R = R->next_package) + CodeGen::unmark(R->package_name); + OUTDENT; + } } OUTDENT; } diff --git a/docs/codegen-module/3-cg.html b/docs/codegen-module/3-cg.html index 283edbcc7..b1bb3fc4a 100644 --- a/docs/codegen-module/3-cg.html +++ b/docs/codegen-module/3-cg.html @@ -2723,11 +2723,11 @@ then the result.
The function CodeGen::pnum is used in 3/iap (§4.8.4.1).
-The function CodeGen::marked is used in 3/iap (§4.8.4).
+The function CodeGen::marked is used in 2/inv (§1), 3/iap (§4.8.4).
-The function CodeGen::mark is used in 3/iap (§4.8.4).
+The function CodeGen::mark is used in 2/inv (§1), 3/iap (§4.8.4).
-The function CodeGen::unmark is used in 3/iap (§4.8).
+The function CodeGen::unmark is used in 2/inv (§1), 3/iap (§4.8).
diff --git a/docs/core-module/15-pr.html b/docs/core-module/15-pr.html index 47ac3ef13..2b82ca288 100644 --- a/docs/core-module/15-pr.html +++ b/docs/core-module/15-pr.html @@ -978,6 +978,7 @@ we find it, we compile it and returnreturn Properties::iname(Properties::EitherOr::get_negation(prn));
if (prn->prop_iname == NULL) {
prn->prop_package = Hierarchy::package(prn->owning_module, PROPERTIES_HAP);
+ Hierarchy::markup_wording(prn->prop_package, PROPERTY_NAME_HMD, prn->name);
prn->prop_iname = Hierarchy::make_iname_with_memo(PROPERTY_HL, prn->prop_package, prn->name);
}
return prn->prop_iname;
diff --git a/docs/core-module/15-vp.html b/docs/core-module/15-vp.html
index 630247d8d..ce3bef485 100644
--- a/docs/core-module/15-vp.html
+++ b/docs/core-module/15-vp.html
@@ -97,6 +97,7 @@ to the end user.
wording W = Feeds::feed_stream(I6_form);
if (K == NULL) internal_error("new nameless property without kind");
package_request *R = Hierarchy::package(Modules::find(current_sentence), PROPERTIES_HAP);
+ Hierarchy::markup(R, PROPERTY_NAME_HMD, I6_form);
inter_name *using_iname = Hierarchy::make_iname_with_memo(PROPERTY_HL, R, W);
property *prn = Properties::create(EMPTY_WORDING, R, using_iname);
Properties::exclude_from_index(prn);
diff --git a/docs/core-module/21-fao.html b/docs/core-module/21-fao.html
index c8550f1bc..5e4c9fbb8 100644
--- a/docs/core-module/21-fao.html
+++ b/docs/core-module/21-fao.html
@@ -349,6 +349,7 @@ can be used in a void context as a sort of return-from-rule phrase.
}
package_request *R = Hierarchy::local_package(OUTCOMES_HAP);
+ Hierarchy::markup_wording(R, OUTCOME_NAME_HMD, W);
named_rulebook_outcome *rbno = CREATE(named_rulebook_outcome);
rbno->name = Nouns::new_proper_noun(W, NEUTER_GENDER,
diff --git a/docs/core-module/21-rl.html b/docs/core-module/21-rl.html
index c1213b2fd..396c1b4d7 100644
--- a/docs/core-module/21-rl.html
+++ b/docs/core-module/21-rl.html
@@ -176,6 +176,8 @@ later: see below.
R->explicitly_named = named;
R->shell_routine_iname = NULL;
R->rule_package = Hierarchy::local_package(RULES_HAP);
+ if (Wordings::nonempty(W))
+ Hierarchy::markup_wording(R->rule_package, RULE_NAME_HMD, W);
for (int l=0; l<26; l++) {
R->lettered_responses[l] = NULL;
R->lettered_responses_used[l] = NULL;
diff --git a/docs/core-module/21-rl2.html b/docs/core-module/21-rl2.html
index 665305d9a..f50cc6a21 100644
--- a/docs/core-module/21-rl2.html
+++ b/docs/core-module/21-rl2.html
@@ -284,6 +284,8 @@ built (for instance, scene endings).
rulebook *Rulebooks::new(kind *create_as, wording W, package_request *R) {
+ Hierarchy::markup_wording(R, RULEBOOK_NAME_HMD, W);
+
rulebook *rb = CREATE(rulebook);
<new-rulebook-name>(W);
diff --git a/docs/core-module/22-pu.html b/docs/core-module/22-pu.html
index 6cf84f9d2..5f319cfe9 100644
--- a/docs/core-module/22-pu.html
+++ b/docs/core-module/22-pu.html
@@ -115,6 +115,8 @@ connect this existing one to the phrase.
if (Wordings::nonempty(W)) R = Rules::by_name(W);
if (R) <Check that this isn't duplicating the name of a rule already made 6.2>
else R = Rules::new(W, explicitly);
+ if (Wordings::empty(W))
+ Hierarchy::markup_wording(R->rule_package, RULE_NAME_HMD, ParseTree::get_text(ph->declaration_node));
Rules::set_I7_definition(R, ph);
package_request *P = Rules::package(R);
diff --git a/docs/core-module/27-hl.html b/docs/core-module/27-hl.html
index 8e184847f..97324ab8f 100644
--- a/docs/core-module/27-hl.html
+++ b/docs/core-module/27-hl.html
@@ -518,7 +518,7 @@ following fields set.
The function HierarchyLocations::index_md appears nowhere else.
-The function HierarchyLocations::metadata is used in 27/hr (§1.4, §1.6, §1.8, §1.26, §1.44, §1.46).
+The function HierarchyLocations::metadata is used in 27/hr (§1.4, §1.6, §1.8, §1.16, §1.26, §1.30, §1.36, §1.40, §1.42, §1.44, §1.46).
The function HierarchyLocations::markup is used in 27/hr (§5).
diff --git a/docs/core-module/27-hr.html b/docs/core-module/27-hr.html
index df17bee3d..91f9e22d4 100644
--- a/docs/core-module/27-hr.html
+++ b/docs/core-module/27-hr.html
@@ -393,8 +393,10 @@
enum CV_NEG_HL
enum CV_POS_HL
enum MVERBS_HAP
+ enum MVERB_NAME_HMD
enum MODAL_CONJUGATION_FN_HL
enum VERBS_HAP
+ enum VERB_NAME_HMD
enum NONMODAL_CONJUGATION_FN_HL
enum VERB_FORMS_HAP
enum FORM_FN_HL
@@ -417,9 +419,11 @@
location_requirement local_conjugations = HierarchyLocations::local_submodule(conjugations);
HierarchyLocations::ap(MVERBS_HAP, local_conjugations, I"mverb", I"_modal_verb");
location_requirement in_modal_verb = HierarchyLocations::any_package_of_type(I"_modal_verb");
+ HierarchyLocations::metadata(MVERB_NAME_HMD, in_modal_verb, I"`name");
HierarchyLocations::func(MODAL_CONJUGATION_FN_HL, I"conjugation_fn", Translation::generate(I"ConjugateModalVerb"), in_modal_verb);
HierarchyLocations::ap(VERBS_HAP, local_conjugations, I"verb", I"_verb");
location_requirement in_verb = HierarchyLocations::any_package_of_type(I"_verb");
+ HierarchyLocations::metadata(VERB_NAME_HMD, in_verb, I"`name");
HierarchyLocations::func(NONMODAL_CONJUGATION_FN_HL, I"conjugation_fn", Translation::generate(I"ConjugateVerb"), in_verb);
HierarchyLocations::ap(VERB_FORMS_HAP, in_verb, I"form", I"_verb_form");
location_requirement in_verb_form = HierarchyLocations::any_package_of_type(I"_verb_form");
@@ -729,6 +733,7 @@
enum K_TYPELESS_INT_HL
enum K_TYPELESS_STRING_HL
enum KIND_HAP
+ enum KIND_NAME_HMD
enum KIND_CLASS_HL
enum KIND_HL
enum WEAK_ID_HL
@@ -786,6 +791,7 @@
location_requirement local_kinds = HierarchyLocations::local_submodule(kinds);
HierarchyLocations::ap(KIND_HAP, local_kinds, I"kind", I"_kind");
location_requirement in_kind = HierarchyLocations::any_package_of_type(I"_kind");
+ HierarchyLocations::metadata(KIND_NAME_HMD, in_kind, I"`name");
HierarchyLocations::con(KIND_CLASS_HL, NULL, Translation::generate(I"K"), in_kind);
HierarchyLocations::con(KIND_HL, NULL, Translation::generate(I"KD"), in_kind);
HierarchyLocations::con(WEAK_ID_HL, NULL, Translation::imposed(), in_kind);
@@ -905,6 +911,7 @@
enum PROPERTIES_HAP
+ enum PROPERTY_NAME_HMD
enum PROPERTY_HL
enum EITHER_OR_GPR_FN_HL
enum CCOUNT_PROPERTY_HL
@@ -920,6 +927,7 @@
location_requirement local_properties = HierarchyLocations::local_submodule(properties);
HierarchyLocations::ap(PROPERTIES_HAP, local_properties, I"property", I"_property");
location_requirement in_property = HierarchyLocations::any_package_of_type(I"_property");
+ HierarchyLocations::metadata(PROPERTY_NAME_HMD, in_property, I"`name");
HierarchyLocations::con(PROPERTY_HL, I"P", Translation::same(), in_property);
HierarchyLocations::func(EITHER_OR_GPR_FN_HL, I"either_or_GPR_fn", Translation::generate(I"PRN_PN"), in_property);
@@ -1030,8 +1038,10 @@
enum EMPTY_RULEBOOK_INAME_HL
enum OUTCOMES_HAP
+ enum OUTCOME_NAME_HMD
enum OUTCOME_HL
enum RULEBOOKS_HAP
+ enum RULEBOOK_NAME_HMD
enum RUN_FN_HL
enum RULEBOOK_STV_CREATOR_FN_HL
enum NUMBER_RULEBOOKS_CREATED_HL
@@ -1054,9 +1064,11 @@
location_requirement local_rulebooks = HierarchyLocations::local_submodule(rulebooks);
HierarchyLocations::ap(OUTCOMES_HAP, local_rulebooks, I"rulebook_outcome", I"_outcome");
location_requirement in_outcome = HierarchyLocations::any_package_of_type(I"_outcome");
+ HierarchyLocations::metadata(OUTCOME_NAME_HMD, in_outcome, I"`name");
HierarchyLocations::con(OUTCOME_HL, I"outcome", Translation::uniqued(), in_outcome);
HierarchyLocations::ap(RULEBOOKS_HAP, local_rulebooks, I"rulebook", I"_rulebook");
location_requirement in_rulebook = HierarchyLocations::any_package_of_type(I"_rulebook");
+ HierarchyLocations::metadata(RULEBOOK_NAME_HMD, in_rulebook, I"`name");
HierarchyLocations::func(RUN_FN_HL, I"run_fn", Translation::uniqued(), in_rulebook);
HierarchyLocations::func(RULEBOOK_STV_CREATOR_FN_HL, I"stv_creator_fn", Translation::uniqued(), in_rulebook);
@@ -1077,6 +1089,7 @@
enum RULES_HAP
+ enum RULE_NAME_HMD
enum SHELL_FN_HL
enum RULE_FN_HL
enum EXTERIOR_RULE_HL
@@ -1099,6 +1112,7 @@
location_requirement local_rules = HierarchyLocations::local_submodule(rules);
HierarchyLocations::ap(RULES_HAP, local_rules, I"rule", I"_rule");
location_requirement in_rule = HierarchyLocations::any_package_of_type(I"_rule");
+ HierarchyLocations::metadata(RULE_NAME_HMD, in_rule, I"`name");
HierarchyLocations::func(SHELL_FN_HL, I"shell_fn", Translation::uniqued(), in_rule);
HierarchyLocations::func(RULE_FN_HL, I"rule_fn", Translation::uniqued(), in_rule);
HierarchyLocations::con(EXTERIOR_RULE_HL, I"exterior_rule", Translation::uniqued(), in_rule);
@@ -2006,6 +2020,13 @@
Hierarchy::markup(R, hm_id, ANT);
DISCARD_TEXT(ANT);
}
+
+ void Hierarchy::markup_wa(package_request *R, int hm_id, word_assemblage WA) {
+ TEMPORARY_TEXT(ANT);
+ WRITE_TO(ANT, "%A", WA);
+ Hierarchy::markup(R, hm_id, ANT);
+ DISCARD_TEXT(ANT);
+ }
@@ -2050,9 +2071,11 @@
The function Hierarchy::make_package_in is used in 21/ac (§6).
-The function Hierarchy::markup is used in 27/cm (§2).
+The function Hierarchy::markup is used in 15/vp (§3), 27/cm (§2).
-The function Hierarchy::markup_wording is used in 5/ins (§14), 5/nv (§16), 19/tb (§20), 21/ac (§6).
+The function Hierarchy::markup_wording is used in 5/ins (§14), 5/nv (§16), 15/pr (§27), 19/tb (§20), 21/rl (§5), 21/rl2 (§10), 21/fao (§10), 21/ac (§6), 22/pu (§6).
+
+The function Hierarchy::markup_wa appears nowhere else.
- (This section begins Chapter 27: Bridge to Inter Module.)
- Continue with 'Hierarchy Locations'
diff --git a/docs/core-module/9-tc.html b/docs/core-module/9-tc.html
index e99f7e911..1ce7fa8ba 100644
--- a/docs/core-module/9-tc.html
+++ b/docs/core-module/9-tc.html
@@ -1179,7 +1179,9 @@ them by asserting propositions to be true; we act directly.
if (governor)
ParseTree::set_evaluation(governor,
Specifications::from_kind(create_as));
- rulebook *rb = Rulebooks::new(create_as, W, Hierarchy::local_package(RULEBOOKS_HAP));
+ package_request *P = Hierarchy::local_package(RULEBOOKS_HAP);
+ rulebook *rb = Rulebooks::new(create_as, W, P);
+
val = Rvalues::from_rulebook(rb);
ParseTree::annotate_int(current_sentence, clears_pronouns_ANNOT, TRUE);
diff --git a/docs/inflections-module/3-vc.html b/docs/inflections-module/3-vc.html
index 5532f4e6f..c2aece822 100644
--- a/docs/inflections-module/3-vc.html
+++ b/docs/inflections-module/3-vc.html
@@ -324,9 +324,17 @@ and negative senses.
if (vc->vc_iname == NULL) {
if (vc->vc_conjugates == NULL) {
package_request *R = Hierarchy::package(Modules::find(vc->where_vc_created), MVERBS_HAP);
+ TEMPORARY_TEXT(ANT);
+ WRITE_TO(ANT, "%A (modal)", vc->tabulations[ACTIVE_MOOD].vc_text[0][0][2]);
+ Hierarchy::markup(R, MVERB_NAME_HMD, ANT);
+ DISCARD_TEXT(ANT);
vc->vc_iname = Hierarchy::make_iname_in(MODAL_CONJUGATION_FN_HL, R);
} else {
package_request *R = Verbs::verb_package(vc->vc_conjugates, vc->where_vc_created);
+ TEMPORARY_TEXT(ANT);
+ WRITE_TO(ANT, "to %A", vc->infinitive);
+ Hierarchy::markup(R, VERB_NAME_HMD, ANT);
+ DISCARD_TEXT(ANT);
vc->vc_iname = Hierarchy::make_iname_in(NONMODAL_CONJUGATION_FN_HL, R);
}
}
diff --git a/docs/kinds-module/2-kc2.html b/docs/kinds-module/2-kc2.html
index 195f5da5d..19f066efb 100644
--- a/docs/kinds-module/2-kc2.html
+++ b/docs/kinds-module/2-kc2.html
@@ -445,7 +445,7 @@ of the constructor:
The function Kinds::Constructors::attach_noun is used in 2/knd (§33.2).
-The function Kinds::Constructors::get_name is used in 2/ki (§21), 2/uk (§1), 2/dk (§14).
+The function Kinds::Constructors::get_name is used in §9, 2/ki (§21), 2/uk (§1), 2/dk (§14).
The function Kinds::Constructors::get_name_in_play is used in 2/uk (§1).
@@ -483,7 +483,16 @@ of the kind which the constructor makes:
return UNKNOWN_TY_iname;
}
package_request *Kinds::Constructors::package(kind_constructor *con) {
- if (con->kc_package == NULL) con->kc_package = Hierarchy::local_package(KIND_HAP);
+ if (con->kc_package == NULL) {
+ con->kc_package = Hierarchy::local_package(KIND_HAP);
+ wording W = Kinds::Constructors::get_name(con, FALSE);
+ if (Wordings::nonempty(W))
+ Hierarchy::markup_wording(con->kc_package, KIND_NAME_HMD, W);
+ else if (Str::len(con->name_in_template_code) > 0)
+ Hierarchy::markup(con->kc_package, KIND_NAME_HMD, con->name_in_template_code);
+ else
+ Hierarchy::markup(con->kc_package, KIND_NAME_HMD, I"(anonymous kind)");
+ }
return con->kc_package;
}
inter_name *Kinds::Constructors::iname(kind_constructor *con) {
diff --git a/inform7/core-module/Chapter 15/Properties.w b/inform7/core-module/Chapter 15/Properties.w
index d66041348..bb5fb43f1 100644
--- a/inform7/core-module/Chapter 15/Properties.w
+++ b/inform7/core-module/Chapter 15/Properties.w
@@ -684,6 +684,7 @@ inter_name *Properties::iname(property *prn) {
return Properties::iname(Properties::EitherOr::get_negation(prn));
if (prn->prop_iname == NULL) {
prn->prop_package = Hierarchy::package(prn->owning_module, PROPERTIES_HAP);
+ Hierarchy::markup_wording(prn->prop_package, PROPERTY_NAME_HMD, prn->name);
prn->prop_iname = Hierarchy::make_iname_with_memo(PROPERTY_HL, prn->prop_package, prn->name);
}
return prn->prop_iname;
diff --git a/inform7/core-module/Chapter 15/Valued Properties.w b/inform7/core-module/Chapter 15/Valued Properties.w
index fe2ed107c..bfd003a9d 100644
--- a/inform7/core-module/Chapter 15/Valued Properties.w
+++ b/inform7/core-module/Chapter 15/Valued Properties.w
@@ -62,6 +62,7 @@ property *Properties::Valued::new_nameless(text_stream *I6_form, kind *K) {
wording W = Feeds::feed_stream(I6_form);
if (K == NULL) internal_error("new nameless property without kind");
package_request *R = Hierarchy::package(Modules::find(current_sentence), PROPERTIES_HAP);
+ Hierarchy::markup(R, PROPERTY_NAME_HMD, I6_form);
inter_name *using_iname = Hierarchy::make_iname_with_memo(PROPERTY_HL, R, W);
property *prn = Properties::create(EMPTY_WORDING, R, using_iname);
Properties::exclude_from_index(prn);
diff --git a/inform7/core-module/Chapter 21/Focus and Outcome.w b/inform7/core-module/Chapter 21/Focus and Outcome.w
index 159757799..2fd27eb5a 100644
--- a/inform7/core-module/Chapter 21/Focus and Outcome.w
+++ b/inform7/core-module/Chapter 21/Focus and Outcome.w
@@ -223,6 +223,7 @@ named_rulebook_outcome *Rulebooks::Outcomes::rbno_by_name(wording W) {
}
package_request *R = Hierarchy::local_package(OUTCOMES_HAP);
+ Hierarchy::markup_wording(R, OUTCOME_NAME_HMD, W);
named_rulebook_outcome *rbno = CREATE(named_rulebook_outcome);
rbno->name = Nouns::new_proper_noun(W, NEUTER_GENDER,
diff --git a/inform7/core-module/Chapter 21/Rulebooks.w b/inform7/core-module/Chapter 21/Rulebooks.w
index 1024f9fa6..5d4eac9d7 100644
--- a/inform7/core-module/Chapter 21/Rulebooks.w
+++ b/inform7/core-module/Chapter 21/Rulebooks.w
@@ -206,6 +206,8 @@ built (for instance, scene endings).
=
rulebook *Rulebooks::new(kind *create_as, wording W, package_request *R) {
+ Hierarchy::markup_wording(R, RULEBOOK_NAME_HMD, W);
+
rulebook *rb = CREATE(rulebook);
(W);
diff --git a/inform7/core-module/Chapter 21/Rules.w b/inform7/core-module/Chapter 21/Rules.w
index b6ac43938..41a8aff7b 100644
--- a/inform7/core-module/Chapter 21/Rules.w
+++ b/inform7/core-module/Chapter 21/Rules.w
@@ -126,6 +126,8 @@ rule *Rules::new(wording W, int named) {
R->explicitly_named = named;
R->shell_routine_iname = NULL;
R->rule_package = Hierarchy::local_package(RULES_HAP);
+ if (Wordings::nonempty(W))
+ Hierarchy::markup_wording(R->rule_package, RULE_NAME_HMD, W);
for (int l=0; l<26; l++) {
R->lettered_responses[l] = NULL;
R->lettered_responses_used[l] = NULL;
diff --git a/inform7/core-module/Chapter 22/Phrase Usage.w b/inform7/core-module/Chapter 22/Phrase Usage.w
index 8677b5a40..3a7944961 100644
--- a/inform7/core-module/Chapter 22/Phrase Usage.w
+++ b/inform7/core-module/Chapter 22/Phrase Usage.w
@@ -76,6 +76,8 @@ rule *Phrases::Usage::to_rule(ph_usage_data *phud, phrase *ph) {
if (Wordings::nonempty(W)) R = Rules::by_name(W);
if (R) @
else R = Rules::new(W, explicitly);
+ if (Wordings::empty(W))
+ Hierarchy::markup_wording(R->rule_package, RULE_NAME_HMD, ParseTree::get_text(ph->declaration_node));
Rules::set_I7_definition(R, ph);
package_request *P = Rules::package(R);
diff --git a/inform7/core-module/Chapter 27/Hierarchy.w b/inform7/core-module/Chapter 27/Hierarchy.w
index 5b8c46e8d..855865458 100644
--- a/inform7/core-module/Chapter 27/Hierarchy.w
+++ b/inform7/core-module/Chapter 27/Hierarchy.w
@@ -296,8 +296,10 @@ void Hierarchy::establish(void) {
@e CV_POS_HL
@e MVERBS_HAP
+@e MVERB_NAME_HMD
@e MODAL_CONJUGATION_FN_HL
@e VERBS_HAP
+@e VERB_NAME_HMD
@e NONMODAL_CONJUGATION_FN_HL
@e VERB_FORMS_HAP
@e FORM_FN_HL
@@ -315,9 +317,11 @@ void Hierarchy::establish(void) {
location_requirement local_conjugations = HierarchyLocations::local_submodule(conjugations);
HierarchyLocations::ap(MVERBS_HAP, local_conjugations, I"mverb", I"_modal_verb");
location_requirement in_modal_verb = HierarchyLocations::any_package_of_type(I"_modal_verb");
+ HierarchyLocations::metadata(MVERB_NAME_HMD, in_modal_verb, I"`name");
HierarchyLocations::func(MODAL_CONJUGATION_FN_HL, I"conjugation_fn", Translation::generate(I"ConjugateModalVerb"), in_modal_verb);
HierarchyLocations::ap(VERBS_HAP, local_conjugations, I"verb", I"_verb");
location_requirement in_verb = HierarchyLocations::any_package_of_type(I"_verb");
+ HierarchyLocations::metadata(VERB_NAME_HMD, in_verb, I"`name");
HierarchyLocations::func(NONMODAL_CONJUGATION_FN_HL, I"conjugation_fn", Translation::generate(I"ConjugateVerb"), in_verb);
HierarchyLocations::ap(VERB_FORMS_HAP, in_verb, I"form", I"_verb_form");
location_requirement in_verb_form = HierarchyLocations::any_package_of_type(I"_verb_form");
@@ -550,6 +554,7 @@ void Hierarchy::establish(void) {
@e K_TYPELESS_STRING_HL
@e KIND_HAP
+@e KIND_NAME_HMD
@e KIND_CLASS_HL
@e KIND_HL
@e WEAK_ID_HL
@@ -603,6 +608,7 @@ void Hierarchy::establish(void) {
location_requirement local_kinds = HierarchyLocations::local_submodule(kinds);
HierarchyLocations::ap(KIND_HAP, local_kinds, I"kind", I"_kind");
location_requirement in_kind = HierarchyLocations::any_package_of_type(I"_kind");
+ HierarchyLocations::metadata(KIND_NAME_HMD, in_kind, I"`name");
HierarchyLocations::con(KIND_CLASS_HL, NULL, Translation::generate(I"K"), in_kind);
HierarchyLocations::con(KIND_HL, NULL, Translation::generate(I"KD"), in_kind);
HierarchyLocations::con(WEAK_ID_HL, NULL, Translation::imposed(), in_kind);
@@ -691,6 +697,7 @@ void Hierarchy::establish(void) {
@h Properties.
@e PROPERTIES_HAP
+@e PROPERTY_NAME_HMD
@e PROPERTY_HL
@e EITHER_OR_GPR_FN_HL
@@ -702,6 +709,7 @@ void Hierarchy::establish(void) {
location_requirement local_properties = HierarchyLocations::local_submodule(properties);
HierarchyLocations::ap(PROPERTIES_HAP, local_properties, I"property", I"_property");
location_requirement in_property = HierarchyLocations::any_package_of_type(I"_property");
+ HierarchyLocations::metadata(PROPERTY_NAME_HMD, in_property, I"`name");
HierarchyLocations::con(PROPERTY_HL, I"P", Translation::same(), in_property);
HierarchyLocations::func(EITHER_OR_GPR_FN_HL, I"either_or_GPR_fn", Translation::generate(I"PRN_PN"), in_property);
@@ -796,8 +804,10 @@ void Hierarchy::establish(void) {
@e EMPTY_RULEBOOK_INAME_HL
@e OUTCOMES_HAP
+@e OUTCOME_NAME_HMD
@e OUTCOME_HL
@e RULEBOOKS_HAP
+@e RULEBOOK_NAME_HMD
@e RUN_FN_HL
@e RULEBOOK_STV_CREATOR_FN_HL
@@ -816,9 +826,11 @@ void Hierarchy::establish(void) {
location_requirement local_rulebooks = HierarchyLocations::local_submodule(rulebooks);
HierarchyLocations::ap(OUTCOMES_HAP, local_rulebooks, I"rulebook_outcome", I"_outcome");
location_requirement in_outcome = HierarchyLocations::any_package_of_type(I"_outcome");
+ HierarchyLocations::metadata(OUTCOME_NAME_HMD, in_outcome, I"`name");
HierarchyLocations::con(OUTCOME_HL, I"outcome", Translation::uniqued(), in_outcome);
HierarchyLocations::ap(RULEBOOKS_HAP, local_rulebooks, I"rulebook", I"_rulebook");
location_requirement in_rulebook = HierarchyLocations::any_package_of_type(I"_rulebook");
+ HierarchyLocations::metadata(RULEBOOK_NAME_HMD, in_rulebook, I"`name");
HierarchyLocations::func(RUN_FN_HL, I"run_fn", Translation::uniqued(), in_rulebook);
HierarchyLocations::func(RULEBOOK_STV_CREATOR_FN_HL, I"stv_creator_fn", Translation::uniqued(), in_rulebook);
@@ -832,6 +844,7 @@ void Hierarchy::establish(void) {
@h Rules.
@e RULES_HAP
+@e RULE_NAME_HMD
@e SHELL_FN_HL
@e RULE_FN_HL
@e EXTERIOR_RULE_HL
@@ -850,6 +863,7 @@ void Hierarchy::establish(void) {
location_requirement local_rules = HierarchyLocations::local_submodule(rules);
HierarchyLocations::ap(RULES_HAP, local_rules, I"rule", I"_rule");
location_requirement in_rule = HierarchyLocations::any_package_of_type(I"_rule");
+ HierarchyLocations::metadata(RULE_NAME_HMD, in_rule, I"`name");
HierarchyLocations::func(SHELL_FN_HL, I"shell_fn", Translation::uniqued(), in_rule);
HierarchyLocations::func(RULE_FN_HL, I"rule_fn", Translation::uniqued(), in_rule);
HierarchyLocations::con(EXTERIOR_RULE_HL, I"exterior_rule", Translation::uniqued(), in_rule);
@@ -1682,3 +1696,10 @@ void Hierarchy::markup_wording(package_request *R, int hm_id, wording W) {
Hierarchy::markup(R, hm_id, ANT);
DISCARD_TEXT(ANT);
}
+
+void Hierarchy::markup_wa(package_request *R, int hm_id, word_assemblage WA) {
+ TEMPORARY_TEXT(ANT);
+ WRITE_TO(ANT, "%A", WA);
+ Hierarchy::markup(R, hm_id, ANT);
+ DISCARD_TEXT(ANT);
+}
diff --git a/inform7/core-module/Chapter 9/The Creator.w b/inform7/core-module/Chapter 9/The Creator.w
index 0b5104b67..8bdddb9ec 100644
--- a/inform7/core-module/Chapter 9/The Creator.w
+++ b/inform7/core-module/Chapter 9/The Creator.w
@@ -698,7 +698,9 @@ them by asserting propositions to be true; we act directly.
if (governor)
ParseTree::set_evaluation(governor,
Specifications::from_kind(create_as));
- rulebook *rb = Rulebooks::new(create_as, W, Hierarchy::local_package(RULEBOOKS_HAP));
+ package_request *P = Hierarchy::local_package(RULEBOOKS_HAP);
+ rulebook *rb = Rulebooks::new(create_as, W, P);
+
val = Rvalues::from_rulebook(rb);
ParseTree::annotate_int(current_sentence, clears_pronouns_ANNOT, TRUE);
diff --git a/inform7/inflections-module/Chapter 3/Verb Conjugation.w b/inform7/inflections-module/Chapter 3/Verb Conjugation.w
index a3761fada..409e11bd5 100644
--- a/inform7/inflections-module/Chapter 3/Verb Conjugation.w
+++ b/inform7/inflections-module/Chapter 3/Verb Conjugation.w
@@ -204,9 +204,17 @@ inter_name *Conjugation::conj_iname(verb_conjugation *vc) {
if (vc->vc_iname == NULL) {
if (vc->vc_conjugates == NULL) {
package_request *R = Hierarchy::package(Modules::find(vc->where_vc_created), MVERBS_HAP);
+ TEMPORARY_TEXT(ANT);
+ WRITE_TO(ANT, "%A (modal)", vc->tabulations[ACTIVE_MOOD].vc_text[0][0][2]);
+ Hierarchy::markup(R, MVERB_NAME_HMD, ANT);
+ DISCARD_TEXT(ANT);
vc->vc_iname = Hierarchy::make_iname_in(MODAL_CONJUGATION_FN_HL, R);
} else {
package_request *R = Verbs::verb_package(vc->vc_conjugates, vc->where_vc_created);
+ TEMPORARY_TEXT(ANT);
+ WRITE_TO(ANT, "to %A", vc->infinitive);
+ Hierarchy::markup(R, VERB_NAME_HMD, ANT);
+ DISCARD_TEXT(ANT);
vc->vc_iname = Hierarchy::make_iname_in(NONMODAL_CONJUGATION_FN_HL, R);
}
}
diff --git a/inform7/kinds-module/Chapter 2/Kind Constructors.w b/inform7/kinds-module/Chapter 2/Kind Constructors.w
index ed8cd67b7..cdab260d1 100644
--- a/inform7/kinds-module/Chapter 2/Kind Constructors.w
+++ b/inform7/kinds-module/Chapter 2/Kind Constructors.w
@@ -392,7 +392,16 @@ inter_name *Kinds::Constructors::UNKNOWN_iname(void) {
return UNKNOWN_TY_iname;
}
package_request *Kinds::Constructors::package(kind_constructor *con) {
- if (con->kc_package == NULL) con->kc_package = Hierarchy::local_package(KIND_HAP);
+ if (con->kc_package == NULL) {
+ con->kc_package = Hierarchy::local_package(KIND_HAP);
+ wording W = Kinds::Constructors::get_name(con, FALSE);
+ if (Wordings::nonempty(W))
+ Hierarchy::markup_wording(con->kc_package, KIND_NAME_HMD, W);
+ else if (Str::len(con->name_in_template_code) > 0)
+ Hierarchy::markup(con->kc_package, KIND_NAME_HMD, con->name_in_template_code);
+ else
+ Hierarchy::markup(con->kc_package, KIND_NAME_HMD, I"(anonymous kind)");
+ }
return con->kc_package;
}
inter_name *Kinds::Constructors::iname(kind_constructor *con) {
diff --git a/inter/codegen-module/Chapter 2/Inventory.w b/inter/codegen-module/Chapter 2/Inventory.w
index 7f1abf924..ea5132ed2 100644
--- a/inter/codegen-module/Chapter 2/Inventory.w
+++ b/inter/codegen-module/Chapter 2/Inventory.w
@@ -17,19 +17,42 @@ void CodeGen::Inventory::print(OUTPUT_STREAM, inter_repository *I) {
if (Str::ne(M->package_name->symbol_name, I"template")) {
INDENT;
for (inter_package *SM = M->child_package; SM; SM = SM->next_package) {
- WRITE("%S:\n", SM->package_name->symbol_name);
- INDENT;
- int pos = 0;
- for (inter_package *R = SM->child_package; R; R = R->next_package) {
- text_stream *name = CodeGen::Inventory::read_metadata(R, I"`name");
- if (name == NULL) name = R->package_name->symbol_name;
- if (pos > 0) WRITE(", ");
- pos += Str::len(name) + 2;
- if (pos > 80) { WRITE("\n"); pos = Str::len(name) + 2; }
- WRITE("%S", name);
- }
- if (pos > 0) WRITE("\n");
- OUTDENT;
+ if (SM->child_package) {
+ WRITE("%S:\n", SM->package_name->symbol_name);
+ INDENT;
+ for (inter_package *R = SM->child_package; R; R = R->next_package)
+ CodeGen::unmark(R->package_name);
+ for (inter_package *R = SM->child_package; R; R = R->next_package) {
+ if (CodeGen::marked(R->package_name)) continue;
+ inter_symbol *ptype = Inter::Packages::type(R);
+ OUTDENT;
+ WRITE(" %S ", ptype->symbol_name);
+ int N = 1;
+ for (inter_package *R2 = R->next_package; R2; R2 = R2->next_package)
+ if (Inter::Packages::type(R2) == ptype)
+ N++;
+ WRITE("x %d: ", N);
+ INDENT;
+ int pos = Str::len(ptype->symbol_name) + 7;
+ int first = TRUE;
+ for (inter_package *R2 = R; R2; R2 = R2->next_package) {
+ if (Inter::Packages::type(R2) == ptype) {
+ text_stream *name = CodeGen::Inventory::read_metadata(R2, I"`name");
+ if (name == NULL) name = R2->package_name->symbol_name;
+ if ((pos > 0) && (first == FALSE)) WRITE(", ");
+ pos += Str::len(name) + 2;
+ if (pos > 80) { WRITE("\n"); pos = Str::len(name) + 2; }
+ WRITE("%S", name);
+ CodeGen::mark(R2->package_name);
+ first = FALSE;
+ }
+ }
+ if (pos > 0) WRITE("\n");
+ }
+ for (inter_package *R = SM->child_package; R; R = R->next_package)
+ CodeGen::unmark(R->package_name);
+ OUTDENT;
+ }
}
OUTDENT;
}