Tweaks and repairs

This commit is contained in:
Tony Garnock-Jones 2023-10-17 00:49:56 +02:00
parent 3360e013a4
commit 53e15bc46c
1 changed files with 7 additions and 8 deletions

View File

@ -2,7 +2,7 @@
| *Document* | := | *Value* **ws** |
| *Value* | := | **ws** (*Record* | *Collection* | *Atom* | *Embedded* | *Annotated*) |
| *Collection* | := | *Sequence* | *Dictionary* | *Set* |
| *Atom* | := | *Boolean* | *String* | *ByteString* | *QuotedSymbol* | *Symbol* | *Number* |
| *Atom* | := | *Boolean* | *ByteString* | *String* | *QuotedSymbol* | *Symbol* | *Number* |
| **ws** | := | (**space** &#124; **tab** &#124; **cr** &#124; **lf** &#124;`,`)<sup></sup> |
{:.postcard-grammar}
@ -13,9 +13,9 @@
{:.postcard-grammar}
| *Boolean* | := | `#t`&#124;`#f` |
| *String* | := | `"` (*unescaped* &#124;`|`&#124; (*escaped* &#124;`\"`&#124;`\u`*hex* *hex* *hex* *hex*))<sup>⋆</sup> `"` |
| *ByteString* | := | `#"`*binchar*<sup></sup> `"`&#124;`#x"` (**ws** &#124; *hex* *hex*)<sup></sup> **ws**`"`&#124;`#[` (**ws** &#124; *base64char*)<sup></sup> **ws**`]` |
| *QuotedSymbol* | := | `|` (*unescaped* &#124;`"`&#124; (*escaped* &#124;`\|`&#124;`\u`*hex* *hex* *hex* *hex*))<sup>⋆</sup> `|` |
| *ByteString* | := | `#"`*binchar*<sup></sup> `"`&#124;`#x"` (**ws** *hex* *hex*)<sup></sup> **ws**`"`&#124;`#[` (**ws** &#124; *base64char*)<sup></sup> **ws**`]` |
| *String* | := | `"` (« any unicode scalar value except `\` or `"` » &#124; *escaped* &#124;`\"`)<sup>⋆</sup> `"` |
| *QuotedSymbol* | := | `|` (« any unicode scalar value except `\` or `|` » &#124; *escaped* &#124;`\|`)<sup>⋆</sup> `|` |
| *Symbol* | := | (`A`..`Z`&#124;`a`..`z`&#124;`0`..`9`&#124; *sympunct* &#124; *symuchar*)<sup>+</sup> |
| *Number* | := | *Float* &#124; *Double* &#124; *SignedInteger* |
| *Float* | := | *flt* (`f`&#124;`F`) &#124;`#xf"` (**ws** *hex* *hex*)<sup>4</sup> **ws**`"` |
@ -25,13 +25,12 @@
{:.postcard-grammar}
| *Embedded* | := | `#!`*Value* |
| *Annotated* | := | *Annotation* *Value* |
| *Annotation* | := | `@`*Value* &#124;`;`« any unicode scalar value except **cr** or **lf** » (**cr** &#124; **lf**) |
| *Annotation* | := | `@`*Value* &#124;`;`« any unicode scalar value except **cr** or **lf** »<sup></sup> (**cr** &#124; **lf**) |
{:.postcard-grammar}
| *escaped* | := | `\\`&#124;`\/`&#124;`\b`&#124;`\f`&#124;`\n`&#124;`\r`&#124;`\t` |
| *unescaped* | := | « any unicode scalar value except `"`, `\`, or `|` » |
| *escaped* | := | `\\`&#124;`\/`&#124;`\b`&#124;`\f`&#124;`\n`&#124;`\r`&#124;`\t`&#124;`\u`*hex* *hex* *hex* *hex* |
| *binchar* | := | *binunescaped* &#124; (*escaped* &#124;`\"`&#124;`\x`*hex* *hex*) |
| *binunescaped* | := | « any unicode scalar value between 32 and 126, except `"` or `\` » |
| *binunescaped* | := | « any unicode scalar value between 32 and 126, except `\` or `"` » |
| *base64char* | := | `A`..`Z`&#124;`a`..`z`&#124;`0`..`9`&#124;`+`&#124;`/`&#124;`-`&#124;`_`&#124;`=` |
| *sympunct* | := | `~`&#124;`!`&#124;`$`&#124;`%`&#124;`^`&#124;`&`&#124;`*`&#124;`?`&#124;`_`&#124;`=`&#124;`+`&#124;`-`&#124;`/`&#124;`.` |
| *symuchar* | := | « any scalar value greater than 127 whose Unicode category is Lu, Ll, Lt, Lm, Lo, Mn, Mc, Me, Nd, Nl, No, Pc, Pd, Po, Sc, Sm, Sk, So, or Co » |