Annotation of parser3/src/lib/pcre/pa_pcre_internal.h, revision 1.3

1.1       moko        1: /* Some internal stuff from PCRE library */
                      2: /* Author: Sergey B Kirpichev <skirpichev@gmail.com> */
                      3: 
                      4: /* Bit definitions for entries in the pcre_ctypes table. */
                      5: 
                      6: #define ctype_space   0x01
                      7: #define ctype_letter  0x02
                      8: #define ctype_digit   0x04
                      9: #define ctype_xdigit  0x08
                     10: #define ctype_word    0x10   /* alphanumeric or '_' */
                     11: #define ctype_meta    0x80   /* regexp meta char or zero (end pattern) */
                     12: 
                     13: /* Offsets for the bitmap tables in pcre_cbits. Each table contains a set
                     14:    of bits for a class map. Some classes are built by combining these tables. */
                     15: 
                     16: #define cbit_space     0      /* [:space:] or \s */
                     17: #define cbit_xdigit   32      /* [:xdigit:] */
                     18: #define cbit_digit    64      /* [:digit:] or \d */
                     19: #define cbit_upper    96      /* [:upper:] */
                     20: #define cbit_lower   128      /* [:lower:] */
                     21: #define cbit_word    160      /* [:word:] or \w */
                     22: #define cbit_graph   192      /* [:graph:] */
                     23: #define cbit_print   224      /* [:print:] */
                     24: #define cbit_punct   256      /* [:punct:] */
                     25: #define cbit_cntrl   288      /* [:cntrl:] */
                     26: #define cbit_length  320      /* Length of the cbits table */
                     27: 
                     28: /* Offsets of the various tables from the base tables pointer, and total length. */
                     29: 
                     30: #define lcc_offset      0
                     31: #define fcc_offset    256
                     32: #define cbits_offset  512
                     33: #define ctypes_offset (cbits_offset + cbit_length)
                     34: #define tables_length (ctypes_offset + 256)
                     35: 
1.2       moko       36: /* Internal shared data tables. The data for these tables is in the
1.3     ! moko       37: pa_pcre_chartables.c module. */
1.1       moko       38: 
                     39: #ifdef __cplusplus
1.3     ! moko       40:        extern "C" const unsigned char pa_pcre_default_tables[];
1.1       moko       41: #else
1.3     ! moko       42:        extern const unsigned char pa_pcre_default_tables[];
1.1       moko       43: #endif
1.2       moko       44: 
                     45: /* Internal function for validating UTF-8 character strings. The code
                     46: for this function is in the pcre_valid_utf8.c module. */
                     47: 
                     48: #ifdef __cplusplus
1.3     ! moko       49:     extern "C" int pa_pcre_valid_utf(unsigned char *string, int length, int *erroroffset);
1.2       moko       50: #else
1.3     ! moko       51:     extern int pa_pcre_valid_utf(unsigned char *string, int length, int *erroroffset);
1.2       moko       52: #endif
                     53: 

E-mail: