mirror of
https://github.com/ganelson/inform.git
synced 2024-07-05 00:24:22 +03:00
Removed vestigial remains of summariser
This commit is contained in:
parent
574c40cda9
commit
f71d8de2f6
|
@ -49,7 +49,7 @@ have no meaningful contents when the step is not running.
|
|||
|
||||
<p class="endnote">The function CodeGen::Pipeline::new_step is used in <a href="#SP3">§3</a>.</p>
|
||||
|
||||
<p class="endnote">The structure pipeline_step is accessed in 2/lnk, 2/plm, 2/rcc, 2/alm, 2/res, 2/unq, 2/rv, 2/erm, 2/erl, 4/cg, 5/fti, 5/fbi, 5/fi, 5/fsi and here.</p>
|
||||
<p class="endnote">The structure pipeline_step is accessed in 2/lnk, 2/plm, 2/rcc, 2/alm, 2/res, 2/unq, 2/rv, 2/erm, 2/erl, 4/cg, 5/fti, 5/fbi, 5/fi and here.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP2"></a><b>§2. </b>This wipes clean the temporary storage for a step.
|
||||
</p>
|
||||
|
|
|
@ -103,16 +103,13 @@
|
|||
|
||||
<span class="identifier">inter_symbol</span><span class="plain"> *</span><span class="functiontext">CodeGen::Link::find_name</span><span class="plain">(</span><span class="identifier">inter_repository</span><span class="plain"> *</span><span class="identifier">I</span><span class="plain">, </span><span class="identifier">text_stream</span><span class="plain"> *</span><span class="identifier">S</span><span class="plain">, </span><span class="reserved">int</span><span class="plain"> </span><span class="identifier">deeply</span><span class="plain">) {</span>
|
||||
<span class="reserved">for</span><span class="plain"> (</span><span class="reserved">int</span><span class="plain"> </span><span class="identifier">i</span><span class="plain">=0; </span><span class="identifier">i</span><span class="plain"><</span><span class="identifier">link_search_list_len</span><span class="plain">; </span><span class="identifier">i</span><span class="plain">++) {</span>
|
||||
<span class="comment">LOG("Look for %S in %d: 4\n", S, i, link_search_list[i]);</span>
|
||||
<span class="identifier">inter_symbol</span><span class="plain"> *</span><span class="identifier">symb</span><span class="plain"> = </span><span class="identifier">Inter::SymbolsTables::symbol_from_name_not_equating</span><span class="plain">(</span><span class="identifier">link_search_list</span><span class="plain">[</span><span class="identifier">i</span><span class="plain">], </span><span class="identifier">S</span><span class="plain">);</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">symb</span><span class="plain">) </span><span class="reserved">return</span><span class="plain"> </span><span class="identifier">symb</span><span class="plain">;</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">deeply</span><span class="plain">) {</span>
|
||||
<span class="comment">LOG("Look for %S deeper\n", S);</span>
|
||||
<span class="identifier">inter_symbol</span><span class="plain"> *</span><span class="identifier">symb</span><span class="plain"> = </span><span class="functiontext">CodeGen::Link::find_in_namespace</span><span class="plain">(</span><span class="identifier">I</span><span class="plain">, </span><span class="identifier">S</span><span class="plain">);</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">symb</span><span class="plain">) </span><span class="reserved">return</span><span class="plain"> </span><span class="identifier">symb</span><span class="plain">;</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="comment">LOG("Failed\n");</span>
|
||||
<span class="reserved">return</span><span class="plain"> </span><span class="identifier">NULL</span><span class="plain">;</span>
|
||||
<span class="plain">}</span>
|
||||
|
||||
|
|
|
@ -696,7 +696,7 @@ we go to some trouble here.
|
|||
|
||||
<p class="endnote">The function InterSchemas::log_just appears nowhere else.</p>
|
||||
|
||||
<p class="endnote">The function InterSchemas::log_ist is used in <a href="#SP27">§27</a>.</p>
|
||||
<p class="endnote">The function InterSchemas::log_ist appears nowhere else.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP17"></a><b>§17. Lint. </b>As can be seen, the <code class="display"><span class="extract">inter_schema</span></code> structure is quite complicated, and there
|
||||
are numerous invariants it has to satisfy. As a precaution, then, we check that
|
||||
|
@ -2878,7 +2878,6 @@ these out at the start of each iteration.
|
|||
<span class="plain">}</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">cw</span><span class="plain"> != 3) </span><span class="identifier">internal_error</span><span class="plain">(</span><span class="string">"malformed for prototype"</span><span class="plain">);</span>
|
||||
<span class="reserved">for</span><span class="plain"> (</span><span class="reserved">int</span><span class="plain"> </span><span class="identifier">i</span><span class="plain">=0; </span><span class="identifier">i</span><span class="plain"><3; </span><span class="identifier">i</span><span class="plain">++) {</span>
|
||||
<span class="comment">LOG("For clause %d is :", i); InterSchemas::log_ist(from[i]); LOG(" to "); InterSchemas::log_ist(to[i]); LOG("\n");</span>
|
||||
<span class="reserved">inter_schema_node</span><span class="plain"> *</span><span class="identifier">eval_isn</span><span class="plain"> = </span><span class="functiontext">InterSchemas::new_node</span><span class="plain">(</span><span class="identifier">isn</span><span class="plain">-</span><span class="element">>parent_schema</span><span class="plain">, </span><span class="constant">EVAL_ISNT</span><span class="plain">);</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">i</span><span class="plain"> == 0) </span><span class="identifier">isn</span><span class="plain">-</span><span class="element">>child_node</span><span class="plain"> = </span><span class="identifier">eval_isn</span><span class="plain">;</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">i</span><span class="plain"> == 1) </span><span class="identifier">isn</span><span class="plain">-</span><span class="element">>child_node</span><span class="plain">-</span><span class="element">>next_node</span><span class="plain"> = </span><span class="identifier">eval_isn</span><span class="plain">;</span>
|
||||
|
|
|
@ -142,22 +142,18 @@ is 20. We instead compile this as
|
|||
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">Str::eq</span><span class="plain">(</span><span class="identifier">con_name</span><span class="plain">-></span><span class="identifier">symbol_name</span><span class="plain">, </span><span class="identifier">I</span><span class="string">"thedark"</span><span class="plain">)) {</span>
|
||||
<span class="identifier">the_quartet_found</span><span class="plain"> = </span><span class="identifier">TRUE</span><span class="plain">;</span>
|
||||
<span class="comment">WRITE("Object thedark \"(darkness object)\";\n");</span>
|
||||
<span class="reserved">return</span><span class="plain">;</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">Str::eq</span><span class="plain">(</span><span class="identifier">con_name</span><span class="plain">-></span><span class="identifier">symbol_name</span><span class="plain">, </span><span class="identifier">I</span><span class="string">"InformLibrary"</span><span class="plain">)) {</span>
|
||||
<span class="identifier">the_quartet_found</span><span class="plain"> = </span><span class="identifier">TRUE</span><span class="plain">;</span>
|
||||
<span class="comment">WRITE("Object InformLibrary \"(Inform Library)\" has proper;\n");</span>
|
||||
<span class="reserved">return</span><span class="plain">;</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">Str::eq</span><span class="plain">(</span><span class="identifier">con_name</span><span class="plain">-></span><span class="identifier">symbol_name</span><span class="plain">, </span><span class="identifier">I</span><span class="string">"InformParser"</span><span class="plain">)) {</span>
|
||||
<span class="identifier">the_quartet_found</span><span class="plain"> = </span><span class="identifier">TRUE</span><span class="plain">;</span>
|
||||
<span class="comment">WRITE("Object InformParser \"(Inform Parser)\" has proper;\n");</span>
|
||||
<span class="reserved">return</span><span class="plain">;</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">Str::eq</span><span class="plain">(</span><span class="identifier">con_name</span><span class="plain">-></span><span class="identifier">symbol_name</span><span class="plain">, </span><span class="identifier">I</span><span class="string">"Compass"</span><span class="plain">)) {</span>
|
||||
<span class="identifier">the_quartet_found</span><span class="plain"> = </span><span class="identifier">TRUE</span><span class="plain">;</span>
|
||||
<span class="comment">WRITE("Object Compass \"compass\" has concealed;\n");</span>
|
||||
<span class="reserved">return</span><span class="plain">;</span>
|
||||
<span class="plain">}</span>
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ only when assembling other material, and not for the final output.
|
|||
|
||||
<p class="endnote">The function CodeGen::new_generation is used in <a href="#SP1">§1</a>, 4/fc (<a href="4-fc.html#SP3">§3</a>).</p>
|
||||
|
||||
<p class="endnote">The structure code_generation is accessed in 4/fc, 4/cal, 4/iap, 5/ft, 5/fti, 5/fbi, 5/fi, 5/fsi, 5/gi6 and here.</p>
|
||||
<p class="endnote">The structure code_generation is accessed in 4/fc, 4/cal, 4/iap, 5/ft, 5/fti, 5/fbi, 5/fi, 5/gi6 and here.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP3"></a><b>§3. </b>At present, at least, a "segment" is nothing more than a wrapper for a text.
|
||||
But we abstract it in case it's ever useful for it to be more.
|
||||
|
|
|
@ -114,7 +114,7 @@ tell the generator that nothing more need be done.
|
|||
<p class="endnote">The function CodeGen::Inventory::read_metadata appears nowhere else.</p>
|
||||
|
||||
<hr class="tocbar">
|
||||
<ul class="toc"><li><a href="5-fbi.html">Back to 'Final Binary Inter'</a></li><li><a href="5-fsi.html">Continue with 'Final Summarised Inter'</a></li></ul><hr class="tocbar">
|
||||
<ul class="toc"><li><a href="5-fbi.html">Back to 'Final Binary Inter'</a></li><li><a href="5-gi6.html">Continue with 'Generating Inform 6'</a></li></ul><hr class="tocbar">
|
||||
<!--End of weave-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>5/fi</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Language" content="en-gb">
|
||||
<link href="inweb.css" rel="stylesheet" rev="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '5/fsi' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">codegen</a></li><li><a href="index.html#5">Chapter 5: Final Code</a></li><li><b>Final Summarised Inter</b></li></ul><p class="purpose">To create the range of possible targets into which Inter can be converted.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP1"></a><b>§1. </b>This target is very simple: when we get the message to begin generation,
|
||||
we simply ask the Inter module to output some text, and return true to
|
||||
tell the generator that nothing more need be done.
|
||||
</p>
|
||||
|
||||
|
||||
<pre class="display">
|
||||
<span class="reserved">void</span><span class="plain"> </span><span class="functiontext">CodeGen::Summarised::create_target</span><span class="plain">(</span><span class="reserved">void</span><span class="plain">) {</span>
|
||||
<span class="reserved">code_generation_target</span><span class="plain"> *</span><span class="identifier">summary_cgt</span><span class="plain"> = </span><span class="functiontext">CodeGen::Targets::new</span><span class="plain">(</span><span class="identifier">I</span><span class="string">"summary"</span><span class="plain">);</span>
|
||||
<span class="identifier">METHOD_ADD</span><span class="plain">(</span><span class="identifier">summary_cgt</span><span class="plain">, </span><span class="constant">BEGIN_GENERATION_MTID</span><span class="plain">, </span><span class="functiontext">CodeGen::Summarised::summary</span><span class="plain">);</span>
|
||||
<span class="plain">}</span>
|
||||
|
||||
<span class="reserved">int</span><span class="plain"> </span><span class="functiontext">CodeGen::Summarised::summary</span><span class="plain">(</span><span class="reserved">code_generation_target</span><span class="plain"> *</span><span class="identifier">cgt</span><span class="plain">, </span><span class="reserved">code_generation</span><span class="plain"> *</span><span class="identifier">gen</span><span class="plain">) {</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">gen</span><span class="plain">-</span><span class="element">>from_step</span><span class="plain"> == </span><span class="identifier">NULL</span><span class="plain">) </span><span class="identifier">internal_error</span><span class="plain">(</span><span class="string">"temporary generations cannot be output"</span><span class="plain">);</span>
|
||||
<span class="identifier">Inter::Summary::write</span><span class="plain">(</span><span class="identifier">gen</span><span class="plain">-</span><span class="element">>from_step</span><span class="plain">-</span><span class="element">>text_out_file</span><span class="plain">, </span><span class="identifier">gen</span><span class="plain">-</span><span class="element">>from</span><span class="plain">);</span>
|
||||
<span class="reserved">return</span><span class="plain"> </span><span class="identifier">TRUE</span><span class="plain">;</span>
|
||||
<span class="plain">}</span>
|
||||
</pre>
|
||||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">The function CodeGen::Summarised::create_target is used in 5/ft (<a href="5-ft.html#SP2">§2</a>).</p>
|
||||
|
||||
<p class="endnote">The function CodeGen::Summarised::summary appears nowhere else.</p>
|
||||
|
||||
<hr class="tocbar">
|
||||
<ul class="toc"><li><a href="5-fi.html">Back to 'Final Inventory'</a></li><li><a href="5-gi6.html">Continue with 'Generating Inform 6'</a></li></ul><hr class="tocbar">
|
||||
<!--End of weave-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">The function CodeGen::Targets::new is used in 5/fti (<a href="5-fti.html#SP1">§1</a>), 5/fbi (<a href="5-fbi.html#SP1">§1</a>), 5/fi (<a href="5-fi.html#SP1">§1</a>), 5/fsi (<a href="5-fsi.html#SP1">§1</a>), 5/gi6 (<a href="5-gi6.html#SP1">§1</a>).</p>
|
||||
<p class="endnote">The function CodeGen::Targets::new is used in 5/fti (<a href="5-fti.html#SP1">§1</a>), 5/fbi (<a href="5-fbi.html#SP1">§1</a>), 5/fi (<a href="5-fi.html#SP1">§1</a>), 5/gi6 (<a href="5-gi6.html#SP1">§1</a>).</p>
|
||||
|
||||
<p class="endnote">The structure code_generation_target is accessed in 1/ppl and here.</p>
|
||||
|
||||
|
@ -51,7 +51,6 @@
|
|||
<span class="functiontext">CodeGen::Textual::create_target</span><span class="plain">();</span>
|
||||
<span class="functiontext">CodeGen::Binary::create_target</span><span class="plain">();</span>
|
||||
<span class="functiontext">CodeGen::Inventory::create_target</span><span class="plain">();</span>
|
||||
<span class="functiontext">CodeGen::Summarised::create_target</span><span class="plain">();</span>
|
||||
<span class="functiontext">CodeGen::I6::create_target</span><span class="plain">();</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="plain">}</span>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>5/fsi</title>
|
||||
<title>5/fi</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Language" content="en-gb">
|
||||
<link href="inweb.css" rel="stylesheet" rev="stylesheet" type="text/css">
|
||||
|
@ -806,7 +806,7 @@ trick called "stubbing", these being "stub definitions".)
|
|||
<p class="endnote">The function CodeGen::I6::end_constant is used in <a href="#SP1">§1</a>.</p>
|
||||
|
||||
<hr class="tocbar">
|
||||
<ul class="toc"><li><a href="5-fsi.html">Back to 'Final Summarised Inter'</a></li><li><i>(This section ends Chapter 5: Final Code.)</i></li></ul><hr class="tocbar">
|
||||
<ul class="toc"><li><a href="5-fi.html">Back to 'Final Inventory'</a></li><li><i>(This section ends Chapter 5: Final Code.)</i></li></ul><hr class="tocbar">
|
||||
<!--End of weave-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -139,10 +139,6 @@
|
|||
<p><a href="5-fi.html"><spon class="sectiontitle">Final Inventory</span></a> -
|
||||
<span class="purpose">To print a summary of the contents of a repository.</span></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="5-fsi.html"><spon class="sectiontitle">Final Summarised Inter</span></a> -
|
||||
<span class="purpose">To create the range of possible targets into which Inter can be converted.</span></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="5-gi6.html"><spon class="sectiontitle">Generating Inform 6</span></a> -
|
||||
<span class="purpose">To generate I6 code from intermediate code.</span></p>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">The structure inter_frame is accessed in 2/iim, 2/st, 2/pck, 2/sym, 2/bkm, 2/iibf, 2/iitf, 2/vi, 2/idt, 3/dfn, 3/smm, 4/tnc, 4/tmc, 4/tvc, 4/tpc, 4/tlc, 4/tac, 4/tpc2, 4/tpc3, 4/tkc, 4/tdc, 4/tvc2, 4/tcc2, 4/trc, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc, 5/tec, 5/trc2, 5/tcc2, 5/tsc and here.</p>
|
||||
<p class="endnote">The structure inter_frame is accessed in 2/iim, 2/st, 2/pck, 2/sym, 2/bkm, 2/iibf, 2/iitf, 2/vi, 2/idt, 3/dfn, 4/tnc, 4/tmc, 4/tvc, 4/tpc, 4/tlc, 4/tac, 4/tpc2, 4/tpc3, 4/tkc, 4/tdc, 4/tvc2, 4/tcc2, 4/trc, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc, 5/tec, 5/trc2, 5/tcc2, 5/tsc and here.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP2"></a><b>§2. </b></p>
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">The structure inter_package is accessed in 2/st, 2/frm, 2/bkm, 2/iibf, 3/dfn, 3/smm, 4/tpc3, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc2, 5/tsc and here.</p>
|
||||
<p class="endnote">The structure inter_package is accessed in 2/st, 2/frm, 2/bkm, 2/iibf, 3/dfn, 4/tpc3, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc2, 5/tsc and here.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP2"></a><b>§2. </b></p>
|
||||
|
||||
|
@ -244,7 +244,7 @@
|
|||
|
||||
<p class="endnote">The function Inter::Packages::log is used in 1/im (<a href="1-im.html#SP3_6">§3.6</a>).</p>
|
||||
|
||||
<p class="endnote">The function Inter::Packages::main is used in 2/st (<a href="2-st.html#SP4">§4</a>), 3/smm (<a href="3-smm.html#SP1">§1</a>).</p>
|
||||
<p class="endnote">The function Inter::Packages::main is used in 2/st (<a href="2-st.html#SP4">§4</a>).</p>
|
||||
|
||||
<p class="endnote">The function Inter::Packages::basics is used in 2/st (<a href="2-st.html#SP4">§4</a>).</p>
|
||||
|
||||
|
@ -262,7 +262,7 @@
|
|||
|
||||
<p class="endnote">The function Inter::Packages::from_PID is used in 2/iibf (<a href="2-iibf.html#SP1_7">§1.7</a>), 4/tpc3 (<a href="4-tpc3.html#SP2">§2</a>).</p>
|
||||
|
||||
<p class="endnote">The function Inter::Packages::container is used in 2/bkm (<a href="2-bkm.html#SP2">§2</a>), 2/vi (<a href="2-vi.html#SP1">§1</a>), 3/dfn (<a href="3-dfn.html#SP4">§4</a>), 3/smm (<a href="3-smm.html#SP1">§1</a>), 4/tpc5 (<a href="4-tpc5.html#SP2">§2</a>), 5/tlc (<a href="5-tlc.html#SP2">§2</a>), 5/tlc2 (<a href="5-tlc2.html#SP2">§2</a>), 5/tic (<a href="5-tic.html#SP2">§2</a>), 5/trc (<a href="5-trc.html#SP2">§2</a>), 5/tvc (<a href="5-tvc.html#SP2">§2</a>), 5/tlc3 (<a href="5-tlc3.html#SP2">§2</a>), 5/tcc2 (<a href="5-tcc2.html#SP2">§2</a>), 5/tsc (<a href="5-tsc.html#SP2">§2</a>).</p>
|
||||
<p class="endnote">The function Inter::Packages::container is used in 2/bkm (<a href="2-bkm.html#SP2">§2</a>), 2/vi (<a href="2-vi.html#SP1">§1</a>), 3/dfn (<a href="3-dfn.html#SP4">§4</a>), 4/tpc5 (<a href="4-tpc5.html#SP2">§2</a>), 5/tlc (<a href="5-tlc.html#SP2">§2</a>), 5/tlc2 (<a href="5-tlc2.html#SP2">§2</a>), 5/tic (<a href="5-tic.html#SP2">§2</a>), 5/trc (<a href="5-trc.html#SP2">§2</a>), 5/tvc (<a href="5-tvc.html#SP2">§2</a>), 5/tlc3 (<a href="5-tlc3.html#SP2">§2</a>), 5/tcc2 (<a href="5-tcc2.html#SP2">§2</a>), 5/tsc (<a href="5-tsc.html#SP2">§2</a>).</p>
|
||||
|
||||
<p class="endnote">The function Inter::Packages::container_p is used in 2/frm (<a href="2-frm.html#SP2">§2</a>).</p>
|
||||
|
||||
|
@ -280,7 +280,7 @@
|
|||
|
||||
<p class="endnote">The function Inter::Packages::scope_of is used in 2/st (<a href="2-st.html#SP8">§8</a>), 2/vi (<a href="2-vi.html#SP1">§1</a>), 4/tmc (<a href="4-tmc.html#SP2">§2</a>), 4/tkc (<a href="4-tkc.html#SP2">§2</a>), 4/tdc (<a href="4-tdc.html#SP2">§2</a>), 4/tvc2 (<a href="4-tvc2.html#SP2">§2</a>), 4/tcc2 (<a href="4-tcc2.html#SP2">§2</a>), 4/trc (<a href="4-trc.html#SP2">§2</a>), 4/tic (<a href="4-tic.html#SP2">§2</a>), 4/tpc5 (<a href="4-tpc5.html#SP2">§2</a>), 5/tlc (<a href="5-tlc.html#SP2">§2</a>), 5/tlc2 (<a href="5-tlc2.html#SP2">§2</a>), 5/tic (<a href="5-tic.html#SP2">§2</a>), 5/trc (<a href="5-trc.html#SP2">§2</a>), 5/tvc (<a href="5-tvc.html#SP2">§2</a>), 5/tcc2 (<a href="5-tcc2.html#SP2">§2</a>).</p>
|
||||
|
||||
<p class="endnote">The function Inter::Packages::type is used in 3/smm (<a href="3-smm.html#SP1">§1</a>).</p>
|
||||
<p class="endnote">The function Inter::Packages::type appears nowhere else.</p>
|
||||
|
||||
<p class="endnote">The function Inter::Packages::baseline is used in 2/bkm (<a href="2-bkm.html#SP2">§2</a>).</p>
|
||||
|
||||
|
|
|
@ -322,7 +322,7 @@ to access this: one following equations, the other not.
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">The function Inter::SymbolsTables::symbol_from_frame_data is used in 3/smm (<a href="3-smm.html#SP1">§1</a>), 4/tmc (<a href="4-tmc.html#SP2">§2</a>), 4/tmc2 (<a href="4-tmc2.html#SP1">§1</a>), 4/tpc (<a href="4-tpc.html#SP2">§2</a>), 4/tac (<a href="4-tac.html#SP2">§2</a>), 4/tpc2 (<a href="4-tpc2.html#SP2">§2</a>), 4/tpc3 (<a href="4-tpc3.html#SP2">§2</a>), 4/tkc (<a href="4-tkc.html#SP2">§2</a>), 4/tdc (<a href="4-tdc.html#SP2">§2</a>), 4/tvc2 (<a href="4-tvc2.html#SP2">§2</a>), 4/tcc2 (<a href="4-tcc2.html#SP2">§2</a>, <a href="4-tcc2.html#SP3">§3</a>), 4/trc (<a href="4-trc.html#SP2">§2</a>), 4/tic (<a href="4-tic.html#SP2">§2</a>), 4/tpc4 (<a href="4-tpc4.html#SP2">§2</a>), 4/tpc5 (<a href="4-tpc5.html#SP2">§2</a>), 4/tpc6 (<a href="4-tpc6.html#SP2">§2</a>), 4/tpc7 (<a href="4-tpc7.html#SP2">§2</a>), 5/tlc2 (<a href="5-tlc2.html#SP2">§2</a>), 5/tic (<a href="5-tic.html#SP2">§2</a>), 5/trc (<a href="5-trc.html#SP2">§2</a>), 5/tvc (<a href="5-tvc.html#SP2">§2</a>), 5/tcc2 (<a href="5-tcc2.html#SP2">§2</a>).</p>
|
||||
<p class="endnote">The function Inter::SymbolsTables::symbol_from_frame_data is used in 4/tmc (<a href="4-tmc.html#SP2">§2</a>), 4/tmc2 (<a href="4-tmc2.html#SP1">§1</a>), 4/tpc (<a href="4-tpc.html#SP2">§2</a>), 4/tac (<a href="4-tac.html#SP2">§2</a>), 4/tpc2 (<a href="4-tpc2.html#SP2">§2</a>), 4/tpc3 (<a href="4-tpc3.html#SP2">§2</a>), 4/tkc (<a href="4-tkc.html#SP2">§2</a>), 4/tdc (<a href="4-tdc.html#SP2">§2</a>), 4/tvc2 (<a href="4-tvc2.html#SP2">§2</a>), 4/tcc2 (<a href="4-tcc2.html#SP2">§2</a>, <a href="4-tcc2.html#SP3">§3</a>), 4/trc (<a href="4-trc.html#SP2">§2</a>), 4/tic (<a href="4-tic.html#SP2">§2</a>), 4/tpc4 (<a href="4-tpc4.html#SP2">§2</a>), 4/tpc5 (<a href="4-tpc5.html#SP2">§2</a>), 4/tpc6 (<a href="4-tpc6.html#SP2">§2</a>), 4/tpc7 (<a href="4-tpc7.html#SP2">§2</a>), 5/tlc2 (<a href="5-tlc2.html#SP2">§2</a>), 5/tic (<a href="5-tic.html#SP2">§2</a>), 5/trc (<a href="5-trc.html#SP2">§2</a>), 5/tvc (<a href="5-tvc.html#SP2">§2</a>), 5/tcc2 (<a href="5-tcc2.html#SP2">§2</a>).</p>
|
||||
|
||||
<p class="endnote">The function Inter::SymbolsTables::global_symbol_from_frame_data is used in 4/tpc3 (<a href="4-tpc3.html#SP2">§2</a>), 5/tic (<a href="5-tic.html#SP2">§2</a>).</p>
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">The structure inter_symbol is accessed in 2/st, 2/pck, 2/iibf, 2/iitf, 2/vi, 2/idt, 3/dfn, 3/smm, 4/tmc, 4/tmc2, 4/tsc, 4/tpc, 4/tac, 4/tpc2, 4/tpc3, 4/tkc, 4/tdc, 4/tvc2, 4/tcc2, 4/trc, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc2 and here.</p>
|
||||
<p class="endnote">The structure inter_symbol is accessed in 2/st, 2/pck, 2/iibf, 2/iitf, 2/vi, 2/idt, 3/dfn, 4/tmc, 4/tmc2, 4/tsc, 4/tpc, 4/tac, 4/tpc2, 4/tpc3, 4/tkc, 4/tdc, 4/tvc2, 4/tcc2, 4/trc, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc2 and here.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP2"></a><b>§2. </b></p>
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
|
||||
<p class="endnote">The structure inter_line_parse is accessed in 4/tcc, 4/tmc, 4/tmc2, 4/tsc, 4/tvc, 4/tpc, 4/tlc, 4/tac, 4/tpc2, 4/tpc3, 4/tkc, 4/tdc, 4/tvc2, 4/tcc2, 4/trc, 4/tic, 4/tpc4, 4/tpc5, 4/tpc6, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc, 5/tec, 5/trc2, 5/tcc2, 5/tsc and here.</p>
|
||||
|
||||
<p class="endnote">The structure inter_construct is accessed in 3/smm, 4/tnc, 4/tcc, 4/tsc, 4/tvc, 4/tpc, 4/tpc2, 4/tpc3, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc, 5/tec, 5/trc2, 5/tcc2, 5/tsc and here.</p>
|
||||
<p class="endnote">The structure inter_construct is accessed in 4/tnc, 4/tcc, 4/tsc, 4/tvc, 4/tpc, 4/tpc2, 4/tpc3, 4/tpc7, 5/tlc, 5/tlc2, 5/tic, 5/trc, 5/tvc, 5/tlc3, 5/tcc, 5/tec, 5/trc2, 5/tcc2, 5/tsc and here.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP3"></a><b>§3. </b></p>
|
||||
|
||||
|
@ -638,7 +638,7 @@
|
|||
<p class="endnote">The function Inter::Defn::callback_dependencies appears nowhere else.</p>
|
||||
|
||||
<hr class="tocbar">
|
||||
<ul class="toc"><li><a href="3-ca.html">Back to 'Canonical Annotations'</a></li><li><a href="3-smm.html">Continue with 'Summariser'</a></li></ul><hr class="tocbar">
|
||||
<ul class="toc"><li><a href="3-ca.html">Back to 'Canonical Annotations'</a></li><li><i>(This section ends Chapter 3: Language Definition.)</i></li></ul><hr class="tocbar">
|
||||
<!--End of weave-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,72 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>3/dfn</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Language" content="en-gb">
|
||||
<link href="inweb.css" rel="stylesheet" rev="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/smm' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inter</a></li><li><a href="index.html#3">Chapter 3: Language Definition</a></li><li><b>Summariser</b></li></ul><p class="purpose">Printing a summary of the contents of a repository.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP1"></a><b>§1. </b></p>
|
||||
|
||||
|
||||
<pre class="display">
|
||||
<span class="reserved">void</span><span class="plain"> </span><span class="functiontext">Inter::Summary::write</span><span class="plain">(</span><span class="identifier">OUTPUT_STREAM</span><span class="plain">, </span><span class="reserved">inter_repository</span><span class="plain"> *</span><span class="identifier">I</span><span class="plain">) {</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">I</span><span class="plain"> == </span><span class="identifier">NULL</span><span class="plain">) </span><span class="identifier">internal_error</span><span class="plain">(</span><span class="string">"no repository"</span><span class="plain">);</span>
|
||||
<span class="functiontext">Inter::Summary::write_r</span><span class="plain">(</span><span class="identifier">OUT</span><span class="plain">, </span><span class="identifier">I</span><span class="plain">, </span><span class="identifier">NULL</span><span class="plain">, 0);</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">I</span><span class="plain">) </span><span class="functiontext">Inter::Summary::write_r</span><span class="plain">(</span><span class="identifier">OUT</span><span class="plain">, </span><span class="identifier">I</span><span class="plain">, </span><span class="functiontext">Inter::Packages::main</span><span class="plain">(</span><span class="identifier">I</span><span class="plain">), 0);</span>
|
||||
<span class="plain">}</span>
|
||||
|
||||
<span class="reserved">void</span><span class="plain"> </span><span class="functiontext">Inter::Summary::write_r</span><span class="plain">(</span><span class="identifier">OUTPUT_STREAM</span><span class="plain">, </span><span class="reserved">inter_repository</span><span class="plain"> *</span><span class="identifier">I</span><span class="plain">, </span><span class="reserved">inter_package</span><span class="plain"> *</span><span class="identifier">pack</span><span class="plain">, </span><span class="reserved">int</span><span class="plain"> </span><span class="identifier">L</span><span class="plain">) {</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">pack</span><span class="plain">) {</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">pack</span><span class="plain">-</span><span class="element">>codelike_package</span><span class="plain">) </span><span class="reserved">return</span><span class="plain">;</span>
|
||||
<span class="reserved">for</span><span class="plain"> (</span><span class="reserved">int</span><span class="plain"> </span><span class="identifier">j</span><span class="plain">=0; </span><span class="identifier">j</span><span class="plain"><</span><span class="identifier">L</span><span class="plain">; </span><span class="identifier">j</span><span class="plain">++) </span><span class="identifier">WRITE</span><span class="plain">(</span><span class="string">" "</span><span class="plain">);</span>
|
||||
<span class="identifier">WRITE</span><span class="plain">(</span><span class="string">"%S %S\</span><span class="plain">n</span><span class="string">"</span><span class="plain">, </span><span class="identifier">pack</span><span class="plain">-</span><span class="element">>package_name</span><span class="plain">-</span><span class="element">>symbol_name</span><span class="plain">, </span><span class="functiontext">Inter::Packages::type</span><span class="plain">(</span><span class="identifier">pack</span><span class="plain">)-</span><span class="element">>symbol_name</span><span class="plain">);</span>
|
||||
<span class="identifier">L</span><span class="plain">++;</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="reserved">int</span><span class="plain"> </span><span class="identifier">counts</span><span class="plain">[</span><span class="constant">MAX_INTER_CONSTRUCTS</span><span class="plain">];</span>
|
||||
<span class="reserved">for</span><span class="plain"> (</span><span class="reserved">int</span><span class="plain"> </span><span class="identifier">i</span><span class="plain">=0; </span><span class="identifier">i</span><span class="plain"><</span><span class="constant">MAX_INTER_CONSTRUCTS</span><span class="plain">; </span><span class="identifier">i</span><span class="plain">++) </span><span class="identifier">counts</span><span class="plain">[</span><span class="identifier">i</span><span class="plain">] = 0;</span>
|
||||
<span class="reserved">inter_frame</span><span class="plain"> </span><span class="identifier">P</span><span class="plain">;</span>
|
||||
<span class="identifier">LOOP_THROUGH_FRAMES</span><span class="plain">(</span><span class="identifier">P</span><span class="plain">, </span><span class="identifier">I</span><span class="plain">)</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="functiontext">Inter::Packages::container</span><span class="plain">(</span><span class="identifier">P</span><span class="plain">) == </span><span class="identifier">pack</span><span class="plain">) {</span>
|
||||
<span class="reserved">int</span><span class="plain"> </span><span class="identifier">what</span><span class="plain"> = (</span><span class="reserved">int</span><span class="plain">) </span><span class="identifier">P</span><span class="element">.data</span><span class="plain">[</span><span class="constant">ID_IFLD</span><span class="plain">];</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">what</span><span class="plain"> == </span><span class="constant">PACKAGE_IST</span><span class="plain">) {</span>
|
||||
<span class="reserved">inter_symbol</span><span class="plain"> *</span><span class="identifier">package_name</span><span class="plain"> = </span><span class="functiontext">Inter::SymbolsTables::symbol_from_frame_data</span><span class="plain">(</span><span class="identifier">P</span><span class="plain">, </span><span class="constant">DEFN_PACKAGE_IFLD</span><span class="plain">);</span>
|
||||
<span class="reserved">inter_package</span><span class="plain"> *</span><span class="identifier">which</span><span class="plain"> = </span><span class="functiontext">Inter::Package::which</span><span class="plain">(</span><span class="identifier">package_name</span><span class="plain">);</span>
|
||||
<span class="reserved">if</span><span class="plain"> ((</span><span class="identifier">which</span><span class="plain">) && (</span><span class="identifier">which</span><span class="plain">-</span><span class="element">>codelike_package</span><span class="plain"> == </span><span class="identifier">FALSE</span><span class="plain">)) </span><span class="reserved">continue</span><span class="plain">;</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="identifier">counts</span><span class="plain">[</span><span class="identifier">what</span><span class="plain">]++;</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="identifier">counts</span><span class="plain">[</span><span class="constant">COMMENT_IST</span><span class="plain">] = 0;</span>
|
||||
<span class="identifier">counts</span><span class="plain">[</span><span class="constant">NOP_IST</span><span class="plain">] = 0;</span>
|
||||
<span class="reserved">int</span><span class="plain"> </span><span class="identifier">c</span><span class="plain"> = 0;</span>
|
||||
<span class="reserved">for</span><span class="plain"> (</span><span class="reserved">int</span><span class="plain"> </span><span class="identifier">i</span><span class="plain">=0; </span><span class="identifier">i</span><span class="plain"><</span><span class="constant">MAX_INTER_CONSTRUCTS</span><span class="plain">; </span><span class="identifier">i</span><span class="plain">++) </span><span class="reserved">if</span><span class="plain"> (</span><span class="identifier">counts</span><span class="plain">[</span><span class="identifier">i</span><span class="plain">] > 0) </span><span class="identifier">c</span><span class="plain">++;</span>
|
||||
<span class="reserved">int</span><span class="plain"> </span><span class="identifier">d</span><span class="plain"> = 0;</span>
|
||||
<span class="reserved">for</span><span class="plain"> (</span><span class="reserved">int</span><span class="plain"> </span><span class="identifier">i</span><span class="plain">=0; </span><span class="identifier">i</span><span class="plain"><</span><span class="constant">MAX_INTER_CONSTRUCTS</span><span class="plain">; </span><span class="identifier">i</span><span class="plain">++) </span><span class="reserved">if</span><span class="plain"> (</span><span class="identifier">counts</span><span class="plain">[</span><span class="identifier">i</span><span class="plain">] > 0) {</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">d</span><span class="plain">++ > 0) </span><span class="identifier">WRITE</span><span class="plain">(</span><span class="string">"; "</span><span class="plain">);</span>
|
||||
<span class="reserved">else</span><span class="plain"> </span><span class="reserved">for</span><span class="plain"> (</span><span class="reserved">int</span><span class="plain"> </span><span class="identifier">j</span><span class="plain">=0; </span><span class="identifier">j</span><span class="plain"><</span><span class="identifier">L</span><span class="plain">; </span><span class="identifier">j</span><span class="plain">++) </span><span class="identifier">WRITE</span><span class="plain">(</span><span class="string">" "</span><span class="plain">);</span>
|
||||
<span class="identifier">WRITE</span><span class="plain">(</span><span class="string">"%d %S"</span><span class="plain">, </span><span class="identifier">counts</span><span class="plain">[</span><span class="identifier">i</span><span class="plain">], (</span><span class="identifier">counts</span><span class="plain">[</span><span class="identifier">i</span><span class="plain">] == 1)?(</span><span class="identifier">IC_lookup</span><span class="plain">[</span><span class="identifier">i</span><span class="plain">]-</span><span class="element">>singular_name</span><span class="plain">):(</span><span class="identifier">IC_lookup</span><span class="plain">[</span><span class="identifier">i</span><span class="plain">]-</span><span class="element">>plural_name</span><span class="plain">));</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">d</span><span class="plain"> > 0) </span><span class="identifier">WRITE</span><span class="plain">(</span><span class="string">"\</span><span class="plain">n</span><span class="string">"</span><span class="plain">);</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">pack</span><span class="plain">)</span>
|
||||
<span class="reserved">for</span><span class="plain"> (</span><span class="reserved">inter_package</span><span class="plain"> *</span><span class="identifier">Q</span><span class="plain"> = </span><span class="identifier">pack</span><span class="plain">-</span><span class="element">>child_package</span><span class="plain">; </span><span class="identifier">Q</span><span class="plain">; </span><span class="identifier">Q</span><span class="plain"> = </span><span class="identifier">Q</span><span class="plain">-</span><span class="element">>next_package</span><span class="plain">)</span>
|
||||
<span class="functiontext">Inter::Summary::write_r</span><span class="plain">(</span><span class="identifier">OUT</span><span class="plain">, </span><span class="identifier">I</span><span class="plain">, </span><span class="identifier">Q</span><span class="plain">, </span><span class="identifier">L</span><span class="plain">);</span>
|
||||
<span class="plain">}</span>
|
||||
</pre>
|
||||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">The function Inter::Summary::write appears nowhere else.</p>
|
||||
|
||||
<p class="endnote">The function Inter::Summary::write_r appears nowhere else.</p>
|
||||
|
||||
<hr class="tocbar">
|
||||
<ul class="toc"><li><a href="3-dfn.html">Back to 'Definition'</a></li><li><i>(This section ends Chapter 3: Language Definition.)</i></li></ul><hr class="tocbar">
|
||||
<!--End of weave-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>3/smm</title>
|
||||
<title>3/dfn</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Content-Language" content="en-gb">
|
||||
<link href="inweb.css" rel="stylesheet" rev="stylesheet" type="text/css">
|
||||
|
|
|
@ -196,7 +196,7 @@
|
|||
|
||||
<p class="endnote">The function Inter::Package::is is used in 5/tlc3 (<a href="5-tlc3.html#SP2">§2</a>).</p>
|
||||
|
||||
<p class="endnote">The function Inter::Package::which is used in 2/st (<a href="2-st.html#SP12">§12</a>), 2/pck (<a href="2-pck.html#SP3">§3</a>), 3/smm (<a href="3-smm.html#SP1">§1</a>).</p>
|
||||
<p class="endnote">The function Inter::Package::which is used in 2/st (<a href="2-st.html#SP12">§12</a>), 2/pck (<a href="2-pck.html#SP3">§3</a>).</p>
|
||||
|
||||
<p class="endnote">The function Inter::Package::type is used in 2/pck (<a href="2-pck.html#SP3">§3</a>).</p>
|
||||
|
||||
|
|
|
@ -83,10 +83,6 @@
|
|||
<p><a href="3-dfn.html"><spon class="sectiontitle">Definition</span></a> -
|
||||
<span class="purpose">Defining the Inter format.</span></p>
|
||||
</li>
|
||||
<li>
|
||||
<p><a href="3-smm.html"><spon class="sectiontitle">Summariser</span></a> -
|
||||
<span class="purpose">Printing a summary of the contents of a repository.</span></p>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
@ -91,16 +91,13 @@ void CodeGen::Link::build_r(inter_package *P) {
|
|||
|
||||
inter_symbol *CodeGen::Link::find_name(inter_repository *I, text_stream *S, int deeply) {
|
||||
for (int i=0; i<link_search_list_len; i++) {
|
||||
// LOG("Look for %S in %d: $4\n", S, i, link_search_list[i]);
|
||||
inter_symbol *symb = Inter::SymbolsTables::symbol_from_name_not_equating(link_search_list[i], S);
|
||||
if (symb) return symb;
|
||||
}
|
||||
if (deeply) {
|
||||
// LOG("Look for %S deeper\n", S);
|
||||
inter_symbol *symb = CodeGen::Link::find_in_namespace(I, S);
|
||||
if (symb) return symb;
|
||||
}
|
||||
// LOG("Failed\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -2352,7 +2352,6 @@ int InterSchemas::treat_constructs(inter_schema_node *par, inter_schema_node *is
|
|||
}
|
||||
if (cw != 3) internal_error("malformed for prototype");
|
||||
for (int i=0; i<3; i++) {
|
||||
// LOG("For clause %d is :", i); InterSchemas::log_ist(from[i]); LOG(" to "); InterSchemas::log_ist(to[i]); LOG("\n");
|
||||
inter_schema_node *eval_isn = InterSchemas::new_node(isn->parent_schema, EVAL_ISNT);
|
||||
if (i == 0) isn->child_node = eval_isn;
|
||||
if (i == 1) isn->child_node->next_node = eval_isn;
|
||||
|
|
|
@ -106,22 +106,18 @@ void CodeGen::CL::constant(code_generation *gen, inter_frame P) {
|
|||
|
||||
if (Str::eq(con_name->symbol_name, I"thedark")) {
|
||||
the_quartet_found = TRUE;
|
||||
// WRITE("Object thedark \"(darkness object)\";\n");
|
||||
return;
|
||||
}
|
||||
if (Str::eq(con_name->symbol_name, I"InformLibrary")) {
|
||||
the_quartet_found = TRUE;
|
||||
// WRITE("Object InformLibrary \"(Inform Library)\" has proper;\n");
|
||||
return;
|
||||
}
|
||||
if (Str::eq(con_name->symbol_name, I"InformParser")) {
|
||||
the_quartet_found = TRUE;
|
||||
// WRITE("Object InformParser \"(Inform Parser)\" has proper;\n");
|
||||
return;
|
||||
}
|
||||
if (Str::eq(con_name->symbol_name, I"Compass")) {
|
||||
the_quartet_found = TRUE;
|
||||
// WRITE("Object Compass \"compass\" has concealed;\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
[CodeGen::Summarised::] Final Summarised Inter.
|
||||
|
||||
To create the range of possible targets into which Inter can be converted.
|
||||
|
||||
@ This target is very simple: when we get the message to begin generation,
|
||||
we simply ask the Inter module to output some text, and return true to
|
||||
tell the generator that nothing more need be done.
|
||||
|
||||
=
|
||||
void CodeGen::Summarised::create_target(void) {
|
||||
code_generation_target *summary_cgt = CodeGen::Targets::new(I"summary");
|
||||
METHOD_ADD(summary_cgt, BEGIN_GENERATION_MTID, CodeGen::Summarised::summary);
|
||||
}
|
||||
|
||||
int CodeGen::Summarised::summary(code_generation_target *cgt, code_generation *gen) {
|
||||
if (gen->from_step == NULL) internal_error("temporary generations cannot be output");
|
||||
Inter::Summary::write(gen->from_step->text_out_file, gen->from);
|
||||
return TRUE;
|
||||
}
|
|
@ -30,7 +30,6 @@ void CodeGen::Targets::make_targets(void) {
|
|||
CodeGen::Textual::create_target();
|
||||
CodeGen::Binary::create_target();
|
||||
CodeGen::Inventory::create_target();
|
||||
CodeGen::Summarised::create_target();
|
||||
CodeGen::I6::create_target();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,5 +39,4 @@ Chapter 5: Final Code
|
|||
Final Textual Inter
|
||||
Final Binary Inter
|
||||
Final Inventory
|
||||
Final Summarised Inter
|
||||
Final Inform 6
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
[Inter::Summary::] Summariser.
|
||||
|
||||
Printing a summary of the contents of a repository.
|
||||
|
||||
@ =
|
||||
void Inter::Summary::write(OUTPUT_STREAM, inter_repository *I) {
|
||||
if (I == NULL) internal_error("no repository");
|
||||
Inter::Summary::write_r(OUT, I, NULL, 0);
|
||||
if (I) Inter::Summary::write_r(OUT, I, Inter::Packages::main(I), 0);
|
||||
}
|
||||
|
||||
void Inter::Summary::write_r(OUTPUT_STREAM, inter_repository *I, inter_package *pack, int L) {
|
||||
if (pack) {
|
||||
if (pack->codelike_package) return;
|
||||
for (int j=0; j<L; j++) WRITE(" ");
|
||||
WRITE("%S %S\n", pack->package_name->symbol_name, Inter::Packages::type(pack)->symbol_name);
|
||||
L++;
|
||||
}
|
||||
int counts[MAX_INTER_CONSTRUCTS];
|
||||
for (int i=0; i<MAX_INTER_CONSTRUCTS; i++) counts[i] = 0;
|
||||
inter_frame P;
|
||||
LOOP_THROUGH_FRAMES(P, I)
|
||||
if (Inter::Packages::container(P) == pack) {
|
||||
int what = (int) P.data[ID_IFLD];
|
||||
if (what == PACKAGE_IST) {
|
||||
inter_symbol *package_name = Inter::SymbolsTables::symbol_from_frame_data(P, DEFN_PACKAGE_IFLD);
|
||||
inter_package *which = Inter::Package::which(package_name);
|
||||
if ((which) && (which->codelike_package == FALSE)) continue;
|
||||
}
|
||||
counts[what]++;
|
||||
}
|
||||
counts[COMMENT_IST] = 0;
|
||||
counts[NOP_IST] = 0;
|
||||
int c = 0;
|
||||
for (int i=0; i<MAX_INTER_CONSTRUCTS; i++) if (counts[i] > 0) c++;
|
||||
int d = 0;
|
||||
for (int i=0; i<MAX_INTER_CONSTRUCTS; i++) if (counts[i] > 0) {
|
||||
if (d++ > 0) WRITE("; ");
|
||||
else for (int j=0; j<L; j++) WRITE(" ");
|
||||
WRITE("%d %S", counts[i], (counts[i] == 1)?(IC_lookup[i]->singular_name):(IC_lookup[i]->plural_name));
|
||||
}
|
||||
if (d > 0) WRITE("\n");
|
||||
if (pack)
|
||||
for (inter_package *Q = pack->child_package; Q; Q = Q->next_package)
|
||||
Inter::Summary::write_r(OUT, I, Q, L);
|
||||
}
|
|
@ -24,7 +24,6 @@ Chapter 2: Interoperability
|
|||
Chapter 3: Language Definition
|
||||
Canonical Annotations
|
||||
Definition
|
||||
Summariser
|
||||
|
||||
Chapter 4: Void Constructs
|
||||
The Nop Construct
|
||||
|
|
Loading…
Reference in a new issue