go-vise

Constrained Size Output Virtual Machine
Info | Log | Files | Refs | README | LICENSE

commit ef9a4c3073e7e878846693d4aa7fd0cf1cc977a7
parent 77c0035da3a346a99918af0a60125817941cb383
Author: lash <dev@holbrook.no>
Date:   Wed, 24 Jul 2024 21:19:29 +0100

Fix table bugs in texinfo docs, improve inline docs

Diffstat:
Mdoc/build/builtin_005fflags.html | 2+-
Mdoc/build/cache.html | 18++++++++++--------
Mdoc/build/cookbook.html | 24+++++++++++++-----------
Mdoc/build/dev.html | 58++++++++++++++++++++++++++++++----------------------------
Mdoc/build/dynamic_005ftemplates.html | 2+-
Mdoc/build/execution_005fcontext.html | 2+-
Mdoc/build/handling_005fmenus.html | 2+-
Mdoc/build/index.html | 6++++--
Mdoc/build/instructions.html | 82+++++++++++++++++++++++++++++++++++++++++--------------------------------------
Mdoc/build/language.html | 12+++++++++---
Mdoc/build/lateral_005fnavigation.html | 2+-
Mdoc/build/load_005fhandler.html | 2+-
Mdoc/build/long_005fvalues.html | 2+-
Mdoc/build/map_005fsink.html | 2+-
Mdoc/build/multiple_005fmenus.html | 2+-
Mdoc/build/multiple_005fpages.html | 2+-
Mdoc/build/navigation.html | 40+++++++++++++++++++++-------------------
Mdoc/build/node_005fnames.html | 2+-
Mdoc/build/node_005ftype.html | 2+-
Mdoc/build/nomenclature.html | 14++++++++++----
Mdoc/build/overview.html | 8+++++---
Mdoc/build/render.html | 56+++++++++++++++++++++++++++++---------------------------
Mdoc/build/render_005fmulti.html | 2+-
Mdoc/build/signals.html | 16+++++++++++-----
Mdoc/build/sim.html | 32+++++++++++++++++---------------
Mdoc/build/symbol_005ftype.html | 2+-
Mdoc/texinfo/instructions.texi | 6++++--
Mdoc/texinfo/navigation.texi | 2+-
Mdoc/texinfo/render.texi | 4++--
Mpersist/fs.go | 10+++++-----
Mresource/resource.go | 2+-
31 files changed, 229 insertions(+), 189 deletions(-)

