diff options
Diffstat (limited to 'tqtinterface/qt4/src/tools/tqregexp.cpp')
-rw-r--r-- | tqtinterface/qt4/src/tools/tqregexp.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tqtinterface/qt4/src/tools/tqregexp.cpp b/tqtinterface/qt4/src/tools/tqregexp.cpp index 5f73872..7a7f1ab 100644 --- a/tqtinterface/qt4/src/tools/tqregexp.cpp +++ b/tqtinterface/qt4/src/tools/tqregexp.cpp @@ -1074,7 +1074,7 @@ private: */ struct Atom { - int tqparent; // index of tqparent in array of atoms + int parent; // index of parent in array of atoms int capture; // index of capture, from 1 to ncap }; #endif @@ -1111,7 +1111,7 @@ private: ( (Anchor_FirstLookahead << MaxLookaheads) - 1 ) }; #ifndef TQT_NO_REGEXP_CAPTURE int startAtom( bool capture ); - void finishAtom( int atom ) { cf = f[atom].tqparent; } + void finishAtom( int atom ) { cf = f[atom].parent; } #endif #ifndef TQT_NO_REGEXP_LOOKAHEAD @@ -1605,7 +1605,7 @@ void TQRegExpEngine::dump() const if ( nf > 0 ) { qDebug( " Atom Parent Capture" ); for ( i = 0; i < nf; i++ ) - qDebug( " %6d %6d %6d", i, f[i].tqparent, f[i].capture ); + qDebug( " %6d %6d %6d", i, f[i].parent, f[i].capture ); } #endif #ifndef TQT_NO_REGEXP_ANCHOR_ALT @@ -1672,7 +1672,7 @@ int TQRegExpEngine::startAtom( bool capture ) { if ( (nf & (nf + 1)) == 0 && nf + 1 >= (int) f.size() ) f.resize( (nf + 1) << 1 ); - f[nf].tqparent = cf; + f[nf].parent = cf; cf = nf++; f[cf].capture = capture ? ncap++ : -1; return cf; @@ -2059,11 +2059,11 @@ bool TQRegExpEngine::matchHere() /* Lemma 1. For any x in the range [0..nf), we - have f[x].tqparent < x. + have f[x].parent < x. Proof. By looking at startAtom(), it is clear that cf < nf holds all the time, and - thus that f[nf].tqparent < nf. + thus that f[nf].parent < nf. */ /* @@ -2076,7 +2076,7 @@ bool TQRegExpEngine::matchHere() b.fill( FALSE, nf ); b.setBit( q, TRUE ); for ( int ell = q + 1; ell < nf; ell++ ) { - if ( b.testBit(f[ell].tqparent) ) { + if ( b.testBit(f[ell].parent) ) { b.setBit( ell, TRUE ); cap = f[ell].capture; if ( cap >= 0 ) { @@ -2085,15 +2085,15 @@ bool TQRegExpEngine::matchHere() } } } - p = f[q].tqparent; + p = f[q].parent; /* Otherwise, close the capture zones we are leaving. We are leaving f[c].capture, - f[f[c].tqparent].capture, - f[f[f[c].tqparent].tqparent].capture, ..., + f[f[c].parent].capture, + f[f[f[c].parent].parent].capture, ..., until f[x].capture, with x such that - f[x].tqparent is the youngest common ancestor + f[x].parent is the youngest common ancestor for c and n. We go up along c's and n's ancestry until @@ -2113,9 +2113,9 @@ bool TQRegExpEngine::matchHere() capEnd[cap] = i; } } - p = f[p].tqparent; + p = f[p].parent; } else { - q = f[q].tqparent; + q = f[q].parent; } } } @@ -2123,7 +2123,7 @@ bool TQRegExpEngine::matchHere() /* In any case, we now open the capture zones we are entering. We work upwards from n - until we reach p (the tqparent of the atom we + until we reach p (the parent of the atom we reenter or the youngest common ancestor). */ while ( n > p ) { @@ -2132,7 +2132,7 @@ bool TQRegExpEngine::matchHere() capBegin[cap] = i; capEnd[cap] = EmptyCapture; } - n = f[n].tqparent; + n = f[n].parent; } /* If the next state was already in |