diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-10-03 16:38:35 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-10-03 16:38:35 -0400 |
| commit | 673de1c627a2046123e1693e9e6508399a028508 (patch) | |
| tree | 86303316523319eeebcf0e0c52a2be781089c286 /docs/spec | |
| parent | 8846e63a6f1fe51ee9a68dc511cc6fcdbf54efa6 (diff) | |
Write files directly from md.bqn, not gendocs (removes trailing empty lines)
Diffstat (limited to 'docs/spec')
| -rw-r--r-- | docs/spec/evaluate.html | 1 | ||||
| -rw-r--r-- | docs/spec/grammar.html | 1 | ||||
| -rw-r--r-- | docs/spec/index.html | 1 | ||||
| -rw-r--r-- | docs/spec/inferred.html | 1 | ||||
| -rw-r--r-- | docs/spec/literal.html | 1 | ||||
| -rw-r--r-- | docs/spec/scope.html | 1 | ||||
| -rw-r--r-- | docs/spec/token.html | 1 | ||||
| -rw-r--r-- | docs/spec/types.html | 1 |
8 files changed, 0 insertions, 8 deletions
diff --git a/docs/spec/evaluate.html b/docs/spec/evaluate.html index ab2b6bf4..3ba25d9e 100644 --- a/docs/spec/evaluate.html +++ b/docs/spec/evaluate.html @@ -97,4 +97,3 @@ </tbody> </table> <p>As with applications, all expressions are evaluated in reverse source order before doing anything else. Then a result is formed without calling the center value. Its value in BQN is given in the rightmost column, using <code><span class='Function'>L</span></code>, <code><span class='Function'>C</span></code>, and <code><span class='Function'>R</span></code> for the results of the expressions in the left, center, and right columns, respectively. For the first two rules (<em>partial application</em>), the given operand is bound to the 2-modifier: the result is a 1-modifier that, when called, calls the center 2-modifier with the bound operand on the same side it appeared on and the new operand on the remaining side. A <em>train</em> is a function that, when called, calls the right-hand function on all arguments, then the left-hand function, and calls the center function with these results as arguments. In a modifier partial application, the result will fail when applied if the center value does not have the 2-modifier type, and in a fork, it will fail if any component has a modifier type (that is, cannot be applied as a function). BQN implementations are not required to check for these types when forming the result of these expressions, but may give an error on formation even if the result will never be applied.</p> - diff --git a/docs/spec/grammar.html b/docs/spec/grammar.html index 66734fc4..b5443ce7 100644 --- a/docs/spec/grammar.html +++ b/docs/spec/grammar.html @@ -141,4 +141,3 @@ <span class='Function'>|</span> <span class='Paren'>(</span> <span class='Value'>subject_allow1</span> <span class='Function'>|</span> <span class='Value'>nothing_allow1</span> <span class='Paren'>)</span><span class='Value'>?</span> <span class='Function'>Derv_allow1</span> <span class='Value'>arg_req1</span> </pre> <p>Quite tedious. The explosion of rules is partly due to the fact that the brace-typing rule falls into a weaker class of grammars than the other rules. Most of BQN is <a href="https://en.wikipedia.org/wiki/Deterministic_context-free_grammar">deterministic context-free</a> but brace-typing is not, only context-free. Fortunately brace typing does not introduce the parsing difficulties that can be present in a general context-free grammar, and it can easily be performed in linear time: after <a href="token.html">scanning</a> but before parsing, move through the source code maintaining a stack of the current top-level set of braces. Whenever a colon or special name is encountered, annotate that set of braces to indicate that it is present. When a closing brace is encountered and the top brace is popped off the stack, the type is needed if there was no colon, and can be found based on which names were present. One way to present this information to the parser is to replace the brace tokens with new tokens that indicate the type.</p> - diff --git a/docs/spec/index.html b/docs/spec/index.html index 3d9ae69a..017ab106 100644 --- a/docs/spec/index.html +++ b/docs/spec/index.html @@ -17,4 +17,3 @@ <li>Primitives (<a href="https://github.com/mlochbaum/BQN/blob/master/spec/reference.bqn">reference implementations</a>)</li> <li><a href="inferred.html">Inferred properties</a> (type, Undo, and Under)</li> </ul> - diff --git a/docs/spec/inferred.html b/docs/spec/inferred.html index f01450ea..cf8520bd 100644 --- a/docs/spec/inferred.html +++ b/docs/spec/inferred.html @@ -336,4 +336,3 @@ </tr> </tbody> </table> - diff --git a/docs/spec/literal.html b/docs/spec/literal.html index c9e9d362..2b6b5559 100644 --- a/docs/spec/literal.html +++ b/docs/spec/literal.html @@ -17,4 +17,3 @@ <p>The digits or arabic numerals correspond to the numbers from 0 to 9 in the conventional way (also, each corresponds to its code point value minus 48). A sequence of digits gives a natural number by evaluating it in base 10: the number is 0 for an empty sequence, and otherwise the last digit's numerical value plus ten times the number obtained from the remaining digits. The symbol <code><span class='Number'>β</span></code> indicates infinity and <code><span class='Number'>Ο</span></code> indicates the ratio <a href="https://en.wikipedia.org/wiki/Pi_(mathematics)">pi</a> of a circle's circumference to its diameter (or, for modern mathematicians, the smallest positive real number at which the function <code><span class='Brace'>{</span><span class='Function'>β</span><span class='Number'>0i1</span><span class='Function'>Γ</span><span class='Value'>π©</span><span class='Brace'>}</span></code> attains a real part of 0). The <a href="https://aplwiki.com/wiki/High_minus">high minus</a> symbol <code><span class='Number'>Β―</span></code> indicates that the number containing it is to be negated.</p> <p>When an exponent is provided (with <code><span class='Value'>e</span></code> or <code><span class='Function'>E</span></code>), the corresponding mantissa is multiplied by ten to that power, giving the value <code><span class='Value'>mantissa</span><span class='Function'>Γ</span><span class='Number'>10</span><span class='Function'>β</span><span class='Value'>exponent</span></code>. If a second component is present (using <code><span class='Value'>i</span></code> or <code><span class='Function'>I</span></code>), that component's value is multiplied by the <a href="https://en.wikipedia.org/wiki/Imaginary_unit">imaginary unit</a> <em>i</em> and added to the first component; otherwise the value is the first component's value without modification. If complex numbers are not supported, then <code><span class='Value'>i</span></code> should not be allowed in numeric literals, even when followed by 0.</p> <p>The above specification describes exactly a complex number with extended real components. To obtain a BQN number, each component is rounded to its nearest representative by the rules of the number system used: for IEEE 754, smallest distance, with ties rounding to the option with even mantissa.</p> - diff --git a/docs/spec/scope.html b/docs/spec/scope.html index 6e8dd6ac..3893389e 100644 --- a/docs/spec/scope.html +++ b/docs/spec/scope.html @@ -22,4 +22,3 @@ <p>A <em>variable</em> is an entity that permits two operations: it can be <em>set</em> to a particular value, and its <em>value</em> can be obtained, resulting in the last value it was set to. When either operation is performed it is referred to as <em>accessing</em> the variable.</p> <p>When a body in a block is evaluated, a variable is created for each definition (that is, defined identifier instance) the body contains. Whenever another blockβthe block itself, not its contentsβis evaluated during the execution of the block, it is linked to the currently-evaluating block, so that it will use the variables defined in this instance. These links are recursive, so that every instance of a block is linked to exactly one instance of each block that contains it. These links form a tree that is not necessarily related to the call stack of functions and modifiers. Using these links, the variable an identifier refers to is the one corresponding to that variable's definition in the linked instance of the containing scope for the definition.</p> <p>The first access to a variable must be made by its definition (this also means it sets the variable). If a different instance of its identifier accesses it first, then an error results. This can happen because every scope contained in a particular scope sees all the definitions it uses, and such a scope could be called before the definition is run. Because of conditional execution, this property must be checked at run time in general; however, in cases where it is possible to statically determine that a program will always violate it, a BQN instance can give an error at compile time rather than run time.</p> - diff --git a/docs/spec/token.html b/docs/spec/token.html index 799ae387..b39b524d 100644 --- a/docs/spec/token.html +++ b/docs/spec/token.html @@ -47,4 +47,3 @@ </tbody> </table> <p>In the BQN <a href="grammar.html">grammar specification</a>, the three primitive classes are grouped into terminals <code><span class='Function'>Fl</span></code>, <code><span class='Modifier'>_ml</span></code>, and <code><span class='Modifier'>_cl</span></code>, while the punctuation characters are identified separately as keywords such as <code><span class='String'>"β"</span></code>. The special names are handled specially. The uppercase versions <code><span class='Function'>πππ½πΎπ</span></code> and lowercase versions <code><span class='Value'>π¨π©πππ€</span></code> are two spellings of the five underlying inputs and function.</p> - diff --git a/docs/spec/types.html b/docs/spec/types.html index 8c9c694a..3e6f3696 100644 --- a/docs/spec/types.html +++ b/docs/spec/types.html @@ -23,4 +23,3 @@ <p>To begin the data types, a <em>character</em> is a <a href="https://en.wikipedia.org/wiki/Unicode">Unicode</a> code point, that is, its value is a non-negative integer within the ranges defined by Unicode (however, it is distinct from this number as a BQN value). Characters are ordered by this numeric value. BQN deals with code points as abstract entities and does not expose encodings such as UTF-8 or UTF-16.</p> <p>The precise type of a <em>number</em> may vary across BQN implementations or instances. A <em>real number</em> is a member of some supported subset of the <a href="https://en.wikipedia.org/wiki/Extended_real_number_line">extended real numbers</a>, that is, the real numbers and positive or negative infinity. Some system must be defined for rounding an arbitrary real number to a member of this subset, and the basic arithmetic operations add, subtract, multiply, divide, and natural exponent (base <em>e</em>) are defined by performing these operations on exact real values and rounding the result. The Power function (dyadic <code><span class='Function'>β</span></code>) is also used but need not be exactly rounded. A <em>complex number</em> is a value with two real number <em>components</em>, a <em>real part</em> and an <em>imaginary part</em>. A BQN implementation can either support real numbers only, or complex numbers.</p> <p>An <em>array</em> is a rectangular collection of data. It is defined by a <em>shape</em>, which is a list of non-negative integer lengths, and a <em>ravel</em>, which is a list of <em>elements</em> whose length (the array's <em>bound</em>) is the product of all lengths in the shape. Arrays are defined inductively: any value (of a value or function type) can be used as an element of an array, but it is not possible for an array to contain itself as an element, or an array that contains itself, and so on. Types other than array are called <em>atomic types</em>, and their members are called <em>atoms</em>.</p> - |
