improved indentation and whitespace for markdown code blocks
All code blocks in markdown have been intended by at least 4 spaces. We add `--tab-stop=8` to all `pandoc(1)` executions in order to set a better tab stop indentation, especially for tab intended code blocks. Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.3 2024-03-26" to "1.6 2024-03-31". Fixed `1991/brnstnd/sorta.README.md` so that the sorta code is code blocks. Removed unneeded paragraph group in copyright in `inc/footer.default.html`. Fixed excess whitespace after list Author on entry `index.html` page. Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26" to "1.6 2024-03-31". Performed `make www` to perform the above and test under macOS. TODO: Fix the problem of the initial line of code being extra intended. TODO: Fix excess whitespace around code that is inline.
This commit is contained in:
1 parent
b84c27ce02
commit
a996f8d2b8
734 files changed
+16723
-16963
No files matched your search
+25
-25
@@ -1,17 +1,17 @@
|
||||
## To build:
|
||||
|
||||
```sh
|
||||
make all
|
||||
make all
|
||||
```
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./jar.2
|
||||
[enter some lisp]
|
||||
./jar.2
|
||||
[enter some lisp]
|
||||
|
||||
./jar.2 < some_lisp_file
|
||||
./jar.2 < some_lisp_file
|
||||
```
|
||||
|
||||
NOTE: this entry will likely segfault on invalid input.
|
||||
@@ -20,11 +20,11 @@ NOTE: this entry will likely segfault on invalid input.
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
./try.sh
|
||||
./try.sh
|
||||
|
||||
./try.sh chocolate_cake.lisp
|
||||
./try.sh chocolate_cake.lisp
|
||||
|
||||
./try.sh try.txt
|
||||
./try.sh try.txt
|
||||
```
|
||||
|
||||
|
||||
@@ -66,24 +66,24 @@ prints out the return values. End execution by typing an end-of-file
|
||||
character.
|
||||
|
||||
```lisp
|
||||
(+ 2.5 3.1)
|
||||
(defun fib (n)
|
||||
(if (< n 2)
|
||||
1
|
||||
(+ (fib (- n 2)) (fib (- n 1)))))
|
||||
(fib 10)
|
||||
(defun ! (x) (if (equal x 0) 1 (* x (! (- x 1)))))
|
||||
(! 7)
|
||||
(defun fn1 (fn) (+ (fn 1 2) (fn 3 4)))
|
||||
(defun fn2 (a b) (+ a b))
|
||||
(fn1 (function +))
|
||||
(fn1 (function fn2))
|
||||
(fn1 (function (lambda (z1 z2) (+ z1 z2))))
|
||||
(quote a)
|
||||
(cons (quote (a b)) (quote (c d e)))
|
||||
(cons (quote (f)) ())
|
||||
(car (quote (a b c)))
|
||||
(cdr (cdr (quote (g h i))))
|
||||
(+ 2.5 3.1)
|
||||
(defun fib (n)
|
||||
(if (< n 2)
|
||||
1
|
||||
(+ (fib (- n 2)) (fib (- n 1)))))
|
||||
(fib 10)
|
||||
(defun ! (x) (if (equal x 0) 1 (* x (! (- x 1)))))
|
||||
(! 7)
|
||||
(defun fn1 (fn) (+ (fn 1 2) (fn 3 4)))
|
||||
(defun fn2 (a b) (+ a b))
|
||||
(fn1 (function +))
|
||||
(fn1 (function fn2))
|
||||
(fn1 (function (lambda (z1 z2) (+ z1 z2))))
|
||||
(quote a)
|
||||
(cons (quote (a b)) (quote (c d e)))
|
||||
(cons (quote (f)) ())
|
||||
(car (quote (a b c)))
|
||||
(cdr (cdr (quote (g h i))))
|
||||
```
|
||||
|
||||
|
||||
|
||||
+26
-27
@@ -138,8 +138,7 @@ Location: <a href="../../location.html#FI">FI</a> - <em>Republic of Finland </em
|
||||
Location: <a href="../../location.html#SE">SE</a> - <em>Kingdom of Sweden</em> (<em>Sweden</em>)
|
||||
<br><br></li>
|
||||
<li>Name: <a href="../../authors.html#Ora_Lassila">Ora Lassila</a><br>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)
|
||||
<br><br></li>
|
||||
Location: <a href="../../location.html#US">US</a> - <em>United States of America</em> (<em>United States</em>)</li>
|
||||
</ul>
|
||||
|
||||
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
|
||||
@@ -148,19 +147,19 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> all</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./jar.2</span></span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="ex">[enter</span> some lisp]</span>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./jar.2</span></span>
|
||||
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">[enter</span> some lisp]</span>
|
||||
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="ex">./jar.2</span> <span class="op"><</span> some_lisp_file</span></code></pre></div>
|
||||
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a> <span class="ex">./jar.2</span> <span class="op"><</span> some_lisp_file</span></code></pre></div>
|
||||
<p>NOTE: this entry will likely segfault on invalid input.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span></span>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span>
|
||||
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> chocolate_cake.lisp</span>
|
||||
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span> chocolate_cake.lisp</span>
|
||||
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a></span>
|
||||
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="ex">./try.sh</span> try.txt</span></code></pre></div>
|
||||
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span> try.txt</span></code></pre></div>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>This is the most useful program submitted this year. It is a
|
||||
rather large subset of lisp. It has no error recovery, and
|
||||
@@ -193,24 +192,24 @@ The program implements a conventional lisp listener, i.e. you type in
|
||||
lisp expressions (followed by CR), the program evaluates them and
|
||||
prints out the return values. End execution by typing an end-of-file
|
||||
character.</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode lisp"><code class="sourceCode commonlisp"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>(<span class="op">+</span> <span class="fl">2.5</span> <span class="fl">3.1</span>)</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a>(<span class="kw">defun</span><span class="fu"> fib </span>(n)</span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> (<span class="kw">if</span> (<span class="op"><</span> n <span class="dv">2</span>)</span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="dv">1</span></span>
|
||||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> (<span class="op">+</span> (fib (<span class="op">-</span> n <span class="dv">2</span>)) (fib (<span class="op">-</span> n <span class="dv">1</span>)))))</span>
|
||||
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a>(fib <span class="dv">10</span>)</span>
|
||||
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a>(<span class="kw">defun</span><span class="fu"> </span>! (x) (<span class="kw">if</span> (<span class="kw">equal</span> x <span class="dv">0</span>) <span class="dv">1</span> (<span class="op">*</span> x (! (<span class="op">-</span> x <span class="dv">1</span>)))))</span>
|
||||
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a>(! <span class="dv">7</span>)</span>
|
||||
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a>(<span class="kw">defun</span><span class="fu"> fn1 </span>(fn) (<span class="op">+</span> (fn <span class="dv">1</span> <span class="dv">2</span>) (fn <span class="dv">3</span> <span class="dv">4</span>)))</span>
|
||||
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a>(<span class="kw">defun</span><span class="fu"> fn2 </span>(a b) (<span class="op">+</span> a b))</span>
|
||||
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a>(fn1 (<span class="kw">function</span> <span class="op">+</span>))</span>
|
||||
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a>(fn1 (<span class="kw">function</span> fn2))</span>
|
||||
<span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a>(fn1 (<span class="kw">function</span> (<span class="kw">lambda</span> (z1 z2) (<span class="op">+</span> z1 z2))))</span>
|
||||
<span id="cb4-14"><a href="#cb4-14" aria-hidden="true" tabindex="-1"></a>(<span class="kw">quote</span> a)</span>
|
||||
<span id="cb4-15"><a href="#cb4-15" aria-hidden="true" tabindex="-1"></a>(<span class="kw">cons</span> (<span class="kw">quote</span> (a b)) (<span class="kw">quote</span> (c d e)))</span>
|
||||
<span id="cb4-16"><a href="#cb4-16" aria-hidden="true" tabindex="-1"></a>(<span class="kw">cons</span> (<span class="kw">quote</span> (f)) ())</span>
|
||||
<span id="cb4-17"><a href="#cb4-17" aria-hidden="true" tabindex="-1"></a>(<span class="kw">car</span> (<span class="kw">quote</span> (a b c)))</span>
|
||||
<span id="cb4-18"><a href="#cb4-18" aria-hidden="true" tabindex="-1"></a>(<span class="kw">cdr</span> (<span class="kw">cdr</span> (<span class="kw">quote</span> (g h i))))</span></code></pre></div>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode lisp"><code class="sourceCode commonlisp"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> (<span class="op">+</span> <span class="fl">2.5</span> <span class="fl">3.1</span>)</span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> (<span class="kw">defun</span><span class="fu"> fib </span>(n)</span>
|
||||
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a> (<span class="kw">if</span> (<span class="op"><</span> n <span class="dv">2</span>)</span>
|
||||
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a> <span class="dv">1</span></span>
|
||||
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> (<span class="op">+</span> (fib (<span class="op">-</span> n <span class="dv">2</span>)) (fib (<span class="op">-</span> n <span class="dv">1</span>)))))</span>
|
||||
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a> (fib <span class="dv">10</span>)</span>
|
||||
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a> (<span class="kw">defun</span><span class="fu"> </span>! (x) (<span class="kw">if</span> (<span class="kw">equal</span> x <span class="dv">0</span>) <span class="dv">1</span> (<span class="op">*</span> x (! (<span class="op">-</span> x <span class="dv">1</span>)))))</span>
|
||||
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a> (! <span class="dv">7</span>)</span>
|
||||
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a> (<span class="kw">defun</span><span class="fu"> fn1 </span>(fn) (<span class="op">+</span> (fn <span class="dv">1</span> <span class="dv">2</span>) (fn <span class="dv">3</span> <span class="dv">4</span>)))</span>
|
||||
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a> (<span class="kw">defun</span><span class="fu"> fn2 </span>(a b) (<span class="op">+</span> a b))</span>
|
||||
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a> (fn1 (<span class="kw">function</span> <span class="op">+</span>))</span>
|
||||
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a> (fn1 (<span class="kw">function</span> fn2))</span>
|
||||
<span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a> (fn1 (<span class="kw">function</span> (<span class="kw">lambda</span> (z1 z2) (<span class="op">+</span> z1 z2))))</span>
|
||||
<span id="cb4-14"><a href="#cb4-14" aria-hidden="true" tabindex="-1"></a> (<span class="kw">quote</span> a)</span>
|
||||
<span id="cb4-15"><a href="#cb4-15" aria-hidden="true" tabindex="-1"></a> (<span class="kw">cons</span> (<span class="kw">quote</span> (a b)) (<span class="kw">quote</span> (c d e)))</span>
|
||||
<span id="cb4-16"><a href="#cb4-16" aria-hidden="true" tabindex="-1"></a> (<span class="kw">cons</span> (<span class="kw">quote</span> (f)) ())</span>
|
||||
<span id="cb4-17"><a href="#cb4-17" aria-hidden="true" tabindex="-1"></a> (<span class="kw">car</span> (<span class="kw">quote</span> (a b c)))</span>
|
||||
<span id="cb4-18"><a href="#cb4-18" aria-hidden="true" tabindex="-1"></a> (<span class="kw">cdr</span> (<span class="kw">cdr</span> (<span class="kw">quote</span> (g h i))))</span></code></pre></div>
|
||||
<p>Please do not leave any whitespace before the first parenthesis when
|
||||
you type your input, or any other unnecessary whitespace. Please try to
|
||||
avoid any undefined variables or functions, wrong number of arguments
|
||||
|
||||
Reference in new issue
Block a user