Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

QRegExpEngine Class Reference

Inheritance diagram for QRegExpEngine:

Inheritance graph
[legend]
Collaboration diagram for QRegExpEngine:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 QRegExpEngine (bool caseSensitive)
 QRegExpEngine (const QString &rx, bool caseSensitive)
 ~QRegExpEngine ()
bool isValid () const
bool caseSensitive () const
int numCaptures () const
QArray< int > match (const QString &str, int pos, bool minimal, bool oneTest)
int matchedLength () const
int createState (QChar ch)
int createState (const CharClass &cc)
int createState (int bref)
void addCatTransitions (const QArray< int > &from, const QArray< int > &to)
void addPlusTransitions (const QArray< int > &from, const QArray< int > &to, int atom)
int anchorAlternation (int a, int b)
int anchorConcatenation (int a, int b)
void addAnchors (int from, int to, int a)
void setupGoodStringHeuristic (int earlyStart, int lateStart, const QString &str)
void setupBadCharHeuristic (int minLen, const QArray< int > &firstOcc)
void heuristicallyChooseHeuristic ()
 QRegExpEngine (bool caseSensitive)
 QRegExpEngine (const QString &rx, bool caseSensitive)
 ~QRegExpEngine ()
bool isValid () const
const QStringerrorString () const
bool caseSensitive () const
int numCaptures () const
QMemArray< int > match (const QString &str, int pos, bool minimal, bool oneTest, int caretIndex)
int matchedLength () const
int createState (QChar ch)
int createState (const CharClass &cc)
int createState (int bref)
void addCatTransitions (const QMemArray< int > &from, const QMemArray< int > &to)
void addPlusTransitions (const QMemArray< int > &from, const QMemArray< int > &to, int atom)
int anchorAlternation (int a, int b)
int anchorConcatenation (int a, int b)
void addAnchors (int from, int to, int a)
void setupGoodStringHeuristic (int earlyStart, int lateStart, const QString &str)
void setupBadCharHeuristic (int minLen, const QMemArray< int > &firstOcc)
void heuristicallyChooseHeuristic ()

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 = 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
}
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 = 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 Member Functions

void setup (bool caseSensitive)
int setupState (int match)
int startAtom (bool capture)
void finishAtom (int atom)
int addLookahead (QRegExpEngine *eng, bool negative)
bool isBetterCapture (const int *begin1, const int *end1, const int *begin2, const int *end2)
bool testAnchor (int i, int a, const int *capBegin)
bool goodStringMatch ()
bool badCharMatch ()
bool matchHere ()
int getChar ()
int getEscape ()
int getRep (int def)
void skipChars (int n)
void startTokenizer (const QChar *rx, int len)
int getToken ()
int parse (const QChar *rx, int len)
void parseAtom (Box *box)
void parseFactor (Box *box)
void parseTerm (Box *box)
void parseExpression (Box *box)
void setup (bool caseSensitive)
int setupState (int match)
int startAtom (bool capture)
void finishAtom (int atom)
int addLookahead (QRegExpEngine *eng, bool negative)
bool isBetterCapture (const int *begin1, const int *end1, const int *begin2, const int *end2)
bool testAnchor (int i, int a, const int *capBegin)
bool goodStringMatch ()
bool badCharMatch ()
bool matchHere ()
int getChar ()
int getEscape ()
int getRep (int def)
void skipChars (int n)
void error (const char *msg)
void startTokenizer (const QChar *rx, int len)
int getToken ()
int parse (const QChar *rx, int len)
void parseAtom (Box *box)
void parseFactor (Box *box)
void parseTerm (Box *box)
void parseExpression (Box *box)

Private Attributes

QVector< States
int ns
QArray< Atomf
int nf
int cf
int realncap
int ncap
QVector< CharClasscl
QVector< Lookaheadahead
QArray< AnchorAlternationaa
bool caretAnchored
bool valid
bool cs
int nbrefs
bool useGoodStringHeuristic
int goodEarlyStart
int goodLateStart
QString goodStr
int minl
QArray< int > occ1
const QCharyyIn
int yyPos0
int yyPos
int yyLen
int yyCh
CharClassyyCharClass
int yyMinRep
int yyMaxRep
bool yyError
int yyTok
bool yyMayCapture
const QStringmmStr
const QCharmmIn
int mmPos
int mmLen
bool mmMinimal
QArray< int > mmCaptured
QArray< int > mmCapturedNoMatch
QArray< int > mmBigArray
int * mmInNextStack
int * mmCurStack
int * mmNextStack
int * mmCurCapBegin
int * mmNextCapBegin
int * mmCurCapEnd
int * mmNextCapEnd
int * mmTempCapBegin
int * mmTempCapEnd
int * mmCapBegin
int * mmCapEnd
int * mmSlideTab
int mmSlideTabSize
QIntDict< int > mmSleeping
int mmMatchedLen
QPtrVector< States
QMemArray< Atomf
int officialncap
QPtrVector< CharClasscl
QPtrVector< Lookaheadahead
QMemArray< AnchorAlternationaa
QMemArray< int > occ1
const QCharyyIn
CharClassyyCharClass
QString yyError
const QStringmmStr
const QCharmmIn
int mmCaretPos
QMemArray< int > mmCaptured
QMemArray< int > mmCapturedNoMatch
QMemArray< int > mmBigArray
int * mmInNextStack
int * mmCurStack
int * mmNextStack
int * mmCurCapBegin
int * mmNextCapBegin
int * mmCurCapEnd
int * mmNextCapEnd
int * mmTempCapBegin
int * mmTempCapEnd
int * mmCapBegin
int * mmCapEnd
int * mmSlideTab
QIntDict< int > mmSleeping
int mmMatchLen

