Added spec scaffolding + style fixes.
h3rald h3rald@h3rald.com
Wed, 11 Dec 2024 11:01:26 +0100
2 files changed,
173 insertions(+),
144 deletions(-)
M
web/assets/styles.css
→
web/assets/styles.css
@@ -16,15 +16,37 @@ }
h1, h2, -h3 { +h3, +h4, +h5 { margin: 1rem 0 0.5rem 0; font-size: 1.1rem; font-weight: 700; color: gold; } +h2 { + font-size: 1.3rem +} + h3 { + font-size: 1.2rem; +} + +h4 { + font-size: 1.1rem; +} + +h5 { font-size: 1rem; +} + +h5 code { + color: white; +} + +h5::before { + content: "→ "; } header {@@ -136,3 +158,10 @@ margin-top: 1rem;
font-weight: 600; color: gold; } + +mark { + background-color: transparent; + color: white; + padding: 0.25rem 0.5rem; + border: 1px dotted gray; +}
M
web/contents/spec.html
→
web/contents/spec.html
@@ -22,147 +22,147 @@ <h4 id="pushing-literals">Pushing Literals</h4>
<h4 id="pushing-symbols">Pushing Symbols</h4> <h3 id="registry">Registry</h3> <h3 id="native-symbols">Native Symbols</h3> - <h4 id="memory-management">Memory Management</h4> - <h5 id="-symbol"><code>:</code> Symbol</h5> - <p>a s →</p> - <h5 id="-symbol"><code>#</code> Symbol</h5> - <p>s →</p> - <h4 id="control-flow">Control Flow</h4> - <h5 id="-if-symbol"><code>if</code> Symbol</h5> - <p>q q q → *</p> - <h5 id="-when-symbol"><code>when</code> Symbol</h5> - <p>q1 q2 → *</p> - <h5 id="-while-symbol"><code>while</code> Symbol</h5> - <p>q1 q2 → *</p> - <h5 id="-error-symbol"><code>error</code> Symbol</h5> - <p>→ s</p> - <h5 id="-try-symbol"><code>try</code> Symbol</h5> - <p>q1 q2 → *</p> - <h4 id="stack">Stack</h4> - <h5 id="-dup-symbol"><code>dup</code> Symbol</h5> - <p> a → a a</p> - <h5 id="-stack-symbol"><code>stack</code> Symbol</h5> - <p> → q</p> - <h5 id="-clear-symbol"><code>clear</code> Symbol</h5> - <p> →</p> - <h5 id="-pop-symbol"><code>pop</code> Symbol</h5> - <p> a →</p> - <h5 id="-swap-symbol"><code>swap</code> Symbol</h5> - <p> a1 a2 → a2 a1</p> - <h4 id="evaluation">Evaluation</h4> - <h5 id="-symbol"><code>.</code> Symbol</h5> - <p>q → *</p> - <h5 id="-symbol"><code>!</code> Symbol</h5> - <p>s →</p> - <h5 id="-symbol"><code>'</code> Symbol</h5> - <p>a → q</p> - <h4 id="arithmetic">Arithmetic</h4> - <h5 id="-symbol"><code>+</code> Symbol</h5> - <p> i1 i2 → i</p> - <h5 id="-symbol"><code>-</code> Symbol</h5> - <p> i1 12 → i</p> - <h5 id="-symbol"><code>*</code> Symbol</h5> - <p> i1 12 → i</p> - <h5 id="-symbol"><code>/</code> Symbol</h5> - <p> i1 12 → i</p> - <h5 id="-symbol"><code>%</code> Symbol</h5> - <p> i1 12 → i</p> - <h4 id="bitwise-operations">Bitwise Operations</h4> - <h5 id="-symbol"><code>&</code> Symbol</h5> - <p> i1 12 → i</p> - <h5 id="-symbol"><code>|</code> Symbol</h5> - <p> i1 12 → i</p> - <h5 id="-symbol"><code>^</code> Symbol</h5> - <p> i1 12 → i</p> - <h5 id="-symbol"><code>~</code> Symbol</h5> - <p> i → i</p> - <h5 id="-lt-lt-symbol"><code>&lt;&lt;</code> Symbol</h5> - <p> i1 12 → i</p> - <h5 id="-lt-lt-symbol"><code>&lt;&lt;</code> Symbol</h5> - <p> i1 12 → i</p> - <h4 id="comparisons">Comparisons</h4> - <h5 id="-symbol"><code>==</code> Symbol</h5> - <p> i1 12 → i</p> - <h5 id="-symbol"><code>!=</code> Symbol</h5> - <p> i1 12 → i</p> - <h5 id="-gt-symbol"><code>&gt;</code> Symbol</h5> - <p> i1 12 → i</p> - <h5 id="-lt-symbol"><code>&lt;</code> Symbol</h5> - <p> i1 12 → i</p> - <h5 id="-gt-symbol"><code>&gt;=</code> Symbol</h5> - <p> i1 12 → i</p> - <h5 id="-lt-symbol"><code>&lt;=</code> Symbol</h5> - <p> i1 i2 → i</p> - <h4 id="boolean-logic">Boolean Logic</h4> - <h5 id="-and-symbol"><code>and</code> Symbol</h5> - <p> i1 i2 → i</p> - <h5 id="-or-symbol"><code>or</code> Symbol</h5> - <p> i1 i2 → i</p> - <h5 id="-not-symbol"><code>not</code> Symbol</h5> - <p> i → i</p> - <h5 id="-xor-symbol"><code>xor</code> Symbol</h5> - <p> i1 i2 → i</p> - <h4 id="datatype-conversions-and-checking">Datatype Conversions and Checking</h4> - <h5 id="-int-symbol"><code>int</code> Symbol</h5> - <p> (i|s) → i</p> - <h5 id="-str-symbol"><code>str</code> Symbol</h5> - <p> (i|s) → s</p> - <h5 id="-dec-symbol"><code>dec</code> Symbol</h5> - <p> i → s</p> - <h5 id="-hex-symbol"><code>hex</code> Symbol</h5> - <p> s → i</p> - <h5 id="-type-symbol"><code>type</code> Symbol</h5> - <p> a → s</p> - <h4 id="lists-strings-and-quotations-">Lists (Strings and Quotations)</h4> - <h5 id="-cat-symbol"><code>cat</code> Symbol</h5> - <p> (s s|q q) → (s|q)</p> - <h5 id="-slice-symbol"><code>slice</code> Symbol</h5> - <p> (s i1 i2|q i1 i2) → (s|q)</p> - <h5 id="-len-symbol"><code>len</code> Symbol</h5> - <p> (s|q) → i</p> - <h5 id="-get-symbol"><code>get</code> Symbol</h5> - <p> (s|q) → a</p> - <h5 id="-insert-symbol"><code>insert</code> Symbol</h5> - <p> (s a i|q a i) → (s|q)</p> - <h5 id="-index-symbol"><code>index</code> Symbol</h5> - <p> (s a|q a) → i</p> - <h5 id="-join-symbol"><code>join</code> Symbol</h5> - <p> q s → s</p> - <h4 id="strings">Strings</h4> - <h5 id="-split-symbol"><code>split</code> Symbol</h5> - <p> s1 s2 → q</p> - <h5 id="-replace-symbol"><code>replace</code> Symbol</h5> - <p> s1 s2 s3 →</p> - <h4 id="quotations">Quotations</h4> - <h5 id="-each-symbol"><code>each</code> Symbol</h5> - <p> q1 q2 → *</p> - <h5 id="-map-symbol"><code>map</code> Symbol</h5> - <p> q1 q2 → q</p> - <h5 id="-filter-symbol"><code>filter</code> Symbol</h5> - <p> q1 q2 → q</p> - <h4 id="input-output">Input/Output</h4> - <h5 id="-puts-symbol"><code>puts</code> Symbol</h5> - <p> a →</p> - <h5 id="-warn-symbol"><code>warn</code> Symbol</h5> - <p> a →</p> - <h5 id="-print-symbol"><code>print</code> Symbol</h5> - <p> a →</p> - <h5 id="-gets-symbol"><code>gets</code> Symbol</h5> - <p> → s</p> - <h4 id="files">Files</h4> - <h5 id="-read-symbol"><code>read</code> Symbol</h5> - <p> s → s</p> - <h5 id="-write-symbol"><code>write</code> Symbol</h5> - <p> s1 s2 → s</p> - <h5 id="-append-symbol"><code>append</code> Symbol</h5> - <p> s1 s2 → s</p> - <h4 id="shell">Shell</h4> - <h5 id="-args-symbol"><code>args</code> Symbol</h5> - <p> → q</p> - <h5 id="-exit-symbol"><code>exit</code> Symbol</h5> - <p> i →</p> - <h5 id="-exec-symbol"><code>exec</code> Symbol</h5> - <p> s →</p> - <h5 id="-run-symbol"><code>run</code> Symbol</h5> - <p> s → q</p> + <h4 id="memory-management-symbols">Memory Management Symbols</h4> + <h5 id="store-symbol"><code>:</code> Symbol</h5> + <p><mark>a s →</mark></p> + <h5 id="free-symbol"><code>#</code> Symbol</h5> + <p><mark>s →</mark></p> + <h4 id="control-flow-symbols">Control Flow Symbols</h4> + <h5 id="if-symbol"><code>if</code> Symbol</h5> + <p><mark>q q q → *</mark></p> + <h5 id="when-symbol"><code>when</code> Symbol</h5> + <p><mark>q1 q2 → *</mark></p> + <h5 id="while-symbol"><code>while</code> Symbol</h5> + <p><mark>q1 q2 → *</mark></p> + <h5 id="error-symbol"><code>error</code> Symbol</h5> + <p><mark>→ s</mark></p> + <h5 id="try-symbol"><code>try</code> Symbol</h5> + <p><mark>q1 q2 → *</mark></p> + <h4 id="stack-management-symbols">Stack Management Symbol</h4> + <h5 id="dup-symbol"><code>dup</code> Symbol</h5> + <p><mark> a → a a</mark></p> + <h5 id="stack-symbol"><code>stack</code> Symbol</h5> + <p><mark> → q</mark></p> + <h5 id="clear-symbol"><code>clear</code> Symbol</h5> + <p><mark> →</mark></p> + <h5 id="pop-symbol"><code>pop</code> Symbol</h5> + <p><mark> a →</mark></p> + <h5 id="swap-symbol"><code>swap</code> Symbol</h5> + <p><mark> a1 a2 → a2 a1</mark></p> + <h4 id="evaluation-symbols">Evaluation Symbols</h4> + <h5 id="i-symbol"><code>.</code> Symbol</h5> + <p><mark>q → *</mark></p> + <h5 id="eval-symbol"><code>!</code> Symbol</h5> + <p><mark>s →</mark></p> + <h5 id="quote-symbol"><code>'</code> Symbol</h5> + <p><mark>a → q</mark></p> + <h4 id="arithmetic-symbols">Arithmetic Symbols</h4> + <h5 id="add-symbol"><code>+</code> Symbol</h5> + <p><mark> i1 i2 → i</mark></p> + <h5 id="subtract-symbol"><code>-</code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h5 id="multiply-symbol"><code>*</code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h5 id="divide-symbol"><code>/</code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h5 id="module-symbol"><code>%</code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h4 id="bitwise-operations-symbols">Bitwise Operations Symbols</h4> + <h5 id="bitwise-and-symbol"><code>&</code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h5 id="bitwise-or-symbol"><code>|</code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h5 id="bitwise-xor-symbol"><code>^</code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h5 id="bitwise-not-symbol"><code>~</code> Symbol</h5> + <p><mark> i → i</mark></p> + <h5 id="bitwise-leftshift-symbol"><code><<</code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h5 id="bitwise-rightshift-symbol"><code>>></code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h4 id="comparisons-symbols">Comparisons Symbols</h4> + <h5 id="equal-symbol"><code>==</code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h5 id="notequal-symbol"><code>!=</code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h5 id="greaterthan-symbol"><code>></code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h5 id="lessthan-symbol"><code><</code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h5 id="greaterthanequal-symbol"><code>>=</code> Symbol</h5> + <p><mark> i1 12 → i</mark></p> + <h5 id="lessthanequal-symbol"><code><=</code> Symbol</h5> + <p><mark> i1 i2 → i</mark></p> + <h4 id="boolean-logic-symbols">Boolean Logic Symbols</h4> + <h5 id="and-symbol"><code>and</code> Symbol</h5> + <p><mark> i1 i2 → i</mark></p> + <h5 id="or-symbol"><code>or</code> Symbol</h5> + <p><mark> i1 i2 → i</mark></p> + <h5 id="not-symbol"><code>not</code> Symbol</h5> + <p><mark> i → i</mark></p> + <h5 id="xor-symbol"><code>xor</code> Symbol</h5> + <p><mark> i1 i2 → i</mark></p> + <h4 id="datatype-conversions-and-checking-symbols">Datatype Conversions and Checking Symbols</h4> + <h5 id="int-symbol"><code>int</code> Symbol</h5> + <p><mark> (i|s) → i</mark></p> + <h5 id="str-symbol"><code>str</code> Symbol</h5> + <p><mark> (i|s) → s</mark></p> + <h5 id="dec-symbol"><code>dec</code> Symbol</h5> + <p><mark> i → s</mark></p> + <h5 id="hex-symbol"><code>hex</code> Symbol</h5> + <p><mark> s → i</mark></p> + <h5 id="type-symbol"><code>type</code> Symbol</h5> + <p><mark> a → s</mark></p> + <h4 id="list-symbols">List (Strings and Quotations) Symbols</h4> + <h5 id="cat-symbol"><code>cat</code> Symbol</h5> + <p><mark> (s s|q q) → (s|q)</mark></p> + <h5 id="slice-symbol"><code>slice</code> Symbol</h5> + <p><mark> (s i1 i2|q i1 i2) → (s|q)</mark></p> + <h5 id="len-symbol"><code>len</code> Symbol</h5> + <p><mark> (s|q) → i</mark></p> + <h5 id="get-symbol"><code>get</code> Symbol</h5> + <p><mark> (s|q) → a</mark></p> + <h5 id="insert-symbol"><code>insert</code> Symbol</h5> + <p><mark> (s a i|q a i) → (s|q)</mark></p> + <h5 id="index-symbol"><code>index</code> Symbol</h5> + <p><mark> (s a|q a) → i</mark></p> + <h5 id="join-symbol"><code>join</code> Symbol</h5> + <p><mark> q s → s</mark></p> + <h4 id="string-symbols">String Symbols</h4> + <h5 id="split-symbol"><code>split</code> Symbol</h5> + <p><mark> s1 s2 → q</mark></p> + <h5 id="replace-symbol"><code>replace</code> Symbol</h5> + <p><mark> s1 s2 s3 →</mark></p> + <h4 id="quotation-symbols">Quotation Symbols</h4> + <h5 id="each-symbol"><code>each</code> Symbol</h5> + <p><mark> q1 q2 → *</mark></p> + <h5 id="map-symbol"><code>map</code> Symbol</h5> + <p><mark> q1 q2 → q</mark></p> + <h5 id="filter-symbol"><code>filter</code> Symbol</h5> + <p><mark> q1 q2 → q</mark></p> + <h4 id="input-output-symbols">Input/Output Symbols</h4> + <h5 id="puts-symbol"><code>puts</code> Symbol</h5> + <p><mark> a →</mark></p> + <h5 id="warn-symbol"><code>warn</code> Symbol</h5> + <p><mark> a →</mark></p> + <h5 id="print-symbol"><code>print</code> Symbol</h5> + <p><mark> a →</mark></p> + <h5 id="gets-symbol"><code>gets</code> Symbol</h5> + <p><mark> → s</mark></p> + <h4 id="file-symbols">File Symbols</h4> + <h5 id="read-symbol"><code>read</code> Symbol</h5> + <p><mark> s → s</mark></p> + <h5 id="write-symbol"><code>write</code> Symbol</h5> + <p><mark> s1 s2 → s</mark></p> + <h5 id="append-symbol"><code>append</code> Symbol</h5> + <p><mark> s1 s2 → s</mark></p> + <h4 id="shell-symbols">Shell Symbols</h4> + <h5 id="args-symbol"><code>args</code> Symbol</h5> + <p><mark> → q</mark></p> + <h5 id="exit-symbol"><code>exit</code> Symbol</h5> + <p><mark> i →</mark></p> + <h5 id="exec-symbol"><code>exec</code> Symbol</h5> + <p><mark> s →</mark></p> + <h5 id="run-symbol"><code>run</code> Symbol</h5> + <p><mark> s → q</mark></p> </article>