Grammatica
|
A production pattern element. More...
Public Member Functions | |
ProductionPatternElement (bool isToken, int id, int min, int max) | |
Creates a new element. More... | |
int | GetId () |
Returns the node identity. More... | |
int | GetMinCount () |
Returns the minimum occurence count. More... | |
int | GetMaxCount () |
Returns the maximum occurence count. More... | |
bool | IsToken () |
Returns true if this element represents a token. More... | |
bool | IsProduction () |
Returns true if this element represents a production. More... | |
bool | IsMatch (Token token) |
Checks if a specific token matches this element. More... | |
override bool | Equals (object obj) |
Checks if this object is equal to another. More... | |
override int | GetHashCode () |
Returns a hash code for this object. More... | |
override string | ToString () |
Returns a string representation of this object. More... | |
Properties | |
int | Id [get] |
The node identity property (read-only). More... | |
int | MinCount [get] |
The minimum occurence count property (read-only). More... | |
int | MaxCount [get] |
The maximum occurence count property (read-only). More... | |
A production pattern element.
This class represents a reference to either a token or a production. Each element also contains minimum and maximum occurence counters, controlling the number of repetitions allowed. A production pattern element is always contained within a production pattern rule.
|
inline |
Creates a new element.
If the maximum value if zero (0) or negative, it will be set to Int32.MaxValue.
isToken | the token flag |
id | the node identity |
min | the minimum number of occurancies |
max | the maximum number of occurancies, or negative for infinite |
|
inline |
Checks if this object is equal to another.
This method only returns true for another identical production pattern element.
obj | the object to compare with |
|
inline |
Returns a hash code for this object.
|
inline |
Returns the node identity.
|
inline |
Returns the maximum occurence count.
|
inline |
Returns the minimum occurence count.
|
inline |
Checks if a specific token matches this element.
This method will only return true if this element is a token element, and the token has the same id and this element.
token | the token to check |
|
inline |
Returns true if this element represents a production.
|
inline |
Returns true if this element represents a token.
|
inline |
Returns a string representation of this object.
|
get |
The node identity property (read-only).
|
get |
The maximum occurence count property (read-only).
|
get |
The minimum occurence count property (read-only).