Input File
The general parsing of the input file is based on a Lark grammar implementation (For more details see Lark Grammar). Any input file must be based on the following definitions of input key and value pairs:
Note
There are two different types of input key and value pairs. The first type is the key and value pairs that are defined in line seperated by a =
e.g:
key = valueThe second type are so called multiline statements where in the first line the key is defined and in the following lines the values assigned to the key. The multiline statements must be closed by an
END
statement. The following example shows a multiline statement:key value1 value2 ENDIt is important to note that multiline statements are always parsed as list/array like values. This means, if the documentation of the key states that the value is not a list or array, an inlined statement must be used.
Note
In general, all keys are case-insensitive as well as the closing statement END
of a multiline statement. The values are case-sensitive. Furthermore, all keys and values are stripped from leading and trailing whitespaces and #
can be used to include comments (including inline comments). Inline statements using key = value
can also be used multiple times in one line separated by a ,
to define multiple key and value pairs in one line e.g.:
key1 = value1, key2 = value2
Note
The values are read as strings and are converted to the correct type based on the documentation of the key (if possible). In general, the user should not worry about the type of the value as the parser will try to convert the value to the correct type. If the conversion fails, an error will be raised. The following examples show the conversion of the values:
True
andFalse
are converted tobool
(case-insensitive)1
is converted toint
following possible conversions tofloat
1.0
is converted tofloat
any-kind-of_string
is converted tostr
[1, 2, 3]
is converted tolist
following possible (all values have to be of the same type)1..4
is converted torange
range(1, 4)1-4
same as1..4
1..3..10
is converted torange
range(1, 10, 3), please note that the step size is always the middle value in contrast to the python syntax1-3-10
same as1..3..10
file_0*.text
is treated as a list of files matching the pattern (For more details see the glob package)