aboutsummaryrefslogtreecommitdiff
path: root/docs/spec
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-08-11 14:06:02 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-08-11 14:06:02 -0400
commit65eef4fade5eb426dae01d480f383b8a30b23071 (patch)
treed5d98e372f68c928b7aaa2741f26cf89d5745ffc /docs/spec
parente64ea0c5da34a59393e3b539cc1811ac63dfe3f4 (diff)
Change "BQN / main" in header to "(github) / BQN"
Diffstat (limited to 'docs/spec')
-rw-r--r--docs/spec/evaluate.html2
-rw-r--r--docs/spec/grammar.html2
-rw-r--r--docs/spec/index.html2
-rw-r--r--docs/spec/inferred.html2
-rw-r--r--docs/spec/literal.html2
-rw-r--r--docs/spec/primitive.html2
-rw-r--r--docs/spec/scope.html2
-rw-r--r--docs/spec/system.html2
-rw-r--r--docs/spec/token.html2
-rw-r--r--docs/spec/types.html2
10 files changed, 10 insertions, 10 deletions
diff --git a/docs/spec/evaluate.html b/docs/spec/evaluate.html
index 93558c07..044f534c 100644
--- a/docs/spec/evaluate.html
+++ b/docs/spec/evaluate.html
@@ -3,7 +3,7 @@
<link href="../style.css" rel="stylesheet"/>
<title>Specification: BQN evaluation</title>
</head>
-<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a> / <a href="index.html">spec</a></div>
+<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">spec</a></div>
<h1 id="specification-bqn-evaluation">Specification: BQN evaluation</h1>
<p>This page describes the semantics of the code constructs whose grammar is given in <a href="grammar.html">grammar.md</a>. The formation rules there are not named, and here they are identified by either the name of the term or by copying the rule entirely if there are several alternative productions.</p>
<p>Here we assume that the referent of each identifier, or equivalently the connections between identifiers, have been identified according to the <a href="scope.html">scoping rules</a>.</p>
diff --git a/docs/spec/grammar.html b/docs/spec/grammar.html
index 419eb406..3ad5bd25 100644
--- a/docs/spec/grammar.html
+++ b/docs/spec/grammar.html
@@ -3,7 +3,7 @@
<link href="../style.css" rel="stylesheet"/>
<title>Specification: BQN grammar</title>
</head>
-<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a> / <a href="index.html">spec</a></div>
+<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">spec</a></div>
<h1 id="specification-bqn-grammar">Specification: BQN grammar</h1>
<p>BQN's grammar is given below. Terms are defined in a <a href="https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form">BNF</a> variant. However, handling special names properly is possible but difficult in BNF, so they are explained in text along with the braced block grammar.</p>
<p>The symbols <code><span class='Value'>s</span></code>, <code><span class='Function'>F</span></code>, <code><span class='Modifier'>_m</span></code>, and <code><span class='Modifier2'>_c_</span></code> are identifier tokens with subject, function, 1-modifier, and 2-modifier classes respectively. Similarly, <code><span class='Value'>sl</span></code>, <code><span class='Function'>Fl</span></code>, <code><span class='Modifier'>_ml</span></code>, and <code><span class='Modifier2'>_cl_</span></code> refer to literals and primitives of those classes. While names in the BNF here follow the identifier naming scheme, this is informative only: syntactic roles are no longer used after parsing and cannot be inspected in a running program.</p>
diff --git a/docs/spec/index.html b/docs/spec/index.html
index f0f78231..b8f1d80e 100644
--- a/docs/spec/index.html
+++ b/docs/spec/index.html
@@ -3,7 +3,7 @@
<link href="../style.css" rel="stylesheet"/>
<title>BQN specification</title>
</head>
-<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a></div>
+<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a></div>
<h1 id="bqn-specification">BQN specification</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. One planned feature—an extension to allow low-rank elements in the argument to Join—has not yet been added, and the spec will continue to be edited further to improve clarity and cover any edge cases that have been missed.</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>
diff --git a/docs/spec/inferred.html b/docs/spec/inferred.html
index 433a65c5..c25ad29c 100644
--- a/docs/spec/inferred.html
+++ b/docs/spec/inferred.html
@@ -3,7 +3,7 @@
<link href="../style.css" rel="stylesheet"/>
<title>Specification: BQN inferred properties</title>
</head>
-<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a> / <a href="index.html">spec</a></div>
+<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">spec</a></div>
<h1 id="specification-bqn-inferred-properties">Specification: BQN inferred properties</h1>
<p>BQN includes some simple deductive capabilities: detecting the type of empty array elements, the result of an empty reduction, and the Undo (<code><span class='Modifier'>⁼</span></code>) and Under (<code><span class='Modifier2'>⌾</span></code>) modifiers. These tasks are a kind of proof-based or constraint programming, and can never be solved completely (some instances will be undecidable) but can be solved in more instances by ever-more sophisticated algorithms. To allow implementers to develop more advanced implementations while offering some stability and portability to programmers, two kinds of specification are given here. First, constraints are given on the behavior of inferred properties. These are not exact and require some judgment on the part of the implementer. Second, behavior for common or useful cases is specified more precisely. Non-normative suggestions are also given as a reference for implementers.</p>
<p>For the specified cases, the given functions and modifiers refer to those particular representations. It is not necessary to detect equivalent representations, for example to reduce <code><span class='Paren'>(</span><span class='Function'>+-×</span><span class='Paren'>)</span><span class='Modifier'>⁼</span></code> to <code><span class='Function'>∨</span><span class='Modifier'>⁼</span></code>. However, it is necessary to identify computed functions and modifiers: for example <code><span class='Function'>F</span><span class='Modifier'>⁼</span></code> when the value of <code><span class='Function'>F</span></code> in the expression is <code><span class='Function'>∨</span></code>, or <code><span class='Paren'>(</span><span class='Number'>1</span><span class='Function'>⊑∧</span><span class='Ligature'>‿</span><span class='Function'>∨</span><span class='Paren'>)</span><span class='Modifier'>⁼</span></code>.</p>
diff --git a/docs/spec/literal.html b/docs/spec/literal.html
index 47696b37..3b2b248a 100644
--- a/docs/spec/literal.html
+++ b/docs/spec/literal.html
@@ -3,7 +3,7 @@
<link href="../style.css" rel="stylesheet"/>
<title>Specification: BQN literal notation</title>
</head>
-<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a> / <a href="index.html">spec</a></div>
+<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">spec</a></div>
<h1 id="specification-bqn-literal-notation">Specification: BQN literal notation</h1>
<p>A <em>literal</em> is a single <a href="token.html">token</a> that indicates a fixed character, number, or array. While literals indicate values of a data type, <a href="primitive.html">primitives</a> indicate values of an operation type: function, 1-modifier, or 2-modifier.</p>
<p>Two types of literal deal with text. As the source code is considered to be a sequence of unicode code points (&quot;characters&quot;), and these code points are also used for BQN's character <a href="types.html">data type</a>, the representation of a text literal is very similar to its value. In a text literal, the newline character is always represented using the ASCII line feed character, code point 10. A <em>character literal</em> is enclosed with single quotes <code><span class='String'>'</span></code> and its value is identical to the single character between them. A <em>string literal</em> is enclosed in double quotes <code><span class='String'>&quot;</span></code>, and any double quotes between them must come in pairs, as a lone double quote marks the end of the literal. The value of a string literal is a rank-1 array whose elements are the characters in between the enclosing quotes, after replacing each pair of double quotes with only one such quote. The <em>null literal</em> is the token <code><span class='String'>@</span></code> and represents the null character, code point 0.</p>
diff --git a/docs/spec/primitive.html b/docs/spec/primitive.html
index b2e127c6..c3f4ab2f 100644
--- a/docs/spec/primitive.html
+++ b/docs/spec/primitive.html
@@ -3,7 +3,7 @@
<link href="../style.css" rel="stylesheet"/>
<title>Specification: BQN primitives</title>
</head>
-<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a> / <a href="index.html">spec</a></div>
+<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">spec</a></div>
<h1 id="specification-bqn-primitives">Specification: BQN primitives</h1>
<p>Most primitives are specified by the BQN-based implementation in <a href="https://github.com/mlochbaum/BQN/blob/master/spec/reference.bqn">reference.bqn</a>. This document specifies the basic functionality required by those definitions. Descriptions of other primitives are for informational purposes only.</p>
<h2 id="pervasive-primitives">Pervasive primitives</h2>
diff --git a/docs/spec/scope.html b/docs/spec/scope.html
index 8ab3fd91..be592157 100644
--- a/docs/spec/scope.html
+++ b/docs/spec/scope.html
@@ -3,7 +3,7 @@
<link href="../style.css" rel="stylesheet"/>
<title>Specification: BQN variable scoping</title>
</head>
-<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a> / <a href="index.html">spec</a></div>
+<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">spec</a></div>
<h1 id="specification-bqn-variable-scoping">Specification: BQN variable scoping</h1>
<p>BQN uses lexical scoping for variables, where scopes correspond roughly to blocks, or pairs of curly braces separated by semicolons. At the top level in a scope, new variables are visible only after they are defined, but in the scopes it contains, all variables defined in that scope are visible. This system is specified more precisely below.</p>
<p>A running BQN program manipulates variables during its <a href="evaluate.html">execution</a>, but it is important to distinguish these variables from the identifiers that refer to them. As defined in the <a href="token.html">tokenization rules</a>, an identifier is a particular kind of token found in a program's source code. The lexical scoping rules in this page define which identifiers are considered the same; these identifiers will refer to the same variables when the program is run. While each variable has only one identifier, an identifier can refer to any number of variables because a new variable is created for that identifier each time its containing scope is instantiated (that is, each time the contents of the block are evaluated).</p>
diff --git a/docs/spec/system.html b/docs/spec/system.html
index 6cf5bcc9..53cde76c 100644
--- a/docs/spec/system.html
+++ b/docs/spec/system.html
@@ -3,7 +3,7 @@
<link href="../style.css" rel="stylesheet"/>
<title>Specification: BQN system-provided values</title>
</head>
-<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a> / <a href="index.html">spec</a></div>
+<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">spec</a></div>
<h1 id="specification-bqn-system-provided-values">Specification: BQN system-provided values</h1>
<p>This portion of the spec is still potentially subject to major changes.</p>
<p>The <code><span class='Value'>•</span></code> symbol is used to access values other than primitives provided by BQN.</p>
diff --git a/docs/spec/token.html b/docs/spec/token.html
index 8eb4bcee..e2b851a3 100644
--- a/docs/spec/token.html
+++ b/docs/spec/token.html
@@ -3,7 +3,7 @@
<link href="../style.css" rel="stylesheet"/>
<title>Specification: BQN token formation</title>
</head>
-<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a> / <a href="index.html">spec</a></div>
+<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">spec</a></div>
<h1 id="specification-bqn-token-formation">Specification: BQN token formation</h1>
<p>This page describes BQN's token formation rules (token formation is also called scanning). Most tokens in BQN are a single character long, but quoted characters and strings, identifiers, and numbers can consist of multiple characters, and comments, spaces, and tabs are discarded during token formation.</p>
<p>BQN source code should be considered as a series of unicode code points, which we refer to as &quot;characters&quot;. The separator between lines in a file is considered to be a single character, newline, even though some operating systems such as Windows typically represent it with a two-character CRLF sequence. Implementers should note that not all languages treat unicode code points as atomic, as exposing the UTF-8 or UTF-16 representation instead is common. For a language such as JavaScript that uses UTF-16, the double-struck characters <code><span class='Value'>𝕨</span><span class='Function'>𝕎</span><span class='Value'>𝕩</span><span class='Function'>𝕏</span><span class='Value'>𝕗</span><span class='Function'>𝔽</span><span class='Value'>𝕘</span><span class='Function'>𝔾</span></code> are represented as two 16-bit surrogate characters, but BQN treats them as a single unit.</p>
diff --git a/docs/spec/types.html b/docs/spec/types.html
index 74110a74..ea44bb76 100644
--- a/docs/spec/types.html
+++ b/docs/spec/types.html
@@ -3,7 +3,7 @@
<link href="../style.css" rel="stylesheet"/>
<title>Specification: BQN types</title>
</head>
-<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a> / <a href="index.html">spec</a></div>
+<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">spec</a></div>
<h1 id="specification-bqn-types">Specification: BQN types</h1>
<p>BQN programs manipulate data of seven types:</p>
<ul>