NonTerminal Class
Represents a non-terminal symbol within a grammar.
public class NonTerminal : Symbol, IGrammarNode, IKeyedObject
- Inheritance:
- System.Object Symbol Object
- Implements:
- IKeyedObject
Constructors
NonTerminal(String)
Initializes a new instance of the NonTerminal
class.
public NonTerminal(string key)
Parameter | Type | Description |
---|---|---|
key | System.String | A string that identifies the symbol. |
Properties
Production
Gets or sets the EbnfProduction for this non-terminal.
public EbnfProduction Production { get; set; }
Property Value
- EbnfProduction:
The EbnfProduction for this non-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 | System.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]
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()