aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/spec/evaluate.html8
-rw-r--r--docs/spec/grammar.html8
-rw-r--r--docs/spec/index.html2
-rw-r--r--docs/spec/scope.html2
-rw-r--r--docs/spec/token.html2
5 files changed, 13 insertions, 9 deletions
diff --git a/docs/spec/evaluate.html b/docs/spec/evaluate.html
index 50e42796..8c99de10 100644
--- a/docs/spec/evaluate.html
+++ b/docs/spec/evaluate.html
@@ -18,12 +18,14 @@
<p>When a predicate <code><span class='String'>&quot;?&quot;</span></code> is evaluated, the associated <code><span class='Function'>EXPR</span></code> is evaluated and its result is checked. If it's not one of the numbers <code><span class='Number'>0</span></code> or <code><span class='Number'>1</span></code>, an error results. If it's <code><span class='Number'>1</span></code>, evaluation of the <code><span class='Function'>BODY</span></code> continues as usual. If it's <code><span class='Number'>0</span></code>, evaluation is stopped and the next compatible <code><span class='Function'>BODY</span></code> term is evaluated using the block's original inputs.</p>
<p>If there is no left argument, but the <code><span class='Function'>BODY</span></code> contains <code><span class='Value'>๐•จ</span></code> or <code><span class='Function'>๐•Ž</span></code> at the top level, then it is conceptually re-parsed with <code><span class='Value'>๐•จ</span></code> replaced by <code><span class='Nothing'>ยท</span></code> to give a monadic version before application; this modifies the syntax tree by replacing some instances of <code><span class='Value'>subject</span></code>, <code><span class='Value'>arg</span></code>, or <code><span class='Function'>Operand</span></code> with <code><span class='Value'>nothing</span></code>. The token <code><span class='Function'>๐•Ž</span></code> is not allowed in this case and causes an error. Re-parsing <code><span class='Value'>๐•จ</span></code> can also cause an error if it's used as an operand or list element, where <code><span class='Value'>nothing</span></code> is not allowed by the grammar. Note that these errors must not appear if the block is always called with two arguments. True re-parsing is not required, as the same effect can also be achieved dynamically by treating <code><span class='Nothing'>ยท</span></code> as a value and checking for it during execution. If it's used as a left argument, then the function should instead be called with no left argument (and similarly in trains); if it's used as a right argument, then the function and its left argument are evaluated but rather than calling the function <code><span class='Nothing'>ยท</span></code> is &quot;returned&quot; immediately; and if it's used in another context then it causes an error.</p>
<h3 id="assignment"><a class="header" href="#assignment">Assignment</a></h3>
-<p>An <em>assignment</em> is one of the four rules containing <code><span class='Function'>ASGN</span></code>. It is evaluated by first evaluating the right-hand-side <code><span class='Value'>subExpr</span></code>, <code><span class='Function'>FuncExpr</span></code>, <code><span class='Modifier'>_m1Expr</span></code>, or <code><span class='Modifier2'>_m2Exp_</span></code> expression, and then storing the result in the left-hand-side identifier or identifiers. The result of the assignment expression is the result of its right-hand side. Except for subjects, only a lone identifier is allowed on the left-hand side and storage sets it equal to the result. For subjects, <em>destructuring assignment</em> is performed when an <code><span class='Value'>lhs</span></code> is <code><span class='Value'>lhsList</span></code> or <code><span class='Value'>lhsStr</span></code>. Destructuring assignment is performed recursively by assigning right-hand-side values to the left-hand-side targets, with single-identifier assignment as the base case. The target <code><span class='String'>&quot;ยท&quot;</span></code> is also possible in place of a <code><span class='Function'>NAME</span></code>, and performs no assignment.</p>
-<p>The right-hand-side value, here called <code><span class='Value'>v</span></code>, in destructuring assignment must be a list (rank 1 array) or namespace. If it's a list, then each <code><span class='Function'>LHS_ENTRY</span></code> node must be an <code><span class='Function'>LHS_ELT</span></code>. The left-hand side is treated as a list of <code><span class='Value'>lhs</span></code> targets, and matched to <code><span class='Value'>v</span></code> element-wise, with an error if the two lists differ in length. If <code><span class='Value'>v</span></code> is a namespace, then the left-hand side must be an <code><span class='Value'>lhsStr</span></code> where every <code><span class='Function'>LHS_ATOM</span></code> is an <code><span class='Function'>NAME</span></code>, or an <code><span class='Value'>lhsList</span></code> where every <code><span class='Function'>LHS_ENTRY</span></code> is an <code><span class='Function'>NAME</span></code> or <code><span class='Value'>lhs</span> <span class='String'>&quot;โ‡&quot;</span> <span class='Function'>NAME</span></code>, so that it can be considered a list of <code><span class='Function'>NAME</span></code> nodes some of which are also associated with <code><span class='Value'>lhs</span></code> nodes. To perform the assignment, the value of each name is obtained from the namespace <code><span class='Value'>v</span></code>, giving an error if <code><span class='Value'>v</span></code> does not define that name. The value is assigned to the <code><span class='Value'>lhs</span></code> node if present (which may be a destructuring assignment or simple subject assignment), and otherwise assigned to the same <code><span class='Function'>NAME</span></code> node used to get it from <code><span class='Value'>v</span></code>.</p>
+<p>An <em>assignment</em> is one of the four rules containing <code><span class='Function'>ASGN</span></code>. It is evaluated by first evaluating the right-hand-side <code><span class='Value'>subExpr</span></code>, <code><span class='Function'>FuncExpr</span></code>, <code><span class='Modifier'>_m1Expr</span></code>, or <code><span class='Modifier2'>_m2Exp_</span></code> expression, and then storing the result in the left-hand-side identifier or identifiers. The result of the assignment expression is the result of its right-hand side. Except for subjects, only a lone identifier is allowed on the left-hand side and storage sets it equal to the result. For subjects, <em>destructuring assignment</em> is performed when an <code><span class='Value'>lhs</span></code> is <code><span class='Value'>lhsList</span></code>, <code><span class='Value'>lhsStr</span></code>, or <code><span class='Value'>lhsArray</span></code>. Destructuring assignment is performed recursively by assigning right-hand-side values to the left-hand-side targets, with single-identifier assignment as the base case. The target <code><span class='String'>&quot;ยท&quot;</span></code> is also possible in place of a <code><span class='Function'>NAME</span></code>, and performs no assignment.</p>
+<p>In assignment to <code><span class='Value'>lhsList</span></code> or <code><span class='Value'>lhsStr</span></code>, the right-hand-side value, here called <code><span class='Value'>v</span></code>, must be a list (rank 1 array) or namespace. If it's a list, then each <code><span class='Function'>LHS_ENTRY</span></code> node must be an <code><span class='Function'>LHS_ELT</span></code>. The left-hand side is treated as a list of <code><span class='Value'>lhs</span></code> targets, and matched to <code><span class='Value'>v</span></code> element-wise, with an error if the two lists differ in length. If <code><span class='Value'>v</span></code> is a namespace, then the left-hand side must be an <code><span class='Value'>lhsStr</span></code> where every <code><span class='Function'>LHS_ATOM</span></code> is an <code><span class='Function'>NAME</span></code>, or an <code><span class='Value'>lhsList</span></code> where every <code><span class='Function'>LHS_ENTRY</span></code> is an <code><span class='Function'>NAME</span></code> or <code><span class='Value'>lhs</span> <span class='String'>&quot;โ‡&quot;</span> <span class='Function'>NAME</span></code>, so that it can be considered a list of <code><span class='Function'>NAME</span></code> nodes some of which are also associated with <code><span class='Value'>lhs</span></code> nodes. To perform the assignment, the value of each name is obtained from the namespace <code><span class='Value'>v</span></code>, giving an error if <code><span class='Value'>v</span></code> does not define that name. The value is assigned to the <code><span class='Value'>lhs</span></code> node if present (which may be a destructuring assignment or simple subject assignment), and otherwise assigned to the same <code><span class='Function'>NAME</span></code> node used to get it from <code><span class='Value'>v</span></code>.</p>
+<p>Assignment to <code><span class='Value'>lhsArray</span></code> destructures the major cells of right-hand-side value <code><span class='Value'>v</span></code>, which must be an array of rank at least 1. The number of cells in <code><span class='Value'>v</span></code> is its length <code><span class='Value'>l</span></code>, that is, the first element of its shape. The shape of each is the shape of <code><span class='Value'>v</span></code> without its first element, and the cell ravels are formed by splitting <code><span class='Value'>v</span></code>'s ravel evenly into <code><span class='Value'>l</span></code> sections. Besides this difference in how <code><span class='Value'>v</span></code> is divided, assignment behaves the same way as assignment of a list <code><span class='Value'>v</span></code> to <code><span class='Value'>lhsList</span></code>.</p>
<p>A destructuring assignment is performed in program order, or equivalently index order, with each sub-assignment fully completed before beginning the next (a depth-first order). Thus if an assignment with <code><span class='Gets'>โ†ฉ</span></code> encounters an error but it's caught with <code><span class='Modifier2'>โŽŠ</span></code>, some of the assignment may have already been performed, changing variable values.</p>
<p><em>Modified assignment</em> is the subject assignment rule <code><span class='Value'>lhs</span> <span class='Function'>Derv</span> <span class='String'>&quot;โ†ฉ&quot;</span> <span class='Value'>subExpr</span><span class='Head'>?</span></code>. In this case, <code><span class='Value'>lhs</span></code> is evaluated as if it were a <code><span class='Value'>subExpr</span></code> (the syntax is a subset of <code><span class='Value'>subExpr</span></code>), and passed as an argument to <code><span class='Function'>Derv</span></code>. The full application is <code><span class='Value'>lhs</span> <span class='Function'>Derv</span> <span class='Value'>subExpr</span></code>, if <code><span class='Value'>subExpr</span></code> is given, and <code><span class='Function'>Derv</span> <span class='Value'>lhs</span></code> otherwise. Its value is assigned to <code><span class='Value'>lhs</span></code>, and is also the result of the modified assignment expression.</p>
<h3 id="expressions"><a class="header" href="#expressions">Expressions</a></h3>
-<p>We now give rules for evaluating an <code><span class='Value'>atom</span></code>, <code><span class='Function'>Func</span></code>, <code><span class='Modifier'>_mod1</span></code> or <code><span class='Modifier2'>_mod2_</span></code> expression (the possible options for <code><span class='Function'>ANY</span></code>). A literal or primitive <code><span class='Value'>sl</span></code>, <code><span class='Function'>Fl</span></code>, <code><span class='Modifier'>_ml</span></code>, or <code><span class='Modifier2'>_cl_</span></code> has a fixed value defined by the specification (<a href="literal.html">literals</a> and <a href="primitive.html">built-ins</a>). An identifier <code><span class='Value'>s</span></code>, <code><span class='Function'>F</span></code>, <code><span class='Modifier'>_m</span></code>, or <code><span class='Modifier2'>_c_</span></code>, if not preceded by <code><span class='Value'>atom</span> <span class='String'>&quot;.&quot;</span></code>, must have an associated variable due to the scoping rules, and returns this variable's value, or causes an error if it has not yet been set. If it is preceded by <code><span class='Value'>atom</span> <span class='String'>&quot;.&quot;</span></code>, then the <code><span class='Value'>atom</span></code> node is evaluated first; its value must be a namespace, and the result is the value of the identifier's name in the namespace, or an error if the name is undefined. A parenthesized expression such as <code><span class='String'>&quot;(&quot;</span> <span class='Modifier'>_modExpr</span> <span class='String'>&quot;)&quot;</span></code> simply returns the result of the interior expression. A block is defined by the evaluation of the statements it contains after all parameters are accepted, as described above. Finally, a list <code><span class='String'>&quot;โŸจ&quot;</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>(</span> <span class='Paren'>(</span> <span class='Function'>EXPR</span> <span class='Separator'>โ‹„</span> <span class='Paren'>)</span><span class='Value'>*</span> <span class='Function'>EXPR</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>)</span><span class='Head'>?</span> <span class='String'>&quot;โŸฉ&quot;</span></code> or <code><span class='Function'>ANY</span> <span class='Paren'>(</span> <span class='String'>&quot;โ€ฟ&quot;</span> <span class='Function'>ANY</span> <span class='Paren'>)</span><span class='Function'>+</span></code> consists grammatically of a list of expressions. To evaluate it, each expression is evaluated in source order and their results are placed as elements of a rank-1 array. The two forms have identical semantics but different punctuation.</p>
+<p>We now give rules for evaluating an <code><span class='Value'>atom</span></code>, <code><span class='Function'>Func</span></code>, <code><span class='Modifier'>_mod1</span></code> or <code><span class='Modifier2'>_mod2_</span></code> expression (the possible options for <code><span class='Function'>ANY</span></code>). A literal or primitive <code><span class='Value'>sl</span></code>, <code><span class='Function'>Fl</span></code>, <code><span class='Modifier'>_ml</span></code>, or <code><span class='Modifier2'>_cl_</span></code> has a fixed value defined by the specification (<a href="literal.html">literals</a> and <a href="primitive.html">built-ins</a>). An identifier <code><span class='Value'>s</span></code>, <code><span class='Function'>F</span></code>, <code><span class='Modifier'>_m</span></code>, or <code><span class='Modifier2'>_c_</span></code>, if not preceded by <code><span class='Value'>atom</span> <span class='String'>&quot;.&quot;</span></code>, must have an associated variable due to the scoping rules, and returns this variable's value, or causes an error if it has not yet been set. If it is preceded by <code><span class='Value'>atom</span> <span class='String'>&quot;.&quot;</span></code>, then the <code><span class='Value'>atom</span></code> node is evaluated first; its value must be a namespace, and the result is the value of the identifier's name in the namespace, or an error if the name is undefined. A parenthesized expression such as <code><span class='String'>&quot;(&quot;</span> <span class='Modifier'>_modExpr</span> <span class='String'>&quot;)&quot;</span></code> simply returns the result of the interior expression. A block is defined by the evaluation of the statements it contains after all parameters are accepted, as described above.</p>
+<p>A list <code><span class='String'>&quot;โŸจ&quot;</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>(</span> <span class='Paren'>(</span> <span class='Function'>EXPR</span> <span class='Separator'>โ‹„</span> <span class='Paren'>)</span><span class='Value'>*</span> <span class='Function'>EXPR</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>)</span><span class='Head'>?</span> <span class='String'>&quot;โŸฉ&quot;</span></code> or <code><span class='Function'>ANY</span> <span class='Paren'>(</span> <span class='String'>&quot;โ€ฟ&quot;</span> <span class='Function'>ANY</span> <span class='Paren'>)</span><span class='Function'>+</span></code> consists grammatically of a list of expressions. To evaluate it, each expression is evaluated in source order and their results are placed as elements of a rank-1 array. The two forms have identical semantics but different punctuation. The square bracket notation <code><span class='String'>&quot;[&quot;</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>(</span> <span class='Function'>EXPR</span> <span class='Separator'>โ‹„</span> <span class='Paren'>)</span><span class='Value'>*</span> <span class='Function'>EXPR</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='String'>&quot;]&quot;</span></code> evaluates expressions in the same way, but makes them into major cells of an array instead of elements. The result is identical to applying the <a href="primitive.html">primitive</a> function Merge (<code><span class='Function'>&gt;</span></code>) to a list of the expression results.</p>
<p>Rules in the table below are function and modifier evaluation.</p>
<table>
<thead>
diff --git a/docs/spec/grammar.html b/docs/spec/grammar.html
index 139a5dd4..c7212568 100644
--- a/docs/spec/grammar.html
+++ b/docs/spec/grammar.html
@@ -19,8 +19,9 @@
<span class='Modifier2'>_mod2_</span> <span class='Function'>=</span> <span class='Paren'>(</span> <span class='Value'>atom</span> <span class='String'>&quot;.&quot;</span> <span class='Paren'>)</span><span class='Head'>?</span> <span class='Modifier2'>_c_</span> <span class='Function'>|</span> <span class='Modifier2'>_cl_</span> <span class='Function'>|</span> <span class='String'>&quot;(&quot;</span> <span class='Modifier2'>_m2Expr_</span> <span class='String'>&quot;)&quot;</span> <span class='Function'>|</span> <span class='Modifier2'>_blMod2_</span>
<span class='Modifier'>_mod1</span> <span class='Function'>=</span> <span class='Paren'>(</span> <span class='Value'>atom</span> <span class='String'>&quot;.&quot;</span> <span class='Paren'>)</span><span class='Head'>?</span> <span class='Modifier'>_m</span> <span class='Function'>|</span> <span class='Modifier'>_ml</span> <span class='Function'>|</span> <span class='String'>&quot;(&quot;</span> <span class='Modifier'>_m1Expr</span> <span class='String'>&quot;)&quot;</span> <span class='Function'>|</span> <span class='Modifier'>_blMod1</span>
<span class='Function'>Func</span> <span class='Function'>=</span> <span class='Paren'>(</span> <span class='Value'>atom</span> <span class='String'>&quot;.&quot;</span> <span class='Paren'>)</span><span class='Head'>?</span> <span class='Function'>F</span> <span class='Function'>|</span> <span class='Function'>Fl</span> <span class='Function'>|</span> <span class='String'>&quot;(&quot;</span> <span class='Function'>FuncExpr</span> <span class='String'>&quot;)&quot;</span> <span class='Function'>|</span> <span class='Function'>BlFunc</span>
-<span class='Value'>atom</span> <span class='Function'>=</span> <span class='Paren'>(</span> <span class='Value'>atom</span> <span class='String'>&quot;.&quot;</span> <span class='Paren'>)</span><span class='Head'>?</span> <span class='Value'>s</span> <span class='Function'>|</span> <span class='Value'>sl</span> <span class='Function'>|</span> <span class='String'>&quot;(&quot;</span> <span class='Value'>subExpr</span> <span class='String'>&quot;)&quot;</span> <span class='Function'>|</span> <span class='Value'>blSub</span> <span class='Function'>|</span> <span class='Value'>list</span>
-<span class='Value'>list</span> <span class='Function'>=</span> <span class='String'>&quot;โŸจ&quot;</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>(</span> <span class='Paren'>(</span> <span class='Function'>EXPR</span> <span class='Separator'>โ‹„</span> <span class='Paren'>)</span><span class='Value'>*</span> <span class='Function'>EXPR</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>)</span><span class='Head'>?</span> <span class='String'>&quot;โŸฉ&quot;</span>
+<span class='Value'>atom</span> <span class='Function'>=</span> <span class='Paren'>(</span> <span class='Value'>atom</span> <span class='String'>&quot;.&quot;</span> <span class='Paren'>)</span><span class='Head'>?</span> <span class='Value'>s</span> <span class='Function'>|</span> <span class='Value'>sl</span> <span class='Function'>|</span> <span class='String'>&quot;(&quot;</span> <span class='Value'>subExpr</span> <span class='String'>&quot;)&quot;</span> <span class='Function'>|</span> <span class='Value'>blSub</span> <span class='Function'>|</span> <span class='Value'>array</span>
+<span class='Value'>array</span> <span class='Function'>=</span> <span class='String'>&quot;โŸจ&quot;</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>(</span> <span class='Paren'>(</span> <span class='Function'>EXPR</span> <span class='Separator'>โ‹„</span> <span class='Paren'>)</span><span class='Value'>*</span> <span class='Function'>EXPR</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>)</span><span class='Head'>?</span> <span class='String'>&quot;โŸฉ&quot;</span>
+ <span class='Function'>|</span> <span class='String'>&quot;[&quot;</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>(</span> <span class='Function'>EXPR</span> <span class='Separator'>โ‹„</span> <span class='Paren'>)</span><span class='Value'>*</span> <span class='Function'>EXPR</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='String'>&quot;]&quot;</span>
<span class='Value'>subject</span> <span class='Function'>=</span> <span class='Value'>atom</span> <span class='Function'>|</span> <span class='Function'>ANY</span> <span class='Paren'>(</span> <span class='String'>&quot;โ€ฟ&quot;</span> <span class='Function'>ANY</span> <span class='Paren'>)</span><span class='Function'>+</span>
</pre>
<p>Starting at the highest-order objects, modifiers have simple syntax. In most cases the syntax for <code><span class='Gets'>โ†</span></code> and <code><span class='Gets'>โ†ฉ</span></code> is the same, but only <code><span class='Gets'>โ†ฉ</span></code> can be used for modified assignment. The export arrow <code><span class='Gets'>โ‡</span></code> can be used in the same ways as <code><span class='Gets'>โ†</span></code>, but it can also be used at the beginning of a header to force a namespace result, or with no expression on the right in an <code><span class='Function'>EXPORT</span></code> statement.</p>
@@ -55,13 +56,14 @@
</span></pre>
<p>The target of subject assignment can be compound to allow for destructuring. List and namespace assignment share the nodes <code><span class='Value'>lhsList</span></code> and <code><span class='Value'>lhsStr</span></code> and cannot be completely distinguished until execution. The term <code><span class='Value'>sl</span></code> in <code><span class='Function'>LHS_SUB</span></code> is used for header inputs below: as an additional rule, it cannot be used in the <code><span class='Value'>lhs</span></code> term of a <code><span class='Value'>subExpr</span></code> node.</p>
<pre><span class='Function'>NAME</span> <span class='Function'>=</span> <span class='Value'>s</span> <span class='Function'>|</span> <span class='Function'>F</span> <span class='Function'>|</span> <span class='Modifier'>_m</span> <span class='Function'>|</span> <span class='Modifier2'>_c_</span>
-<span class='Function'>LHS_SUB</span> <span class='Function'>=</span> <span class='String'>&quot;ยท&quot;</span> <span class='Function'>|</span> <span class='Value'>lhsList</span> <span class='Function'>|</span> <span class='Value'>sl</span>
+<span class='Function'>LHS_SUB</span> <span class='Function'>=</span> <span class='String'>&quot;ยท&quot;</span> <span class='Function'>|</span> <span class='Value'>lhsList</span> <span class='Function'>|</span> <span class='Value'>lhsArray</span> <span class='Function'>|</span> <span class='Value'>sl</span>
<span class='Function'>LHS_ANY</span> <span class='Function'>=</span> <span class='Function'>NAME</span> <span class='Function'>|</span> <span class='Function'>LHS_SUB</span> <span class='Function'>|</span> <span class='String'>&quot;(&quot;</span> <span class='Function'>LHS_ELT</span> <span class='String'>&quot;)&quot;</span>
<span class='Function'>LHS_ATOM</span> <span class='Function'>=</span> <span class='Function'>LHS_ANY</span> <span class='Function'>|</span> <span class='String'>&quot;(&quot;</span> <span class='Value'>lhsStr</span> <span class='String'>&quot;)&quot;</span>
<span class='Function'>LHS_ELT</span> <span class='Function'>=</span> <span class='Function'>LHS_ANY</span> <span class='Function'>|</span> <span class='Value'>lhsStr</span>
<span class='Function'>LHS_ENTRY=</span> <span class='Function'>LHS_ELT</span> <span class='Function'>|</span> <span class='Value'>lhs</span> <span class='String'>&quot;โ‡&quot;</span> <span class='Function'>NAME</span>
<span class='Value'>lhsStr</span> <span class='Function'>=</span> <span class='Function'>LHS_ATOM</span> <span class='Paren'>(</span> <span class='String'>&quot;โ€ฟ&quot;</span> <span class='Function'>LHS_ATOM</span> <span class='Paren'>)</span><span class='Function'>+</span>
<span class='Value'>lhsList</span> <span class='Function'>=</span> <span class='String'>&quot;โŸจ&quot;</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>(</span> <span class='Paren'>(</span> <span class='Function'>LHS_ENTRY</span> <span class='Separator'>โ‹„</span> <span class='Paren'>)</span><span class='Value'>*</span> <span class='Function'>LHS_ENTRY</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>)</span><span class='Head'>?</span> <span class='String'>&quot;โŸฉ&quot;</span>
+<span class='Value'>lhsArray</span> <span class='Function'>=</span> <span class='String'>&quot;[&quot;</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='Paren'>(</span> <span class='Function'>LHS_ELT</span> <span class='Separator'>โ‹„</span> <span class='Paren'>)</span><span class='Value'>*</span> <span class='Function'>LHS_ELT</span> <span class='Separator'>โ‹„</span><span class='Head'>?</span> <span class='String'>&quot;]&quot;</span>
<span class='Value'>lhsComp</span> <span class='Function'>=</span> <span class='Function'>LHS_SUB</span> <span class='Function'>|</span> <span class='Value'>lhsStr</span> <span class='Function'>|</span> <span class='String'>&quot;(&quot;</span> <span class='Value'>lhs</span> <span class='String'>&quot;)&quot;</span>
<span class='Value'>lhs</span> <span class='Function'>=</span> <span class='Value'>s</span> <span class='Function'>|</span> <span class='Value'>lhsComp</span>
</pre>
diff --git a/docs/spec/index.html b/docs/spec/index.html
index 5aa2bc7d..fe5e4471 100644
--- a/docs/spec/index.html
+++ b/docs/spec/index.html
@@ -5,7 +5,7 @@
</head>
<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a></div>
<h1 id="bqn-specification"><a class="header" href="#bqn-specification">BQN specification</a></h1>
-<p>This document, and the others in this directory (linked in the list below) make up the pre-versioning BQN specification. The specification differs from the <a href="../doc/index.html">documentation</a> in that its purpose is only to describe the exact details of BQN's operation in the most quickly accessible way, rather than to explain the central ideas of BQN functionality and how it might be used. The core of BQN, which excludes system-provided values, is now almost completely specified. Planned changes to the specification are tracked on <a href="https://topanswers.xyz/apl?q=1888">this page</a>.</p>
+<p>This document, and the others in this directory (linked in the list below) make up the pre-versioning BQN specification. The specification differs from the <a href="../doc/index.html">documentation</a> in that its purpose is only to describe the exact details of BQN's operation in the most quickly accessible way, rather than to explain the central ideas of BQN functionality and how it might be used. The core language specification, which excludes the system-provided values section (to be versioned separately), is now considered a version 1.0 draft: all functionality to be included in version 1.0 is described, but it must be reviewed to confirm that it's described as intended.</p>
<p>Under this specification, a language implementation is a <strong>BQN pre-version implementation</strong> if it behaves as specified for all input programs. It is a <strong>BQN pre-version implementation with extensions</strong> if it behaves as specified in all cases where the specification does not require an error, but behaves differently in at least one case where it requires an error. It is a <strong>partial</strong> version of either of these if it doesn't conform to the description but differs from a conforming implementation only by rejecting with an error some programs that the conforming implementation accepts. As the specification is not yet versioned, other instances of the specification define these terms in different ways. An implementation can use one of these terms if it conforms to any instance of the pre-versioning BQN specifications that defines them. When versioning is begun, there will be only one specification for each version.</p>
<p>The following documents are included in the BQN specification. A BQN program is a sequence of <a href="https://en.wikipedia.org/wiki/Unicode">Unicode</a> code points: to evaluate it, it is converted into a sequence of tokens using the token formation rules, then these tokens are arranged in a syntax tree according to the grammar, and then this tree is evaluated according to the evaluation semantics. The program may be evaluated in the presence of additional context such as a filesystem or command-line arguments; this context is presented to the program and manipulated through the system-provided values.</p>
<ul>
diff --git a/docs/spec/scope.html b/docs/spec/scope.html
index ef92f370..3cc01659 100644
--- a/docs/spec/scope.html
+++ b/docs/spec/scope.html
@@ -17,7 +17,7 @@
<li>The two identifiers are the same instance (a defined variable is its own definition).</li>
</ul>
<p>The definition for an identifier is chosen from the potential definitions based on their containing scopes: it is the one whose containing scope does not contain or match the containing scope of any other potential definition. If for any identifier there is no definition, then the program is not valid and results in an error. This can occur if the identifier has no potential definition, and also if two potential definitions appear in the same scope. In fact, under this scheme it is never valid to make two definitions with the same name at the top level of a single scope, because both definitions would be potential definitions for the one that comes second in program order. Both definitions have the same containing scope, and any potential definition must contain or match this scope, so no potential definition can be selected.</p>
-<p>The definition of <em>program order</em> for identifier tokens follows the order of BQN <a href="evaluate.html">execution</a>. It corresponds to the order of a particular traversal of the abstract syntax tree for a program. To find the relative ordering of two identifiers in a program, we consider the highest-depth node that they both belong to; in this node they must occur in different components, or that component would be a higher-depth node containing both of them. In most nodes, the program order goes from right to left: components further to the right come earlier in program order. The exceptions are <code><span class='Function'>PROGRAM</span></code>, <code><span class='Function'>BODY</span></code>, <code><span class='Value'>list</span></code>, <code><span class='Value'>subject</span></code> (for stranding), <code><span class='Value'>lhsList</span></code>, <code><span class='Value'>lhsStr</span></code>, and body structure (<code><span class='Function'>I_CASE</span></code>, <code><span class='Function'>A_CASE</span></code>, <code><span class='Function'>IMM_BLK</span></code>, <code><span class='Function'>ARG_BLK</span></code>, and <code><span class='Value'>blSub</span></code>) nodes, in which program order goes in the opposite order, from left to right.</p>
+<p>The definition of <em>program order</em> for identifier tokens follows the order of BQN <a href="evaluate.html">execution</a>. It corresponds to the order of a particular traversal of the abstract syntax tree for a program. To find the relative ordering of two identifiers in a program, we consider the highest-depth node that they both belong to; in this node they must occur in different components, or that component would be a higher-depth node containing both of them. In most nodes, the program order goes from right to left: components further to the right come earlier in program order. The exceptions are <code><span class='Function'>PROGRAM</span></code>, <code><span class='Function'>BODY</span></code>, <code><span class='Value'>array</span></code>, <code><span class='Value'>subject</span></code> (for stranding), <code><span class='Value'>lhsList</span></code>, <code><span class='Value'>lhsArray</span></code>, <code><span class='Value'>lhsStr</span></code>, and body structure (<code><span class='Function'>I_CASE</span></code>, <code><span class='Function'>A_CASE</span></code>, <code><span class='Function'>IMM_BLK</span></code>, <code><span class='Function'>ARG_BLK</span></code>, and <code><span class='Value'>blSub</span></code>) nodes, in which program order goes in the opposite order, from left to right.</p>
<p>A subject label is the <code><span class='Value'>s</span></code> term in a <code><span class='Value'>blSub</span></code> node. As part of a header, it can serve as the definition for an identifier. However, it's defined to be a syntax error if another instance of this identifier appears.</p>
<h3 id="special-names"><a class="header" href="#special-names">Special names</a></h3>
<p>Special names such as <code><span class='Value'>๐•ฉ</span></code> or <code><span class='Value'>๐•ฃ</span></code> refer to variables, but have no definition and do not use scoping. Instead, they always refer to the immediately enclosing scope, and are defined automatically when the block is evaluated.</p>
diff --git a/docs/spec/token.html b/docs/spec/token.html
index b935b9b9..c54fb384 100644
--- a/docs/spec/token.html
+++ b/docs/spec/token.html
@@ -43,7 +43,7 @@
</tr>
<tr>
<td>Punctuation</td>
-<td><code><span class='Gets'>โ†โ‡โ†ฉ</span><span class='Paren'>()</span><span class='Brace'>{}</span><span class='Bracket'>โŸจโŸฉ</span><span class='Ligature'>โ€ฟ</span><span class='Separator'>โ‹„,</span><span class='Value'>.</span></code> and newline</td>
+<td><code><span class='Gets'>โ†โ‡โ†ฉ</span><span class='Paren'>()</span><span class='Brace'>{}</span><span class='Bracket'>โŸจโŸฉ[]</span><span class='Ligature'>โ€ฟ</span><span class='Separator'>โ‹„,</span><span class='Value'>.</span></code> and newline</td>
</tr>
</tbody>
</table>