-
A CoDL document is a text document encoded in UTF-8.
-
A line is a sequence of zero or more characters beginning at the start of the document or the character immediately after a newline (
\u000a
) and ending at the end of the document or the character immediately before a newline character. -
A data line is any line which contains any characters other than space (
\u0020
), unless it is a comment line (see below). -
The prefix of a data line is the space characters before the first non-space character.
-
The initial line is the first data line.
-
The initial prefix is the prefix of the initial line.
-
Every data line must have a prefix length greater than or equal to the initial prefix length.
-
The result of subtracting the initial prefix length from the prefix of every line must be an integer multiple of two.
-
The indentation of a data line is one half of the result of subtracting the initial prefix from the prefix.
-
The indentation of a data line may be at most two greater than the indentation of the previous line.
-
The data is the the series of characters of a data line after the prefix.
-
The words of a data line are one or more sequences of non-space characters separated by one or more space characters.
-
The keyword is the first word of a data line.
-
The parameters are the zero or more words following the keyword which are not comments (see below).
-
The keyword and parameters declare a node.
-
The initial line declares the root node.
-
With the exception of the root node, each node has a parent and is correspondingly a child of that node.
-
The parent, p, of a node other than the root node, n, is declared on the last line preceding n whose indentation is exactly one less than n's indentation.
-
If the first character after the prefix is a hash (
#
,\u0023
), that line is a comment line and contains no data. -
If a word is equal to a single hash character, that word and every subsequent word on the same line are a remark and are not parameters.
-
A trailing
FIXME: Adjacent comments intented differently