|
Grammatica 1.3 Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
System.Object
|
+--TokenPattern
in TokenPattern.csA token pattern. This class contains the definition of a token (i.e. it's pattern), and allows testing a string against this pattern. A token pattern is uniquely identified by an integer id, that must be provided upon creation.
Inner Classes, Typedefs, and Enums | |
enum |
TokenPattern.PatternType
The pattern type enumeration. |
Constructor Summary | |
TokenPattern( int id, string name, TokenPattern.PatternType type, string pattern )
Creates a new token pattern. |
Method Summary | |
string |
GetErrorMessage()
Returns the token error message if the pattern corresponds to an error token. |
int |
GetId()
Returns the unique token pattern identity value. |
string |
GetIgnoreMessage()
Returns the token ignore message if the pattern corresponds to an ignored token. |
string |
GetName()
Returns the token pattern name. |
string |
GetPattern()
Returns te token pattern. |
TokenPattern.PatternType |
GetPatternType()
Returns the token pattern type. |
bool |
IsError()
Checks if the pattern corresponds to an error token. |
bool |
IsIgnore()
Checks if the pattern corresponds to an ignored token. |
void |
SetError()
Sets the token error flag and assigns a default error message. |
void |
SetError( string message )
Sets the token error flag and assigns the specified error message. |
void |
SetIgnore()
Sets the token ignore flag and clears the ignore message. |
void |
SetIgnore( string message )
Sets the token ignore flag and assigns the specified ignore message. |
string |
ToShortString()
Returns a short string representation of this object. |
override string |
ToString()
Returns a string representation of this object. |
Constructor Detail |
public TokenPattern( int id, string name, TokenPattern.PatternType type, string pattern );
id
- the token pattern id
name
- the token pattern name
type
- the token pattern type
pattern
- the token patternMethod Detail |
public string GetErrorMessage();
public int GetId();
public string GetIgnoreMessage();
public string GetName();
public string GetPattern();
public TokenPattern.PatternType GetPatternType();
public bool IsError();
public bool IsIgnore();
public void SetError();
public void SetError( string message );
message
- the error message to displaypublic void SetIgnore();
public void SetIgnore( string message );
message
- the ignore message to displaypublic string ToShortString();
public override string ToString();
|
Grammatica 1.3 Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |