RailroadDiagram Class
A railroad diagram, also called a syntax diagram: the rules of a grammar, each drawn as a track that goes through terminals and nonterminals, with branches for the choices and loops for the repetitions (Mermaid railroad-beta, railroad-ebnf-beta, railroad-abnf-beta and railroad-peg-beta).
public sealed class RailroadDiagram : Diagram- Inheritance
DiagramRailroadDiagram
Constructors
| Name | Description |
|---|---|
| RailroadDiagram() |
RailroadDiagram()
RailroadDiagram.cspublic RailroadDiagram()No documentation is available.
Properties
| Name | Description |
|---|---|
| Notation | Gets or sets the notation the diagram is written in as Mermaid. It does not change the drawing. |
| Rules | Gets the rules, drawn one below the other. |
Notation
RailroadDiagram.csGets or sets the notation the diagram is written in as Mermaid. It does not change the drawing.
public RailroadNotation Notation { get; set; }Property value
Rules
RailroadDiagram.csMethods
| Name | Description |
|---|---|
| AddRule(string, RailroadExpression) | Adds a rule. |
AddRule(string, RailroadExpression)
RailroadDiagram.csAdds a rule.
public RailroadRule AddRule(string name, RailroadExpression definition)Parameters
namestring- The name of the rule.
definitionRailroadExpression- The expression the rule stands for.
Returns
RailroadRule The rule.