From 9bccc26a0c3231d7cc9adc37c1a850ef44fd436a Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 24 Sep 2020 11:00:52 -0400 Subject: Add breadcrumbs to generated html --- docs/spec/evaluate.html | 2 +- docs/spec/grammar.html | 2 +- docs/spec/index.html | 2 +- docs/spec/inferred.html | 4 ++-- docs/spec/literal.html | 2 +- docs/spec/scope.html | 2 +- docs/spec/token.html | 2 +- docs/spec/types.html | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) (limited to 'docs/spec') diff --git a/docs/spec/evaluate.html b/docs/spec/evaluate.html index bfe9cbef..ab2b6bf4 100644 --- a/docs/spec/evaluate.html +++ b/docs/spec/evaluate.html @@ -3,7 +3,7 @@ Specification: BQN evaluation - +

Specification: BQN evaluation

This page describes the semantics of the code constructs whose grammar is given in grammar.md. 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.

Here we assume that the referent of each identifier, or equivalently the connections between identifiers, have been identified according to the scoping rules.

diff --git a/docs/spec/grammar.html b/docs/spec/grammar.html index 4928aed8..66734fc4 100644 --- a/docs/spec/grammar.html +++ b/docs/spec/grammar.html @@ -3,7 +3,7 @@ Specification: BQN grammar - +

Specification: BQN grammar

BQN's grammar is given below. Terms are defined in a BNF variant. However, handling special names properly is possible but difficult in BNF, so they are explained in text along with the braced block grammar.

The symbols s, F, _m, and _c_ are identifier tokens with subject, function, 1-modifier, and 2-modifier classes respectively. Similarly, sl, Fl, _ml, and _cl_ refer to literals and primitives of those classes. While names in the BNF here follow the identifier naming scheme, this is informative only: syntactic classes are no longer used after parsing and cannot be inspected in a running program.

diff --git a/docs/spec/index.html b/docs/spec/index.html index 8a7d2a69..3d9ae69a 100644 --- a/docs/spec/index.html +++ b/docs/spec/index.html @@ -3,7 +3,7 @@ BQN specification - +

BQN specification

This directory gives a (currently incomplete) specification for BQN. The specification differs from the documentation 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 core ideas of BQN functionality and how it might be used. Since it is easier to specify than to document, the specification is currently more complete than the documentation; for example, it includes nearly all primitives.

The following aspects define BQN and are or will be specified:

diff --git a/docs/spec/inferred.html b/docs/spec/inferred.html index 7dc99db6..f01450ea 100644 --- a/docs/spec/inferred.html +++ b/docs/spec/inferred.html @@ -3,7 +3,7 @@ Specification: BQN inferred properties - +

Specification: BQN inferred properties

BQN includes some simple deductive capabilities: detecting the type of empty array elements, and the Undo () and Under () 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.

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 (+-×) to . However, it is necessary to identify computed functions and modifiers: for example F when the value of F in the expression is , or (1⊑∧).

@@ -44,7 +44,7 @@ -2 +ט ˜ diff --git a/docs/spec/literal.html b/docs/spec/literal.html index 39ac864a..c9e9d362 100644 --- a/docs/spec/literal.html +++ b/docs/spec/literal.html @@ -3,7 +3,7 @@ Specification: BQN literal notation - +

Specification: BQN literal notation

A literal is a single token that indicates a fixed character, number, or array. While literals indicate values of a data type, primitives indicate values of an operation type: function, 1-modifier, or 2-modifier.

Two types of literal deal with text. As the source code is considered to be a sequence of unicode code points ("characters"), and these code points are also used for BQN's character data type, 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 character literal is enclosed with single quotes ' and its value is identical to the single character between them. A string literal is enclosed in double quotes ", 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 null literal is the token @ and represents the null character, code point 0.

diff --git a/docs/spec/scope.html b/docs/spec/scope.html index 95bb16c1..6e8dd6ac 100644 --- a/docs/spec/scope.html +++ b/docs/spec/scope.html @@ -3,7 +3,7 @@ Specification: BQN variable scoping - +

Specification: BQN variable scoping

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.

A running BQN program manipulates variables during its execution, but it is important to distinguish these variables from the identifiers that refer to them. As defined in the tokenization rules, 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).

diff --git a/docs/spec/token.html b/docs/spec/token.html index 87e738ac..799ae387 100644 --- a/docs/spec/token.html +++ b/docs/spec/token.html @@ -3,7 +3,7 @@ Specification: BQN token formation - +

Specification: BQN token formation

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.

BQN source code should be considered as a series of unicode code points, which we refer to as "characters". 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 𝕨𝕎𝕩𝕏𝕗𝔽𝕘𝔾 are represented as two 16-bit surrogate characters, but BQN treats them as a single unit.

diff --git a/docs/spec/types.html b/docs/spec/types.html index 13345808..8c9c694a 100644 --- a/docs/spec/types.html +++ b/docs/spec/types.html @@ -3,7 +3,7 @@ Specification: BQN types - +

Specification: BQN types

BQN programs manipulate data of six types: