In This Article

Terminal Class

Represents a terminal symbol within a grammar.

public class Terminal : Symbol, IGrammarNode, IKeyedObject
Inheritance:
Object Symbol Object
Implements:
IKeyedObject

Constructors

Terminal(Int32)

Initializes a new instance of the Terminal class.

public Terminal(int id)
Parameter Type Description
id Int32

The ID that identifies the terminal.

Terminal(Nullable<Int32>, ITokenIdProvider)

Initializes a new instance of the Terminal class.

public Terminal(int? id, ITokenIdProvider tokenIdProvider)
Parameter Type Description
id Nullable<Int32>

The ID that identifies the terminal.

tokenIdProvider ITokenIdProvider

An ITokenIdProvider that can provide a key for the specified token ID.

Terminal(Nullable<Int32>, String)

Initializes a new instance of the Terminal class.

public Terminal(int? id, string key)
Parameter Type Description
id Nullable<Int32>

The ID that identifies the terminal.

key String

A string that identifies the symbol.

Properties

Id

Gets or sets the ID that identifies the terminal.

public int? Id { get; set; }

Property Value

Nullable<Int32>:

The ID that identifies the terminal.

Remarks

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

Methods

ToTerm(String)

Wraps this symbol with a labeled EbnfSymbol.

public override EbnfSymbol ToTerm(string label)
Parameter Type Description
label String

The string label to use.

Returns

EbnfSymbol:

The EbnfSymbol that was created.

Inherited Members