Qt 4.8
|
Classes | |
class | Box |
Public Functions | |
void | addAnchors (int from, int to, int a) |
void | addCatTransitions (const QVector< int > &from, const QVector< int > &to) |
void | addPlusTransitions (const QVector< int > &from, const QVector< int > &to, int atom) |
int | anchorAlternation (int a, int b) |
int | anchorConcatenation (int a, int b) |
int | captureCount () const |
int | createState (QChar ch) |
int | createState (const QRegExpCharClass &cc) |
int | createState (int bref) |
void | dump () const |
const QString & | errorString () const |
void | heuristicallyChooseHeuristic () |
bool | isValid () const |
QRegExpEngine (Qt::CaseSensitivity cs, bool greedyQuantifiers) | |
QRegExpEngine (const QRegExpEngineKey &key) | |
~QRegExpEngine () | |
Public Variables | |
QAtomicInt | ref |
Private Types | |
enum | { CharClassBit = 0x10000, BackRefBit = 0x20000 } |
enum | { InitialState = 0, FinalState = 1 } |
enum | { MaxLookaheads = 13, MaxBackRefs = 14 } |
enum | { Anchor_Dollar = 0x00000001, Anchor_Caret = 0x00000002, Anchor_Word = 0x00000004, Anchor_NonWord = 0x00000008, Anchor_FirstLookahead = 0x00000010, Anchor_BackRef1Empty = Anchor_FirstLookahead << MaxLookaheads, Anchor_BackRef0Empty = Anchor_BackRef1Empty >> 1, Anchor_Alternation = unsigned(Anchor_BackRef1Empty) << MaxBackRefs, Anchor_LookaheadMask } |
enum | { Tok_Eos, Tok_Dollar, Tok_LeftParen, Tok_MagicLeftParen, Tok_PosLookahead, Tok_NegLookahead, Tok_RightParen, Tok_CharClass, Tok_Caret, Tok_Quantifier, Tok_Bar, Tok_Word, Tok_NonWord, Tok_Char = 0x10000, Tok_BackRef = 0x20000 } |
Private Functions | |
int | addLookahead (QRegExpEngine *eng, bool negative) |
bool | badCharMatch (QRegExpMatchState &matchState) const |
void | error (const char *msg) |
void | finishAtom (int atom, bool needCapture) |
int | getChar () |
int | getEscape () |
int | getRep (int def) |
int | getToken () |
bool | goodStringMatch (QRegExpMatchState &matchState) const |
int | parse (const QChar *rx, int len) |
void | parseAtom (Box *box) |
void | parseExpression (Box *box) |
void | parseFactor (Box *box) |
void | parseTerm (Box *box) |
void | setup () |
void | setupCategoriesRangeMap () |
int | setupState (int match) |
void | skipChars (int n) |
int | startAtom (bool officialCapture) |
void | startTokenizer (const QChar *rx, int len) |
Properties | |
QVector< QRegExpAnchorAlternation > | aa |
QVector< QRegExpLookahead * > | ahead |
QVector< int > | captureForOfficialCapture |
bool | caretAnchored |
QHash< QByteArray, QPair< int, int > > | categoriesRangeMap |
int | cf |
QVector< QRegExpCharClass > | cl |
Qt::CaseSensitivity | cs |
QVector< QRegExpAtom > | f |
int | goodEarlyStart |
int | goodLateStart |
QString | goodStr |
bool | greedyQuantifiers |
int | minl |
int | nbrefs |
int | ncap |
int | nf |
QVector< int > | occ1 |
int | officialncap |
QVector< QRegExpAutomatonState > | s |
bool | trivial |
bool | useGoodStringHeuristic |
bool | valid |
bool | xmlSchemaExtensions |
int | yyCh |
QScopedPointer< QRegExpCharClass > | yyCharClass |
QString | yyError |
const QChar * | yyIn |
int | yyLen |
int | yyMaxRep |
bool | yyMayCapture |
int | yyMinRep |
int | yyPos |
int | yyPos0 |
int | yyTok |
Friends | |
class | Box |
struct | QRegExpMatchState |
Definition at line 1074 of file qregexp.cpp.
|
private |
Enumerator | |
---|---|
CharClassBit | |
BackRefBit |
Definition at line 1118 of file qregexp.cpp.
|
private |
Enumerator | |
---|---|
InitialState | |
FinalState |
Definition at line 1119 of file qregexp.cpp.
|
private |
Enumerator | |
---|---|
MaxLookaheads | |
MaxBackRefs |
Definition at line 1128 of file qregexp.cpp.
|
private |
Enumerator | |
---|---|
Anchor_Dollar | |
Anchor_Caret | |
Anchor_Word | |
Anchor_NonWord | |
Anchor_FirstLookahead | |
Anchor_BackRef1Empty | |
Anchor_BackRef0Empty | |
Anchor_Alternation | |
Anchor_LookaheadMask |
Definition at line 1129 of file qregexp.cpp.
|
private |
Enumerator | |
---|---|
Tok_Eos | |
Tok_Dollar | |
Tok_LeftParen | |
Tok_MagicLeftParen | |
Tok_PosLookahead | |
Tok_NegLookahead | |
Tok_RightParen | |
Tok_CharClass | |
Tok_Caret | |
Tok_Quantifier | |
Tok_Bar | |
Tok_Word | |
Tok_NonWord | |
Tok_Char | |
Tok_BackRef |
Definition at line 1261 of file qregexp.cpp.
|
inline |
QRegExpEngine::QRegExpEngine | ( | const QRegExpEngineKey & | key | ) |
Definition at line 1343 of file qregexp.cpp.
QRegExpEngine::~QRegExpEngine | ( | ) |
Definition at line 1360 of file qregexp.cpp.
void QRegExpEngine::addAnchors | ( | int | from, |
int | to, | ||
int | a | ||
) |
Definition at line 1593 of file qregexp.cpp.
Referenced by QRegExpEngine::Box::addAnchorsToEngine().
Definition at line 1528 of file qregexp.cpp.
Referenced by QRegExpEngine::Box::cat(), and QRegExpEngine::Box::plus().
|
private |
Definition at line 1769 of file qregexp.cpp.
Referenced by parseAtom().
void QRegExpEngine::addPlusTransitions | ( | const QVector< int > & | from, |
const QVector< int > & | to, | ||
int | atom | ||
) |
Definition at line 1535 of file qregexp.cpp.
Referenced by QRegExpEngine::Box::plus().
int QRegExpEngine::anchorAlternation | ( | int | a, |
int | b | ||
) |
Definition at line 1557 of file qregexp.cpp.
Referenced by addAnchors(), anchorConcatenation(), and QRegExpEngine::Box::orx().
int QRegExpEngine::anchorConcatenation | ( | int | a, |
int | b | ||
) |
Definition at line 1576 of file qregexp.cpp.
Referenced by QRegExpEngine::Box::addAnchorsToEngine(), QRegExpEngine::Box::cat(), and QRegExpEngine::Box::catAnchor().
|
private |
Definition at line 1892 of file qregexp.cpp.
|
inline |
Definition at line 1085 of file qregexp.cpp.
Referenced by QRegExp::numCaptures(), and QRegExpMatchState::prepareForMatch().
int QRegExpEngine::createState | ( | QChar | ch | ) |
Definition at line 1489 of file qregexp.cpp.
Referenced by QRegExpEngine::Box::set().
int QRegExpEngine::createState | ( | const QRegExpCharClass & | cc | ) |
Definition at line 1494 of file qregexp.cpp.
int QRegExpEngine::createState | ( | int | bref | ) |
Definition at line 1507 of file qregexp.cpp.
void QRegExpEngine::dump | ( | ) | const |
Definition at line 1649 of file qregexp.cpp.
|
private |
Definition at line 3181 of file qregexp.cpp.
Referenced by addLookahead(), createState(), getEscape(), getRep(), getToken(), parseAtom(), and QRegExpEngine().
|
inline |
|
private |
Definition at line 1757 of file qregexp.cpp.
Referenced by parse(), and parseFactor().
|
private |
Definition at line 2855 of file qregexp.cpp.
Referenced by getEscape(), getRep(), getToken(), skipChars(), and startTokenizer().
|
private |
Definition at line 2860 of file qregexp.cpp.
Referenced by getToken().
|
private |
|
private |
Definition at line 3200 of file qregexp.cpp.
Referenced by parse(), parseAtom(), parseExpression(), and parseFactor().
|
private |
Definition at line 1872 of file qregexp.cpp.
void QRegExpEngine::heuristicallyChooseHeuristic | ( | ) |
Definition at line 1616 of file qregexp.cpp.
Referenced by QRegExpEngine::Box::setupHeuristics().
|
inline |
|
private |
Definition at line 3361 of file qregexp.cpp.
Referenced by parseAtom(), and QRegExpEngine().
|
private |
Definition at line 3466 of file qregexp.cpp.
Referenced by parseFactor().
|
private |
Definition at line 3634 of file qregexp.cpp.
Referenced by parse(), and parseAtom().
|
private |
Definition at line 3536 of file qregexp.cpp.
Referenced by parseTerm().
|
private |
Definition at line 3621 of file qregexp.cpp.
Referenced by parseExpression().
|
private |
Definition at line 1706 of file qregexp.cpp.
Referenced by QRegExpEngine().
|
private |
Definition at line 2709 of file qregexp.cpp.
Referenced by getEscape().
|
private |
Definition at line 1731 of file qregexp.cpp.
Referenced by createState().
|
private |
|
private |
Definition at line 1747 of file qregexp.cpp.
Referenced by parse(), and parseFactor().
|
private |
Definition at line 3187 of file qregexp.cpp.
Referenced by parse().
Definition at line 1254 of file qregexp.cpp.
|
friend |
Definition at line 1299 of file qregexp.cpp.
|
private |
Definition at line 1169 of file qregexp.cpp.
Referenced by anchorAlternation(), anchorConcatenation(), and dump().
|
private |
Definition at line 1166 of file qregexp.cpp.
Referenced by addLookahead(), QRegExpMatchState::testAnchor(), and ~QRegExpEngine().
|
private |
Definition at line 1158 of file qregexp.cpp.
|
private |
Definition at line 1172 of file qregexp.cpp.
|
private |
Definition at line 1297 of file qregexp.cpp.
Referenced by getEscape(), and setupCategoriesRangeMap().
|
private |
Definition at line 1157 of file qregexp.cpp.
Referenced by finishAtom(), setup(), setupState(), and startAtom().
|
private |
Definition at line 1163 of file qregexp.cpp.
Referenced by createState(), and dump().
|
private |
Definition at line 1176 of file qregexp.cpp.
Referenced by dump(), goodStringMatch(), QRegExp::operator>>(), parseAtom(), QRegExp::setCaseSensitivity(), and QRegExpEngine::Box::setupHeuristics().
|
private |
Definition at line 1155 of file qregexp.cpp.
Referenced by addPlusTransitions(), dump(), finishAtom(), parse(), setup(), and startAtom().
|
private |
Definition at line 1186 of file qregexp.cpp.
Referenced by goodStringMatch(), heuristicallyChooseHeuristic(), and QRegExpEngine::Box::setupHeuristics().
|
private |
Definition at line 1187 of file qregexp.cpp.
Referenced by goodStringMatch(), heuristicallyChooseHeuristic(), and QRegExpEngine::Box::setupHeuristics().
|
private |
Definition at line 1188 of file qregexp.cpp.
Referenced by goodStringMatch(), heuristicallyChooseHeuristic(), and QRegExpEngine::Box::setupHeuristics().
|
private |
Definition at line 1177 of file qregexp.cpp.
Referenced by finishAtom(), parse(), parseAtom(), and parseFactor().
|
private |
Definition at line 1190 of file qregexp.cpp.
Referenced by badCharMatch(), heuristicallyChooseHeuristic(), QRegExpMatchState::match(), QRegExpMatchState::prepareForMatch(), setup(), and QRegExpEngine::Box::setupHeuristics().
|
private |
Definition at line 1180 of file qregexp.cpp.
Referenced by createState(), parse(), and setup().
|
private |
Definition at line 1161 of file qregexp.cpp.
Referenced by isBetterCapture(), QRegExpMatchState::matchHere(), parse(), QRegExpMatchState::prepareForMatch(), and setup().
|
private |
Definition at line 1156 of file qregexp.cpp.
Referenced by dump(), parse(), setup(), and startAtom().
|
private |
Definition at line 1191 of file qregexp.cpp.
Referenced by badCharMatch(), heuristicallyChooseHeuristic(), setup(), and QRegExpEngine::Box::setupHeuristics().
|
private |
Definition at line 1160 of file qregexp.cpp.
QAtomicInt QRegExpEngine::ref |
Definition at line 1115 of file qregexp.cpp.
Referenced by derefEngine(), QRegExp::operator=(), and prepareEngine_helper().
|
private |
Definition at line 1153 of file qregexp.cpp.
Referenced by addAnchors(), addCatTransitions(), addPlusTransitions(), dump(), parse(), QRegExpMatchState::prepareForMatch(), and setupState().
|
private |
Definition at line 1173 of file qregexp.cpp.
Referenced by heuristicallyChooseHeuristic(), parseAtom(), parseExpression(), parseFactor(), QRegExpEngine(), and setup().
|
private |
Definition at line 1184 of file qregexp.cpp.
Referenced by heuristicallyChooseHeuristic(), and setup().
|
private |
Definition at line 1175 of file qregexp.cpp.
Referenced by parse(), QRegExpEngine(), and setup().
|
private |
Definition at line 1178 of file qregexp.cpp.
Referenced by getEscape().
|
private |
Definition at line 1280 of file qregexp.cpp.
Referenced by getEscape(), getRep(), getToken(), parseFactor(), skipChars(), and startTokenizer().
|
private |
Definition at line 1281 of file qregexp.cpp.
Referenced by getEscape(), getToken(), parse(), parseAtom(), parseFactor(), and startTokenizer().
|
private |
Definition at line 1284 of file qregexp.cpp.
Referenced by error(), parse(), and startTokenizer().
|
private |
Definition at line 1276 of file qregexp.cpp.
Referenced by getChar(), parseAtom(), parseFactor(), and startTokenizer().
|
private |
Definition at line 1279 of file qregexp.cpp.
Referenced by getChar(), parseAtom(), parseFactor(), and startTokenizer().
|
private |
Definition at line 1283 of file qregexp.cpp.
Referenced by getToken(), parseFactor(), and startTokenizer().
|
private |
Definition at line 1296 of file qregexp.cpp.
Referenced by parse(), and parseFactor().
|
private |
Definition at line 1282 of file qregexp.cpp.
Referenced by getToken(), parseFactor(), and startTokenizer().
|
private |
Definition at line 1278 of file qregexp.cpp.
Referenced by getChar(), getToken(), parseAtom(), parseFactor(), skipChars(), and startTokenizer().
|
private |
Definition at line 1277 of file qregexp.cpp.
Referenced by getToken(), parse(), parseFactor(), and startTokenizer().
|
private |
Definition at line 1295 of file qregexp.cpp.
Referenced by parse(), parseAtom(), parseExpression(), parseFactor(), and parseTerm().