preserves/_includes/cheatsheet-pexprs-plaintext.md

22 lines
730 B
Markdown
Raw Normal View History

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