Friends

class Box

Classes

struct  AnchorAlternation
struct  Atom
class  Box
class  CharClass
struct  Lookahead
struct  State

Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
CharClassBit 
BackRefBit 

Definition at line 909 of file qregexp3.cpp.

anonymous enum [private]
 

Enumeration values:
InitialState 
FinalState 

Definition at line 976 of file qregexp3.cpp.

anonymous enum [private]
 

Enumeration values:
MaxLookaheads 
MaxBackRefs 

Definition at line 983 of file qregexp3.cpp.

anonymous enum [private]
 

Enumeration values:
Anchor_Dollar 
Anchor_Caret 
Anchor_Word 
Anchor_NonWord 
Anchor_FirstLookahead 
Anchor_BackRef1Empty 
Anchor_BackRef0Empty 
Anchor_Alternation 
Anchor_LookaheadMask 

Definition at line 984 of file qregexp3.cpp.

anonymous enum [private]
 

Enumeration values:
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 1118 of file qregexp3.cpp.

anonymous enum [private]
 

Enumeration values:
CharClassBit 
BackRefBit 

Definition at line 967 of file qregexp.cpp.

anonymous enum [private]
 

Enumeration values:
InitialState 
FinalState 

Definition at line 1035 of file qregexp.cpp.

anonymous enum [private]
 

Enumeration values:
MaxLookaheads 
MaxBackRefs 

Definition at line 1043 of file qregexp.cpp.

anonymous enum [private]
 

Enumeration values:
Anchor_Dollar 
Anchor_Caret 
Anchor_Word 
Anchor_NonWord 
Anchor_FirstLookahead 
Anchor_BackRef1Empty 
Anchor_BackRef0Empty 
Anchor_Alternation 
Anchor_LookaheadMask 

Definition at line 1044 of file qregexp.cpp.

anonymous enum [private]
 

Enumeration values:
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 1178 of file qregexp.cpp.


Constructor & Destructor Documentation

QRegExpEngine::QRegExpEngine bool  caseSensitive  )  [inline]
 

Definition at line 863 of file qregexp3.cpp.

References setup().

Referenced by parseAtom().

QRegExpEngine::QRegExpEngine const QString rx,
bool  caseSensitive
 

Definition at line 1185 of file qregexp3.cpp.

References parse().

QRegExpEngine::~QRegExpEngine  ) 
 

Definition at line 1195 of file qregexp3.cpp.

References engCount, firstOccurrenceAtZero, and noOccurrences.

QRegExpEngine::QRegExpEngine bool  caseSensitive  )  [inline]
 

Definition at line 919 of file qregexp.cpp.

References setup().

QRegExpEngine::QRegExpEngine const QString rx,
bool  caseSensitive
 

QRegExpEngine::~QRegExpEngine  ) 
 


Member Function Documentation

void QRegExpEngine::addAnchors int  from,
int  to,
int  a
 

void QRegExpEngine::addAnchors int  from,
int  to,
int  a
 

Definition at line 1361 of file qregexp3.cpp.

References anchorAlternation(), QRegExpEngine::State::anchors, QMap< Key, T >::contains(), QMap< Key, T >::insert(), and s.

Referenced by QRegExpEngine::Box::addAnchorsToEngine().

void QRegExpEngine::addCatTransitions const QMemArray< int > &  from,
const QMemArray< int > &  to
 

Definition at line 1364 of file qregexp.cpp.

References i, mergeInto(), QRegExpEngine::State::outs, s, and QMemArray< type >::size().

void QRegExpEngine::addCatTransitions const QArray< int > &  from,
const QArray< int > &  to
 

Definition at line 1297 of file qregexp3.cpp.

References i, mergeInto(), QRegExpEngine::State::outs, and s.

Referenced by QRegExpEngine::Box::cat(), and QRegExpEngine::Box::plus().

int QRegExpEngine::addLookahead QRegExpEngine eng,
bool  negative
[private]
 

int QRegExpEngine::addLookahead QRegExpEngine eng,
bool  negative
[private]
 

Definition at line 1563 of file qregexp3.cpp.

References ahead, Anchor_FirstLookahead, MaxLookaheads, TRUE, and yyError.

Referenced by parseAtom().

void QRegExpEngine::addPlusTransitions const QMemArray< int > &  from,
const QMemArray< int > &  to,
int  atom
 

Definition at line 1374 of file qregexp.cpp.

References QMemArray< type >::bsearch(), QMap< Key, T >::contains(), f, i, QMap< Key, T >::insert(), mergeInto(), QRegExpEngine::State::outs, QRegExpEngine::State::reenter, s, and QMemArray< type >::size().

