From ade2f9fbb72bc960a053b6aebf6287977b099090 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sun, 15 May 2022 21:58:45 -0400 Subject: Fill in some missing full documentation links from help --- docs/doc/expression.html | 2 ++ docs/help/beginexpression.html | 1 + docs/help/endexpression.html | 1 + docs/help/nothing.html | 1 + docs/help/system.html | 1 + 5 files changed, 6 insertions(+) (limited to 'docs') diff --git a/docs/doc/expression.html b/docs/doc/expression.html index c1b4d539..b2f40951 100644 --- a/docs/doc/expression.html +++ b/docs/doc/expression.html @@ -58,6 +58,8 @@

The four roles (subject, function, two kinds of modifier) describe expressions, not values. When an expression is evaluated, the value's type doesn't have to correspond to its role, and can even change from one evaluation to another. An expression's role is determined entirely by its source code, so it's fixed.

In the table, ? marks an optional left argument. If there isn't a value in that position, or it's Nothing (·), the middle function will be called with only one argument.

If you're comfortable reading BNF and want to understand things in more detail than described below, you might check the grammar specification as well.

+

Parentheses

+

As in most programming languages, parentheses () are for grouping. The code inside a balanced set of parentheses is a single expression, which produces one value to be used by the expression that contains it—for example, in (2×3)+4, 2×3 is a subexpression evaluating to 6, so that larger expression is equivalent to 6+4. The syntactic role of a set of parentheses is also the same as that of the expression inside.

Syntactic role

This issue is approached from a different angle in Context free grammar.

In APL, the way one part of an expression interacts with others is determined by its value. That means that to parse an expression, in general you would have to evaluate that part, get a value, check its type, and then figure out how it fits in with the rest of the expression. This is a lot of work. BQN changes things so that you can determine how to parse an expression just by looking at its source code. But because it still needs to support expressions that can evaluate to more than one possible type, BQN has to introduce a new and independent concept, called syntactic role, in order to support APL-like expressions.

diff --git a/docs/help/beginexpression.html b/docs/help/beginexpression.html index 056524e5..609cad2c 100644 --- a/docs/help/beginexpression.html +++ b/docs/help/beginexpression.html @@ -5,6 +5,7 @@

Left Parenthesis (()

+

→full documentation

( ...: Begin Expression

Starts an expression, and only one expression. Must end with a corresponding ).

( supercedes any precedence order, so that an expression in () is evaluated fully before it can be used in the outer context.

diff --git a/docs/help/endexpression.html b/docs/help/endexpression.html index abb0d8b9..4c8e80b8 100644 --- a/docs/help/endexpression.html +++ b/docs/help/endexpression.html @@ -6,6 +6,7 @@

Right Parenthesis ())

... ): End Expression

+

→full documentation

The closing symbol for (. See Begin Expression for more details.

↗️
    1 + 2 - 3
 0
diff --git a/docs/help/nothing.html b/docs/help/nothing.html
index 199406fd..4eb833ea 100644
--- a/docs/help/nothing.html
+++ b/docs/help/nothing.html
@@ -12,6 +12,7 @@
 "cba"
 

In Trains

+

→full documentation

Nothing can serve as a left argument in a train to string together multiple monadic functions.

↗️
    (-+-) 5
 ¯10
diff --git a/docs/help/system.html b/docs/help/system.html
index e3094079..e273716a 100644
--- a/docs/help/system.html
+++ b/docs/help/system.html
@@ -6,5 +6,6 @@
 
 

Bullet ()

: System

+

→specification

A prefix for system functions. •listSys gives a list of defined system value names.

is ignored when determining the role of the system value.

-- cgit v1.2.3