Documentation Syntax
General notations used for documentation.
plain text Enter this literally, exactly as shown.
<argName> An argument that should be replaced with an appropriate value.
[entry] This entry is optional.
[<argName=default>] An optional argument with a default value.
(entry|entry) (Required) Pick one of the entries that is shown.
[entry|entry] (Optional) Pick one of the entries that is shown.
entry ... Prior entry repeats.
====DELTA FUNCTION====
The M-tuples for all transition functions. Each one takes up a single line.
Components are seperated by a space
<currentState> <currentSymbol> <newState> <newSymbol> [<dimIndex> (-|=|+)] ...
The sign (-|=|+) following a dimension index indicates a negative move, no move, or a positive move.
Any number of dimension indicies can be specified given that they are all followed by a sign.
If a dimension is not specified, the head will not move across that dimension.
Examples:
state0 A state1 B 0 + 1 = 3 -
Generator Basics
{ (<value>|<slice>) [, ...] }
The syntax of a basic generator. Repeats for every listed value.
<slice>
[] : <stop> [: ]
An element of a list that expands into one or more values.
Expands into all integers from inclusive to <stop> exclusive incrimenting by each time.
Examples:
:5 => 0, 1, 2, 3, 4
:5: => 0, 1, 2, 3, 4
1:5 => 1, 2, 3, 4
:5:2 => 0, 2, 4
5::-1 => 5, 4, 3, 2, 1
:5:-1 =>
Examples:
a {:3} b 0
a 0 b 0
a 1 b 0
a 2 b 0
a {:3,5} b 0
a 0 b 0
a 1 b 0
a 2 b 0
a 5 b 0
Generator Arguments
{ [<argName=items> :] <argValue> [; ...] }
Adds a argument to the generator that influences behavior.
The following are valid arguments:
items | @
Generators can only conatin arguments.
By default, the "items" argName is applied to any argument without one.
This is how basic generators are parsed and able to function.
Examples:
{items: 0,:3} => {items: 0,0,1,2}
{@: 0,:3} => {items: 0,0,1,2}
{0,:3} => {items: 0,0,1,2}
track | &
Designate the track of the generator.
Generators with the same track are run in parallel.
Generators with different track are run for each value of the others.
The default track of a generator is equal to it's number of items preceded by an underscore.
Examples:
a {track:0; 1,2} b {track:1; 3,4}
a 1 b 3
a 1 b 4
a 2 b 3
a 2 b 4
a {track:0; 1,2} b {track:0; 3,4}
a 1 b 3
a 2 b 4
a {1,2} b {3,4}
a 1 b 3
a 1 b 4
a {1,2} b {track:_2; 3,4}
a 1 b 3
a 1 b 4
symbols | %
Designate the symbols of the generator.
Symbols are sperated by a comma.
The symbol to use is calculated by the generator value mod the number of symbols
Examples:
{symbols: a,b,c; 0,2,1} => {a, c, b}
{symbols: a,b,c; 1,4,-2} => {b, b, b}
store | ?
Save all arguments of the generator.
This includes the default track if it is used.
Examples:
{store:myGen0; 0,1,2}
{store:myGen1; symbols:a,b; track:0; 1,2,4}
recall | $
Load all arguments from a stored generator that have not been specified by this generator.
Examples:
{recall:myGen0} => {track:_3; items:0,1,2} => {0,1,2}
{recall:myGen1} => {symbols:a,b; track:0; items:1,2,4} => {b,a,a}
{recall:myGen0; symbols:x,y} => {symbols:x,y; track:_3; items:0,1,2} => {x,y,x}
{recall:myGen1; items:2,1,0} => {symbols:a,b; track:0; items:2,1,0} => {c,b,a}