void QRegExpEngine::addPlusTransitions const QArray< int > &  from,
const QArray< int > &  to,
int  atom
 

Definition at line 1307 of file qregexp3.cpp.

References QMap< Key, T >::contains(), f, i, QMap< Key, T >::insert(), mergeInto(), QRegExpEngine::State::outs, QRegExpEngine::State::reenter, and s.

Referenced by QRegExpEngine::Box::plus().

int QRegExpEngine::anchorAlternation int  a,
int  b
 

int QRegExpEngine::anchorAlternation int  a,
int  b
 

Definition at line 1331 of file qregexp3.cpp.

References aa, and Anchor_Alternation.

Referenced by addAnchors(), anchorConcatenation(), and QRegExpEngine::Box::orx().

int QRegExpEngine::anchorConcatenation int  a,
int  b
 

int QRegExpEngine::anchorConcatenation int  a,
int  b
 

Definition at line 1346 of file qregexp3.cpp.

References aa, Anchor_Alternation, anchorAlternation(), and qSwap().

Referenced by QRegExpEngine::Box::addAnchorsToEngine(), QRegExpEngine::Box::cat(), and QRegExpEngine::Box::catAnchor().

bool QRegExpEngine::badCharMatch  )  [private]
 

bool QRegExpEngine::badCharMatch  )  [private]
 

Definition at line 1687 of file qregexp3.cpp.

References BadChar, FALSE, matchHere(), minl, mmIn, mmLen, mmPos, mmSlideTab, mmSlideTabSize, NoOccurrence, occ1, and TRUE.

Referenced by match().

bool QRegExpEngine::caseSensitive  )  const [inline]
 

Definition at line 927 of file qregexp.cpp.

References cs.

bool QRegExpEngine::caseSensitive  )  const [inline]
 

Definition at line 870 of file qregexp3.cpp.

References cs.

Referenced by QRegExp::caseSensitive(), newEngine(), QRegExp::operator==(), and QRegExp::setCaseSensitive().

int QRegExpEngine::createState int  bref  ) 
 

int QRegExpEngine::createState const CharClass cc  ) 
 

int QRegExpEngine::createState QChar  ch  ) 
 

int QRegExpEngine::createState int  bref  ) 
 

Definition at line 1277 of file qregexp3.cpp.

References BackRefBit, MaxBackRefs, nbrefs, setupState(), TRUE, and yyError.

int QRegExpEngine::createState const CharClass cc  ) 
 

Definition at line 1263 of file qregexp3.cpp.

References CharClassBit, cl, and setupState().

int QRegExpEngine::createState QChar  ch  ) 
 

Definition at line 1258 of file qregexp3.cpp.

References setupState(), and QChar::unicode().

Referenced by QRegExpEngine::Box::set().

void QRegExpEngine::error const char *  msg  )  [private]
 

Definition at line 2739 of file qregexp.cpp.

References QString::fromLatin1(), and yyError.

const QString& QRegExpEngine::errorString  )  const [inline]
 

Definition at line 926 of file qregexp.cpp.

References yyError.

Referenced by QRegExp::errorString().

void QRegExpEngine::finishAtom int  atom  )  [inline, private]
 

Definition at line 1055 of file qregexp.cpp.

References cf, and f.

void QRegExpEngine::finishAtom int  atom  )  [inline, private]
 

Definition at line 995 of file qregexp3.cpp.

References cf, and f.

Referenced by parse(), and parseFactor().

int QRegExpEngine::getChar  )  [private]
 

int QRegExpEngine::getChar  )  [private]
 

Definition at line 2485 of file qregexp3.cpp.

References EOS, QChar::unicode(), yyIn, yyLen, and yyPos.

Referenced by getEscape(), getRep(), getToken(), skipChars(), and startTokenizer().

int QRegExpEngine::getEscape  )  [private]
 

int QRegExpEngine::getEscape  )  [private]
 

Definition at line 2490 of file qregexp3.cpp.

References QRegExpEngine::CharClass::addCategories(), QRegExpEngine::CharClass::addRange(), EOS, getChar(), low, p, Tok_BackRef, Tok_Char, Tok_CharClass, Tok_NonWord, Tok_Word, TRUE, val, yyCh, yyCharClass, and yyError.

Referenced by getToken().

int QRegExpEngine::getRep int  def  )  [private]
 

int QRegExpEngine::getRep int  def  )  [private]
 

Definition at line 2602 of file qregexp3.cpp.

References getChar(), InftyRep, TRUE, yyCh, and yyError.

Referenced by getToken().

int QRegExpEngine::getToken  )  [private]
 

int QRegExpEngine::getToken  )  [private]
 

Definition at line 2644 of file qregexp3.cpp.