diff --git a/doc/build/builtin_005fflags.html b/doc/build/builtin_005fflags.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/cache.html b/doc/build/cache.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Released 2023 under AGPL3 --> @@ -20,6 +20,8 @@ <link href="navigation.html" rel="prev" title="navigation"> <style type="text/css"> <!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} +span:hover a.copiable-link {visibility: visible} ul.mark-bullet {list-style-type: disc} --> </style> @@ -34,7 +36,7 @@ ul.mark-bullet {list-style-type: disc} Next: <a href="render.html" accesskey="n" rel="next">Rendering</a>, Previous: <a href="navigation.html" accesskey="p" rel="prev">Navigation</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> </div> <hr> -<h2 class="chapter" id="External-data">7 External data</h2> +<h2 class="chapter" id="External-data"><span>7 External data<a class="copiable-link" href="#External-data"> &para;</a></span></h2> <p>The <code class="code">LOAD</code> instruction enables the client implementer to define external data retrieval and processing code. </p> @@ -54,7 +56,7 @@ Next: <a href="render.html" accesskey="n" rel="next">Rendering</a>, Previous: <a <li><a href="#Refreshing-cache-contents" accesskey="4">Refreshing cache contents</a></li> </ul> <div class="section-level-extent" id="The-LOAD-handler"> -<h3 class="section">7.1 The <code class="code">LOAD</code> handler</h3> +<h3 class="section"><span>7.1 The <code class="code">LOAD</code> handler<a class="copiable-link" href="#The-LOAD-handler"> &para;</a></span></h3> <p>In the <em class="emph">golang</em> code, the handler of the <code class="code">LOAD</code> instruction is an implementation of the <code class="code">resource.Resource</code> interface. </p> @@ -72,7 +74,7 @@ Next: <a href="render.html" accesskey="n" rel="next">Rendering</a>, Previous: <a </div> <div class="section-level-extent" id="Size-limits"> -<h3 class="section">7.2 Size limits</h3> +<h3 class="section"><span>7.2 Size limits<a class="copiable-link" href="#Size-limits"> &para;</a></span></h3> <p><code class="code">LOAD</code> instructions include a size parameter. </p> @@ -85,7 +87,7 @@ Next: <a href="render.html" accesskey="n" rel="next">Rendering</a>, Previous: <a <li><a href="#g_t_0022Sink_0022-symbols" accesskey="1">&quot;Sink&quot; symbols</a></li> </ul> <div class="subsection-level-extent" id="g_t_0022Sink_0022-symbols"> -<h4 class="subsection">7.2.1 &quot;Sink&quot; symbols</h4> +<h4 class="subsection"><span>7.2.1 &quot;Sink&quot; symbols<a class="copiable-link" href="#g_t_0022Sink_0022-symbols"> &para;</a></span></h4> <p>A sink is a symbol loaded with <code class="code">size</code> parameter <code class="code">0</code>. </p> @@ -95,7 +97,7 @@ Next: <a href="render.html" accesskey="n" rel="next">Rendering</a>, Previous: <a </div> </div> <div class="section-level-extent" id="Scope"> -<h3 class="section">7.3 Scope</h3> +<h3 class="section"><span>7.3 Scope<a class="copiable-link" href="#Scope"> &para;</a></span></h3> <p>The result data payload is stored under the symbol key for which it was loaded. It is kept in the cache until execution ascends from the execution stack level in which it was loaded. </p> @@ -106,7 +108,7 @@ Next: <a href="render.html" accesskey="n" rel="next">Rendering</a>, Previous: <a <li><a href="#Duplicate-LOAD" accesskey="1">Duplicate <code class="code">LOAD</code></a></li> </ul> <div class="subsection-level-extent" id="Duplicate-LOAD"> -<h4 class="subsection">7.3.1 Duplicate <code class="code">LOAD</code></h4> +<h4 class="subsection"><span>7.3.1 Duplicate <code class="code">LOAD</code><a class="copiable-link" href="#Duplicate-LOAD"> &para;</a></span></h4> <p>If a <code class="code">LOAD</code> statement with the same symbol is issued twice within the same <em class="emph">scope</em>, it will fail and execution will terminate. </p> @@ -120,7 +122,7 @@ Next: <a href="render.html" accesskey="n" rel="next">Rendering</a>, Previous: <a </div> </div> <div class="section-level-extent" id="Refreshing-cache-contents"> -<h3 class="section">7.4 Refreshing cache contents</h3> +<h3 class="section"><span>7.4 Refreshing cache contents<a class="copiable-link" href="#Refreshing-cache-contents"> &para;</a></span></h3> <p>The <code class="code">RELOAD</code> instruction will trigger the <code class="code">LOAD</code> handler again. The <code class="code">RELOAD</code> instruction is bound to the same size constraint as the initial <code class="code">LOAD</code>. </p> diff --git a/doc/build/cookbook.html b/doc/build/cookbook.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Released 2023 under AGPL3 --> @@ -20,7 +20,9 @@ <link href="language.html" rel="prev" title="language"> <style type="text/css"> <!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} div.example {margin-left: 3.2em} +span:hover a.copiable-link {visibility: visible} ul.mark-bullet {list-style-type: disc} --> </style> @@ -35,7 +37,7 @@ ul.mark-bullet {list-style-type: disc} Next: <a href="dev.html" accesskey="n" rel="next">Developing with vise</a>, Previous: <a href="language.html" accesskey="p" rel="prev">Handling languages</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> </div> <hr> -<h2 class="chapter" id="Common-patterns">10 Common patterns</h2> +<h2 class="chapter" id="Common-patterns"><span>10 Common patterns<a class="copiable-link" href="#Common-patterns"> &para;</a></span></h2> <ul class="mini-toc"> @@ -47,7 +49,7 @@ Next: <a href="dev.html" accesskey="n" rel="next">Developing with vise</a>, Prev <li><a href="#Default-input-handler" accesskey="6">Default input handler</a></li> </ul> <div class="section-level-extent" id="Hello-world"> -<h3 class="section">10.1 Hello world</h3> +<h3 class="section"><span>10.1 Hello world<a class="copiable-link" href="#Hello-world"> &para;</a></span></h3> <div class="example"> <pre class="example-preformatted">HALT @@ -58,7 +60,7 @@ Next: <a href="dev.html" accesskey="n" rel="next">Developing with vise</a>, Prev <a class="anchor" id="handling_005fmenus"></a></div> <div class="section-level-extent" id="Handling-menus-and-inputs"> -<h3 class="section">10.2 Handling menus and inputs</h3> +<h3 class="section"><span>10.2 Handling menus and inputs<a class="copiable-link" href="#Handling-menus-and-inputs"> &para;</a></span></h3> <div class="example"> <pre class="example-preformatted">MOUT to_foo 0 @@ -85,7 +87,7 @@ INCMP _ 2 <li><a href="#Menu-batch-version" accesskey="1">Menu batch version</a></li> </ul> <div class="subsection-level-extent" id="Menu-batch-version"> -<h4 class="subsection">10.2.1 Menu batch version</h4> +<h4 class="subsection"><span>10.2.1 Menu batch version<a class="copiable-link" href="#Menu-batch-version"> &para;</a></span></h4> <div class="example"> <pre class="example-preformatted">DOWN foo 0 to_foo @@ -99,7 +101,7 @@ UP 2 upup </div> </div> <div class="section-level-extent" id="Signal-flow-control"> -<h3 class="section">10.3 Signal flow control</h3> +<h3 class="section"><span>10.3 Signal flow control<a class="copiable-link" href="#Signal-flow-control"> &para;</a></span></h3> <div class="example"> <pre class="example-preformatted">LOAD foo 1 @@ -114,7 +116,7 @@ MOVE baz <a class="anchor" id="multiple_005fpages"></a></div> <div class="section-level-extent" id="Multiple-pages"> -<h3 class="section">10.4 Multiple pages</h3> +<h3 class="section"><span>10.4 Multiple pages<a class="copiable-link" href="#Multiple-pages"> &para;</a></span></h3> <div class="example"> <pre class="example-preformatted">LOAD foo 0 @@ -135,7 +137,7 @@ INCMP &lt; 22 <li><a href="#Menu-batch-version-1" accesskey="1">Menu batch version</a></li> </ul> <div class="subsection-level-extent" id="Menu-batch-version-1"> -<h4 class="subsection">10.4.1 Menu batch version</h4> +<h4 class="subsection"><span>10.4.1 Menu batch version<a class="copiable-link" href="#Menu-batch-version-1"> &para;</a></span></h4> <div class="example"> <pre class="example-preformatted">LOAD foo 0 @@ -149,7 +151,7 @@ PREVIOUS 22 to_back <a class="anchor" id="multiple_005fmenus"></a></div> </div> <div class="section-level-extent" id="Multi_002dpage-menus"> -<h3 class="section">10.5 Multi-page menus</h3> +<h3 class="section"><span>10.5 Multi-page menus<a class="copiable-link" href="#Multi_002dpage-menus"> &para;</a></span></h3> <div class="example"> <pre class="example-preformatted">MSINK @@ -181,7 +183,7 @@ INCMP bar 7 <li><a href="#Menu-batch-version-2" accesskey="1">Menu batch version</a></li> </ul> <div class="subsection-level-extent" id="Menu-batch-version-2"> -<h4 class="subsection">10.5.1 Menu batch version</h4> +<h4 class="subsection"><span>10.5.1 Menu batch version<a class="copiable-link" href="#Menu-batch-version-2"> &para;</a></span></h4> <div class="example"> <pre class="example-preformatted">MSINK @@ -203,7 +205,7 @@ DOWN bar 7 pu </div> </div> <div class="section-level-extent" id="Default-input-handler"> -<h3 class="section">10.6 Default input handler</h3> +<h3 class="section"><span>10.6 Default input handler<a class="copiable-link" href="#Default-input-handler"> &para;</a></span></h3> <div class="example"> <pre class="example-preformatted">MOUT to_foo 0 diff --git a/doc/build/dev.html b/doc/build/dev.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Released 2023 under AGPL3 --> @@ -19,7 +19,9 @@ <link href="cookbook.html" rel="prev" title="cookbook"> <style type="text/css"> <!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} div.example {margin-left: 3.2em} +span:hover a.copiable-link {visibility: visible} ul.mark-bullet {list-style-type: disc} --> </style> @@ -34,7 +36,7 @@ ul.mark-bullet {list-style-type: disc} Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> </div> <hr> -<h2 class="chapter" id="Developing-with-vise">11 Developing with vise</h2> +<h2 class="chapter" id="Developing-with-vise"><span>11 Developing with vise<a class="copiable-link" href="#Developing-with-vise"> &para;</a></span></h2> <ul class="mini-toc"> @@ -47,7 +49,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, <li><a href="#Bytecode-example" accesskey="7">Bytecode example</a></li> </ul> <div class="section-level-extent" id="Code-repository-structure"> -<h3 class="section">11.1 Code repository structure</h3> +<h3 class="section"><span>11.1 Code repository structure<a class="copiable-link" href="#Code-repository-structure"> &para;</a></span></h3> <dl class="table"> <dt><code class="code">asm</code></dt> @@ -85,7 +87,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> <div class="section-level-extent" id="Interacting-with-vise"> -<h3 class="section">11.2 Interacting with <code class="code">vise</code></h3> +<h3 class="section"><span>11.2 Interacting with <code class="code">vise</code><a class="copiable-link" href="#Interacting-with-vise"> &para;</a></span></h3> <p>Implementers of <code class="code">vise</code> should interface with the system using the <code class="code">engine</code> module. </p> @@ -99,7 +101,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, <li><a href="#Execution-context" accesskey="4">Execution context</a></li> </ul> <div class="subsection-level-extent" id="Modes-of-operation"> -<h4 class="subsection">11.2.1 Modes of operation</h4> +<h4 class="subsection"><span>11.2.1 Modes of operation<a class="copiable-link" href="#Modes-of-operation"> &para;</a></span></h4> <p>The <code class="code">engine</code> module provides three different modes of operation for the engine implementations. </p> @@ -110,7 +112,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, <li><a href="#Asynchronous-one_002dshot" accesskey="3">Asynchronous one-shot</a></li> </ul> <div class="subsubsection-level-extent" id="Manual-operation"> -<h4 class="subsubsection">11.2.1.1 Manual operation</h4> +<h4 class="subsubsection"><span>11.2.1.1 Manual operation<a class="copiable-link" href="#Manual-operation"> &para;</a></span></h4> <p>Directly interaction with an <code class="code">engine.Engine</code> instance. </p> @@ -123,7 +125,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> <div class="subsubsection-level-extent" id="Synchronous-loop"> -<h4 class="subsubsection">11.2.1.2 Synchronous loop</h4> +<h4 class="subsubsection"><span>11.2.1.2 Synchronous loop<a class="copiable-link" href="#Synchronous-loop"> &para;</a></span></h4> <p>Receives input from a reader and writes into to a writer, and executes the underlying <code class="code">engine.Engine</code> with given inputs until execution is terminated. </p> @@ -134,7 +136,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> <div class="subsubsection-level-extent" id="Asynchronous-one_002dshot"> -<h4 class="subsubsection">11.2.1.3 Asynchronous one-shot</h4> +<h4 class="subsubsection"><span>11.2.1.3 Asynchronous one-shot<a class="copiable-link" href="#Asynchronous-one_002dshot"> &para;</a></span></h4> <p>Compatible with e.g. a network socket or HTTP frontend. The <code class="code">engine.RunPersisted</code> method restores a persisted state and runs one single input until VM yield after which the new state is persisted. </p> @@ -144,7 +146,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> </div> <div class="subsection-level-extent" id="Configuration"> -<h4 class="subsection">11.2.2 Configuration</h4> +<h4 class="subsection"><span>11.2.2 Configuration<a class="copiable-link" href="#Configuration"> &para;</a></span></h4> <p>The engine configuration defines the top-level parameters for the execution environment, including maximum output size, default language, execution entry point and more. </p> @@ -153,7 +155,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> <div class="subsection-level-extent" id="Sessions"> -<h4 class="subsection">11.2.3 Sessions</h4> +<h4 class="subsection"><span>11.2.3 Sessions<a class="copiable-link" href="#Sessions"> &para;</a></span></h4> <p>The <code class="code">engine.Config.SessionId</code> is used to disambiguate the end-user that is interacting with the engine. </p> @@ -162,7 +164,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, <a class="anchor" id="execution_005fcontext"></a></div> <div class="subsection-level-extent" id="Execution-context"> -<h4 class="subsection">11.2.4 Execution context</h4> +<h4 class="subsection"><span>11.2.4 Execution context<a class="copiable-link" href="#Execution-context"> &para;</a></span></h4> <p>The engine stores the <code class="code">SessionId</code> aswell as the current chosen <code class="code">lang.Language</code> in the execution context. This is passed through to the VM operation, and is available for client code, specifically: </p> @@ -176,7 +178,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> </div> <div class="section-level-extent" id="Resolving-resources"> -<h3 class="section">11.3 Resolving resources</h3> +<h3 class="section"><span>11.3 Resolving resources<a class="copiable-link" href="#Resolving-resources"> &para;</a></span></h3> <p>The core of implementation code is defined by implementing the <code class="code">resource.Resource</code> interface. This is also described in the <a class="ref" href="cache.html#load_005fhandler">LOAD handler</a> section. </p> @@ -187,7 +189,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, <li><a href="#Filesystem-resource-implementation" accesskey="2">Filesystem resource implementation</a></li> </ul> <div class="subsection-level-extent" id="Memory-resource-implementation"> -<h4 class="subsection">11.3.1 Memory resource implementation</h4> +<h4 class="subsection"><span>11.3.1 Memory resource implementation<a class="copiable-link" href="#Memory-resource-implementation"> &para;</a></span></h4> <p>One of two reference implementations of <code class="code">resource.Resource</code> is the <code class="code">resource.MemResource</code> class. It enables the client to register all node and symbol resolutions at runtime, using its functions prefixed with <code class="code">Add...</code>. </p> @@ -196,7 +198,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> <div class="subsection-level-extent" id="Filesystem-resource-implementation"> -<h4 class="subsection">11.3.2 Filesystem resource implementation</h4> +<h4 class="subsection"><span>11.3.2 Filesystem resource implementation<a class="copiable-link" href="#Filesystem-resource-implementation"> &para;</a></span></h4> <p>The Filesystem based resource implemementation is used by the <code class="code">dev/interactive</code> tool, aswell as the executable examples in <samp class="file">examples/</samp> directory. </p> @@ -210,14 +212,14 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, <li><a href="#External-symbols-_0028resource_002eResource_002eFuncFor_0029" accesskey="4">External symbols (<code class="code">resource.Resource.FuncFor</code>)</a></li> </ul> <div class="subsubsection-level-extent" id="Bytecode-_0028resource_002eResource_002eGetCode_0029"> -<h4 class="subsubsection">11.3.2.1 Bytecode (<code class="code">resource.Resource.GetCode</code>)</h4> +<h4 class="subsubsection"><span>11.3.2.1 Bytecode (<code class="code">resource.Resource.GetCode</code>)<a class="copiable-link" href="#Bytecode-_0028resource_002eResource_002eGetCode_0029"> &para;</a></span></h4> <p>Read from <samp class="file">basedir/&lt;node&gt;.bin</samp>. </p> </div> <div class="subsubsection-level-extent" id="Templates-_0028resource_002eResource_002eGetTemplate_0029"> -<h4 class="subsubsection">11.3.2.2 Templates (<code class="code">resource.Resource.GetTemplate</code>)</h4> +<h4 class="subsubsection"><span>11.3.2.2 Templates (<code class="code">resource.Resource.GetTemplate</code>)<a class="copiable-link" href="#Templates-_0028resource_002eResource_002eGetTemplate_0029"> &para;</a></span></h4> <p>If language has been set, the template will be read from <samp class="file">basedir/&lt;node&gt;_&lt;lang&gt;</samp>. For example, the <em class="emph">norwegian</em> template for the node <code class="code">root</code> will be read from <samp class="file">basedir/root_nor</samp>. </p> @@ -228,7 +230,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> <div class="subsubsection-level-extent" id="Menus-_0028resource_002eResource_002eGetMenu_0029"> -<h4 class="subsubsection">11.3.2.3 Menus (<code class="code">resource.Resource.GetMenu</code>)</h4> +<h4 class="subsubsection"><span>11.3.2.3 Menus (<code class="code">resource.Resource.GetMenu</code>)<a class="copiable-link" href="#Menus-_0028resource_002eResource_002eGetMenu_0029"> &para;</a></span></h4> <p>If language has been set, the template will be read from <samp class="file">basedir/&lt;label&gt;_&lt;lang&gt;_menu</samp>. For example, the <em class="emph">norwegian</em> template for the menu label <code class="code">foo</code> will be read from <samp class="file">basedir/foo_nor_menu</samp>. </p> @@ -239,7 +241,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> <div class="subsubsection-level-extent" id="External-symbols-_0028resource_002eResource_002eFuncFor_0029"> -<h4 class="subsubsection">11.3.2.4 External symbols (<code class="code">resource.Resource.FuncFor</code>)</h4> +<h4 class="subsubsection"><span>11.3.2.4 External symbols (<code class="code">resource.Resource.FuncFor</code>)<a class="copiable-link" href="#External-symbols-_0028resource_002eResource_002eFuncFor_0029"> &para;</a></span></h4> <p>The implementation allows setting resolver functions for symbols at runtime, using the <code class="code">resource.FsResource.AddLocalFunc</code> method. This registers an <code class="code">resource.FsResource.EntryFunc</code> with the lookup symbol as key. Note that the <code class="code">EntryFunc</code> receives the language setting through the execution context. </p> @@ -256,7 +258,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> </div> <div class="section-level-extent" id="Logging"> -<h3 class="section">11.4 Logging</h3> +<h3 class="section"><span>11.4 Logging<a class="copiable-link" href="#Logging"> &para;</a></span></h3> <p>Loglevels are set at compile-time using the following build tags: </p> @@ -278,7 +280,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> <div class="section-level-extent" id="Tools"> -<h3 class="section">11.5 Tools</h3> +<h3 class="section"><span>11.5 Tools<a class="copiable-link" href="#Tools"> &para;</a></span></h3> <p>Located in the <samp class="file">dev/</samp> directory of the source code repository. </p> @@ -291,7 +293,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, <li><a href="#Interactive-case-examples" accesskey="5">Interactive case examples</a></li> </ul> <div class="subsection-level-extent" id="Test-data-generation"> -<h4 class="subsection">11.5.1 Test data generation</h4> +<h4 class="subsection"><span>11.5.1 Test data generation<a class="copiable-link" href="#Test-data-generation"> &para;</a></span></h4> <div class="example"> <pre class="example-preformatted">go run ./dev/gendata/ &lt;directory&gt; @@ -302,7 +304,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> <div class="subsection-level-extent" id="Interactive-runner"> -<h4 class="subsection">11.5.2 Interactive runner</h4> +<h4 class="subsection"><span>11.5.2 Interactive runner<a class="copiable-link" href="#Interactive-runner"> &para;</a></span></h4> <div class="example"> <pre class="example-preformatted">go run ./dev/interactive [-d &lt;data_directory&gt;] [--root &lt;root_symbol&gt;] [--session-id &lt;session_id&gt;] [--persist] @@ -323,7 +325,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> <div class="subsection-level-extent" id="Assembler"> -<h4 class="subsection">11.5.3 Assembler</h4> +<h4 class="subsection"><span>11.5.3 Assembler<a class="copiable-link" href="#Assembler"> &para;</a></span></h4> <div class="example"> <pre class="example-preformatted">go run ./dev/asm &lt;assembly_file&gt; @@ -334,7 +336,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> <div class="subsection-level-extent" id="Disassembler"> -<h4 class="subsection">11.5.4 Disassembler</h4> +<h4 class="subsection"><span>11.5.4 Disassembler<a class="copiable-link" href="#Disassembler"> &para;</a></span></h4> <div class="example"> <pre class="example-preformatted">go run ./dev/disasm/ &lt;binary_file&gt; @@ -345,7 +347,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> <div class="subsection-level-extent" id="Interactive-case-examples"> -<h4 class="subsection">11.5.5 Interactive case examples</h4> +<h4 class="subsection"><span>11.5.5 Interactive case examples<a class="copiable-link" href="#Interactive-case-examples"> &para;</a></span></h4> <p>Found in <samp class="file">examples/</samp>. </p> @@ -386,14 +388,14 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, </div> </div> <div class="section-level-extent" id="Assembly-examples"> -<h3 class="section">11.6 Assembly examples</h3> +<h3 class="section"><span>11.6 Assembly examples<a class="copiable-link" href="#Assembly-examples"> &para;</a></span></h3> <p>See <samp class="file">testdata/*.vis</samp> </p> </div> <div class="section-level-extent" id="Bytecode-example"> -<h3 class="section">11.7 Bytecode example</h3> +<h3 class="section"><span>11.7 Bytecode example<a class="copiable-link" href="#Bytecode-example"> &para;</a></span></h3> <p>Currently the following rules apply for encoding in version <code class="code">0</code>: </p> @@ -409,7 +411,7 @@ Previous: <a href="cookbook.html" accesskey="p" rel="prev">Common patterns</a>, <li><a href="#Example" accesskey="1">Example</a></li> </ul> <div class="subsection-level-extent" id="Example"> -<h4 class="subsection">11.7.1 Example</h4> +<h4 class="subsection"><span>11.7.1 Example<a class="copiable-link" href="#Example"> &para;</a></span></h4> <p>(Minimal, WIP) </p> diff --git a/doc/build/dynamic_005ftemplates.html b/doc/build/dynamic_005ftemplates.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/execution_005fcontext.html b/doc/build/execution_005fcontext.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/handling_005fmenus.html b/doc/build/handling_005fmenus.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/index.html b/doc/build/index.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Released 2023 under AGPL3 --> @@ -18,6 +18,8 @@ <link href="overview.html" rel="next" title="overview"> <style type="text/css"> <!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} +span:hover a.copiable-link {visibility: visible} ul.toc-numbered-mark {list-style: none} --> </style> @@ -36,7 +38,7 @@ ul.toc-numbered-mark {list-style: none} Next: <a href="overview.html" accesskey="n" rel="next">Overview</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> </div> <hr> -<h1 class="top" id="Introduction">Introduction</h1> +<h1 class="top" id="Introduction"><span>Introduction<a class="copiable-link" href="#Introduction"> &para;</a></span></h1> <div class="element-contents" id="SEC_Contents"> <h2 class="contents-heading">Table of Contents</h2> diff --git a/doc/build/instructions.html b/doc/build/instructions.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Released 2023 under AGPL3 --> @@ -20,7 +20,9 @@ <link href="signals.html" rel="prev" title="signals"> <style type="text/css"> <!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} div.example {margin-left: 3.2em} +span:hover a.copiable-link {visibility: visible} --> </style> @@ -34,7 +36,7 @@ div.example {margin-left: 3.2em} Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previous: <a href="signals.html" accesskey="p" rel="prev">Signal flags</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> </div> <hr> -<h2 class="chapter" id="Instructions">5 Instructions</h2> +<h2 class="chapter" id="Instructions"><span>5 Instructions<a class="copiable-link" href="#Instructions"> &para;</a></span></h2> <ul class="mini-toc"> @@ -43,7 +45,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou <li><a href="#Batch-instructions" accesskey="3">Batch instructions</a></li> </ul> <div class="section-level-extent" id="Data-types"> -<h3 class="section">5.1 Data types</h3> +<h3 class="section"><span>5.1 Data types<a class="copiable-link" href="#Data-types"> &para;</a></span></h3> <a class="anchor" id="node_005ftype"></a><ul class="mini-toc"> @@ -56,7 +58,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou <li><a href="#matchmode" accesskey="7">matchmode</a></li> </ul> <div class="subsection-level-extent" id="node"> -<h4 class="subsection">5.1.1 node</h4> +<h4 class="subsection"><span>5.1.1 node<a class="copiable-link" href="#node"> &para;</a></span></h4> <p>A node name is a string. </p> @@ -67,7 +69,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou <li><a href="#Special-node" accesskey="2">Special node</a></li> </ul> <div class="subsubsection-level-extent" id="Regular-node"> -<h4 class="subsubsection">5.1.1.1 Regular node</h4> +<h4 class="subsubsection"><span>5.1.1.1 Regular node<a class="copiable-link" href="#Regular-node"> &para;</a></span></h4> <p>Must be one or more characters long. </p> @@ -78,7 +80,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou </div> <div class="subsubsection-level-extent" id="Special-node"> -<h4 class="subsubsection">5.1.1.2 Special node</h4> +<h4 class="subsubsection"><span>5.1.1.2 Special node<a class="copiable-link" href="#Special-node"> &para;</a></span></h4> <p>Special node names are a single character. </p> @@ -88,21 +90,21 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou </div> </div> <div class="subsection-level-extent" id="label"> -<h4 class="subsection">5.1.2 label</h4> +<h4 class="subsection"><span>5.1.2 label<a class="copiable-link" href="#label"> &para;</a></span></h4> <p>Same rules as for <a class="ref" href="#symbol_005ftype">symbol</a>. </p> </div> <div class="subsection-level-extent" id="size"> -<h4 class="subsection">5.1.3 size</h4> +<h4 class="subsection"><span>5.1.3 size<a class="copiable-link" href="#size"> &para;</a></span></h4> <p>Numerical value of any size. </p> </div> <div class="subsection-level-extent" id="selector"> -<h4 class="subsection">5.1.4 selector</h4> +<h4 class="subsection"><span>5.1.4 selector<a class="copiable-link" href="#selector"> &para;</a></span></h4> <p>The selector <code class="code">*</code> is used to catch any input. </p> @@ -111,21 +113,21 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou <a class="anchor" id="symbol_005ftype"></a></div> <div class="subsection-level-extent" id="symbol"> -<h4 class="subsection">5.1.5 symbol</h4> +<h4 class="subsection"><span>5.1.5 symbol<a class="copiable-link" href="#symbol"> &para;</a></span></h4> <p>Same rules as for <a class="ref" href="#node_005ftype">regular node names</a>. </p> </div> <div class="subsection-level-extent" id="signal"> -<h4 class="subsection">5.1.6 signal</h4> +<h4 class="subsection"><span>5.1.6 signal<a class="copiable-link" href="#signal"> &para;</a></span></h4> <p>Numerical value of any size. </p> </div> <div class="subsection-level-extent" id="matchmode"> -<h4 class="subsection">5.1.7 matchmode</h4> +<h4 class="subsection"><span>5.1.7 matchmode<a class="copiable-link" href="#matchmode"> &para;</a></span></h4> <p>Binary numeric value, 0 or 1. </p> @@ -133,7 +135,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou </div> </div> <div class="section-level-extent" id="Instruction-list"> -<h3 class="section">5.2 Instruction list</h3> +<h3 class="section"><span>5.2 Instruction list<a class="copiable-link" href="#Instruction-list"> &para;</a></span></h3> <ul class="mini-toc"> <li><a href="#CATCH-_003cnode_003e-_003csignal_003e-_003cmatchmode_003e" accesskey="1">CATCH &lt;node&gt; &lt;signal&gt; &lt;matchmode&gt;</a></li> @@ -150,20 +152,20 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou <li><a href="#RELOAD-_003csymbol_003e">RELOAD &lt;symbol&gt;</a></li> </ul> <div class="subsection-level-extent" id="CATCH-_003cnode_003e-_003csignal_003e-_003cmatchmode_003e"> -<h4 class="subsection">5.2.1 CATCH &lt;node&gt; &lt;signal&gt; &lt;matchmode&gt;</h4> +<h4 class="subsection"><span>5.2.1 CATCH &lt;node&gt; &lt;signal&gt; &lt;matchmode&gt;<a class="copiable-link" href="#CATCH-_003cnode_003e-_003csignal_003e-_003cmatchmode_003e"> &para;</a></span></h4> <p>Control flow using signal checking. </p> <p>If <code class="code">matchmode</code> is 1, then jump to <code class="code">node</code> if <code class="code">signal</code> is <em class="emph">set</em>. </p> -<p>If <code class="code">matchmode</code> is 0, then jump to <code class="code">node</code> if <code class="code">signal</code> is <em class="emph">no set</em>. +<p>If <code class="code">matchmode</code> is 0, then jump to <code class="code">node</code> if <code class="code">signal</code> is <em class="emph">not set</em>. </p> <p>Existing bytecode in buffer is cleared before the jump. </p> </div> <div class="subsection-level-extent" id="CROAK-_003csignal_003e-_003cmatchmode_003e"> -<h4 class="subsection">5.2.2 CROAK &lt;signal&gt; &lt;matchmode&gt;</h4> +<h4 class="subsection"><span>5.2.2 CROAK &lt;signal&gt; &lt;matchmode&gt;<a class="copiable-link" href="#CROAK-_003csignal_003e-_003cmatchmode_003e"> &para;</a></span></h4> <p>Clear state and restart execution from top if signal is matched. </p> @@ -171,7 +173,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou </p> </div> <div class="subsection-level-extent" id="HALT"> -<h4 class="subsection">5.2.3 HALT</h4> +<h4 class="subsection"><span>5.2.3 HALT<a class="copiable-link" href="#HALT"> &para;</a></span></h4> <p>Halt execution and yield control to client. </p> @@ -180,7 +182,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou </div> <div class="subsection-level-extent" id="INCMP-_003cnode_003e-_003cselector_003e"> -<h4 class="subsection">5.2.4 INCMP &lt;node&gt; &lt;selector&gt;</h4> +<h4 class="subsection"><span>5.2.4 INCMP &lt;node&gt; &lt;selector&gt;<a class="copiable-link" href="#INCMP-_003cnode_003e-_003cselector_003e"> &para;</a></span></h4> <p>Compare registered input to <code class="code">selector</code>. </p> @@ -191,23 +193,25 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou </div> <div class="subsection-level-extent" id="LOAD-_003csymbol_003e-_003csize_003e"> -<h4 class="subsection">5.2.5 LOAD &lt;symbol&gt; &lt;size&gt;</h4> +<h4 class="subsection"><span>5.2.5 LOAD &lt;symbol&gt; &lt;size&gt;<a class="copiable-link" href="#LOAD-_003csymbol_003e-_003csize_003e"> &para;</a></span></h4> <p>Execute the code symbol <code class="code">symbol</code> and cache the result. </p> <p>Result must be constrained to the given <code class="code">size</code>. </p> +<p>This is a noop if symbol has already been loaded in the current scope. +</p> </div> <div class="subsection-level-extent" id="MAP-_003csymbol_003e"> -<h4 class="subsection">5.2.6 MAP &lt;symbol&gt;</h4> +<h4 class="subsection"><span>5.2.6 MAP &lt;symbol&gt;<a class="copiable-link" href="#MAP-_003csymbol_003e"> &para;</a></span></h4> <p>Expose result from <code class="code">symbol</code> previously loaded by <code class="code">LOAD</code> to the renderer. </p> </div> <div class="subsection-level-extent" id="MNEXT-_003clabel_003e-_003cselector_003e"> -<h4 class="subsection">5.2.7 MNEXT &lt;label&gt; &lt;selector&gt;</h4> +<h4 class="subsection"><span>5.2.7 MNEXT &lt;label&gt; &lt;selector&gt;<a class="copiable-link" href="#MNEXT-_003clabel_003e-_003cselector_003e"> &para;</a></span></h4> <p>Activate the &quot;next&quot; part of lateral navigation. </p> @@ -216,7 +220,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou </div> <div class="subsection-level-extent" id="MOUT-_003clabel_003e-_003cselector_003e"> -<h4 class="subsection">5.2.8 MOUT &lt;label&gt; &lt;selector&gt;</h4> +<h4 class="subsection"><span>5.2.8 MOUT &lt;label&gt; &lt;selector&gt;<a class="copiable-link" href="#MOUT-_003clabel_003e-_003cselector_003e"> &para;</a></span></h4> <p>Add menu entry. </p> @@ -227,7 +231,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou </div> <div class="subsection-level-extent" id="MOVE-_003cnode_003e"> -<h4 class="subsection">5.2.9 MOVE &lt;node&gt;</h4> +<h4 class="subsection"><span>5.2.9 MOVE &lt;node&gt;<a class="copiable-link" href="#MOVE-_003cnode_003e"> &para;</a></span></h4> <p>Load bytecode and template corresponding to <code class="code">node</code>. </p> @@ -238,7 +242,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou </div> <div class="subsection-level-extent" id="MPREV-_003clabel_003e-_003cselector_003e"> -<h4 class="subsection">5.2.10 MPREV &lt;label&gt; &lt;selector&gt;</h4> +<h4 class="subsection"><span>5.2.10 MPREV &lt;label&gt; &lt;selector&gt;<a class="copiable-link" href="#MPREV-_003clabel_003e-_003cselector_003e"> &para;</a></span></h4> <p>Activate the &quot;previous&quot; part of lateral navigation. </p> @@ -247,7 +251,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou </div> <div class="subsection-level-extent" id="MSINK"> -<h4 class="subsection">5.2.11 MSINK</h4> +<h4 class="subsection"><span>5.2.11 MSINK<a class="copiable-link" href="#MSINK"> &para;</a></span></h4> <p>If set, the menu is defined as the multi-page content sink. </p> @@ -256,7 +260,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou </div> <div class="subsection-level-extent" id="RELOAD-_003csymbol_003e"> -<h4 class="subsection">5.2.12 RELOAD &lt;symbol&gt;</h4> +<h4 class="subsection"><span>5.2.12 RELOAD &lt;symbol&gt;<a class="copiable-link" href="#RELOAD-_003csymbol_003e"> &para;</a></span></h4> <p>Execute a code symbol already loaded by <code class="code">LOAD</code> and overwrite the existing cache with the new results. </p> @@ -267,7 +271,7 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou </div> </div> <div class="section-level-extent" id="Batch-instructions"> -<h3 class="section">5.3 Batch instructions</h3> +<h3 class="section"><span>5.3 Batch instructions<a class="copiable-link" href="#Batch-instructions"> &para;</a></span></h3> <p>Some convenience instructions are made available for defining menus. </p> @@ -293,42 +297,42 @@ Next: <a href="navigation.html" accesskey="n" rel="next">Navigation</a>, Previou <li><a href="#Batch-menu-expansion" accesskey="1">Batch menu expansion</a></li> </ul> <div class="subsection-level-extent" id="Batch-menu-expansion"> -<h4 class="subsection">5.3.1 Batch menu expansion</h4> +<h4 class="subsection"><span>5.3.1 Batch menu expansion<a class="copiable-link" href="#Batch-menu-expansion"> &para;</a></span></h4> <table class="multitable"> -<thead><tr><th>Batch instruction</th><th>Expanded instruction</th></tr></thead> -<tbody><tr><td><div class="example"> +<thead><tr><th width="50%">Batch instruction</th><th width="50%">Expanded instruction</th></tr></thead> +<tbody><tr><td width="50%"><div class="example"> <pre class="example-preformatted">DOWN foo 0 to_foo -</pre></div></td><td><div class="example"> +</pre></div></td><td width="50%"><div class="example"> <pre class="example-preformatted">MOUT to_foo 0 HALT INCMP foo 0 </pre></div></td></tr> -<tr><td><div class="example"> +<tr><td width="50%"><div class="example"> <pre class="example-preformatted">UP 1 back -</pre></div></td><td><div class="example"> +</pre></div></td><td width="50%"><div class="example"> <pre class="example-preformatted">MOUT back 1 HALT INCMP _ 1 </pre></div></td></tr> -<tr><td><div class="example"> +<tr><td width="50%"><div class="example"> <pre class="example-preformatted">NEXT 2 fwd -</pre></div></td><td><div class="example"> +</pre></div></td><td width="50%"><div class="example"> <pre class="example-preformatted">MNEXT fwd 2 HALT INCMP &gt; 2 </pre></div></td></tr> -<tr><td><div class="example"> +<tr><td width="50%"><div class="example"> <pre class="example-preformatted">PREVIOUS 3 back -</pre></div></td><td><div class="example"> +</pre></div></td><td width="50%"><div class="example"> <pre class="example-preformatted">MPREV back 3 HALT INCMP &lt; 3 </pre></div></td></tr> -<tr><td><div class="example"> +<tr><td width="50%"><div class="example"> <pre class="example-preformatted">DOWN foo 0 to_foo UP 1 back -</pre></div></td><td><div class="example"> +</pre></div></td><td width="50%"><div class="example"> <pre class="example-preformatted">MOUT to_foo 0 MOUT back 1 HALT diff --git a/doc/build/language.html b/doc/build/language.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Released 2023 under AGPL3 --> @@ -18,6 +18,12 @@ <link href="index.html" rel="up" title="Top"> <link href="cookbook.html" rel="next" title="cookbook"> <link href="render.html" rel="prev" title="render"> +<style type="text/css"> +<!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} +span:hover a.copiable-link {visibility: visible} +--> +</style> </head> @@ -29,7 +35,7 @@ Next: <a href="cookbook.html" accesskey="n" rel="next">Common patterns</a>, Previous: <a href="render.html" accesskey="p" rel="prev">Rendering</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> </div> <hr> -<h2 class="chapter" id="Handling-languages">9 Handling languages</h2> +<h2 class="chapter" id="Handling-languages"><span>9 Handling languages<a class="copiable-link" href="#Handling-languages"> &para;</a></span></h2> <p>Templates, external code symbols and menu labels can be resolved differently depending on language. @@ -43,7 +49,7 @@ Next: <a href="cookbook.html" accesskey="n" rel="next">Common patterns</a>, Prev <li><a href="#Defining-language" accesskey="1">Defining language</a></li> </ul> <div class="section-level-extent" id="Defining-language"> -<h3 class="section">9.1 Defining language</h3> +<h3 class="section"><span>9.1 Defining language<a class="copiable-link" href="#Defining-language"> &para;</a></span></h3> <p>The default language can be set in <code class="code">engine.Config.Language</code>. </p> diff --git a/doc/build/lateral_005fnavigation.html b/doc/build/lateral_005fnavigation.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/load_005fhandler.html b/doc/build/load_005fhandler.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/long_005fvalues.html b/doc/build/long_005fvalues.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/map_005fsink.html b/doc/build/map_005fsink.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/multiple_005fmenus.html b/doc/build/multiple_005fmenus.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/multiple_005fpages.html b/doc/build/multiple_005fpages.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/navigation.html b/doc/build/navigation.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Released 2023 under AGPL3 --> @@ -20,6 +20,8 @@ <link href="instructions.html" rel="prev" title="instructions"> <style type="text/css"> <!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} +span:hover a.copiable-link {visibility: visible} ul.mark-bullet {list-style-type: disc} --> </style> @@ -34,7 +36,7 @@ ul.mark-bullet {list-style-type: disc} Next: <a href="cache.html" accesskey="n" rel="next">External data</a>, Previous: <a href="instructions.html" accesskey="p" rel="prev">Instructions</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> </div> <hr> -<h2 class="chapter" id="Navigation">6 Navigation</h2> +<h2 class="chapter" id="Navigation"><span>6 Navigation<a class="copiable-link" href="#Navigation"> &para;</a></span></h2> <p>Nodes are navigated by name, using a navigation stack. @@ -51,7 +53,7 @@ Next: <a href="cache.html" accesskey="n" rel="next">External data</a>, Previous: <li><a href="#Navigation-stack" accesskey="4">Navigation stack</a></li> </ul> <div class="section-level-extent" id="Entry-point"> -<h3 class="section">6.1 Entry point</h3> +<h3 class="section"><span>6.1 Entry point<a class="copiable-link" href="#Entry-point"> &para;</a></span></h3> <p>All VM executions require an <em class="emph">entry point</em>. </p> @@ -62,7 +64,7 @@ Next: <a href="cache.html" accesskey="n" rel="next">External data</a>, Previous: <a class="anchor" id="lateral_005fnavigation"></a></div> <div class="section-level-extent" id="Lateral-navigation"> -<h3 class="section">6.2 Lateral navigation</h3> +<h3 class="section"><span>6.2 Lateral navigation<a class="copiable-link" href="#Lateral-navigation"> &para;</a></span></h3> <p>Lateral navigation is only available for node output spanning multiple pages. See <a class="ref" href="render.html#render_005fmulti">Multi-page rendering</a> for details. </p> @@ -77,7 +79,7 @@ Next: <a href="cache.html" accesskey="n" rel="next">External data</a>, Previous: <a class="anchor" id="node_005fnames"></a></div> <div class="section-level-extent" id="Node-names"> -<h3 class="section">6.3 Node names</h3> +<h3 class="section"><span>6.3 Node names<a class="copiable-link" href="#Node-names"> &para;</a></span></h3> <p>Regular node names <em class="emph">must</em> start with an alphabetical character. The rest of the string may contain alphanumeric characters and underscore. </p> @@ -86,7 +88,7 @@ Next: <a href="cache.html" accesskey="n" rel="next">External data</a>, Previous: <li><a href="#Builtin-node-names" accesskey="2">Builtin node names</a></li> </ul> <div class="subsection-level-extent" id="Special-node-names"> -<h4 class="subsection">6.3.1 Special node names</h4> +<h4 class="subsection"><span>6.3.1 Special node names<a class="copiable-link" href="#Special-node-names"> &para;</a></span></h4> <p>A selection of special node names are available for relative navigation. They are single-character tokens, listed below with their respective ASCII codes. </p> @@ -111,7 +113,7 @@ Next: <a href="cache.html" accesskey="n" rel="next">External data</a>, Previous: </div> <div class="subsection-level-extent" id="Builtin-node-names"> -<h4 class="subsection">6.3.2 Builtin node names</h4> +<h4 class="subsection"><span>6.3.2 Builtin node names<a class="copiable-link" href="#Builtin-node-names"> &para;</a></span></h4> <p>Uncaught exceptions in the code flow that should not halt execution are routed to a builtin node named <code class="code">_catch</code>. </p> @@ -119,22 +121,22 @@ Next: <a href="cache.html" accesskey="n" rel="next">External data</a>, Previous: </div> </div> <div class="section-level-extent" id="Navigation-stack"> -<h3 class="section">6.4 Navigation stack</h3> +<h3 class="section"><span>6.4 Navigation stack<a class="copiable-link" href="#Navigation-stack"> &para;</a></span></h3> <p>Consider the following navigation example, illustrating the state of the stack for each step after execution. </p> <table class="multitable"> -<thead><tr><th>instruction</th><th>stack</th><th>page index</th></tr></thead> -<tbody><tr><td><code class="code">MOVE foo</code></td><td>foo</td><td>0</td></tr> -<tr><td><code class="code">MOVE bar</code></td><td>foo/bar</td><td>0</td></tr> -<tr><td><code class="code">MOVE baz</code></td><td>foo/bar/baz</td><td>0</td></tr> -<tr><td><code class="code">MOVE &gt;</code></td><td>foo/bar/baz</td><td>1</td></tr> -<tr><td><code class="code">MOVE &gt;</code></td><td>foo/bar/baz</td><td>2</td></tr> -<tr><td><code class="code">MOVE &lt;</code></td><td>foo/bar/baz</td><td>1</td></tr> -<tr><td><code class="code">MOVE .</code></td><td>foo/bar/baz</td><td>1</td></tr> -<tr><td><code class="code">MOVE _</code></td><td>foo/bar</td><td>0</td></tr> -<tr><td><code class="code">MOVE baz</code></td><td>foo/bar/baz</td><td>0</td></tr> -<tr><td><code class="code">MOVE ^</code></td><td>foo</td><td>0</td></tr> +<thead><tr><th width="25%">instruction</th><th width="65%">stack</th><th width="10%">page index</th></tr></thead> +<tbody><tr><td width="25%"><code class="code">MOVE foo</code></td><td width="65%">foo</td><td width="10%">0</td></tr> +<tr><td width="25%"><code class="code">MOVE bar</code></td><td width="65%">foo/bar</td><td width="10%">0</td></tr> +<tr><td width="25%"><code class="code">MOVE baz</code></td><td width="65%">foo/bar/baz</td><td width="10%">0</td></tr> +<tr><td width="25%"><code class="code">MOVE &gt;</code></td><td width="65%">foo/bar/baz</td><td width="10%">1</td></tr> +<tr><td width="25%"><code class="code">MOVE &gt;</code></td><td width="65%">foo/bar/baz</td><td width="10%">2</td></tr> +<tr><td width="25%"><code class="code">MOVE &lt;</code></td><td width="65%">foo/bar/baz</td><td width="10%">1</td></tr> +<tr><td width="25%"><code class="code">MOVE .</code></td><td width="65%">foo/bar/baz</td><td width="10%">1</td></tr> +<tr><td width="25%"><code class="code">MOVE _</code></td><td width="65%">foo/bar</td><td width="10%">0</td></tr> +<tr><td width="25%"><code class="code">MOVE baz</code></td><td width="65%">foo/bar/baz</td><td width="10%">0</td></tr> +<tr><td width="25%"><code class="code">MOVE ^</code></td><td width="65%">foo</td><td width="10%">0</td></tr> </tbody> </table> diff --git a/doc/build/node_005fnames.html b/doc/build/node_005fnames.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/node_005ftype.html b/doc/build/node_005ftype.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/nomenclature.html b/doc/build/nomenclature.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Released 2023 under AGPL3 --> @@ -18,6 +18,12 @@ <link href="index.html" rel="up" title="Top"> <link href="signals.html" rel="next" title="signals"> <link href="sim.html" rel="prev" title="sim"> +<style type="text/css"> +<!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} +span:hover a.copiable-link {visibility: visible} +--> +</style> </head> @@ -29,14 +35,14 @@ Next: <a href="signals.html" accesskey="n" rel="next">Signal flags</a>, Previous: <a href="sim.html" accesskey="p" rel="prev">An example vise implementation</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> </div> <hr> -<h2 class="chapter" id="Nomenclature">3 Nomenclature</h2> +<h2 class="chapter" id="Nomenclature"><span>3 Nomenclature<a class="copiable-link" href="#Nomenclature"> &para;</a></span></h2> <ul class="mini-toc"> <li><a href="#Common" accesskey="1">Common</a></li> <li><a href="#Instructions-and-navigation" accesskey="2">Instructions and navigation</a></li> </ul> <div class="section-level-extent" id="Common"> -<h3 class="section">3.1 Common</h3> +<h3 class="section"><span>3.1 Common<a class="copiable-link" href="#Common"> &para;</a></span></h3> <dl class="table"> <dt>&lsquo;<samp class="samp">client</samp>&rsquo;</dt> @@ -47,7 +53,7 @@ Next: <a href="signals.html" accesskey="n" rel="next">Signal flags</a>, Previous </div> <div class="section-level-extent" id="Instructions-and-navigation"> -<h3 class="section">3.2 Instructions and navigation</h3> +<h3 class="section"><span>3.2 Instructions and navigation<a class="copiable-link" href="#Instructions-and-navigation"> &para;</a></span></h3> <dl class="table"> <dt>&lsquo;<samp class="samp">node</samp>&rsquo;</dt> diff --git a/doc/build/overview.html b/doc/build/overview.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Released 2023 under AGPL3 --> @@ -20,6 +20,8 @@ <link href="index.html" rel="prev" title="Top"> <style type="text/css"> <!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} +span:hover a.copiable-link {visibility: visible} ul.mark-bullet {list-style-type: disc} --> </style> @@ -34,7 +36,7 @@ ul.mark-bullet {list-style-type: disc} Next: <a href="sim.html" accesskey="n" rel="next">An example vise implementation</a>, Previous: <a href="index.html" accesskey="p" rel="prev">Introduction</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> </div> <hr> -<h2 class="chapter" id="Overview">1 Overview</h2> +<h2 class="chapter" id="Overview"><span>1 Overview<a class="copiable-link" href="#Overview"> &para;</a></span></h2> <p><code class="code">vise</code> is a virtual machine specialized for generating output for clients that have strict output size constaints. </p> @@ -44,7 +46,7 @@ Next: <a href="sim.html" accesskey="n" rel="next">An example vise implementation <li><a href="#Features" accesskey="1">Features</a></li> </ul> <div class="section-level-extent" id="Features"> -<h3 class="section">1.1 Features</h3> +<h3 class="section"><span>1.1 Features<a class="copiable-link" href="#Features"> &para;</a></span></h3> <ul class="itemize mark-bullet"> <li>Define and enforce max output size for every individual output. diff --git a/doc/build/render.html b/doc/build/render.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Released 2023 under AGPL3 --> @@ -20,7 +20,9 @@ <link href="cache.html" rel="prev" title="cache"> <style type="text/css"> <!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} div.example {margin-left: 3.2em} +span:hover a.copiable-link {visibility: visible} --> </style> @@ -34,7 +36,7 @@ div.example {margin-left: 3.2em} Next: <a href="language.html" accesskey="n" rel="next">Handling languages</a>, Previous: <a href="cache.html" accesskey="p" rel="prev">External data</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> </div> <hr> -<h2 class="chapter" id="Rendering">8 Rendering</h2> +<h2 class="chapter" id="Rendering"><span>8 Rendering<a class="copiable-link" href="#Rendering"> &para;</a></span></h2> <p>Every node whose bytecode includes a <code class="code">HALT</code> statement <strong class="strong">MUST</strong> define a rendering template. </p> @@ -47,7 +49,7 @@ Next: <a href="language.html" accesskey="n" rel="next">Handling languages</a>, P <li><a href="#Multiple_002dpage-rendering" accesskey="3">Multiple-page rendering</a></li> </ul> <div class="section-level-extent" id="Dynamic-templates"> -<h3 class="section">8.1 Dynamic templates</h3> +<h3 class="section"><span>8.1 Dynamic templates<a class="copiable-link" href="#Dynamic-templates"> &para;</a></span></h3> <p>Using placeholders, the content behind <code class="code">MAP</code> calls in the current executing node may be embedded in the template. </p> @@ -61,7 +63,7 @@ Next: <a href="language.html" accesskey="n" rel="next">Handling languages</a>, P <li><a href="#Examples" accesskey="1">Examples</a></li> </ul> <div class="subsection-level-extent" id="Examples"> -<h4 class="subsection">8.1.1 Examples</h4> +<h4 class="subsection"><span>8.1.1 Examples<a class="copiable-link" href="#Examples"> &para;</a></span></h4> <p>Consider the following instruction sequence: </p> @@ -113,7 +115,7 @@ HALT </div> </div> <div class="section-level-extent" id="Rendering-pipeline"> -<h3 class="section">8.2 Rendering pipeline</h3> +<h3 class="section"><span>8.2 Rendering pipeline<a class="copiable-link" href="#Rendering-pipeline"> &para;</a></span></h3> <p>The pipeline starts with the loading of the template corresponding to the current execution node. </p> @@ -134,7 +136,7 @@ HALT <li><a href="#Menu-sink" accesskey="3">Menu sink</a></li> </ul> <div class="subsection-level-extent" id="No-sink"> -<h4 class="subsection">8.2.1 No sink</h4> +<h4 class="subsection"><span>8.2.1 No sink<a class="copiable-link" href="#No-sink"> &para;</a></span></h4> <ol class="enumerate"> <li> Expand all placeholders in the template. @@ -144,7 +146,7 @@ HALT <a class="anchor" id="map_005fsink"></a></div> <div class="subsection-level-extent" id="MAP-sink"> -<h4 class="subsection">8.2.2 MAP sink</h4> +<h4 class="subsection"><span>8.2.2 MAP sink<a class="copiable-link" href="#MAP-sink"> &para;</a></span></h4> <ol class="enumerate"> <li> Expand all non-sink placeholders in the template. @@ -161,7 +163,7 @@ HALT </div> <div class="subsection-level-extent" id="Menu-sink"> -<h4 class="subsection">8.2.3 Menu sink</h4> +<h4 class="subsection"><span>8.2.3 Menu sink<a class="copiable-link" href="#Menu-sink"> &para;</a></span></h4> <ol class="enumerate"> <li> Remove all menu items (any following menu expansion will only contain lateral navigation items, when and if they apply). @@ -173,7 +175,7 @@ HALT <a class="anchor" id="render_005fmulti"></a></div> </div> <div class="section-level-extent" id="Multiple_002dpage-rendering"> -<h3 class="section">8.3 Multiple-page rendering</h3> +<h3 class="section"><span>8.3 Multiple-page rendering<a class="copiable-link" href="#Multiple_002dpage-rendering"> &para;</a></span></h3> <p>As indicated above, multiple-page rendering is activated when a <code class="code">MAP</code> is issued to a symbol that is loaded with <code class="code">0</code> size. (<code class="code">LOAD &lt;symbol&gt; 0</code>). </p> @@ -185,7 +187,7 @@ HALT <li><a href="#Multi_002dpage-example" accesskey="2">Multi-page example</a></li> </ul> <div class="subsection-level-extent" id="Missing-navigation"> -<h4 class="subsection">8.3.1 Missing navigation</h4> +<h4 class="subsection"><span>8.3.1 Missing navigation<a class="copiable-link" href="#Missing-navigation"> &para;</a></span></h4> <p>If no <em class="emph">lateral navigation</em> has been activated, any sinks will still be processed. </p> @@ -194,7 +196,7 @@ HALT </div> <div class="subsection-level-extent" id="Multi_002dpage-example"> -<h4 class="subsection">8.3.2 Multi-page example</h4> +<h4 class="subsection"><span>8.3.2 Multi-page example<a class="copiable-link" href="#Multi_002dpage-example"> &para;</a></span></h4> <p>Consider the following instruction sequence: </p> @@ -227,15 +229,15 @@ INCMP &lt; 22 <li><a href="#Rendering-logic" accesskey="2">Rendering logic</a></li> </ul> <div class="subsubsection-level-extent" id="Data-accounting"> -<h4 class="subsubsection">8.3.2.1 Data accounting</h4> +<h4 class="subsubsection"><span>8.3.2.1 Data accounting<a class="copiable-link" href="#Data-accounting"> &para;</a></span></h4> <p>Then consider that the symbols resolve as follows: </p> <table class="multitable"> -<thead><tr><th>symbol</th><th>returned value</th><th>rendered value</th><th>bytes</th></tr></thead> -<tbody><tr><td><code class="code">foo</code></td><td><code class="code">foobar</code></td><td><code class="code">foobar</code></td><td>6</td></tr> -<tr><td><code class="code">bar</code></td><td><code class="code">barbarbar</code></td><td><code class="code">barbarbar</code></td><td>9</td></tr> -<tr><td><code class="code">baz</code></td><td><pre class="verbatim">FOO 42 +<thead><tr><th width="10%">symbol</th><th width="25%">returned value</th><th width="50%">rendered value</th><th width="15%">bytes</th></tr></thead> +<tbody><tr><td width="10%"><code class="code">foo</code></td><td width="25%"><code class="code">foobar</code></td><td width="50%"><code class="code">foobar</code></td><td width="15%">6</td></tr> +<tr><td width="10%"><code class="code">bar</code></td><td width="25%"><code class="code">barbarbar</code></td><td width="50%"><code class="code">barbarbar</code></td><td width="15%">9</td></tr> +<tr><td width="10%"><code class="code">baz</code></td><td width="25%"><pre class="verbatim">FOO 42 BAR 13 BAZ 666 XYZZY 1984 @@ -243,29 +245,29 @@ INKY 1 PINKY 22 BLINKY 333 CLYDE 4444 -</pre></td><td>(deferred)</td><td>(71)</td></tr> -<tr><td><code class="code">to_foo</code></td><td><code class="code">go to foo</code></td><td><code class="code">0:go to foo</code></td><td>11</td></tr> -<tr><td><code class="code">to_bar</code></td><td><code class="code">visit the bar</code></td><td><code class="code">1:visit the bar</code></td><td>15</td></tr> -<tr><td><code class="code">to_next</code></td><td><code class="code">next page</code></td><td><code class="code">11:next page</code></td><td>12</td></tr> -<tr><td><code class="code">to_prev</code></td><td><code class="code">go back</code></td><td><code class="code">22:go back</code></td><td>10</td></tr> +</pre></td><td width="50%">(deferred)</td><td width="15%">(71)</td></tr> +<tr><td width="10%"><code class="code">to_foo</code></td><td width="25%"><code class="code">go to foo</code></td><td width="50%"><code class="code">0:go to foo</code></td><td width="15%">11</td></tr> +<tr><td width="10%"><code class="code">to_bar</code></td><td width="25%"><code class="code">visit the bar</code></td><td width="50%"><code class="code">1:visit the bar</code></td><td width="15%">15</td></tr> +<tr><td width="10%"><code class="code">to_next</code></td><td width="25%"><code class="code">next page</code></td><td width="50%"><code class="code">11:next page</code></td><td width="15%">12</td></tr> +<tr><td width="10%"><code class="code">to_prev</code></td><td width="25%"><code class="code">go back</code></td><td width="50%"><code class="code">22:go back</code></td><td width="15%">10</td></tr> </tbody> </table> <p>Given an output size limit of 94, static part of the template (14 bytes). this results in the following render possibilities for the sink content: </p> <table class="multitable"> -<thead><tr><th>navigation case</th><th>bytes left for sink</th></tr></thead> -<tbody><tr><td>no navigation</td><td>39</td></tr> -<tr><td>next</td><td>27</td></tr> -<tr><td>previous</td><td>29</td></tr> -<tr><td>next + previous</td><td>17</td></tr> +<thead><tr><th width="33%">navigation case</th><th width="33%">bytes left for sink</th></tr></thead> +<tbody><tr><td width="33%">no navigation</td><td width="33%">39</td></tr> +<tr><td width="33%">next</td><td width="33%">27</td></tr> +<tr><td width="33%">previous</td><td width="33%">29</td></tr> +<tr><td width="33%">next + previous</td><td width="33%">17</td></tr> </tbody> </table> </div> <div class="subsubsection-level-extent" id="Rendering-logic"> -<h4 class="subsubsection">8.3.2.2 Rendering logic</h4> +<h4 class="subsubsection"><span>8.3.2.2 Rendering logic<a class="copiable-link" href="#Rendering-logic"> &para;</a></span></h4> <p>The total sink byte count is 72, whereas the maximum available sink capacity is 39. At least one extra page is needed. </p> diff --git a/doc/build/render_005fmulti.html b/doc/build/render_005fmulti.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/build/signals.html b/doc/build/signals.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Released 2023 under AGPL3 --> @@ -18,6 +18,12 @@ <link href="index.html" rel="up" title="Top"> <link href="instructions.html" rel="next" title="instructions"> <link href="nomenclature.html" rel="prev" title="nomenclature"> +<style type="text/css"> +<!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} +span:hover a.copiable-link {visibility: visible} +--> +</style> </head> @@ -29,7 +35,7 @@ Next: <a href="instructions.html" accesskey="n" rel="next">Instructions</a>, Previous: <a href="nomenclature.html" accesskey="p" rel="prev">Nomenclature</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> </div> <hr> -<h2 class="chapter" id="Signal-flags">4 Signal flags</h2> +<h2 class="chapter" id="Signal-flags"><span>4 Signal flags<a class="copiable-link" href="#Signal-flags"> &para;</a></span></h2> <ul class="mini-toc"> @@ -37,7 +43,7 @@ Next: <a href="instructions.html" accesskey="n" rel="next">Instructions</a>, Pre <li><a href="#Built_002din-signal-flags" accesskey="2">Built-in signal flags</a></li> </ul> <div class="section-level-extent" id="Client_002ddefined-signal-flags"> -<h3 class="section">4.1 Client-defined signal flags</h3> +<h3 class="section"><span>4.1 Client-defined signal flags<a class="copiable-link" href="#Client_002ddefined-signal-flags"> &para;</a></span></h3> <p>The client can define any number of signal flags to use. The number of signals <strong class="strong">MUST</strong> be declared explicitly in the client code, and <strong class="strong">MUST NOT</strong> change in stateful or asynchronous execution environments. </p> @@ -48,7 +54,7 @@ Next: <a href="instructions.html" accesskey="n" rel="next">Instructions</a>, Pre <li><a href="#Flow-control" accesskey="1">Flow control</a></li> </ul> <div class="subsection-level-extent" id="Flow-control"> -<h4 class="subsection">4.1.1 Flow control</h4> +<h4 class="subsection"><span>4.1.1 Flow control<a class="copiable-link" href="#Flow-control"> &para;</a></span></h4> <p>Signal flags enables the client to control the execution flow as a side-effect of the execution of external code symbols. </p> @@ -60,7 +66,7 @@ Next: <a href="instructions.html" accesskey="n" rel="next">Instructions</a>, Pre <a class="anchor" id="builtin_005fflags"></a></div> </div> <div class="section-level-extent" id="Built_002din-signal-flags"> -<h3 class="section">4.2 Built-in signal flags</h3> +<h3 class="section"><span>4.2 Built-in signal flags<a class="copiable-link" href="#Built_002din-signal-flags"> &para;</a></span></h3> <p>For the numeric values of the signals, please refer to the signals appendix. </p> diff --git a/doc/build/sim.html b/doc/build/sim.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!-- Released 2023 under AGPL3 --> @@ -20,7 +20,9 @@ <link href="overview.html" rel="prev" title="overview"> <style type="text/css"> <!-- +a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em} div.example {margin-left: 3.2em} +span:hover a.copiable-link {visibility: visible} ul.mark-bullet {list-style-type: disc} --> </style> @@ -35,7 +37,7 @@ ul.mark-bullet {list-style-type: disc} Next: <a href="nomenclature.html" accesskey="n" rel="next">Nomenclature</a>, Previous: <a href="overview.html" accesskey="p" rel="prev">Overview</a>, Up: <a href="index.html" accesskey="u" rel="up">Introduction</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p> </div> <hr> -<h2 class="chapter" id="An-example-vise-implementation">2 An example vise implementation</h2> +<h2 class="chapter" id="An-example-vise-implementation"><span>2 An example vise implementation<a class="copiable-link" href="#An-example-vise-implementation"> &para;</a></span></h2> <p>Consider the following interaction: @@ -110,7 +112,7 @@ blah blah blah <li><a href="#Working-example" accesskey="5">Working example</a></li> </ul> <div class="section-level-extent" id="Templates"> -<h3 class="section">2.1 Templates</h3> +<h3 class="section"><span>2.1 Templates<a class="copiable-link" href="#Templates"> &para;</a></span></h3> <p>Each page has a template that may or may not contain dynamic elements. </p> @@ -123,28 +125,28 @@ blah blah blah <li><a href="#ouch" accesskey="4">ouch</a></li> </ul> <div class="subsection-level-extent" id="root"> -<h4 class="subsection">2.1.1 root</h4> +<h4 class="subsection"><span>2.1.1 root<a class="copiable-link" href="#root"> &para;</a></span></h4> <pre class="verbatim">This is the root page You have visited {{.count}}. </pre> </div> <div class="subsection-level-extent" id="foo"> -<h4 class="subsection">2.1.2 foo</h4> +<h4 class="subsection"><span>2.1.2 foo<a class="copiable-link" href="#foo"> &para;</a></span></h4> <pre class="verbatim">Welcome to page foo. Please write something. </pre> </div> <div class="subsection-level-extent" id="bar"> -<h4 class="subsection">2.1.3 bar</h4> +<h4 class="subsection"><span>2.1.3 bar<a class="copiable-link" href="#bar"> &para;</a></span></h4> <pre class="verbatim">Thanks for visiting foo and bar. You wrote &quot;{{.something}}&quot; in foo. </pre> </div> <div class="subsection-level-extent" id="ouch"> -<h4 class="subsection">2.1.4 ouch</h4> +<h4 class="subsection"><span>2.1.4 ouch<a class="copiable-link" href="#ouch"> &para;</a></span></h4> <pre class="verbatim">Please visit foo first. Any input to return. @@ -153,7 +155,7 @@ Any input to return. </div> </div> <div class="section-level-extent" id="Scripts"> -<h3 class="section">2.2 Scripts</h3> +<h3 class="section"><span>2.2 Scripts<a class="copiable-link" href="#Scripts"> &para;</a></span></h3> <p>The scripts are responsible for defining menus, handling navigation flow control, and triggering external code handlers. </p> @@ -164,7 +166,7 @@ Any input to return. <li><a href="#ouch-1" accesskey="4">ouch</a></li> </ul> <div class="subsection-level-extent" id="root-1"> -<h4 class="subsection">2.2.1 root</h4> +<h4 class="subsection"><span>2.2.1 root<a class="copiable-link" href="#root-1"> &para;</a></span></h4> <pre class="verbatim">LOAD count 8 # trigger external code handler &quot;count&quot; LOAD something 0 # trigger external code handler &quot;something&quot; @@ -178,7 +180,7 @@ INCMP bar 1 # match menu selection 1, move to node &quot;bar&quot; on match </pre> </div> <div class="subsection-level-extent" id="foo-1"> -<h4 class="subsection">2.2.2 foo</h4> +<h4 class="subsection"><span>2.2.2 foo<a class="copiable-link" href="#foo-1"> &para;</a></span></h4> <pre class="verbatim">HALT # render template and wait for input RELOAD something # pass input to the &quot;something&quot; external code handler. @@ -189,7 +191,7 @@ MOVE _ # move up one level </div> <div class="subsection-level-extent" id="bar-1"> -<h4 class="subsection">2.2.3 bar</h4> +<h4 class="subsection"><span>2.2.3 bar<a class="copiable-link" href="#bar-1"> &para;</a></span></h4> <pre class="verbatim">CATCH ouch 8 0 # if the &quot;HAVESOMETHING&quot; (8) flag has NOT (0) been set, move to &quot;ouch&quot; MNEXT next 11 # menu choice to display for advancing one page @@ -203,7 +205,7 @@ INCMP _ * # move to the root node on any input </div> <div class="subsection-level-extent" id="ouch-1"> -<h4 class="subsection">2.2.4 ouch</h4> +<h4 class="subsection"><span>2.2.4 ouch<a class="copiable-link" href="#ouch-1"> &para;</a></span></h4> <pre class="verbatim">HALT # render template and wait for input INCMP ^ * # move to the root node on any input @@ -212,7 +214,7 @@ INCMP ^ * # move to the root node on any input </div> </div> <div class="section-level-extent" id="External-code-handlers"> -<h3 class="section">2.3 External code handlers</h3> +<h3 class="section"><span>2.3 External code handlers<a class="copiable-link" href="#External-code-handlers"> &para;</a></span></h3> <p>The script code contains <code class="code">LOAD</code> instructions for two different methods. </p> @@ -279,7 +281,7 @@ func(c *introResource) something(ctx context.Context, sym string, input []byte) <a class="anchor" id="long_005fvalues"></a></div> <div class="section-level-extent" id="Handling-long-values"> -<h3 class="section">2.4 Handling long values</h3> +<h3 class="section"><span>2.4 Handling long values<a class="copiable-link" href="#Handling-long-values"> &para;</a></span></h3> <p>In the above example, the more times the <code class="code">foo</code> page is supplied with a value, the longer the vector of values that need to be displayed by the <code class="code">bar</code> page will be. </p> @@ -311,7 +313,7 @@ clyde </div> <div class="section-level-extent" id="Working-example"> -<h3 class="section">2.5 Working example</h3> +<h3 class="section"><span>2.5 Working example<a class="copiable-link" href="#Working-example"> &para;</a></span></h3> <p>In the source code repository, a full working example of this menu can be found in <samp class="file">examples/intro</samp>. </p> diff --git a/doc/build/symbol_005ftype.html b/doc/build/symbol_005ftype.html @@ -1,6 +1,6 @@ <!DOCTYPE html> <html> -<!-- Created by GNU Texinfo 7.0.2, https://www.gnu.org/software/texinfo/ --> +<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ --> <!-- This file redirects to the location of a node or anchor --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> diff --git a/doc/texinfo/instructions.texi b/doc/texinfo/instructions.texi @@ -69,7 +69,7 @@ Control flow using signal checking. If @code{matchmode} is 1, then jump to @code{node} if @code{signal} is @emph{set}. -If @code{matchmode} is 0, then jump to @code{node} if @code{signal} is @emph{no set}. +If @code{matchmode} is 0, then jump to @code{node} if @code{signal} is @emph{not set}. Existing bytecode in buffer is cleared before the jump. @@ -102,6 +102,8 @@ Execute the code symbol @code{symbol} and cache the result. Result must be constrained to the given @code{size}. +This is a noop if symbol has already been loaded in the current scope. + @subsection MAP <symbol> @@ -175,7 +177,7 @@ Activate and set @emph{previuos} menu option for browsing multiple-page renders. @subsection Batch menu expansion -@multitable .50 .50 +@multitable @columnfractions .50 .50 @headitem Batch instruction @tab Expanded instruction @item @example diff --git a/doc/texinfo/navigation.texi b/doc/texinfo/navigation.texi @@ -64,7 +64,7 @@ Uncaught exceptions in the code flow that should not halt execution are routed t Consider the following navigation example, illustrating the state of the stack for each step after execution. -@multitable .25 .65 .10 +@multitable @columnfractions .25 .65 .10 @headitem instruction @tab stack @tab page index diff --git a/doc/texinfo/render.texi b/doc/texinfo/render.texi @@ -165,7 +165,7 @@ This is {{.foo}} and {{.bar}} Then consider that the symbols resolve as follows: -@multitable .10 .25 .50 .15 +@multitable @columnfractions .10 .25 .50 .15 @headitem symbol @tab returned value @tab rendered value @@ -211,7 +211,7 @@ CLYDE 4444 Given an output size limit of 94, static part of the template (14 bytes). this results in the following render possibilities for the sink content: -@multitable .33 .33 .33 +@multitable @columnfractions .33 .33 .33 @headitem navigation case @tab bytes left for sink @item no navigation diff --git a/persist/fs.go b/persist/fs.go @@ -44,23 +44,23 @@ func(p *FsPersister) GetState() *state.State { return p.State } -// GetState implements the Persister interface. +// GetMemory implements the Persister interface. func(p *FsPersister) GetMemory() cache.Memory { return p.Memory } -// GetState implements the Persister interface. +// Serialize implements the Persister interface. func(p *FsPersister) Serialize() ([]byte, error) { return cbor.Marshal(p) } -// GetState implements the Persister interface. +// Deserialize implements the Persister interface. func(p *FsPersister) Deserialize(b []byte) error { err := cbor.Unmarshal(b, p) return err } -// GetState implements the Persister interface. +// Save implements the Persister interface. func(p *FsPersister) Save(key string) error { b, err := p.Serialize() if err != nil { @@ -71,7 +71,7 @@ func(p *FsPersister) Save(key string) error { return ioutil.WriteFile(fp, b, 0600) } -// GetState implements the Persister interface. +// Load implements the Persister interface. func(p *FsPersister) Load(key string) error { fp := path.Join(p.dir, key) b, err := ioutil.ReadFile(fp) diff --git a/resource/resource.go b/resource/resource.go @@ -82,7 +82,7 @@ func(m MenuResource) GetTemplate(ctx context.Context, sym string) (string, error return m.templateFunc(ctx, sym) } -// GetCode implements Resource interface +// GetMenu implements Resource interface func(m MenuResource) GetMenu(ctx context.Context, sym string) (string, error) { return m.menuFunc(ctx, sym) }