The toplevel concept of KDL is a Document. A Document is composed of zero or
-more Nodes (Section 3.2), separated by newlines and whitespace, and eventually
+more Nodes (Section 3.2), separated by newlines, semicolons, and whitespace, and eventually
terminated by an EOF.¶
-All KDL documents MUST be encoded in UTF-8 and conform to the specifications in
this document.¶
@@ -1567,7 +1399,8 @@ preserving key order.¶
the entire node, including its properties, arguments, and children, and make
it act as plain whitespace, even if it spreads across multiple lines.¶
Finally, a node is terminated by either a Newline (Section 3.18), a semicolon
-(;), the end of a child block (}) or the end of the file/stream (an EOF).¶
+(;), the end of its parent's child block (}) or the end of the file/stream
+(an EOF).¶
@@ -1683,7 +1516,7 @@ parent {
child2
}
-parent { child1; child2; }
+parent { child1; child2 }
¶
@@ -1873,6 +1706,9 @@ and, if used, SHOULD interpret these types as follows:
base64: A Base64-encoded string, denoting arbitrary binary data.¶
+
+
+ base85: An Ascii85-encoded string, denoting arbitrary binary data.¶
@@ -1915,7 +1751,7 @@ minimum of syntax¶
Multi-Line Strings let you write strings across multiple lines
- and with indentation that's not part of the string value.¶
+and with indentation that's not part of the string value.¶
Raw Strings don't allow any escapes,
@@ -1945,8 +1781,8 @@ characters (Sect
idents that are the language keywords (inf, -inf, nan, true,
@@ -2214,10 +2050,15 @@ intermediate lines. The first and last Newline can be the same character (that
is, empty multi-line strings are legal).¶
In other words, the final line specifies the whitespace prefix that will be
removed from all other lines.¶
-Multi-line Strings that do not immediately start with a Newline and whose final
-""" is not preceeded by optional whitespace and a Newline are illegal. This
+
Whitespace-only lines (that is, lines containing only literal whitespace
+characters, not including whitespace escapes like \t) always represent
+empty lines in the string value, regardless of what whitespace they
+contain (if any). They do not have to start with the same whitespace prefix
+that other lines do; all characters on the line are ignored.¶
+Multi-line Strings that do not immediately start with a Newline and whose final
+""" is not preceded by optional whitespace and a Newline are illegal. This
also means that """ may not be used for a single-line String (e.g.
-"""foo""").¶
+"""foo""").¶
@@ -2537,16 +2378,22 @@ individual implementations to determine how to represent KDL numbers.Note that, similar to JSON and some other languages,
+In all cases where the above says that digits "may be separated by _",
+this means that between any two digits, or after the digits, any number of
+consecutive _ characters can appear. Underscores are not allowed before the digits.
+That is, 1___2 and 12____ are valid (and both equivalent to just 12), but
+_12 is not a valid number (it will instead parse as an identifier string),
+nor is 0x_1a (it will simply be invalid).¶
+Note that, similar to JSON and some other languages,
numbers without an integer digit (such as .1) are illegal.
They must be written with at least one integer digit, like 0.1.
-(These patterns are also disallowed from Identifier Strings (Section 3.10), to avoid confusion.)¶
+(These patterns are also disallowed from Identifier Strings (Section 3.10), to avoid confusion.)¶
-There are three special "keyword" numbers included in KDL to accomodate the
+
There are three special "keyword" numbers included in KDL to accommodate the
widespread use of IEEE 754 floats:¶
-
@@ -2882,7 +2729,7 @@ They may be represented in Strings (but not Raw Strings) using Unicode Escapes (
except for non Unicode Scalar Value, which can't be represented even as escapes).¶