Represents an EBNF production, which consists of an Ebnf
- Inheritance:
-
object
Ebnf
Term EbnfQuantifiable objectTerm
Constructors
EbnfProduction(EbnfTerm)
Initializes a new instance of the EbnfProduction
class.
EbnfProduction(EbnfTerm, ITreeConstructionNode)
Initializes a new instance of the EbnfProduction
class.
Parameter | Type | Description |
---|---|---|
patternExpression | Ebnf |
The Ebnf |
treeConstructor | ITree |
The ITree |
Properties
PatternExpression
Gets or sets the Ebnf
Property Value
Remarks
Once the grammar has been compiled, the setter of this property will throw an exception if called.
TreeConstructor
Gets or sets the ITree
Property Value
- ITree
Construction :Node The ITree
Construction that specifies how to construct the syntax tree results.Node
Remarks
Once the grammar has been compiled, the setter of this property will throw an exception if called.
Methods
OnComplete(ParserCallback)
Sets the delegate that will be called after the term is parsed, regardless of success or failure.
Parameter | Type | Description |
---|---|---|
callback | Parser |
The delegate that will be called after the term is parsed. |
Returns
- Ebnf
Production : The modified term.
OnError(ParserErrorCallback)
Sets the delegate that will be called when an error occurs while parsing the term.
Parameter | Type | Description |
---|---|---|
callback | Parser |
The delegate that will be called when an error occurs while parsing the term. |
Returns
- Ebnf
Production : The modified term.
OnErrorContinue()
Marks that if an error occurs while parsing the term, the error will be reported but parsing will continue on.
Returns
- Ebnf
Production : The modified term.
OnErrorIgnore()
Marks that if an error occurs while parsing the term, no error will be reported and parsing will continue on.
Returns
- Ebnf
Production : The modified term.
OnErrorNoReport()
Marks that if an error occurs while parsing the term, no error will be reported and parsing will return a match failure.
Returns
- Ebnf
Production : The modified term.
OnInitialize(ParserCallback)
Sets the delegate that will be called before the term is parsed.
Parameter | Type | Description |
---|---|---|
callback | Parser |
The delegate that will be called before the term is parsed. |
Returns
- Ebnf
Production : The modified term.
OnSuccess(ParserCallback)
Sets the delegate that will be called when the term is successfully parsed.
Parameter | Type | Description |
---|---|---|
callback | Parser |
The delegate that will be called when the term is successfully parsed. |
Returns
- Ebnf
Production : The modified term.
ToProduction()
Returns an Ebnf
Returns
- Ebnf
Production : An Ebnf
Production for this term.
ToString()
Returns a String
that represents the current Object
.
Returns
- string:
A
String
that represents the currentObject
.
Operators
operator |(EbnfProduction, EbnfProduction)
Implements an OR operator between Ebnf
Parameter | Type | Description |
---|---|---|
left | Ebnf |
A Ebnf |
right | Ebnf |
A Ebnf |
Returns
- Ebnf
Alternation : The Ebnf
Alternation that was created.
implicit operator EbnfProduction(EbnfAlternation)
Implements an implicit type conversion operator from Ebnf
Parameter | Type | Description |
---|---|---|
term | Ebnf |
A Ebnf |
Returns
- Ebnf
Production : The Ebnf
Production that was created.
implicit operator EbnfProduction(EbnfConcatenation)
Implements an implicit type conversion operator from Ebnf
Parameter | Type | Description |
---|---|---|
term | Ebnf |
A Ebnf |
Returns
- Ebnf
Production : The Ebnf
Production that was created.
implicit operator EbnfProduction(EbnfNonTerminal)
Implements an implicit type conversion operator from Ebnf
Parameter | Type | Description |
---|---|---|
term | Ebnf |
A Ebnf |
Returns
- Ebnf
Production : The Ebnf
Production that was created.
implicit operator EbnfProduction(EbnfQuantifier)
Implements an implicit type conversion operator from Ebnf
Parameter | Type | Description |
---|---|---|
term | Ebnf |
A Ebnf |
Returns
- Ebnf
Production : The Ebnf
Production that was created.
implicit operator EbnfProduction(EbnfTerminal)
Implements an implicit type conversion operator from Ebnf
Parameter | Type | Description |
---|---|---|
term | Ebnf |
A Ebnf |
Returns
- Ebnf
Production : The Ebnf
Production that was created.
Inherited Members
-
Ebnf
Quantifiable Term. Optional() -
Ebnf
Quantifiable Term. One Or More() -
Ebnf
Quantifiable Term. Range(int, int?) -
Ebnf
Quantifiable Term. Set Label(string) -
Ebnf
Quantifiable Term. Zero Or More() -
Ebnf
Term. To Ebnf String() -
Ebnf
Term. Complete Callback -
Ebnf
Term. Error Callback -
Ebnf
Term. Initialize Callback -
Ebnf
Term. Is Compiled -
Ebnf
Term. Label -
Ebnf
Term. Match Condition -
Ebnf
Term. Success Callback -
object.
Get Type() -
object.
Equals(object) -
object.
Equals(object, object) -
object.
Reference Equals(object, object) -
object.
Get Hash Code()