diff --git a/preserves-text.md b/preserves-text.md index 97b145b..b7dfef0 100644 --- a/preserves-text.md +++ b/preserves-text.md @@ -55,7 +55,7 @@ Standalone documents may have trailing whitespace. Any `Value` may be preceded by whitespace. Value = ws (Record / Collection / Atom / Embedded) - Collection = Sequence / Dictionary / Set + Collection = Sequence / Set / Dictionary Atom = Boolean / String / ByteString / QuotedSymbol / SymbolOrNumber @@ -64,18 +64,18 @@ label-`Value` followed by its field-`Value`s. Record = "<" Value *Value ws ">" -`Sequence`s are enclosed in square brackets. `Dictionary` values are -curly-brace-enclosed colon-separated pairs of values. `Set`s are -written as values enclosed by the tokens `#{` and -`}`.[^printing-collections] It is an error for a set to contain +`Sequence`s are enclosed in square brackets. `Set`s are written as +values enclosed by the tokens `#{` and `}`. `Dictionary` values are +curly-brace-enclosed colon-separated pairs of +values.[^printing-collections] It is an error for a set to contain duplicate elements or for a dictionary to contain duplicate keys. When -printing sets and dictionaries, implementations *SHOULD* order -elements resp. keys with respect to the [total order over +printing sets and dictionaries, implementations *SHOULD* order elements +resp. keys with respect to the [total order over `Value`s](preserves.html#total-order).[^rationale-print-ordering] - Sequence = "[" *Value ws "]" - Dictionary = "{" *(Value ws ":" Value) ws "}" - Set = "#{" *Value ws "}" + Sequence = "[" *Value ws "]" + Set = "#{" *Value ws "}" + Dictionary = "{" *(Value ws ":" Value) ws "}" [^printing-collections]: **Implementation note.** When implementing printing of `Value`s using the textual syntax, consider supporting