References QRegExpEngine::CharClass::addRange(), QRegExpEngine::CharClass::addSingleton(), QRegExpEngine::CharClass::clear(), EOS, FALSE, getChar(), getEscape(), getRep(), InftyRep, qSwap(), QRegExpEngine::CharClass::setNegative(), Tok_Bar, Tok_Caret, Tok_Char, Tok_CharClass, Tok_Dollar, Tok_Eos, Tok_LeftParen, Tok_MagicLeftParen, Tok_NegLookahead, Tok_PosLookahead, Tok_Quantifier, Tok_RightParen, Tok_Word, TRUE, yyCh, yyCharClass, yyError, yyMaxRep, yyMinRep, yyPos, and yyPos0.

Referenced by parse(), parseAtom(), parseExpression(), and parseFactor().

bool QRegExpEngine::goodStringMatch  )  [private]
 

bool QRegExpEngine::goodStringMatch  )  [private]
 

Definition at line 1667 of file qregexp3.cpp.

References cs, FALSE, QString::find(), goodEarlyStart, goodLateStart, goodStr, matchHere(), mmPos, mmStr, and TRUE.

Referenced by match().

void QRegExpEngine::heuristicallyChooseHeuristic  ) 
 

void QRegExpEngine::heuristicallyChooseHeuristic  ) 
 

Definition at line 1404 of file qregexp3.cpp.

References goodEarlyStart, goodLateStart, goodStr, i, QString::length(), minl, NoOccurrence, NumBadChars, occ1, and useGoodStringHeuristic.

Referenced by QRegExpEngine::Box::setupHeuristics().

bool QRegExpEngine::isBetterCapture const int *  begin1,
const int *  end1,
const int *  begin2,
const int *  end2
[private]
 

bool QRegExpEngine::isBetterCapture const int *  begin1,
const int *  end1,
const int *  begin2,
const int *  end2
[private]
 

Definition at line 1580 of file qregexp3.cpp.

References FALSE, and ncap.

Referenced by matchHere().

bool QRegExpEngine::isValid  )  const [inline]
 

Definition at line 925 of file qregexp.cpp.

References valid.

bool QRegExpEngine::isValid  )  const [inline]
 

Definition at line 869 of file qregexp3.cpp.

References valid.

Referenced by QRegExp::isValid().

QMemArray< int > QRegExpEngine::match const QString str,
int  pos,
bool  minimal,
bool  oneTest,
int  caretIndex
 

Definition at line 1269 of file qregexp.cpp.

References badCharMatch(), caretAnchored, FALSE, goodStringMatch(), len, QString::length(), matchHere(), minl, mmCapBegin, mmCapEnd, mmCaptured, mmCapturedNoMatch, mmCaretPos, mmIn, mmLen, mmMatchedLen, mmMatchLen, mmMinimal, mmPos, mmStr, QChar::null, officialncap, QString::unicode(), useGoodStringHeuristic, and valid.

QArray< int > QRegExpEngine::match const QString str,
int  pos,
bool  minimal,
bool  oneTest
 

Definition at line 1210 of file qregexp3.cpp.

References badCharMatch(), caretAnchored, FALSE, goodStringMatch(), len, QString::length(), matchHere(), minl, mmCapBegin, mmCapEnd, mmCaptured, mmCapturedNoMatch, mmIn, mmLen, mmMatchedLen, mmMinimal, mmPos, mmStr, QChar::null, realncap, QString::unicode(), useGoodStringHeuristic, and valid.

Referenced by QRegExp::exactMatch(), matchHere(), QRegExp::search(), and QRegExp::searchRev().

int QRegExpEngine::matchedLength  )  const [inline]
 

Definition at line 931 of file qregexp.cpp.

References mmMatchedLen.

int QRegExpEngine::matchedLength  )  const [inline]
 

Definition at line 874 of file qregexp3.cpp.

References mmMatchedLen.

Referenced by QRegExp::exactMatch().

bool QRegExpEngine::matchHere  )  [private]
 

bool QRegExpEngine::matchHere  )  [private]
 

Definition at line 1766 of file qregexp3.cpp.

References QRegExpEngine::State::anchors, at(), QRegExpEngine::State::atom, cl, QIntDict< type >::count(), cs, EmptyCapture, f, FALSE, QBitArray::fill(), FinalState, QRegExpEngine::CharClass::in(), in, InitialState, QIntDict< type >::insert(), isBetterCapture(), QIntDict< type >::isEmpty(), QChar::lower(), lower(), QRegExpEngine::State::match, match(), mmCapBegin, mmCapEnd, mmCurCapBegin, mmCurCapEnd, mmCurStack, mmIn, mmInNextStack, mmLen, mmMatchedLen, mmMinimal, mmNextCapBegin, mmNextCapEnd, mmNextStack, mmPos, mmSleeping, mmTempCapBegin, mmTempCapEnd, ncap, QRegExpEngine::CharClass::negative(), nf, QRegExpEngine::State::outs, p, qSwap(), QRegExpEngine::State::reenter, s, QBitArray::setBit(), QIntDict< type >::take(), testAnchor(), QBitArray::testBit(), TRUE, QChar::unicode(), and upper().

Referenced by badCharMatch(), goodStringMatch(), and match().

int QRegExpEngine::numCaptures  )  const [inline]
 

Definition at line 928 of file qregexp.cpp.

References officialncap.

int QRegExpEngine::numCaptures  )  const [inline]
 

