4,493
edits
(→Syntax) |
|||
Line 8: | Line 8: | ||
poss⍪← 'lnd' ((0 0)(0 0)(0 0)×size) | poss⍪← 'lnd' ((0 0)(0 0)(0 0)×size) | ||
</source> | </source> | ||
[[File:Array notation syntax.png|thumb|right|[[wikipedia:Railroad diagram|Railroad diagram]] for the array notation syntax.]] | |||
=== Syntax === | |||
The array notation can be described using [[wikipedia:Extended Backus–Naur form|Extended Backus–Naur form]], where an <code>expression</code> is any traditional APL expression: | |||
<pre> | |||
value ::= expression | list | block | space | |||
list ::= '(' ( ( value sep )+ value? | ( sep value )+ sep? ) ')' | |||
block ::= '[' ( ( value sep )+ value? | ( sep value )+ sep? ) ']' | |||
space ::= '(' sep? ( name ':' value ( sep name ':' value )* )? sep? ')' | |||
sep ::= [⋄#x000A#x000D#x0085]+ | |||
</pre> | |||
== History == | == History == | ||
[[File:Nested Arrays System array notation.png|thumb|right|Array notation in [[NARS]].]] | [[File:Nested Arrays System array notation.png|thumb|right|Array notation in [[NARS]].]] |