2023-11-01 14:15:24 +00:00
|
|
|
The definitions of `Atom`, `ws`, and `linecomment` are as given in the Preserves text syntax.
|
|
|
|
|
|
|
|
{:.postcard-grammar.textsyntax}
|
|
|
|
| *Document* | := | *Expr*<sup>⋆</sup> **ws**
|
|
|
|
| *Expr* | := | **ws** (*SimpleExpr* | *Punct*)
|
2023-11-01 14:30:23 +00:00
|
|
|
| *SimpleExpr* | := | *Compound* | *Embedded* | *Annotated* | *Atom*
|
2023-11-01 14:15:24 +00:00
|
|
|
| *Compound* | := | *Sequence* | *Record* | *Block* | *Group* | *Set*
|
|
|
|
| *Punct* | := | `,` | `;` | `:`<sup>+</sup>
|
|
|
|
|
|
|
|
{:.postcard-grammar.textsyntax}
|
|
|
|
| *Sequence* | := | `[` *Expr*<sup>⋆</sup> *Trailer* **ws** `]`
|
|
|
|
| *Record* | := | `<` *Expr*<sup>⋆</sup> *Trailer* **ws** `>`
|
|
|
|
| *Block* | := | `{` *Expr*<sup>⋆</sup> *Trailer* **ws** `}`
|
|
|
|
| *Group* | := | `(` *Expr*<sup>⋆</sup> *Trailer* **ws** `)`
|
|
|
|
| *Set* | := | `#{` *Expr*<sup>⋆</sup> *Trailer* **ws** `}`
|
|
|
|
|
|
|
|
{:.postcard-grammar.textsyntax}
|
|
|
|
| *Trailer* | := | *Annotation*<sup>⋆</sup>
|
|
|
|
|
|
|
|
{:.postcard-grammar.textsyntax}
|
|
|
|
| *Embedded* | := | `#!` *SimpleExpr*
|
|
|
|
| *Annotated* | := | *Annotation* *SimpleExpr*
|
|
|
|
| *Annotation* | := | `@` *SimpleExpr* | `#` ((**space** | **tab**) *linecomment*) (**cr** | **lf**)
|