RailroadRepetition Class

A repetition of a railroad diagram: a loop back below the expression, and a bypass above it when the expression can be skipped. Bounds other than zero or one to unbounded, as the 2*4 of ABNF, are written below the loop.

public sealed class RailroadRepetition : RailroadExpression
Inheritance
RailroadExpression RailroadRepetition

Constructors

NameDescription
RailroadRepetition(RailroadExpression, int, int?)Initializes a new instance of the RailroadRepetition class.

RailroadRepetition(RailroadExpression, int, int?)

RailroadRepetition.cs

Initializes a new instance of the RailroadRepetition class.

public RailroadRepetition(RailroadExpression expression, int minimum = 0, int? maximum = null)

Parameters

expression RailroadExpression
The repeated expression.
minimum int
The minimum number of times.
maximum int?
The maximum number of times, or null for no limit.

Properties

NameDescription
ExpressionGets or sets the repeated expression.
MaximumGets or sets the maximum number of times, or null for no limit.
MinimumGets or sets the minimum number of times. With 0, the expression can be skipped.

Gets or sets the repeated expression.

public RailroadExpression Expression { get; set; }

Property value

RailroadExpression

Gets or sets the maximum number of times, or null for no limit.

public int? Maximum { get; set; }

Property value

int?

Gets or sets the minimum number of times. With 0, the expression can be skipped.

public int Minimum { get; set; }

Property value

int