@@ -61,30 +61,34 @@ rather than the last-modified date, with `(published)date`.)
6161Following the name are zero or more [ Arguments] ( #argument ) or
6262[ Properties] ( #property ) , separated by either [ whitespace] ( #whitespace ) or [ a
6363slash-escaped line continuation] ( #line-continuation ) . Arguments and Properties
64- may be interspersed in any order, much like is common with positional
65- arguments vs options in command line tools.
64+ may be interspersed in any order, much like is common with positional arguments
65+ vs options in command line tools. Collectively, Arguments and Properties may be
66+ referred to as "Entries".
6667
6768[ Children] ( #children-block ) can be placed after the name and the optional
68- Arguments and Properties , possibly separated by either whitespace or a
69+ Entries , possibly separated by either whitespace or a
6970slash-escaped line continuation.
7071
71- Arguments are ordered relative to each other (but not relative to Properties)
72- and that order must be preserved in order to maintain the semantics.
72+ Arguments are ordered relative to each other and that order must be preserved in
73+ order to maintain the semantics. Properties between Arguments do not affect
74+ Argument ordering.
7375
74- By contrast, Property order _ SHOULD NOT_ matter to implementations.
75- [ Children] ( #children-block ) should be used if an order-sensitive key/value
76- data structure must be represented in KDL.
76+ By contrast, Properties _ SHOULD NOT_ be assumed to be presented in a given
77+ order. [ Children] ( #children-block ) should be used if an order-sensitive
78+ key/value data structure must be represented in KDL. Cf. JSON objects
79+ preserving key order.
7780
7881Nodes _ MAY_ be prefixed with [ Slashdash] ( #slashdash-comments ) to "comment out"
7982the entire node, including its properties, arguments, and children, and make
8083it act as plain whitespace, even if it spreads across multiple lines.
8184
82- Finally, a node is terminated by either a [ Newline] ( #newline ) , a semicolon ( ` ; ` )
83- or the end of the file/stream (an ` EOF ` ).
85+ Finally, a node is terminated by either a [ Newline] ( #newline ) , a semicolon
86+ ( ` ; ` ), the end of a child block ( ` } ` ) or the end of the file/stream (an ` EOF ` ).
8487
8588#### Example
8689
8790``` kdl
91+ // `foo` will have an Argument value list like `[1, 3]`.
8892foo 1 key=val 3 {
8993 bar
9094 (role)baz 1 2
@@ -178,7 +182,7 @@ Values _MUST_ be either [Arguments](#argument) or values of
178182[ Properties] ( #property ) . Only [ String] ( #string ) values may be used as
179183[ Node] ( #node ) names or [ Property] ( #property ) keys.
180184
181- Values (both as arguments and as properties) _ MAY_ be prefixed by a single
185+ Values (both as arguments and in properties) _ MAY_ be prefixed by a single
182186[ Type Annotation] ( #type-annotation ) .
183187
184188### Type Annotation
@@ -719,7 +723,7 @@ annotations, if present:
719723 slashdashed or not, may follow a slashdashed children block.
720724
721725A slashdash may be be followed by any amount of whitespace, including newlines and
722- comments, before the element that it comments out.
726+ comments (other than other slashdashes) , before the element that it comments out.
723727
724728### Newline
725729
@@ -728,20 +732,21 @@ lines](https://www.unicode.org/versions/Unicode13.0.0/ch05.pdf):
728732
729733| Acronym | Name | Code Pt |
730734| ---------| -----------------| ---------|
735+ | CRLF | Carriage Return and Line Feed | ` U+000D ` + ` U+000A ` |
731736| CR | Carriage Return | ` U+000D ` |
732737| LF | Line Feed | ` U+000A ` |
733- | CRLF | Carriage Return and Line Feed | ` U+000D ` + ` U+000A ` |
734738| NEL | Next Line | ` U+0085 ` |
735739| FF | Form Feed | ` U+000C ` |
736740| LS | Line Separator | ` U+2028 ` |
737741| PS | Paragraph Separator | ` U+2029 ` |
738742
739- Note that for the purpose of new lines, CRLF is considered _ a single newline_ .
743+ Note that for the purpose of new lines, the specific sequence ` CRLF ` is
744+ considered _ a single newline_ .
740745
741746### Disallowed Literal Code Points
742747
743748The following code points may not appear literally anywhere in the document.
744- They may be represented in Strings (but not Raw Strings) using ` \u{} ` .
749+ They may be represented in Strings (but not Raw Strings) using [ Unicode Escapes ] ( #escapes ) ( ` \u{...} ` ) .
745750
746751* The codepoints ` U+0000-0008 ` or the codepoints ` U+000E-001F ` (various
747752 control characters).
@@ -870,4 +875,4 @@ Specifically:
870875 For example, ` ^foo ` means "must not match ` foo ` ".
871876* A single definition may be split over multiple lines. Newlines are treated as
872877 spaces.
873- * ` // ` at the beginning of a line is used for comments .
878+ * ` // ` followed by text on its own line is used as comment syntax .
0 commit comments