3 ms·
Mermaid as a whole doesn't have a formally specified grammar. Individual diagrams have their grammar in a .jison file. Flowchart: https://github.com/mermaid-js
by sidharthv 4y ago
Mermaid as a whole doesn't have a formally specified grammar.
Individual diagrams have their grammar in a .jison file.
Flowchart: https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/diagrams/flowchart/parser/flow.jison#L1 https://github.com/mermaid-js/mermaid/blob/develop/packages/...
A single grammar to support all the different use cases would be challenging. But we did have some plans to introduce guidelines to make different diagram syntaxes more consistent.
- jclermont 4y agoI've had this need to render just part of a mermaid graph, and I thought of creating a parser to do it. Basically I'd like to render just the part of the graph that flows through a particular node. Before I go off and write my own parser using this grammar, would it be practical to do this in mermaid's parser already?