Terminal Class
Represents a terminal symbol within a grammar.
public class Terminal : Symbol, IKeyedObject
- Implements:
- IKeyedObject
Constructors
Terminal(int?)
Initializes an instance of the class.
public Terminal(int? id)
| Parameter | Type | Description |
|---|---|---|
| id | int? | The ID that identifies the terminal. |
Terminal(int?, ITokenIdProvider)
Initializes an instance of the class.
public Terminal(int? id, ITokenIdProvider tokenIdProvider)
| Parameter | Type | Description |
|---|---|---|
| id | int? | The ID that identifies the terminal. |
| tokenIdProvider | ITokenIdProvider | An ITokenIdProvider that can provide a key for the specified token ID. |
Terminal(int?, string?)
Represents a terminal symbol within a grammar.
public Terminal(int? id, string? key)
| Parameter | Type | Description |
|---|---|---|
| id | int? | The ID that identifies the terminal. |
| key | string | A string that identifies the symbol. |
Properties
Id
The ID that identifies the terminal.
public int? Id { get; set; }
Property Value
- int?
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 an EbnfSymbol and optional label.
public override EbnfSymbol ToTerm(string? label)
| Parameter | Type | Description |
|---|---|---|
| label | string | The optional string label to use. |
Returns
- EbnfSymbol:
The EbnfSymbol that was created.
Inherited Members
- Symbol.CanMatch(IParserState)
- Symbol.Optional()
- Symbol.OneOrMore()
- Symbol.OnComplete(ParserCallback)
- Symbol.OnError(ParserErrorCallback)
- Symbol.OnErrorContinue()
- Symbol.OnErrorIgnore()
- Symbol.OnErrorNoReport()
- Symbol.OnInitialize(ParserCallback)
- Symbol.OnSuccess(ParserCallback)
- Symbol.Range(int, int?)
- Symbol.ToString()
- Symbol.ToTerm()
- Symbol.ZeroOrMore()
- Symbol.CanMatchCallback
- Symbol.IsCompiled
- Symbol.ErrorAlias
- Symbol.Key
- Symbol.this[string]
- object.GetType()
- object.MemberwiseClone()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()