Definition at line 871 of file qregexp3.cpp.

References realncap.

Referenced by QRegExp::compile(), and QRegExp::numCaptures().

int QRegExpEngine::parse const QChar rx,
int  len
[private]
 

int QRegExpEngine::parse const QChar rx,
int  len
[private]
 

Definition at line 2801 of file qregexp3.cpp.

References Anchor_Alternation, Anchor_Caret, QRegExpEngine::State::anchors, QMap< Key, T >::begin(), caretAnchored, QRegExpEngine::Box::cat(), QMap< Key, T >::end(), FALSE, finishAtom(), getToken(), InitialState, mmBigArray, mmCapBegin, mmCapEnd, mmCaptured, mmCapturedNoMatch, mmCurCapBegin, mmCurCapEnd, mmCurStack, mmInNextStack, mmNextCapBegin, mmNextCapEnd, mmNextStack, mmSlideTab, mmSlideTabSize, mmTempCapBegin, mmTempCapEnd, nbrefs, ncap, ns, parseExpression(), realncap, s, QRegExpEngine::Box::set(), QRegExpEngine::Box::setupHeuristics(), startAtom(), startTokenizer(), TRUE, valid, yyCharClass, yyError, yyMayCapture, yyPos0, and yyTok.

Referenced by parseAtom().

void QRegExpEngine::parseAtom Box box  )  [private]
 

void QRegExpEngine::parseAtom Box box  )  [private]
 

Definition at line 2895 of file qregexp3.cpp.

References addLookahead(), Anchor_Caret, Anchor_Dollar, Anchor_NonWord, Anchor_Word, QRegExpEngine::Box::catAnchor(), cs, getToken(), len, parse(), parseExpression(), QRegExpEngine(), QRegExpEngine::Box::set(), skipChars(), Tok_BackRef, Tok_Caret, Tok_Char, Tok_CharClass, Tok_Dollar, Tok_LeftParen, Tok_MagicLeftParen, Tok_NegLookahead, Tok_NonWord, Tok_PosLookahead, Tok_RightParen, Tok_Word, TRUE, yyCharClass, yyError, yyIn, yyLen, yyPos, and yyTok.

Referenced by parseFactor().

void QRegExpEngine::parseExpression Box box  )  [private]
 

void QRegExpEngine::parseExpression Box box  )  [private]
 

Definition at line 3045 of file qregexp3.cpp.

References getToken(), parseTerm(), Tok_Bar, and yyTok.

Referenced by parse(), and parseAtom().

void QRegExpEngine::parseFactor Box box  )  [private]
 

void QRegExpEngine::parseFactor Box box  )  [private]
 

Definition at line 2957 of file qregexp3.cpp.

References alpha, QRegExpEngine::Box::cat(), FALSE, finishAtom(), getToken(), in, InftyRep, len, QRegExpEngine::Box::opt(), parseAtom(), pos, startAtom(), Tok_CharClass, Tok_LeftParen, Tok_Quantifier, yyCh, yyCharClass, yyIn, yyLen, yyMaxRep, yyMayCapture, yyMinRep, yyPos, yyPos0, YYREDO, and yyTok.

Referenced by parseTerm().

void QRegExpEngine::parseTerm Box box  )  [private]
 

void QRegExpEngine::parseTerm Box box  )  [private]
 

Definition at line 3032 of file qregexp3.cpp.

References parseFactor(), Tok_Bar, Tok_Eos, Tok_RightParen, and yyTok.

Referenced by parseExpression().

void QRegExpEngine::setup bool  caseSensitive  )  [private]
 

void QRegExpEngine::setup bool  caseSensitive  )  [private]
 

Definition at line 1488 of file qregexp3.cpp.

References ahead, caretAnchored, cf, cl, cs, engCount, f, FALSE, firstOccurrenceAtZero, minl, mmCapturedNoMatch, nbrefs, ncap, nf, NoOccurrence, noOccurrences, ns, NumBadChars, occ1, realncap, s, TRUE, useGoodStringHeuristic, and valid.

Referenced by QRegExpEngine().

void QRegExpEngine::setupBadCharHeuristic int  minLen,
const QMemArray< int > &  firstOcc
 

Definition at line 1459 of file qregexp.cpp.

References cs, minl, NumBadChars, and occ1.

void QRegExpEngine::setupBadCharHeuristic int  minLen,
const QArray< int > &  firstOcc
 

Definition at line 1385 of file qregexp3.cpp.

References cs, firstOccurrenceAtZero, minl, and occ1.

Referenced by QRegExpEngine::Box::setupHeuristics().

void QRegExpEngine::setupGoodStringHeuristic int  earlyStart,
int  lateStart,
const QString str
 

void QRegExpEngine::setupGoodStringHeuristic int  earlyStart,
int  lateStart,
const QString str
 

Definition at line 1377 of file qregexp3.cpp.

References cs, goodEarlyStart, goodLateStart, goodStr, and QString::lower().

Referenced by QRegExpEngine::Box::setupHeuristics().

int QRegExpEngine::setupState int  match  )  [private]
 

int QRegExpEngine::setupState int  match  )  [private]
 

Definition at line 1530 of file qregexp3.cpp.

References cf, ns, and s.

Referenced by createState().

void QRegExpEngine::skipChars int  n  )  [private]
 

void QRegExpEngine::skipChars int  n  )  [private]
 

Definition at line 2622 of file qregexp3.cpp.

References getChar(), yyCh, and yyPos.

Referenced by parseAtom().

int QRegExpEngine::startAtom bool  capture  )  [private]
 

int QRegExpEngine::startAtom bool  capture  )  [private]
 

Definition at line 1548 of file qregexp3.cpp.

References cf, f, ncap, and nf.

Referenced by parse(), and parseFactor().

void QRegExpEngine::startTokenizer const QChar rx,
int  len
[private]
 

void QRegExpEngine::startTokenizer const QChar rx,
int  len
[private]
 

Definition at line 2631 of file qregexp3.cpp.

References FALSE, getChar(), yyCh, yyCharClass, yyError, yyIn, yyLen, yyMaxRep, yyMinRep, yyPos, and yyPos0.

Referenced by parse().

bool QRegExpEngine::testAnchor int  i,
int  a,
const int *  capBegin
[private]
 

bool QRegExpEngine::testAnchor int  i,
int  a,
const int *  capBegin
[private]
 

Definition at line 1599 of file qregexp3.cpp.

References aa, ahead, Anchor_Alternation, Anchor_BackRef1Empty, Anchor_Caret, Anchor_Dollar, Anchor_FirstLookahead, Anchor_LookaheadMask, Anchor_NonWord, Anchor_Word, EmptyCapture, FALSE, QChar::isLetterOrNumber(), mmIn, mmLen, mmPos, nbrefs, QConstString::string(), and TRUE.

Referenced by matchHere().


Friends And Related Function Documentation

Box [friend]
 

Definition at line 1113 of file qregexp3.cpp.


Member Data Documentation

QMemArray<AnchorAlternation> QRegExpEngine::aa [private]
 

Definition at line 1092 of file qregexp.cpp.

QArray<AnchorAlternation> QRegExpEngine::aa [private]
 

Definition at line 1032 of file qregexp3.cpp.

Referenced by anchorAlternation(), anchorConcatenation(), and testAnchor().

QPtrVector<Lookahead> QRegExpEngine::ahead [private]
 

Definition at line 1089 of file qregexp.cpp.

QVector<Lookahead> QRegExpEngine::ahead [private]
 

Definition at line 1029 of file qregexp3.cpp.

Referenced by addLookahead(), setup(), and testAnchor().

bool QRegExpEngine::caretAnchored [private]
 

Definition at line 1095 of file qregexp.cpp.

Referenced by match(), parse(), and setup().

int QRegExpEngine::cf [private]
 

Definition at line 1081 of file qregexp.cpp.

Referenced by finishAtom(), setup(), setupState(), and startAtom().

QPtrVector<CharClass> QRegExpEngine::cl [private]
 

Definition at line 1086 of file qregexp.cpp.

QVector<CharClass> QRegExpEngine::cl [private]
 

Definition at line 1026 of file qregexp3.cpp.

Referenced by createState(), matchHere(), and setup().

bool QRegExpEngine::cs [private]
 

Definition at line 1098 of file qregexp.cpp.

Referenced by caseSensitive(), goodStringMatch(), matchHere(), parseAtom(), setup(), setupBadCharHeuristic(), and setupGoodStringHeuristic().

QMemArray<Atom> QRegExpEngine::f [private]
 

Definition at line 1079 of file qregexp.cpp.

QArray<Atom> QRegExpEngine::f [private]
 

Definition at line 1019 of file qregexp3.cpp.

Referenced by addPlusTransitions(), finishAtom(), matchHere(), setup(), and startAtom().

int QRegExpEngine::goodEarlyStart [private]
 

Definition at line 1106 of file qregexp.cpp.

Referenced by goodStringMatch(), heuristicallyChooseHeuristic(), and setupGoodStringHeuristic().

int QRegExpEngine::goodLateStart [private]
 

Definition at line 1107 of file qregexp.cpp.

Referenced by goodStringMatch(), heuristicallyChooseHeuristic(), and setupGoodStringHeuristic().

QString QRegExpEngine::goodStr [private]
 

Definition at line 1108 of file qregexp.cpp.

Referenced by goodStringMatch(), heuristicallyChooseHeuristic(), and setupGoodStringHeuristic().

int QRegExpEngine::minl [private]
 

Definition at line 1110 of file qregexp.cpp.

Referenced by badCharMatch(), heuristicallyChooseHeuristic(), match(), setup(), and setupBadCharHeuristic().

QMemArray<int> QRegExpEngine::mmBigArray [private]
 

Definition at line 1227 of file qregexp.cpp.

QArray<int> QRegExpEngine::mmBigArray [private]
 

Definition at line 1165 of file qregexp3.cpp.

Referenced by parse().

int* QRegExpEngine::mmCapBegin [private]
 

Definition at line 1237 of file qregexp.cpp.

int* QRegExpEngine::mmCapBegin [private]
 

Definition at line 1175 of file qregexp3.cpp.

