Annotation of parser3/src/lib/pcre/pcre_internal.h, revision 1.1
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:
! 36: /* All character handling must be done as unsigned characters. Otherwise there
! 37: are problems with top-bit-set characters and functions such as isspace().
! 38: However, we leave the interface to the outside world as char *, because that
! 39: should make things easier for callers. We define a short type for unsigned char
! 40: to save lots of typing. I tried "uchar", but it causes problems on Digital
! 41: Unix, where it is defined in sys/types, so use "uschar" instead. */
! 42:
! 43: typedef unsigned char uschar;
! 44:
! 45: /* Internal shared data tables. These are tables that are used by more than one
! 46: of the exported public functions. They have to be "external" in the C sense,
! 47: but are not part of the PCRE public API. The data for these tables is in the
! 48: pcre_tables.c module. */
! 49:
! 50: extern const uschar _pcre_default_tables[];
E-mail: