Crossfire Server, Branches 1.12  R18729
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

#define Boolean   uchar

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

Referenced by re_cmp(), re_cmp_step(), and re_get_token().

#define False   0

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

Referenced by re_cmp(), re_cmp_step(), re_get_token(), and re_match_token().

#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 21 of file re-cmp.h.

Referenced by re_init().

#define SAFE_CHECKS

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

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

#define True   1

Changing this value will break the code

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

Referenced by re_cmp(), re_cmp_step(), re_get_token(), re_init(), and re_match_token().

#define uchar   unsigned char

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

Referenced by CREPixmap::getIcon(), and re_get_token().

Enumeration Type Documentation

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 64 of file re-cmp.h.

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 54 of file re-cmp.h.