The flowchart text form (spec/02 §11.3, spec/13 §7.3): a flowchart written as
mermaid writes one, read into a layered diagram's design (Macaw.Frame.TextForms).
flowchart LR
A([Start]) --> B{Ready?}
B -->|yes| C[Ship]
B -.->|no| D[(Backlog)]
subgraph ops [Operations]
C --> E((Done))
end- The header is
flowchartand its direction,TB(orTD),BT,LRorRL,TBby default: thelayeredstep'sdirection. - A statement is a chain of nodes joined by links. A node is an id (letters, digits,
_) and its shape and label:A[rect],A(round),A([stadium]),A((circle)),A{diamond},A{{hexagon}},A[/parallelogram/],A[(cylinder)],A>note]; a label may be quoted (A["a [b]"]) and<br>breaks it. A node named alone is arectlabeled by its id until a statement gives it a shape. - A link is a line,
--(solid),-.-(dotted) or==(thick), with a head and a tail of>/<(arrow),o(circle) orx(cross):-->,---,-.->,==>,<-->,--o,x--x; a label follows it as|text|. - A subgraph
subgraph id [title]…endgroups the nodes first named inside it: a row of thegroupsslot (id,label,parent) and each node'sgroup.
Rows: nodes (id, label, shape, group) in order of first appearance, edges
(source, target, label, head, tail, line) in order. Faults, every one at
once, at its line and column: {:expected, :node}, {:expected, :link},
{:direction, word}, {:unclosed, :label}, {:unclosed, "subgraph"} at the
subgraph, {:unexpected, "end"}. print/1 writes nodes first, each in its subgraph,
then one link a line.