preserves/_includes/cheatsheet-pexprs.md

1.2 KiB

The definitions of Atom, ws, and linecomment are as given in the Preserves text syntax.

{:.postcard-grammar.textsyntax} | Document | := | Expr ws | Expr | := | ws (SimpleExpr | Punct) | SimpleExpr | := | Compound | Embedded | Annotated | Atom | Compound | := | Sequence | Record | Block | Group | Set | Punct | := | , | ; | :+

{:.postcard-grammar.textsyntax} | Sequence | := | [ Expr Trailer ws ] | Record | := | < Expr Trailer ws > | Block | := | { Expr Trailer ws } | Group | := | ( Expr Trailer ws ) | Set | := | #{ Expr Trailer ws }

{:.postcard-grammar.textsyntax} | Trailer | := | Annotation

{:.postcard-grammar.textsyntax} | Embedded | := | #! SimpleExpr | Annotated | := | Annotation SimpleExpr | Annotation | := | @ SimpleExpr | # ((space | tab) linecomment) (cr | lf)