Crossfire Server, Branch 1.12  R12190
Data Structures | Defines | Enumerations
re-cmp.h File Reference

Datastructures for representing a subset of regular expressions. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  selection

Defines

#define Boolean   uchar
#define False   0
#define RE_TOKEN_MAX   64
 Max amount of tokens in a regexp.
#define SAFE_CHECKS
 Regexp's with syntax errors will core dump if this is undefined.
#define True   1
 Changing this value will break the code.
#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 <kjetilho@ifi.uio.no> May 1993

Definition in file re-cmp.h.


Define Documentation

#define Boolean   uchar

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

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

#define False   0

Definition at line 45 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 19 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 44 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 42 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 57 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 47 of file re-cmp.h.