Spaces are separators outside of double quotes and escape sequences.
Strings are prefixed by ' or delimited by ".
The rest is symbols. They can be prefixed by \', or delimited by \" and ".
Quoting is preserved by parsers and printers, and meaningful in some circumstances (eg in STOR, [ starts a vector but \'[ does not).
\ can be used to escape:
'single quote"double quotespace\backslashnnewlinercarriage returnttabfform feedvvertical tabbbackspace[0-9A-F][0-9A-F]arbitrary byte in hexu[0-9A-F][0-9A-F][0-9A-F][0-9A-F]unicode code point in hex (represented in UTF-8)
Builds on BEST.
Treats some symbols specially.
- Unquoted
[starts a vector, a matching unquoted]ends it; there is no special separator between elements - Unquoted
(starts an executable vector, a matching unquoted)ends it; there is no special separator between elements - Unquoted
{starts a dict, a matching unquoted}ends it; there is no special separator between key and value or between pairs - Unquoted
#can be followed by:uundefinednnullffalsettrueefor an elided cycleccomment following (can take any form)bbinary following (to indicate arbitrary bytes, distinct from a string)Bbase64url-encoded binary followingf6464-bit float followingf3232-bit float followingf1616-bit float followingi6464-bit signed integer followingi3232-bit signed integer followingi1616-bit signed integer followingi88-bit signed integer followingu6464-bit unsigned integer followingu3232-bit unsigned integer followingu1616-bit unsigned integer followingu88-bit unsigned integer following[0-9]*CBOR-style tag following
- Unquoted
%iwhereiis an integer is#6 %u8 i(a shorthand for STORM primitives)
Numbers can take the forms 0 +3.14 6.626068e-34 +299_792_458 0xdeadbeef +inf, -inf, nan. Whatever Nim parses today (to be better specified later).
Bijection to BEST, a subset of CBOR data streams where every item is a byte string, sometimes but not always tagged.
- Untagged corresponds to a unquoted symbol
- Tag 7 corresponds to single-quoted symbol
- Tag 8 corresponds to double-quoted symbol
- Tag 9 corresponds to a single-quoted string
- Tag 10 corresponds to a double-quoted string
More compact than BEST for large binary-heavy data, primarily intended to avoid writing parsers and printers for yet another language in yet another language.