EbnfQuantifiableTerm Class
Represents the abstract base class for a term within an EBNF production that can be sequentially matched a specified minimum and maximum times.
public abstract class EbnfQuantifiableTerm : EbnfTerm
Constructors
EbnfQuantifiableTerm()
Initializes an instance of the class.
protected EbnfQuantifiableTerm()
Methods
OnComplete(ParserCallback)
Sets the delegate that will be called after the term is parsed, regardless of success or failure.
public EbnfQuantifiableTerm OnComplete(ParserCallback callback)
Parameter | Type | Description |
---|---|---|
callback | ParserCallback | The delegate that will be called after the term is parsed. |
Returns
- EbnfQuantifiableTerm:
The modified term.
OnError(ParserErrorCallback)
Sets the delegate that will be called when an error occurs while parsing the term.
public EbnfQuantifiableTerm OnError(ParserErrorCallback callback)
Parameter | Type | Description |
---|---|---|
callback | ParserErrorCallback | The delegate that will be called when an error occurs while parsing the term. |
Returns
- EbnfQuantifiableTerm:
The modified term.
OnErrorContinue()
Marks that if an error occurs while parsing the term, the error will be reported but parsing will continue on.
OnErrorIgnore()
Marks that if an error occurs while parsing the term, no error will be reported and parsing will continue on.
OnErrorNoReport()
Marks that if an error occurs while parsing the term, no error will be reported and parsing will return a match failure.
OnInitialize(ParserCallback)
Sets the delegate that will be called before the term is parsed.
public EbnfQuantifiableTerm OnInitialize(ParserCallback callback)
Parameter | Type | Description |
---|---|---|
callback | ParserCallback | The delegate that will be called before the term is parsed. |
Returns
- EbnfQuantifiableTerm:
The modified term.
OnSuccess(ParserCallback)
Sets the delegate that will be called when the term is successfully parsed.
public EbnfQuantifiableTerm OnSuccess(ParserCallback callback)
Parameter | Type | Description |
---|---|---|
callback | ParserCallback | The delegate that will be called when the term is successfully parsed. |
Returns
- EbnfQuantifiableTerm:
The modified term.
OneOrMore()
Marks the term such that one to many instances are permitted.
public EbnfQuantifier OneOrMore()
Returns
- EbnfQuantifier:
The EbnfQuantifier term that wraps this term.
Optional()
Marks the term such that zero or one instances are permitted.
public EbnfQuantifier Optional()
Returns
- EbnfQuantifier:
The EbnfQuantifier term that wraps this term.
Range(int, int?)
Marks the term such that a range of instances are permitted.
public EbnfQuantifier Range(int min, int? max)
Parameter | Type | Description |
---|---|---|
min | int | The minimum number of instances. |
max | int? | The maximum number of instances. |
Returns
- EbnfQuantifier:
The EbnfQuantifier term that wraps this term.
SetLabel(string)
Sets the Label for the term.
public EbnfQuantifiableTerm SetLabel(string label)
Parameter | Type | Description |
---|---|---|
label | string | The Label for the term. |
Returns
- EbnfQuantifiableTerm:
The modified term.
ZeroOrMore()
Marks the term such that zero to many instances are permitted.
public EbnfQuantifier ZeroOrMore()
Returns
- EbnfQuantifier:
The EbnfQuantifier term that wraps this term.
Inherited Members
- EbnfTerm.ToEbnfString()
- EbnfTerm.ToProduction()
- EbnfTerm.CompleteCallback
- EbnfTerm.ErrorCallback
- EbnfTerm.InitializeCallback
- EbnfTerm.IsCompiled
- EbnfTerm.Label
- EbnfTerm.MatchCondition
- EbnfTerm.SuccessCallback
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()