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
Diagram RailroadDiagram

Constructors

NameDescription
RailroadDiagram()

RailroadDiagram()

RailroadDiagram.cs
public RailroadDiagram()

No documentation is available.

Properties

NameDescription
NotationGets or sets the notation the diagram is written in as Mermaid. It does not change the drawing.
RulesGets the rules, drawn one below the other.

Gets or sets the notation the diagram is written in as Mermaid. It does not change the drawing.

public RailroadNotation Notation { get; set; }

Property value

RailroadNotation

Gets the rules, drawn one below the other.

public IList<RailroadRule> Rules { get; }

Property value

IList<RailroadRule>

Methods

NameDescription
AddRule(string, RailroadExpression)Adds a rule.

AddRule(string, RailroadExpression)

RailroadDiagram.cs

Adds a rule.

public RailroadRule AddRule(string name, RailroadExpression definition)

Parameters

name string
The name of the rule.
definition RailroadExpression
The expression the rule stands for.

Returns

RailroadRule The rule.