|
Grammatica 1.3 Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
System.Object
|
+--ProductionPatternElement
in ProductionPatternElement.csA 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.
Constructor Summary | |
ProductionPatternElement( bool isToken, int id, int min, int max )
Creates a new element. |
Method Summary | |
override bool |
Equals( object obj )
Checks if this object is equal to another. |
int |
GetId()
Returns the node identity. |
internal LookAheadSet |
GetLookAhead()
Returns the look-ahead set associated with this alternative. |
int |
GetMaxCount()
Returns the maximum occurence count. |
int |
GetMinCount()
Returns the minimum occurence count. |
bool |
IsMatch( Token token )
Checks if a specific token matches this element. |
bool |
IsProduction()
Returns true if this element represents a production. |
bool |
IsToken()
Returns true if this element represents a token. |
internal void |
SetLookAhead( LookAheadSet lookAhead )
Sets the look-ahead set for this alternative. |
override string |
ToString()
Returns a string representation of this object. |
Constructor Detail |
public ProductionPatternElement( bool isToken, int id, int min, int max );
isToken
- the token flag
id
- the node identity
min
- the minimum number of occurancies
max
- the maximum number of occurancies, or
negative for infiniteMethod Detail |
public override bool Equals( object obj );
obj
- the object to compare withpublic int GetId();
internal LookAheadSet GetLookAhead();
public int GetMaxCount();
public int GetMinCount();
public bool IsMatch( Token token );
token
- the token to checkpublic bool IsProduction();
public bool IsToken();
internal void SetLookAhead( LookAheadSet lookAhead );
lookAhead
- the new look-ahead setpublic override string ToString();
|
Grammatica 1.3 Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |