All tests pass, documentation regenerated, going for release.

This commit is contained in:
Simon Brooke 2023-04-10 13:30:04 +01:00
parent e5677a8300
commit 8c5727f5df
No known key found for this signature in database
GPG key ID: A7A4F18D1D4DF987
18 changed files with 752 additions and 500 deletions

File diff suppressed because one or more lines are too long

View file

@ -5,9 +5,9 @@
<p>See Appendix E, <code>OVERLORD - THE MONITOR</code>, and Appendix F, <code>LISP INPUT
AND OUTPUT</code>.</p>
<p>For our purposes, to save the current state of the Lisp system it should be sufficient to print the current contents of the oblist to file; and to restore a previous state from file, to overwrite the contents of the oblist with data from that file.</p>
<p>Hence functions SYSOUT and SYSIN, which do just that.</p></div></div><div class="public anchor" id="var-default-sysout"><h3>default-sysout</h3><div class="usage"></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/io.clj#L49">view source</a></div></div><div class="public anchor" id="var-resolve-subr"><h3>resolve-subr</h3><div class="usage"><code>(resolve-subr entry)</code></div><div class="doc"><div class="markdown"><p>If this oblist <code>entry</code> references a subroutine, attempt to fix up that reference.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/io.clj#L108">view source</a></div></div><div class="public anchor" id="var-safely-wrap-subr"><h3>safely-wrap-subr</h3><div class="usage"><code>(safely-wrap-subr entry)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/io.clj#L69">view source</a></div></div><div class="public anchor" id="var-safely-wrap-subrs"><h3>safely-wrap-subrs</h3><div class="usage"><code>(safely-wrap-subrs objects)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/io.clj#L80">view source</a></div></div><div class="public anchor" id="var-SYSIN"><h3>SYSIN</h3><div class="usage"><code>(SYSIN)</code><code>(SYSIN filename)</code></div><div class="doc"><div class="markdown"><p>Read the contents of the file at this <code>filename</code> into the object list. </p>
<p>Hence functions SYSOUT and SYSIN, which do just that.</p></div></div><div class="public anchor" id="var-default-sysout"><h3>default-sysout</h3><div class="usage"></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/io.clj#L49">view source</a></div></div><div class="public anchor" id="var-resolve-subr"><h3>resolve-subr</h3><div class="usage"><code>(resolve-subr entry)</code><code>(resolve-subr entry prop)</code></div><div class="doc"><div class="markdown"><p>If this oblist <code>entry</code> references a subroutine, attempt to fix up that reference.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/io.clj#L108">view source</a></div></div><div class="public anchor" id="var-safely-wrap-subr"><h3>safely-wrap-subr</h3><div class="usage"><code>(safely-wrap-subr entry)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/io.clj#L69">view source</a></div></div><div class="public anchor" id="var-safely-wrap-subrs"><h3>safely-wrap-subrs</h3><div class="usage"><code>(safely-wrap-subrs objects)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/io.clj#L80">view source</a></div></div><div class="public anchor" id="var-SYSIN"><h3>SYSIN</h3><div class="usage"><code>(SYSIN)</code><code>(SYSIN filename)</code></div><div class="doc"><div class="markdown"><p>Read the contents of the file at this <code>filename</code> into the object list. </p>
<p>If the file is not a valid Beowulf sysout file, this will probably corrupt the system, you have been warned. File paths will be considered relative to the filepath set when starting Lisp.</p>
<p>It is intended that sysout files can be read both from resources within the jar file, and from the file system. If a named file exists in both the file system and the resources, the file system will be preferred.</p>
<p><strong>NOTE THAT</strong> if the provided <code>filename</code> does not end with <code>.lsp</code> (which, if youre writing it from the Lisp REPL, it wont), the extension <code>.lsp</code> will be appended.</p>
<p><strong>NOTE THAT</strong> this is an extension function, not available in strct mode.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/io.clj#L137">view source</a></div></div><div class="public anchor" id="var-SYSOUT"><h3>SYSOUT</h3><div class="usage"><code>(SYSOUT)</code><code>(SYSOUT filepath)</code></div><div class="doc"><div class="markdown"><p>Dump the current content of the object list to file. If no <code>filepath</code> is specified, a file name will be constructed of the symbol <code>Sysout</code> and the current date. File paths will be considered relative to the filepath set when starting Lisp.</p>
<p><strong>NOTE THAT</strong> this is an extension function, not available in strct mode.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/io.clj#L140">view source</a></div></div><div class="public anchor" id="var-SYSOUT"><h3>SYSOUT</h3><div class="usage"><code>(SYSOUT)</code><code>(SYSOUT filepath)</code></div><div class="doc"><div class="markdown"><p>Dump the current content of the object list to file. If no <code>filepath</code> is specified, a file name will be constructed of the symbol <code>Sysout</code> and the current date. File paths will be considered relative to the filepath set when starting Lisp.</p>
<p><strong>NOTE THAT</strong> this is an extension function, not available in strct mode.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/io.clj#L84">view source</a></div></div></div></body></html>

