aboutsummaryrefslogtreecommitdiff
path: root/docs/spec/grammar.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-20 14:05:36 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-20 14:05:36 -0400
commite52d50ed594dd5626523ca7931315e47bde8c9d1 (patch)
treed355718d8f81ea0773cd177e5b5eb17e043a5da3 /docs/spec/grammar.html
parent883eda3df8e162e2d8a62b4d1ec03eadcf8b8069 (diff)
Make header id slugs match Github's
Diffstat (limited to 'docs/spec/grammar.html')
-rw-r--r--docs/spec/grammar.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/spec/grammar.html b/docs/spec/grammar.html
index 8a3ead18..f6bf3810 100644
--- a/docs/spec/grammar.html
+++ b/docs/spec/grammar.html
@@ -1,6 +1,6 @@
<head><link href="../style.css" rel="stylesheet"/></head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
-<h1 id="specification--bqn-grammar">Specification: BQN grammar</h1>
+<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 classes are no longer used after parsing and cannot be inspected in a running program.</p>
<p>A program is a list of statements. Almost all statements are expressions. However, explicit definitions and valueless results stemming from <code><span class='Nothing'>·</span></code>, or <code><span class='Value'>𝕨</span></code> in a monadic brace function, can be used as statements but not expressions.</p>