|
Grammatica 1.5 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. |
| Field Summary | |
string |
DebugInfo
The token debug info message property. |
bool |
Error
The error flag property. |
string |
ErrorMessage
The token error message property. |
int |
Id
The token pattern identity property (read-only). |
bool |
Ignore
The ignore flag property. |
string |
IgnoreMessage
The token ignore message property. |
string |
Name
The token pattern name property (read-only). |
string |
Pattern
The token pattern property (read-only). |
TokenPattern.PatternType |
Type
The token pattern type property (read-only). |
| Constructor Summary | |
TokenPattern( int id, string name, TokenPattern.PatternType type, string pattern )
Creates a new token pattern. |
|
| Method Summary | |
string |
GetErrorMessage()
Deprecated. Use the ErrorMessage property instead. |
int |
GetId()
Deprecated. Use the Id property instead. |
string |
GetIgnoreMessage()
Deprecated. Use the IgnoreMessage property instead. |
string |
GetName()
Deprecated. Use the Name property instead. |
string |
GetPattern()
Deprecated. Use the Pattern property instead. |
TokenPattern.PatternType |
GetPatternType()
Deprecated. Use the Type property instead. |
bool |
IsError()
Deprecated. Use the Error property instead. |
bool |
IsIgnore()
Deprecated. Use the Ignore property instead. |
void |
SetError()
Deprecated. Use the Error property instead. |
void |
SetError( string message )
Deprecated. Use the ErrorMessage property instead. |
void |
SetIgnore()
Deprecated. Use the Ignore property instead. |
void |
SetIgnore( string message )
Deprecated. Use the IgnoreMessage property instead. |
string |
ToShortString()
Returns a short string representation of this object. |
override string |
ToString()
Returns a string representation of this object. |
| Field Detail |
public string DebugInfo;
public bool Error;
public string ErrorMessage;
Errorpublic int Id;
public bool Ignore;
public string IgnoreMessage;
Ignorepublic string Name;
public string Pattern;
public TokenPattern.PatternType Type;
| 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 pattern| Method Detail |
public string GetErrorMessage();
Returns the token error message if the pattern corresponds to an error token.
ErrorMessagepublic int GetId();
Returns the unique token pattern identity value.
Idpublic string GetIgnoreMessage();
Returns the token ignore message if the pattern corresponds to an ignored token.
IgnoreMessagepublic string GetName();
Returns the token pattern name.
Namepublic string GetPattern();
Returns te token pattern.
Patternpublic TokenPattern.PatternType GetPatternType();
Returns the token pattern type.
Typepublic bool IsError();
Checks if the pattern corresponds to an error token. If this is true, it means that an error should be reported if a matching token is found.
Errorpublic bool IsIgnore();
Checks if the pattern corresponds to an ignored token. If this is true, it means that the token should be ignored if found.
Ignorepublic void SetError();
Sets the token error flag and assigns a default error message.
Errorpublic void SetError( string message );
Sets the token error flag and assigns the specified error message.
message - the error message to displayErrorMessagepublic void SetIgnore();
Sets the token ignore flag and clears the ignore message.
Ignorepublic void SetIgnore( string message );
Sets the token ignore flag and assigns the specified ignore message.
message - the ignore message to displayIgnoreMessagepublic string ToShortString();
public override string ToString();
|
Grammatica 1.5 Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||