|
State & | GetState (SizeType index) |
|
const State & | GetState (SizeType index) const |
|
Range & | GetRange (SizeType index) |
|
const Range & | GetRange (SizeType index) const |
|
template<typename InputStream > |
void | Parse (DecodedStream< InputStream > &ds) |
|
SizeType | NewState (SizeType out, SizeType out1, unsigned codepoint) |
|
void | PushOperand (Stack< Allocator > &operandStack, unsigned codepoint) |
|
void | ImplicitConcatenation (Stack< Allocator > &atomCountStack, Stack< Allocator > &operatorStack) |
|
SizeType | Append (SizeType l1, SizeType l2) |
|
void | Patch (SizeType l, SizeType s) |
|
bool | Eval (Stack< Allocator > &operandStack, Operator op) |
|
bool | EvalQuantifier (Stack< Allocator > &operandStack, unsigned n, unsigned m) |
|
void | CloneTopOperand (Stack< Allocator > &operandStack) |
|
template<typename InputStream > |
bool | ParseUnsigned (DecodedStream< InputStream > &ds, unsigned *u) |
|
template<typename InputStream > |
bool | ParseRange (DecodedStream< InputStream > &ds, SizeType *range) |
|
SizeType | NewRange (unsigned codepoint) |
|
template<typename InputStream > |
bool | CharacterEscape (DecodedStream< InputStream > &ds, unsigned *escapedCodepoint) |
|
template<typename InputStream > |
bool | SearchWithAnchoring (InputStream &is, bool anchorBegin, bool anchorEnd) const |
|
size_t | GetStateSetSize () const |
|
bool | AddState (Stack< Allocator > &l, SizeType index) const |
|
bool | MatchRange (SizeType rangeIndex, unsigned codepoint) const |
|
template<typename Encoding, typename Allocator = CrtAllocator>
class internal::GenericRegex< Encoding, Allocator >
Regular expression engine with subset of ECMAscript grammar.
Supported regular expression syntax:
ab
Concatenation
a|b
Alternation
a
? Zero or one
a*
Zero or more
a+
One or more
a{3}
Exactly 3 times
a{3
,} At least 3 times
a{3
,5} 3 to 5 times
(ab) Grouping
^a
At the beginning
a$
At the end
. Any character
[abc] Character classes
[a-c] Character class range
[a-z0-9_] Character class combination
[^abc] Negated character classes
[^a-c] Negated character class range
[] Backspace (U+0008)
\
| \\ ... Escape characters
\f
Form feed (U+000C)
\n
Line feed (U+000A)
\r
Carriage return (U+000D)
\t
Tab (U+0009)
\v
Vertical tab (U+000B)
- Note
- This is a Thompson NFA engine, implemented with reference to Cox, Russ. "Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby,...).", https://swtch.com/~rsc/regexp/regexp1.html