Crossfire Server, Trunk
re-cmp.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  selection
 

Macros

#define Boolean   uchar
 
#define False   0
 
#define RE_TOKEN_MAX   64
 
#define SAFE_CHECKS
 
#define True   1
 
#define uchar   unsigned char
 

Enumerations

enum  repetetion_type { rep_once, rep_once_or_more, rep_null_or_once, rep_null_or_more }
 
enum  selection_type {
  sel_any, sel_end, sel_single, sel_range,
  sel_array, sel_not_single, sel_not_range
}
 

Detailed Description

Datastructures for representing a subset of regular expressions.

Author
Kjetil T. Homme <kjeti.nosp@m.lho@.nosp@m.ifi.u.nosp@m.io.n.nosp@m.o> May 1993

Definition in file re-cmp.h.

Macro Definition Documentation

◆ Boolean

#define Boolean   uchar

Definition at line 43 of file re-cmp.h.

◆ False

#define False   0

Definition at line 45 of file re-cmp.h.

◆ RE_TOKEN_MAX

#define RE_TOKEN_MAX   64

Max amount of tokens in a regexp. Each token uses ~264 bytes. They are allocated as needed, but never de-allocated. E.g. [A-Za-z0-9_] counts as one token, so 64 should be plenty for most purposes.

Definition at line 19 of file re-cmp.h.

◆ SAFE_CHECKS

#define SAFE_CHECKS

Regexp's with syntax errors will core dump if this is undefined.

Definition at line 15 of file re-cmp.h.

◆ True

#define True   1

Changing this value will break the code

Definition at line 44 of file re-cmp.h.

◆ uchar

#define uchar   unsigned char

Definition at line 42 of file re-cmp.h.

Enumeration Type Documentation

◆ repetetion_type

Enumerator
rep_once 

corresponds to no meta-char

rep_once_or_more 

corresponds to +

rep_null_or_once 

corresponds to eg ?

rep_null_or_more 

corresponds to eg *

Definition at line 57 of file re-cmp.h.

◆ selection_type

Enumerator
sel_any 

corresponds to eg .

sel_end 

corresponds to eg $

sel_single 

corresponds to eg q

sel_range 

corresponds to eg [A-F]

sel_array 

corresponds to eg [AF-RqO-T]

sel_not_single 

corresponds to eg [^f]

sel_not_range 

corresponds to eg [^A-F]

Definition at line 47 of file re-cmp.h.