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

qregexp.cpp File Reference

#include "qregexp.h"
#include "qmemarray.h"
#include "qbitarray.h"
#include "qcache.h"
#include "qcleanuphandler.h"
#include "qintdict.h"
#include "qmap.h"
#include "qptrvector.h"
#include "qstring.h"
#include "qtl.h"
#include <limits.h>

Include dependency graph for qregexp.cpp:

Go to the source code of this file.

Classes

class  QRegExpEngine
class  QRegExpEngine::CharClass
struct  QRegExpEngine::CharClass::Range
struct  QRegExpEngine::State
struct  QRegExpEngine::Lookahead
struct  QRegExpEngine::Atom
struct  QRegExpEngine::AnchorAlternation
class  QRegExpEngine::Box
struct  QRegExpPrivate

Defines

#define QT_TRANSLATE_NOOP(context, sourceText)   sourceText
#define RXERR_OK   QT_TRANSLATE_NOOP( "QRegExp", "no error occurred" )
#define RXERR_DISABLED   QT_TRANSLATE_NOOP( "QRegExp", "disabled feature used" )
#define RXERR_CHARCLASS   QT_TRANSLATE_NOOP( "QRegExp", "bad char class syntax" )
#define RXERR_LOOKAHEAD   QT_TRANSLATE_NOOP( "QRegExp", "bad lookahead syntax" )
#define RXERR_REPETITION   QT_TRANSLATE_NOOP( "QRegExp", "bad repetition syntax" )
#define RXERR_OCTAL   QT_TRANSLATE_NOOP( "QRegExp", "invalid octal value" )
#define RXERR_LEFTDELIM   QT_TRANSLATE_NOOP( "QRegExp", "missing left delim" )
#define RXERR_END   QT_TRANSLATE_NOOP( "QRegExp", "unexpected end" )
#define RXERR_LIMIT   QT_TRANSLATE_NOOP( "QRegExp", "met internal limit" )
#define BadChar(ch)   ( (ch).unicode() % NumBadChars )
#define YYREDO()

Functions

static bool isWord (QChar ch)
static void mergeInto (QMemArray< int > *a, const QMemArray< int > &b)
static void mergeInto (QMap< int, int > *a, const QMap< int, int > &b)
static int at (const QMap< int, int > &m, int k)
static QString wc2rx (const QString &wc_str)
static QRegExpEnginenewEngine (const QString &pattern, bool caseSensitive)
static void derefEngine (QRegExpEngine *eng, const QString &pattern)

Variables

const int NumBadChars = 64
const int NoOccurrence = INT_MAX
const int EmptyCapture = INT_MAX
const int InftyLen = INT_MAX
const int InftyRep = 1025
const int EOS = -1
static QCache< QRegExpEngine > * engineCache = 0
static QSingleCleanupHandler<
QCache< QRegExpEngine > > 
cleanup_cache


Define Documentation

#define BadChar ch   )     ( (ch).unicode() % NumBadChars )
 

Definition at line 717 of file qregexp.cpp.

#define QT_TRANSLATE_NOOP context,
sourceText   )     sourceText
 

Definition at line 57 of file qregexp.cpp.

Referenced by TimeString::shortTime().

#define RXERR_CHARCLASS   QT_TRANSLATE_NOOP( "QRegExp", "bad char class syntax" )
 

Definition at line 64 of file qregexp.cpp.

#define RXERR_DISABLED   QT_TRANSLATE_NOOP( "QRegExp", "disabled feature used" )
 

Definition at line 63 of file qregexp.cpp.

#define RXERR_END   QT_TRANSLATE_NOOP( "QRegExp", "unexpected end" )
 

Definition at line 69 of file qregexp.cpp.

#define RXERR_LEFTDELIM   QT_TRANSLATE_NOOP( "QRegExp", "missing left delim" )
 

Definition at line 68 of file qregexp.cpp.

#define RXERR_LIMIT   QT_TRANSLATE_NOOP( "QRegExp", "met internal limit" )
 

Definition at line 70 of file qregexp.cpp.

#define RXERR_LOOKAHEAD   QT_TRANSLATE_NOOP( "QRegExp", "bad lookahead syntax" )
 

Definition at line 65 of file qregexp.cpp.

#define RXERR_OCTAL   QT_TRANSLATE_NOOP( "QRegExp", "invalid octal value" )
 

Definition at line 67 of file qregexp.cpp.

#define RXERR_OK   QT_TRANSLATE_NOOP( "QRegExp", "no error occurred" )
 

Definition at line 62 of file qregexp.cpp.

Referenced by QRegExp::errorString().

#define RXERR_REPETITION   QT_TRANSLATE_NOOP( "QRegExp", "bad repetition syntax" )
 

Definition at line 66 of file qregexp.cpp.

 
#define YYREDO  ) 
 

Value:

yyIn = in, yyPos0 = pos0, yyPos = pos, yyLen = len, yyCh = ch, \
        *yyCharClass = charClass, yyMinRep = 0, yyMaxRep = 0, yyTok = tok


Function Documentation

static int at const QMap< int, int > &  m,
int  k
[static]
 

Definition at line 786 of file qregexp.cpp.

References QMap< Key, T >::end(), and QMap< Key, T >::find().

static void derefEngine QRegExpEngine eng,
const QString pattern
[static]
 

Definition at line 3221 of file qregexp.cpp.

References QShared::deref(), QString::isNull(), QString::length(), and QSingleCleanupHandler< Type >::set().

static bool isWord QChar  ch  )  [static]
 

Definition at line 725 of file qregexp.cpp.

References QChar::isLetterOrNumber().

static void mergeInto QMap< int, int > *  a,
const QMap< int, int > &  b
[static]
 

Definition at line 775 of file qregexp.cpp.

References QMap< Key, T >::begin(), and QMap< Key, T >::end().

static void mergeInto QMemArray< int > *  a,
const QMemArray< int > &  b
[static]
 

Definition at line 733 of file qregexp.cpp.

References QMemArray< type >::copy(), QMemArray< type >::data(), i, QMemArray< type >::resize(), and QMemArray< type >::size().

static QRegExpEngine* newEngine const QString pattern,
bool  caseSensitive
[static]
 

Definition at line 3201 of file qregexp.cpp.

References QRegExpEngine::caseSensitive(), and QShared::ref().

static QString wc2rx const QString wc_str  )  [static]
 

Definition at line 800 of file qregexp.cpp.

References QString::fromLatin1(), i, QString::length(), QChar::unicode(), and QString::unicode().


Variable Documentation

QSingleCleanupHandler<QCache<QRegExpEngine> > cleanup_cache [static]
 

Definition at line 3198 of file qregexp.cpp.

const int EmptyCapture = INT_MAX
 

Definition at line 720 of file qregexp.cpp.

QCache<QRegExpEngine>* engineCache = 0 [static]
 

Definition at line 3197 of file qregexp.cpp.

const int EOS = -1
 

Definition at line 723 of file qregexp.cpp.

const int InftyLen = INT_MAX
 

Definition at line 721 of file qregexp.cpp.

const int InftyRep = 1025
 

Definition at line 722 of file qregexp.cpp.

const int NoOccurrence = INT_MAX
 

Definition at line 719 of file qregexp.cpp.

const int NumBadChars = 64
 

Definition at line 716 of file qregexp.cpp.


Generated on Sat Nov 5 17:24:54 2005 for OPIE by  doxygen 1.4.2