From 0be5d9ba77a04738fa5793766cfe66ba7fa9db91 Mon Sep 17 00:00:00 2001 From: Graham Nelson Date: Tue, 12 May 2020 10:00:53 +0100 Subject: [PATCH] Improvements to words module --- README.md | 2 +- build.txt | 4 +- docs/building-module/2-is.html | 4 +- docs/core-module/13-rsfk.html | 4 +- docs/core-module/15-cp.html | 6 +- docs/core-module/15-ep.html | 2 +- docs/core-module/15-ma.html | 4 +- docs/core-module/15-pr.html | 2 +- docs/core-module/15-spr.html | 2 +- docs/core-module/15-vp.html | 2 +- docs/core-module/17-tl.html | 2 +- docs/core-module/20-eq.html | 4 +- docs/core-module/21-ac.html | 6 +- docs/core-module/22-itp.html | 6 +- docs/core-module/24-lv.html | 2 +- docs/core-module/25-cii.html | 8 +- docs/core-module/25-pi.html | 4 +- docs/core-module/26-ct.html | 6 +- docs/core-module/27-em.html | 4 +- docs/core-module/5-ins.html | 2 +- docs/core-module/5-lp.html | 38 ++-- docs/core-module/6-nv.html | 6 +- docs/core-module/7-hdn.html | 4 +- docs/core-module/7-rs.html | 2 +- docs/core-module/9-rpt.html | 2 +- docs/core-module/9-tc.html | 6 +- docs/if-module/2-bd.html | 6 +- docs/if-module/2-ri.html | 12 +- docs/if-module/3-scn.html | 20 +-- docs/if-module/3-sm.html | 2 +- docs/if-module/3-tnt.html | 8 +- docs/if-module/3-tp.html | 2 +- docs/if-module/4-act.html | 8 +- docs/if-module/5-gt2.html | 2 +- docs/if-module/5-tfg.html | 4 +- docs/index-module/2-dr.html | 2 +- docs/inflections-module/2-tai.html | 2 +- docs/inflections-module/3-dcl.html | 4 +- docs/inflections-module/3-ga.html | 6 +- docs/inflections-module/3-plr.html | 2 +- docs/inflections-module/3-pp.html | 2 +- docs/inflections-module/3-vc.html | 6 +- docs/inflections-module/4-ei.html | 2 +- docs/inflections-test/1-ut.html | 8 +- docs/kinds-module/2-ki.html | 6 +- docs/linguistics-module/1-lm.html | 2 +- docs/linguistics-module/2-em.html | 2 +- docs/linguistics-module/2-pe.html | 2 +- docs/linguistics-module/3-aap.html | 2 +- docs/linguistics-module/3-adj.html | 2 +- docs/linguistics-module/3-au.html | 2 +- docs/linguistics-module/3-cao.html | 2 +- docs/linguistics-module/3-daq.html | 2 +- docs/linguistics-module/3-nns.html | 2 +- docs/linguistics-module/4-aoc.html | 2 +- docs/linguistics-module/4-apoo.html | 2 +- docs/linguistics-module/4-prp.html | 2 +- docs/linguistics-module/4-vrb.html | 2 +- docs/linguistics-module/4-vu.html | 2 +- docs/linguistics-module/5-dgr.html | 2 +- docs/linguistics-module/5-np.html | 2 +- docs/linguistics-module/5-vm.html | 2 +- docs/linguistics-module/5-vp.html | 2 +- docs/linguistics-module/index.html | 11 ++ docs/supervisor-module/2-wrk.html | 31 ++-- docs/supervisor-module/5-ls.html | 4 +- docs/supervisor-module/5-ps2.html | 6 +- docs/supervisor-module/6-hdn.html | 2 +- docs/supervisor-module/6-inc.html | 2 +- docs/supervisor-module/6-tof.html | 2 +- docs/supervisor-module/7-ip2.html | 2 +- docs/words-module/1-wm.html | 6 +- docs/words-module/2-vcb.html | 113 ++++++------ docs/words-module/2-wa.html | 4 +- docs/words-module/3-fds.html | 28 +-- docs/words-module/3-idn.html | 9 +- docs/words-module/3-lxr.html | 18 +- docs/words-module/3-wrd.html | 8 +- docs/words-module/4-bn.html | 10 +- docs/words-module/4-nw.html | 6 +- docs/words-module/4-prf.html | 76 ++++---- docs/words-module/P-wtmd.html | 165 +++++++++++++++++- docs/words-test/1-ut.html | 4 +- .../Chapter 5/Language Services.w | 4 +- .../Chapter 5/Project Services.w | 6 +- .../supervisor-module/Chapter 6/Headings.w | 2 +- .../supervisor-module/Chapter 6/Inclusions.w | 2 +- .../Chapter 6/The Options File.w | 2 +- .../Chapter 7/Individual Pages.w | 2 +- .../Chapter 13/Runtime Support for Kinds.w | 4 +- .../Chapter 15/Condition Properties.w | 6 +- .../Chapter 15/Either-Or Properties.w | 2 +- .../Chapter 15/Measurement Adjectives.w | 4 +- inform7/core-module/Chapter 15/Properties.w | 2 +- .../Chapter 15/Same Property Relation.w | 2 +- .../Chapter 15/Valued Properties.w | 2 +- .../core-module/Chapter 17/Text Literals.w | 2 +- inform7/core-module/Chapter 20/Equations.w | 4 +- inform7/core-module/Chapter 21/Activities.w | 6 +- .../Chapter 25/Compile Invocations Inline.w | 8 +- .../Chapter 25/Parse Invocations.w | 4 +- .../core-module/Chapter 26/Compiled Text.w | 4 +- .../core-module/Chapter 5/Literal Patterns.w | 38 ++-- inform7/core-module/Chapter 6/New Verbs.w | 6 +- inform7/core-module/Chapter 7/Rule Subtrees.w | 2 +- inform7/core-module/Chapter 9/The Creator.w | 6 +- .../if-module/Chapter 2/Bibliographic Data.w | 4 +- inform7/if-module/Chapter 3/Scenes.w | 20 +-- inform7/if-module/Chapter 3/Spatial Model.w | 2 +- .../if-module/Chapter 3/The Naming Thicket.w | 8 +- inform7/if-module/Chapter 3/The Player.w | 2 +- inform7/if-module/Chapter 4/Actions.w | 8 +- inform7/if-module/Chapter 5/Grammar Tokens.w | 2 +- .../Chapter 5/Traverse for Grammar.w | 4 +- .../Chapter 2/Documentation References.w | 2 +- .../Chapter 2/Tries and Inflections.w | 2 +- .../Chapter 3/Declensions.w | 4 +- .../Chapter 3/Grading Adjectives.w | 6 +- .../Chapter 3/Past Participles.w | 2 +- .../Chapter 3/Pluralisation.w | 2 +- .../Chapter 3/Verb Conjugation.w | 6 +- .../inflections-test/Chapter 1/Unit Tests.w | 2 +- .../kinds-module/Chapter 2/Kind Interpreter.w | 6 +- inform7/linguistics-module/Contents.w | 3 + .../building-module/Chapter 2/Inter Schemas.w | 2 +- shared/words-module/Chapter 2/Vocabulary.w | 12 +- .../words-module/Chapter 2/Word Assemblages.w | 4 +- shared/words-module/Chapter 3/Feeds.w | 24 +-- shared/words-module/Chapter 3/Identifiers.w | 9 +- shared/words-module/Chapter 4/Preform.w | 6 +- .../Preliminaries/What This Module Does.w | 142 +++++++++++++++ 131 files changed, 755 insertions(+), 430 deletions(-) diff --git a/README.md b/README.md index a5a7e019b..b5c45dcf2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Inform 7 -v10.1.0-alpha.1+6Q45 'Krypton' (11 May 2020) +v10.1.0-alpha.1+6Q46 'Krypton' (12 May 2020) ## About Inform 7 diff --git a/build.txt b/build.txt index 8ba61d113..b8d3b6041 100644 --- a/build.txt +++ b/build.txt @@ -1,3 +1,3 @@ Prerelease: alpha.1 -Build Date: 11 May 2020 -Build Number: 6Q45 +Build Date: 12 May 2020 +Build Number: 6Q46 diff --git a/docs/building-module/2-is.html b/docs/building-module/2-is.html index 98303b201..a6398bae7 100644 --- a/docs/building-module/2-is.html +++ b/docs/building-module/2-is.html @@ -202,7 +202,7 @@ For example, in

-    if (x == 1) { print "Hello!"; }
+    if (x == 1) { print "Hello; }
 

the print statement occurs inside a complete block, which will eventually be represented as a CODE_ISNT. But some inline phrase definitions leave @@ -1151,7 +1151,7 @@ optional, operand in operand2 } #ifdef CORE_MODULE if (t->extremal_property_sign != MEASURE_T_EXACTLY) { - wording W = Feeds::feed_stream(pname); + wording W = Feeds::feed_text(pname); if (<property-name>(W)) t->extremal_property = <<rp>>; } #endif diff --git a/docs/core-module/13-rsfk.html b/docs/core-module/13-rsfk.html index ba37d48f6..9ba6246f4 100644 --- a/docs/core-module/13-rsfk.html +++ b/docs/core-module/13-rsfk.html @@ -719,7 +719,7 @@ compile under Inform 6. package_request *PR = Kinds::Behaviour::package(K); TEMPORARY_TEXT(TEMP); Kinds::Textual::write(TEMP, K); - wording W = Feeds::feed_stream(TEMP); + wording W = Feeds::feed_text(TEMP); rks->rks_iname = Hierarchy::make_iname_with_memo(KIND_HL, PR, W); DISCARD_TEXT(TEMP); rks->rks_dv_iname = Hierarchy::make_iname_in(DEFAULT_VALUE_HL, PR); @@ -1213,7 +1213,7 @@ each such kind, and needed at run-time. package_request *R2 = Kinds::Behaviour::package(K); TEMPORARY_TEXT(KT); Kinds::Textual::write(KT, K); - wording W = Feeds::feed_stream(KT); + wording W = Feeds::feed_text(KT); DISCARD_TEXT(KT); int v = -2; if (Kinds::Compare::lt(K, K_object)) v = Kinds::RunTime::I6_classnumber(K); diff --git a/docs/core-module/15-cp.html b/docs/core-module/15-cp.html index 42ff54600..42e36a202 100644 --- a/docs/core-module/15-cp.html +++ b/docs/core-module/15-cp.html @@ -197,12 +197,12 @@ nameless subjects.) feed_t id = Feeds::begin(); wording W2 = InferenceSubjects::get_name_text(infs); if (Wordings::nonempty(W2)) Feeds::feed_wording(W2); - else Feeds::feed_text(L" nameless "); - Feeds::feed_text(L" condition "); + else Feeds::feed_C_string(L" nameless "); + Feeds::feed_C_string(L" condition "); if (ct > 0) { TEMPORARY_TEXT(numb); WRITE_TO(numb, " %d ", ct+1); - Feeds::feed_stream(numb); + Feeds::feed_text(numb); DISCARD_TEXT(numb); } W = Feeds::end(id); diff --git a/docs/core-module/15-ep.html b/docs/core-module/15-ep.html index b54d91f9f..48f5d5909 100644 --- a/docs/core-module/15-ep.html +++ b/docs/core-module/15-ep.html @@ -151,7 +151,7 @@ relies on adjectival meanings.

 property *Properties::EitherOr::new_nameless(wchar_t *I6_form) {
-    wording W = Feeds::feed_text(I6_form);
+    wording W = Feeds::feed_C_string(I6_form);
     package_request *R = Hierarchy::synoptic_package(PROPERTIES_HAP);
     inter_name *iname = Hierarchy::make_iname_with_memo(PROPERTY_HL, R, W);
     property *prn = Properties::create(EMPTY_WORDING, R, iname);
diff --git a/docs/core-module/15-ma.html b/docs/core-module/15-ma.html
index 41bfc3cec..f92cea335 100644
--- a/docs/core-module/15-ma.html
+++ b/docs/core-module/15-ma.html
@@ -490,7 +490,7 @@ can't normally be unravelled at compile time.
     WRITE_TO(TEMP, " To decide which object is %N ( S - description of objects ) ",
         Wordings::first_wn(mdef->superlative));
     Sentences::make_node(Task::syntax_tree(),
-        Feeds::feed_stream(TEMP),
+        Feeds::feed_text(TEMP),
         ':');
     DISCARD_TEXT(TEMP);
 
@@ -503,7 +503,7 @@ can't normally be unravelled at compile time. WRITE_TO(TEMP, " (- {-primitive-definition:extremal%s%W} -) ", Properties::Measurement::strict_comparison(mdef->region_shape), mdef->name_of_property_to_compare); - Sentences::make_node(Task::syntax_tree(), Feeds::feed_stream(TEMP), '.'); + Sentences::make_node(Task::syntax_tree(), Feeds::feed_text(TEMP), '.'); DISCARD_TEXT(TEMP); diff --git a/docs/core-module/15-pr.html b/docs/core-module/15-pr.html index ffd2fa579..e15a6933b 100644 --- a/docs/core-module/15-pr.html +++ b/docs/core-module/15-pr.html @@ -233,7 +233,7 @@ either/or property where a valued property is wanted, or vice versa. "you wanted. Maybe the punctuation is wrong?"); Problems::issue_problem_end(); } - if (unfortunate) W = Feeds::feed_text(L"problem recovery name"); + if (unfortunate) W = Feeds::feed_C_string(L"problem recovery name");

§5.2. Name clashes between properties and other constructs are surprisingly often diff --git a/docs/core-module/15-spr.html b/docs/core-module/15-spr.html index e36faa742..5902ddf9b 100644 --- a/docs/core-module/15-spr.html +++ b/docs/core-module/15-spr.html @@ -168,7 +168,7 @@ truncate to a reasonable length, ensuring that the result doesn't exceed WRITE_TO(i7_name, "same-%<W-as", prn->name); LOOP_THROUGH_TEXT(pos, i7_name) if (Str::get(pos) == ' ') Str::put(pos, '-'); - wording I7W = Feeds::feed_stream_expanding_strings(i7_name); + wording I7W = Feeds::feed_text_expanding_strings(i7_name); rel_name = Lexer::word(Wordings::first_wn(I7W)); DISCARD_TEXT(i7_name); diff --git a/docs/core-module/15-vp.html b/docs/core-module/15-vp.html index 61fc3cecf..065306f74 100644 --- a/docs/core-module/15-vp.html +++ b/docs/core-module/15-vp.html @@ -130,7 +130,7 @@ to the end user.

 property *Properties::Valued::new_nameless(text_stream *I6_form, kind *K) {
-    wording W = Feeds::feed_stream(I6_form);
+    wording W = Feeds::feed_text(I6_form);
     if (K == NULL) internal_error("new nameless property without kind");
     package_request *R = Hierarchy::synoptic_package(PROPERTIES_HAP);
     Hierarchy::markup(R, PROPERTY_NAME_HMD, I6_form);
diff --git a/docs/core-module/17-tl.html b/docs/core-module/17-tl.html
index 5af19b368..a6f631709 100644
--- a/docs/core-module/17-tl.html
+++ b/docs/core-module/17-tl.html
@@ -362,7 +362,7 @@ different for compilation purposes.
 
 
 void Strings::TextLiterals::compile_literal_from_text(inter_name *context, inter_t *v1, inter_t *v2, wchar_t *p) {
-    literal_text *lt = Strings::TextLiterals::compile_literal(NULL, TRUE, Feeds::feed_text(p));
+    literal_text *lt = Strings::TextLiterals::compile_literal(NULL, TRUE, Feeds::feed_C_string(p));
     Emit::to_ival_in_context(context, v1, v2, lt->lt_sba_iname);
 }
 
diff --git a/docs/core-module/20-eq.html b/docs/core-module/20-eq.html index 9c58024b8..854f176f6 100644 --- a/docs/core-module/20-eq.html +++ b/docs/core-module/20-eq.html @@ -738,7 +738,7 @@ declarations will trump them. void Equations::eqn_declare_standard_symbols(void) { if (standard_equation_symbols) return; - wording TCW = Feeds::feed_text(L"e pi"); + wording TCW = Feeds::feed_C_string(L"e pi"); LOOP_THROUGH_WORDING(i, TCW) { wording V = Wordings::one_word(i); if (<s-type-expression>(V)) { @@ -1032,7 +1032,7 @@ capacity; and so is the number 0 itself. TEMPORARY_TEXT(text_of_number); Copy the literal number into a C string, flanked by spaces28.1.2.1; now sneakily add this to the word stream, and let the S-parser read it: - wording NW = Feeds::feed_stream(text_of_number); + wording NW = Feeds::feed_text(text_of_number); DISCARD_TEXT(text_of_number); parse_node *spec = NULL; diff --git a/docs/core-module/21-ac.html b/docs/core-module/21-ac.html index 7faf24e06..38de9af74 100644 --- a/docs/core-module/21-ac.html +++ b/docs/core-module/21-ac.html @@ -292,7 +292,7 @@ noun for it; for example, the "announcing activity". } feed_t id = Feeds::begin(); - Feeds::feed_text_expanding_strings(L"before"); + Feeds::feed_C_string_expanding_strings(L"before"); Feeds::feed_wording(av->name); wording SW = Feeds::end(id); package_request *BR = Hierarchy::make_package_in(BEFORE_RB_HL, av->av_package); @@ -300,7 +300,7 @@ noun for it; for example, the "announcing activity". Rulebooks::new_automatic(SW, av->activity_on_what_kind, NO_OUTCOME, FALSE, future_action_flag, TRUE, BR); id = Feeds::begin(); - Feeds::feed_text_expanding_strings(L"for"); + Feeds::feed_C_string_expanding_strings(L"for"); Feeds::feed_wording(av->name); SW = Feeds::end(id); package_request *FR = Hierarchy::make_package_in(FOR_RB_HL, av->av_package); @@ -308,7 +308,7 @@ noun for it; for example, the "announcing activity". Rulebooks::new_automatic(SW, av->activity_on_what_kind, SUCCESS_OUTCOME, FALSE, future_action_flag, TRUE, FR); id = Feeds::begin(); - Feeds::feed_text_expanding_strings(L"after"); + Feeds::feed_C_string_expanding_strings(L"after"); Feeds::feed_wording(av->name); SW = Feeds::end(id); package_request *AR = Hierarchy::make_package_in(AFTER_RB_HL, av->av_package); diff --git a/docs/core-module/22-itp.html b/docs/core-module/22-itp.html index 4b1cfa8a3..cb18f838f 100644 --- a/docs/core-module/22-itp.html +++ b/docs/core-module/22-itp.html @@ -127,9 +127,9 @@ like this:
     [ R_231 N;
         increase the score by N;
-        say "Well done!";
-        rtrue;
-    ];
+        say "Well done;
+        rtrue;
+    ];
 

Devising this R_231 function is called "compiling" the phrase. On the other hand, compiling an invocation of "alter score by (some - number)" diff --git a/docs/core-module/24-lv.html b/docs/core-module/24-lv.html index 47729eeed..a940e6887 100644 --- a/docs/core-module/24-lv.html +++ b/docs/core-module/24-lv.html @@ -1226,7 +1226,7 @@ lvalue which can be used to evaluate or assign to the variable: local_variable *lvar = (local_variable *) vL; if (lvar == NULL) internal_error("no such variable"); switch (format_string[0]) { - case 'L': /* bare |%L| means the same as |%+L|, so fall through to... */ + case 'L': bare %L means the same as %+L, so fall through to... case '+': WRITE("%+W", lvar->varname); break; case '-': WRITE("%-W", lvar->varname); break; case '~': WRITE("%S", lvar->lv_lvalue); break; diff --git a/docs/core-module/25-cii.html b/docs/core-module/25-cii.html index 6cbb2fc25..c332040b4 100644 --- a/docs/core-module/25-cii.html +++ b/docs/core-module/25-cii.html @@ -279,7 +279,7 @@ or with a fragment of Inform 7 source text inside Expand a bracing containing a miscellaneous command3.6; } - wording BRW = Feeds::feed_stream(sche->bracing); + wording BRW = Feeds::feed_text(sche->bracing); Expand a bracing containing natural language text3.1; }

@@ -2160,7 +2160,7 @@ then the operand refers to its value in the current invocation; if ((Str::get_at(operand, 1) == 0) && (Str::get_at(operand, 0) >= '0') && (Str::get_at(operand, 0) <= '9')) lvar = my_vars[Str::get_at(operand, 0) - '0']; else { - wording LW = Feeds::feed_stream(operand); + wording LW = Feeds::feed_text(operand); lvar = LocalVariables::parse(&(ph->stack_frame), LW); if (lvar) { int tok = LocalVariables::get_parameter_number(lvar); @@ -2203,7 +2203,7 @@ which would safely abandon any attempt to define a value like this: for (int i=0; i<27; i++) kind_vars_inline[i] = NULL; for (; kvd; kvd=kvd->next) kind_vars_inline[kvd->kv_number] = kvd->kv_value; kind **saved = Frames::temporarily_set_kvs(kind_vars_inline); - wording KW = Feeds::feed_stream(operand); + wording KW = Feeds::feed_text(operand); parse_node *spec = NULL; if (<s-type-expression>(KW)) spec = <<rp>>; @@ -2234,7 +2234,7 @@ of defined adjectives. So: } void Invocations::Inline::compile_I7_expression_from_text_inner(value_holster *VH, text_stream *OUT, text_stream *p) { - wording LW = Feeds::feed_stream(p); + wording LW = Feeds::feed_text(p); if (<property-name>(LW)) { if (VH) diff --git a/docs/core-module/25-pi.html b/docs/core-module/25-pi.html index 3db621cd9..add781450 100644 --- a/docs/core-module/25-pi.html +++ b/docs/core-module/25-pi.html @@ -326,13 +326,13 @@ word, though.)
     feed_t id = Feeds::begin();
     if (i > Wordings::first_wn(W)) Feeds::feed_wording(Wordings::up_to(W, i-1));
-    if (Str::len(a_form) > 0) Feeds::feed_stream_expanding_strings(a_form);
+    if (Str::len(a_form) > 0) Feeds::feed_text_expanding_strings(a_form);
     if (i < Wordings::last_wn(W)) Feeds::feed_wording(Wordings::from(W, i+1));
     AW = Feeds::end(id);
 
     id = Feeds::begin();
     if (i > Wordings::first_wn(W)) Feeds::feed_wording(Wordings::up_to(W, i-1));
-    if (Str::len(b_form) > 0) Feeds::feed_stream_expanding_strings(b_form);
+    if (Str::len(b_form) > 0) Feeds::feed_text_expanding_strings(b_form);
     if (i < Wordings::last_wn(W)) Feeds::feed_wording(Wordings::from(W, i+1));
     BW = Feeds::end(id);
 
diff --git a/docs/core-module/26-ct.html b/docs/core-module/26-ct.html index 024dfdd4b..da0902b0a 100644 --- a/docs/core-module/26-ct.html +++ b/docs/core-module/26-ct.html @@ -200,7 +200,7 @@ behave more like dictionary words and the } for (i=from; i<to; i++) { switch(p[i]) { - + case '\n': WRITE("\n"); break; case '\t': @@ -405,7 +405,7 @@ exceptional case. while ((p[j]) && (p[j] != ']')) PUT_TO(substitution_buffer, p[j++]); if (p[j] == ']') { - wording XW = Feeds::feed_stream(substitution_buffer); + wording XW = Feeds::feed_text(substitution_buffer); if (<s-unicode-character>(XW) == FALSE) return -1; PUT(Rvalues::to_Unicode_point(<<rp>>)); return j; @@ -421,7 +421,7 @@ exceptional case. while ((Str::get_at(p, j)) && (Str::get_at(p, j) != ']')) PUT_TO(substitution_buffer, Str::get_at(p, j++)); if (Str::get_at(p, j) == ']') { - wording XW = Feeds::feed_stream(substitution_buffer); + wording XW = Feeds::feed_text(substitution_buffer); if (<s-unicode-character>(XW) == FALSE) return -1; PUT(Rvalues::to_Unicode_point(<<rp>>)); return j; diff --git a/docs/core-module/27-em.html b/docs/core-module/27-em.html index ef860c529..6397f1082 100644 --- a/docs/core-module/27-em.html +++ b/docs/core-module/27-em.html @@ -658,14 +658,14 @@ insert them into the Inter stream close to the top. inter_bookmark current_inter_bookmark; void Emit::early_comment(text_stream *text) { - + inter_t ID = Inter::Warehouse::create_text(Inter::Tree::warehouse(Emit::tree()), Inter::Bookmarks::package(Packaging::at(Emit::tree()))); Str::copy(Inter::Warehouse::get_text(Inter::Tree::warehouse(Emit::tree()), ID), text); Produce::guard(Inter::Comment::new(Packaging::at(Emit::tree()), Produce::baseline(Packaging::at(Emit::tree())) + 1, NULL, ID)); */ } void Emit::code_comment(text_stream *text) { - + inter_t ID = Inter::Warehouse::create_text(Inter::Tree::warehouse(Emit::tree()), Inter::Bookmarks::package(Packaging::at(Emit::tree()))); Str::copy(Inter::Warehouse::get_text(Inter::Tree::warehouse(Emit::tree()), ID), text); Produce::guard(Inter::Comment::new(Produce::at(Emit::tree()), (inter_t) Produce::level(Emit::tree()), NULL, ID)); */ diff --git a/docs/core-module/5-ins.html b/docs/core-module/5-ins.html index bcbd1b33a..eb22c2863 100644 --- a/docs/core-module/5-ins.html +++ b/docs/core-module/5-ins.html @@ -422,7 +422,7 @@ turns up subsequently, e.g., in response to instance *I = (instance *) vI; if (I == NULL) WRITE("nothing"); else switch (format_string[0]) { - case 'I': /* bare |%I| means the same as |%+I|, so fall through to... */ + case 'I': bare %I means the same as %+I, so fall through to... case '+': Write the instance raw15.1; break; case '-': Write the instance with normalised casing15.2; break; case '~': { diff --git a/docs/core-module/5-lp.html b/docs/core-module/5-lp.html index 54f92cfc7..bb91d6839 100644 --- a/docs/core-module/5-lp.html +++ b/docs/core-module/5-lp.html @@ -702,7 +702,7 @@ infinities to represent arbitrarily large numbers. PUT_TO(real_buffer, wd[wpos++]); } } - wording W = Feeds::feed_stream(real_buffer); + wording W = Feeds::feed_text(real_buffer); DISCARD_TEXT(real_buffer); if ((point_at == -1) && (mult_at == -1)) { if (<cardinal-number>(Wordings::first_word(W)) == FALSE) return NULL; @@ -3426,9 +3426,9 @@ the LPs under each named possibility. Kinds::Textual::write(TEMP, K); feed_t id = Feeds::begin(); - Feeds::feed_text(L"To say ( val - "); - Feeds::feed_stream(TEMP); - Feeds::feed_text(L" ) "); + Feeds::feed_C_string(L"To say ( val - "); + Feeds::feed_text(TEMP); + Feeds::feed_C_string(L" ) "); Feeds::feed_wording(lpn->notation_name); wording XW = Feeds::end(id); Sentences::make_node(Task::syntax_tree(), XW, ':'); @@ -3437,7 +3437,7 @@ the LPs under each named possibility. TEMPORARY_TEXT(print_rule_buff); WRITE_TO(print_rule_buff, " (- {-printing-routine:%S", TEMP); WRITE_TO(print_rule_buff, "}({val}, %d); -) ", lpn->allocation_id + 1); - Feeds::feed_stream(print_rule_buff); + Feeds::feed_text(print_rule_buff); DISCARD_TEXT(print_rule_buff); XW = Feeds::end(id); Sentences::make_node(Task::syntax_tree(), XW, '.'); @@ -3496,11 +3496,11 @@ For instance, defining: literal_pattern_element *lpe = &(lp->lp_elements[i]); feed_t id = Feeds::begin(); - Feeds::feed_text(L"To decide which number is "); + Feeds::feed_C_string(L"To decide which number is "); Feeds::feed_wording(lpe->element_name); - Feeds::feed_text(L" part of ( full - "); - Feeds::feed_stream(TEMP); - Feeds::feed_text(L" ) "); + Feeds::feed_C_string(L" part of ( full - "); + Feeds::feed_text(TEMP); + Feeds::feed_C_string(L" ) "); wording XW = Feeds::end(id); Sentences::make_node(Task::syntax_tree(), XW, ':'); @@ -3513,7 +3513,7 @@ For instance, defining: lpe->element_multiplier, lpe->element_range); else WRITE_TO(print_rule_buff, " (- ({full}%%%d) -) ", lpe->element_range); - Feeds::feed_stream(print_rule_buff); + Feeds::feed_text(print_rule_buff); XW = Feeds::end(id); if (Wordings::phrasual_length(XW) >= MAX_WORDS_PER_PHRASE + 5) Issue a problem for overly long part names41.1.1 @@ -3541,18 +3541,18 @@ For instance, the dollars-and-cents example compiles: if (lp->no_lp_elements > 0) { feed_t id = Feeds::begin(); TEMPORARY_TEXT(print_rule_buff); - Feeds::feed_text(L"To decide which "); - Feeds::feed_stream(TEMP); - Feeds::feed_text(L" is "); - Feeds::feed_stream(TEMP); - Feeds::feed_text(L" with "); + Feeds::feed_C_string(L"To decide which "); + Feeds::feed_text(TEMP); + Feeds::feed_C_string(L" is "); + Feeds::feed_text(TEMP); + Feeds::feed_C_string(L" with "); for (int i=0; i<lp->no_lp_elements; i++) { literal_pattern_element *lpe = &(lp->lp_elements[i]); WRITE_TO(print_rule_buff, " part%d ", i); Feeds::feed_wording(lpe->element_name); - Feeds::feed_text(L" part ( "); - Feeds::feed_stream(print_rule_buff); - Feeds::feed_text(L" - a number ) "); + Feeds::feed_C_string(L" part ( "); + Feeds::feed_text(print_rule_buff); + Feeds::feed_C_string(L" - a number ) "); } wording XW = Feeds::end(id); if (Wordings::phrasual_length(XW) >= MAX_WORDS_PER_PHRASE + 5) @@ -3570,7 +3570,7 @@ For instance, the dollars-and-cents example compiles: WRITE_TO(print_rule_buff, "{part%d}", i); } WRITE_TO(print_rule_buff, ") -) "); - Feeds::feed_stream(print_rule_buff); + Feeds::feed_text(print_rule_buff); XW = Feeds::end(id); Sentences::make_node(Task::syntax_tree(), XW, '.'); } diff --git a/docs/core-module/6-nv.html b/docs/core-module/6-nv.html index 9b4e0799e..805c2f542 100644 --- a/docs/core-module/6-nv.html +++ b/docs/core-module/6-nv.html @@ -1230,9 +1230,9 @@ foreign verbs (4). WRITE_TO(unstarred, "%V", words[i]); Str::delete_last_character(unstarred); feed_t id = Feeds::begin(); - Feeds::feed_text(L" "); - Feeds::feed_stream(unstarred); - Feeds::feed_text(L" "); + Feeds::feed_C_string(L" "); + Feeds::feed_text(unstarred); + Feeds::feed_C_string(L" "); DISCARD_TEXT(unstarred); wording W = Feeds::end(id); adjectival_phrase *aph = Adjectives::declare(W, vc->defined_in); diff --git a/docs/core-module/7-hdn.html b/docs/core-module/7-hdn.html index 5d1e5d912..577a0510c 100644 --- a/docs/core-module/7-hdn.html +++ b/docs/core-module/7-hdn.html @@ -669,8 +669,8 @@ Version", contains the Inform build number in its usual form: "4Q34", for instan
     WRITE("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
-        "<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" "
-        "\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n");
+        "<!DOCTYPE plist PUBLIC \"-Apple Computer//DTD PLIST 1.0//EN\" "
+        "\"http:www.apple.com/DTDs/PropertyList-1.0.dtd\">\n");
 

§16.2. Note that a level of 0, and a title of --, signifies a File (0) level diff --git a/docs/core-module/7-rs.html b/docs/core-module/7-rs.html index 23dbbe978..c8108450c 100644 --- a/docs/core-module/7-rs.html +++ b/docs/core-module/7-rs.html @@ -1432,7 +1432,7 @@ annotations to them. if ((Wordings::length(W) == 1) && (Vocabulary::test_flags(Wordings::first_wn(W), TEXTWITHSUBS_MC)) && (depth == 0)) { wchar_t *p = Lexer::word_raw_text(Wordings::first_wn(W)); Check that substitution does not contain suspicious punctuation8.1.1; - wording A = Feeds::feed_text_expanding_strings(p); + wording A = Feeds::feed_C_string_expanding_strings(p); if (<verify-expanded-text-substitution>(A)) Sentences::RuleSubtrees::unroll_says(cb_node, A, depth+1); } else { diff --git a/docs/core-module/9-rpt.html b/docs/core-module/9-rpt.html index 4ffc8f8da..0291ad396 100644 --- a/docs/core-module/9-rpt.html +++ b/docs/core-module/9-rpt.html @@ -544,7 +544,7 @@ property of something. PW = GET_RW(<newfound-property-of>, 1); OW = GET_RW(<newfound-property-of>, 2); } - if ((prn) && (Properties::is_value_property(prn)) + if ((prn) && (Properties::is_value_property(prn)) && (Properties::Valued::coincides_with_kind(prn)) */) { LOGIF(NOUN_RESOLUTION, "Resolving new-property of: $Y\n", prn); Node::set_type(p, X_OF_Y_NT); diff --git a/docs/core-module/9-tc.html b/docs/core-module/9-tc.html index 41faa22df..c0c479e40 100644 --- a/docs/core-module/9-tc.html +++ b/docs/core-module/9-tc.html @@ -1277,7 +1277,7 @@ and an COMMON_NOUN_NT< } if ((Wordings::nonempty(OW)) && (Wordings::nonempty(NW)) && (Wordings::empty(CW))) { feed_t id = Feeds::begin(); - Feeds::feed_text_expanding_strings(L" its "); + Feeds::feed_C_string_expanding_strings(L" its "); Feeds::feed_wording(NW); CW = Feeds::end(id); } @@ -1312,7 +1312,7 @@ and an COMMON_NOUN_NT< WRITE_TO(genitive_form, "%+W's ", Wordings::one_word(Wordings::last_wn(OW))); } } - Feeds::feed_stream_expanding_strings(genitive_form); + Feeds::feed_text_expanding_strings(genitive_form); DISCARD_TEXT(genitive_form);

@@ -1336,7 +1336,7 @@ and an COMMON_NOUN_NT< WRITE_TO(textual_count, " %d ", ++name_stubs_count); feed_t id = Feeds::begin(); Feeds::feed_wording(SW); - Feeds::feed_stream_expanding_strings(textual_count); + Feeds::feed_text_expanding_strings(textual_count); NW = Feeds::end(id); DISCARD_TEXT(textual_count); } diff --git a/docs/if-module/2-bd.html b/docs/if-module/2-bd.html index c51f48834..46b5de267 100644 --- a/docs/if-module/2-bd.html +++ b/docs/if-module/2-bd.html @@ -161,8 +161,8 @@ and set the "story title" and "story author" variables accordingly. TEMPORARY_TEXT(A); WRITE_TO(T, "\"%S\" ", edn->work->title); WRITE_TO(A, "\"%S\" ", edn->work->author_name); - wording TW = Feeds::feed_stream(T); - wording AW = Feeds::feed_stream(A); + wording TW = Feeds::feed_text(T); + wording AW = Feeds::feed_text(A); DISCARD_TEXT(T); DISCARD_TEXT(A); @@ -505,7 +505,7 @@ for fields in iFiction records.)
     int i = 0, i2 = Wide::len(p)-1, snl, wsc;
-    if ((p[0] == '"') && (p[i2] == '"')) { i++; i2--; } /* omit surrounding double-quotes */
+    if ((p[0] == '"') && (p[i2] == '"')) { i++; i2--; }  omit surrounding double-quotes
     while (Characters::is_babel_whitespace(p[i])) i++;  omit leading whitespace
     while ((i2>=0) && (Characters::is_babel_whitespace(p[i2]))) i2--;  omit trailing whitespace
     for (snl = FALSE, wsc = 0; i<=i2; i++) {
diff --git a/docs/if-module/2-ri.html b/docs/if-module/2-ri.html
index 802affb84..a3b2d7c50 100644
--- a/docs/if-module/2-ri.html
+++ b/docs/if-module/2-ri.html
@@ -699,12 +699,12 @@ art and see that its dimensions conform to Treaty of Babel requirements.
     unsigned int height, unsigned int width) {
     WRITE("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
     WRITE("<ifindex version=\"1.0\" "
-        "xmlns=\"http://babel.ifarchive.org/protocol/iFiction/\">\n"); INDENT;
-    WRITE("<story>\n"); INDENT;
-    Write the body of the iFiction record11.1;
-    OUTDENT; WRITE("</story>\n");
-    OUTDENT; WRITE("</ifindex>\n");
-}
+        "xmlns=\"http:babel.ifarchive.org/protocol/iFiction/\">\n"); INDENT;
+    WRITE("<story>\n"); INDENT;
+    Write the body of the iFiction record11.1;
+    OUTDENT; WRITE("</story>\n");
+    OUTDENT; WRITE("</ifindex>\n");
+}
 

§11.1. Write the body of the iFiction record11.1 =

diff --git a/docs/if-module/3-scn.html b/docs/if-module/3-scn.html index 701e10dad..8eb770e86 100644 --- a/docs/if-module/3-scn.html +++ b/docs/if-module/3-scn.html @@ -342,17 +342,17 @@ ends merrily" and "when the Banquet Entertainment ends merrily". wording NW = Instances::get_name(sc->as_instance, FALSE); feed_t id = Feeds::begin(); - Feeds::feed_text_expanding_strings(L"when"); + Feeds::feed_C_string_expanding_strings(L"when"); Feeds::feed_wording(NW); - Feeds::feed_text_expanding_strings((end==0)?L"begins":L"ends"); + Feeds::feed_C_string_expanding_strings((end==0)?L"begins":L"ends"); if (end >= 2) Feeds::feed_wording(sc->end_names[end]); RW = Feeds::end(id); id = Feeds::begin(); - Feeds::feed_text_expanding_strings(L"when the"); + Feeds::feed_C_string_expanding_strings(L"when the"); NW = Instances::get_name(sc->as_instance, FALSE); Feeds::feed_wording(NW); - Feeds::feed_text_expanding_strings((end==0)?L"begins":L"ends"); + Feeds::feed_C_string_expanding_strings((end==0)?L"begins":L"ends"); if (end >= 2) Feeds::feed_wording(sc->end_names[end]); AW = Feeds::end(id); @@ -365,9 +365,9 @@ ends merrily" and "when the Banquet Entertainment ends merrily". TEMPORARY_TEXT(i6_code); feed_t id = Feeds::begin(); - Feeds::feed_text_expanding_strings(L"To decide if (S - "); + Feeds::feed_C_string_expanding_strings(L"To decide if (S - "); Feeds::feed_wording(NW); - Feeds::feed_text_expanding_strings(L") ended "); + Feeds::feed_C_string_expanding_strings(L") ended "); Feeds::feed_wording(sc->end_names[end]); Sentences::make_node(Task::syntax_tree(), Feeds::end(id), ':'); @@ -375,13 +375,13 @@ ends merrily" and "when the Banquet Entertainment ends merrily". Str::clear(i6_code); WRITE_TO(i6_code, " (- (scene_latest_ending-->%d == %d) -) ", sc->allocation_id, end); - Feeds::feed_stream_expanding_strings(i6_code); + Feeds::feed_text_expanding_strings(i6_code); Sentences::make_node(Task::syntax_tree(), Feeds::end(id), '.'); id = Feeds::begin(); - Feeds::feed_text_expanding_strings(L"To decide if (S - "); + Feeds::feed_C_string_expanding_strings(L"To decide if (S - "); Feeds::feed_wording(NW); - Feeds::feed_text_expanding_strings(L") did not end "); + Feeds::feed_C_string_expanding_strings(L") did not end "); Feeds::feed_wording(sc->end_names[end]); Sentences::make_node(Task::syntax_tree(), Feeds::end(id), ':'); @@ -389,7 +389,7 @@ ends merrily" and "when the Banquet Entertainment ends merrily". Str::clear(i6_code); WRITE_TO(i6_code, " (- (scene_latest_ending-->%d ~= 0 or %d) -) ", sc->allocation_id, end); - Feeds::feed_stream_expanding_strings(i6_code); + Feeds::feed_text_expanding_strings(i6_code); Sentences::make_node(Task::syntax_tree(), Feeds::end(id), '.'); Sentences::RuleSubtrees::register_recently_lexed_phrases(); DISCARD_TEXT(i6_code); diff --git a/docs/if-module/3-sm.html b/docs/if-module/3-sm.html index a57812a70..275332352 100644 --- a/docs/if-module/3-sm.html +++ b/docs/if-module/3-sm.html @@ -1414,7 +1414,7 @@ as a value for description TEMPORARY_TEXT(val); WRITE_TO(val, "\"\""); Properties::Valued::assert(P_description, Kinds::Knowledge::as_subject(K_room), - Rvalues::from_unescaped_wording(Feeds::feed_stream(val)), LIKELY_CE); + Rvalues::from_unescaped_wording(Feeds::feed_text(val)), LIKELY_CE); DISCARD_TEXT(val); } } diff --git a/docs/if-module/3-tnt.html b/docs/if-module/3-tnt.html index b883abc4e..4fe665d36 100644 --- a/docs/if-module/3-tnt.html +++ b/docs/if-module/3-tnt.html @@ -189,7 +189,7 @@ a room called the Counting House"). parse_node *text_of_word_the = NULL; void PL::Naming::object_takes_definite_article(inference_subject *subj) { if (text_of_word_the == NULL) - text_of_word_the = Rvalues::from_wording(Feeds::feed_text(L"\"the\"")); + text_of_word_the = Rvalues::from_wording(Feeds::feed_C_string(L"\"the\"")); Properties::Valued::assert(P_article, subj, text_of_word_the, LIKELY_CE); } @@ -346,7 +346,7 @@ a comma, and that's caught here: Rvalues::from_iname(faux), CERTAIN_CE); else Properties::Valued::assert(P_printed_name, subj, - Rvalues::from_unescaped_wording(Feeds::feed_stream(PROP)), CERTAIN_CE); + Rvalues::from_unescaped_wording(Feeds::feed_text(PROP)), CERTAIN_CE);

