|
Grammatica 1.3 Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ICloneable
|
+--Element
|
+--CharacterSetElement
in CharacterSetElement.csA regular expression character set element. This element matches a single character inside (or outside) a character set. The character set is user defined and may contain ranges of characters. The set may also be inverted, meaning that only characters not inside the set will be considered to match.
Inner Classes, Typedefs, and Enums | |
class |
CharacterSetElement.Range
A character range class. |
Field Summary | |
static CharacterSetElement |
DIGIT
The digit character set. |
static CharacterSetElement |
DOT
The dot ('.') character set. |
static CharacterSetElement |
NON_DIGIT
The non-digit character set. |
static CharacterSetElement |
NON_WHITESPACE
The non-whitespace character set. |
static CharacterSetElement |
NON_WORD
The non-word character set. |
static CharacterSetElement |
WHITESPACE
The whitespace character set. |
static CharacterSetElement |
WORD
The word character set. |
Constructor Summary | |
CharacterSetElement( bool inverted )
Creates a new character set element. |
Method Summary | |
void |
AddCharacter( char c )
Adds a single character to this character set. |
void |
AddCharacters( string str )
Adds multiple characters to this character set. |
void |
AddCharacters( StringElement elem )
Adds multiple characters to this character set. |
void |
AddCharacterSet( CharacterSetElement elem )
Adds a character subset to this character set. |
void |
AddRange( char min, char max )
Adds a character range to this character set. |
override object |
Clone()
Returns this element as the character set shouldn't be modified after creation. |
override int |
Match( Matcher m, string str, int start, int skip )
Returns the length of a matching string starting at the specified position. |
override void |
PrintTo( TextWriter output, string indent )
Prints this element to the specified output stream. |
override string |
ToString()
Returns a string description of this character set. |
Methods inherited from class Element |
Clone, Match, PrintTo |
Field Detail |
public static CharacterSetElement DIGIT;
public static CharacterSetElement DOT;
public static CharacterSetElement NON_DIGIT;
public static CharacterSetElement NON_WHITESPACE;
public static CharacterSetElement NON_WORD;
public static CharacterSetElement WHITESPACE;
public static CharacterSetElement WORD;
Constructor Detail |
public CharacterSetElement( bool inverted );
inverted
- the inverted character set flagMethod Detail |
public void AddCharacter( char c );
c
- the character to addpublic void AddCharacters( string str );
str
- the string with characters to addpublic void AddCharacters( StringElement elem );
elem
- the string element with characters to addpublic void AddCharacterSet( CharacterSetElement elem );
elem
- the character set to addpublic void AddRange( char min, char max );
min
- the minimum character value
max
- the maximum character valuepublic override object Clone();
public override int Match( Matcher m, string str, int start, int skip );
m
- the matcher being used
str
- the string to match
start
- the starting position
skip
- the number of matches to skippublic override void PrintTo( TextWriter output, string indent );
output
- the output stream to use
indent
- the current indentationpublic override string ToString();
|
Grammatica 1.3 Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |