Command diagrams show all possible combinations of a command.

Each shape represents a different type of keyword.

Actions

Most commands will start with an action, represented by a rectangle.

Other keyword will branch off from this action.

Prepositions

A preposition will indicate how or where the action is being applied to. Prepositions are represented by a parallelogram.

The preposition you can use will be stated inside the shape itself. In this case, you can only use the keyword at.

Other prepositions include:

beforeafterwithfromto

The as keyword also uses this same shape.

Positions

A position is the index of a single point in the input between characters where text can be inserted, or a span can start or end. Positions are represented by an oval.

If a position has an asterisk (*), it means that multiple positions are supported there.

The following are valid examples for a pos:

startend

pos 0[0]

The following are valid examples for a *pos:

startend

pos 0[0]pos 0, 2, 4[0, 2, 4]

Characters

A character is the index of a character in the input. Characters are represented by a diamond.

If a character has an asterisk (*), it means that multiple characters are supported there.

The following are valid examples for a char:

char 1(1)

The following are valid examples for a *char:

char 1(1)char 1, 3, 5(1, 3, 5)

Instances

An instance represents the nth match of a text or regular expression in the input. Instances are represented by a hexagon.

If an instance has an asterisk (*), it means that multiple instances are supported there. In the case of an *inst where no instance is stated, the compiler will use the default value of every.

The following are valid examples for an inst:

firstlast

inst 1{1}

The following are valid examples for an *inst:

 everyfirstlast

inst 1{1}inst 1, 3, 5{1, 3, 5}

Everything

The everything keyword represents all characters in the input. If the everything keyword can be used on its own and not in a span, it will be represented by a trapezoid.

The following two keywords are valid for an everything:

*everything

Spans

A span is all the text between two positions, two character indexes, or a combination thereof. Spans are represented by a diamond in an oval.

The following are valid examples for a span:

everything from pos 0 to pos 2everything from [0] to [2]* from [0] to [2][0-2]

everything from char 1 to char 3everything from (1) to (3)* from (1) to (3)(1-3)

everything from pos 0 to char 3everything from [0] to (3)* from [0] to (3)[0-3)

everything from char 1 to pos 2everything from (1) to [2]* from (1) to [2](1-2]

Text

A text is any text input used in a command. Text input is represented by a rounded rectangle.

This can either be in the form of a quote like below, or a text variable.

"foo"

If the shape contains the word mod, this means that you can use one or both of the text modifiers below.

regexxcase