§11.1.2.2. The I6 cap_short_name has no corresponding property in I7. Note that it's @@ -382,7 +382,7 @@ actually means it's rarely needed.) Rvalues::from_iname(faux), CERTAIN_CE); else Properties::Valued::assert(P_cap_short_name, subj, - Rvalues::from_unescaped_wording(Feeds::feed_stream(PROP)), CERTAIN_CE); + Rvalues::from_unescaped_wording(Feeds::feed_text(PROP)), CERTAIN_CE); }

@@ -458,7 +458,7 @@ together in lists. text_stream *PROP = Str::new(); PL::Naming::compose_words_to_I6_naming_text(PROP, PW, FALSE, TRUE); Properties::Valued::assert(P_printed_plural_name, subj, - Rvalues::from_unescaped_wording(Feeds::feed_stream(PROP)), CERTAIN_CE); + Rvalues::from_unescaped_wording(Feeds::feed_text(PROP)), CERTAIN_CE); } } diff --git a/docs/if-module/3-tp.html b/docs/if-module/3-tp.html index 375df7be0..f7212c3c3 100644 --- a/docs/if-module/3-tp.html +++ b/docs/if-module/3-tp.html @@ -371,7 +371,7 @@ we assume he is freestanding in the earliest defined room. if ((stage == 3) && (I_yourself)) { P_saved_short_name = Properties::Valued::new_nameless(I"saved_short_name", K_text); Properties::Valued::assert(P_saved_short_name, Instances::as_subject(I_yourself), - Rvalues::from_unescaped_wording(Feeds::feed_stream(I"yourself")), CERTAIN_CE); + Rvalues::from_unescaped_wording(Feeds::feed_text(I"yourself")), CERTAIN_CE); } if (stage == 4) { Set the start room to the earliest room defined in the source text12.1; diff --git a/docs/if-module/4-act.html b/docs/if-module/4-act.html index f5efac421..7154da182 100644 --- a/docs/if-module/4-act.html +++ b/docs/if-module/4-act.html @@ -363,7 +363,7 @@ make that explicit: for instance, "taking" becomes "the taking action". an->use_verb_routine_in_I6_library = FALSE; feed_t id = Feeds::begin(); - Feeds::feed_text_expanding_strings(L"check"); + Feeds::feed_C_string_expanding_strings(L"check"); Feeds::feed_wording(an->present_name); wording W = Feeds::end(id); package_request *CR = Hierarchy::make_package_in(CHECK_RB_HL, an->an_package); @@ -373,7 +373,7 @@ make that explicit: for instance, "taking" becomes "the taking action". Rulebooks::fragment_by_actions(an->check_rules, 1); id = Feeds::begin(); - Feeds::feed_text_expanding_strings(L"carry out"); + Feeds::feed_C_string_expanding_strings(L"carry out"); Feeds::feed_wording(an->present_name); W = Feeds::end(id); package_request *OR = Hierarchy::make_package_in(CARRY_OUT_RB_HL, an->an_package); @@ -383,7 +383,7 @@ make that explicit: for instance, "taking" becomes "the taking action". Rulebooks::fragment_by_actions(an->carry_out_rules, 2); id = Feeds::begin(); - Feeds::feed_text_expanding_strings(L"report"); + Feeds::feed_C_string_expanding_strings(L"report"); Feeds::feed_wording(an->present_name); W = Feeds::end(id); package_request *RR = Hierarchy::make_package_in(REPORT_RB_HL, an->an_package); @@ -736,7 +736,7 @@ action patterns. For example, the Standard Rules define: MW = GET_RW(<action-variable>, 1); int wn = Wordings::first_wn(MW); Word::dequote(wn); - MW = Feeds::feed_text(Lexer::word_text(wn)); + MW = Feeds::feed_C_string(Lexer::word_text(wn)); if (Wordings::length(MW) > 1) { Problems::quote_source(1, current_sentence); Problems::quote_wording(2, MW); diff --git a/docs/if-module/5-gt2.html b/docs/if-module/5-gt2.html index e66176337..9c882eeeb 100644 --- a/docs/if-module/5-gt2.html +++ b/docs/if-module/5-gt2.html @@ -167,7 +167,7 @@ out", a sequence of five lexical words. case TRUE: Word::dequote(Wordings::first_wn(W)); if (*(Lexer::word_text(Wordings::first_wn(W))) == 0) return; - W = Feeds::feed_text_full(Lexer::word_text(Wordings::first_wn(W)), FALSE, GRAMMAR_PUNCTUATION_MARKS); + W = Feeds::feed_C_string_full(Lexer::word_text(Wordings::first_wn(W)), FALSE, GRAMMAR_PUNCTUATION_MARKS); LOOP_THROUGH_WORDING(i, W) { parse_node *newpn = NounPhrases::new_raw(Wordings::one_word(i)); Node::set_type(newpn, TOKEN_NT); diff --git a/docs/if-module/5-tfg.html b/docs/if-module/5-tfg.html index bc2adaef1..532323e28 100644 --- a/docs/if-module/5-tfg.html +++ b/docs/if-module/5-tfg.html @@ -957,7 +957,7 @@ problem message for this case is now commented out. return; } - XW = Feeds::feed_text_full(Lexer::word_text(Wordings::first_wn(W)), TRUE, GRAMMAR_PUNCTUATION_MARKS); + XW = Feeds::feed_C_string_full(Lexer::word_text(Wordings::first_wn(W)), TRUE, GRAMMAR_PUNCTUATION_MARKS); to_pn = NounPhrases::new_raw(W); PL::Parsing::Tokens::break_into_tokens(to_pn, XW); if (to_pn->down == NULL) { @@ -1028,7 +1028,7 @@ problem message for this case is now commented out. switch(gv_is) { case GV_IS_TOKEN: - XW = Feeds::feed_text_full(Lexer::word_text(Wordings::first_wn(ur->reference_text)), TRUE, GRAMMAR_PUNCTUATION_MARKS); + XW = Feeds::feed_C_string_full(Lexer::word_text(Wordings::first_wn(ur->reference_text)), TRUE, GRAMMAR_PUNCTUATION_MARKS); LOGIF(GRAMMAR_CONSTRUCTION, "GV_IS_TOKEN as words: %W\n", XW); if (PL::Parsing::valid_new_token_name(XW) == FALSE) { Problems::Issue::sentence_problem(Task::syntax_tree(), _p_(PM_UnderstandAsCompoundText), diff --git a/docs/index-module/2-dr.html b/docs/index-module/2-dr.html index 5d4c2a0d3..4e31ebaf8 100644 --- a/docs/index-module/2-dr.html +++ b/docs/index-module/2-dr.html @@ -141,7 +141,7 @@ file is read on demand; in some runs, it won't be needed. void Index::DocReferences::read_xrefs_helper(text_stream *line, text_file_position *tfp, void *unused_state) { WRITE_TO(line, "\n"); - wording W = Feeds::feed_stream(line); + wording W = Feeds::feed_text(line); if (Wordings::length(W) < 2) return; int from = -1; diff --git a/docs/inflections-module/2-tai.html b/docs/inflections-module/2-tai.html index 45ff73350..638a7c776 100644 --- a/docs/inflections-module/2-tai.html +++ b/docs/inflections-module/2-tai.html @@ -131,7 +131,7 @@ do more than simply fiddle with the final letters. if (Str::get(pos) == '+') PUT_TO(suffixed, ' '); else PUT_TO(suffixed, Str::get(pos)); } - wording W = Feeds::feed_stream(suffixed); + wording W = Feeds::feed_text(suffixed); WordAssemblages::truncate(&wa, 1); DISCARD_TEXT(suffixed); DISCARD_TEXT(unsuffixed); diff --git a/docs/inflections-module/3-dcl.html b/docs/inflections-module/3-dcl.html index 359d657a4..c1b1f2f6d 100644 --- a/docs/inflections-module/3-dcl.html +++ b/docs/inflections-module/3-dcl.html @@ -169,7 +169,7 @@ function togglePopup(material_id) { WRITE_TO(stem, "%W", W); Inflections::follow_suffix_instruction(result, stem, Vocabulary::get_exemplar(pt->ve_pt, TRUE)); - D.name_cased[c%nc] = Feeds::feed_stream(result); + D.name_cased[c%nc] = Feeds::feed_text(result); DISCARD_TEXT(stem); DISCARD_TEXT(result); } @@ -233,7 +233,7 @@ function togglePopup(material_id) { WRITE_TO(stem, "%+W", W); Inflections::follow_suffix_instruction(result, stem, Vocabulary::get_exemplar(pr->first_ptoken->ve_pt, TRUE)); - D.name_cased[c%nc] = Feeds::feed_stream(result); + D.name_cased[c%nc] = Feeds::feed_text(result); DISCARD_TEXT(stem); DISCARD_TEXT(result); } diff --git a/docs/inflections-module/3-ga.html b/docs/inflections-module/3-ga.html index fe63b6eaa..c01da0244 100644 --- a/docs/inflections-module/3-ga.html +++ b/docs/inflections-module/3-ga.html @@ -85,7 +85,7 @@ The following does the suffixing: match_avinue *comp_trie = Preform::Nonparsing::define_trie(<adjective-to-comparative>, TRIE_END, nl); Inflections::suffix_inflection(transformed, comp_trie, comprised); - wording PW = Feeds::feed_stream(transformed); + wording PW = Feeds::feed_text(transformed); word_assemblage merged = Preform::Nonparsing::merge(<comparative-construction>, 0, WordAssemblages::from_wording(PW)); @@ -107,7 +107,7 @@ The following does the suffixing: match_avinue *comp_trie = Preform::Nonparsing::define_trie(<adjective-to-superlative>, TRIE_END, nl); Inflections::suffix_inflection(transformed, comp_trie, comprised); - wording PW = Feeds::feed_stream(transformed); + wording PW = Feeds::feed_text(transformed); LOGIF(CONSTRUCTED_PLURALS, "[Superlative of %W is %W]\n", W, PW); DISCARD_TEXT(transformed); DISCARD_TEXT(comprised); @@ -132,7 +132,7 @@ comparison: for instance, "tallness" for "tall", or "steeliness" for match_avinue *comp_trie = Preform::Nonparsing::define_trie(<adjective-to-quiddity>, TRIE_END, nl); Inflections::suffix_inflection(transformed, comp_trie, comprised); - wording PW = Feeds::feed_stream(transformed); + wording PW = Feeds::feed_text(transformed); LOGIF(CONSTRUCTED_PLURALS, "[Quiddity of %W is %W]\n", W, PW); DISCARD_TEXT(transformed); DISCARD_TEXT(comprised); diff --git a/docs/inflections-module/3-plr.html b/docs/inflections-module/3-plr.html index 24ec6f398..c4a015c13 100644 --- a/docs/inflections-module/3-plr.html +++ b/docs/inflections-module/3-plr.html @@ -156,7 +156,7 @@ it can be rebuilt quickly whenever needed again. WRITE_TO(original, "%+W", Wordings::one_word(last_wn)); if (*(Lexer::word_text(last_wn)) == '\"') WRITE_TO(pluralised, "some-long-text"); else Pluralisation::regular(pluralised, original, nl); - Feeds::feed_stream(pluralised); + Feeds::feed_text(pluralised); *PW = Feeds::end(id); DISCARD_TEXT(original); DISCARD_TEXT(pluralised); diff --git a/docs/inflections-module/3-pp.html b/docs/inflections-module/3-pp.html index a8b825d7e..851ce48ca 100644 --- a/docs/inflections-module/3-pp.html +++ b/docs/inflections-module/3-pp.html @@ -82,7 +82,7 @@ function togglePopup(material_id) { else { if (PastParticiples::pasturise_text(pasturised, from)) { if (i > Wordings::first_wn(W)) Feeds::feed_wording(Wordings::up_to(W, i-1)); - Feeds::feed_stream(pasturised); + Feeds::feed_text(pasturised); if (i < Wordings::last_wn(W)) Feeds::feed_wording(Wordings::from(W, i+1)); break; } diff --git a/docs/inflections-module/3-vc.html b/docs/inflections-module/3-vc.html index c5e3a17c0..f44b5822f 100644 --- a/docs/inflections-module/3-vc.html +++ b/docs/inflections-module/3-vc.html @@ -731,7 +731,7 @@ joining but with a space. Thus WRITE_TO(TEMP, "%A", &front_wa); if (p[i] == '~') PUT_TO(TEMP, ' '); WRITE_TO(TEMP, "%A", &back_wa); - wording W = Feeds::feed_stream(TEMP); + wording W = Feeds::feed_text(TEMP); DISCARD_TEXT(TEMP); return WordAssemblages::from_wording(W); } @@ -791,7 +791,7 @@ we see a -' mar int k; for (k=0; k<j-1; k++) { WRITE_TO(TEMP, "%c", p[k]); } WRITE_TO(TEMP, "'%w", q); - wording W = Feeds::feed_stream(TEMP); + wording W = Feeds::feed_text(TEMP); words[i] = Lexer::word(Wordings::first_wn(W)); for (k=i+1; k<word_count; k++) words[k] = words[k+1]; word_count--; @@ -799,7 +799,7 @@ we see a -' mar } else { int k; for (k=0; k<j; k++) { WRITE_TO(TEMP, "%c", p[k]); } - wording W = Feeds::feed_stream(TEMP); + wording W = Feeds::feed_text(TEMP); words[i] = Lexer::word(Wordings::first_wn(W)); } DISCARD_TEXT(TEMP); diff --git a/docs/inflections-module/4-ei.html b/docs/inflections-module/4-ei.html index 1f4f2fd49..6a522b114 100644 --- a/docs/inflections-module/4-ei.html +++ b/docs/inflections-module/4-ei.html @@ -175,7 +175,7 @@ dictionary and the "Official Scrabble Wordlist". oui* a | e.g., a Ouija board or a ouistiti (a marmoset) u a | the letter U u-* a | e.g., U-boats - u'* a | /* e.g., u's */ + u'* a | e.g., u's uakari a | the South American monkey ub* a | e.g., ubiquitous udal* a | diff --git a/docs/inflections-test/1-ut.html b/docs/inflections-test/1-ut.html index cd63c7ecb..1468f3287 100644 --- a/docs/inflections-test/1-ut.html +++ b/docs/inflections-test/1-ut.html @@ -98,14 +98,14 @@ function togglePopup(material_id) {
 void Unit::test_declensions(text_stream *arg) {
-    vocabulary_entry *m_V = Vocabulary::entry_for_text(L"m");
-    vocabulary_entry *f_V = Vocabulary::entry_for_text(L"f");
-    vocabulary_entry *n_V = Vocabulary::entry_for_text(L"n");
+    vocabulary_entry *m_V = Vocabulary::entry_for_text(L"m");
+    vocabulary_entry *f_V = Vocabulary::entry_for_text(L"f");
+    vocabulary_entry *n_V = Vocabulary::entry_for_text(L"n");
     filename *F = Filenames::from_text(arg);
     source_file *sf = TextFromFiles::feed_into_lexer(F, NULL_GENERAL_POINTER);
     if (sf == NULL) PRINT("File has failed to open\n");
     else {
-        wording PW = Feeds::feed_stream(I"der");
+        wording PW = Feeds::feed_text(I"der");
         int gen = NEUTER_GENDER;
         LOOP_THROUGH_WORDING(i, sf->text_read) {
             if (Lexer::word(i) == PARBREAK_V) continue;
diff --git a/docs/kinds-module/2-ki.html b/docs/kinds-module/2-ki.html
index 0fd2efa8d..68e5a3d06 100644
--- a/docs/kinds-module/2-ki.html
+++ b/docs/kinds-module/2-ki.html
@@ -483,7 +483,7 @@ so we neglect it.
 
     stc.vocabulary_argument = WordAssemblages::lit_0();
     feed_t id = Feeds::begin();
-    Feeds::feed_stream(argument);
+    Feeds::feed_text(argument);
     wording W = Feeds::end(id);
     if (Wordings::length(W) >= 30)
         Kinds::Interpreter::kind_command_error(command, "too many words in kind command");
@@ -667,7 +667,7 @@ even have started yet. So we simply remember our intention to insert the text:
         int terminator = 0;
         Transcribe one line of the template into the line buffer20.1;
         if (Str::len(template_line_buffer) > 0) {
-            wording XW = Feeds::feed_stream(template_line_buffer);
+            wording XW = Feeds::feed_text(template_line_buffer);
             if (terminator != 0) Sentences::make_node(T, XW, terminator);
         }
         DISCARD_TEXT(template_line_buffer);
@@ -1083,7 +1083,7 @@ concatenated with newlines dividing them, in a text stream.
             }
             feed_t id = Feeds::begin();
             for (int i=0; i<length; i++)
-                Feeds::feed_text(Vocabulary::get_exemplar(array[i], FALSE));
+                Feeds::feed_C_string(Vocabulary::get_exemplar(array[i], FALSE));
             wording LW = Feeds::end(id);
             if (tcc == singular_KCC) {
                 int ro = 0;
diff --git a/docs/linguistics-module/1-lm.html b/docs/linguistics-module/1-lm.html
index 41e456258..d9935a747 100644
--- a/docs/linguistics-module/1-lm.html
+++ b/docs/linguistics-module/1-lm.html
@@ -205,7 +205,7 @@ initialises, it calls the following routine to improve its performance.
 }
 
diff --git a/docs/linguistics-module/2-em.html b/docs/linguistics-module/2-em.html index 8254aed17..ee1f902d2 100644 --- a/docs/linguistics-module/2-em.html +++ b/docs/linguistics-module/2-em.html @@ -788,7 +788,7 @@ to some routine of her own, gazumping this one. }
diff --git a/docs/linguistics-module/2-pe.html b/docs/linguistics-module/2-pe.html index b67bb32bf..f463c8261 100644 --- a/docs/linguistics-module/2-pe.html +++ b/docs/linguistics-module/2-pe.html @@ -694,7 +694,7 @@ further optimisation is worthwhile. } diff --git a/docs/linguistics-module/3-aap.html b/docs/linguistics-module/3-aap.html index a9175c4b2..a13abed3f 100644 --- a/docs/linguistics-module/3-aap.html +++ b/docs/linguistics-module/3-aap.html @@ -212,7 +212,7 @@ is never treated as a participle. } diff --git a/docs/linguistics-module/3-adj.html b/docs/linguistics-module/3-adj.html index 867082492..683da86a0 100644 --- a/docs/linguistics-module/3-adj.html +++ b/docs/linguistics-module/3-adj.html @@ -233,7 +233,7 @@ the following is unambiguous: } diff --git a/docs/linguistics-module/3-au.html b/docs/linguistics-module/3-au.html index 99e27f223..71dbc7ecc 100644 --- a/docs/linguistics-module/3-au.html +++ b/docs/linguistics-module/3-au.html @@ -107,7 +107,7 @@ } diff --git a/docs/linguistics-module/3-cao.html b/docs/linguistics-module/3-cao.html index 5c268a00a..c274378c7 100644 --- a/docs/linguistics-module/3-cao.html +++ b/docs/linguistics-module/3-cao.html @@ -215,7 +215,7 @@ project, with the user not realising the consequences. diff --git a/docs/linguistics-module/3-daq.html b/docs/linguistics-module/3-daq.html index 4afca6ebe..221490615 100644 --- a/docs/linguistics-module/3-daq.html +++ b/docs/linguistics-module/3-daq.html @@ -838,7 +838,7 @@ the source text. One might be in an extension, for instance.) } diff --git a/docs/linguistics-module/3-nns.html b/docs/linguistics-module/3-nns.html index bb876cb52..13fa6362c 100644 --- a/docs/linguistics-module/3-nns.html +++ b/docs/linguistics-module/3-nns.html @@ -329,7 +329,7 @@ search list: and that is why the search list is so important. } diff --git a/docs/linguistics-module/4-aoc.html b/docs/linguistics-module/4-aoc.html index 21eb87a0d..743270d95 100644 --- a/docs/linguistics-module/4-aoc.html +++ b/docs/linguistics-module/4-aoc.html @@ -124,7 +124,7 @@ and what has been the case in the past. diff --git a/docs/linguistics-module/4-apoo.html b/docs/linguistics-module/4-apoo.html index 34ff157c4..852b57678 100644 --- a/docs/linguistics-module/4-apoo.html +++ b/docs/linguistics-module/4-apoo.html @@ -293,7 +293,7 @@ cannot contain any HR; this cuts down our parsing time considerably. } diff --git a/docs/linguistics-module/4-prp.html b/docs/linguistics-module/4-prp.html index 727546d32..ee7409661 100644 --- a/docs/linguistics-module/4-prp.html +++ b/docs/linguistics-module/4-prp.html @@ -254,7 +254,7 @@ with a given "permitted verb". } diff --git a/docs/linguistics-module/4-vrb.html b/docs/linguistics-module/4-vrb.html index 439cfe3f8..423d157d1 100644 --- a/docs/linguistics-module/4-vrb.html +++ b/docs/linguistics-module/4-vrb.html @@ -418,7 +418,7 @@ we overwrite that with the new (presumably meaningful) one. } diff --git a/docs/linguistics-module/4-vu.html b/docs/linguistics-module/4-vu.html index f822ade40..e1df36004 100644 --- a/docs/linguistics-module/4-vu.html +++ b/docs/linguistics-module/4-vu.html @@ -781,7 +781,7 @@ or "the verb to be able to see" use these. } diff --git a/docs/linguistics-module/5-dgr.html b/docs/linguistics-module/5-dgr.html index bbebfef6c..26604b552 100644 --- a/docs/linguistics-module/5-dgr.html +++ b/docs/linguistics-module/5-dgr.html @@ -151,7 +151,7 @@ } diff --git a/docs/linguistics-module/5-np.html b/docs/linguistics-module/5-np.html index 884b9c945..6e6fdbb29 100644 --- a/docs/linguistics-module/5-np.html +++ b/docs/linguistics-module/5-np.html @@ -623,7 +623,7 @@ but definite articles are not. } diff --git a/docs/linguistics-module/5-vm.html b/docs/linguistics-module/5-vm.html index 7df218fc1..09f54d8fc 100644 --- a/docs/linguistics-module/5-vm.html +++ b/docs/linguistics-module/5-vm.html @@ -262,7 +262,7 @@ has been specified. } diff --git a/docs/linguistics-module/5-vp.html b/docs/linguistics-module/5-vp.html index 362a8cc61..9a09fe7e2 100644 --- a/docs/linguistics-module/5-vp.html +++ b/docs/linguistics-module/5-vp.html @@ -740,7 +740,7 @@ the exactly equivalent idea of the hat being worn by Darcy. } diff --git a/docs/linguistics-module/index.html b/docs/linguistics-module/index.html index 46edfc703..710117fd5 100644 --- a/docs/linguistics-module/index.html +++ b/docs/linguistics-module/index.html @@ -56,6 +56,17 @@
    +
  • +

    + Preliminaries

    + +
  • Chapter 1: Setting Up

    diff --git a/docs/supervisor-module/2-wrk.html b/docs/supervisor-module/2-wrk.html index ea2bce9a0..de8217f6c 100644 --- a/docs/supervisor-module/2-wrk.html +++ b/docs/supervisor-module/2-wrk.html @@ -295,22 +295,22 @@ each extension's page is generated from its void Works::begin_extension_link(OUTPUT_STREAM, inbuild_work *work, text_stream *rubric) { TEMPORARY_TEXT(link); - WRITE_TO(link, "href='inform://Extensions/Extensions/"); - Works::escape_apostrophes(link, work->author_name); - WRITE_TO(link, "/"); - Works::escape_apostrophes(link, work->title); - WRITE_TO(link, ".html' "); - if (Str::len(rubric) > 0) WRITE_TO(link, "title=\"%S\" ", rubric); - else WRITE_TO(link, "title=\"%X\" ", work); - WRITE_TO(link, "style=\"text-decoration: none\""); - HTML_OPEN_WITH("a", "%S", link); - DISCARD_TEXT(link); -} + WRITE_TO(link, "href='inform:Extensions/Extensions/"); + Works::escape_apostrophes(link, work->author_name); + WRITE_TO(link, "/"); + Works::escape_apostrophes(link, work->title); + WRITE_TO(link, ".html' "); + if (Str::len(rubric) > 0) WRITE_TO(link, "title=\"%S\" ", rubric); + else WRITE_TO(link, "title=\"%X\" ", work); + WRITE_TO(link, "style=\"text-decoration: none\""); + HTML_OPEN_WITH("a", "%S", link); + DISCARD_TEXT(link); +} -void Works::escape_apostrophes(OUTPUT_STREAM, text_stream *S) { - LOOP_THROUGH_TEXT(pos, S) { - wchar_t c = Str::get(pos); - if ((c == '\'') || (c == '\"') || (c == ' ') || (c == '&') || +void Works::escape_apostrophes(OUTPUT_STREAM, text_stream *S) { + LOOP_THROUGH_TEXT(pos, S) { + wchar_t c = Str::get(pos); + if ((c == '\'') || (c == '\"') || (c == ' ') || (c == '&') || (c == '<') || (c == '>') || (c == '%')) WRITE("%%%x", (int) c); else @@ -322,6 +322,7 @@ each extension's page is generated from its HTML_CLOSE("a"); } +
    • The function Works::escape_apostrophes appears nowhere else.
    diff --git a/docs/supervisor-module/5-ls.html b/docs/supervisor-module/5-ls.html index 7e24f4e5c..c952a5698 100644 --- a/docs/supervisor-module/5-ls.html +++ b/docs/supervisor-module/5-ls.html @@ -98,7 +98,7 @@ small resource folder called its "bundle". (This includes English.) TEMPORARY_TEXT(sentence_format); WRITE_TO(sentence_format, "%S language", C->edition->work->title); - L->instance_name = Feeds::feed_stream(sentence_format); + L->instance_name = Feeds::feed_text(sentence_format); DISCARD_TEXT(sentence_format); L->nl_instance = NULL; L->Preform_loaded = FALSE; @@ -147,7 +147,7 @@ extends for the rest of the line. void Languages::read_metadata(text_stream *item_name, text_file_position *tfp, void *vnl) { inform_language *L = (inform_language *) vnl; - wording W = Feeds::feed_stream(item_name); + wording W = Feeds::feed_text(item_name); if (Wordings::nonempty(W)) { vocabulary_entry *ve = Lexer::word(Wordings::first_wn(W)); int field = -1; diff --git a/docs/supervisor-module/5-ps2.html b/docs/supervisor-module/5-ps2.html index f48505267..e952bfade 100644 --- a/docs/supervisor-module/5-ps2.html +++ b/docs/supervisor-module/5-ps2.html @@ -882,14 +882,14 @@ like Basic Inform or Standard Rules; and also any sentences in the
         inclusions_heading = Node::new(HEADING_NT);
         Node::set_text(inclusions_heading,
    -        Feeds::feed_text_expanding_strings(L"Implied inclusions"));
    +        Feeds::feed_C_string_expanding_strings(L"Implied inclusions"));
         SyntaxTree::graft_sentence(proj->syntax_tree, inclusions_heading);
         Headings::place_implied_level_0(proj->syntax_tree, inclusions_heading);
     
         int wc = lexer_wordcount;
         TEMPORARY_TEXT(early);
         Projects::early_source_text(early, proj);
    -    if (Str::len(early) > 0) Feeds::feed_stream(early);
    +    if (Str::len(early) > 0) Feeds::feed_text(early);
         DISCARD_TEXT(early);
         inbuild_nest *ext = Supervisor::external();
         if (ext) OptionsFile::read(
    @@ -948,7 +948,7 @@ ready for those inventions (if in fact there are any).
         int l = SyntaxTree::push_bud(proj->syntax_tree, proj->syntax_tree->root_node);
         implicit_heading = Node::new(HEADING_NT);
         Node::set_text(implicit_heading,
    -        Feeds::feed_text_expanding_strings(L"Invented sentences"));
    +        Feeds::feed_C_string_expanding_strings(L"Invented sentences"));
         SyntaxTree::graft_sentence(proj->syntax_tree, implicit_heading);
         Headings::place_implied_level_0(proj->syntax_tree, implicit_heading);
         SyntaxTree::pop_bud(proj->syntax_tree, l);
    diff --git a/docs/supervisor-module/6-hdn.html b/docs/supervisor-module/6-hdn.html
    index 0d6d5a8e9..0c6e16722 100644
    --- a/docs/supervisor-module/6-hdn.html
    +++ b/docs/supervisor-module/6-hdn.html
    @@ -759,7 +759,7 @@ the parse tree on quite a large scale, and that's just what we do.
                 if (<quoted-text>(h->in_place_of_text)) {
                     Word::dequote(Wordings::first_wn(S));
                     wchar_t *text = Lexer::word_text(Wordings::first_wn(S));
    -                S = Feeds::feed_text(text);
    +                S = Feeds::feed_C_string(text);
                 }
                 if (loaded == FALSE) Can't replace heading in an unincluded extension21.1
                 else {
    diff --git a/docs/supervisor-module/6-inc.html b/docs/supervisor-module/6-inc.html
    index df25f6df5..8109bec5a 100644
    --- a/docs/supervisor-module/6-inc.html
    +++ b/docs/supervisor-module/6-inc.html
    @@ -436,7 +436,7 @@ the "begins here".
         inclusions_errors_to = E->as_copy;
         wording W = Node::get_text(PN);
         if (<the-prefix-for-extensions>(W)) W = GET_RW(<the-prefix-for-extensions>, 1);
    -    wording T = Feeds::feed_stream(E->as_copy->edition->work->title);
    +    wording T = Feeds::feed_text(E->as_copy->edition->work->title);
         if (Wordings::match(T, W) == FALSE) {
             copy_error *CE = CopyErrors::new(SYNTAX_CE, ExtMisidentifiedEnds_SYNERROR);
             CopyErrors::supply_node(CE, PN);
    diff --git a/docs/supervisor-module/6-tof.html b/docs/supervisor-module/6-tof.html
    index fa4d85f58..d571af44a 100644
    --- a/docs/supervisor-module/6-tof.html
    +++ b/docs/supervisor-module/6-tof.html
    @@ -117,7 +117,7 @@ unyielding the user's views, it's not allowed to write:
     void OptionsFile::read_helper(text_stream *line,
         text_file_position *tfp, void *unused_state) {
         WRITE_TO(line, "\n");
    -    wording W = Feeds::feed_stream(line);
    +    wording W = Feeds::feed_text(line);
         if (<use-option-sentence-shape>(W)) {
             #ifdef CORE_MODULE
             UseOptions::set_immediate_option_flags(W, NULL);
    diff --git a/docs/supervisor-module/7-ip2.html b/docs/supervisor-module/7-ip2.html
    index 72b2904a7..d912e0001 100644
    --- a/docs/supervisor-module/7-ip2.html
    +++ b/docs/supervisor-module/7-ip2.html
    @@ -144,7 +144,7 @@ our E, and return 0 in response to the ECD call to prevent further ECD calls.
     
     
         if ((page_exists_already == FALSE) || (force_update)) {
    -        Feeds::feed_text(L"This sentence provides a firebreak, no more. ");
    +        Feeds::feed_C_string(L"This sentence provides a firebreak, no more. ");
             E = ExtensionManager::from_copy(ecd->found_as->copy);
             if (E == NULL) return 0;  but shouldn't happen: it was there only moments ago
             Copies::get_source_text(E->as_copy);
    diff --git a/docs/words-module/1-wm.html b/docs/words-module/1-wm.html
    index 49556f190..0dcb19307 100644
    --- a/docs/words-module/1-wm.html
    +++ b/docs/words-module/1-wm.html
    @@ -98,17 +98,17 @@ which use this module:
     
         Writers::register_writer('A', &WordAssemblages::writer);  %A = write word assemblage
         Writers::register_writer_I('N', &Lexer::writer);          %N = write word with this number
    -    Writers::register_writer('V', &Vocabulary::writer);       %V = write vocabulary entry
    +    Writers::register_writer('V', &Vocabulary::writer);       %V = write vocabulary entry
         Writers::register_writer_W('W', &Wordings::writer);       %W = write wording
     
         Log::declare_aspect(LEXICAL_OUTPUT_DA, L"lexical output", FALSE, FALSE);
         Log::declare_aspect(VOCABULARY_DA, L"vocabulary", FALSE, FALSE);
     
         Writers::register_logger('f', WordAssemblages::log);  $f = log word assemblage
    -    Writers::register_logger('v', Vocabulary::log);       $v = log vocabulary entry
    +    Writers::register_logger('v', Vocabulary::log);       $v = log vocabulary entry
     
         Lexer::start();
    -    Vocabulary::create_punctuation();
    +    Vocabulary::create_punctuation();
         Preform::begin();
     }
     
    diff --git a/docs/words-module/2-vcb.html b/docs/words-module/2-vcb.html
    index 4034c82cd..dcb95627c 100644
    --- a/docs/words-module/2-vcb.html
    +++ b/docs/words-module/2-vcb.html
    @@ -66,11 +66,9 @@ function togglePopup(material_id) {
         

To classify the words in the lexical stream, where two different words are considered equivalent if they are unquoted and have the same text, taken case insensitively.

-
+
-

§1. Definitions.

- -

§2. The following structure is created for each different word found in the +

§1. Vocabulary Entries. A vocabulary_entry object is created for each different word found in the source. (Recall that these are not necessarily words in the usual English sense: for instance, 17 is a word here.)

@@ -118,7 +116,7 @@ possible meaning as a literal integer, we cache the result: for instance, } vocabulary_entry;
  • The structure vocabulary_entry is accessed in 4/prf and here.
-

§3. Some standard punctuation marks: +

§2. Some standard punctuation marks:

@@ -138,23 +136,23 @@ possible meaning as a literal integer, we cache the result: for instance,
 vocabulary_entry *STROKE_V = NULL;
 
 void Vocabulary::create_punctuation(void) {
-    CLOSEBRACE_V     = Vocabulary::entry_for_text(L"}");
-    CLOSEBRACKET_V   = Vocabulary::entry_for_text(L")");
-    COLON_V          = Vocabulary::entry_for_text(L":");
-    COMMA_V          = Vocabulary::entry_for_text(L",");
-    DOUBLEDASH_V     = Vocabulary::entry_for_text(L"--");
-    FORWARDSLASH_V   = Vocabulary::entry_for_text(L"/");
-    FULLSTOP_V       = Vocabulary::entry_for_text(L".");
-    OPENBRACE_V      = Vocabulary::entry_for_text(L"{");
-    OPENBRACKET_V    = Vocabulary::entry_for_text(L"(");
-    OPENI6_V         = Vocabulary::entry_for_text(L"(-");
-    PARBREAK_V       = Vocabulary::entry_for_text(PARAGRAPH_BREAK);
-    PLUS_V      	 = Vocabulary::entry_for_text(L"+");
-    SEMICOLON_V      = Vocabulary::entry_for_text(L";");
-    STROKE_V         = Vocabulary::entry_for_text(L"|");
+    CLOSEBRACE_V     = Vocabulary::entry_for_text(L"}");
+    CLOSEBRACKET_V   = Vocabulary::entry_for_text(L")");
+    COLON_V          = Vocabulary::entry_for_text(L":");
+    COMMA_V          = Vocabulary::entry_for_text(L",");
+    DOUBLEDASH_V     = Vocabulary::entry_for_text(L"--");
+    FORWARDSLASH_V   = Vocabulary::entry_for_text(L"/");
+    FULLSTOP_V       = Vocabulary::entry_for_text(L".");
+    OPENBRACE_V      = Vocabulary::entry_for_text(L"{");
+    OPENBRACKET_V    = Vocabulary::entry_for_text(L"(");
+    OPENI6_V         = Vocabulary::entry_for_text(L"(-");
+    PARBREAK_V       = Vocabulary::entry_for_text(PARAGRAPH_BREAK);
+    PLUS_V      	 = Vocabulary::entry_for_text(L"+");
+    SEMICOLON_V      = Vocabulary::entry_for_text(L";");
+    STROKE_V         = Vocabulary::entry_for_text(L"|");
 }
 
-

§4. Each distinct word is to have a unique vocabulary_entry structure, and the +

§3. Each distinct word is to have a unique vocabulary_entry structure, and the "identity" at word number wn is to point to the structure for the text at that word. Two words are distinct if their lower-case forms are different, except that two quoted literal texts are always distinct, even if they have @@ -183,18 +181,18 @@ routines, either on a single word or on a range.

-void Vocabulary::identify_word(int wn) {
-    vocabulary_entry *ve = Vocabulary::entry_for_text(Lexer::word_text(wn));
+void Vocabulary::identify_word(int wn) {
+    vocabulary_entry *ve = Vocabulary::entry_for_text(Lexer::word_text(wn));
     ve->raw_exemplar = Lexer::word_raw_text(wn);
     Lexer::set_word(wn, ve);
 }
 
 void Vocabulary::identify_word_range(wording W) {
     LOOP_THROUGH_WORDING(i, W)
-        Vocabulary::identify_word(i);
+        Vocabulary::identify_word(i);
 }
 
-

§5. Should we ever change the text of a word, it's essential to re-identify it, +

§4. Should we ever change the text of a word, it's essential to re-identify it, as otherwise its lw_identity points to the wrong vocabulary entry.

@@ -202,15 +200,16 @@ as otherwise its lw_identity< void Vocabulary::change_text_of_word(int wn, wchar_t *new) { Lexer::set_word_text(wn, new); Lexer::set_word_raw_text(wn, new); - Vocabulary::identify_word(wn); + Vocabulary::identify_word(wn); } -

§6. We now need some utilities for dealing with vocabulary entries. Here is a +

§5. We now need some utilities for dealing with vocabulary entries. Here is a creator, and a debugging logger:

-vocabulary_entry *Vocabulary::vocab_entry_new(wchar_t *text, int hash_code, unsigned int flags, int val) {
+vocabulary_entry *Vocabulary::vocab_entry_new(wchar_t *text, int hash_code,
+    unsigned int flags, int val) {
     vocabulary_entry *ve = CREATE(vocabulary_entry);
     ve->exemplar = text; ve->raw_exemplar = text;
     ve->next_in_vocab_hash = NULL;
@@ -235,7 +234,7 @@ creator, and a debugging logger:
     WRITE("%08x-%w-%08x", ve->hash, ve->raw_exemplar, ve->flags);
 }
 
-

§7. It's perhaps unexpected that a vocabulary entry not only stores a (pointer +

§6. It's perhaps unexpected that a vocabulary entry not only stores a (pointer to) a copy of the text, the "exemplar" (since it is text which is an example of this vocabulary being used), but also a separate raw copy of the text: raw in the sense of retaining the original form in the source @@ -261,7 +260,7 @@ it by hand, using the following routine. Lexer::word(wn)->raw_exemplar = Lexer::word_text(wn); } -

§8. Here are some access routines for the data stored in this +

§7. Here are some access routines for the data stored in this structure:

@@ -281,7 +280,7 @@ structure: } } -

§9. An integer is stored at each vocabulary entry, recording its value +

§8. An integer is stored at each vocabulary entry, recording its value if it every turns out to parse as a literal number:

@@ -293,7 +292,7 @@ if it every turns out to parse as a literal number: ve->literal_number_value = val; } -

§10. Almost all text is used case insensitively in Inform source, but we do +

§9. Almost all text is used case insensitively in Inform source, but we do occasionally need to distinguish "The" from "the" and the like, when parsing the names of text substitutions. When a new text substitution is declared whose first word, in the definition, begins with a capital letter, @@ -312,12 +311,12 @@ is changed to the upper case variant form. vocabulary_entry *Vocabulary::make_case_sensitive(vocabulary_entry *ve) { if (ve->upper_case_form) return ve->upper_case_form; ve->upper_case_form = - Vocabulary::vocab_entry_new(ve->exemplar, ve->hash, ve->flags, ve->literal_number_value); + Vocabulary::vocab_entry_new(ve->exemplar, ve->hash, ve->flags, ve->literal_number_value); ve->upper_case_form->lower_case_form = ve; return ve->upper_case_form; } -

§11. Finally, each vocabulary entry comes with a bitmap of flags, and here +

§10. Finally, each vocabulary entry comes with a bitmap of flags, and here we get to set and test them:

@@ -332,7 +331,7 @@ we get to set and test them: return (Lexer::word(wn)->flags) & t; } -

§12. It can be useful to find the disjunction of the flags for all the words +

§11. It can be useful to find the disjunction of the flags for all the words in a range, as that gives us a single bitmap which tells us quickly whether any of the words in that range is a number, or is a word ending in "-ing", and so on: @@ -346,7 +345,7 @@ and so on: return d; } -

§13. Also: +

§12. Also:

@@ -357,7 +356,7 @@ and so on:
     return ve->nt_incidence;
 }
 
-

§14. Hash coding of words. To find all the different words used in the source text, we need in principle +

§13. Hash coding of words. To find all the different words used in the source text, we need in principle to make an enormous number of comparisons of their texts. It is slow to make a correct identification of two texts as being equal: we have to compare their every characters against each other. Fortunately, it can be much @@ -373,7 +372,7 @@ for instance, would each produce the number 4.

Instead we use a standard method to derive a number traditionally called a "hash code". This is the algorithm called "X 30011" in Aho, Sethi and -Ullman's standard reference "Compilers: Principles, Techniques and Tools" (1986). +Ullman's standard "Compilers: Principles, Techniques and Tools" (1986). Because it is derived from constantly overflowing integer arithmetic, it will produce different codes on different architectures (say, where int is 64 bits long rather than 32, or where char is unsigned). @@ -406,7 +405,7 @@ they're treated more like literal texts and I6 inclusions. define I6_HASH 2 the (- word introducing an I6 inclusion uniquely has this hash code

-int Vocabulary::hash_code_from_word(wchar_t *text) {
+int Vocabulary::hash_code_from_word(wchar_t *text) {
     unsigned int hash_code = 0;
     wchar_t *p = text;
     switch(*p) {
@@ -430,7 +429,7 @@ they're treated more like literal texts and I6 inclusions.
     return (int) (3+(hash_code % (HASH_TAB_SIZE-3)));  result of X 30011, plus 3
 }
 
-

§15. The hash table of vocabulary. Armed with these hash codes, we now store the pointers to the vocabulary +

§14. The hash table of vocabulary. Armed with these hash codes, we now store the pointers to the vocabulary entry structures in linked lists, one for each possible hash code. These begin empty.

@@ -453,7 +452,7 @@ These begin empty. } } -

§16. And that leaves only one routine: for finding the unique vocabulary +

§15. And that leaves only one routine: for finding the unique vocabulary entry pointer associated with the material in text. We search the hash table to see if we have the word already, and if not, we add it. Either way, we return a valid pointer. (Compare Isaiah 55:11, "So shall @@ -469,9 +468,9 @@ codes for any number, any text, or any I6 inclusion.

 int no_vocabulary_entries = 0;
 
-vocabulary_entry *Vocabulary::entry_for_text(wchar_t *text) {
+vocabulary_entry *Vocabulary::entry_for_text(wchar_t *text) {
     vocabulary_entry *new_entry;
-    int hash_code = Vocabulary::hash_code_from_word(text), val = 0;
+    int hash_code = Vocabulary::hash_code_from_word(text), val = 0;
     unsigned int f = 0;
     switch(hash_code) {
         case NUMBER_HASH: f = NUMBER_MC; val = Wide::atoi(text); break;
@@ -484,12 +483,12 @@ codes for any number, any text, or any I6 inclusion.
             break;
         case I6_HASH: f = I6_MC; break;
         default:
-            val = Vocabulary::an_ordinal_number(text);
+            val = Vocabulary::an_ordinal_number(text);
             if (val >= 0) f = NUMBER_MC + ORDINAL_MC;  so that "4th", say, picks up both
             break;
     }
     if (list_of_vocab_with_hash[hash_code] == NULL) {
-        Pi-ty? That word is not in my vocabulary banks16.1;
+        Pi-ty? That word is not in my vocabulary banks15.1;
     } else {
         vocabulary_entry *old_entry = NULL;
         int n;
@@ -500,44 +499,44 @@ codes for any number, any text, or any I6 inclusion.
             if (Wide::cmp(new_entry->exemplar, text) == 0)
                 return new_entry;
          and if we do not find text in there, then...
-        My vision is impaired! I cannot see!16.2;
+        My vision is impaired! I cannot see!15.2;
     }
 }
 
-

§16.1. Here the list for this word's hash code was empty, either meaning that this +

§15.1. Here the list for this word's hash code was empty, either meaning that this is a hash code never seen for any word before (in which case we start the list for that hash code with the new word), or that the word is a text literal — because, for efficiency's sake, we deliberately keep the hash list for all text literals empty.

-

Pi-ty? That word is not in my vocabulary banks16.1 = +

Pi-ty? That word is not in my vocabulary banks15.1 =

-    new_entry = Vocabulary::vocab_entry_new(text, hash_code, f, val);
+    new_entry = Vocabulary::vocab_entry_new(text, hash_code, f, val);
     if (hash_code != TEXT_HASH) list_of_vocab_with_hash[hash_code] = new_entry;
     LOGIF(VOCABULARY, "Word %d <%w> is first vocabulary with hash %d\n",
         no_vocabulary_entries++, text, hash_code);
     return new_entry;
 
-
  • This code is used in §16.
-

§16.2. And here, we exhausted the list at entry n-1, with the last entry being +

  • This code is used in §15.
+

§15.2. And here, we exhausted the list at entry n-1, with the last entry being pointed to by old_entry. We add the new word at the end.

-

My vision is impaired! I cannot see!16.2 = +

My vision is impaired! I cannot see!15.2 =

-    new_entry = Vocabulary::vocab_entry_new(text, hash_code, f, val);
+    new_entry = Vocabulary::vocab_entry_new(text, hash_code, f, val);
     old_entry->next_in_vocab_hash = new_entry;
     LOGIF(VOCABULARY, "Word %d <%w> is vocabulary entry no. %d with hash %d\n",
         no_vocabulary_entries++, text, n, hash_code);
     return new_entry;
 
-
  • This code is used in §16.
-

§17. Partial words. Much the same, except that we enter a fragment of a word into lexical memory +

  • This code is used in §15.
+

§16. Partial words. Much the same, except that we enter a fragment of a word into lexical memory and then find its identity as if it were a whole word.

@@ -546,20 +545,20 @@ and then find its identity as if it were a whole word. TEMPORARY_TEXT(TEMP); for (int i=from; i<=to; i++) PUT_TO(TEMP, str[i]); PUT_TO(TEMP, 0); - wording W = Feeds::feed_stream(TEMP); + wording W = Feeds::feed_text(TEMP); DISCARD_TEXT(TEMP); if (Wordings::empty(W)) return NULL; return Lexer::word(Wordings::first_wn(W)); } -

§18. Ordinals. The following parses the string to see if it is a non-negative integer, +

§17. Ordinals. The following parses the string to see if it is a non-negative integer, written as an English ordinal: 0th, 1st, 2nd, 3rd, 4th, 5th, ... Note that we don't bother to police the finicky rules on which suffix should accompany which value (22nd not 22th, and so on).

-int Vocabulary::an_ordinal_number(wchar_t *fw) {
+int Vocabulary::an_ordinal_number(wchar_t *fw) {
     for (int i=0; fw[i] != 0; i++)
         if (!(Characters::isdigit(fw[i]))) {
             if ((i>0) &&
diff --git a/docs/words-module/2-wa.html b/docs/words-module/2-wa.html
index e7a2baf59..57f17119f 100644
--- a/docs/words-module/2-wa.html
+++ b/docs/words-module/2-wa.html
@@ -153,7 +153,7 @@ frequently, since it consumes memory:
     for (int i=0; i<wa->no_indiv_words; i++) {
         TEMPORARY_TEXT(str);
         WRITE_TO(str, " %V ", wa->indiv_words[i]);
-        Feeds::feed_stream(str);
+        Feeds::feed_text(str);
         DISCARD_TEXT(str);
     }
     return Feeds::end(id);
@@ -204,7 +204,7 @@ frequently, since it consumes memory:
         WRITE_TO(str, "%V", wa->indiv_words[i]);
     }
     WRITE_TO(str, " ");
-    wording W = Feeds::feed_stream(str);
+    wording W = Feeds::feed_text(str);
     DISCARD_TEXT(str);
     return Lexer::word(Wordings::first_wn(W));
 }
diff --git a/docs/words-module/3-fds.html b/docs/words-module/3-fds.html
index 8bfc51297..05daf369c 100644
--- a/docs/words-module/3-fds.html
+++ b/docs/words-module/3-fds.html
@@ -104,24 +104,24 @@ raw strings.
 

-wording Feeds::feed_text(wchar_t *text) {
+wording Feeds::feed_C_string(wchar_t *text) {
+    return Feeds::feed_C_string_full(text, FALSE, NULL);
+}
+
+wording Feeds::feed_text(text_stream *text) {
     return Feeds::feed_text_full(text, FALSE, NULL);
 }
 
-wording Feeds::feed_stream(text_stream *text) {
-    return Feeds::feed_stream_full(text, FALSE, NULL);
+wording Feeds::feed_C_string_expanding_strings(wchar_t *text) {
+    return Feeds::feed_C_string_full(text, TRUE, NULL);
 }
 
-wording Feeds::feed_text_expanding_strings(wchar_t *text) {
+wording Feeds::feed_text_expanding_strings(text_stream *text) {
     return Feeds::feed_text_full(text, TRUE, NULL);
 }
 
-wording Feeds::feed_stream_expanding_strings(text_stream *text) {
-    return Feeds::feed_stream_full(text, TRUE, NULL);
-}
-
-wording Feeds::feed_stream_punctuated(text_stream *text, wchar_t *pmarks) {
-    wording W = Feeds::feed_stream_full(text, FALSE, pmarks);
+wording Feeds::feed_text_punctuated(text_stream *text, wchar_t *pmarks) {
+    wording W = Feeds::feed_text_full(text, FALSE, pmarks);
     return W;
 }
 
@@ -130,7 +130,7 @@ running long after the initial vocabulary identification phase of Inform.

-wording Feeds::feed_text_full(wchar_t *text, int expand_strings, wchar_t *nonstandard) {
+wording Feeds::feed_C_string_full(wchar_t *text, int expand_strings, wchar_t *nonstandard) {
     source_location as_if_from_nowhere;
     as_if_from_nowhere.file_of_origin = NULL;
     as_if_from_nowhere.line_number = 1;
@@ -154,11 +154,11 @@ running long after the initial vocabulary identification phase of Inform.
     }
 
     wording LEXW = Lexer::feed_ends(FALSE, NULL);
-    Vocabulary::identify_word_range(LEXW);
+    Vocabulary::identify_word_range(LEXW);
     return LEXW;
 }
 
-wording Feeds::feed_stream_full(text_stream *text, int expand_strings, wchar_t *nonstandard) {
+wording Feeds::feed_text_full(text_stream *text, int expand_strings, wchar_t *nonstandard) {
     source_location as_if_from_nowhere;
     as_if_from_nowhere.file_of_origin = NULL;
     as_if_from_nowhere.line_number = 1;
@@ -182,7 +182,7 @@ running long after the initial vocabulary identification phase of Inform.
     }
 
     wording LEXW = Lexer::feed_ends(FALSE, NULL);
-    Vocabulary::identify_word_range(LEXW);
+    Vocabulary::identify_word_range(LEXW);
     return LEXW;
 }
 
diff --git a/docs/words-module/3-idn.html b/docs/words-module/3-idn.html index cc95b6c85..f5a437630 100644 --- a/docs/words-module/3-idn.html +++ b/docs/words-module/3-idn.html @@ -77,7 +77,8 @@ character must not be a 0: int Identifiers::valid(wchar_t *p) { if ((Wide::len(p) == 0) || (Wide::len(p) > 31)) return FALSE; for (int i=0; p[i]; i++) - if ((Characters::isdigit(p[i]) == 0) && (Characters::isalpha(p[i]) == 0) && (p[i] != '_')) + if ((Characters::isdigit(p[i]) == 0) && (Characters::isalpha(p[i]) == 0) + && (p[i] != '_')) return FALSE; if (Characters::isdigit(p[0])) return FALSE; return TRUE; @@ -120,7 +121,8 @@ concatenate our identifier with up to 3 further characters, if they choose.

-void Identifiers::compose(text_stream *identifier, int nature_character, int id_number, wording W) {
+void Identifiers::compose(text_stream *identifier, int nature_character,
+    int id_number, wording W) {
     Str::clear(identifier);
     WRITE_TO(identifier, "%c%d", nature_character, id_number);
     if (Wordings::nonempty(W)) {
@@ -136,7 +138,8 @@ concatenate our identifier with up to 3 further characters, if they choose.
     Identifiers::purify(identifier);
 }
 
-void Identifiers::compose_numberless(text_stream *identifier, text_stream *prefix, wording W) {
+void Identifiers::compose_numberless(text_stream *identifier, text_stream *prefix,
+    wording W) {
     Str::copy(identifier, prefix);
     if (Wordings::nonempty(W)) {
         LOOP_THROUGH_WORDING(j, W) {
diff --git a/docs/words-module/3-lxr.html b/docs/words-module/3-lxr.html
index 1116e1029..e3e50f94b 100644
--- a/docs/words-module/3-lxr.html
+++ b/docs/words-module/3-lxr.html
@@ -302,7 +302,7 @@ in effect to the first free character.
     lexer_wordcount = 0;
     Lexer::ensure_space_up_to(50000);  the Standard Rules are about 44,000 words
     Lexer::allocate_lexer_workspace_chunk(1);
-    Vocabulary::start_hash_table();
+    Vocabulary::start_hash_table();
 }
 

§12. These are quite hefty memory allocations, with the expensive one — @@ -482,11 +482,11 @@ distinguished. We'll do this with the letters §18. Access functions.

-vocabulary_entry *Lexer::word(int wn) {
+vocabulary_entry *Lexer::word(int wn) {
     return lw_array[wn].lw_identity;
 }
 
-void Lexer::set_word(int wn, vocabulary_entry *ve) {
+void Lexer::set_word(int wn, vocabulary_entry *ve) {
     lw_array[wn].lw_identity = ve;
 }
 
@@ -513,19 +513,19 @@ distinguished. We'll do this with the letters     lw_array[wn].lw_source = sl;
 }
 
-wchar_t *Lexer::word_raw_text(int wn) {
+wchar_t *Lexer::word_raw_text(int wn) {
     return lw_array[wn].lw_rawtext;
 }
 
-void Lexer::set_word_raw_text(int wn, wchar_t *rt) {
+void Lexer::set_word_raw_text(int wn, wchar_t *rt) {
     lw_array[wn].lw_rawtext = rt;
 }
 
-wchar_t *Lexer::word_text(int wn) {
+wchar_t *Lexer::word_text(int wn) {
     return lw_array[wn].lw_text;
 }
 
-void Lexer::set_word_text(int wn, wchar_t *rt) {
+void Lexer::set_word_text(int wn, wchar_t *rt) {
     lw_array[wn].lw_text = rt;
 }
 
@@ -1062,7 +1062,7 @@ workspace.
         lw_array[lexer_wordcount].lw_text = lw_array[lexer_wordcount].lw_rawtext;
     }
 
-    Vocabulary::identify_word(lexer_wordcount);  which sets lw_array[lexer_wordcount].lw_identity
+    Vocabulary::identify_word(lexer_wordcount);  which sets lw_array[lexer_wordcount].lw_identity
 
     lexer_wordcount++;
     Lexer::ensure_space_up_to(lexer_wordcount);
@@ -1116,7 +1116,7 @@ throwing away the hyphen from the material of the current word.
             if (lexer_wordcount > 0) {  this should always be true: just being cautious
                 lw_array[lexer_wordcount-1].lw_text = L"(-";  change the previous word's text from ( to (-
                 lw_array[lexer_wordcount-1].lw_rawtext = L"(-";
-                Vocabulary::identify_word(lexer_wordcount-1);  and re-identify
+                Vocabulary::identify_word(lexer_wordcount-1);  and re-identify
             }
             lexer_hwm--;  erase the just-recorded INFORM6_ESCAPE_BEGIN_2 character
             break;
diff --git a/docs/words-module/3-wrd.html b/docs/words-module/3-wrd.html
index 8a7563917..e2272543e 100644
--- a/docs/words-module/3-wrd.html
+++ b/docs/words-module/3-wrd.html
@@ -161,7 +161,7 @@ by moving A pas
     return n;
 }
 
-int Wordings::first_wn(wording W) {
+int Wordings::first_wn(wording W) {
     return W.word_A;
 }
 
@@ -241,7 +241,7 @@ wordings.
 

-int Wordings::empty(wording W) {
+int Wordings::empty(wording W) {
     if ((W.word_A >= 0) && (W.word_B >= W.word_A)) return FALSE;
     return TRUE;
 }
@@ -325,8 +325,8 @@ text is in general not allowed in identifier names.)
     if ((w1<0) || (w3<0)) return FALSE;
     for (int j=0; j<=w2-w1; j++) {
         if (compare_words(w1+j, w3+j) == FALSE) {
-            if ((Vocabulary::test_flags(w1+j, (TEXT_MC+TEXTWITHSUBS_MC))) &&
-                (Vocabulary::test_flags(w3+j, (TEXT_MC+TEXTWITHSUBS_MC))) &&
+            if ((Vocabulary::test_flags(w1+j, (TEXT_MC+TEXTWITHSUBS_MC))) &&
+                (Vocabulary::test_flags(w3+j, (TEXT_MC+TEXTWITHSUBS_MC))) &&
                 (Wide::cmp(Lexer::word_raw_text(w1+j), Lexer::word_raw_text(w3+j)) == 0))
                 continue;
             return FALSE;
diff --git a/docs/words-module/4-bn.html b/docs/words-module/4-bn.html
index f10677c48..5ac9f59fc 100644
--- a/docs/words-module/4-bn.html
+++ b/docs/words-module/4-bn.html
@@ -113,8 +113,8 @@ ordinals within the VM-representable range.)
 
 
 <any-integer> internal 1 {
-    if (Vocabulary::test_flags(Wordings::first_wn(W), NUMBER_MC)) {
-        *X = Vocabulary::get_literal_number_value(Lexer::word(Wordings::first_wn(W)));
+    if (Vocabulary::test_flags(Wordings::first_wn(W), NUMBER_MC)) {
+        *X = Vocabulary::get_literal_number_value(Lexer::word(Wordings::first_wn(W)));
         return TRUE;
     }
     return FALSE;
@@ -127,21 +127,21 @@ for interpolations called "text substitutions".
 
 
 <quoted-text> internal 1 {
-    if ((Wordings::nonempty(W)) && (Vocabulary::test_flags(Wordings::first_wn(W), TEXT_MC+TEXTWITHSUBS_MC))) {
+    if ((Wordings::nonempty(W)) && (Vocabulary::test_flags(Wordings::first_wn(W), TEXT_MC+TEXTWITHSUBS_MC))) {
         *X = Wordings::first_wn(W); return TRUE;
     }
     return FALSE;
 }
 
 <quoted-text-with-subs> internal 1 {
-    if ((Wordings::nonempty(W)) && (Vocabulary::test_flags(Wordings::first_wn(W), TEXTWITHSUBS_MC))) {
+    if ((Wordings::nonempty(W)) && (Vocabulary::test_flags(Wordings::first_wn(W), TEXTWITHSUBS_MC))) {
         *X = Wordings::first_wn(W); return TRUE;
     }
     return FALSE;
 }
 
 <quoted-text-without-subs> internal 1 {
-    if ((Wordings::nonempty(W)) && (Vocabulary::test_flags(Wordings::first_wn(W), TEXT_MC))) {
+    if ((Wordings::nonempty(W)) && (Vocabulary::test_flags(Wordings::first_wn(W), TEXT_MC))) {
         *X = Wordings::first_wn(W); return TRUE;
     }
     return FALSE;
diff --git a/docs/words-module/4-nw.html b/docs/words-module/4-nw.html
index 0542e9838..9dd6952e4 100644
--- a/docs/words-module/4-nw.html
+++ b/docs/words-module/4-nw.html
@@ -123,7 +123,7 @@ to read and tricky for the user interface applications to syntax-colour.
     return TRUE;
 }
 
-int Word::perhaps_ill_formed_text_routine(wchar_t *fw) {
+int Word::perhaps_ill_formed_text_routine(wchar_t *fw) {
     int i;
     for (i=0; fw[i] != 0; i++) {
         if (fw[i] == TEXT_SUBSTITUTION_BEGIN) return TRUE;
@@ -219,8 +219,8 @@ initial or trailing spaces inside those quotes.
     Lexer::set_word_text(wn, dequoted_text);
     LOGIF(VOCABULARY, "Dequoting word %d <%w> to <%w>\n",
         wn, previous_text, dequoted_text);
-    Vocabulary::identify_word(wn);
-    Vocabulary::set_raw_exemplar_to_text(wn);
+    Vocabulary::identify_word(wn);
+    Vocabulary::set_raw_exemplar_to_text(wn);
 }
 

§9. Dictionary words. We take a wide Unicode string and compile an I6 dictionary word constant diff --git a/docs/words-module/4-prf.html b/docs/words-module/4-prf.html index a5e6db336..c9948bf9a 100644 --- a/docs/words-module/4-prf.html +++ b/docs/words-module/4-prf.html @@ -581,24 +581,24 @@ its syntactic tokens by hand:

 void Preform::begin(void) {
-    CAPITAL_K_V      = Vocabulary::entry_for_text(L"k");
-    CAPITAL_L_V      = Vocabulary::entry_for_text(L"l");
+    CAPITAL_K_V      = Vocabulary::entry_for_text(L"k");
+    CAPITAL_L_V      = Vocabulary::entry_for_text(L"l");
 
     Register the internal and source-code-referred-to nonterminals24.1;
 
-    AMPERSAND_V      = Vocabulary::entry_for_text(L"&");
-    BACKSLASH_V      = Vocabulary::entry_for_text(L"\\");
-    CARET_V          = Vocabulary::entry_for_text(L"^");
-    COLONCOLONEQUALS_V = Vocabulary::entry_for_text(L":" ":=");
-    QUESTIONMARK_V     = Vocabulary::entry_for_text(L"?");
-    QUOTEQUOTE_V     = Vocabulary::entry_for_text(L"\"\"");
-    SIXDOTS_V        = Vocabulary::entry_for_text(L"......");
-    THREEASTERISKS_V = Vocabulary::entry_for_text(L"***");
-    THREEDOTS_V      = Vocabulary::entry_for_text(L"...");
-    THREEHASHES_V    = Vocabulary::entry_for_text(L"###");
-    UNDERSCORE_V     = Vocabulary::entry_for_text(L"_");
-    language_V         = Vocabulary::entry_for_text(L"language");
-    internal_V         = Vocabulary::entry_for_text(L"internal");
+    AMPERSAND_V      = Vocabulary::entry_for_text(L"&");
+    BACKSLASH_V      = Vocabulary::entry_for_text(L"\\");
+    CARET_V          = Vocabulary::entry_for_text(L"^");
+    COLONCOLONEQUALS_V = Vocabulary::entry_for_text(L":" ":=");
+    QUESTIONMARK_V     = Vocabulary::entry_for_text(L"?");
+    QUOTEQUOTE_V     = Vocabulary::entry_for_text(L"\"\"");
+    SIXDOTS_V        = Vocabulary::entry_for_text(L"......");
+    THREEASTERISKS_V = Vocabulary::entry_for_text(L"***");
+    THREEDOTS_V      = Vocabulary::entry_for_text(L"...");
+    THREEHASHES_V    = Vocabulary::entry_for_text(L"###");
+    UNDERSCORE_V     = Vocabulary::entry_for_text(L"_");
+    language_V         = Vocabulary::entry_for_text(L"language");
+    internal_V         = Vocabulary::entry_for_text(L"internal");
 }
 

§24.1. The tangler of inweb replaces the [[nonterminals]] below with @@ -626,10 +626,10 @@ as the definition.

define REGISTER_NONTERMINAL(quotedname, identifier)
-    identifier = Preform::find_nonterminal(Vocabulary::entry_for_text(quotedname));
+    identifier = Preform::find_nonterminal(Vocabulary::entry_for_text(quotedname));
     identifier->result_compositor = identifier##C;
 define INTERNAL_NONTERMINAL(quotedname, identifier, min, max)
-    identifier = Preform::find_nonterminal(Vocabulary::entry_for_text(quotedname));
+    identifier = Preform::find_nonterminal(Vocabulary::entry_for_text(quotedname));
     identifier->min_nt_words = min; identifier->max_nt_words = max;
     identifier->internal_definition = identifier##R;
     identifier->marked_internal = TRUE;
@@ -644,7 +644,7 @@ syntax is very simple.
     if (break_first) {
         TEMPORARY_TEXT(wd);
         WRITE_TO(wd, "%+W", Wordings::one_word(Wordings::first_wn(W)));
-        W = Feeds::feed_stream_punctuated(wd, PREFORM_PUNCTUATION_MARKS);
+        W = Feeds::feed_text_punctuated(wd, PREFORM_PUNCTUATION_MARKS);
         DISCARD_TEXT(wd);
     }
     int nonterminals_declared = 0;
@@ -885,8 +885,8 @@ paragraph break. Internally, it's a list of productions divided by stroke symbol
                 if (bracing_begins_at) {
                     int rnum = pr->no_ranges++;
                     if ((i+2 <= Wordings::last_wn(W)) && (Lexer::word(i+1) == QUESTIONMARK_V) &&
-                        (Vocabulary::test_flags(i+2, NUMBER_MC))) {
-                        rnum = Vocabulary::get_literal_number_value(Lexer::word(i+2));
+                        (Vocabulary::test_flags(i+2, NUMBER_MC))) {
+                        rnum = Vocabulary::get_literal_number_value(Lexer::word(i+2));
                         i += 2;
                     }
                     bracing_begins_at->range_starts = rnum;
@@ -934,8 +934,8 @@ paragraph break. Internally, it's a list of productions divided by stroke symbol
 
     if (result_count < MAX_RESULTS_PER_PRODUCTION) {
         if ((i+2 <= Wordings::last_wn(W)) && (Lexer::word(i+1) == QUESTIONMARK_V) &&
-            (Vocabulary::test_flags(i+2, NUMBER_MC))) {
-            pt->result_index = Vocabulary::get_literal_number_value(Lexer::word(i+2));
+            (Vocabulary::test_flags(i+2, NUMBER_MC))) {
+            pt->result_index = Vocabulary::get_literal_number_value(Lexer::word(i+2));
             i += 2;
         } else {
             pt->result_index = result_count;
@@ -974,7 +974,7 @@ paragraph break. Internally, it's a list of productions divided by stroke symbol
             if ((k > 0) && (p[k] == '/'))
                 breakme = TRUE;
     }
-    if (breakme) AW = Feeds::feed_text_full(p, FALSE, L"/");  break only at slashes
+    if (breakme) AW = Feeds::feed_C_string_full(p, FALSE, L"/");  break only at slashes
 
  • This code is used in §29.

§29.2. Parse the word range into a linked list of alternative ptokens29.2 = @@ -1021,7 +1021,7 @@ creates it; that's how we deal with forward references. pt->balanced_wildcard = FALSE; pt->ptoken_is_fast = FALSE; - wchar_t *p = Vocabulary::get_exemplar(ve, FALSE); + wchar_t *p = Vocabulary::get_exemplar(ve, FALSE); if ((unescaped) && (p) && (p[0] == '<') && (p[Wide::len(p)-1] == '>')) { pt->nt_pt = Preform::find_nonterminal(ve); pt->ptoken_category = NONTERMINAL_PTC; @@ -1392,13 +1392,13 @@ combination of the meaning codes found in an adjective list. } void Preform::set_nt_incidence(vocabulary_entry *ve, nonterminal *nt) { - int R = Vocabulary::get_ntb(ve); + int R = Vocabulary::get_ntb(ve); R |= (Preform::nt_bitmap_bit(nt)); - Vocabulary::set_ntb(ve, R); + Vocabulary::set_ntb(ve, R); } int Preform::test_nt_incidence(vocabulary_entry *ve, nonterminal *nt) { - int R = Vocabulary::get_ntb(ve); + int R = Vocabulary::get_ntb(ve); if (R & (Preform::nt_bitmap_bit(nt))) return TRUE; return FALSE; } @@ -1423,7 +1423,7 @@ combination of the meaning codes found in an adjective list. int Preform::test_word(int wn, nonterminal *nt) { int b = Preform::nt_bitmap_bit(nt); - if ((Vocabulary::get_ntb(Lexer::word(wn))) & b) return TRUE; + if ((Vocabulary::get_ntb(Lexer::word(wn))) & b) return TRUE; return FALSE; } @@ -1437,22 +1437,22 @@ combination of the meaning codes found in an adjective list. int Preform::test_vocabulary(vocabulary_entry *ve, nonterminal *nt) { int b = Preform::nt_bitmap_bit(nt); - if ((Vocabulary::get_ntb(ve)) & b) return TRUE; + if ((Vocabulary::get_ntb(ve)) & b) return TRUE; return FALSE; } int Preform::get_range_disjunction(wording W) { int R = 0; LOOP_THROUGH_WORDING(i, W) - R |= Vocabulary::get_ntb(Lexer::word(i)); + R |= Vocabulary::get_ntb(Lexer::word(i)); return R; } int Preform::get_range_conjunction(wording W) { int R = 0; LOOP_THROUGH_WORDING(i, W) { - if (i == Wordings::first_wn(W)) R = Vocabulary::get_ntb(Lexer::word(i)); - else R &= Vocabulary::get_ntb(Lexer::word(i)); + if (i == Wordings::first_wn(W)) R = Vocabulary::get_ntb(Lexer::word(i)); + else R &= Vocabulary::get_ntb(Lexer::word(i)); } return R; } @@ -1463,7 +1463,7 @@ combination of the meaning codes found in an adjective list. int Preform::nt_bitmap_violates(wording W, range_requirement *req) { if (req->no_requirements) return FALSE; if (Wordings::length(W) == 1) { - int bm = Vocabulary::get_ntb(Lexer::word(Wordings::first_wn(W))); + int bm = Vocabulary::get_ntb(Lexer::word(Wordings::first_wn(W))); if (((bm) & (req->FS_req)) != (req->FS_req)) return TRUE; if ((((bm) & (req->FW_req)) == 0) && (req->FW_req)) return TRUE; if (((bm) & (req->DS_req)) != (req->DS_req)) return TRUE; @@ -1478,7 +1478,7 @@ combination of the meaning codes found in an adjective list. if ((C_set) && (D_set)) { int disj = 0; LOOP_THROUGH_WORDING(i, W) { - int bm = Vocabulary::get_ntb(Lexer::word(i)); + int bm = Vocabulary::get_ntb(Lexer::word(i)); disj |= bm; if (((bm) & (req->CS_req)) != (req->CS_req)) return TRUE; if ((((bm) & (req->CW_req)) == 0) && (req->CW_req)) return TRUE; @@ -1491,7 +1491,7 @@ combination of the meaning codes found in an adjective list. if ((((disj) & (req->DW_req)) == 0) && (req->DW_req)) return TRUE; } else if (C_set) { LOOP_THROUGH_WORDING(i, W) { - int bm = Vocabulary::get_ntb(Lexer::word(i)); + int bm = Vocabulary::get_ntb(Lexer::word(i)); if (((bm) & (req->CS_req)) != (req->CS_req)) return TRUE; if ((((bm) & (req->CW_req)) == 0) && (req->CW_req)) return TRUE; if ((i == Wordings::first_wn(W)) && (F_set)) { @@ -1502,7 +1502,7 @@ combination of the meaning codes found in an adjective list. } else if (D_set) { int disj = 0; LOOP_THROUGH_WORDING(i, W) { - int bm = Vocabulary::get_ntb(Lexer::word(i)); + int bm = Vocabulary::get_ntb(Lexer::word(i)); disj |= bm; if ((i == Wordings::first_wn(W)) && (F_set)) { if (((bm) & (req->FS_req)) != (req->FS_req)) return TRUE; @@ -1512,7 +1512,7 @@ combination of the meaning codes found in an adjective list. if (((disj) & (req->DS_req)) != (req->DS_req)) return TRUE; if ((((disj) & (req->DW_req)) == 0) && (req->DW_req)) return TRUE; } else if (F_set) { - int bm = Vocabulary::get_ntb(Lexer::word(Wordings::first_wn(W))); + int bm = Vocabulary::get_ntb(Lexer::word(Wordings::first_wn(W))); if (((bm) & (req->FS_req)) != (req->FS_req)) return TRUE; if ((((bm) & (req->FW_req)) == 0) && (req->FW_req)) return TRUE; } @@ -2403,7 +2403,7 @@ last word in the input text. void Preform::preform_helper(text_stream *item_name, text_file_position *tfp, void *vnl) { WRITE_TO(item_name, "\n"); - Feeds::feed_stream_punctuated(item_name, PREFORM_PUNCTUATION_MARKS); + Feeds::feed_text_punctuated(item_name, PREFORM_PUNCTUATION_MARKS); }