Compare commits

...

10 commits

58 changed files with 11881 additions and 3899 deletions

View file

@ -1721,6 +1721,7 @@ represented in storage only once,
The following simple example has been included to illustrate the exact construction
of list structures. Two types of list structures are shown, and a function for deriving
one from the other is given in LISP.
We assume that we have a list of the form
n, = ((A B C) (D E F),... , (X Y z)),
@ -2709,7 +2710,9 @@ If `deflist` or `define` is used twice on the same object with the same indicato
The function attrib concatenates its two arguments by changing the last element of its first argument to point to the second argument. Thus it is commonly used to tack something onto the end of a property list. The value of attrib is the second argument.
For example
attrib[~~; (EXPR (LAMBDA (X) (COND ((ATOM X) X) (T (FF (CAR x))))))]
```
attrib[FF; (EXPR (LAMBDA (X) (COND ((ATOM X) X) (T (FF (CAR x))))))]
```
would put EXPR followed by the LAMBDA expression for FF onto the end of the prop-
erty list for FF.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -11,238 +11,394 @@
002    "Essentially, the `-main` function and the bootstrap read-eval-print loop."
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
003&nbsp;&nbsp;&nbsp;&nbsp;(:require&nbsp;[beowulf.bootstrap&nbsp;:refer&nbsp;[EVAL&nbsp;oblist&nbsp;*options*]]
003&nbsp;&nbsp;&nbsp;&nbsp;(:require&nbsp;[beowulf.bootstrap&nbsp;:refer&nbsp;[EVAL]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.read&nbsp;:refer&nbsp;[READ]]
004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.io&nbsp;:refer&nbsp;[default-sysout&nbsp;SYSIN]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.java.io&nbsp;:as&nbsp;io]
005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.oblist&nbsp;:refer&nbsp;[*options*&nbsp;NIL]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.pprint&nbsp;:refer&nbsp;[pprint]]
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.read&nbsp;:refer&nbsp;[READ&nbsp;read-from-console]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.tools.cli&nbsp;:refer&nbsp;[parse-opts]]
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.java.io&nbsp;:as&nbsp;io]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[environ.core&nbsp;:refer&nbsp;[env]])
008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.pprint&nbsp;:refer&nbsp;[pprint]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
009&nbsp;&nbsp;&nbsp;&nbsp;(:gen-class))
009&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.string&nbsp;:refer&nbsp;[trim]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.tools.cli&nbsp;:refer&nbsp;[parse-opts]])
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;&nbsp;&nbsp;(:gen-class))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
010&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
011&nbsp;&nbsp;(def&nbsp;cli-options
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
012&nbsp;&nbsp;&nbsp;&nbsp;[[&quot;-h&quot;&nbsp;&quot;--help&quot;]
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
013&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&quot;-p&nbsp;PROMPT&quot;&nbsp;&quot;--prompt&nbsp;PROMPT&quot;&nbsp;&quot;Set&nbsp;the&nbsp;REPL&nbsp;prompt&nbsp;to&nbsp;PROMPT&quot;
012&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
014&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:default&nbsp;&quot;Sprecan::&quot;]
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
015&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&quot;-r&nbsp;INITFILE&quot;&nbsp;&quot;--read&nbsp;INITFILE&quot;&nbsp;&quot;Read&nbsp;Lisp&nbsp;functions&nbsp;from&nbsp;the&nbsp;file&nbsp;INITFILE&quot;
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
016&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:validate&nbsp;[#(and
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
017&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(.exists&nbsp;(io&#x2F;file&nbsp;%))
013&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(.canRead&nbsp;(io&#x2F;file&nbsp;%)))
014&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Could&nbsp;not&nbsp;find&nbsp;initfile&quot;]]
015&nbsp;&nbsp;;;;&nbsp;Copyright&nbsp;(C)&nbsp;2022-2023&nbsp;Simon&nbsp;Brooke
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
020&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&quot;-s&quot;&nbsp;&quot;--strict&quot;&nbsp;&quot;Strictly&nbsp;interpret&nbsp;the&nbsp;Lisp&nbsp;1.5&nbsp;language,&nbsp;without&nbsp;extensions.&quot;]
<span class="not-tracked" title="0 out of 0 forms covered">
016&nbsp;&nbsp;;;;
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
021&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&quot;-t&quot;&nbsp;&quot;--trace&quot;&nbsp;&quot;Trace&nbsp;Lisp&nbsp;evaluation.&quot;]])
<span class="not-tracked" title="0 out of 0 forms covered">
017&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and&#x2F;or
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;;;;&nbsp;modify&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;;;;&nbsp;as&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation;&nbsp;either&nbsp;version&nbsp;2
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
020&nbsp;&nbsp;;;;&nbsp;of&nbsp;the&nbsp;License,&nbsp;or&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
021&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
022&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
023&nbsp;&nbsp;;;;&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
024&nbsp;&nbsp;;;;&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
025&nbsp;&nbsp;;;;&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
026&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
027&nbsp;&nbsp;;;;&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
028&nbsp;&nbsp;;;;&nbsp;along&nbsp;with&nbsp;this&nbsp;program;&nbsp;if&nbsp;not,&nbsp;write&nbsp;to&nbsp;the&nbsp;Free&nbsp;Software
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
029&nbsp;&nbsp;;;;&nbsp;Foundation,&nbsp;Inc.,&nbsp;51&nbsp;Franklin&nbsp;Street,&nbsp;Fifth&nbsp;Floor,&nbsp;Boston,&nbsp;MA&nbsp;&nbsp;02110-1301,&nbsp;USA.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
030&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
031&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
022&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
023&nbsp;&nbsp;(defn&nbsp;repl
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
024&nbsp;&nbsp;&nbsp;&nbsp;&quot;Read&#x2F;eval&#x2F;print&nbsp;loop.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
025&nbsp;&nbsp;&nbsp;&nbsp;[prompt]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
026&nbsp;&nbsp;&nbsp;&nbsp;(loop&nbsp;[]
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
027&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(print&nbsp;prompt)
032&nbsp;&nbsp;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
028&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(flush)
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
029&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(try
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
030&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[input&nbsp;(read-line)]
</span><br/>
<span class="partial" title="2 out of 3 forms covered">
031&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cond
</span><br/>
<span class="covered" title="11 out of 11 forms covered">
032&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(=&nbsp;input&nbsp;&quot;quit&quot;)&nbsp;(throw&nbsp;(ex-info&nbsp;&quot;\nFærwell!&quot;&nbsp;{:cause&nbsp;:quit}))
</span><br/>
<span class="covered" title="16 out of 16 forms covered">
033&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;input&nbsp;(println&nbsp;(str&nbsp;&quot;&gt;&nbsp;&nbsp;&quot;&nbsp;(print-str&nbsp;(EVAL&nbsp;(READ&nbsp;input)&nbsp;@oblist))))
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else&nbsp;(println)))
033&nbsp;&nbsp;(def&nbsp;stop-word&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
035&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch
034&nbsp;&nbsp;&nbsp;&nbsp;&quot;The&nbsp;word&nbsp;which,&nbsp;if&nbsp;submitted&nbsp;an&nbsp;an&nbsp;input&nbsp;line,&nbsp;will&nbsp;cause&nbsp;Beowulf&nbsp;to&nbsp;quit.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
036&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exception
035&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Question:&nbsp;should&nbsp;this&nbsp;be&nbsp;`forlǣte`?&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
037&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e
036&nbsp;&nbsp;&nbsp;&nbsp;&quot;STOP&quot;)
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
038&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[data&nbsp;(ex-data&nbsp;e)]
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
039&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;(.getMessage&nbsp;e))
<span class="blank" title="0 out of 0 forms covered">
037&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
040&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
041&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data
038&nbsp;&nbsp;(def&nbsp;cli-options
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
042&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(case&nbsp;(:cause&nbsp;data)
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
043&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:parse-failure&nbsp;(println&nbsp;(:failure&nbsp;data))
039&nbsp;&nbsp;&nbsp;&nbsp;[[&quot;-f&nbsp;FILEPATH&quot;&nbsp;&quot;--file-path&nbsp;FILEPATH&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
044&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:strict&nbsp;nil&nbsp;;;&nbsp;the&nbsp;message,&nbsp;which&nbsp;has&nbsp;already&nbsp;been&nbsp;printed,&nbsp;is&nbsp;enough.
040&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Set&nbsp;the&nbsp;path&nbsp;to&nbsp;the&nbsp;directory&nbsp;for&nbsp;reading&nbsp;and&nbsp;writing&nbsp;Lisp&nbsp;files.&quot;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
045&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:quit&nbsp;(throw&nbsp;e)
<span class="partial" title="3 out of 20 forms covered">
041&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:validate&nbsp;[#(and&nbsp;(.exists&nbsp;(io&#x2F;file&nbsp;%))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
046&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;default
<span class="not-covered" title="0 out of 4 forms covered">
042&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(.isDirectory&nbsp;(io&#x2F;file&nbsp;%))
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
043&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(.canRead&nbsp;(io&#x2F;file&nbsp;%))
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
047&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(pprint&nbsp;data))))))
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
048&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(recur)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
049&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
050&nbsp;&nbsp;(defn&nbsp;-main
044&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(.canWrite&nbsp;(io&#x2F;file&nbsp;%)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
051&nbsp;&nbsp;&nbsp;&nbsp;&quot;Parse&nbsp;options,&nbsp;print&nbsp;the&nbsp;banner,&nbsp;read&nbsp;the&nbsp;init&nbsp;file&nbsp;if&nbsp;any,&nbsp;and&nbsp;enter&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
052&nbsp;&nbsp;&nbsp;&nbsp;read&#x2F;eval&#x2F;print&nbsp;loop.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
053&nbsp;&nbsp;&nbsp;&nbsp;[&amp;&nbsp;opts]
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
054&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[args&nbsp;(parse-opts&nbsp;opts&nbsp;cli-options)]
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
055&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
056&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
057&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;\nHider&nbsp;wilcuman.&nbsp;Béowulf&nbsp;is&nbsp;mín&nbsp;nama.\n&quot;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
058&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(System&#x2F;getProperty&nbsp;&quot;beowulf.version&quot;)
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;Síðe&nbsp;&quot;&nbsp;(System&#x2F;getProperty&nbsp;&quot;beowulf.version&quot;)&nbsp;&quot;\n&quot;))
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
062&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:help&nbsp;(:options&nbsp;args))
045&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;File&nbsp;path&nbsp;must&nbsp;exist&nbsp;and&nbsp;must&nbsp;be&nbsp;a&nbsp;directory.&quot;]]
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
063&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:summary&nbsp;args))
046&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&quot;-h&quot;&nbsp;&quot;--help&quot;]
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
064&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(:errors&nbsp;args)
</span><br/>
<span class="covered" title="9 out of 9 forms covered">
065&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(apply&nbsp;str&nbsp;(interpose&nbsp;&quot;;&nbsp;&quot;&nbsp;(:errors&nbsp;args))))
<span class="covered" title="6 out of 6 forms covered">
047&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&quot;-p&nbsp;PROMPT&quot;&nbsp;&quot;--prompt&nbsp;PROMPT&quot;&nbsp;&quot;Set&nbsp;the&nbsp;REPL&nbsp;prompt&nbsp;to&nbsp;PROMPT&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
066&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;\nSprecan&nbsp;&#x27;quit&#x27;&nbsp;&nbsp;laéfan\n&quot;))
048&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:default&nbsp;&quot;Sprecan::&quot;]
</span><br/>
<span class="covered" title="12 out of 12 forms covered">
067&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(binding&nbsp;[*options*&nbsp;(:options&nbsp;args)]
<span class="covered" title="6 out of 6 forms covered">
049&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&quot;-r&nbsp;SYSOUTFILE&quot;&nbsp;&quot;--read&nbsp;SYSOUTFILE&quot;&nbsp;&quot;Read&nbsp;Lisp&nbsp;system&nbsp;from&nbsp;file&nbsp;SYSOUTFILE&quot;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
068&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(try
050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:default&nbsp;default-sysout
</span><br/>
<span class="partial" title="7 out of 8 forms covered">
051&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:validate&nbsp;[#(and
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
052&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(.exists&nbsp;(io&#x2F;file&nbsp;%))
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
053&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(.canRead&nbsp;(io&#x2F;file&nbsp;%)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
054&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Could&nbsp;not&nbsp;find&nbsp;sysout&nbsp;file&quot;]]
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
055&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&quot;-s&quot;&nbsp;&quot;--strict&quot;&nbsp;&quot;Strictly&nbsp;interpret&nbsp;the&nbsp;Lisp&nbsp;1.5&nbsp;language,&nbsp;without&nbsp;extensions.&quot;]
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
056&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&quot;-t&quot;&nbsp;&quot;--time&quot;&nbsp;&quot;Time&nbsp;evaluations.&quot;]
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
057&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&quot;-x&quot;&nbsp;&quot;--testing&quot;&nbsp;&quot;Disable&nbsp;the&nbsp;jline&nbsp;reader&nbsp;-&nbsp;useful&nbsp;when&nbsp;piping&nbsp;input.&quot;]])
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
058&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
059&nbsp;&nbsp;(defn-&nbsp;re&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
060&nbsp;&nbsp;&nbsp;&nbsp;&quot;Like&nbsp;REPL,&nbsp;but&nbsp;it&nbsp;isn&#x27;t&nbsp;a&nbsp;loop&nbsp;and&nbsp;doesn&#x27;t&nbsp;print.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;[input]
</span><br/>
<span class="covered" title="7 out of 7 forms covered">
062&nbsp;&nbsp;&nbsp;&nbsp;(EVAL&nbsp;(READ&nbsp;input)&nbsp;NIL&nbsp;0))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
063&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
064&nbsp;&nbsp;(defn&nbsp;repl
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
065&nbsp;&nbsp;&nbsp;&nbsp;&quot;Read&#x2F;eval&#x2F;print&nbsp;loop.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
066&nbsp;&nbsp;&nbsp;&nbsp;[prompt]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
067&nbsp;&nbsp;&nbsp;&nbsp;(loop&nbsp;[]&nbsp;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
068&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(flush)
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
069&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(try
</span><br/>
<span class="covered" title="10 out of 10 forms covered">
069&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(repl&nbsp;(str&nbsp;(:prompt&nbsp;(:options&nbsp;args))&nbsp;&quot;&nbsp;&quot;))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
070&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
071&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exception
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
072&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e
070&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if-let&nbsp;[input&nbsp;(trim&nbsp;(read-from-console&nbsp;prompt))]
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
073&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[data&nbsp;(ex-data&nbsp;e)]
071&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(=&nbsp;input&nbsp;stop-word)
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
074&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if
<span class="covered" title="7 out of 7 forms covered">
072&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(ex-info&nbsp;&quot;\nFærwell!&quot;&nbsp;{:cause&nbsp;:quit}))
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
075&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data
<span class="covered" title="2 out of 2 forms covered">
073&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
074&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;&gt;&nbsp;&nbsp;&quot;&nbsp;
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
076&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(case&nbsp;(:cause&nbsp;data)
075&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(print-str&nbsp;(if&nbsp;(:time&nbsp;*options*)
</span><br/>
<span class="not-covered" title="0 out of 18 forms covered">
076&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(time&nbsp;(re&nbsp;input))
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
077&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(re&nbsp;input))))))&nbsp;
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
077&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:quit&nbsp;nil
079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;default
080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exception
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
081&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
082&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[data&nbsp;(ex-data&nbsp;e)]
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
083&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;(.getMessage&nbsp;e))
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
084&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(when
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
085&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
086&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(case&nbsp;(:cause&nbsp;data)
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
087&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:parse-failure&nbsp;(println&nbsp;(:failure&nbsp;data))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
088&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:strict&nbsp;nil&nbsp;;;&nbsp;the&nbsp;message,&nbsp;which&nbsp;has&nbsp;already&nbsp;been&nbsp;printed,&nbsp;is&nbsp;enough.
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
089&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:quit&nbsp;(throw&nbsp;e)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
090&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;default
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(pprint&nbsp;data))
091&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(pprint&nbsp;data))))))
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
092&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(recur)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
093&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
094&nbsp;&nbsp;(defn&nbsp;-main
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
095&nbsp;&nbsp;&nbsp;&nbsp;&quot;Parse&nbsp;options,&nbsp;print&nbsp;the&nbsp;banner,&nbsp;read&nbsp;the&nbsp;init&nbsp;file&nbsp;if&nbsp;any,&nbsp;and&nbsp;enter&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
096&nbsp;&nbsp;&nbsp;&nbsp;read&#x2F;eval&#x2F;print&nbsp;loop.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
097&nbsp;&nbsp;&nbsp;&nbsp;[&amp;&nbsp;opts]
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
098&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[args&nbsp;(parse-opts&nbsp;opts&nbsp;cli-options)]
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
099&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
101&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;\nHider&nbsp;wilcuman.&nbsp;Béowulf&nbsp;is&nbsp;mín&nbsp;nama.\n&quot;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
102&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(when
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
103&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(System&#x2F;getProperty&nbsp;&quot;beowulf.version&quot;)
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
104&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;Síðe&nbsp;&quot;&nbsp;(System&#x2F;getProperty&nbsp;&quot;beowulf.version&quot;)&nbsp;&quot;\n&quot;))
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
105&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(when
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
106&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:help&nbsp;(:options&nbsp;args))
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
107&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:summary&nbsp;args))
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
108&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(when&nbsp;(:errors&nbsp;args)
</span><br/>
<span class="covered" title="9 out of 9 forms covered">
109&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(apply&nbsp;str&nbsp;(interpose&nbsp;&quot;;&nbsp;&quot;&nbsp;(:errors&nbsp;args))))
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
110&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;\nSprecan&nbsp;&#x27;&quot;&nbsp;stop-word&nbsp;&quot;&#x27;&nbsp;&nbsp;laéfan\n&quot;))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
111&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="covered" title="12 out of 12 forms covered">
112&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(binding&nbsp;[*options*&nbsp;(:options&nbsp;args)]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
113&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;(pprint&nbsp;*options*)
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
114&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(when&nbsp;(:read&nbsp;*options*)
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
115&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(try&nbsp;(SYSIN&nbsp;(:read&nbsp;*options*))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
116&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch&nbsp;Throwable&nbsp;any
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;e))))))))
117&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;any))))
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(try
</span><br/>
<span class="covered" title="7 out of 7 forms covered">
119&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(repl&nbsp;(:prompt&nbsp;(:options&nbsp;args)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
121&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exception
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
122&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
123&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[data&nbsp;(ex-data&nbsp;e)]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
124&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
125&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
126&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(case&nbsp;(:cause&nbsp;data)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
127&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:quit&nbsp;nil
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
128&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;default
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(do
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
130&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;&quot;STÆFLEAHTER:&nbsp;&quot;&nbsp;(.getMessage&nbsp;e))
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(pprint&nbsp;data)))
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;e))))))))
</span><br/>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,395 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../coverage.css"/> <title> beowulf/interop.clj </title>
</head>
<body>
<span class="covered" title="1 out of 1 forms covered">
001&nbsp;&nbsp;(ns&nbsp;beowulf.interop
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
002&nbsp;&nbsp;&nbsp;&nbsp;(:require&nbsp;[beowulf.cons-cell&nbsp;:refer&nbsp;[make-beowulf-list]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
003&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.host&nbsp;:refer&nbsp;[CAR&nbsp;CDR]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.oblist&nbsp;:refer&nbsp;[*options*&nbsp;NIL]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.string&nbsp;:as&nbsp;s&nbsp;:refer&nbsp;[last-index-of&nbsp;lower-case&nbsp;split
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;upper-case]]))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
007&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
008&nbsp;&nbsp;;;;;&nbsp;INTEROP&nbsp;feature&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
009&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
010&nbsp;&nbsp;(defn&nbsp;listify-qualified-name
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;&nbsp;&nbsp;&quot;We&nbsp;need&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;print&nbsp;something&nbsp;we&nbsp;can&nbsp;link&nbsp;to&nbsp;the&nbsp;particular&nbsp;Clojure
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
012&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;`subr`&nbsp;in&nbsp;a&nbsp;form&nbsp;in&nbsp;which&nbsp;Lisp&nbsp;1.5&nbsp;is&nbsp;able&nbsp;to&nbsp;read&nbsp;it&nbsp;back&nbsp;in&nbsp;and
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
013&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;relink&nbsp;it.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
014&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
015&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;assumes&nbsp;`subr`&nbsp;is&nbsp;either&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
016&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.&nbsp;a&nbsp;string&nbsp;in&nbsp;the&nbsp;format&nbsp;`#&#x27;beowulf.io&#x2F;SYSIN`&nbsp;or&nbsp;`beowulf.io&#x2F;SYSIN`;&nbsp;or
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
017&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.&nbsp;something&nbsp;which,&nbsp;when&nbsp;coerced&nbsp;to&nbsp;a&nbsp;string&nbsp;with&nbsp;`str`,&nbsp;will&nbsp;have&nbsp;such
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;format.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;&nbsp;&nbsp;[subr]
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
020&nbsp;&nbsp;&nbsp;&nbsp;(make-beowulf-list
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
021&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(map
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
022&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#(symbol&nbsp;(upper-case&nbsp;%))
</span><br/>
<span class="not-covered" title="0 out of 9 forms covered">
023&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(remove&nbsp;empty?&nbsp;(split&nbsp;(str&nbsp;subr)&nbsp;#&quot;[#&#x27;.&#x2F;]&quot;)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
024&nbsp;&nbsp;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
025&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
026&nbsp;&nbsp;(defn&nbsp;interpret-qualified-name
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
027&nbsp;&nbsp;&nbsp;&nbsp;&quot;For&nbsp;interoperation&nbsp;with&nbsp;Clojure,&nbsp;it&nbsp;will&nbsp;often&nbsp;be&nbsp;necessary&nbsp;to&nbsp;pass
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
028&nbsp;&nbsp;&nbsp;&nbsp;qualified&nbsp;names&nbsp;that&nbsp;are&nbsp;not&nbsp;representable&nbsp;in&nbsp;Lisp&nbsp;1.5.&nbsp;This&nbsp;function
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
029&nbsp;&nbsp;&nbsp;&nbsp;takes&nbsp;a&nbsp;sequence&nbsp;in&nbsp;the&nbsp;form&nbsp;`(PART&nbsp;PART&nbsp;PART...&nbsp;NAME)`&nbsp;and&nbsp;returns
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
030&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;symbol&nbsp;in&nbsp;the&nbsp;form&nbsp;`part.part.part&#x2F;NAME`.&nbsp;This&nbsp;symbol&nbsp;will&nbsp;then&nbsp;be
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
031&nbsp;&nbsp;&nbsp;&nbsp;tried&nbsp;in&nbsp;both&nbsp;that&nbsp;form&nbsp;and&nbsp;lower-cased.&nbsp;Names&nbsp;with&nbsp;hyphens&nbsp;or
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
032&nbsp;&nbsp;&nbsp;&nbsp;underscores&nbsp;cannot&nbsp;be&nbsp;represented&nbsp;with&nbsp;this&nbsp;scheme.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
033&nbsp;&nbsp;&nbsp;&nbsp;([l]
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(symbol
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
035&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[n&nbsp;(s&#x2F;join&nbsp;&quot;.&quot;&nbsp;
</span><br/>
<span class="covered" title="13 out of 13 forms covered">
036&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(concat&nbsp;(map&nbsp;#(lower-case&nbsp;(str&nbsp;%))&nbsp;(butlast&nbsp;l))&nbsp;
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
037&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(list&nbsp;(last&nbsp;l))))
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
038&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s&nbsp;(last-index-of&nbsp;n&nbsp;&quot;.&quot;)]
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
039&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;s
</span><br/>
<span class="covered" title="13 out of 13 forms covered">
040&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;(subs&nbsp;n&nbsp;0&nbsp;s)&nbsp;&quot;&#x2F;&quot;&nbsp;(subs&nbsp;n&nbsp;(inc&nbsp;s)))
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
041&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
042&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
043&nbsp;&nbsp;(defn&nbsp;to-beowulf
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
044&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;a&nbsp;beowulf-native&nbsp;representation&nbsp;of&nbsp;the&nbsp;Clojure&nbsp;object&nbsp;`o`.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
045&nbsp;&nbsp;&nbsp;&nbsp;Numbers&nbsp;and&nbsp;symbols&nbsp;are&nbsp;unaffected.&nbsp;Collections&nbsp;have&nbsp;to&nbsp;be&nbsp;converted;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
046&nbsp;&nbsp;&nbsp;&nbsp;strings&nbsp;must&nbsp;be&nbsp;converted&nbsp;to&nbsp;symbols.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
047&nbsp;&nbsp;&nbsp;&nbsp;[o]
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
048&nbsp;&nbsp;&nbsp;&nbsp;(cond
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
049&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(coll?&nbsp;o)&nbsp;(make-beowulf-list&nbsp;o)
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(string?&nbsp;o)&nbsp;(symbol&nbsp;(s&#x2F;upper-case&nbsp;o))
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
051&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else&nbsp;o))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
052&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
053&nbsp;&nbsp;(defn&nbsp;to-clojure
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
054&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;l&nbsp;is&nbsp;a&nbsp;`beowulf.cons_cell.ConsCell`,&nbsp;return&nbsp;a&nbsp;Clojure&nbsp;list&nbsp;having&nbsp;the&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
055&nbsp;&nbsp;&nbsp;&nbsp;same&nbsp;members&nbsp;in&nbsp;the&nbsp;same&nbsp;order.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
056&nbsp;&nbsp;&nbsp;&nbsp;[l]
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
057&nbsp;&nbsp;&nbsp;&nbsp;(cond
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
058&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(not&nbsp;(instance?&nbsp;beowulf.cons_cell.ConsCell&nbsp;l))
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(=&nbsp;(CDR&nbsp;l)&nbsp;NIL)
</span><br/>
<span class="covered" title="7 out of 7 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(list&nbsp;(to-clojure&nbsp;(CAR&nbsp;l)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
062&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else
</span><br/>
<span class="covered" title="12 out of 12 forms covered">
063&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(conj&nbsp;(to-clojure&nbsp;(CDR&nbsp;l))&nbsp;(to-clojure&nbsp;(CAR&nbsp;l)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
064&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
065&nbsp;&nbsp;(defn&nbsp;INTEROP
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
066&nbsp;&nbsp;&nbsp;&nbsp;&quot;Clojure&nbsp;(or&nbsp;other&nbsp;host&nbsp;environment)&nbsp;interoperation&nbsp;API.&nbsp;`fn-symbol`&nbsp;is&nbsp;expected
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
067&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;be&nbsp;either
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
068&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
069&nbsp;&nbsp;&nbsp;&nbsp;1.&nbsp;a&nbsp;symbol&nbsp;bound&nbsp;in&nbsp;the&nbsp;host&nbsp;environment&nbsp;to&nbsp;a&nbsp;function;&nbsp;or
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
070&nbsp;&nbsp;&nbsp;&nbsp;2.&nbsp;a&nbsp;sequence&nbsp;(list)&nbsp;of&nbsp;symbols&nbsp;forming&nbsp;a&nbsp;qualified&nbsp;path&nbsp;name&nbsp;bound&nbsp;to&nbsp;a
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
071&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
072&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
073&nbsp;&nbsp;&nbsp;&nbsp;Lower&nbsp;case&nbsp;characters&nbsp;cannot&nbsp;normally&nbsp;be&nbsp;represented&nbsp;in&nbsp;Lisp&nbsp;1.5,&nbsp;so&nbsp;both&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
074&nbsp;&nbsp;&nbsp;&nbsp;upper&nbsp;case&nbsp;and&nbsp;lower&nbsp;case&nbsp;variants&nbsp;of&nbsp;`fn-symbol`&nbsp;will&nbsp;be&nbsp;tried.&nbsp;If&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
075&nbsp;&nbsp;&nbsp;&nbsp;function&nbsp;you&#x27;re&nbsp;looking&nbsp;for&nbsp;has&nbsp;a&nbsp;mixed&nbsp;case&nbsp;name,&nbsp;that&nbsp;is&nbsp;not&nbsp;currently
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
076&nbsp;&nbsp;&nbsp;&nbsp;accessible.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
077&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;`args`&nbsp;is&nbsp;expected&nbsp;to&nbsp;be&nbsp;a&nbsp;Lisp&nbsp;1.5&nbsp;list&nbsp;of&nbsp;arguments&nbsp;to&nbsp;be&nbsp;passed&nbsp;to&nbsp;that
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
079&nbsp;&nbsp;&nbsp;&nbsp;function.&nbsp;Return&nbsp;value&nbsp;must&nbsp;be&nbsp;something&nbsp;acceptable&nbsp;to&nbsp;Lisp&nbsp;1.5,&nbsp;so&nbsp;either
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
080&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;symbol,&nbsp;a&nbsp;number,&nbsp;or&nbsp;a&nbsp;Lisp&nbsp;1.5&nbsp;list.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
081&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
082&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;`fn-symbol`&nbsp;is&nbsp;not&nbsp;found&nbsp;(even&nbsp;when&nbsp;cast&nbsp;to&nbsp;lower&nbsp;case),&nbsp;or&nbsp;is&nbsp;not&nbsp;a&nbsp;function,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
083&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;the&nbsp;value&nbsp;returned&nbsp;cannot&nbsp;be&nbsp;represented&nbsp;in&nbsp;Lisp&nbsp;1.5,&nbsp;an&nbsp;exception&nbsp;is&nbsp;thrown
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
084&nbsp;&nbsp;&nbsp;&nbsp;with&nbsp;`:cause`&nbsp;bound&nbsp;to&nbsp;`:interop`&nbsp;and&nbsp;`:detail`&nbsp;set&nbsp;to&nbsp;a&nbsp;value&nbsp;representing&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
085&nbsp;&nbsp;&nbsp;&nbsp;actual&nbsp;problem.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
086&nbsp;&nbsp;&nbsp;&nbsp;[fn-symbol&nbsp;args]
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
087&nbsp;&nbsp;&nbsp;&nbsp;(if-not&nbsp;(:strict&nbsp;*options*)
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
088&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
089&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[q-name&nbsp;(if
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
090&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(seq?&nbsp;fn-symbol)
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
091&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(interpret-qualified-name&nbsp;fn-symbol)
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
092&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fn-symbol)
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
093&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l-name&nbsp;(symbol&nbsp;(s&#x2F;lower-case&nbsp;q-name))
</span><br/>
<span class="partial" title="1 out of 3 forms covered">
094&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cond
</span><br/>
<span class="partial" title="1 out of 2 forms covered">
095&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(try
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
096&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(fn?&nbsp;(eval&nbsp;l-name))
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
097&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch&nbsp;java.lang.ClassNotFoundException&nbsp;_&nbsp;nil))&nbsp;l-name
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
098&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(try
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
099&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(fn?&nbsp;(eval&nbsp;q-name))
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch&nbsp;java.lang.ClassNotFoundException&nbsp;_&nbsp;nil))&nbsp;q-name
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
101&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else&nbsp;(throw
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
102&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ex-info
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
103&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;INTEROP:&nbsp;ungecnáwen&nbsp;þegnung&nbsp;`&quot;&nbsp;fn-symbol&nbsp;&quot;`&quot;)
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
104&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:cause&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:interop
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
105&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:detail&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:not-found
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
106&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fn-symbol
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
107&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:also-tried&nbsp;l-name})))
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
108&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;args&#x27;&nbsp;&nbsp;(to-clojure&nbsp;args)]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
109&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(print&nbsp;(str&nbsp;&quot;INTEROP:&nbsp;eahtiende&nbsp;`&quot;&nbsp;(cons&nbsp;f&nbsp;args&#x27;)&nbsp;&quot;`&quot;))
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
110&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(flush)
</span><br/>
<span class="covered" title="7 out of 7 forms covered">
111&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[result&nbsp;(eval&nbsp;(conj&nbsp;args&#x27;&nbsp;f))]&nbsp;;;&nbsp;this&nbsp;has&nbsp;the&nbsp;potential&nbsp;to&nbsp;blow&nbsp;up&nbsp;the&nbsp;world
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
112&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;(str&nbsp;&quot;;&nbsp;ágiefende&nbsp;`&quot;&nbsp;result&nbsp;&quot;`&quot;))
</span><br/>
<span class="partial" title="4 out of 6 forms covered">
113&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cond
</span><br/>
<span class="partial" title="4 out of 5 forms covered">
114&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(instance?&nbsp;beowulf.cons_cell.ConsCell&nbsp;result)&nbsp;result
</span><br/>
<span class="partial" title="3 out of 6 forms covered">
115&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(coll?&nbsp;result)&nbsp;(make-beowulf-list&nbsp;result)
</span><br/>
<span class="partial" title="3 out of 4 forms covered">
116&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(symbol?&nbsp;result)&nbsp;result
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
117&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(string?&nbsp;result)&nbsp;(symbol&nbsp;result)
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(number?&nbsp;result)&nbsp;result
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
119&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else&nbsp;(throw
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ex-info
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
121&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;INTEROP:&nbsp;Ne&nbsp;can&nbsp;eahtiende&nbsp;`&quot;&nbsp;result&nbsp;&quot;`&nbsp;to&nbsp;Lisp&nbsp;1.5.&quot;)
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
122&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:cause&nbsp;&nbsp;:interop
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
123&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:detail&nbsp;:not-representable
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
124&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:result&nbsp;result})))))
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
125&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
126&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ex-info
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
127&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;INTEROP&nbsp;ne&nbsp;āfand&nbsp;innan&nbsp;Lisp&nbsp;1.5.&quot;)
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
128&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:cause&nbsp;&nbsp;:interop
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:detail&nbsp;:strict}))))
</span><br/>
</body>
</html>

View file

@ -0,0 +1,521 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../coverage.css"/> <title> beowulf/io.clj </title>
</head>
<body>
<span class="covered" title="1 out of 1 forms covered">
001&nbsp;&nbsp;(ns&nbsp;beowulf.io
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
002&nbsp;&nbsp;&nbsp;&nbsp;&quot;Non-standard&nbsp;extensions&nbsp;to&nbsp;Lisp&nbsp;1.5&nbsp;to&nbsp;read&nbsp;and&nbsp;write&nbsp;to&nbsp;the&nbsp;filesystem.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
003&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lisp&nbsp;1.5&nbsp;had&nbsp;only&nbsp;`READ`,&nbsp;which&nbsp;read&nbsp;one&nbsp;S-Expression&nbsp;at&nbsp;a&nbsp;time,&nbsp;and&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;various&nbsp;forms&nbsp;of&nbsp;`PRIN*`&nbsp;functions,&nbsp;which&nbsp;printed&nbsp;to&nbsp;the&nbsp;line&nbsp;printer.&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;There&nbsp;was&nbsp;also&nbsp;`PUNCH`,&nbsp;which&nbsp;wrote&nbsp;to&nbsp;a&nbsp;card&nbsp;punch.&nbsp;It&nbsp;does&nbsp;not&nbsp;seem&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;that&nbsp;there&nbsp;was&nbsp;any&nbsp;concept&nbsp;of&nbsp;an&nbsp;interactive&nbsp;terminal.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
009&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See&nbsp;Appendix&nbsp;E,&nbsp;`OVERLORD&nbsp;-&nbsp;THE&nbsp;MONITOR`,&nbsp;and&nbsp;Appendix&nbsp;F,&nbsp;`LISP&nbsp;INPUT
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AND&nbsp;OUTPUT`.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
012&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For&nbsp;our&nbsp;purposes,&nbsp;to&nbsp;save&nbsp;the&nbsp;current&nbsp;state&nbsp;of&nbsp;the&nbsp;Lisp&nbsp;system&nbsp;it&nbsp;should
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
013&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;be&nbsp;sufficient&nbsp;to&nbsp;print&nbsp;the&nbsp;current&nbsp;contents&nbsp;of&nbsp;the&nbsp;oblist&nbsp;to&nbsp;file;&nbsp;and&nbsp;to
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
014&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;restore&nbsp;a&nbsp;previous&nbsp;state&nbsp;from&nbsp;file,&nbsp;to&nbsp;overwrite&nbsp;the&nbsp;contents&nbsp;of&nbsp;the&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
015&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oblist&nbsp;with&nbsp;data&nbsp;from&nbsp;that&nbsp;file.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
016&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
017&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hence&nbsp;functions&nbsp;SYSOUT&nbsp;and&nbsp;SYSIN,&nbsp;which&nbsp;do&nbsp;just&nbsp;that.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;&nbsp;&nbsp;(:require&nbsp;[beowulf.cons-cell&nbsp;:refer&nbsp;[make-beowulf-list&nbsp;make-cons-cell
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pretty-print]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
020&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.host&nbsp;:refer&nbsp;[CADR&nbsp;CAR&nbsp;CDDR&nbsp;CDR]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
021&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.interop&nbsp;:refer&nbsp;[interpret-qualified-name
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
022&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listify-qualified-name]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
023&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.oblist&nbsp;:refer&nbsp;[*options*&nbsp;NIL&nbsp;oblist]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
024&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.read&nbsp;:refer&nbsp;[READ]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
025&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.java.io&nbsp;:refer&nbsp;[file&nbsp;resource]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
026&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.string&nbsp;:refer&nbsp;[ends-with?]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
027&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[java-time.api&nbsp;:refer&nbsp;[local-date&nbsp;local-date-time]]))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
028&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
029&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
030&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
031&nbsp;&nbsp;;;;&nbsp;Copyright&nbsp;(C)&nbsp;2022-2023&nbsp;Simon&nbsp;Brooke
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
032&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
033&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and&#x2F;or
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
034&nbsp;&nbsp;;;;&nbsp;modify&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
035&nbsp;&nbsp;;;;&nbsp;as&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation;&nbsp;either&nbsp;version&nbsp;2
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
036&nbsp;&nbsp;;;;&nbsp;of&nbsp;the&nbsp;License,&nbsp;or&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
037&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
038&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
039&nbsp;&nbsp;;;;&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
040&nbsp;&nbsp;;;;&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
041&nbsp;&nbsp;;;;&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
042&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
043&nbsp;&nbsp;;;;&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
044&nbsp;&nbsp;;;;&nbsp;along&nbsp;with&nbsp;this&nbsp;program;&nbsp;if&nbsp;not,&nbsp;write&nbsp;to&nbsp;the&nbsp;Free&nbsp;Software
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
045&nbsp;&nbsp;;;;&nbsp;Foundation,&nbsp;Inc.,&nbsp;51&nbsp;Franklin&nbsp;Street,&nbsp;Fifth&nbsp;Floor,&nbsp;Boston,&nbsp;MA&nbsp;&nbsp;02110-1301,&nbsp;USA.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
046&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
047&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
048&nbsp;&nbsp;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
049&nbsp;&nbsp;(def&nbsp;^:constant&nbsp;default-sysout&nbsp;&quot;lisp1.5.lsp&quot;)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
050&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
051&nbsp;&nbsp;(defn-&nbsp;full-path
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
052&nbsp;&nbsp;&nbsp;&nbsp;[fp]
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
053&nbsp;&nbsp;&nbsp;&nbsp;(str
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
054&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(:filepath&nbsp;*options*)
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
055&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;(:filepath&nbsp;*options*)&nbsp;(java.io.File&#x2F;separator))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
056&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;&quot;)
</span><br/>
<span class="partial" title="12 out of 14 forms covered">
057&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(and&nbsp;(string?&nbsp;fp)
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
058&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&gt;&nbsp;(count&nbsp;fp)&nbsp;0)
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(not=&nbsp;fp&nbsp;&quot;NIL&quot;))
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fp
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;Sysout-&quot;&nbsp;(local-date)))
</span><br/>
<span class="partial" title="6 out of 7 forms covered">
062&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(ends-with?&nbsp;fp&nbsp;&quot;.lsp&quot;)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
063&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
064&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;.lsp&quot;)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
065&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
066&nbsp;&nbsp;;;&nbsp;(find-var&nbsp;(symbol&nbsp;&quot;beowulf.io&#x2F;SYSIN&quot;))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
067&nbsp;&nbsp;;;&nbsp;(@(resolve&nbsp;(symbol&nbsp;&quot;beowulf.host&#x2F;TIMES&quot;))&nbsp;2&nbsp;2)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
068&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
069&nbsp;&nbsp;(defn&nbsp;safely-wrap-subr
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
070&nbsp;&nbsp;&nbsp;&nbsp;[entry]
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
071&nbsp;&nbsp;&nbsp;&nbsp;(cond&nbsp;(=&nbsp;entry&nbsp;NIL)&nbsp;NIL
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
072&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(=&nbsp;(CAR&nbsp;entry)&nbsp;&#x27;SUBR)&nbsp;(make-cons-cell
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
073&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CAR&nbsp;entry)
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
074&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(make-cons-cell
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
075&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(listify-qualified-name&nbsp;(CADR&nbsp;entry))
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
076&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CDDR&nbsp;entry)))
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
077&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else&nbsp;(make-cons-cell
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CAR&nbsp;entry)&nbsp;(safely-wrap-subr&nbsp;(CDR&nbsp;entry)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
079&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
080&nbsp;&nbsp;(defn&nbsp;safely-wrap-subrs
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
081&nbsp;&nbsp;&nbsp;&nbsp;[objects]
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
082&nbsp;&nbsp;&nbsp;&nbsp;(make-beowulf-list&nbsp;(map&nbsp;safely-wrap-subr&nbsp;objects)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
083&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
084&nbsp;&nbsp;(defn&nbsp;SYSOUT
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
085&nbsp;&nbsp;&nbsp;&nbsp;&quot;Dump&nbsp;the&nbsp;current&nbsp;content&nbsp;of&nbsp;the&nbsp;object&nbsp;list&nbsp;to&nbsp;file.&nbsp;If&nbsp;no&nbsp;`filepath`&nbsp;is
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
086&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;specified,&nbsp;a&nbsp;file&nbsp;name&nbsp;will&nbsp;be&nbsp;constructed&nbsp;of&nbsp;the&nbsp;symbol&nbsp;`Sysout`&nbsp;and&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
087&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;current&nbsp;date.&nbsp;File&nbsp;paths&nbsp;will&nbsp;be&nbsp;considered&nbsp;relative&nbsp;to&nbsp;the&nbsp;filepath
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
088&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set&nbsp;when&nbsp;starting&nbsp;Lisp.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
089&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
090&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**NOTE&nbsp;THAT**&nbsp;this&nbsp;is&nbsp;an&nbsp;extension&nbsp;function,&nbsp;not&nbsp;available&nbsp;in&nbsp;strct&nbsp;mode.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
091&nbsp;&nbsp;&nbsp;&nbsp;([]
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
092&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(SYSOUT&nbsp;nil))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
093&nbsp;&nbsp;&nbsp;&nbsp;([filepath]
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
094&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(spit&nbsp;(full-path&nbsp;(str&nbsp;filepath))
</span><br/>
<span class="not-covered" title="0 out of 15 forms covered">
095&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(with-out-str
</span><br/>
<span class="not-covered" title="0 out of 9 forms covered">
096&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;(apply&nbsp;str&nbsp;(repeat&nbsp;79&nbsp;&quot;;&quot;)))
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
097&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;(format&nbsp;&quot;;;&nbsp;Beowulf&nbsp;%s&nbsp;Sysout&nbsp;file&nbsp;generated&nbsp;at&nbsp;%s&quot;
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
098&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(or&nbsp;(System&#x2F;getProperty&nbsp;&quot;beowulf.version&quot;)&nbsp;&quot;&quot;)
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
099&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(local-date-time)))
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(when&nbsp;(System&#x2F;getenv&nbsp;&quot;USER&quot;)
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
101&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;(format&nbsp;&quot;;;&nbsp;generated&nbsp;by&nbsp;%s&quot;&nbsp;(System&#x2F;getenv&nbsp;&quot;USER&quot;))))
</span><br/>
<span class="not-covered" title="0 out of 9 forms covered">
102&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;(apply&nbsp;str&nbsp;(repeat&nbsp;79&nbsp;&quot;;&quot;)))
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
103&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println)
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
104&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[output&nbsp;(safely-wrap-subrs&nbsp;@oblist)]
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
105&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(pretty-print&nbsp;output)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
106&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
107&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
108&nbsp;&nbsp;(defn&nbsp;resolve-subr
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
109&nbsp;&nbsp;&nbsp;&nbsp;&quot;If&nbsp;this&nbsp;oblist&nbsp;`entry`&nbsp;references&nbsp;a&nbsp;subroutine,&nbsp;attempt&nbsp;to&nbsp;fix&nbsp;up&nbsp;that
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
110&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reference.&quot;
</span><br/>
<span class="partial" title="1 out of 3 forms covered">
111&nbsp;&nbsp;&nbsp;&nbsp;([entry]
</span><br/>
<span class="partial" title="9 out of 12 forms covered">
112&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(or&nbsp;(resolve-subr&nbsp;entry&nbsp;&#x27;SUBR)
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
113&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(resolve-subr&nbsp;entry&nbsp;&#x27;FSUBR)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
114&nbsp;&nbsp;&nbsp;&nbsp;([entry&nbsp;prop]
</span><br/>
<span class="covered" title="7 out of 7 forms covered">
115&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cond&nbsp;(=&nbsp;entry&nbsp;NIL)&nbsp;NIL
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
116&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(=&nbsp;(CAR&nbsp;entry)&nbsp;prop)&nbsp;(try
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
117&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(make-cons-cell
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CAR&nbsp;entry)
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
119&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(make-cons-cell
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(interpret-qualified-name
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
121&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CADR&nbsp;entry))
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
122&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CDDR&nbsp;entry)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
123&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch&nbsp;Exception&nbsp;_
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
124&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(print&nbsp;&quot;Warnung:&nbsp;ne&nbsp;can&nbsp;āfinde&nbsp;&quot;
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
125&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CADR&nbsp;entry))
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
126&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CDDR&nbsp;entry)))
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
127&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else&nbsp;(make-cons-cell
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
128&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CAR&nbsp;entry)&nbsp;(resolve-subr&nbsp;(CDR&nbsp;entry))))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
129&nbsp;&nbsp;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
130&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
131&nbsp;&nbsp;(defn-&nbsp;resolve-subroutines
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
132&nbsp;&nbsp;&nbsp;&nbsp;&quot;Attempt&nbsp;to&nbsp;fix&nbsp;up&nbsp;the&nbsp;references&nbsp;to&nbsp;subroutines&nbsp;(Clojure&nbsp;functions)&nbsp;among
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
133&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;these&nbsp;`objects`,&nbsp;being&nbsp;new&nbsp;content&nbsp;for&nbsp;the&nbsp;object&nbsp;list.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
134&nbsp;&nbsp;&nbsp;&nbsp;[objects]
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
135&nbsp;&nbsp;&nbsp;&nbsp;(make-beowulf-list
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
136&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(map
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
137&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resolve-subr
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
138&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;objects)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
139&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
140&nbsp;&nbsp;(defn&nbsp;SYSIN
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
141&nbsp;&nbsp;&nbsp;&nbsp;&quot;Read&nbsp;the&nbsp;contents&nbsp;of&nbsp;the&nbsp;file&nbsp;at&nbsp;this&nbsp;`filename`&nbsp;into&nbsp;the&nbsp;object&nbsp;list.&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
142&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
143&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;the&nbsp;file&nbsp;is&nbsp;not&nbsp;a&nbsp;valid&nbsp;Beowulf&nbsp;sysout&nbsp;file,&nbsp;this&nbsp;will&nbsp;probably&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
144&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;corrupt&nbsp;the&nbsp;system,&nbsp;you&nbsp;have&nbsp;been&nbsp;warned.&nbsp;File&nbsp;paths&nbsp;will&nbsp;be&nbsp;considered&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
145&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;relative&nbsp;to&nbsp;the&nbsp;filepath&nbsp;set&nbsp;when&nbsp;starting&nbsp;Lisp.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
146&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
147&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;It&nbsp;is&nbsp;intended&nbsp;that&nbsp;sysout&nbsp;files&nbsp;can&nbsp;be&nbsp;read&nbsp;both&nbsp;from&nbsp;resources&nbsp;within
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
148&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;jar&nbsp;file,&nbsp;and&nbsp;from&nbsp;the&nbsp;file&nbsp;system.&nbsp;If&nbsp;a&nbsp;named&nbsp;file&nbsp;exists&nbsp;in&nbsp;both&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
149&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file&nbsp;system&nbsp;and&nbsp;the&nbsp;resources,&nbsp;the&nbsp;file&nbsp;system&nbsp;will&nbsp;be&nbsp;preferred.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
150&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
151&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**NOTE&nbsp;THAT**&nbsp;if&nbsp;the&nbsp;provided&nbsp;`filename`&nbsp;does&nbsp;not&nbsp;end&nbsp;with&nbsp;`.lsp`&nbsp;(which,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
152&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;you&#x27;re&nbsp;writing&nbsp;it&nbsp;from&nbsp;the&nbsp;Lisp&nbsp;REPL,&nbsp;it&nbsp;won&#x27;t),&nbsp;the&nbsp;extension&nbsp;`.lsp`
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
153&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;will&nbsp;be&nbsp;appended.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
154&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
155&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**NOTE&nbsp;THAT**&nbsp;this&nbsp;is&nbsp;an&nbsp;extension&nbsp;function,&nbsp;not&nbsp;available&nbsp;in&nbsp;strct&nbsp;mode.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
156&nbsp;&nbsp;&nbsp;&nbsp;([]
</span><br/>
<span class="not-covered" title="0 out of 13 forms covered">
157&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(SYSIN&nbsp;(or&nbsp;(:read&nbsp;*options*)&nbsp;(str&nbsp;&quot;resources&#x2F;&quot;&nbsp;default-sysout))))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
158&nbsp;&nbsp;&nbsp;&nbsp;([filename]
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
159&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[fp&nbsp;(file&nbsp;(full-path&nbsp;(str&nbsp;filename)))
</span><br/>
<span class="covered" title="9 out of 9 forms covered">
160&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file&nbsp;(when&nbsp;(and&nbsp;(.exists&nbsp;fp)&nbsp;(.canRead&nbsp;fp))&nbsp;fp)
</span><br/>
<span class="partial" title="4 out of 5 forms covered">
161&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res&nbsp;(try&nbsp;(resource&nbsp;filename)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
162&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch&nbsp;Throwable&nbsp;_&nbsp;nil))
</span><br/>
<span class="covered" title="11 out of 11 forms covered">
163&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content&nbsp;(try&nbsp;(READ&nbsp;(slurp&nbsp;(or&nbsp;file&nbsp;res)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
164&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch&nbsp;Throwable&nbsp;_
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
165&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(ex-info&nbsp;&quot;Ne&nbsp;can&nbsp;ārǣde&quot;
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
166&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:context&nbsp;&quot;SYSIN&quot;
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
167&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:filename&nbsp;filename
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
168&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:filepath&nbsp;fp}))))]
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
169&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(swap!&nbsp;oblist
</span><br/>
<span class="partial" title="7 out of 10 forms covered">
170&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#(when&nbsp;(or&nbsp;%&nbsp;(seq&nbsp;content))
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
171&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(resolve-subroutines&nbsp;content))))))
</span><br/>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,143 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../coverage.css"/> <title> beowulf/oblist.clj </title>
</head>
<body>
<span class="covered" title="1 out of 1 forms covered">
001&nbsp;&nbsp;(ns&nbsp;beowulf.oblist
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
002&nbsp;&nbsp;&nbsp;&nbsp;&quot;A&nbsp;namespace&nbsp;mainly&nbsp;devoted&nbsp;to&nbsp;the&nbsp;object&nbsp;list&nbsp;and&nbsp;other&nbsp;top&nbsp;level
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
003&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;global&nbsp;variables.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Yes,&nbsp;this&nbsp;makes&nbsp;little&nbsp;sense,&nbsp;but&nbsp;if&nbsp;you&nbsp;put&nbsp;them&nbsp;anywhere&nbsp;else&nbsp;you&nbsp;end
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;up&nbsp;in&nbsp;cyclic&nbsp;dependency&nbsp;hell.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
007&nbsp;&nbsp;&nbsp;&nbsp;)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
008&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
009&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;;;;&nbsp;Copyright&nbsp;(C)&nbsp;2022-2023&nbsp;Simon&nbsp;Brooke
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
012&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
013&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and&#x2F;or
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
014&nbsp;&nbsp;;;;&nbsp;modify&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
015&nbsp;&nbsp;;;;&nbsp;as&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation;&nbsp;either&nbsp;version&nbsp;2
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
016&nbsp;&nbsp;;;;&nbsp;of&nbsp;the&nbsp;License,&nbsp;or&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
017&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;;;;&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
020&nbsp;&nbsp;;;;&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
021&nbsp;&nbsp;;;;&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
022&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
023&nbsp;&nbsp;;;;&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
024&nbsp;&nbsp;;;;&nbsp;along&nbsp;with&nbsp;this&nbsp;program;&nbsp;if&nbsp;not,&nbsp;write&nbsp;to&nbsp;the&nbsp;Free&nbsp;Software
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
025&nbsp;&nbsp;;;;&nbsp;Foundation,&nbsp;Inc.,&nbsp;51&nbsp;Franklin&nbsp;Street,&nbsp;Fifth&nbsp;Floor,&nbsp;Boston,&nbsp;MA&nbsp;&nbsp;02110-1301,&nbsp;USA.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
026&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
027&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
028&nbsp;&nbsp;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
029&nbsp;&nbsp;(def&nbsp;NIL
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
030&nbsp;&nbsp;&nbsp;&nbsp;&quot;The&nbsp;canonical&nbsp;empty&nbsp;list&nbsp;symbol.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
031&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
032&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TODO:&nbsp;this&nbsp;doesn&#x27;t&nbsp;really&nbsp;work,&nbsp;because&nbsp;(from&nbsp;Clojure)&nbsp;`(empty?&nbsp;NIL)`&nbsp;throws
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
033&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;an&nbsp;exception.&nbsp;It&nbsp;might&nbsp;be&nbsp;better&nbsp;to&nbsp;subclass&nbsp;beowulf.cons_cell.ConsCell&nbsp;to&nbsp;create
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;new&nbsp;singleton&nbsp;class&nbsp;Nil&nbsp;which&nbsp;overrides&nbsp;the&nbsp;`empty`&nbsp;method&nbsp;of&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
035&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IPersistentCollection?&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
036&nbsp;&nbsp;&nbsp;&nbsp;&#x27;NIL)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
037&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
038&nbsp;&nbsp;(def&nbsp;oblist
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
039&nbsp;&nbsp;&nbsp;&nbsp;&quot;The&nbsp;default&nbsp;environment.&quot;
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
040&nbsp;&nbsp;&nbsp;&nbsp;(atom&nbsp;NIL))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
041&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
042&nbsp;&nbsp;(def&nbsp;^:dynamic&nbsp;*options*
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
043&nbsp;&nbsp;&nbsp;&nbsp;&quot;Command&nbsp;line&nbsp;options&nbsp;from&nbsp;invocation.&quot;
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
044&nbsp;&nbsp;&nbsp;&nbsp;{:testing&nbsp;true})
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
045&nbsp;&nbsp;
</span><br/>
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,329 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../coverage.css"/> <title> beowulf/reader/char_reader.clj </title>
</head>
<body>
<span class="covered" title="1 out of 1 forms covered">
001&nbsp;&nbsp;(ns&nbsp;beowulf.reader.char-reader
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
002&nbsp;&nbsp;&nbsp;&nbsp;&quot;Provide&nbsp;sensible&nbsp;line&nbsp;editing,&nbsp;auto&nbsp;completion,&nbsp;and&nbsp;history&nbsp;recall.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
003&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;None&nbsp;of&nbsp;what&#x27;s&nbsp;needed&nbsp;here&nbsp;is&nbsp;really&nbsp;working&nbsp;yet,&nbsp;and&nbsp;a&nbsp;pull&nbsp;request&nbsp;with
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;working&nbsp;implementation&nbsp;would&nbsp;be&nbsp;greatly&nbsp;welcomed.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;##&nbsp;What&#x27;s&nbsp;needed&nbsp;(rough&nbsp;specification)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
009&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.&nbsp;Carriage&nbsp;return&nbsp;**does&nbsp;not**&nbsp;cause&nbsp;input&nbsp;to&nbsp;be&nbsp;returned,&nbsp;**unless**
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a.&nbsp;the&nbsp;number&nbsp;of&nbsp;open&nbsp;brackets&nbsp;`(`&nbsp;and&nbsp;closing&nbsp;brackets&nbsp;`)`&nbsp;match;&nbsp;and
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b.&nbsp;the&nbsp;number&nbsp;of&nbsp;open&nbsp;square&nbsp;brackets&nbsp;`[`&nbsp;and&nbsp;closing&nbsp;square&nbsp;brackets&nbsp;`]`&nbsp;also&nbsp;match;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
012&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.&nbsp;&lt;Ctrl-D&gt;&nbsp;aborts&nbsp;editing&nbsp;and&nbsp;returns&nbsp;the&nbsp;string&nbsp;`STOP`;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
013&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.&nbsp;&lt;Up-arrow&gt;&nbsp;and&nbsp;&lt;down-arrow&gt;&nbsp;scroll&nbsp;back&nbsp;and&nbsp;forward&nbsp;through&nbsp;history,&nbsp;but&nbsp;ideally&nbsp;I&#x27;d&nbsp;like&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
014&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this&nbsp;to&nbsp;be&nbsp;the&nbsp;Lisp&nbsp;history&nbsp;(i.e.&nbsp;the&nbsp;history&nbsp;of&nbsp;S-Expressions&nbsp;actually&nbsp;read&nbsp;by&nbsp;`READ`,&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
015&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rather&nbsp;than&nbsp;the&nbsp;strings&nbsp;which&nbsp;were&nbsp;supplied&nbsp;to&nbsp;`READ`);
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
016&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.&nbsp;&lt;Tab&gt;&nbsp;offers&nbsp;potential&nbsp;auto-completions&nbsp;taken&nbsp;from&nbsp;the&nbsp;value&nbsp;of&nbsp;`(OBLIST)`,&nbsp;ideally&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
017&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;current&nbsp;value,&nbsp;not&nbsp;the&nbsp;value&nbsp;at&nbsp;the&nbsp;time&nbsp;the&nbsp;session&nbsp;started;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.&nbsp;&lt;Back-arrow&gt;&nbsp;and&nbsp;&lt;Forward-arrow&gt;&nbsp;offer&nbsp;movement&nbsp;and&nbsp;editing&nbsp;within&nbsp;the&nbsp;line.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
020&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TODO:&nbsp;There&nbsp;are&nbsp;multiple&nbsp;problems&nbsp;with&nbsp;JLine;&nbsp;a&nbsp;better&nbsp;solution&nbsp;might&nbsp;be
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
021&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;start&nbsp;from&nbsp;here:
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
022&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;7931988&#x2F;how-to-manipulate-control-characters&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
023&nbsp;&nbsp;&nbsp;&nbsp;(:require&nbsp;[beowulf.oblist&nbsp;:refer&nbsp;[*options*&nbsp;oblist]])
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
024&nbsp;&nbsp;&nbsp;&nbsp;(:import&nbsp;[org.jline.reader.impl.completer&nbsp;StringsCompleter]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
025&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[org.jline.reader.impl&nbsp;DefaultParser&nbsp;DefaultParser$Bracket]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
026&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[org.jline.reader&nbsp;LineReaderBuilder]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
027&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[org.jline.terminal&nbsp;TerminalBuilder]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
028&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[org.jline.widget&nbsp;AutopairWidgets&nbsp;AutosuggestionWidgets]))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
029&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
030&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
031&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
032&nbsp;&nbsp;;;;&nbsp;Copyright&nbsp;(C)&nbsp;2022-2023&nbsp;Simon&nbsp;Brooke
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
033&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
034&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and&#x2F;or
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
035&nbsp;&nbsp;;;;&nbsp;modify&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
036&nbsp;&nbsp;;;;&nbsp;as&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation;&nbsp;either&nbsp;version&nbsp;2
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
037&nbsp;&nbsp;;;;&nbsp;of&nbsp;the&nbsp;License,&nbsp;or&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
038&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
039&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
040&nbsp;&nbsp;;;;&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
041&nbsp;&nbsp;;;;&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
042&nbsp;&nbsp;;;;&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
043&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
044&nbsp;&nbsp;;;;&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
045&nbsp;&nbsp;;;;&nbsp;along&nbsp;with&nbsp;this&nbsp;program;&nbsp;if&nbsp;not,&nbsp;write&nbsp;to&nbsp;the&nbsp;Free&nbsp;Software
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
046&nbsp;&nbsp;;;;&nbsp;Foundation,&nbsp;Inc.,&nbsp;51&nbsp;Franklin&nbsp;Street,&nbsp;Fifth&nbsp;Floor,&nbsp;Boston,&nbsp;MA&nbsp;&nbsp;02110-1301,&nbsp;USA.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
047&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
048&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
049&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
050&nbsp;&nbsp;;;&nbsp;It&nbsp;looks&nbsp;from&nbsp;the&nbsp;example&nbsp;given&nbsp;[here](https:&#x2F;&#x2F;github.com&#x2F;jline&#x2F;jline3&#x2F;blob&#x2F;master&#x2F;demo&#x2F;src&#x2F;main&#x2F;java&#x2F;org&#x2F;jline&#x2F;demo&#x2F;Repl.java)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
051&nbsp;&nbsp;;;&nbsp;as&nbsp;though&nbsp;JLine&nbsp;could&nbsp;be&nbsp;used&nbsp;to&nbsp;build&nbsp;a&nbsp;perfect&nbsp;line-reader&nbsp;for&nbsp;Beowulf;&nbsp;but&nbsp;it&nbsp;also
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
052&nbsp;&nbsp;;;&nbsp;looks&nbsp;as&nbsp;though&nbsp;you&#x27;d&nbsp;need&nbsp;a&nbsp;DPhil&nbsp;in&nbsp;JLine&nbsp;to&nbsp;write&nbsp;it,&nbsp;and&nbsp;I&nbsp;don&#x27;t&nbsp;have
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
053&nbsp;&nbsp;;;&nbsp;the&nbsp;time.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
054&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
055&nbsp;&nbsp;(defn&nbsp;build-completer
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
056&nbsp;&nbsp;&nbsp;&nbsp;&quot;Build&nbsp;a&nbsp;completer&nbsp;which&nbsp;takes&nbsp;tokens&nbsp;from&nbsp;the&nbsp;oblist.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
057&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
058&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This&nbsp;is&nbsp;sort-of&nbsp;working,&nbsp;in&nbsp;as&nbsp;much&nbsp;as&nbsp;hitting&nbsp;&lt;TAB&gt;&nbsp;on&nbsp;a&nbsp;blank&nbsp;line&nbsp;will&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;show&nbsp;a&nbsp;table&nbsp;of&nbsp;values&nbsp;from&nbsp;the&nbsp;oblist,&nbsp;but&nbsp;hitting&nbsp;&lt;TAB&gt;&nbsp;after&nbsp;you&#x27;ve&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;started&nbsp;input&nbsp;does&nbsp;not&nbsp;show&nbsp;potential&nbsp;completions&nbsp;for&nbsp;tokens&nbsp;you&#x27;ve&nbsp;started.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;[]
</span><br/>
<span class="not-covered" title="0 out of 12 forms covered">
062&nbsp;&nbsp;&nbsp;&nbsp;(StringsCompleter.&nbsp;(map&nbsp;#(str&nbsp;(first&nbsp;%))&nbsp;@oblist)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
063&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
064&nbsp;&nbsp;;;&nbsp;This&nbsp;breaks;&nbsp;it&nbsp;is&nbsp;not&nbsp;correctly&nbsp;resolving&nbsp;the&nbsp;Enum,&nbsp;although&nbsp;I&nbsp;can&#x27;t&nbsp;work&nbsp;out
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
065&nbsp;&nbsp;;;&nbsp;why&nbsp;not.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
066&nbsp;&nbsp;;;&nbsp;(defn&nbsp;build-parser
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
067&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;[]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
068&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;(println&nbsp;&quot;Building&nbsp;parser&quot;)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
069&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;(let&nbsp;[parser&nbsp;(DefaultParser.)]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
070&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(doall
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
071&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(.setEofOnUnclosedBracket&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
072&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parser&nbsp;DefaultParser$Bracket&#x2F;ROUND))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
073&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
074&nbsp;&nbsp;(def&nbsp;get-reader
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
075&nbsp;&nbsp;&nbsp;&nbsp;&quot;Return&nbsp;a&nbsp;reader,&nbsp;first&nbsp;constructing&nbsp;it&nbsp;if&nbsp;necessary.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
076&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
077&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**NOTE&nbsp;THAT**&nbsp;this&nbsp;is&nbsp;not&nbsp;settled&nbsp;API.&nbsp;The&nbsp;existence&nbsp;and&nbsp;call&nbsp;signature&nbsp;of
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this&nbsp;function&nbsp;is&nbsp;not&nbsp;guaranteed&nbsp;in&nbsp;future&nbsp;versions.&quot;
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
079&nbsp;&nbsp;&nbsp;&nbsp;(memoize&nbsp;(fn&nbsp;[]
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[term&nbsp;(.build&nbsp;(.system&nbsp;(TerminalBuilder&#x2F;builder)&nbsp;true))
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
081&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reader&nbsp;(-&gt;&nbsp;(LineReaderBuilder&#x2F;builder)
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
082&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(.terminal&nbsp;&nbsp;term)
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
083&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(.completer&nbsp;&nbsp;(build-completer))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
084&nbsp;&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#(.parser&nbsp;%&nbsp;(build-parser))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
085&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(.build))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
086&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;apw&nbsp;(AutopairWidgets.&nbsp;reader&nbsp;false)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
087&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;asw&nbsp;(AutosuggestionWidgets.&nbsp;reader)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
088&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
089&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;(.enable&nbsp;apw)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
090&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;(.enable&nbsp;asw)
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
091&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reader))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
092&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
093&nbsp;&nbsp;(defn&nbsp;read-chars
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
094&nbsp;&nbsp;&nbsp;&nbsp;&quot;A&nbsp;drop-in&nbsp;replacement&nbsp;for&nbsp;`clojure.core&#x2F;read-line`,&nbsp;except&nbsp;that&nbsp;line&nbsp;editing
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
095&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;history&nbsp;should&nbsp;be&nbsp;enabled.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
096&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
097&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**NOTE&nbsp;THAT**&nbsp;this&nbsp;does&nbsp;not&nbsp;fully&nbsp;work&nbsp;yet,&nbsp;but&nbsp;it&nbsp;is&nbsp;in&nbsp;the&nbsp;API&nbsp;because&nbsp;I&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
098&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;work&nbsp;later!&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
099&nbsp;&nbsp;&nbsp;&nbsp;[prompt]
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
100&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[eddie&nbsp;(get-reader)]
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
101&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(loop&nbsp;[s&nbsp;(.readLine&nbsp;eddie&nbsp;(str&nbsp;prompt&nbsp;&quot;&nbsp;&quot;))]
</span><br/>
<span class="not-covered" title="0 out of 12 forms covered">
102&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(and&nbsp;(=&nbsp;(count&nbsp;(re-seq&nbsp;#&quot;\(&quot;&nbsp;s))
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
103&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(count&nbsp;(re-seq&nbsp;#&quot;\)&quot;&nbsp;s)))
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
104&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(=&nbsp;(count&nbsp;(re-seq&nbsp;#&quot;\[]&quot;&nbsp;s))
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
105&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(count&nbsp;(re-seq&nbsp;#&quot;\]&quot;&nbsp;s))))
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
106&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
107&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(recur&nbsp;(str&nbsp;s&nbsp;&quot;&nbsp;&quot;&nbsp;(.readLine&nbsp;eddie&nbsp;&quot;::&nbsp;&quot;)))))))
</span><br/>
</body>
</html>

View file

@ -0,0 +1,836 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../coverage.css"/> <title> beowulf/reader/generate.clj </title>
</head>
<body>
<span class="covered" title="1 out of 1 forms covered">
001&nbsp;&nbsp;(ns&nbsp;beowulf.reader.generate
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
002&nbsp;&nbsp;&nbsp;&nbsp;&quot;Generating&nbsp;S-Expressions&nbsp;from&nbsp;parse&nbsp;trees.&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
003&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;##&nbsp;From&nbsp;Lisp&nbsp;1.5&nbsp;Programmers&nbsp;Manual,&nbsp;page&nbsp;10
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Note&nbsp;that&nbsp;I&#x27;ve&nbsp;retyped&nbsp;much&nbsp;of&nbsp;this,&nbsp;since&nbsp;copy&#x2F;pasting&nbsp;out&nbsp;of&nbsp;PDF&nbsp;is&nbsp;less
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;than&nbsp;reliable.&nbsp;Any&nbsp;typos&nbsp;are&nbsp;mine.*
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Quote&nbsp;starts:*
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
009&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;We&nbsp;are&nbsp;now&nbsp;in&nbsp;a&nbsp;position&nbsp;to&nbsp;define&nbsp;the&nbsp;universal&nbsp;LISP&nbsp;function
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`evalquote[fn;args]`,&nbsp;When&nbsp;evalquote&nbsp;is&nbsp;given&nbsp;a&nbsp;function&nbsp;and&nbsp;a&nbsp;list&nbsp;of&nbsp;arguments
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
012&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for&nbsp;that&nbsp;function,&nbsp;it&nbsp;computes&nbsp;the&nbsp;value&nbsp;of&nbsp;the&nbsp;function&nbsp;applied&nbsp;to&nbsp;the&nbsp;arguments.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
013&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LISP&nbsp;functions&nbsp;have&nbsp;S-expressions&nbsp;as&nbsp;arguments.&nbsp;In&nbsp;particular,&nbsp;the&nbsp;argument&nbsp;`fn`
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
014&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;the&nbsp;function&nbsp;evalquote&nbsp;must&nbsp;be&nbsp;an&nbsp;S-expression.&nbsp;Since&nbsp;we&nbsp;have&nbsp;been
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
015&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writing&nbsp;functions&nbsp;as&nbsp;M-expressions,&nbsp;it&nbsp;is&nbsp;necessary&nbsp;to&nbsp;translate&nbsp;them&nbsp;into
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
016&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S-expressions.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
017&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;following&nbsp;rules&nbsp;define&nbsp;a&nbsp;method&nbsp;of&nbsp;translating&nbsp;functions&nbsp;written&nbsp;in&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;meta-language&nbsp;into&nbsp;S-expressions.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
020&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.&nbsp;If&nbsp;the&nbsp;function&nbsp;is&nbsp;represented&nbsp;by&nbsp;its&nbsp;name,&nbsp;it&nbsp;is&nbsp;translated&nbsp;by&nbsp;changing
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
021&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;all&nbsp;of&nbsp;the&nbsp;letters&nbsp;to&nbsp;upper&nbsp;case,&nbsp;making&nbsp;it&nbsp;an&nbsp;atomic&nbsp;symbol.&nbsp;Thus&nbsp;`car`&nbsp;is&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
022&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;translated&nbsp;to&nbsp;`CAR`.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
023&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.&nbsp;If&nbsp;the&nbsp;function&nbsp;uses&nbsp;the&nbsp;lambda&nbsp;notation,&nbsp;then&nbsp;the&nbsp;expression
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
024&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`λ[[x&nbsp;..;xn];&nbsp;ε]`&nbsp;is&nbsp;translated&nbsp;into&nbsp;`(LAMBDA&nbsp;(X1&nbsp;...XN)&nbsp;ε*)`,&nbsp;where&nbsp;ε*&nbsp;is&nbsp;the&nbsp;translation
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
025&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;of&nbsp;ε.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
026&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.&nbsp;If&nbsp;the&nbsp;function&nbsp;begins&nbsp;with&nbsp;label,&nbsp;then&nbsp;the&nbsp;translation&nbsp;of
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
027&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`label[α;ε]`&nbsp;is&nbsp;`(LABEL&nbsp;α*&nbsp;ε*)`.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
028&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
029&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Forms&nbsp;are&nbsp;translated&nbsp;as&nbsp;follows:
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
030&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.&nbsp;A&nbsp;variable,&nbsp;like&nbsp;a&nbsp;function&nbsp;name,&nbsp;is&nbsp;translated&nbsp;by&nbsp;using&nbsp;uppercase&nbsp;letters.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
031&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thus&nbsp;the&nbsp;translation&nbsp;of&nbsp;`var1`&nbsp;is&nbsp;`VAR1`.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
032&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.&nbsp;The&nbsp;obvious&nbsp;translation&nbsp;of&nbsp;letting&nbsp;a&nbsp;constant&nbsp;translate&nbsp;into&nbsp;itself&nbsp;will&nbsp;not
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
033&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;work.&nbsp;Since&nbsp;the&nbsp;translation&nbsp;of&nbsp;`x`&nbsp;is&nbsp;`X`,&nbsp;the&nbsp;translation&nbsp;of&nbsp;`X`&nbsp;must&nbsp;be&nbsp;something
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;to&nbsp;avoid&nbsp;ambiguity.&nbsp;The&nbsp;solution&nbsp;is&nbsp;to&nbsp;quote&nbsp;it.&nbsp;Thus&nbsp;`X`&nbsp;is&nbsp;translated
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
035&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;into&nbsp;`(QUOTE&nbsp;X)`.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
036&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.&nbsp;The&nbsp;form&nbsp;`fn[argl;.&nbsp;..;argn]`&nbsp;is&nbsp;translated&nbsp;into&nbsp;`(fn*&nbsp;argl*&nbsp;...argn*)`
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
037&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.&nbsp;The&nbsp;conditional&nbsp;expression&nbsp;`[pl-el;...;pn-en]`&nbsp;is&nbsp;translated&nbsp;into
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
038&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`(COND&nbsp;(p1*&nbsp;e1*)...(pn*&nbsp;en*))`
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
039&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
040&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;##&nbsp;Examples
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
041&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;```
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
042&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;M-expressions&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S-expressions&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
043&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
044&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
045&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;car&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CAR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
046&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;car[x]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(CAR&nbsp;X)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
047&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(QUOTE&nbsp;T)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
048&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ff[car&nbsp;[x]]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(FF&nbsp;(CAR&nbsp;X))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
049&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[atom[x]-&gt;x;&nbsp;T-&gt;ff[car[x]]]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(COND&nbsp;((ATOM&nbsp;X)&nbsp;X)&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((QUOTE&nbsp;T)(FF&nbsp;(CAR&nbsp;X))))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
051&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label[ff;λ[[x];[atom[x]-&gt;x;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(LABEL&nbsp;FF&nbsp;(LAMBDA&nbsp;(X)&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
052&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;T-&gt;ff[car[x]]]]]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(COND&nbsp;((ATOM&nbsp;X)&nbsp;X)&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
053&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((QUOTE&nbsp;T)(FF&nbsp;(CAR&nbsp;X))))))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
054&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;```
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
055&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
056&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*quote&nbsp;ends*
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
057&nbsp;&nbsp;&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
058&nbsp;&nbsp;&nbsp;&nbsp;(:require&nbsp;[beowulf.cons-cell&nbsp;:refer&nbsp;[make-beowulf-list&nbsp;make-cons-cell]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.reader.macros&nbsp;:refer&nbsp;[expand-macros]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.oblist&nbsp;:refer&nbsp;[NIL]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.math.numeric-tower&nbsp;:refer&nbsp;[expt]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
062&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.string&nbsp;:refer&nbsp;[upper-case]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
063&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.tools.trace&nbsp;:refer&nbsp;[deftrace]]))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
064&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
065&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
066&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
067&nbsp;&nbsp;;;;&nbsp;Copyright&nbsp;(C)&nbsp;2022-2023&nbsp;Simon&nbsp;Brooke
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
068&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
069&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and&#x2F;or
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
070&nbsp;&nbsp;;;;&nbsp;modify&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
071&nbsp;&nbsp;;;;&nbsp;as&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation;&nbsp;either&nbsp;version&nbsp;2
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
072&nbsp;&nbsp;;;;&nbsp;of&nbsp;the&nbsp;License,&nbsp;or&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
073&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
074&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
075&nbsp;&nbsp;;;;&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
076&nbsp;&nbsp;;;;&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
077&nbsp;&nbsp;;;;&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
078&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
079&nbsp;&nbsp;;;;&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
080&nbsp;&nbsp;;;;&nbsp;along&nbsp;with&nbsp;this&nbsp;program;&nbsp;if&nbsp;not,&nbsp;write&nbsp;to&nbsp;the&nbsp;Free&nbsp;Software
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
081&nbsp;&nbsp;;;;&nbsp;Foundation,&nbsp;Inc.,&nbsp;51&nbsp;Franklin&nbsp;Street,&nbsp;Fifth&nbsp;Floor,&nbsp;Boston,&nbsp;MA&nbsp;&nbsp;02110-1301,&nbsp;USA.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
082&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
083&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
084&nbsp;&nbsp;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
085&nbsp;&nbsp;(declare&nbsp;generate)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
086&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
087&nbsp;&nbsp;(defn&nbsp;gen-cond-clause
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
088&nbsp;&nbsp;&nbsp;&nbsp;&quot;Generate&nbsp;a&nbsp;cond&nbsp;clause&nbsp;from&nbsp;this&nbsp;simplified&nbsp;parse&nbsp;tree&nbsp;fragment&nbsp;`p`;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
089&nbsp;&nbsp;&nbsp;&nbsp;returns&nbsp;`nil`&nbsp;if&nbsp;`p`&nbsp;does&nbsp;not&nbsp;represent&nbsp;a&nbsp;cond&nbsp;clause.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
090&nbsp;&nbsp;&nbsp;&nbsp;[p&nbsp;context]
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
091&nbsp;&nbsp;&nbsp;&nbsp;(when
</span><br/>
<span class="partial" title="11 out of 12 forms covered">
092&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(and&nbsp;(coll?&nbsp;p)&nbsp;(=&nbsp;:cond-clause&nbsp;(first&nbsp;p)))
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
093&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(make-beowulf-list
</span><br/>
<span class="partial" title="12 out of 13 forms covered">
094&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(list&nbsp;(if&nbsp;(=&nbsp;(nth&nbsp;p&nbsp;1)&nbsp;[:quoted-expr&nbsp;[:atom&nbsp;&quot;T&quot;]])
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
095&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x27;T
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
096&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(nth&nbsp;p&nbsp;1)&nbsp;context))
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
097&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(nth&nbsp;p&nbsp;2)&nbsp;context)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
098&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
099&nbsp;&nbsp;(defn&nbsp;gen-cond
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
100&nbsp;&nbsp;&nbsp;&nbsp;&quot;Generate&nbsp;a&nbsp;cond&nbsp;statement&nbsp;from&nbsp;this&nbsp;simplified&nbsp;parse&nbsp;tree&nbsp;fragment&nbsp;`p`;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
101&nbsp;&nbsp;&nbsp;&nbsp;returns&nbsp;`nil`&nbsp;if&nbsp;`p`&nbsp;does&nbsp;not&nbsp;represent&nbsp;a&nbsp;(MEXPR)&nbsp;cond&nbsp;statement.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
102&nbsp;&nbsp;&nbsp;&nbsp;[p&nbsp;context]
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
103&nbsp;&nbsp;&nbsp;&nbsp;(when
</span><br/>
<span class="partial" title="11 out of 12 forms covered">
104&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(and&nbsp;(coll?&nbsp;p)&nbsp;(=&nbsp;:cond&nbsp;(first&nbsp;p)))
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
105&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(make-beowulf-list
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
106&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cons
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
107&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x27;COND
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
108&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(map
</span><br/>
<span class="partial" title="8 out of 9 forms covered">
109&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#(generate&nbsp;%&nbsp;(if&nbsp;(=&nbsp;context&nbsp;:mexpr)&nbsp;:cond-mexpr&nbsp;context))
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
110&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(rest&nbsp;p))))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
111&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
112&nbsp;&nbsp;(defn&nbsp;gen-fn-call
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
113&nbsp;&nbsp;&nbsp;&nbsp;&quot;Generate&nbsp;a&nbsp;function&nbsp;call&nbsp;from&nbsp;this&nbsp;simplified&nbsp;parse&nbsp;tree&nbsp;fragment&nbsp;`p`;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
114&nbsp;&nbsp;&nbsp;&nbsp;returns&nbsp;`nil`&nbsp;if&nbsp;`p`&nbsp;does&nbsp;not&nbsp;represent&nbsp;a&nbsp;(MEXPR)&nbsp;function&nbsp;call.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
115&nbsp;&nbsp;&nbsp;&nbsp;[p&nbsp;context]
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
116&nbsp;&nbsp;&nbsp;&nbsp;(when
</span><br/>
<span class="partial" title="21 out of 23 forms covered">
117&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(and&nbsp;(coll?&nbsp;p)&nbsp;(=&nbsp;:fncall&nbsp;(first&nbsp;p))&nbsp;(=&nbsp;:mvar&nbsp;(first&nbsp;(second&nbsp;p))))
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(make-cons-cell
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
119&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(second&nbsp;p)&nbsp;context)
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(nth&nbsp;p&nbsp;2)&nbsp;context))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
121&nbsp;&nbsp;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
122&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
123&nbsp;&nbsp;(defn&nbsp;gen-dot-terminated-list
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
124&nbsp;&nbsp;&nbsp;&nbsp;&quot;Generate&nbsp;a&nbsp;list,&nbsp;which&nbsp;may&nbsp;be&nbsp;dot-terminated,&nbsp;from&nbsp;this&nbsp;partial&nbsp;parse&nbsp;tree
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
125&nbsp;&nbsp;&nbsp;&nbsp;&#x27;p&#x27;.&nbsp;Note&nbsp;that&nbsp;the&nbsp;function&nbsp;acts&nbsp;recursively&nbsp;and&nbsp;progressively&nbsp;decapitates
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
126&nbsp;&nbsp;&nbsp;&nbsp;its&nbsp;argument,&nbsp;so&nbsp;that&nbsp;the&nbsp;argument&nbsp;will&nbsp;not&nbsp;always&nbsp;be&nbsp;a&nbsp;valid&nbsp;parse&nbsp;tree.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
127&nbsp;&nbsp;&nbsp;&nbsp;[p]
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
128&nbsp;&nbsp;&nbsp;&nbsp;(cond
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(empty?&nbsp;p)
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
130&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NIL
</span><br/>
<span class="partial" title="15 out of 16 forms covered">
131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(and&nbsp;(coll?&nbsp;(first&nbsp;p))&nbsp;(=&nbsp;:dot-terminal&nbsp;(first&nbsp;(first&nbsp;p))))
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[dt&nbsp;(first&nbsp;p)]
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
133&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(make-cons-cell
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
134&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(nth&nbsp;dt&nbsp;1))
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
135&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(nth&nbsp;dt&nbsp;2))))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
136&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
137&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(make-cons-cell
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
138&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(first&nbsp;p))
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
139&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(gen-dot-terminated-list&nbsp;(rest&nbsp;p)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
140&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
141&nbsp;&nbsp;;;&nbsp;null[x]&nbsp;=&nbsp;[x&nbsp;=&nbsp;NIL&nbsp;-&gt;&nbsp;T;&nbsp;T&nbsp;-&gt;&nbsp;F]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
142&nbsp;&nbsp;;;&nbsp;[:defn&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
143&nbsp;&nbsp;;;&nbsp;&nbsp;[:mexpr&nbsp;[:fncall&nbsp;[:mvar&nbsp;&quot;null&quot;]&nbsp;[:bindings&nbsp;[:args&nbsp;[:mexpr&nbsp;[:mvar&nbsp;&quot;x&quot;]]]]]]&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
144&nbsp;&nbsp;;;&nbsp;&nbsp;&quot;=&quot;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
145&nbsp;&nbsp;;;&nbsp;&nbsp;[:mexpr&nbsp;[:cond&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
146&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:cond-clause&nbsp;[:mexpr&nbsp;[:iexpr&nbsp;[:lhs&nbsp;[:mexpr&nbsp;[:mvar&nbsp;&quot;x&quot;]]]&nbsp;[:iop&nbsp;&quot;=&quot;]&nbsp;[:rhs&nbsp;[:mexpr&nbsp;[:mconst&nbsp;&quot;NIL&quot;]]]]]&nbsp;[:mexpr&nbsp;[:mconst&nbsp;&quot;T&quot;]]]&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
147&nbsp;&nbsp;;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:cond-clause&nbsp;[:mexpr&nbsp;[:mconst&nbsp;&quot;T&quot;]]&nbsp;[:mexpr&nbsp;[:mconst&nbsp;&quot;F&quot;]]]]]]
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
148&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
149&nbsp;&nbsp;(defn&nbsp;generate-defn
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
150&nbsp;&nbsp;&nbsp;&nbsp;[tree&nbsp;context]
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
151&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(=&nbsp;:mexpr&nbsp;(first&nbsp;tree))
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
152&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate-defn&nbsp;(second&nbsp;tree)&nbsp;context)
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
153&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(make-beowulf-list
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
154&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(list&nbsp;&#x27;PUT
</span><br/>
<span class="covered" title="13 out of 13 forms covered">
155&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(list&nbsp;&#x27;QUOTE&nbsp;(generate&nbsp;(-&gt;&nbsp;tree&nbsp;second&nbsp;second&nbsp;second)&nbsp;context))
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
156&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(list&nbsp;&#x27;QUOTE&nbsp;&#x27;EXPR)
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
157&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(list&nbsp;&#x27;QUOTE
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
158&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cons&nbsp;&#x27;LAMBDA
</span><br/>
<span class="covered" title="12 out of 12 forms covered">
159&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(list&nbsp;(generate&nbsp;(nth&nbsp;(-&gt;&nbsp;tree&nbsp;second&nbsp;second)&nbsp;2)&nbsp;context)
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
160&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(nth&nbsp;tree&nbsp;3)&nbsp;context))))))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
161&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
162&nbsp;&nbsp;(defn&nbsp;gen-iexpr
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
163&nbsp;&nbsp;&nbsp;&nbsp;[tree&nbsp;context]
</span><br/>
<span class="not-covered" title="0 out of 11 forms covered">
164&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[bundle&nbsp;(reduce&nbsp;#(assoc&nbsp;%1&nbsp;(first&nbsp;%2)&nbsp;%2)
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
165&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{}
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
166&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(rest&nbsp;tree))]
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
167&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(list&nbsp;(generate&nbsp;(:iop&nbsp;bundle)&nbsp;context)
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
168&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(:lhs&nbsp;bundle)&nbsp;context)
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
169&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(:rhs&nbsp;bundle)&nbsp;context))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
170&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
171&nbsp;&nbsp;(defn&nbsp;generate-set
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
172&nbsp;&nbsp;&nbsp;&nbsp;&quot;Actually&nbsp;not&nbsp;sure&nbsp;what&nbsp;the&nbsp;mexpr&nbsp;representation&nbsp;of&nbsp;set&nbsp;looks&nbsp;like&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
173&nbsp;&nbsp;&nbsp;&nbsp;[tree&nbsp;context]
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
174&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(ex-info&nbsp;&quot;Not&nbsp;Yet&nbsp;Implemented&quot;&nbsp;{:feature&nbsp;&quot;generate-set&quot;})))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
175&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
176&nbsp;&nbsp;(defn&nbsp;generate-assign
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
177&nbsp;&nbsp;&nbsp;&nbsp;&quot;Generate&nbsp;an&nbsp;assignment&nbsp;statement&nbsp;based&nbsp;on&nbsp;this&nbsp;`tree`.&nbsp;If&nbsp;the&nbsp;thing&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
178&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;being&nbsp;assigned&nbsp;to&nbsp;is&nbsp;a&nbsp;function&nbsp;signature,&nbsp;then&nbsp;we&nbsp;have&nbsp;to&nbsp;do&nbsp;something&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
179&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;different&nbsp;to&nbsp;if&nbsp;it&#x27;s&nbsp;an&nbsp;atom.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
180&nbsp;&nbsp;&nbsp;&nbsp;[tree&nbsp;context]
</span><br/>
<span class="not-covered" title="0 out of 13 forms covered">
181&nbsp;&nbsp;&nbsp;&nbsp;(case&nbsp;(first&nbsp;(second&nbsp;tree))
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:fncall&nbsp;(generate-defn&nbsp;tree&nbsp;context)
</span><br/>
<span class="not-covered" title="0 out of 12 forms covered">
183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:mexpr&nbsp;(map&nbsp;#(generate&nbsp;%&nbsp;context)&nbsp;(rest&nbsp;(second&nbsp;tree)))
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
184&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:mvar&nbsp;:atom)&nbsp;(generate-set&nbsp;tree&nbsp;context)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
185&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
186&nbsp;&nbsp;(defn&nbsp;strip-leading-zeros
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
187&nbsp;&nbsp;&nbsp;&nbsp;&quot;`read-string`&nbsp;interprets&nbsp;strings&nbsp;with&nbsp;leading&nbsp;zeros&nbsp;as&nbsp;octal;&nbsp;strip
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
188&nbsp;&nbsp;&nbsp;&nbsp;any&nbsp;from&nbsp;this&nbsp;string&nbsp;`s`.&nbsp;If&nbsp;what&#x27;s&nbsp;left&nbsp;is&nbsp;empty&nbsp;(i.e.&nbsp;there&nbsp;were
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
189&nbsp;&nbsp;&nbsp;&nbsp;only&nbsp;zeros,&nbsp;return&nbsp;`\&quot;0\&quot;`.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
190&nbsp;&nbsp;&nbsp;&nbsp;([s]
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
191&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(strip-leading-zeros&nbsp;s&nbsp;&quot;&quot;))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
192&nbsp;&nbsp;&nbsp;&nbsp;([s&nbsp;prefix]
</span><br/>
<span class="partial" title="1 out of 2 forms covered">
193&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
194&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(empty?&nbsp;s)&nbsp;&quot;0&quot;
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
195&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(case&nbsp;(first&nbsp;s)
</span><br/>
<span class="partial" title="12 out of 24 forms covered">
196&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(\+&nbsp;\-)&nbsp;(strip-leading-zeros&nbsp;(subs&nbsp;s&nbsp;1)&nbsp;(str&nbsp;(first&nbsp;s)&nbsp;prefix))
</span><br/>
<span class="not-covered" title="0 out of 7 forms covered">
197&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;0&quot;&nbsp;(strip-leading-zeros&nbsp;(subs&nbsp;s&nbsp;1)&nbsp;prefix)
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
198&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;prefix&nbsp;s)))))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
199&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
200&nbsp;&nbsp;(defn&nbsp;generate
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
201&nbsp;&nbsp;&nbsp;&nbsp;&quot;Generate&nbsp;lisp&nbsp;structure&nbsp;from&nbsp;this&nbsp;parse&nbsp;tree&nbsp;`p`.&nbsp;It&nbsp;is&nbsp;assumed&nbsp;that
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
202&nbsp;&nbsp;&nbsp;&nbsp;`p`&nbsp;has&nbsp;been&nbsp;simplified.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
203&nbsp;&nbsp;&nbsp;&nbsp;([p]
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
204&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;p&nbsp;:expr))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
205&nbsp;&nbsp;&nbsp;&nbsp;([p&nbsp;context]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
206&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(try
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
207&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(expand-macros
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
208&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
209&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(coll?&nbsp;p)
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
210&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(case&nbsp;(first&nbsp;p)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
211&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;LAMBDA&quot;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
212&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:λexpr&nbsp;(make-cons-cell
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
213&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(nth&nbsp;p&nbsp;1)&nbsp;context)
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
214&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(make-cons-cell&nbsp;(generate&nbsp;(nth&nbsp;p&nbsp;2)&nbsp;context)
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
215&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(nth&nbsp;p&nbsp;3)&nbsp;context)))
</span><br/>
<span class="covered" title="12 out of 12 forms covered">
216&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:args&nbsp;(make-beowulf-list&nbsp;(map&nbsp;#(generate&nbsp;%&nbsp;context)&nbsp;(rest&nbsp;p)))
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
217&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:atom&nbsp;(symbol&nbsp;(second&nbsp;p))
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
218&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:bindings&nbsp;(generate&nbsp;(second&nbsp;p)&nbsp;context)
</span><br/>
<span class="covered" title="12 out of 12 forms covered">
219&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:body&nbsp;(make-beowulf-list&nbsp;(map&nbsp;#(generate&nbsp;%&nbsp;context)&nbsp;(rest&nbsp;p)))
</span><br/>
<span class="covered" title="12 out of 12 forms covered">
220&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:coefficient&nbsp;:exponent)&nbsp;(generate&nbsp;(second&nbsp;p)&nbsp;context)
</span><br/>
<span class="partial" title="8 out of 9 forms covered">
221&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cond&nbsp;(gen-cond&nbsp;p&nbsp;(if&nbsp;(=&nbsp;context&nbsp;:mexpr)&nbsp;:cond-mexpr&nbsp;context))
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
222&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:cond-clause&nbsp;(gen-cond-clause&nbsp;p&nbsp;context)
</span><br/>
<span class="covered" title="11 out of 11 forms covered">
223&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:decimal&nbsp;(read-string&nbsp;(apply&nbsp;str&nbsp;(map&nbsp;second&nbsp;(rest&nbsp;p))))
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
224&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:defn&nbsp;(generate-defn&nbsp;p&nbsp;context)
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
225&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:dotted-pair&nbsp;(make-cons-cell
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
226&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(nth&nbsp;p&nbsp;1)&nbsp;context)
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
227&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(generate&nbsp;(nth&nbsp;p&nbsp;2)&nbsp;context))
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
228&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:fncall&nbsp;(gen-fn-call&nbsp;p&nbsp;context)
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
229&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:iexpr&nbsp;(gen-iexpr&nbsp;p&nbsp;context)
</span><br/>
<span class="covered" title="7 out of 7 forms covered">
230&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:integer&nbsp;(read-string&nbsp;(strip-leading-zeros&nbsp;(second&nbsp;p)))
</span><br/>
<span class="not-covered" title="0 out of 11 forms covered">
231&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:iop&nbsp;(case&nbsp;(second&nbsp;p)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
232&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;&#x2F;&quot;&nbsp;&#x27;DIFFERENCE
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
233&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;=&quot;&nbsp;&#x27;EQUAL
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
234&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;&gt;&quot;&nbsp;&#x27;GREATERP
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
235&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;&lt;&quot;&nbsp;&#x27;LESSP
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
236&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;+&quot;&nbsp;&#x27;PLUS
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
237&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;*&quot;&nbsp;&#x27;TIMES
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
238&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;else
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
239&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(ex-info&nbsp;&quot;Unrecognised&nbsp;infix&nbsp;operator&nbsp;symbol&quot;
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
240&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:phase&nbsp;:generate
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
241&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:fragment&nbsp;p})))
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
242&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:list&nbsp;(gen-dot-terminated-list&nbsp;(rest&nbsp;p))
</span><br/>
<span class="not-covered" title="0 out of 12 forms covered">
243&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:lhs&nbsp;:rhs)&nbsp;(generate&nbsp;(second&nbsp;p)&nbsp;context)
</span><br/>
<span class="covered" title="11 out of 11 forms covered">
244&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:mexpr&nbsp;(generate&nbsp;(second&nbsp;p)&nbsp;(if&nbsp;(=&nbsp;context&nbsp;:cond-mexpr)&nbsp;context&nbsp;:mexpr))
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
245&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:mconst&nbsp;(if&nbsp;(=&nbsp;context&nbsp;:cond-mexpr)
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
246&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(case&nbsp;(second&nbsp;p)
</span><br/>
<span class="partial" title="5 out of 15 forms covered">
247&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&quot;T&quot;&nbsp;&quot;F&quot;&nbsp;&quot;NIL&quot;)&nbsp;(symbol&nbsp;(second&nbsp;p))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
248&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;else
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
249&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(list&nbsp;&#x27;QUOTE&nbsp;(symbol&nbsp;(second&nbsp;p))))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
250&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;else
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
251&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(list&nbsp;&#x27;QUOTE&nbsp;(symbol&nbsp;(second&nbsp;p))))
</span><br/>
<span class="covered" title="7 out of 7 forms covered">
252&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:mvar&nbsp;(symbol&nbsp;(upper-case&nbsp;(second&nbsp;p)))
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
253&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:number&nbsp;(generate&nbsp;(second&nbsp;p)&nbsp;context)
</span><br/>
<span class="covered" title="9 out of 9 forms covered">
254&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:octal&nbsp;(let&nbsp;[n&nbsp;(read-string&nbsp;(strip-leading-zeros&nbsp;(second&nbsp;p)&nbsp;&quot;0&quot;))
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
255&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scale&nbsp;(generate&nbsp;(nth&nbsp;p&nbsp;3)&nbsp;context)]
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
256&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(*&nbsp;n&nbsp;(expt&nbsp;8&nbsp;scale)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
257&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
258&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;the&nbsp;quote&nbsp;read&nbsp;macro&nbsp;(which&nbsp;probably&nbsp;didn&#x27;t&nbsp;exist&nbsp;in&nbsp;Lisp&nbsp;1.5,&nbsp;but...)
</span><br/>
<span class="covered" title="11 out of 11 forms covered">
259&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:quoted-expr&nbsp;(make-beowulf-list&nbsp;(list&nbsp;&#x27;QUOTE&nbsp;(generate&nbsp;(second&nbsp;p)&nbsp;context)))
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
260&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:scale-factor&nbsp;(if
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
261&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(empty?&nbsp;(second&nbsp;p))&nbsp;0
</span><br/>
<span class="covered" title="7 out of 7 forms covered">
262&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(read-string&nbsp;(strip-leading-zeros&nbsp;(second&nbsp;p))))
</span><br/>
<span class="covered" title="7 out of 7 forms covered">
263&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:scientific&nbsp;(let&nbsp;[n&nbsp;(generate&nbsp;(second&nbsp;p)&nbsp;context)
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
264&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exponent&nbsp;(generate&nbsp;(nth&nbsp;p&nbsp;3)&nbsp;context)]
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
265&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(*&nbsp;n&nbsp;(expt&nbsp;10&nbsp;exponent)))
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
266&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:sexpr&nbsp;(generate&nbsp;(second&nbsp;p)&nbsp;:sexpr)
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
267&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:subr&nbsp;(symbol&nbsp;(second&nbsp;p))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
268&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
269&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;default
</span><br/>
<span class="not-covered" title="0 out of 9 forms covered">
270&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(ex-info&nbsp;(str&nbsp;&quot;Unrecognised&nbsp;head:&nbsp;&quot;&nbsp;(first&nbsp;p))
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
271&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:generating&nbsp;p})))
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
272&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
273&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch&nbsp;Throwable&nbsp;any
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
274&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(ex-info&nbsp;&quot;Could&nbsp;not&nbsp;generate&quot;
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
275&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:generating&nbsp;p}
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
276&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;any))))))
</span><br/>
</body>
</html>

View file

@ -0,0 +1,212 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../coverage.css"/> <title> beowulf/reader/macros.clj </title>
</head>
<body>
<span class="covered" title="1 out of 1 forms covered">
001&nbsp;&nbsp;(ns&nbsp;beowulf.reader.macros
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
002&nbsp;&nbsp;&nbsp;&nbsp;&quot;Can&nbsp;I&nbsp;implement&nbsp;reader&nbsp;macros?&nbsp;let&#x27;s&nbsp;see!
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
003&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;We&nbsp;don&#x27;t&nbsp;need&nbsp;(at&nbsp;least,&nbsp;in&nbsp;the&nbsp;Clojure&nbsp;reader)&nbsp;to&nbsp;rewrite&nbsp;forms&nbsp;like
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`&#x27;FOO`,&nbsp;because&nbsp;that&#x27;s&nbsp;handled&nbsp;by&nbsp;the&nbsp;parser.&nbsp;But&nbsp;we&nbsp;do&nbsp;need&nbsp;to&nbsp;rewrite
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
006&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;things&nbsp;which&nbsp;don&#x27;t&nbsp;evaluate&nbsp;their&nbsp;arguments,&nbsp;like&nbsp;`SETQ`,&nbsp;because&nbsp;(unless
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LABEL&nbsp;does&nbsp;it,&nbsp;which&nbsp;I&#x27;m&nbsp;not&nbsp;yet&nbsp;sure&nbsp;of)&nbsp;we&#x27;re&nbsp;not&nbsp;yet&nbsp;able&nbsp;to&nbsp;implement
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;things&nbsp;which&nbsp;don&#x27;t&nbsp;evaluate&nbsp;arguments.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
009&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TODO:&nbsp;at&nbsp;this&nbsp;stage,&nbsp;the&nbsp;following&nbsp;should&nbsp;probably&nbsp;also&nbsp;be&nbsp;read&nbsp;macros:
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DEFINE&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
012&nbsp;&nbsp;&nbsp;&nbsp;(:require&nbsp;[beowulf.cons-cell&nbsp;:refer&nbsp;[make-beowulf-list]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
013&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[beowulf.host&nbsp;:refer&nbsp;[CONS&nbsp;LIST]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
014&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[clojure.string&nbsp;:refer&nbsp;[join]]))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
015&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
016&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
017&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;;;;&nbsp;We&nbsp;don&#x27;t&nbsp;need&nbsp;(at&nbsp;least,&nbsp;in&nbsp;the&nbsp;Clojure&nbsp;reader)&nbsp;to&nbsp;rewrite&nbsp;forms&nbsp;like
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;;;;&nbsp;&quot;&#x27;FOO&quot;,&nbsp;because&nbsp;that&#x27;s&nbsp;handled&nbsp;by&nbsp;the&nbsp;parser.&nbsp;But&nbsp;we&nbsp;do&nbsp;need&nbsp;to&nbsp;rewrite
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
020&nbsp;&nbsp;;;;&nbsp;things&nbsp;which&nbsp;don&#x27;t&nbsp;evaluate&nbsp;their&nbsp;arguments,&nbsp;like&nbsp;`SETQ`,&nbsp;because&nbsp;(unless
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
021&nbsp;&nbsp;;;;&nbsp;LABEL&nbsp;does&nbsp;it,&nbsp;which&nbsp;I&#x27;m&nbsp;not&nbsp;yet&nbsp;sure&nbsp;of)&nbsp;we&#x27;re&nbsp;not&nbsp;yet&nbsp;able&nbsp;to&nbsp;implement
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
022&nbsp;&nbsp;;;;&nbsp;things&nbsp;which&nbsp;don&#x27;t&nbsp;evaluate&nbsp;arguments.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
023&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
024&nbsp;&nbsp;;;;&nbsp;TODO:&nbsp;at&nbsp;this&nbsp;stage,&nbsp;the&nbsp;following&nbsp;should&nbsp;probably&nbsp;also&nbsp;be&nbsp;read&nbsp;macros:
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
025&nbsp;&nbsp;;;;&nbsp;DEFINE
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
026&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
027&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
028&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
029&nbsp;&nbsp;;;;&nbsp;Copyright&nbsp;(C)&nbsp;2022-2023&nbsp;Simon&nbsp;Brooke
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
030&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
031&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and&#x2F;or
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
032&nbsp;&nbsp;;;;&nbsp;modify&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
033&nbsp;&nbsp;;;;&nbsp;as&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation;&nbsp;either&nbsp;version&nbsp;2
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
034&nbsp;&nbsp;;;;&nbsp;of&nbsp;the&nbsp;License,&nbsp;or&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
035&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
036&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
037&nbsp;&nbsp;;;;&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
038&nbsp;&nbsp;;;;&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
039&nbsp;&nbsp;;;;&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
040&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
041&nbsp;&nbsp;;;;&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
042&nbsp;&nbsp;;;;&nbsp;along&nbsp;with&nbsp;this&nbsp;program;&nbsp;if&nbsp;not,&nbsp;write&nbsp;to&nbsp;the&nbsp;Free&nbsp;Software
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
043&nbsp;&nbsp;;;;&nbsp;Foundation,&nbsp;Inc.,&nbsp;51&nbsp;Franklin&nbsp;Street,&nbsp;Fifth&nbsp;Floor,&nbsp;Boston,&nbsp;MA&nbsp;&nbsp;02110-1301,&nbsp;USA.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
044&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
045&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
046&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
047&nbsp;&nbsp;(def&nbsp;^:dynamic&nbsp;*readmacros*
</span><br/>
<span class="covered" title="6 out of 6 forms covered">
048&nbsp;&nbsp;&nbsp;&nbsp;{:car&nbsp;{&#x27;DEFUN&nbsp;(fn&nbsp;[f]
</span><br/>
<span class="covered" title="9 out of 9 forms covered">
049&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(LIST&nbsp;&#x27;SET&nbsp;(LIST&nbsp;&#x27;QUOTE&nbsp;(second&nbsp;f))
</span><br/>
<span class="covered" title="11 out of 11 forms covered">
050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(LIST&nbsp;&#x27;QUOTE&nbsp;(CONS&nbsp;&#x27;LAMBDA&nbsp;(rest&nbsp;(rest&nbsp;f))))))
</span><br/>
<span class="covered" title="13 out of 13 forms covered">
051&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x27;SETQ&nbsp;(fn&nbsp;[f]&nbsp;(LIST&nbsp;&#x27;SET&nbsp;(LIST&nbsp;&#x27;QUOTE&nbsp;(second&nbsp;f))&nbsp;(nth&nbsp;f&nbsp;2)))}})
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
052&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
053&nbsp;&nbsp;(defn&nbsp;expand-macros
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
054&nbsp;&nbsp;&nbsp;&nbsp;[form]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
055&nbsp;&nbsp;&nbsp;&nbsp;(try
</span><br/>
<span class="covered" title="19 out of 19 forms covered">
056&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if-let&nbsp;[car&nbsp;(when&nbsp;(and&nbsp;(coll?&nbsp;form)&nbsp;(symbol?&nbsp;(first&nbsp;form)))&nbsp;
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
057&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(first&nbsp;form))]
</span><br/>
<span class="covered" title="10 out of 10 forms covered">
058&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if-let&nbsp;[macro&nbsp;(-&gt;&nbsp;*readmacros*&nbsp;:car&nbsp;car)]
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(make-beowulf-list&nbsp;(apply&nbsp;macro&nbsp;(list&nbsp;form)))
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;form)
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;form)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
062&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(catch&nbsp;Exception&nbsp;any
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
063&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(println&nbsp;(join&nbsp;&quot;\n&quot;
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
064&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&quot;#&nbsp;ERROR&nbsp;while&nbsp;expanding&nbsp;macro:&quot;
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
065&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;#&nbsp;Form:&nbsp;&quot;&nbsp;form)
</span><br/>
<span class="not-covered" title="0 out of 5 forms covered">
066&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;#&nbsp;Error&nbsp;class:&nbsp;&quot;&nbsp;(.getName&nbsp;(.getClass&nbsp;any)))
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
067&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;#&nbsp;Message:&nbsp;&quot;&nbsp;(.getMessage&nbsp;any))]))
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
068&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;form)))
</span><br/>
</body>
</html>

View file

@ -0,0 +1,368 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../coverage.css"/> <title> beowulf/reader/parser.clj </title>
</head>
<body>
<span class="covered" title="1 out of 1 forms covered">
001&nbsp;&nbsp;(ns&nbsp;beowulf.reader.parser
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
002&nbsp;&nbsp;&nbsp;&nbsp;&quot;The&nbsp;actual&nbsp;parser,&nbsp;supporting&nbsp;both&nbsp;S-expression&nbsp;and&nbsp;M-expression&nbsp;syntax.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
003&nbsp;&nbsp;&nbsp;&nbsp;(:require&nbsp;[instaparse.core&nbsp;:as&nbsp;i]))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
004&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
005&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
006&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
007&nbsp;&nbsp;;;;&nbsp;Copyright&nbsp;(C)&nbsp;2022-2023&nbsp;Simon&nbsp;Brooke
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
008&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
009&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and&#x2F;or
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;;;;&nbsp;modify&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;;;;&nbsp;as&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation;&nbsp;either&nbsp;version&nbsp;2
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
012&nbsp;&nbsp;;;;&nbsp;of&nbsp;the&nbsp;License,&nbsp;or&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
013&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
014&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
015&nbsp;&nbsp;;;;&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
016&nbsp;&nbsp;;;;&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
017&nbsp;&nbsp;;;;&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;;;;&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
020&nbsp;&nbsp;;;;&nbsp;along&nbsp;with&nbsp;this&nbsp;program;&nbsp;if&nbsp;not,&nbsp;write&nbsp;to&nbsp;the&nbsp;Free&nbsp;Software
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
021&nbsp;&nbsp;;;;&nbsp;Foundation,&nbsp;Inc.,&nbsp;51&nbsp;Franklin&nbsp;Street,&nbsp;Fifth&nbsp;Floor,&nbsp;Boston,&nbsp;MA&nbsp;&nbsp;02110-1301,&nbsp;USA.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
022&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
023&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
024&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
025&nbsp;&nbsp;(def&nbsp;parse
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
026&nbsp;&nbsp;&nbsp;&nbsp;&quot;Parse&nbsp;a&nbsp;string&nbsp;presented&nbsp;as&nbsp;argument&nbsp;into&nbsp;a&nbsp;parse&nbsp;tree&nbsp;which&nbsp;can&nbsp;then
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
027&nbsp;&nbsp;&nbsp;&nbsp;be&nbsp;operated&nbsp;upon&nbsp;further.&quot;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
028&nbsp;&nbsp;&nbsp;&nbsp;(i&#x2F;parser
</span><br/>
<span class="covered" title="13 out of 13 forms covered">
029&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
030&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;we&nbsp;tolerate&nbsp;whitespace&nbsp;and&nbsp;comments&nbsp;around&nbsp;legitimate&nbsp;input
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
031&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;raw&nbsp;:=&nbsp;expr&nbsp;|&nbsp;opt-comment&nbsp;expr&nbsp;opt-comment;&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
032&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;top&nbsp;level:&nbsp;we&nbsp;accept&nbsp;mexprs&nbsp;as&nbsp;well&nbsp;as&nbsp;sexprs.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
033&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;expr&nbsp;:=&nbsp;mexpr&nbsp;|&nbsp;sexpr&nbsp;;&quot;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
034&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
035&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;comments.&nbsp;I&#x27;m&nbsp;pretty&nbsp;confident&nbsp;Lisp&nbsp;1.5&nbsp;did&nbsp;NOT&nbsp;have&nbsp;these.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
036&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;comment&nbsp;:=&nbsp;opt-space&nbsp;&lt;&#x27;;;&#x27;&gt;&nbsp;opt-space&nbsp;#&#x27;[^\\n\\r]*&#x27;;&quot;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
037&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
038&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;there&#x27;s&nbsp;a&nbsp;notation&nbsp;comprising&nbsp;a&nbsp;left&nbsp;brace&nbsp;followed&nbsp;by&nbsp;mexprs
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
039&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;followed&nbsp;by&nbsp;a&nbsp;right&nbsp;brace&nbsp;which&nbsp;doesn&#x27;t&nbsp;seem&nbsp;to&nbsp;be&nbsp;documented&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
040&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;but&nbsp;I&nbsp;think&nbsp;must&nbsp;represent&nbsp;assembly&nbsp;code(?)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
041&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
042&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;&quot;assembly&nbsp;:=&nbsp;lbrace&nbsp;exprs&nbsp;rbrace;&quot;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
043&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
044&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;mexprs.&nbsp;I&#x27;m&nbsp;pretty&nbsp;clear&nbsp;that&nbsp;Lisp&nbsp;1.5&nbsp;could&nbsp;never&nbsp;read&nbsp;these,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
045&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;but&nbsp;it&#x27;s&nbsp;a&nbsp;convenience.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
046&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
047&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;TODO:&nbsp;this&nbsp;works&nbsp;for&nbsp;now&nbsp;but&nbsp;in&nbsp;fact&nbsp;the&nbsp;Programmer&#x27;s&nbsp;Manual
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
048&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;gives&nbsp;a&nbsp;much&nbsp;simpler&nbsp;formulation&nbsp;of&nbsp;M-expression&nbsp;grammar&nbsp;on
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
049&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;page&nbsp;9,&nbsp;and&nbsp;of&nbsp;the&nbsp;S-expression&nbsp;grammar&nbsp;on&nbsp;page&nbsp;8.&nbsp;It&nbsp;would
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;be&nbsp;worth&nbsp;going&nbsp;back&nbsp;and&nbsp;redoing&nbsp;this&nbsp;from&nbsp;the&nbsp;book.
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
051&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
052&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;exprs&nbsp;:=&nbsp;expr&nbsp;|&nbsp;exprs;&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
053&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;mexpr&nbsp;:=&nbsp;λexpr&nbsp;|&nbsp;fncall&nbsp;|&nbsp;defn&nbsp;|&nbsp;cond&nbsp;|&nbsp;mvar&nbsp;|&nbsp;mconst&nbsp;|&nbsp;iexpr&nbsp;|&nbsp;number&nbsp;|&nbsp;mexpr&nbsp;comment;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
054&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;λexpr&nbsp;:=&nbsp;λ&nbsp;lsqb&nbsp;bindings&nbsp;semi-colon&nbsp;opt-space&nbsp;body&nbsp;opt-space&nbsp;rsqb;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
055&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;λ&nbsp;:=&nbsp;&#x27;λ&#x27;&nbsp;|&nbsp;&#x27;lambda&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
056&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bindings&nbsp;:=&nbsp;lsqb&nbsp;args&nbsp;rsqb&nbsp;|&nbsp;lsqb&nbsp;rsqb;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
057&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;body&nbsp;:=&nbsp;(opt-space&nbsp;mexpr&nbsp;semi-colon)*&nbsp;opt-space&nbsp;mexpr;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
058&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fncall&nbsp;:=&nbsp;fn-name&nbsp;bindings;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lsqb&nbsp;:=&nbsp;&#x27;[&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rsqb&nbsp;:=&nbsp;&#x27;]&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lbrace&nbsp;:=&nbsp;&#x27;{&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
062&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rbrace&nbsp;:=&nbsp;&#x27;}&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
063&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;defn&nbsp;:=&nbsp;mexpr&nbsp;opt-space&nbsp;&#x27;=&#x27;&nbsp;opt-space&nbsp;mexpr;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
064&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cond&nbsp;:=&nbsp;lsqb&nbsp;(opt-space&nbsp;cond-clause&nbsp;semi-colon&nbsp;opt-space)*&nbsp;cond-clause&nbsp;rsqb;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
065&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cond-clause&nbsp;:=&nbsp;mexpr&nbsp;opt-space&nbsp;arrow&nbsp;opt-space&nbsp;mexpr&nbsp;opt-space;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
066&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arrow&nbsp;:=&nbsp;&#x27;-&gt;&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
067&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;args&nbsp;:=&nbsp;arg&nbsp;|&nbsp;(opt-space&nbsp;arg&nbsp;semi-colon&nbsp;opt-space)*&nbsp;opt-space&nbsp;arg&nbsp;opt-space;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
068&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arg&nbsp;:=&nbsp;mexpr;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
069&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fn-name&nbsp;:=&nbsp;mvar;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
070&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mvar&nbsp;:=&nbsp;#&#x27;[a-z][a-z0-9]*&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
071&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mconst&nbsp;:=&nbsp;#&#x27;[A-Z][A-Z0-9]*&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
072&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;semi-colon&nbsp;:=&nbsp;&#x27;;&#x27;;&quot;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
073&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
074&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;Infix&nbsp;operators&nbsp;appear&nbsp;in&nbsp;mexprs,&nbsp;e.g.&nbsp;on&nbsp;page&nbsp;7.&nbsp;Ooops!
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
075&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;I&nbsp;do&nbsp;not&nbsp;know&nbsp;what&nbsp;infix&nbsp;operators&nbsp;are&nbsp;considered&nbsp;legal.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
076&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;In&nbsp;particular&nbsp;I&nbsp;do&nbsp;not&nbsp;know&nbsp;what&nbsp;symbol&nbsp;was&nbsp;used&nbsp;for
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
077&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;multiply
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;iexpr&nbsp;:=&nbsp;iexp&nbsp;iop&nbsp;iexp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iexp&nbsp;:=&nbsp;mexpr&nbsp;|&nbsp;number&nbsp;|&nbsp;opt-space&nbsp;iexp&nbsp;opt-space;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iop&nbsp;:=&nbsp;&#x27;&gt;&#x27;&nbsp;|&nbsp;&#x27;&lt;&#x27;&nbsp;|&nbsp;&#x27;+&#x27;&nbsp;|&nbsp;&#x27;-&#x27;&nbsp;|&nbsp;&#x27;*&#x27;&nbsp;&#x27;&#x2F;&#x27;&nbsp;|&nbsp;&#x27;=&#x27;&nbsp;;&quot;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
081&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
082&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;comments.&nbsp;I&#x27;m&nbsp;pretty&nbsp;confident&nbsp;Lisp&nbsp;1.5&nbsp;did&nbsp;NOT&nbsp;have&nbsp;these.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
083&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;opt-comment&nbsp;:=&nbsp;opt-space&nbsp;|&nbsp;comment;&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
084&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;comment&nbsp;:=&nbsp;opt-space&nbsp;&lt;&#x27;;;&#x27;&gt;&nbsp;#&#x27;[^\\n\\r]*&#x27;&nbsp;opt-space;&quot;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
085&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
086&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;sexprs.&nbsp;Note&nbsp;it&#x27;s&nbsp;not&nbsp;clear&nbsp;to&nbsp;me&nbsp;whether&nbsp;Lisp&nbsp;1.5&nbsp;had&nbsp;the&nbsp;quote&nbsp;macro,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
087&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;but&nbsp;I&#x27;ve&nbsp;included&nbsp;it&nbsp;on&nbsp;the&nbsp;basis&nbsp;that&nbsp;it&nbsp;can&nbsp;do&nbsp;little&nbsp;harm.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
088&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;sexpr&nbsp;:=&nbsp;quoted-expr&nbsp;|&nbsp;atom&nbsp;|&nbsp;number&nbsp;|&nbsp;subr&nbsp;|&nbsp;dotted-pair&nbsp;|&nbsp;list&nbsp;|&nbsp;sexpr&nbsp;comment;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
089&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&nbsp;:=&nbsp;lpar&nbsp;sexpr&nbsp;rpar&nbsp;|&nbsp;lpar&nbsp;(sexpr&nbsp;sep)*&nbsp;rpar&nbsp;|&nbsp;lpar&nbsp;(sexpr&nbsp;sep)*&nbsp;dot-terminal&nbsp;|&nbsp;lbrace&nbsp;exprs&nbsp;rbrace;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
090&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list&nbsp;:=&nbsp;lpar&nbsp;opt-space&nbsp;sexpr&nbsp;rpar&nbsp;|&nbsp;lpar&nbsp;opt-space&nbsp;(sexpr&nbsp;sep)*&nbsp;rpar&nbsp;|&nbsp;lpar&nbsp;opt-space&nbsp;(sexpr&nbsp;sep)*&nbsp;dot-terminal;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
091&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dotted-pair&nbsp;:=&nbsp;lpar&nbsp;dot-terminal&nbsp;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
092&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dot&nbsp;:=&nbsp;&#x27;.&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
093&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lpar&nbsp;:=&nbsp;&#x27;(&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
094&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rpar&nbsp;:=&nbsp;&#x27;)&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
095&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quoted-expr&nbsp;:=&nbsp;quote&nbsp;sexpr;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
096&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quote&nbsp;:=&nbsp;&#x27;\\&#x27;&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
097&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dot-terminal&nbsp;:=&nbsp;sexpr&nbsp;space&nbsp;dot&nbsp;space&nbsp;sexpr&nbsp;rpar;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
098&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;space&nbsp;:=&nbsp;#&#x27;\\p{javaWhitespace}+&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
099&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;opt-space&nbsp;:=&nbsp;#&#x27;\\p{javaWhitespace}*&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sep&nbsp;:=&nbsp;&#x27;,&#x27;&nbsp;|&nbsp;opt-space;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
101&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;atom&nbsp;:=&nbsp;#&#x27;[A-Z][A-Z0-9]*&#x27;;&quot;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
102&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
103&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;we&nbsp;need&nbsp;a&nbsp;way&nbsp;of&nbsp;representing&nbsp;Clojure&nbsp;functions&nbsp;on&nbsp;the&nbsp;object&nbsp;list;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
104&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;subr&nbsp;objects&nbsp;aren&#x27;t&nbsp;expected&nbsp;to&nbsp;be&nbsp;normally&nbsp;entered&nbsp;on&nbsp;the&nbsp;REPL,&nbsp;but
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
105&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;must&nbsp;be&nbsp;on&nbsp;the&nbsp;object&nbsp;list&nbsp;or&nbsp;functions&nbsp;to&nbsp;which&nbsp;functions&nbsp;are&nbsp;passed
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
106&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;won&#x27;t&nbsp;be&nbsp;able&nbsp;to&nbsp;access&nbsp;them.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
107&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;subr&nbsp;:=&nbsp;#&#x27;[a-z][a-z.]*&#x2F;[A-Za-z][A-Za-z0-9]*&#x27;;&quot;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
108&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
109&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;&nbsp;Lisp&nbsp;1.5&nbsp;supported&nbsp;octal&nbsp;as&nbsp;well&nbsp;as&nbsp;decimal&nbsp;and&nbsp;scientific&nbsp;notation
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
110&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;number&nbsp;:=&nbsp;integer&nbsp;|&nbsp;decimal&nbsp;|&nbsp;scientific&nbsp;|&nbsp;octal;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
111&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;integer&nbsp;:=&nbsp;#&#x27;-?[0-9]+&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
112&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decimal&nbsp;:=&nbsp;integer&nbsp;dot&nbsp;integer;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
113&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scientific&nbsp;:=&nbsp;coefficient&nbsp;e&nbsp;exponent;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
114&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;coefficient&nbsp;:=&nbsp;decimal&nbsp;|&nbsp;integer;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
115&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exponent&nbsp;:=&nbsp;integer;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
116&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e&nbsp;:=&nbsp;&#x27;E&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
117&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;octal&nbsp;:=&nbsp;#&#x27;[+-]?[0-7]+{1,12}&#x27;&nbsp;q&nbsp;scale-factor;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;q&nbsp;:=&nbsp;&#x27;Q&#x27;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
119&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scale-factor&nbsp;:=&nbsp;#&#x27;[0-9]*&#x27;&quot;)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
120&nbsp;&nbsp;
</span><br/>
</body>
</html>

View file

@ -0,0 +1,401 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../coverage.css"/> <title> beowulf/reader/simplify.clj </title>
</head>
<body>
<span class="covered" title="1 out of 1 forms covered">
001&nbsp;&nbsp;(ns&nbsp;beowulf.reader.simplify
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
002&nbsp;&nbsp;&nbsp;&nbsp;&quot;Simplify&nbsp;parse&nbsp;trees.&nbsp;Be&nbsp;aware&nbsp;that&nbsp;this&nbsp;is&nbsp;very&nbsp;tightly&nbsp;coupled
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
003&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with&nbsp;the&nbsp;parser.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
004&nbsp;&nbsp;&nbsp;&nbsp;(:require&nbsp;[beowulf.oblist&nbsp;:refer&nbsp;[*options*]]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[instaparse.failure&nbsp;:as&nbsp;f])
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
006&nbsp;&nbsp;&nbsp;&nbsp;(:import&nbsp;[instaparse.gll&nbsp;Failure]))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
007&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
008&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
009&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
010&nbsp;&nbsp;;;;&nbsp;Copyright&nbsp;(C)&nbsp;2022-2023&nbsp;Simon&nbsp;Brooke
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
011&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
012&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and&#x2F;or
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
013&nbsp;&nbsp;;;;&nbsp;modify&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
014&nbsp;&nbsp;;;;&nbsp;as&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation;&nbsp;either&nbsp;version&nbsp;2
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
015&nbsp;&nbsp;;;;&nbsp;of&nbsp;the&nbsp;License,&nbsp;or&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
016&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
017&nbsp;&nbsp;;;;&nbsp;This&nbsp;program&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
018&nbsp;&nbsp;;;;&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
019&nbsp;&nbsp;;;;&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
020&nbsp;&nbsp;;;;&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
021&nbsp;&nbsp;;;;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
022&nbsp;&nbsp;;;;&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
023&nbsp;&nbsp;;;;&nbsp;along&nbsp;with&nbsp;this&nbsp;program;&nbsp;if&nbsp;not,&nbsp;write&nbsp;to&nbsp;the&nbsp;Free&nbsp;Software
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
024&nbsp;&nbsp;;;;&nbsp;Foundation,&nbsp;Inc.,&nbsp;51&nbsp;Franklin&nbsp;Street,&nbsp;Fifth&nbsp;Floor,&nbsp;Boston,&nbsp;MA&nbsp;&nbsp;02110-1301,&nbsp;USA.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
025&nbsp;&nbsp;;;;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
026&nbsp;&nbsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
027&nbsp;&nbsp;
</span><br/>
<span class="covered" title="2 out of 2 forms covered">
028&nbsp;&nbsp;(declare&nbsp;simplify-tree)
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
029&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
030&nbsp;&nbsp;(defn&nbsp;remove-optional-space
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
031&nbsp;&nbsp;&nbsp;&nbsp;[tree]
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
032&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(vector?&nbsp;tree)
</span><br/>
<span class="covered" title="7 out of 7 forms covered">
033&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(=&nbsp;:opt-space&nbsp;(first&nbsp;tree))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
034&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nil
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
035&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[v&nbsp;(remove&nbsp;nil?
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
036&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(map&nbsp;remove-optional-space&nbsp;tree))]
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
037&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(seq&nbsp;v)
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
038&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(apply&nbsp;vector&nbsp;v)
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
039&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v)))
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
040&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tree))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
041&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
042&nbsp;&nbsp;(defn&nbsp;remove-nesting
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
043&nbsp;&nbsp;&nbsp;&nbsp;[tree&nbsp;context]
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
044&nbsp;&nbsp;&nbsp;&nbsp;(let&nbsp;[tree&#x27;&nbsp;(remove-optional-space&nbsp;tree)]
</span><br/>
<span class="not-covered" title="0 out of 15 forms covered">
045&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if-let&nbsp;[key&nbsp;(when&nbsp;(and&nbsp;(vector?&nbsp;tree&#x27;)&nbsp;
</span><br/>
<span class="not-covered" title="0 out of 4 forms covered">
046&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(keyword?&nbsp;(first&nbsp;tree&#x27;)))&nbsp;
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
047&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(first&nbsp;tree&#x27;))]
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
048&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(loop&nbsp;[r&nbsp;tree&#x27;]
</span><br/>
<span class="not-covered" title="0 out of 18 forms covered">
049&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(and&nbsp;r&nbsp;(vector?&nbsp;r)&nbsp;(keyword?&nbsp;(first&nbsp;r)))
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
050&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if&nbsp;(=&nbsp;(first&nbsp;r)&nbsp;key)
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
051&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(recur&nbsp;(simplify-tree&nbsp;(second&nbsp;r)&nbsp;context))
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
052&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r)
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
053&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r))
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
054&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tree&#x27;)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
055&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
056&nbsp;&nbsp;(defn&nbsp;simplify-tree
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
057&nbsp;&nbsp;&nbsp;&nbsp;&quot;Simplify&nbsp;this&nbsp;parse&nbsp;tree&nbsp;`p`.&nbsp;If&nbsp;`p`&nbsp;is&nbsp;an&nbsp;instaparse&nbsp;failure&nbsp;object,&nbsp;throw
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
058&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;an&nbsp;`ex-info`,&nbsp;with&nbsp;`p`&nbsp;as&nbsp;the&nbsp;value&nbsp;of&nbsp;its&nbsp;`:failure`&nbsp;key.
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
059&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
060&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**NOTE&nbsp;THAT**&nbsp;it&nbsp;is&nbsp;assumed&nbsp;that&nbsp;`remove-optional-space`&nbsp;has&nbsp;been&nbsp;run&nbsp;on&nbsp;the
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
061&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parse&nbsp;tree&nbsp;**BEFORE**&nbsp;it&nbsp;is&nbsp;passed&nbsp;to&nbsp;`simplify-tree`.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
062&nbsp;&nbsp;&nbsp;&nbsp;([p]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
063&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(if
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
064&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(instance?&nbsp;Failure&nbsp;p)
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
065&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw&nbsp;(ex-info
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
066&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(str&nbsp;&quot;Ic&nbsp;ne&nbsp;behæfd:&nbsp;&quot;&nbsp;(f&#x2F;pprint-failure&nbsp;p))
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
067&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:cause&nbsp;:parse-failure
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
068&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:phase&nbsp;&nbsp;&nbsp;:simplify
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
069&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:failure&nbsp;p}))
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
070&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(simplify-tree&nbsp;p&nbsp;:expr)))
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
071&nbsp;&nbsp;&nbsp;&nbsp;([p&nbsp;context]
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
072&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(cond
</span><br/>
<span class="covered" title="4 out of 4 forms covered">
073&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(string?&nbsp;p)&nbsp;p
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
074&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(coll?&nbsp;p)&nbsp;(apply
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
075&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vector
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
076&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(remove
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
077&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#(when&nbsp;(coll?&nbsp;%)&nbsp;(empty?&nbsp;%))
</span><br/>
<span class="partial" title="16 out of 19 forms covered">
078&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(case&nbsp;(first&nbsp;p)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
079&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:λexpr
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
080&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:args&nbsp;:bindings&nbsp;:body&nbsp;:cond&nbsp;:cond-clause&nbsp;:defn&nbsp;:dot-terminal&nbsp;
</span><br/>
<span class="partial" title="80 out of 96 forms covered">
081&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:fncall&nbsp;:lhs&nbsp;:quoted-expr&nbsp;:rhs&nbsp;)&nbsp;(map&nbsp;#(simplify-tree&nbsp;%&nbsp;context)&nbsp;p)
</span><br/>
<span class="partial" title="24 out of 30 forms covered">
082&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:arg&nbsp;:expr&nbsp;:coefficient&nbsp;:fn-name&nbsp;:number)&nbsp;(simplify-tree&nbsp;(second&nbsp;p)&nbsp;context)
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
083&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:arrow&nbsp;:dot&nbsp;:e&nbsp;:lpar&nbsp;:lsqb&nbsp;&nbsp;:opt-comment&nbsp;:opt-space&nbsp;:q&nbsp;:quote&nbsp;:rpar&nbsp;:rsqb
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
084&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:semi-colon&nbsp;:sep&nbsp;:space)&nbsp;nil
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
085&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:atom&nbsp;(if
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
086&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(=&nbsp;context&nbsp;:mexpr)
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
087&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:quoted-expr&nbsp;p]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
088&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p)
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
089&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:comment&nbsp;(when
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
090&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:strict&nbsp;*options*)
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
091&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
092&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ex-info&nbsp;&quot;Cannot&nbsp;parse&nbsp;comments&nbsp;in&nbsp;strict&nbsp;mode&quot;
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
093&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:cause&nbsp;:strict})))
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
094&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:decimal&nbsp;:integer&nbsp;:mconst&nbsp;:octal&nbsp;:scientific)&nbsp;p
</span><br/>
<span class="not-covered" title="0 out of 1 forms covered">
095&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:dotted-pair&nbsp;(if
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
096&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(=&nbsp;context&nbsp;:mexpr)
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
097&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:fncall
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
098&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:mvar&nbsp;&quot;cons&quot;]
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
099&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:args
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
100&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(simplify-tree&nbsp;(nth&nbsp;p&nbsp;1)&nbsp;context)
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
101&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(simplify-tree&nbsp;(nth&nbsp;p&nbsp;2)&nbsp;context)]]
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
102&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(map&nbsp;#(simplify-tree&nbsp;%&nbsp;context)&nbsp;p))
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
103&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:iexp&nbsp;(simplify-tree&nbsp;(second&nbsp;p)&nbsp;context)
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
104&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:iexpr&nbsp;[:iexpr
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
105&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:lhs&nbsp;(simplify-tree&nbsp;(second&nbsp;p)&nbsp;context)]
</span><br/>
<span class="not-covered" title="0 out of 6 forms covered">
106&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(simplify-tree&nbsp;(nth&nbsp;p&nbsp;2)&nbsp;context)&nbsp;;;&nbsp;really&nbsp;should&nbsp;be&nbsp;the&nbsp;operator
</span><br/>
<span class="not-covered" title="0 out of 8 forms covered">
107&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:rhs&nbsp;(simplify-tree&nbsp;(nth&nbsp;p&nbsp;3)&nbsp;context)]]
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
108&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:mexpr&nbsp;(if
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
109&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(:strict&nbsp;*options*)
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
110&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(throw
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
111&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ex-info&nbsp;&quot;Cannot&nbsp;parse&nbsp;meta&nbsp;expressions&nbsp;in&nbsp;strict&nbsp;mode&quot;
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
112&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{:cause&nbsp;:strict}))
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
113&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:mexpr&nbsp;(simplify-tree&nbsp;(second&nbsp;p)&nbsp;:mexpr)])
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
114&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:list&nbsp;(if
</span><br/>
<span class="covered" title="3 out of 3 forms covered">
115&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(=&nbsp;context&nbsp;:mexpr)
</span><br/>
<span class="not-covered" title="0 out of 2 forms covered">
116&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:fncall
</span><br/>
<span class="not-covered" title="0 out of 3 forms covered">
117&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:mvar&nbsp;&quot;list&quot;]
</span><br/>
<span class="not-covered" title="0 out of 11 forms covered">
118&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[:args&nbsp;(apply&nbsp;vector&nbsp;(map&nbsp;simplify-tree&nbsp;(rest&nbsp;p)))]]
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
119&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(map&nbsp;#(simplify-tree&nbsp;%&nbsp;context)&nbsp;p))
</span><br/>
<span class="covered" title="11 out of 11 forms covered">
120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:raw&nbsp;(first&nbsp;(remove&nbsp;empty?&nbsp;(map&nbsp;simplify-tree&nbsp;(rest&nbsp;p))))
</span><br/>
<span class="covered" title="8 out of 8 forms covered">
121&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:sexpr&nbsp;[:sexpr&nbsp;(simplify-tree&nbsp;(second&nbsp;p)&nbsp;:sexpr)]
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
122&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;;;default
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
123&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p)))
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
124&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:else&nbsp;p)))
</span><br/>
<span class="blank" title="0 out of 0 forms covered">
125&nbsp;&nbsp;
</span><br/>
<span class="covered" title="1 out of 1 forms covered">
126&nbsp;&nbsp;(defn&nbsp;simplify
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
127&nbsp;&nbsp;&nbsp;&nbsp;&quot;Simplify&nbsp;this&nbsp;parse&nbsp;tree&nbsp;`p`.&nbsp;If&nbsp;`p`&nbsp;is&nbsp;an&nbsp;instaparse&nbsp;failure&nbsp;object,&nbsp;throw
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
128&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;an&nbsp;`ex-info`,&nbsp;with&nbsp;`p`&nbsp;as&nbsp;the&nbsp;value&nbsp;of&nbsp;its&nbsp;`:failure`&nbsp;key.&nbsp;Calls&nbsp;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`remove-optional-space`&nbsp;before&nbsp;processing.&quot;
</span><br/>
<span class="not-tracked" title="0 out of 0 forms covered">
130&nbsp;&nbsp;&nbsp;&nbsp;[p]
</span><br/>
<span class="covered" title="5 out of 5 forms covered">
131&nbsp;&nbsp;&nbsp;&nbsp;(simplify-tree&nbsp;(remove-optional-space&nbsp;p)))
</span><br/>
</body>
</html>

View file

@ -16,88 +16,229 @@
</tr></thead>
<tr>
<td><a href="beowulf/bootstrap.clj.html">beowulf.bootstrap</a></td><td class="with-bar"><div class="covered"
style="width:60.47808764940239%;
float:left;"> 759 </div><div class="not-covered"
style="width:39.52191235059761%;
float:left;"> 496 </div></td>
<td class="with-number">60.48 %</td>
style="width:64.03688524590164%;
float:left;"> 625 </div><div class="not-covered"
style="width:35.96311475409836%;
float:left;"> 351 </div></td>
<td class="with-number">64.04 %</td>
<td class="with-bar"><div class="covered"
style="width:47.92626728110599%;
float:left;"> 104 </div><div class="partial"
style="width:19.35483870967742%;
float:left;"> 42 </div><div class="not-covered"
style="width:32.71889400921659%;
float:left;"> 71 </div></td>
<td class="with-number">67.28 %</td>
<td class="with-number">414</td><td class="with-number">46</td><td class="with-number">217</td>
style="width:59.48275862068966%;
float:left;"> 138 </div><div class="partial"
style="width:8.189655172413794%;
float:left;"> 19 </div><div class="not-covered"
style="width:32.327586206896555%;
float:left;"> 75 </div></td>
<td class="with-number">67.67 %</td>
<td class="with-number">422</td><td class="with-number">33</td><td class="with-number">232</td>
</tr>
<tr>
<td><a href="beowulf/cons_cell.clj.html">beowulf.cons-cell</a></td><td class="with-bar"><div class="covered"
style="width:56.82819383259912%;
float:left;"> 129 </div><div class="not-covered"
style="width:43.17180616740088%;
float:left;"> 98 </div></td>
<td class="with-number">56.83 %</td>
style="width:76.0914760914761%;
float:left;"> 366 </div><div class="not-covered"
style="width:23.908523908523907%;
float:left;"> 115 </div></td>
<td class="with-number">76.09 %</td>
<td class="with-bar"><div class="covered"
style="width:57.35294117647059%;
float:left;"> 39 </div><div class="partial"
style="width:4.411764705882353%;
float:left;"> 3 </div><div class="not-covered"
style="width:38.23529411764706%;
float:left;"> 26 </div></td>
<td class="with-number">61.76 %</td>
<td class="with-number">156</td><td class="with-number">15</td><td class="with-number">68</td>
style="width:78.62068965517241%;
float:left;"> 114 </div><div class="partial"
style="width:6.206896551724138%;
float:left;"> 9 </div><div class="not-covered"
style="width:15.172413793103448%;
float:left;"> 22 </div></td>
<td class="with-number">84.83 %</td>
<td class="with-number">274</td><td class="with-number">23</td><td class="with-number">145</td>
</tr>
<tr>
<td><a href="beowulf/core.clj.html">beowulf.core</a></td><td class="with-bar"><div class="covered"
style="width:90.9090909090909%;
float:left;"> 170 </div><div class="not-covered"
style="width:9.090909090909092%;
float:left;"> 17 </div></td>
<td class="with-number">90.91 %</td>
style="width:73.94366197183099%;
float:left;"> 210 </div><div class="not-covered"
style="width:26.056338028169016%;
float:left;"> 74 </div></td>
<td class="with-number">73.94 %</td>
<td class="with-bar"><div class="covered"
style="width:87.75510204081633%;
float:left;"> 43 </div><div class="partial"
style="width:2.0408163265306123%;
float:left;"> 1 </div><div class="not-covered"
style="width:10.204081632653061%;
float:left;"> 5 </div></td>
<td class="with-number">89.80 %</td>
<td class="with-number">80</td><td class="with-number">3</td><td class="with-number">49</td>
style="width:78.26086956521739%;
float:left;"> 54 </div><div class="partial"
style="width:2.898550724637681%;
float:left;"> 2 </div><div class="not-covered"
style="width:18.840579710144926%;
float:left;"> 13 </div></td>
<td class="with-number">81.16 %</td>
<td class="with-number">132</td><td class="with-number">6</td><td class="with-number">69</td>
</tr>
<tr>
<td><a href="beowulf/host.clj.html">beowulf.host</a></td><td class="with-bar"><div class="covered"
style="width:56.44047135310849%;
float:left;"> 1389 </div><div class="not-covered"
style="width:43.55952864689151%;
float:left;"> 1072 </div></td>
<td class="with-number">56.44 %</td>
<td class="with-bar"><div class="covered"
style="width:75.37878787878788%;
float:left;"> 199 </div><div class="partial"
style="width:12.121212121212121%;
float:left;"> 32 </div><div class="not-covered"
style="width:12.5%;
float:left;"> 33 </div></td>
<td class="with-number">87.50 %</td>
<td class="with-number">589</td><td class="with-number">67</td><td class="with-number">264</td>
</tr>
<tr>
<td><a href="beowulf/interop.clj.html">beowulf.interop</a></td><td class="with-bar"><div class="covered"
style="width:57.72357723577236%;
float:left;"> 142 </div><div class="not-covered"
style="width:42.27642276422764%;
float:left;"> 104 </div></td>
<td class="with-number">57.72 %</td>
<td class="with-bar"><div class="covered"
style="width:46.96969696969697%;
float:left;"> 31 </div><div class="partial"
style="width:9.090909090909092%;
float:left;"> 6 </div><div class="not-covered"
style="width:43.93939393939394%;
float:left;"> 29 </div></td>
<td class="with-number">56.06 %</td>
<td class="with-number">129</td><td class="with-number">11</td><td class="with-number">66</td>
</tr>
<tr>
<td><a href="beowulf/io.clj.html">beowulf.io</a></td><td class="with-bar"><div class="covered"
style="width:43.962848297213625%;
float:left;"> 142 </div><div class="not-covered"
style="width:56.037151702786375%;
float:left;"> 181 </div></td>
<td class="with-number">43.96 %</td>
<td class="with-bar"><div class="covered"
style="width:45.833333333333336%;
float:left;"> 33 </div><div class="partial"
style="width:8.333333333333334%;
float:left;"> 6 </div><div class="not-covered"
style="width:45.833333333333336%;
float:left;"> 33 </div></td>
<td class="with-number">54.17 %</td>
<td class="with-number">171</td><td class="with-number">12</td><td class="with-number">72</td>
</tr>
<tr>
<td><a href="beowulf/manual.clj.html">beowulf.manual</a></td><td class="with-bar"><div class="covered"
style="width:95.93088071348942%;
float:left;"> 1721 </div><div class="not-covered"
style="width:4.069119286510591%;
float:left;"> 73 </div></td>
<td class="with-number">95.93 %</td>
<td class="with-bar"><div class="covered"
style="width:94.60317460317461%;
float:left;"> 298 </div><div class="not-covered"
style="width:5.396825396825397%;
float:left;"> 17 </div></td>
<td class="with-number">94.60 %</td>
<td class="with-number">769</td><td class="with-number">4</td><td class="with-number">315</td>
</tr>
<tr>
<td><a href="beowulf/oblist.clj.html">beowulf.oblist</a></td><td class="with-bar"><div class="covered"
style="width:100.0%;
float:left;"> 1 </div></td>
float:left;"> 11 </div></td>
<td class="with-number">100.00 %</td>
<td class="with-bar"><div class="covered"
style="width:100.0%;
float:left;"> 1 </div></td>
float:left;"> 6 </div></td>
<td class="with-number">100.00 %</td>
<td class="with-number">5</td><td class="with-number">1</td><td class="with-number">1</td>
<td class="with-number">45</td><td class="with-number">5</td><td class="with-number">6</td>
</tr>
<tr>
<td><a href="beowulf/read.clj.html">beowulf.read</a></td><td class="with-bar"><div class="covered"
style="width:81.8941504178273%;
float:left;"> 588 </div><div class="not-covered"
style="width:18.105849582172702%;
float:left;"> 130 </div></td>
<td class="with-number">81.89 %</td>
style="width:54.36893203883495%;
float:left;"> 112 </div><div class="not-covered"
style="width:45.63106796116505%;
float:left;"> 94 </div></td>
<td class="with-number">54.37 %</td>
<td class="with-bar"><div class="covered"
style="width:73.80952380952381%;
float:left;"> 93 </div><div class="partial"
style="width:61.702127659574465%;
float:left;"> 29 </div><div class="partial"
style="width:6.382978723404255%;
float:left;"> 3 </div><div class="not-covered"
style="width:31.914893617021278%;
float:left;"> 15 </div></td>
<td class="with-number">68.09 %</td>
<td class="with-number">120</td><td class="with-number">10</td><td class="with-number">47</td>
</tr>
<tr>
<td><a href="beowulf/reader/char_reader.clj.html">beowulf.reader.char-reader</a></td><td class="with-bar"><div class="covered"
style="width:10.0%;
float:left;"> 7 </div><div class="not-covered"
style="width:90.0%;
float:left;"> 63 </div></td>
<td class="with-number">10.00 %</td>
<td class="with-bar"><div class="covered"
style="width:26.31578947368421%;
float:left;"> 5 </div><div class="not-covered"
style="width:73.6842105263158%;
float:left;"> 14 </div></td>
<td class="with-number">26.32 %</td>
<td class="with-number">107</td><td class="with-number">6</td><td class="with-number">19</td>
</tr>
<tr>
<td><a href="beowulf/reader/generate.clj.html">beowulf.reader.generate</a></td><td class="with-bar"><div class="covered"
style="width:69.7872340425532%;
float:left;"> 492 </div><div class="not-covered"
style="width:30.21276595744681%;
float:left;"> 213 </div></td>
<td class="with-number">69.79 %</td>
<td class="with-bar"><div class="covered"
style="width:67.46031746031746%;
float:left;"> 85 </div><div class="partial"
style="width:7.936507936507937%;
float:left;"> 10 </div><div class="not-covered"
style="width:18.253968253968253%;
float:left;"> 23 </div></td>
<td class="with-number">81.75 %</td>
<td class="with-number">315</td><td class="with-number">31</td><td class="with-number">126</td>
style="width:24.603174603174605%;
float:left;"> 31 </div></td>
<td class="with-number">75.40 %</td>
<td class="with-number">276</td><td class="with-number">21</td><td class="with-number">126</td>
</tr>
<tr>
<td><a href="beowulf/reader/macros.clj.html">beowulf.reader.macros</a></td><td class="with-bar"><div class="covered"
style="width:80.18867924528301%;
float:left;"> 85 </div><div class="not-covered"
style="width:19.81132075471698%;
float:left;"> 21 </div></td>
<td class="with-number">80.19 %</td>
<td class="with-bar"><div class="covered"
style="width:70.0%;
float:left;"> 14 </div><div class="not-covered"
style="width:30.0%;
float:left;"> 6 </div></td>
<td class="with-number">70.00 %</td>
<td class="with-number">68</td><td class="with-number">4</td><td class="with-number">20</td>
</tr>
<tr>
<td><a href="beowulf/reader/parser.clj.html">beowulf.reader.parser</a></td><td class="with-bar"><div class="covered"
style="width:100.0%;
float:left;"> 17 </div></td>
<td class="with-number">100.00 %</td>
<td class="with-bar"><div class="covered"
style="width:100.0%;
float:left;"> 4 </div></td>
<td class="with-number">100.00 %</td>
<td class="with-number">120</td><td class="with-number">14</td><td class="with-number">4</td>
</tr>
<tr>
<td><a href="beowulf/reader/simplify.clj.html">beowulf.reader.simplify</a></td><td class="with-bar"><div class="covered"
style="width:57.30337078651685%;
float:left;"> 255 </div><div class="not-covered"
style="width:42.69662921348315%;
float:left;"> 190 </div></td>
<td class="with-number">57.30 %</td>
<td class="with-bar"><div class="covered"
style="width:49.382716049382715%;
float:left;"> 40 </div><div class="partial"
style="width:3.7037037037037037%;
float:left;"> 3 </div><div class="not-covered"
style="width:46.91358024691358%;
float:left;"> 38 </div></td>
<td class="with-number">53.09 %</td>
<td class="with-number">131</td><td class="with-number">6</td><td class="with-number">81</td>
</tr>
<tr><td>Totals:</td>
<td class="with-bar"></td>
<td class="with-number">68.97 %</td>
<td class="with-number">68.60 %</td>
<td class="with-bar"></td>
<td class="with-number">72.89 %</td>
<td class="with-number">77.76 %</td>
</tr>
</table>
</body>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,17 +1,19 @@
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>Further Reading</title><link rel="icon" type="image/x-icon" href="../img/beowulf_logo_favicon.png" /><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Beowulf</span> <span class="project-version">0.3.0</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 current"><a href="further_reading.html"><div class="inner"><span>Further Reading</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>beowulf</span></div></a></li><li class="depth-1 "><a href="mexpr.html"><div class="inner"><span>Interpreting M-Expressions</span></div></a></li><li class="depth-1 "><a href="values.html"><div class="inner"><span>The properties of the system, and their values</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>beowulf</span></div></div></li><li class="depth-2 branch"><a href="beowulf.bootstrap.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bootstrap</span></div></a></li><li class="depth-2 branch"><a href="beowulf.cons-cell.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cons-cell</span></div></a></li><li class="depth-2 branch"><a href="beowulf.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="beowulf.gendoc.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gendoc</span></div></a></li><li class="depth-2 branch"><a href="beowulf.host.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>host</span></div></a></li><li class="depth-2 branch"><a href="beowulf.interop.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>interop</span></div></a></li><li class="depth-2 branch"><a href="beowulf.io.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>io</span></div></a></li><li class="depth-2 branch"><a href="beowulf.manual.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manual</span></div></a></li><li class="depth-2 branch"><a href="beowulf.oblist.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>oblist</span></div></a></li><li class="depth-2 branch"><a href="beowulf.read.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>read</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></div></li><li class="depth-3 branch"><a href="beowulf.reader.char-reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>char-reader</span></div></a></li><li class="depth-3 branch"><a href="beowulf.reader.generate.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>generate</span></div></a></li><li class="depth-3 branch"><a href="beowulf.reader.macros.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>macros</span></div></a></li><li class="depth-3 branch"><a href="beowulf.reader.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="beowulf.reader.simplify.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>simplify</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#further-reading" name="further-reading"></a>Further Reading</h1>
<html><head><meta charset="UTF-8" /><title>Further Reading</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><link rel="icon" type="image/x-icon" href="../img/beowulf_logo_favicon.png" /></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Beowulf</span> <span class="project-version">0.3.1-SNAPSHOT</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 current"><a href="further_reading.html"><div class="inner"><span>Further Reading</span></div></a></li><li class="depth-1 "><a href="intro.html"><div class="inner"><span>beowulf</span></div></a></li><li class="depth-1 "><a href="mexpr.html"><div class="inner"><span>Interpreting M-Expressions</span></div></a></li><li class="depth-1 "><a href="values.html"><div class="inner"><span>The properties of the system, and their values</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>beowulf</span></div></div></li><li class="depth-2 branch"><a href="beowulf.bootstrap.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bootstrap</span></div></a></li><li class="depth-2 branch"><a href="beowulf.cons-cell.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>cons-cell</span></div></a></li><li class="depth-2 branch"><a href="beowulf.core.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2 branch"><a href="beowulf.gendoc.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gendoc</span></div></a></li><li class="depth-2 branch"><a href="beowulf.host.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>host</span></div></a></li><li class="depth-2 branch"><a href="beowulf.interop.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>interop</span></div></a></li><li class="depth-2 branch"><a href="beowulf.io.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>io</span></div></a></li><li class="depth-2 branch"><a href="beowulf.manual.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>manual</span></div></a></li><li class="depth-2 branch"><a href="beowulf.oblist.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>oblist</span></div></a></li><li class="depth-2 branch"><a href="beowulf.read.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>read</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reader</span></div></div></li><li class="depth-3 branch"><a href="beowulf.reader.char-reader.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>char-reader</span></div></a></li><li class="depth-3 branch"><a href="beowulf.reader.generate.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>generate</span></div></a></li><li class="depth-3 branch"><a href="beowulf.reader.macros.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>macros</span></div></a></li><li class="depth-3 branch"><a href="beowulf.reader.parser.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parser</span></div></a></li><li class="depth-3"><a href="beowulf.reader.simplify.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>simplify</span></div></a></li><li class="depth-2"><a href="beowulf.scratch.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>scratch</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#further-reading" id="further-reading"></a>Further Reading</h1>
<ol>
<li><a href="http://bitsavers.org/pdf/mit/computer_center/Coding_for_the_MIT-IBM_704_Computer_Oct57.pdf">CODING for the MIT-IBM 704 COMPUTER, October 1957</a> This paper is not about Lisp. But it is about the particular individual computer on which Lisp was first implemented, and it is written in part by members of the Lisp team. I have found it useful in understanding the software environment in which, and the constraints under which, Lisp was written.</li>
<li><a href="https://www.softwarepreservation.org/projects/LISP/MIT/AIM-001.pdf">MIT AI Memo 1, John McCarthy, September 1958</a> This is, as far as I can find, the earliest specification document of the Lisp project.</li>
<li><a href="https://bitsavers.org/pdf/mit/rle_lisp/LISP_I_Programmers_Manual_Mar60.pdf">Lisp 1 Programmers Manual, Phyllis Fox, March 1960</a></li>
<li><a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=81">Lisp 1.5 Programmers Manual, Michael I. Levin, August 1962</a> This book is essential reading: it documents in some detail the first fully realised Lisp language system.</li>
<li><a href="https://dl.acm.org/doi/pdf/10.1145/800055.802047#page=3">Early LISP History (1956 - 1959), Herbert Stoyan, August 1984</a></li>
<li>
<p><a href="http://www.paulgraham.com/rootsoflisp.html">The Roots of Lisp, Paul Graham, 2001</a></p></li>
<li>
<p><a href="http://www.paulgraham.com/icad.html">The Revenge of the Nerds, Paul Graham, 2002</a> This is mainly about why to use Lisp as a language for modern commercial software, but has useful insights into where it comes from.</p>
<blockquote>
<p>So the short explanation of why this 1950s language is not obsolete is that it was not technology but math, and math doesnt get stale.</p>
</blockquote></li>
</ol></div></div></div></body></html>
<li><a href="http://bitsavers.org/pdf/mit/computer_center/Coding_for_the_MIT-IBM_704_Computer_Oct57.pdf">CODING for the MIT-IBM 704 COMPUTER, October 1957</a> This paper is not about Lisp. But it is about the particular individual computer on which Lisp was first implemented, and it is written in part by members of the Lisp team. I have found it useful in understanding the software environment in which, and the constraints under which, Lisp was written.</li>
<li><a href="https://www.softwarepreservation.org/projects/LISP/MIT/AIM-001.pdf">MIT AI Memo 1, John McCarthy, September 1958</a> This is, as far as I can find, the earliest specification document of the Lisp project.</li>
<li><a href="https://bitsavers.org/pdf/mit/rle_lisp/LISP_I_Programmers_Manual_Mar60.pdf">Lisp 1 Programmers Manual, Phyllis Fox, March 1960</a></li>
<li><a href="https://www.softwarepreservation.org/projects/LISP/book/LISP%201.5%20Programmers%20Manual.pdf#page=81">Lisp 1.5 Programmers Manual, Michael I. Levin, August 1962</a> This book is essential reading: it documents in some detail the first fully realised Lisp language system.</li>
<li><a href="https://dl.acm.org/doi/pdf/10.1145/800055.802047#page=3">Early LISP History (1956 - 1959), Herbert Stoyan, August 1984</a></li>
<li>
<p><a href="http://www.paulgraham.com/rootsoflisp.html">The Roots of Lisp, Paul Graham, 2001</a></p>
</li>
<li><a href="http://www.paulgraham.com/icad.html">The Revenge of the Nerds, Paul Graham, 2002</a> This is mainly about why to use Lisp as a language for modern commercial software, but has useful insights into where it comes from.
<blockquote>
<p>So the short explanation of why this 1950s language is not obsolete is that it was not technology but math, and math doesnt get stale.</p>
</blockquote>
</li>
</ol>
</div></div></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,17 +1,12 @@
(defproject beowulf "0.3.0"
(defproject beowulf "0.3.1-SNAPSHOT"
:aot :all
:cloverage {:output "docs/cloverage"
:ns-exclude-regex [#"beowulf\.gendoc" #"beowulf\.scratch"]}
:codox {:html {:transforms [[:head] [:append
[:link {:rel "icon"
:type "image/x-icon"
:href "../img/beowulf_logo_favicon.png"}]]]}
:metadata {:doc "**TODO**: write docs"
:codox {:metadata {:doc "**TODO**: write docs"
:doc/format :markdown}
:output-path "docs/codox"
:source-uri "https://github.com/simon-brooke/beowulf/blob/master/{filepath}#L{line}"
;; :themes [:journeyman]
}
:themes [:journeyman]}
:description "LISP 1.5 is to all Lisp dialects as Beowulf is to English literature."
:license {:name "GPL-2.0-or-later"
:url "https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html"}
@ -23,15 +18,17 @@
[clojure.java-time "1.2.0"]
[environ "1.2.0"]
[instaparse "1.4.12"]
;; [org.jline/jline "3.23.0"]
[rhizome "0.2.9"] ;; not needed in production builds
[org.jline/jline "3.23.0"]
[com.github.seancorfield/expectations "2.0.165"]
;; [rhizome "0.2.9"] ;; not needed in production builds
]
:main beowulf.core
:plugins [[lein-cloverage "1.2.2"]
[lein-codox "0.10.7"]
[lein-codox "0.10.8"]
[lein-environ "1.1.0"]]
:profiles {:jar {:aot :all}
:uberjar {:aot :all}}
:uberjar {:aot :all}
:dev {:resource-paths ["resources"]}}
:release-tasks [["vcs" "assert-committed"]
["change" "version" "leiningen.release/bump-version" "release"]
["vcs" "commit"]
@ -42,4 +39,4 @@
["change" "version" "leiningen.release/bump-version"]
["vcs" "commit"]]
:target-path "target/%s"
:url "https://github.com/simon-brooke/the-great-game")
:url "https://github.com/simon-brooke/beowulf")

View file

@ -0,0 +1,563 @@
body {
font-family: Helvetica, Arial, sans-serif;
font-size: 15px;
color: limegreen;
background-color: black;
}
a {
color: lime;
}
a:active, a:hover {
color: yellowgreen;
}
a:visited {
color: green;
}
pre, code {
font-family: Monaco, DejaVu Sans Mono, Consolas, monospace;
font-size: 9pt;
margin: 15px 0;
color: limegreen;
background-color: #111;
}
h1 {
font-weight: normal;
font-size: 29px;
margin: 10px 0 2px 0;
padding: 0;
}
h2 {
font-weight: normal;
font-size: 25px;
}
th, td {
vertical-align: top;
}
h5.license {
margin: 9px 0 22px 0;
color: lime;
font-weight: normal;
font-size: 12px;
font-style: italic;
}
.document h1, .namespace-index h1 {
font-size: 32px;
margin-top: 12px;
}
#header, #content, .sidebar {
position: fixed;
}
#header {
top: 0;
left: 0;
right: 0;
height: 22px;
color: limegreen;
padding: 5px 7px;
}
#content {
top: 32px;
right: 0;
bottom: 0;
overflow: auto;
background: black;
color: green;
padding: 0 18px;
}
.sidebar {
position: fixed;
top: 32px;
bottom: 0;
overflow: auto;
}
.sidebar.primary {
background: #080808;
border-right: solid 1px forestgreen;
left: 0;
width: 250px;
}
.sidebar.secondary {
background: #111;
border-right: solid 1px darkgreen;
left: 251px;
width: 200px;
}
#content.namespace-index, #content.document {
left: 251px;
}
#content.namespace-docs {
left: 452px;
}
#content.document {
padding-bottom: 10%;
}
#header {
background: #080808;
box-shadow: 0 0 8px rgba(192, 255, 192, 0.4);
z-index: 100;
}
#header h1 {
margin: 0;
padding: 0;
font-size: 18px;
font-weight: lighter;
text-shadow: -1px -1px 0px #333;
}
#header h1 .project-version {
font-weight: normal;
}
.project-version {
padding-left: 0.15em;
}
#header a, .sidebar a {
display: block;
text-decoration: none;
}
#header h2 {
float: right;
font-size: 9pt;
font-weight: normal;
margin: 4px 3px;
padding: 0;
color: #5f5;
}
#header h2 a {
display: inline;
}
.sidebar h3 {
margin: 0;
padding: 10px 13px 0 13px;
font-size: 19px;
font-weight: lighter;
}
.sidebar h3 a {
color: #4f4;
}
.sidebar h3.no-link {
color: green;
}
.sidebar ul {
padding: 7px 0 6px 0;
margin: 0;
}
.sidebar ul.index-link {
padding-bottom: 4px;
}
.sidebar li {
display: block;
vertical-align: middle;
}
.sidebar li a, .sidebar li .no-link {
border-left: 3px solid transparent;
padding: 0 10px;
white-space: nowrap;
}
.sidebar li .no-link {
display: block;
color: #7F7;
font-style: italic;
}
.sidebar li .inner {
display: inline-block;
padding-top: 7px;
height: 24px;
}
.sidebar li a, .sidebar li .tree {
height: 31px;
}
.depth-1 .inner { padding-left: 2px; }
.depth-2 .inner { padding-left: 6px; }
.depth-3 .inner { padding-left: 20px; }
.depth-4 .inner { padding-left: 34px; }
.depth-5 .inner { padding-left: 48px; }
.depth-6 .inner { padding-left: 62px; }
.sidebar li .tree {
display: block;
float: left;
position: relative;
top: -10px;
margin: 0 4px 0 0;
padding: 0;
}
.sidebar li.depth-1 .tree {
display: none;
}
.sidebar li .tree .top, .sidebar li .tree .bottom {
display: block;
margin: 0;
padding: 0;
width: 7px;
}
.sidebar li .tree .top {
border-left: 1px solid yellowgreen;
border-bottom: 1px solid yellowgreen;
height: 19px;
}
.sidebar li .tree .bottom {
height: 22px;
}
.sidebar li.branch .tree .bottom {
border-left: 1px solid yellowgreen;
}
.sidebar.primary li.current a {
border-left: 3px solid goldenrod;
color: goldenrod;
}
.sidebar.secondary li.current a {
border-left: 3px solid yellow;
color: yellow;
}
.namespace-index h2 {
margin: 30px 0 0 0;
}
.namespace-index h3 {
font-size: 16px;
font-weight: bold;
margin-bottom: 0;
}
.namespace-index .topics {
padding-left: 30px;
margin: 11px 0 0 0;
}
.namespace-index .topics li {
padding: 5px 0;
}
.namespace-docs h3 {
font-size: 18px;
font-weight: bold;
}
.public h3 {
margin: 0;
float: left;
}
.usage {
clear: both;
}
.public {
margin: 0;
border-top: 1px solid lime;
padding-top: 14px;
padding-bottom: 6px;
}
.public:last-child {
margin-bottom: 20%;
}
.members .public:last-child {
margin-bottom: 0;
}
.members {
margin: 15px 0;
}
.members h4 {
color: lime;
font-weight: normal;
font-variant: small-caps;
margin: 0 0 5px 0;
}
.members .inner {
padding-top: 5px;
padding-left: 12px;
margin-top: 2px;
margin-left: 7px;
border-left: 1px solid #5f5;
}
#content .members .inner h3 {
font-size: 12pt;
}
.members .public {
border-top: none;
margin-top: 0;
padding-top: 6px;
padding-bottom: 0;
}
.members .public:first-child {
padding-top: 0;
}
h4.type,
h4.dynamic,
h4.added,
h4.deprecated {
float: left;
margin: 3px 10px 15px 0;
font-size: 15px;
font-weight: bold;
font-variant: small-caps;
}
.public h4.type,
.public h4.dynamic,
.public h4.added,
.public h4.deprecated {
font-size: 13px;
font-weight: bold;
margin: 3px 0 0 10px;
}
.members h4.type,
.members h4.added,
.members h4.deprecated {
margin-top: 1px;
}
h4.type {
color: #717171;
}
h4.dynamic {
color: #9933aa;
}
h4.added {
color: #7acc32;
}
h4.deprecated {
color: #880000;
}
.namespace {
margin-bottom: 30px;
}
.namespace:last-child {
margin-bottom: 10%;
}
.index {
padding: 0;
font-size: 80%;
margin: 15px 0;
line-height: 16px;
}
.index * {
display: inline;
}
.index p {
padding-right: 3px;
}
.index li {
padding-right: 5px;
}
.index ul {
padding-left: 0;
}
.type-sig {
clear: both;
color: goldenrod;
}
.type-sig pre {
padding-top: 10px;
margin: 0;
}
.usage code {
display: block;
margin: 2px 0;
color: limegreen;
}
.usage code:first-child {
padding-top: 10px;
}
p {
margin: 15px 0;
}
.public p:first-child, .public pre.plaintext {
margin-top: 12px;
}
.doc {
margin: 0 0 26px 0;
clear: both;
}
.public .doc {
margin: 0;
}
.namespace-index .doc {
margin-bottom: 20px;
}
.namespace-index .namespace .doc {
margin-bottom: 10px;
}
.markdown p, .markdown li, .markdown dt, .markdown dd, .markdown td {
line-height: 22px;
}
.markdown li {
padding: 2px 0;
}
.markdown h2 {
font-weight: normal;
font-size: 25px;
margin: 30px 0 10px 0;
}
.markdown h3 {
font-weight: normal;
font-size: 20px;
margin: 30px 0 0 0;
}
.markdown h4 {
font-size: 15px;
margin: 22px 0 -4px 0;
}
.doc, .public, .namespace .index {
max-width: 680px;
overflow-x: visible;
}
.markdown pre > code {
display: block;
padding: 10px;
}
.markdown pre > code, .src-link a {
border: 1px solid lime;
border-radius: 2px;
}
.markdown code:not(.hljs), .src-link a {
background: #111;
}
pre.deps {
display: inline-block;
margin: 0 10px;
border: 1px solid lime;
border-radius: 2px;
padding: 10px;
background-color: #111;
}
.markdown hr {
border-style: solid;
border-top: none;
color: goldenrod;
}
.doc ul, .doc ol {
padding-left: 30px;
}
.doc table {
border-collapse: collapse;
margin: 0 10px;
}
.doc table td, .doc table th {
border: 1px solid goldenrod;
padding: 4px 6px;
}
.doc table th {
background: #111;
}
.doc dl {
margin: 0 10px 20px 10px;
}
.doc dl dt {
font-weight: bold;
margin: 0;
padding: 3px 0;
border-bottom: 1px solid goldenrod;
}
.doc dl dd {
padding: 5px 0;
margin: 0 0 5px 10px;
}
.doc abbr {
border-bottom: 1px dotted goldenrod;
font-variant: none;
cursor: help;
}
.src-link {
margin-bottom: 15px;
}
.src-link a {
font-size: 70%;
padding: 1px 4px;
text-decoration: none;
color: lime5bb;
}

View file

@ -0,0 +1,97 @@
/*
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #333;
background: #f8f8f8;
}
.hljs-comment,
.hljs-quote {
color: #998;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: #333;
font-weight: bold;
}
.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color: #008080;
}
.hljs-string,
.hljs-doctag {
color: #d14;
}
.hljs-title,
.hljs-section,
.hljs-selector-id {
color: #900;
font-weight: bold;
}
.hljs-subst {
font-weight: normal;
}
.hljs-type,
.hljs-class .hljs-title {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}
.hljs-regexp,
.hljs-link {
color: #009926;
}
.hljs-symbol,
.hljs-bullet {
color: #990073;
}
.hljs-built_in,
.hljs-builtin-name {
color: #0086b3;
}
.hljs-meta {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View file

@ -0,0 +1,11 @@
{:resources ["css/default.css" "css/highlight.css"]
:transforms [[:head] [:append
[:link {:rel "stylesheet"
:type "text/css"
:href "css/default.css"}]
[:link {:rel "stylesheet"
:type "text/css"
:href "css/highlight.css"}]
[:link {:rel "icon"
:type "image/x-icon"
:href "../img/beowulf_logo_favicon.png"}]]]}

View file

@ -1 +0,0 @@
{:resources ["css/default.css" "css/highlight.css"]}

View file

@ -25,6 +25,7 @@
(T (ASSOC X (CDR L)))))
SUBR (BEOWULF HOST ASSOC))
(ATOM 32767 SUBR (BEOWULF HOST ATOM))
(ATTRIB 32767 SUBR (BEOWULF HOST ATTRIB))
(CAR 32767 SUBR (BEOWULF HOST CAR))
(CAAAAR 32767 EXPR (LAMBDA (X) (CAR (CAR (CAR (CAR X))))))
(CAAADR 32767 EXPR (LAMBDA (X) (CAR (CAR (CAR (CDR X))))))
@ -55,6 +56,16 @@
(CDDDR 32767 EXPR (LAMBDA (X) (CDR (CDR (CDR X)))))
(CDDR 32767 EXPR (LAMBDA (X) (CDR (CDR X))))
(CDR 32767 SUBR (BEOWULF HOST CDR))
(CONC
32767
FEXPR
(LABEL
ARGS
(COND
((COND
((ONEP (LENGTH ARGS)) ARGS)
(T (ATTRIB (CAR ARGS) (APPLY CONC (CDR ARGS) NIL))))
ARGS))))
(CONS 32767 SUBR (BEOWULF HOST CONS))
(CONSP 32767 SUBR (BEOWULF HOST CONSP))
(COPY
@ -170,6 +181,7 @@
(COND
((NULL X) (U))
((EQ (CAR X) Y) (CDR X)) (T (PROP (CDR X) Y U)))))
(PUT 32767 SUBR (BEOWULF HOST PUT))
(QUOTE 32767 EXPR (LAMBDA (X) X))
(QUOTIENT 32767 SUBR (BEOWULF HOST QUOTIENT))
(RANGE
@ -187,6 +199,7 @@
(LAMBDA (N X) (COND ((EQ N 0) NIL) (T (CONS X (REPEAT (SUB1 N) X))))))
(RPLACA 32767 SUBR (BEOWULF HOST RPLACA))
(RPLACD 32767 SUBR (BEOWULF HOST RPLACD))
(SASSOC 32767 SUBR (BEOWULF BOOTSTRAP SASSOC))
(SEARCH 32767 EXPR
(LAMBDA (X P F U)
(COND ((NULL X) (U X))

View file

@ -1 +1,7 @@
;; TODO
;; This isn't working but it's really not far off.
(PUT 'CONC 'FEXPR
;; possibly ARGS should be (ARGS)...
'(LABEL ARGS
(COND ((COND ((ONEP (LENGTH ARGS)) ARGS)
(T (ATTRIB (CAR ARGS) (APPLY CONC (CDR ARGS) NIL)))) ARGS))))

22
resources/sexpr/fact.lsp Normal file
View file

@ -0,0 +1,22 @@
;; Common Lisp
(defun range (max &key (min 0) (step 1))
(loop for n from min below max by step
collect n))
(mapcar #'(lambda (x) (+ x 1)) (range 10))
(defun factoriali (n)
(reduce #'* (range (+ n 1) :min 1 :step 1)))
(defun factorialr (n)
(cond ((= n 1) 1)
(t (* n (factorialr (- n 1))))))
;; Clojure
(defn factorial [n]
(reduce *' (range 1 (+ n 1))))
(defn expt [n x]
(reduce *' (repeat x n)))

View file

@ -0,0 +1,13 @@
;; Bottom of page 66
(PUT 'SELECT 'FEXPR
'(LABEL FORM
(PROG (Q BODY)
(SETQ Q (EVAL (CAR FORM))) ;; not sure that Q should be evaled.
(SETQ BODY (CDR FORM))
LOOP
(COND
((EQ NIL (CDR BODY)) (RETURN (CAR BODY)))
((EQ Q (EVAL (CAAR BODY))) (RETURN (CDAR BODY))))
(SETQ BODY (CDR BODY))
(GO LOOP))))

View file

@ -11,9 +11,10 @@
objects."
(:require [beowulf.cons-cell :refer [F make-beowulf-list make-cons-cell
pretty-print T]]
[beowulf.host :refer [ASSOC ATOM CAAR CADAR CADDR CADR CAR CDR GET
LIST NUMBERP PAIRLIS traced?]]
[beowulf.oblist :refer [*options* NIL oblist]])
[beowulf.host :refer [ASSOC ATOM CAAR CAADR CADAR CADDR CADR CAR CDR
CONS ERROR GET LIST NUMBERP PAIRLIS traced?]]
[beowulf.oblist :refer [*options* NIL]]
[clojure.tools.trace :refer [deftrace]])
(:import [beowulf.cons_cell ConsCell]
[clojure.lang Symbol]))
@ -37,10 +38,16 @@
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare APPLY EVAL prog-eval)
(declare APPLY EVAL EVCON prog-eval)
;;;; The PROGram feature ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(def ^:dynamic
*depth*
"Stack depth. Unfortunately we need to be able to pass round depth for
functions which call EVAL/APPLY but do not know about depth."
0)
(def find-target
(memoize
(fn [target body]
@ -82,30 +89,45 @@
(cond
(number? expr) expr
(symbol? expr) (@vars expr)
(instance? ConsCell expr) (case (.getCar expr)
COND (prog-cond (.getCdr expr)
(instance? ConsCell expr) (case (CAR expr)
COND (prog-cond (CDR expr)
vars env depth)
GO (make-cons-cell
'*PROGGO* (.getCar (.getCdr expr)))
RETURN (make-cons-cell
GO (let [target (CADR expr)]
(when (traced? 'PROG)
(println " PROG:GO: Goto " target))
(make-cons-cell
'*PROGGO* target))
RETURN (let [val (prog-eval
(CADR expr)
vars env depth)]
(when (traced? 'PROG)
(println " PROG:RETURN: Returning "
val)
(make-cons-cell
'*PROGRETURN*
(prog-eval (.getCar (.getCdr expr))
vars env depth))
SET (let [v (CADDR expr)]
val)))
SET (let [var (prog-eval (CADR expr)
vars env depth)
val (prog-eval (CADDR expr)
vars env depth)]
(when (traced? 'PROG)
(println " PROG:SET: Setting "
var " to " val))
(swap! vars
assoc
(prog-eval (CADR expr)
vars env depth)
(prog-eval (CADDR expr)
vars env depth))
v)
SETQ (let [v (CADDR expr)]
var
val)
val)
SETQ (let [var (CADDR expr)
val (prog-eval var
vars env depth)]
(when (traced? 'PROG)
(println " PROG:SETQ: Setting " var " to " val))
(swap! vars
assoc
(CADR expr)
(prog-eval v
vars env depth))
v)
val)
val)
;; else
(beowulf.bootstrap/EVAL expr
(merge-vars vars env)
@ -218,7 +240,7 @@
(println (str "<" indent " " function-symbol " " response))))
response)
(defn- value
(defn value
"Seek a value for this symbol `s` by checking each of these indicators in
turn."
([s]
@ -228,6 +250,21 @@
(first (remove #(= % NIL) (map #(GET s %)
indicators))))))
(defn SASSOC
"Like `ASSOC`, but with an action to take if no value is found.
From the manual, page 60:
'The function `sassoc` searches `y`, which is a list of dotted pairs, for
a pair whose first element that is `x`. If such a pair is found, the value
of `sassoc` is this pair. Otherwise the function `u` of no arguments is
taken as the value of `sassoc`.'"
[x y u]
(let [v (ASSOC x y)]
(if-not (= v NIL) v
(APPLY u NIL NIL))))
;;;; APPLY ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn try-resolve-subroutine
@ -248,7 +285,7 @@
return the result."
[^Symbol function-symbol args ^ConsCell environment depth]
(trace-call function-symbol args depth)
(let [lisp-fn (value function-symbol '(EXPR FEXPR))
(let [lisp-fn (value function-symbol '(EXPR FEXPR)) ;; <-- should these be handled differently? I think so!
args' (cond (= NIL args) args
(empty? args) NIL
(instance? ConsCell args) args
@ -275,6 +312,43 @@
(trace-response function-symbol result depth)
result))
;; (LABEL ARGS
;; (COND ((COND ((ONEP (LENGTH ARGS)) ARGS)
;; (T (ATTRIB (CAR ARGS) (APPLY CONC (CDR ARGS) NIL))))
;; ARGS)))
;; ((1 2 3 4) (5 6 7 8) (9 10 11 12))
;; NIL
;; (def function (make-beowulf-list '(LABEL ARGS (COND
;; ((COND ((ONEP (LENGTH ARGS)) ARGS)
;; (T (ATTRIB (CAR ARGS)
;; (APPLY CONC (CDR ARGS) NIL))))
;; ARGS)))))
;; (def args (make-beowulf-list '((1 2 3 4) (5 6 7 8) (9 10 11 12))))
;; function
;; (CADR function)
;; (CADDR function)
(defn apply-label
"Apply in the special case that the first element in the function is `LABEL`."
[function args environment depth]
(EVAL
(CADDR function)
(CONS
(CONS (CADR function) args)
environment)
depth))
;; (apply-label function args NIL 1)
;; (APPLY function args NIL 1)
(defn- apply-lambda
"Apply in the special case that the first element in the function is `LAMBDA`."
[function args environment depth]
(EVAL
(CADDR function)
(PAIRLIS (CADR function) args environment) depth))
(defn APPLY
"Apply this `function` to these `arguments` in this `environment` and return
the result.
@ -282,7 +356,10 @@
For bootstrapping, at least, a version of APPLY written in Clojure.
All args are assumed to be symbols or `beowulf.cons-cell/ConsCell` objects.
See page 13 of the Lisp 1.5 Programmers Manual."
[function args environment depth]
([function args environment]
(APPLY function args environment *depth*))
([function args environment depth]
(binding [*depth* (inc depth)]
(trace-call 'APPLY (list function args environment) depth)
(let [result (cond
(= NIL function) (if (:strict *options*)
@ -294,26 +371,19 @@
:type :beowulf})))
(= (ATOM function) T) (apply-symbolic function args environment (inc depth))
:else (case (first function)
LABEL (APPLY
(CADDR function)
args
(make-cons-cell
(make-cons-cell
(CADR function)
(CADDR function))
environment)
depth)
LABEL (apply-label function args environment depth)
FUNARG (APPLY (CADR function) args (CADDR function) depth)
LAMBDA (EVAL
(CADDR function)
(PAIRLIS (CADR function) args environment) depth)
LAMBDA (apply-lambda function args environment depth)
;; else
;; OK, this is *not* what is says in the manual...
;; COND (EVCON ???)
(throw (ex-info "Ungecnáwen wyrþan sí þegnung-weard"
{:phase :apply
:function function
:args args
:type :beowulf}))))]
(trace-response 'APPLY result depth)
result))
result))))
;;;; EVAL ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -361,7 +431,7 @@
(println (str indent ": EVAL: sceald bindele: " (or v "nil"))))
(if (instance? ConsCell v)
(.getCdr v)
(let [v' (value expr (list 'APVAL))]
(let [v' (value expr)]
(when (traced? 'EVAL)
(println (str indent ": EVAL: deóp bindele: (" expr " . " (or v' "nil") ")")))
(if v'
@ -412,11 +482,10 @@
(EVLIS (CDR expr) env depth)
env
depth))
:else (APPLY
(CAR expr)
(EVLIS (CDR expr) env depth)
:else (EVAL (CONS (CDR (SASSOC (CAR expr) env (fn [] (ERROR 'A9))))
(CDR expr))
env
depth))]
(inc depth)))]
(trace-response 'EVAL result depth)
result)))

View file

@ -53,7 +53,8 @@
(.canRead (io/file %)))
"Could not find sysout file"]]
["-s" "--strict" "Strictly interpret the Lisp 1.5 language, without extensions."]
["-t" "--time" "Time evaluations."]])
["-t" "--time" "Time evaluations."]
["-x" "--testing" "Disable the jline reader - useful when piping input."]])
(defn- re
"Like REPL, but it isn't a loop and doesn't print."
@ -64,10 +65,9 @@
"Read/eval/print loop."
[prompt]
(loop []
(print prompt)
(flush)
(try
(if-let [input (trim (read-from-console))]
(if-let [input (trim (read-from-console prompt))]
(if (= input stop-word)
(throw (ex-info "\nFærwell!" {:cause :quit}))
(println
@ -116,7 +116,7 @@
(catch Throwable any
(println any))))
(try
(repl (str (:prompt (:options args)) " "))
(repl (:prompt (:options args)))
(catch
Exception
e

View file

@ -91,22 +91,21 @@
(cond
(= l NIL) NIL
(empty? path) l
:else
(try
(case (last path)
(not (instance? ConsCell l)) (throw (ex-info (str "Ne liste: "
l "; " (type l))
{:phase :eval
:function "universal access function"
:args [l path]
:type :beowulf}))
:else (case (last path)
\a (uaf (.first l) (butlast path))
\d (uaf (.getCdr l) (butlast path))
(throw (ex-info (str "uaf: unexpected letter in path (only `a` and `d` permitted): " (last path))
{:cause :uaf
:detail :unexpected-letter
:expr (last path)})))
(catch ClassCastException e
(throw (ex-info
(str "uaf: Not a LISP list? " (type l))
{:cause :uaf
:detail :not-a-lisp-list
:expr l}
e))))))
(throw (ex-info (str "uaf: unexpected letter in path (only `a` and `d` permitted): "
(last path))
{:phase :eval
:function "universal access function"
:args [l path]
:type :beowulf})))))
(defmacro CAAR [x] `(uaf ~x '(\a \a)))
(defmacro CADR [x] `(uaf ~x '(\a \d)))
@ -217,7 +216,7 @@
:phase :host
:detail :rplacd
:args (list cell value)
:type :beowulf}))));; PLUS
:type :beowulf}))))
(defn LIST
[& args]
@ -433,6 +432,41 @@
"The unexplained magic number which marks the start of a property list."
(Integer/parseInt "77777" 8))
(defn hit-or-miss-assoc
"Find the position of the binding of this `target` in a Lisp 1.5
property list `plist`.
Lisp 1.5 property lists are not assoc lists, but lists of the form
`(name value name value name value...)`. It's therefore necessary to
recurse down the list two entries at a time to avoid confusing names
with values."
[target plist]
(if (and (instance? ConsCell plist) (even? (count plist)))
(cond (= plist NIL) NIL
(= (first plist) target) plist
:else (hit-or-miss-assoc target (CDDR plist)))
NIL))
(defn ATTRIB
"Destructive append. From page 59 of the manual:
The function `attrib` concatenates its two arguments by changing the last
element of its first argument to point to the second argument. Thus it
is commonly used to tack something onto the end of a property list.
The value of `attrib` is the second argument.
For example
```
attrib[FF; (EXPR (LAMBDA (X) (COND ((ATOM X) X) (T (FF (CAR x))))))]
```
would put EXPR followed by the LAMBDA expression for FF onto the end of
the property list for FF."
[x e]
(loop [l x]
(cond
(instance? ConsCell (CDR l)) (recur (CDR l))
:else (when (RPLACD l e) e))))
(defn PUT
"Put this `value` as the value of the property indicated by this `indicator`
of this `symbol`. Return `value` on success.
@ -440,15 +474,19 @@
NOTE THAT there is no `PUT` defined in the manual, but it would have been
easy to have defined it so I don't think this fully counts as an extension."
[symbol indicator value]
(if-let [binding (ASSOC symbol @oblist)]
(if-let [prop (ASSOC indicator (CDDR binding))]
(RPLACD prop value)
(let [binding (ASSOC symbol @oblist)]
(if (instance? ConsCell binding)
(let [prop (hit-or-miss-assoc indicator (CDDR binding))]
(if (instance? ConsCell prop)
(RPLACA (CDR prop) value)
;; The implication is ATTRIB was used here, but I have not made that
;; work and this does work, so if it ain't broke don't fix it.
(RPLACD binding
(make-cons-cell
magic-marker
(make-cons-cell
indicator
(make-cons-cell value (CDDR binding))))))
(make-cons-cell value (CDDR binding)))))))
(swap!
oblist
(fn [ob s p v]
@ -456,6 +494,7 @@
(make-beowulf-list (list s magic-marker p v))
ob))
symbol indicator value)))
value)
(defn GET
"From the manual:
@ -477,13 +516,9 @@
val (cond
(= binding NIL) NIL
(= magic-marker
(CADR binding)) (loop [b binding]
;; (println "GET loop, seeking " indicator ":")
;; (pretty-print b)
(if (instance? ConsCell b)
(if (= (CAR b) indicator)
(CADR b) ;; <- this is what we should actually be returning
(recur (CDR b)))
(CADR binding)) (let [p (hit-or-miss-assoc indicator binding)]
(if-not (= NIL p)
(CADR p)
NIL))
:else (throw
(ex-info "Misformatted property list (missing magic marker)"
@ -499,9 +534,10 @@
`indicator` of the symbol which is the first element of the pair to the
value which is the second element of the pair. See page 58 of the manual."
[a-list indicator]
(doall
(map
#(PUT (CAR %) indicator (CDR %))
a-list))
#(when (PUT (CAR %) indicator (CDR %)) (CAR %))
a-list)))
(defn DEFINE
"Bootstrap-only version of `DEFINE` which, post boostrap, can be overwritten

View file

@ -91,7 +91,8 @@
([]
(SYSOUT nil))
([filepath]
(spit (full-path (str filepath))
(let [destination (full-path (str filepath))]
(spit destination
(with-out-str
(println (apply str (repeat 79 ";")))
(println (format ";; Beowulf %s Sysout file generated at %s"
@ -103,7 +104,9 @@
(println)
(let [output (safely-wrap-subrs @oblist)]
(pretty-print output)
)))))
)))
(println "Saved sysout to " destination)
NIL)))
(defn resolve-subr
"If this oblist `entry` references a subroutine, attempt to fix up that

View file

@ -41,5 +41,5 @@
(def ^:dynamic *options*
"Command line options from invocation."
{})
{:testing true})

View file

@ -13,13 +13,14 @@
Both these extensions can be disabled by using the `--strict` command line
switch."
(:require ;; [beowulf.reader.char-reader :refer [read-chars]]
(:require [beowulf.oblist :refer [*options*]]
[beowulf.reader.char-reader :refer [read-chars]]
[beowulf.reader.generate :refer [generate]]
[beowulf.reader.parser :refer [parse]]
[beowulf.reader.simplify :refer [simplify]]
[clojure.string :refer [join split starts-with? trim]])
(:import [java.io InputStream]
[instaparse.gll Failure]))
(:import [instaparse.gll Failure]
[java.io InputStream]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
@ -82,24 +83,35 @@
(throw (ex-info "Ne can forstande " (assoc parse-tree :source source))))
(generate (simplify parse-tree)))))
(defn read-from-console
"Attempt to read a complete lisp expression from the console. NOTE that this
will only really work for S-Expressions, not M-Expressions."
[]
(loop [r (read-line)]
(if (and (= (count (re-seq #"\(" r))
(defn- dummy-read-chars [prompt]
(loop [r "" p prompt]
(if (and (seq r)
(= (count (re-seq #"\(" r))
(count (re-seq #"\)" r)))
(= (count (re-seq #"\[" r))
(count (re-seq #"\]" r))))
r
(recur (str r "\n" (read-line))))))
(do
(print (str p " "))
(flush)
(recur (str r "\n" (read-line)) "::")))))
(defn read-from-console
"Attempt to read a complete lisp expression from the console.
There's a major problem here that the read-chars reader messes up testing.
We need to be able to disable it while testing!"
[prompt]
(if (:testing *options*)
(dummy-read-chars prompt)
(read-chars prompt)))
(defn READ
"An implementation of a Lisp reader sufficient for bootstrapping; not necessarily
the final Lisp reader. `input` should be either a string representation of a LISP
expression, or else an input stream. A single form will be read."
([]
(gsp (read-from-console)))
(gsp (read-from-console (:prompt *options*))))
([input]
(cond
(empty? input) (READ)

View file

@ -20,9 +20,12 @@
TODO: There are multiple problems with JLine; a better solution might be
to start from here:
https://stackoverflow.com/questions/7931988/how-to-manipulate-control-characters"
;; (:import [org.jline.reader LineReader LineReaderBuilder]
;; [org.jline.terminal TerminalBuilder])
)
(:require [beowulf.oblist :refer [*options* oblist]])
(:import [org.jline.reader.impl.completer StringsCompleter]
[org.jline.reader.impl DefaultParser DefaultParser$Bracket]
[org.jline.reader LineReaderBuilder]
[org.jline.terminal TerminalBuilder]
[org.jline.widget AutopairWidgets AutosuggestionWidgets]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
@ -49,27 +52,56 @@
;; looks as though you'd need a DPhil in JLine to write it, and I don't have
;; the time.
;; (def get-reader
;; "Return a reader, first constructing it if necessary.
(defn build-completer
"Build a completer which takes tokens from the oblist.
;; **NOTE THAT** this is not settled API. The existence and call signature of
;; this function is not guaranteed in future versions."
;; (memoize (fn []
;; (let [term (.build (.system (TerminalBuilder/builder) true))]
;; (.build (.terminal (LineReaderBuilder/builder) term))))))
This is sort-of working, in as much as hitting <TAB> on a blank line will
show a table of values from the oblist, but hitting <TAB> after you've
started input does not show potential completions for tokens you've started."
[]
(StringsCompleter. (map #(str (first %)) @oblist)))
;; (defn read-chars
;; "A drop-in replacement for `clojure.core/read-line`, except that line editing
;; and history should be enabled.
;; **NOTE THAT** this does not work yet, but it is in the API because I hope
;; that it will work later!"
;; This breaks; it is not correctly resolving the Enum, although I can't work out
;; why not.
;; (defn build-parser
;; []
;; (let [eddie (get-reader)]
;; (loop [s (.readLine eddie)]
;; (if (and (= (count (re-seq #"\(" s))
;; (count (re-seq #"\)" s)))
;; (= (count (re-seq #"\[]" s))
;; (count (re-seq #"\]" s))))
;; s
;; (recur (str s " " (.readLine eddie)))))))
;; (println "Building parser")
;; (let [parser (DefaultParser.)]
;; (doall
;; (.setEofOnUnclosedBracket
;; parser DefaultParser$Bracket/ROUND))))
(def get-reader
"Return a reader, first constructing it if necessary.
**NOTE THAT** this is not settled API. The existence and call signature of
this function is not guaranteed in future versions."
(memoize (fn []
(let [term (.build (.system (TerminalBuilder/builder) true))
reader (-> (LineReaderBuilder/builder)
(.terminal term)
(.completer (build-completer))
;; #(.parser % (build-parser))
(.build))
;; apw (AutopairWidgets. reader false)
;; asw (AutosuggestionWidgets. reader)
]
;; (.enable apw)
;; (.enable asw)
reader))))
(defn read-chars
"A drop-in replacement for `clojure.core/read-line`, except that line editing
and history should be enabled.
**NOTE THAT** this does not fully work yet, but it is in the API because I
hope that it will work later!"
[prompt]
(let [eddie (get-reader)]
(loop [s (.readLine eddie (str prompt " "))]
(if (and (= (count (re-seq #"\(" s))
(count (re-seq #"\)" s)))
(= (count (re-seq #"\[]" s))
(count (re-seq #"\]" s))))
s
(recur (str s " " (.readLine eddie ":: ")))))))

View file

@ -1,8 +1,9 @@
(ns beowulf.core-test
(:require [clojure.java.io :refer [reader]]
[clojure.string :refer [split]]
[clojure.test :refer [deftest is testing]]
[beowulf.core :refer [-main repl stop-word]]))
(:require [beowulf.core :refer [-main repl stop-word]]
[beowulf.oblist :refer [*options*]]
[clojure.java.io :refer [reader]]
[clojure.string :refer [split starts-with?]]
[clojure.test :refer [deftest is testing]]))
;; (deftest a-test
;; (testing "FIXME, I fail."
@ -20,20 +21,20 @@
(deftest repl-tests
(testing "quit functionality"
(with-open [r (reader (string->stream stop-word))]
(binding [*in* r]
(binding [clojure.core/*in* r
*options* (assoc *options* :testing true)]
(is (thrown-with-msg? Exception #"\nFærwell!" (repl "")))))
(let [expected nil
actual (with-open [r (reader (string->stream stop-word))]
(binding [*in* r]
(-main)))]
(-main "--testing")))]
(is (= actual expected)))))
;; TODO: not working because STOP is not being recognised, but I haven't
;; worked out why not yet. It *did* work.
;; The new read-chars interface is really messing with this. Need to sort out!
;; OK, binding `:testing` doesn't work because `*options*` gets rebound in main.
;; Need to be able to pass in a testing flag as argument to -main
(deftest flag-tests
(testing "No flags"
(testing "Only testing flag"
(let [expected-greeting "Hider wilcuman. Béowulf is mín nama."
expected-quit-message (str "Sprecan '" stop-word "' tó laéfan")
expected-result #".*\(3 \. 4\)"
@ -41,24 +42,22 @@
expected-signoff "Færwell!"
;; anticipated output (note blank lines):
; Hider wilcuman. Béowulf is mín nama.
;; Hider wilcuman. Béowulf is mín nama.
; Sprecan 'STOP' tó laéfan
;; Sprecan 'STOP' tó laéfan
; Sprecan:: > (3 . 4)
; Sprecan::
; Færwell!
;; Sprecan:: > (3 . 4)
;; Sprecan::
;; Færwell!
[_ greeting _ _ quit-message _ result prompt signoff]
(with-open [r (reader (string->stream (str "cons[3; 4]\n" stop-word)))]
(binding [*in* r]
(split (with-out-str (-main)) #"\n")))]
(split (with-out-str (-main "--testing")) #"\n")))]
(is (= greeting expected-greeting))
; (is (= error expected-error))
(is (re-matches expected-result result))
(is (= quit-message expected-quit-message))
(is (= prompt expected-prompt))
(is (= signoff expected-signoff))
))
(is (= signoff expected-signoff))))
(testing "unknown flag"
(let [expected-greeting "Hider wilcuman. Béowulf is mín nama."
expected-quit-message (str "Sprecan '" stop-word "' tó laéfan")
@ -69,115 +68,63 @@
[_ greeting _ error quit-message _ result prompt signoff]
(with-open [r (reader (string->stream (str "cons[5; 6]\n" stop-word)))]
(binding [*in* r]
(split (with-out-str (-main "--unknown")) #"\n")))]
(split (with-out-str (-main "--unknown" "--testing")) #"\n")))]
(is (= greeting expected-greeting))
(is (re-matches expected-error error))
(is (re-matches expected-result result))
(is (= quit-message expected-quit-message))
(is (= prompt expected-prompt))
(is (= signoff expected-signoff))
))
; (testing "help"
; (let [expected-greeting "Hider wilcuman. Béowulf is mín nama."
; expected-h1 " -h, --help"
; expected-quit-message (str "Sprecan '" stop-word "' tó laéfan")
; expected-result #".*\(A \. B\)"
; expected-prompt "Sprecan:: "
; expected-signoff "Færwell!"
; [_ greeting _ h1 _ _ _ _ quit-message _ result prompt signoff]
; (with-open [r (reader (string->stream (str "cons[A; B]\n" stop-word)))]
; (binding [*in* r]
; (split (with-out-str (-main "--help")) #"\n")))]
; (is (= greeting expected-greeting))
; (is (= h1 expected-h1))
; (is (re-matches expected-result result))
; (is (= quit-message expected-quit-message))
; (is (= prompt expected-prompt))
; (is (= signoff expected-signoff))
; ))
; (testing "prompt"
; (let [expected-greeting "Hider wilcuman. Béowulf is mín nama."
; expected-quit-message (str "Sprecan '" stop-word "' tó laéfan")
; expected-error ""
; expected-result #".*\(A \. B\).*"
; expected-prompt "? "
; expected-signoff "Færwell!"
; [_ greeting _ error quit-message _ result prompt signoff]
; (with-open [r (reader (string->stream (str stop-word)))]
; (binding [*in* r]
; (split (with-out-str (-main "--prompt" "?")) #"\n")))]
; (is (= greeting expected-greeting))
; (is (= error expected-error))
; (is (re-matches expected-result result ))
; (is (= quit-message expected-quit-message))
; (is (= prompt expected-prompt))
; (is (= signoff expected-signoff))
; ))
; (testing "read - file not found"
; (let [expected-greeting "Hider wilcuman. Béowulf is mín nama."
; expected-quit-message (str "Sprecan '" stop-word "' tó laéfan")
; expected-error #"Failed to validate.*"
; expected-result #".*\(A \. B\)"
; expected-prompt "Sprecan:: "
; expected-signoff "Færwell!"
; [_ greeting _ error quit-message _ result prompt signoff]
; (with-open [r (reader (string->stream (str "cons[A; B]\n" stop-word)))]
; (binding [*in* r]
; (split (with-out-str (-main "--read" "froboz")) #"\n")))]
; (is (= greeting expected-greeting))
; (is (re-matches expected-error error))
; (is (re-matches expected-result result))
; (is (= quit-message expected-quit-message))
; (is (= prompt expected-prompt))
; (is (= signoff expected-signoff))
; ))
; (testing "read - file found"
; ;; TODO: there's no feedback from this because the initfile
; ;; is not yet read. This will change
; (let [expected-greeting "Hider wilcuman. Béowulf is mín nama."
; expected-quit-message (str "Sprecan '" stop-word "' tó laéfan")
; expected-error ""
; expected-result #".*\(A \. B\)"
; expected-prompt "Sprecan:: "
; expected-signoff "Færwell!"
; [_ greeting error quit-message _ _ result prompt signoff]
; (with-open [r (reader (string->stream (str "cons[A; B]\n" stop-word)))]
; (binding [*in* r]
; (split (with-out-str (-main "--read" "README.md")) #"\n")))]
; (is (= greeting expected-greeting))
; (is (= error expected-error))
; (is (re-matches expected-result result))
; (is (= quit-message expected-quit-message))
; (is (= prompt expected-prompt))
; (is (= signoff expected-signoff))
; ))
; (testing "strict"
; (let [expected-greeting "Hider wilcuman. Béowulf is mín nama."
; expected-quit-message (str "Sprecan '" stop-word "' tó laéfan")
; expected-error ""
; expected-result #".*Cannot parse meta expressions in strict mode.*"
; expected-prompt "Sprecan:: "
; expected-signoff "Færwell!"
; [_ greeting _ error quit-message _ result prompt signoff]
; (with-open [r (reader (string->stream (str "cons[A; B]\n" stop-word)))]
; (binding [*in* r]
; (split (with-out-str (-main "--strict")) #"\n")))]
; (is (= greeting expected-greeting))
; (is (= error expected-error))
; (is (re-matches expected-result result ))
; (is (= quit-message expected-quit-message))
; (is (= prompt expected-prompt))
; (is (= signoff expected-signoff))
; ))
; ; (testing "trace"
; (let [expected-greeting "Hider wilcuman. Béowulf is mín nama."
; expected-error ""
; expected-trace #".*traced-eval.*"
; [_ greeting _ error _ _ trace & _]
; (with-open [r (reader (string->stream (str "cons[A; B]\n" stop-word)))]
; (binding [*in* r]
; (split (with-out-str (-main "--trace")) #"\n")))]
; (is (= greeting expected-greeting))
; (is (= error expected-error))
; (is (re-matches expected-trace trace))
)
(is (= signoff expected-signoff))))
;; ;; TODO: not working because STOP is not being recognised, but I haven't
;; ;; worked out why not yet. It *did* work.
;; Hider wilcuman. Béowulf is mín nama.
;; -f FILEPATH, --file-path FILEPATH Set the path to the directory for reading and writing Lisp files.
;; -h, --help
;; -p PROMPT, --prompt PROMPT Sprecan:: Set the REPL prompt to PROMPT
;; -r SYSOUTFILE, --read SYSOUTFILE lisp1.5.lsp Read Lisp system from file SYSOUTFILE
;; -s, --strict Strictly interpret the Lisp 1.5 language, without extensions.
;; -t, --time Time evaluations.
;; -x, --testing Disable the jline reader - useful when piping input.
;; Sprecan 'STOP' tó laéfan
;; Sprecan::
(testing "help"
(let [expected-greeting "Hider wilcuman. Béowulf is mín nama."
expected-h1 " -h, --help"
expected-quit-message (str "Sprecan '" stop-word "' tó laéfan")
expected-result #".*\(A \. B\)"
expected-prompt "Sprecan:: "
expected-signoff "Færwell!"
[_ greeting _ _ h1 _ _ _ _ _ quit-message _ result prompt signoff]
(with-open [r (reader (string->stream (str "cons[A; B]\n" stop-word)))]
(binding [*in* r]
(split (with-out-str (-main "--help" "--testing")) #"\n")))]
(is (= greeting expected-greeting))
(is (= h1 expected-h1))
(is (re-matches expected-result result))
(is (= quit-message expected-quit-message))
(is (starts-with? prompt expected-prompt))
(is (= signoff expected-signoff))))
(testing "prompt"
(let [expected-prompt "? "
[_ _ _ _ _ _ prompt _]
(with-open [r (reader (string->stream stop-word))]
(binding [*in* r]
(split (with-out-str (-main "--prompt" "?" "--testing")) #"\n")))]
(is (= prompt expected-prompt))))
(testing "read - file not found"
(let [expected-error #"Failed to validate.*"
[_ _ _ error _ _ _ _ _]
(with-open [r (reader (string->stream (str "cons[A; B]\n" stop-word)))]
(binding [*in* r]
(split (with-out-str (-main "--testing" "--read" "froboz")) #"\n")))]
(is (re-matches expected-error error))))
(testing "strict"
(let [expected-result #".*Cannot parse meta expressions in strict mode.*"
[_ _ _ _ _ _ result _ _]
(with-open [r (reader (string->stream (str "cons[A; B]\n" stop-word)))]
(binding [*in* r]
(split (with-out-str (-main "--strict" "--testing")) #"\n")))]
(is (re-matches expected-result result )))))

View file

@ -1,9 +1,24 @@
(ns beowulf.host-test
(:require [clojure.test :refer [deftest is testing]]
[beowulf.cons-cell :refer [F make-beowulf-list T]]
[beowulf.host :refer [CDR DIFFERENCE NUMBERP PLUS RPLACA RPLACD TIMES]]
[beowulf.oblist :refer [NIL]]
[beowulf.read :refer [gsp]]))
(:require [beowulf.cons-cell :refer [F make-beowulf-list make-cons-cell T]]
[beowulf.host :refer [ADD1 AND CADDDR CAR CDR DEFINE DIFFERENCE
ERROR FIXP GREATERP lax? LESSP NILP NULL
NUMBERP OR PLUS RPLACA RPLACD SUB1 TIMES uaf]]
[beowulf.io :refer [SYSIN]]
[beowulf.oblist :refer [*options* NIL]]
[beowulf.read :refer [gsp]]
[clojure.test :refer [deftest is testing use-fixtures]]
[expectations.clojure.test
:refer [defexpect expect more-> more-of]]))
(use-fixtures :once (fn [f]
(try (when (SYSIN "resources/lisp1.5.lsp")
(f))
(catch Throwable any
(throw (ex-info "Failed to load Lisp sysout"
{:phase test
:function 'SYSIN
:file "resources/lisp1.5.lsp"}
any))))))
(deftest destructive-change-test
(testing "RPLACA"
@ -22,17 +37,30 @@
Exception
#"Uncynlic miercels in RPLACA.*"
(RPLACA '(A B C D E) 'F))
"You can't RPLACA into anything which isn't a MutableSequence.")
)
(testing "RPLACA"
"You can't RPLACA into anything which isn't a MutableSequence."))
(testing "RPLACD"
(let
[l (make-beowulf-list '(A B C D E))
target (CDR l)
expected "(A B . F)"
actual (do (RPLACD target 'F) (print-str l))]
(is (= actual expected)))
)
)
(let
[l (make-beowulf-list '(A B C D E))
target (CDR l)
expected "(A B)"
actual (do (RPLACD target NIL) (print-str l))]
(is (= actual expected)))
(is (thrown-with-msg?
Exception
#"Un-ġefōg þing in RPLACD.*"
(RPLACD (make-beowulf-list '(A B C D E)) :a))
"You can't represent a keyword in Lisp 1.5")
(is (thrown-with-msg?
Exception
#"Uncynlic miercels in RPLACD.*"
(RPLACD "ABCDE" 'F))
"You can't RPLACD into anything which isn't a MutableSequence.")))
(deftest numberp-tests
(testing "NUMBERP"
@ -59,12 +87,171 @@
(let [expected 3.5
actual (PLUS 1.25 9/4)]
(is (= actual expected))
(is (float? actual)))
(let [expected 3.5
actual (PLUS -2.5 6)]
(is (= actual expected) "Negative numbers are cool.")
(is (float? actual))))
(testing "TIMES"
(let [expected 6
actual (TIMES 2 3)]
(is (= actual expected)))
(let [expected 2.5
actual (TIMES 5 0.5)]
(is (= actual expected))))
(testing DIFFERENCE
(testing "DIFFERENCE"
(let [expected -1
actual (DIFFERENCE 1 2)]
(is (= actual expected)))
(let [expected (float 0.1)
actual (DIFFERENCE -0.1 -0.2)]
(is (= actual expected))))
(testing "ADD1"
(let [expected -1
actual (ADD1 -2)]
(is (= actual expected)))
(let [expected (float 3.5)
actual (ADD1 2.5)]
(is (= actual expected))))
(testing "SUB1"
(let [expected -3
actual (SUB1 -2)]
(is (= actual expected)))
(let [expected (float 1.5)
actual (SUB1 2.5)]
(is (= actual expected)))))
(deftest laxness
(testing "lax"
(let [expected true
actual (lax? 'Test)]
(is (= actual expected) "Pass, the Queen's Cat, and all's well")))
(testing "strict"
(binding [*options* (assoc *options* :strict true)]
(is (thrown-with-msg? Exception #".*ne āfand innan Lisp 1.5" (lax? 'Test))))))
(deftest access-tests
(testing "primitive access"
(let [cell (make-cons-cell 1 7)]
(let [expected 1
actual (CAR cell)]
(is (= actual expected)))
(let [expected 7
actual (CDR cell)]
(is (= actual expected))))
(is (thrown-with-msg? Exception #".*Ne can tace CAR of.*" (CAR 7)))
(is (thrown-with-msg? Exception #".*Ne can tace CDR of.*" (CDR 'A)))
(is (thrown-with-msg? Exception #".*Ne liste.*" (CADDDR "Foo")))
(is (thrown-with-msg? Exception #".*uaf: unexpected letter in path.*"
(uaf (make-beowulf-list '(A B C D))
'(\d \a \z \e \d))))))
(deftest misc-predicate-tests
(testing "NULL"
(let [expected T
actual (NULL NIL)]
(is (= actual expected)))
(let [expected F
actual (NULL (make-beowulf-list '(A B C)))]
(is (= actual expected))))
(testing "NILP"
(let [expected T
actual (NILP NIL)]
(is (= actual expected)))
(let [expected NIL
actual (NILP (make-beowulf-list '(A B C)))]
(is (= actual expected))))
(testing "AND"
(let [expected T
actual (AND)]
(is (= actual expected)))
(let [expected T
actual (AND T T)]
(is (= actual expected)))
(let [expected T
actual (AND T T T)]
(is (= actual expected)))
(let [expected T
actual (AND 1 'A (make-beowulf-list '(A B C)))]
(is (= actual expected)))
(let [expected F
actual (AND NIL)]
(is (= actual expected)))
(let [expected F
actual (AND T T F T)]
(is (= actual expected))))
(testing "OR"
(let [expected F
actual (OR)]
(is (= actual expected)))
(let [expected T
actual (OR NIL T)]
(is (= actual expected)))
(let [expected T
actual (OR T F T)]
(is (= actual expected)))
(let [expected T
actual (OR 1 F (make-beowulf-list '(A B C)))]
(is (= actual expected)))
(let [expected F
actual (OR NIL)]
(is (= actual expected)))
(let [expected F
actual (OR NIL F)]
(is (= actual expected))))
(testing "FIXP"
(let [expected F
actual (FIXP NIL)]
(is (= actual expected)))
(let [expected F
actual (FIXP 'A)]
(is (= actual expected)))
(let [expected F
actual (FIXP 3.2)]
(is (= actual expected)))
(let [expected T
actual (FIXP 7)]
(is (= actual expected))))
(testing "LESSP"
(let [expected F
actual (LESSP 7 3)]
(is (= actual expected)))
(let [expected T
actual (LESSP -7 3.5)]
(is (= actual expected)))
(let [expected F
actual (LESSP 3.14 3.14)]
(is (= actual expected))))
(testing "GREATERP"
(let [expected T
actual (GREATERP 7 3)]
(is (= actual expected)))
(let [expected F
actual (GREATERP -7 3.5)]
(is (= actual expected)))
(let [expected F
actual (GREATERP 3.14 3.14)]
(is (= actual expected)))))
;; Really tricky to get DEFINE set up for testing here. It works OK in the
;; REPL, but there's nonsense going on with lazy sequences. Better to
;; reimplement in Lisp.
;; (deftest define-tests
;; (testing "DEFINE"
;; (let [expected "(FF)"
;; actual (str (doall (DEFINE
;; (gsp "((FF LAMBDA (X) (COND ((ATOM X) X) (T (FF (CAR X))))))"))))]
;; (is (= actual expected)))))
(defexpect error-without-code
(expect (more-> clojure.lang.ExceptionInfo type
(more-of {:keys [:phase :function :args :type :code]}
'A1 code) ex-data)
(ERROR)))
(defexpect error-with-code
(let [x 'X1]
(expect (more-> clojure.lang.ExceptionInfo type
(more-of {:keys [:phase :function :args :type :code]}
x code) ex-data)
(ERROR x))))

View file

@ -1,11 +1,11 @@
(ns beowulf.lisp-test
"The idea here is to test actual Lisp functions"
(:require [clojure.test :refer [deftest testing is use-fixtures]]
[beowulf.bootstrap :refer [EVAL]]
(:require [beowulf.bootstrap :refer [EVAL]]
[beowulf.cons-cell :refer [make-beowulf-list]]
[beowulf.io :refer [SYSIN]]
;; [beowulf.oblist :refer [NIL]]
[beowulf.read :refer [READ]]))
[beowulf.io :refer [SYSIN]] ;; [beowulf.oblist :refer [NIL]]
[beowulf.oblist :refer [NIL]]
[beowulf.read :refer [READ]]
[clojure.test :refer [deftest is testing use-fixtures]]))
(defn- reps
"'Read eval print string', or 'read eval print single'.
@ -166,3 +166,50 @@
(COND ((EQ X 5) (RETURN X))
(T (GO START))))")]
(is (= actual expected)))))
(deftest put-get-tests
(let [symbol 'TESTSYMBOL
p1 'TESTPROPONE
p2 'TESTPROPTWO]
(testing "GET - property should be missing"
(let [expected "NIL"
actual (reps "(GET 'TESTSYMBOL 'TESTPROPONE)")]
(is (= actual expected))))
(testing "PUT and GET: value of new property; change value of property"
(let [prop (reps "(GENSYM)")
val1 (reps "(GENSYM)")
val2 (reps "(GENSYM)")
expected1 val1
actual1 (when (reps (str "(PUT '" symbol " '" prop " '" val1 ")"))
(reps (str "(GET '" symbol " '" prop ")")))
expected2 val2
actual2 (when (reps (str "(PUT '" symbol " '" prop " '" val2 ")"))
(reps (str "(GET '" symbol " '" prop ")")))]
(is (not= val1 val2))
(is (= actual1 expected1) "The value set can be retrieved.")
(is (= actual2 expected2) "The value is changed.")))
(testing "PUT and GET: different properties have independent values"
(let [val1 (reps "(GENSYM)")
val2 (reps "(GENSYM)")
expected1 val1
actual1 (when (reps (str "(PUT '" symbol " '" p1 " '" val1 ")"))
(reps (str "(GET '" symbol " '" p1 ")")))
expected2 val2
actual2 (when (reps (str "(PUT '" symbol " '" p2 " '" val2 ")"))
(reps (str "(GET '" symbol " '" p2 ")")))
expected3 val1
actual3 (reps (str "(GET '" symbol " '" p1 ")"))]
(is (not= val1 val2))
(is (= actual1 expected1) "The value set can be retrieved.")
(is (= actual2 expected2) "Values are independent.")
(is (= actual3 expected3) "Setting a second property does not obliterate the first.")))))
(deftest fsubr-tests
(testing "FSUBR/CONC"
(reps "(SETQ P (RANGE 1 4))")
(reps "(SETQ Q (RANGE 5 8))")
(reps "(SETQ R (RANGE 9 12))")
(reps "(CONC P Q R)")
(let [expected "(1 2 3 4 5 6 7 8 9 10 11 12)"
actual (reps "X")]
(is (= actual expected)))))