ARK Syntax Guide
ARK uses a free format syntax, in that is there are no indentation or alignment requirements. Spaces (including some control characters, e.g., tab, return, new line.) are useful only for separating keys and values. The ARK format syntax is case-sensitive, so keys and values with different capitalization patterns are treated as distinct.
At the most basic level the syntax is the familiar key-value pair syntax of the form:
key = value
where key must be a non-empty string, and value must be one of the following three objects: atom, list, and map. A value of the atom type is one of the following: integer, floating number, string, boolean (true, false, yes, no, on, off are recognized as boolean values), or none (? is recognized as none). A value of the list of type is of the form: [ value1 value2 ... ], in other words a list of one or more values wrapped within brackets [ ], and the elements value1, value2, ... are values of any type and are separated by spaces. Map type values generally look like:
{ key1 = value1
key2 = value2
...
}
where the value is wrapped with braces { }, and elements in the map are key-value pairs. These are sometimes also referred to as “blocks”.
The form described above is the canonical form of the syntax. Here is an example of this syntax with nested values:
a = {
b = {
c = [1 2 4]
}
d = string_value
}
ARK also supports the so-called “pathname” syntax, where nested keys are separated by a period. The pathname equivalent of the canonical example given above is:
a.b.c = [1 2 4] a.d = string_value
Note:
-
If a keyword is assigned a value twice, by default the second takes precedence. If the value is a block, the blocks are merged (and any conflicting definitions default to those in the second block). Blocks are not merged, however, for the ARK syntax used by MSJs. This allows for multiple stages of the same kind to be defined.
The
=sign can be omitted if the value is a block value. This means thata = { b = 1 }anda { b = 1 }are equivalent. This syntax is used to specify themultisimstages.