preserves/_includes/cheatsheet-pexprs-plaintext.md

22 lines
730 B
Markdown

The definitions of `Atom`, `ws`, and `linecomment` are as given in the Preserves text syntax.
```text
Document := Expr* ws
Expr := ws (SimpleExpr | Punct)
SimpleExpr := Compound | Embedded | Annotated | Atom
Compound := Sequence | Record | Block | Group | Set
Punct := `,` | `;` | `:`+
Sequence := `[` Expr* Trailer ws `]`
Record := `<` Expr* Trailer ws `>`
Block := `{` Expr* Trailer ws `}`
Group := `(` Expr* Trailer ws `)`
Set := `#{` Expr* Trailer ws `}`
Trailer := Annotation*
Embedded := `#!` SimpleExpr
Annotated := Annotation SimpleExpr
Annotation := `@` SimpleExpr | `#` ((space | tab) linecomment) (cr | lf)
```