Inheritance diagram for lfc::RegexpPattern::
Public Methods | |||
RegexpPattern (string pattern) | |||
Constructor.
| |||
~RegexpPattern () throw () | |||
virtual bool | match (string s, RegexpMatch &match) const | ||
virtual bool | match (PutbackTextInput &in, RegexpMatch &match) const | ||
virtual void | setAnchorAtStart (bool anchorStart) | ||
virtual bool | anchorAtStart () const throw () | ||
\brief Indicates whether this pattern is anchored at the start. More... | |||
virtual void | setAnchorAtEnd (bool anchorEnd) | ||
virtual bool | anchorAtEnd () const throw () | ||
\brief Indicates whether this pattern is anchored at the start. More... | |||
Static Public Methods | |||
bool | match (string pattern, string s, RegexpMatch &match) | ||
Protected Methods | |||
RegexpPattern (string pattern, bool topLevel) | |||
virtual void | init (string pattern) | ||
Internal constructor. More... | |||
void | parsePattern (const char *pattern) | ||
\brief Does the actual pattern parsing. More... | |||
bool | isSpecialChar (char c) const throw () | ||
Indicates whether the given character has special meaning in a regular expression. More... | |||
char | getEscapeChar (const char *&src) const throw () | ||
Reads an escape character from the string. More... | |||
void | parseCharacterClassBlock (const char *&src) | ||
void | parseParensBlock (const char *&src) | ||
void | parseOrBlock (const char *&src) | ||
void | parseMultiplicityBlock (const char *&src) | ||
void | parseAnyCharBlock (const char *&src) | ||
void | parseEndAnchorBlock (const char *&src) | ||
void | parseStringBlock (const char *&src) | ||
Protected Attributes | |||
RegexpPatternBlock * | m_headBlock | ||
The start of the compiled subexpressions. More... | |||
RegexpPatternBlock * | m_tailBlock | ||
The end of the compiled subexpressions. More... | |||
RegexpPatternBlock * | m_beforeAnchor | ||
The block that precedes the end anchor, if it exists. More... | |||
bool | m_anchorStart | ||
bool | m_anchorEnd | ||
bool | m_topLevel |
|
Constructor.
|
|
|
|
|
|
Internal constructor.
|
|
A function which tests whether this pattern matches a substring of the given string.
|
|
A function which tests whether this pattern matches the string represented by the given stream data. The stream is moved beyond the matched string.
|
|
Lets the user set programmatically whether this pattern is anchored to the beginning of the string/current stream position or not.
|
|
\brief Indicates whether this pattern is anchored at the start.
|
|
Lets the user set programmatically whether this pattern is anchored to the end of the string/end of line or not.
|
|
\brief Indicates whether this pattern is anchored at the start.
|
|
A static convenience function used to do a test on the fly for a given pattern.
|
|
\brief Does the actual pattern parsing.
|
|
Indicates whether the given character has special meaning in a regular expression.
|
|
Reads an escape character from the string.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The start of the compiled subexpressions.
|
|
The end of the compiled subexpressions.
|
|
The block that precedes the end anchor, if it exists.
|
|
Indicates that this pattern must be hooked to be beginning of the string, i.e., the '^' was specified at the start of the pattern. |
|
Indicates that this pattern must be hooked to be end of the string, i.e., the '$' was specified at the end of the pattern. |
|
Indicates that this pattern is a top-level pattern (that is, one created by the user). This is only used internally, as non-top level patterns are reduced to their blocks and are destroyed in one of the parseXXX methods after construction. |