|
Grammatica 1.5 Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
System.Object
|
+--Matcher
in Matcher.csA regular expression string matcher. This class handles the matching of a specific string with a specific regular expression. It contains state information about the matching process, as for example the position of the latest match, and a number of flags that were set. This class is not thread-safe.
| Constructor Summary | |
internal Matcher( Element e, ReaderBuffer buffer, bool ignoreCase )
Creates a new matcher with the specified element. |
|
| Method Summary | |
int |
End()
Returns the end position of the latest match. |
bool |
HasReadEndOfString()
Checks if the end of the string was encountered during the last match attempt. |
bool |
IsCaseInsensitive()
Checks if this matcher compares in case-insensitive mode. |
int |
Length()
Returns the length of the latest match. |
bool |
MatchFrom( int pos )
Attempts to find a match starting at the specified position in the string. |
bool |
MatchFromBeginning()
Attempts to find a match starting at the beginning of the string. |
void |
Reset()
Resets the information about the last match. |
void |
Reset( string str )
Resets the matcher for use with a new input string. |
void |
Reset( ReaderBuffer buffer )
Resets the matcher for use with a new look-ahead character input stream. |
internal void |
SetReadEndOfString()
Sets the end of string encountered flag. |
int |
Start()
Returns the start position of the latest match. |
override string |
ToString()
Returns the latest matched string. |
| Constructor Detail |
internal Matcher( Element e, ReaderBuffer buffer, bool ignoreCase );
e - the base regular expression element
buffer - the input character buffer to work with
ignoreCase - the character case ignore flag| Method Detail |
public int End();
public bool HasReadEndOfString();
public bool IsCaseInsensitive();
public int Length();
public bool MatchFrom( int pos );
pos - the starting position of the matchIOException - if an I/O error occurred while reading
an input streampublic bool MatchFromBeginning();
IOException - if an I/O error occurred while reading
an input streampublic void Reset();
public void Reset( string str );
str - the new string to work withpublic void Reset( ReaderBuffer buffer );
buffer - the character input bufferinternal void SetReadEndOfString();
public int Start();
public override string ToString();
|
Grammatica 1.5 Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||