#include <archon/util/regex.H>
Collaboration diagram for Archon::Utilities::Regex:
Public Member Functions | |
Regex (ustring s, Logger *l=0) | |
Construct a regular expression from a string representation. | |
Regex (ustring s, const Environment &e, Logger *l=0) | |
Construct a regular expression from a string representation. | |
Regex (string s, Logger *l=0) | |
Construct a regular expression from a UTF8 encoded string representation. | |
Regex (string s, const Environment &e, Logger *l=0) | |
Construct a regular expression from a UTF8 encoded string representation. | |
string | print () const |
Return an UTF8 encoded string representation of this regular expression. | |
Static Public Member Functions | |
static Regex | altern (Regex r1, Regex r2) |
Match either 'r1' or 'r2'. | |
static Regex | juxta (Regex r1, Regex r2) |
Match the juxtaposition of 'r1' and 'r2'. | |
static Regex | repeat (Regex r, int min, int max) |
Match 'n' repetitions of 'r' where 0 <= 'min' <= 'n' <= max. | |
static Regex | repeat (Regex r, int n, bool orMore) |
If 'orMore' is false, match exactly 'n' repetitions of 'r' where 0 <= 'n'. | |
static Regex | star (Regex r) |
static Regex | plus (Regex r) |
static Regex | option (Regex r) |
static Regex | str (ustring s) |
static Regex | str (string s) |
Match the string 's' which must be UFT8 encoded. | |
static Regex | empty () |
Match the empty string. | |
static Regex | bracket (const vector< pair< uchar, uchar > > &ranges, const vector< string > &namedClasses, bool invert=false) |
static Regex | range (uchar from, uchar to, bool invert=false) |
Match one character in the range 'from' - 'to' (both inclusive). | |
static Regex | namedClass (string name, bool invert=false) |
Match one character from the named class. | |
static Regex | anyChar () |
Match one arbitrary character. | |
static Regex | lineBegin () |
static Regex | lineEnd () |
static Regex | wordBegin () |
static Regex | wordEnd () |
Classes | |
struct | Altern |
struct | Class |
class | Environment |
struct | Exp |
struct | Juxta |
struct | Lexer |
struct | LineBegin |
Match the beginning of a line. | |
struct | LineEnd |
Match the end of a line. | |
struct | Parser |
struct | ParserContext |
struct | Repeat |
struct | String |
struct | WordBegin |
Match the beginning of a word. | |
struct | WordEnd |
Match the end of a word. |
Precedence: alternation (|) 0 juxtaposition 1 repeatition (*,+,?,{}) 2
Definition at line 70 of file regex.H.
|
Construct a regular expression from a string representation.
Definition at line 304 of file regex.H. Referenced by altern(), anyChar(), bracket(), empty(), juxta(), lineBegin(), lineEnd(), option(), plus(), repeat(), star(), str(), wordBegin(), and wordEnd(). |
|
Construct a regular expression from a string representation. Accept the special syntax extension where {name} stands for a previously defined expression.
|
|
Construct a regular expression from a UTF8 encoded string representation.
Definition at line 327 of file regex.H. References Archon::Utilities::Unicode::decodeUtf8(). |
|
Construct a regular expression from a UTF8 encoded string representation. Accept the special syntax extension where {name} stands for a previously defined expression.
Definition at line 339 of file regex.H. References Archon::Utilities::Unicode::decodeUtf8(). |
|
Match one character from the named class.
|
|
If 'orMore' is false, match exactly 'n' repetitions of 'r' where 0 <= 'n'. If 'orMore' is true, match at least 'n' repetitions of 'r' where 0 <= 'n'. |