web/contents/spec.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
<article> <h2>Specification</h2> <blockquote> <p>Under construction.</p> </blockquote> <h3 id="introduction">Introduction</h3> <h3 id="syntax">Syntax</h3> <h4 id="comments">Comments</h4> <h4 id="integer-literals">Integer Literals</h4> <h4 id="string-literals">String Literals</h4> <h4 id="quotation-literals">Quotation Literals</h4> <h4 id="symbol-identifiers">Symbol Identifiers</h4> <h3 id="data-types">Data Types</h3> <h4 id="integers">Integers</h4> <h4 id="strings">Strings</h4> <h4 id="quotations">Quotations</h4> <h4 id="symbols">Symbols</h4> <h3 id="stack">Stack</h3> <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-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="ord-symbol"><code>ord</code> Symbol</h5> <p><mark> s → i</mark></p> <h5 id="chr-symbol"><code>chr</code> Symbol</h5> <p><mark> i → s</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="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="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> |