From 4d61bd6a5546e4ec6687042882afa04ad37bf700 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 4 Sep 2020 18:23:10 -0400 Subject: Recompile spec after adding null literal --- docs/spec/literal.html | 2 +- docs/spec/token.html | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'docs/spec') diff --git a/docs/spec/literal.html b/docs/spec/literal.html index 04491352..1a5fea6a 100644 --- a/docs/spec/literal.html +++ b/docs/spec/literal.html @@ -6,7 +6,7 @@

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.

+

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.

The format of a numeric literal is more complicated. From the tokenization rules, a numeric literal consists of a numeric character (one of ¯∞π.0123456789) followed by any number of numeric or alphabetic characters. Some numeric literals are valid and indicate a number, while others are invalid and cause an error. The grammar for valid numbers is given below in a BNF variant. Only four alphabetic characters are allowed: "i", which separates the real and imaginary components of a complex number, "e", which functions as in scientific notation, and the uppercase versions of these letters.

number    = component ( ( "i" | "I" ) component )?
 component = mantissa ( ( "e" | "E" ) exponent )?
diff --git a/docs/spec/token.html b/docs/spec/token.html
index 010c033e..d6650376 100644
--- a/docs/spec/token.html
+++ b/docs/spec/token.html
@@ -21,6 +21,10 @@
 
 
 
+Null literal
+@
+
+
 Primitive Function
 +-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔
 
-- 
cgit v1.2.3