|
Grammatica 1.4 Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
System.Object
|
+--TokenMatcher
|
+--RegExpTokenMatcher
in Tokenizer.csA regular expression token pattern matcher. This class is used to match a single regular expression with the tokenizer buffer. This class also maintains the state of the last match.
| Constructor Summary | |
RegExpTokenMatcher( TokenPattern pattern )
Creates a new regular expression token matcher. |
|
| Method Summary | |
override int |
GetMatchedLength()
Returns the length of the latest match. |
override TokenPattern |
GetMatchedPattern()
Returns the latest matched token pattern. |
TokenPattern |
GetPattern()
Returns the token pattern. |
override bool |
HasReadEndOfString()
Checks if the end of string was encountered during the last match. |
bool |
MatchFrom( string str, int pos )
Checks if the token pattern matches the tokenizer buffer from the specified position. |
int |
Start()
Returns the start position of the latest match. |
override string |
ToString()
Returns a string representation of this token matcher. |
| Methods inherited from class TokenMatcher |
GetMatchedPattern, GetMatchedLength, HasReadEndOfString |
| Constructor Detail |
public RegExpTokenMatcher( TokenPattern pattern );
pattern - the pattern to matchRegExpException - if the regular expression couldn't
be created properly| Method Detail |
public override int GetMatchedLength();
public override TokenPattern GetMatchedPattern();
public TokenPattern GetPattern();
public override bool HasReadEndOfString();
public bool MatchFrom( string str, int pos );
str - the string to match
pos - the starting positionpublic int Start();
public override string ToString();
|
Grammatica 1.4 Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||