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 quote\
backslashn
newliner
carriage returnt
tabf
form feedv
vertical tabb
backspace[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:u
undefinedn
nullf
falset
truee
for an elided cyclec
comment following (can take any form)b
binary following (to indicate arbitrary bytes, distinct from a string)B
base64url-encoded binary followingf64
64-bit float followingf32
32-bit float followingf16
16-bit float followingi64
64-bit signed integer followingi32
32-bit signed integer followingi16
16-bit signed integer followingi8
8-bit signed integer followingu64
64-bit unsigned integer followingu32
32-bit unsigned integer followingu16
16-bit unsigned integer followingu8
8-bit unsigned integer following[0-9]*
CBOR-style tag following
- Unquoted
%i
wherei
is 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.