|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.percederberg.grammatica.parser.ProductionPatternElement
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.
Constructor Summary | |
ProductionPatternElement(boolean isToken,
int id,
int min,
int max)
Creates a new element. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Checks if this object is equal to another. |
int |
getId()
Returns the node identity. |
int |
getMaxCount()
Returns the maximum occurence count. |
int |
getMinCount()
Returns the minimum occurence count. |
boolean |
isMatch(Token token)
Checks if a specific token matches this element. |
boolean |
isProduction()
Returns true if this element represents a production. |
boolean |
isToken()
Returns true if this element represents a token. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ProductionPatternElement(boolean isToken, int id, int min, int max)
isToken
- the token flagid
- the node identitymin
- the minimum number of occuranciesmax
- the maximum number of occurancies, or
negative for infiniteMethod Detail |
public boolean isToken()
public boolean isProduction()
public boolean isMatch(Token token)
token
- the token to check
public int getId()
public int getMinCount()
public int getMaxCount()
public boolean equals(java.lang.Object obj)
obj
- the object to compare with
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |