Terminal Class
Represents a terminal symbol within a grammar.
public class Terminal : Symbol, IGrammarNode, IKeyedObject
- 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
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
- 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(Int32, Nullable<Int32>)
- Symbol.ToString()
- Symbol.ToTerm()
- Symbol.ZeroOrMore()
- Symbol.CanMatchCallback
- Symbol.IsCompiled
- Symbol.ErrorAlias
- Symbol.Key
- Symbol.SetLabel[String]
- Object.Equals(Object)
- Object.Equals(Object, Object)
- Object.ReferenceEquals(Object, Object)
- Object.GetHashCode()
- Object.GetType()
- Object.MemberwiseClone()