Referenced by match(), matchHere(), and parse().

int* QRegExpEngine::mmCapEnd [private]
 

Definition at line 1238 of file qregexp.cpp.

int* QRegExpEngine::mmCapEnd [private]
 

Definition at line 1176 of file qregexp3.cpp.

Referenced by match(), matchHere(), and parse().

QMemArray<int> QRegExpEngine::mmCaptured [private]
 

Definition at line 1225 of file qregexp.cpp.

QArray<int> QRegExpEngine::mmCaptured [private]
 

Definition at line 1163 of file qregexp3.cpp.

Referenced by match(), and parse().

QMemArray<int> QRegExpEngine::mmCapturedNoMatch [private]
 

Definition at line 1226 of file qregexp.cpp.

QArray<int> QRegExpEngine::mmCapturedNoMatch [private]
 

Definition at line 1164 of file qregexp3.cpp.

Referenced by match(), parse(), and setup().

int QRegExpEngine::mmCaretPos [private]
 

Definition at line 1222 of file qregexp.cpp.

Referenced by match().

int* QRegExpEngine::mmCurCapBegin [private]
 

Definition at line 1231 of file qregexp.cpp.

int* QRegExpEngine::mmCurCapBegin [private]
 

Definition at line 1169 of file qregexp3.cpp.

Referenced by matchHere(), and parse().

int* QRegExpEngine::mmCurCapEnd [private]
 

Definition at line 1233 of file qregexp.cpp.

int* QRegExpEngine::mmCurCapEnd [private]
 

Definition at line 1171 of file qregexp3.cpp.

Referenced by matchHere(), and parse().

int* QRegExpEngine::mmCurStack [private]
 

Definition at line 1229 of file qregexp.cpp.

int* QRegExpEngine::mmCurStack [private]
 

Definition at line 1167 of file qregexp3.cpp.

Referenced by matchHere(), and parse().

const QChar* QRegExpEngine::mmIn [private]
 

Definition at line 1220 of file qregexp.cpp.

const QChar* QRegExpEngine::mmIn [private]
 

Definition at line 1159 of file qregexp3.cpp.

Referenced by badCharMatch(), match(), matchHere(), and testAnchor().

int* QRegExpEngine::mmInNextStack [private]
 

Definition at line 1228 of file qregexp.cpp.

int* QRegExpEngine::mmInNextStack [private]
 

Definition at line 1166 of file qregexp3.cpp.

Referenced by matchHere(), and parse().

int QRegExpEngine::mmLen [private]
 

Definition at line 1223 of file qregexp.cpp.

Referenced by badCharMatch(), match(), matchHere(), and testAnchor().

int QRegExpEngine::mmMatchedLen [private]
 

Definition at line 1245 of file qregexp.cpp.

Referenced by match(), matchedLength(), and matchHere().

int QRegExpEngine::mmMatchLen [private]
 

Definition at line 1244 of file qregexp.cpp.

Referenced by match().

bool QRegExpEngine::mmMinimal [private]
 

Definition at line 1224 of file qregexp.cpp.

Referenced by match(), and matchHere().

int* QRegExpEngine::mmNextCapBegin [private]
 

Definition at line 1232 of file qregexp.cpp.

int* QRegExpEngine::mmNextCapBegin [private]
 

Definition at line 1170 of file qregexp3.cpp.

Referenced by matchHere(), and parse().

int* QRegExpEngine::mmNextCapEnd [private]
 

Definition at line 1234 of file qregexp.cpp.

int* QRegExpEngine::mmNextCapEnd [private]
 

Definition at line 1172 of file qregexp3.cpp.

Referenced by matchHere(), and parse().

int* QRegExpEngine::mmNextStack [private]
 

Definition at line 1230 of file qregexp.cpp.

int* QRegExpEngine::mmNextStack [private]
 

Definition at line 1168 of file qregexp3.cpp.

Referenced by matchHere(), and parse().

int QRegExpEngine::mmPos [private]
 

Definition at line 1221 of file qregexp.cpp.

Referenced by badCharMatch(), goodStringMatch(), match(), matchHere(), and testAnchor().

QIntDict<int> QRegExpEngine::mmSleeping [private]
 

Definition at line 1242 of file qregexp.cpp.

QIntDict<int> QRegExpEngine::mmSleeping [private]
 

Definition at line 1180 of file qregexp3.cpp.

Referenced by matchHere().

int* QRegExpEngine::mmSlideTab [private]
 

Definition at line 1239 of file qregexp.cpp.

int* QRegExpEngine::mmSlideTab [private]
 

Definition at line 1177 of file qregexp3.cpp.

Referenced by badCharMatch(), and parse().

int QRegExpEngine::mmSlideTabSize [private]
 

Definition at line 1240 of file qregexp.cpp.

Referenced by badCharMatch(), and parse().

const QString* QRegExpEngine::mmStr [private]
 

Definition at line 1219 of file qregexp.cpp.

const QString* QRegExpEngine::mmStr [private]
 

Definition at line 1158 of file qregexp3.cpp.

Referenced by goodStringMatch(), and match().

int* QRegExpEngine::mmTempCapBegin [private]
 

Definition at line 1235 of file qregexp.cpp.

int* QRegExpEngine::mmTempCapBegin [private]
 

Definition at line 1173 of file qregexp3.cpp.

Referenced by matchHere(), and parse().

int* QRegExpEngine::mmTempCapEnd [private]
 

Definition at line 1236 of file qregexp.cpp.

int* QRegExpEngine::mmTempCapEnd [private]
 

Definition at line 1174 of file qregexp3.cpp.

Referenced by matchHere(), and parse().

int QRegExpEngine::nbrefs [private]
 

Definition at line 1100 of file qregexp.cpp.

Referenced by createState(), parse(), setup(), and testAnchor().

int QRegExpEngine::ncap [private]
 

Definition at line 1084 of file qregexp.cpp.

Referenced by isBetterCapture(), matchHere(), parse(), setup(), and startAtom().

int QRegExpEngine::nf [private]
 

Definition at line 1080 of file qregexp.cpp.

Referenced by matchHere(), setup(), and startAtom().

int QRegExpEngine::ns [private]
 

Definition at line 1077 of file qregexp.cpp.

Referenced by parse(), setup(), and setupState().

QMemArray<int> QRegExpEngine::occ1 [private]
 

Definition at line 1111 of file qregexp.cpp.

QArray<int> QRegExpEngine::occ1 [private]
 

Definition at line 1051 of file qregexp3.cpp.

Referenced by badCharMatch(), heuristicallyChooseHeuristic(), setup(), and setupBadCharHeuristic().

int QRegExpEngine::officialncap [private]
 

Definition at line 1083 of file qregexp.cpp.

Referenced by match(), and numCaptures().

int QRegExpEngine::realncap [private]
 

Definition at line 1023 of file qregexp3.cpp.

Referenced by match(), numCaptures(), parse(), and setup().

QPtrVector<State> QRegExpEngine::s [private]
 

Definition at line 1076 of file qregexp.cpp.

QVector<State> QRegExpEngine::s [private]
 

Definition at line 1016 of file qregexp3.cpp.

Referenced by addAnchors(), addCatTransitions(), addPlusTransitions(), matchHere(), parse(), setup(), and setupState().

bool QRegExpEngine::useGoodStringHeuristic [private]
 

Definition at line 1104 of file qregexp.cpp.

Referenced by heuristicallyChooseHeuristic(), match(), and setup().

bool QRegExpEngine::valid [private]
 

Definition at line 1097 of file qregexp.cpp.

Referenced by isValid(), match(), parse(), and setup().

int QRegExpEngine::yyCh [private]
 

Definition at line 1198 of file qregexp.cpp.

Referenced by getEscape(), getRep(), getToken(), parseFactor(), skipChars(), and startTokenizer().

CharClass* QRegExpEngine::yyCharClass [private]
 

Definition at line 1199 of file qregexp.cpp.

CharClass* QRegExpEngine::yyCharClass [private]
 

Definition at line 1138 of file qregexp3.cpp.

Referenced by getEscape(), getToken(), parse(), parseAtom(), parseFactor(), and startTokenizer().

QString QRegExpEngine::yyError [private]
 

Definition at line 1202 of file qregexp.cpp.

bool QRegExpEngine::yyError [private]
 

Definition at line 1141 of file qregexp3.cpp.

Referenced by addLookahead(), createState(), error(), errorString(), getEscape(), getRep(), getToken(), parse(), parseAtom(), and startTokenizer().

const QChar* QRegExpEngine::yyIn [private]
 

Definition at line 1194 of file qregexp.cpp.

const QChar* QRegExpEngine::yyIn [private]
 

Definition at line 1133 of file qregexp3.cpp.

Referenced by getChar(), parseAtom(), parseFactor(), and startTokenizer().

int QRegExpEngine::yyLen [private]
 

Definition at line 1197 of file qregexp.cpp.

Referenced by getChar(), parseAtom(), parseFactor(), and startTokenizer().

int QRegExpEngine::yyMaxRep [private]
 

Definition at line 1201 of file qregexp.cpp.

Referenced by getToken(), parseFactor(), and startTokenizer().

bool QRegExpEngine::yyMayCapture [private]
 

Definition at line 1214 of file qregexp.cpp.

Referenced by parse(), and parseFactor().

int QRegExpEngine::yyMinRep [private]
 

Definition at line 1200 of file qregexp.cpp.

Referenced by getToken(), parseFactor(), and startTokenizer().

int QRegExpEngine::yyPos [private]
 

Definition at line 1196 of file qregexp.cpp.

Referenced by getChar(), getToken(), parseAtom(), parseFactor(), skipChars(), and startTokenizer().

int QRegExpEngine::yyPos0 [private]
 

Definition at line 1195 of file qregexp.cpp.

Referenced by getToken(), parse(), parseFactor(), and startTokenizer().

int QRegExpEngine::yyTok [private]
 

Definition at line 1213 of file qregexp.cpp.

Referenced by parse(), parseAtom(), parseExpression(), parseFactor(), and parseTerm().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:48:24 2005 for OPIE by  doxygen 1.4.2