In This Article

EbnfQuantifier Class

Represents a term within an EBNF production whose child term can be sequentially matched a specified minimum and maximum times.

public sealed class EbnfQuantifier : EbnfTerm, IGrammarNode
Inheritance:
Object EbnfTerm Object

Constructors

EbnfQuantifier(EbnfQuantifiableTerm, Int32, Nullable<Int32>)

Initializes a new instance of the EbnfQuantifier class.

public EbnfQuantifier(EbnfQuantifiableTerm child, int minimum, int? maximum)
Parameter Type Description
child EbnfQuantifiableTerm

The EbnfQuantifiableTerm to quantify.

minimum Int32

The minimum number of instances that the term may occur.

maximum Nullable<Int32>

The maximum number of instances that the term may occur.

Properties

Child

Gets or sets the EbnfQuantifiableTerm that is quantified by this term.

public EbnfQuantifiableTerm Child { get; set; }

Property Value

EbnfQuantifiableTerm:

The EbnfQuantifiableTerm that is quantified by this term.

Remarks

Once the grammar has been compiled, the setter of this property will throw an exception if called.

Maximum

Gets or sets the maximum number of instances that the term may occur.

public int? Maximum { get; set; }

Property Value

Nullable<Int32>:

The maximum number of instances that the term may occur.

Remarks

Once the grammar has been compiled, the setter of this property will throw an exception if called.

Minimum

Gets or sets the minimum number of instances that the term may occur.

public int Minimum { get; set; }

Property Value

Int32:

The minimum number of instances that the term may occur.

Remarks

Once the grammar has been compiled, the setter of this property will throw an exception if called.

Methods

SetLabel(String)

Sets the Label for the term.

public override EbnfTerm SetLabel(string newLabel)
Parameter Type Description
newLabel String

The Label for the term.

Returns

EbnfTerm:

The modified term.

ToString()

Returns a String that represents the current Object.

public override string ToString()

Returns

String:

A String that represents the current Object.

Inherited Members