View file

@ -21,4 +21,4 @@
T-&gt;ff[car[x]]]]] (COND ((ATOM X) X)
((QUOTE T)(FF (CAR X))))))
</code></pre>
<p><em>quote ends</em></p></div></div><div class="public anchor" id="var-gen-cond"><h3>gen-cond</h3><div class="usage"><code>(gen-cond p context)</code></div><div class="doc"><div class="markdown"><p>Generate a cond statement from this simplified parse tree fragment <code>p</code>; returns <code>nil</code> if <code>p</code> does not represent a (MEXPR) cond statement.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L99">view source</a></div></div><div class="public anchor" id="var-gen-cond-clause"><h3>gen-cond-clause</h3><div class="usage"><code>(gen-cond-clause p context)</code></div><div class="doc"><div class="markdown"><p>Generate a cond clause from this simplified parse tree fragment <code>p</code>; returns <code>nil</code> if <code>p</code> does not represent a cond clause.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L87">view source</a></div></div><div class="public anchor" id="var-gen-dot-terminated-list"><h3>gen-dot-terminated-list</h3><div class="usage"><code>(gen-dot-terminated-list p)</code></div><div class="doc"><div class="markdown"><p>Generate a list, which may be dot-terminated, from this partial parse tree p. Note that the function acts recursively and progressively decapitates its argument, so that the argument will not always be a valid parse tree.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L123">view source</a></div></div><div class="public anchor" id="var-gen-fn-call"><h3>gen-fn-call</h3><div class="usage"><code>(gen-fn-call p context)</code></div><div class="doc"><div class="markdown"><p>Generate a function call from this simplified parse tree fragment <code>p</code>; returns <code>nil</code> if <code>p</code> does not represent a (MEXPR) function call.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L112">view source</a></div></div><div class="public anchor" id="var-gen-iexpr"><h3>gen-iexpr</h3><div class="usage"><code>(gen-iexpr tree)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L161">view source</a></div></div><div class="public anchor" id="var-generate"><h3>generate</h3><div class="usage"><code>(generate p)</code><code>(generate p context)</code></div><div class="doc"><div class="markdown"><p>Generate lisp structure from this parse tree <code>p</code>. It is assumed that <code>p</code> has been simplified.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L199">view source</a></div></div><div class="public anchor" id="var-generate-assign"><h3>generate-assign</h3><div class="usage"><code>(generate-assign tree context)</code></div><div class="doc"><div class="markdown"><p>Generate an assignment statement based on this <code>tree</code>. If the thing being assigned to is a function signature, then we have to do something different to if its an atom.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L175">view source</a></div></div><div class="public anchor" id="var-generate-defn"><h3>generate-defn</h3><div class="usage"><code>(generate-defn tree context)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L149">view source</a></div></div><div class="public anchor" id="var-generate-set"><h3>generate-set</h3><div class="usage"><code>(generate-set tree context)</code></div><div class="doc"><div class="markdown"><p>Actually not sure what the mexpr representation of set looks like</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L170">view source</a></div></div><div class="public anchor" id="var-strip-leading-zeros"><h3>strip-leading-zeros</h3><div class="usage"><code>(strip-leading-zeros s)</code><code>(strip-leading-zeros s prefix)</code></div><div class="doc"><div class="markdown"><p><code>read-string</code> interprets strings with leading zeros as octal; strip any from this string <code>s</code>. If whats left is empty (i.e. there were only zeros, return <code>"0"</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L185">view source</a></div></div></div></body></html>
<p><em>quote ends</em></p></div></div><div class="public anchor" id="var-gen-cond"><h3>gen-cond</h3><div class="usage"><code>(gen-cond p context)</code></div><div class="doc"><div class="markdown"><p>Generate a cond statement from this simplified parse tree fragment <code>p</code>; returns <code>nil</code> if <code>p</code> does not represent a (MEXPR) cond statement.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L99">view source</a></div></div><div class="public anchor" id="var-gen-cond-clause"><h3>gen-cond-clause</h3><div class="usage"><code>(gen-cond-clause p context)</code></div><div class="doc"><div class="markdown"><p>Generate a cond clause from this simplified parse tree fragment <code>p</code>; returns <code>nil</code> if <code>p</code> does not represent a cond clause.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L87">view source</a></div></div><div class="public anchor" id="var-gen-dot-terminated-list"><h3>gen-dot-terminated-list</h3><div class="usage"><code>(gen-dot-terminated-list p)</code></div><div class="doc"><div class="markdown"><p>Generate a list, which may be dot-terminated, from this partial parse tree p. Note that the function acts recursively and progressively decapitates its argument, so that the argument will not always be a valid parse tree.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L123">view source</a></div></div><div class="public anchor" id="var-gen-fn-call"><h3>gen-fn-call</h3><div class="usage"><code>(gen-fn-call p context)</code></div><div class="doc"><div class="markdown"><p>Generate a function call from this simplified parse tree fragment <code>p</code>; returns <code>nil</code> if <code>p</code> does not represent a (MEXPR) function call.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L112">view source</a></div></div><div class="public anchor" id="var-gen-iexpr"><h3>gen-iexpr</h3><div class="usage"><code>(gen-iexpr tree context)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L162">view source</a></div></div><div class="public anchor" id="var-generate"><h3>generate</h3><div class="usage"><code>(generate p)</code><code>(generate p context)</code></div><div class="doc"><div class="markdown"><p>Generate lisp structure from this parse tree <code>p</code>. It is assumed that <code>p</code> has been simplified.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L200">view source</a></div></div><div class="public anchor" id="var-generate-assign"><h3>generate-assign</h3><div class="usage"><code>(generate-assign tree context)</code></div><div class="doc"><div class="markdown"><p>Generate an assignment statement based on this <code>tree</code>. If the thing being assigned to is a function signature, then we have to do something different to if its an atom.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L176">view source</a></div></div><div class="public anchor" id="var-generate-defn"><h3>generate-defn</h3><div class="usage"><code>(generate-defn tree context)</code></div><div class="doc"><div class="markdown"><p><strong>TODO</strong>: write docs</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L149">view source</a></div></div><div class="public anchor" id="var-generate-set"><h3>generate-set</h3><div class="usage"><code>(generate-set tree context)</code></div><div class="doc"><div class="markdown"><p>Actually not sure what the mexpr representation of set looks like</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L171">view source</a></div></div><div class="public anchor" id="var-strip-leading-zeros"><h3>strip-leading-zeros</h3><div class="usage"><code>(strip-leading-zeros s)</code><code>(strip-leading-zeros s prefix)</code></div><div class="doc"><div class="markdown"><p><code>read-string</code> interprets strings with leading zeros as octal; strip any from this string <code>s</code>. If whats left is empty (i.e. there were only zeros, return <code>"0"</code>.</p></div></div><div class="src-link"><a href="https://github.com/simon-brooke/beowulf/blob/master/src/beowulf/reader/generate.clj#L186">view source</a></div></div></div></body></html>

View file

@ -37,6 +37,10 @@ h2 {
font-size: 25px;
}
th, td {
vertical-align: top;
}
h5.license {
margin: 9px 0 22px 0;
color: lime;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff