OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
regexp.cpp File Reference
#include <owl/pch.h>
#include <owl/defs.h>
#include <algorithm>
#include <owl/private/regexp.h>

Go to the source code of this file.

Namespaces

namespace  owl
 Object Windows Library (OWLNext Core).

Macros

#define BOL   _T('^')
#define EOL   _T('$')
#define ANY   _T('.')
#define CCL   _T('[')
#define CCLEND   _T(']')
#define NCCL   _T('^')
#define CLOSURE   _T('*')
#define PCLOSE   _T('+')
#define OPT   _T('?')
#define IS_ACTION(x)
#define MAPSIZE   16
#define ADVANCE(pat)
#define SETBIT(b, map)
#define TSTBIT(b, map)
#define E_NONE   0
#define E_ILLEGAL   1
#define E_NOMEM   2
#define E_PAT   3
#define ISHEXDIGIT(x)
#define ISOCTDIGIT(x)

Typedefs

typedef utchar owl::PatternType
typedef _TUCHAR owl::pattern

Enumerations

enum  owl::action { owl::M_BOL = (0x80 | _T('^')) , owl::M_EOL = (0x80 | _T('$')) , owl::M_ANY = (0x80 | _T('.')) , owl::M_CCL = (0x80 | _T('[')) , owl::M_OPT = (0x80 | _T('?')) , owl::M_CLOSE = (0x80 | _T('*')) , owl::M_PCLOSE = (0x80 | _T('+')) }

Functions

int owl::makepat (const tchar *exp, PatternType *pat, size_t maxpattern)
const tchar * owl::matchs (const tchar *str, const PatternType *pat, tchar **startpat)
const tchar * owl::patcmp (const tchar *, const pattern *, const tchar *)
int owl::esc (const tchar **)

Macro Definition Documentation

◆ ADVANCE

#define ADVANCE ( pat)
Value:
(pat += (*pat == (pattern)M_CCL) ? (MAPSIZE+1) : 1)
#define MAPSIZE
Definition regexp.cpp:151

Definition at line 161 of file regexp.cpp.

◆ ANY

#define ANY   _T('.')

Definition at line 123 of file regexp.cpp.

◆ BOL

#define BOL   _T('^')

Definition at line 121 of file regexp.cpp.

◆ CCL

#define CCL   _T('[')

Definition at line 124 of file regexp.cpp.

◆ CCLEND

#define CCLEND   _T(']')

Definition at line 125 of file regexp.cpp.

◆ CLOSURE

#define CLOSURE   _T('*')

Definition at line 127 of file regexp.cpp.

◆ E_ILLEGAL

#define E_ILLEGAL   1

Definition at line 172 of file regexp.cpp.

◆ E_NOMEM

#define E_NOMEM   2

Definition at line 173 of file regexp.cpp.

◆ E_NONE

#define E_NONE   0

Definition at line 171 of file regexp.cpp.

◆ E_PAT

#define E_PAT   3

Definition at line 174 of file regexp.cpp.

◆ EOL

#define EOL   _T('$')

Definition at line 122 of file regexp.cpp.

◆ IS_ACTION

#define IS_ACTION ( x)
Value:
((x)&0x80)

Definition at line 147 of file regexp.cpp.

◆ ISHEXDIGIT

#define ISHEXDIGIT ( x)
Value:
(_istdigit(x) \
|| (_T('a')<=(x) && (x)<=_T('f')) \
|| (_T('A')<=(x) && (x)<=_T('F')) )
#define _istdigit
Definition cygwin.h:70
#define _T(x)
Definition cygwin.h:51

Definition at line 525 of file regexp.cpp.

◆ ISOCTDIGIT

#define ISOCTDIGIT ( x)
Value:
(_T('0')<=(x) && (x)<=_T('7'))

Definition at line 529 of file regexp.cpp.

◆ MAPSIZE

#define MAPSIZE   16

Definition at line 151 of file regexp.cpp.

◆ NCCL

#define NCCL   _T('^')

Definition at line 126 of file regexp.cpp.

◆ OPT

#define OPT   _T('?')

Definition at line 129 of file regexp.cpp.

◆ PCLOSE

#define PCLOSE   _T('+')

Definition at line 128 of file regexp.cpp.

◆ SETBIT

#define SETBIT ( b,
map )
Value:
((map)[((b) & 0x7f) >>3] |= pattern(1 << ((b) & 0x07)) )

Definition at line 168 of file regexp.cpp.

◆ TSTBIT

#define TSTBIT ( b,
map )
Value:
((map)[((b) & 0x7f) >>3] & (1<< ((b) & 0x07)) )

Definition at line 169 of file regexp.cpp.