/[pcre]/code/branches/pcre16/pcre_internal.h
ViewVC logotype

Diff of /code/branches/pcre16/pcre_internal.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 268 by ph10, Thu Nov 15 10:28:09 2007 UTC revision 335 by ph10, Sat Apr 12 14:36:14 2008 UTC
# Line 7  Line 7 
7  and semantics are as close as possible to those of the Perl 5 language.  and semantics are as close as possible to those of the Perl 5 language.
8    
9                         Written by Philip Hazel                         Written by Philip Hazel
10             Copyright (c) 1997-2007 University of Cambridge             Copyright (c) 1997-2008 University of Cambridge
11    
12  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
13  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 363  never be called in byte mode. To make su Line 363  never be called in byte mode. To make su
363  support is omitted, we don't even define it. */  support is omitted, we don't even define it. */
364    
365  #ifndef SUPPORT_UTF8  #ifndef SUPPORT_UTF8
366    #define NEXTCHAR(p) p++;
367  #define GETCHAR(c, eptr) c = *eptr;  #define GETCHAR(c, eptr) c = *eptr;
368  #define GETCHARTEST(c, eptr) c = *eptr;  #define GETCHARTEST(c, eptr) c = *eptr;
369  #define GETCHARINC(c, eptr) c = *eptr++;  #define GETCHARINC(c, eptr) c = *eptr++;
# Line 372  support is omitted, we don't even define Line 373  support is omitted, we don't even define
373    
374  #else   /* SUPPORT_UTF8 */  #else   /* SUPPORT_UTF8 */
375    
376    /* Advance a character pointer one byte in non-UTF-8 mode and by one character
377    in UTF-8 mode. */
378    
379    #define NEXTCHAR(p) \
380      p++; \
381      if (utf8) { while((*p & 0xc0) == 0x80) p++; }
382    
383  /* Get the next UTF-8 character, not advancing the pointer. This is called when  /* Get the next UTF-8 character, not advancing the pointer. This is called when
384  we know we are in UTF-8 mode. */  we know we are in UTF-8 mode. */
385    
# Line 605  character, that code will have to change Line 613  character, that code will have to change
613    
614  enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s,  enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s,
615         ESC_W, ESC_w, ESC_dum1, ESC_C, ESC_P, ESC_p, ESC_R, ESC_H, ESC_h,         ESC_W, ESC_w, ESC_dum1, ESC_C, ESC_P, ESC_p, ESC_R, ESC_H, ESC_h,
616         ESC_V, ESC_v, ESC_X, ESC_Z, ESC_z, ESC_E, ESC_Q, ESC_k, ESC_REF };         ESC_V, ESC_v, ESC_X, ESC_Z, ESC_z, ESC_E, ESC_Q, ESC_g, ESC_k, ESC_REF };
617    
618    
619  /* Opcode table: Starting from 1 (i.e. after OP_END), the values up to  /* Opcode table: Starting from 1 (i.e. after OP_END), the values up to
# Line 765  enum { Line 773  enum {
773    /* These are forced failure and success verbs */    /* These are forced failure and success verbs */
774    
775    OP_FAIL,           /* 108 */    OP_FAIL,           /* 108 */
776    OP_ACCEPT          /* 109 */    OP_ACCEPT,         /* 109 */
777    
778      /* This is used to skip a subpattern with a {0} quantifier */
779    
780      OP_SKIPZERO        /* 110 */
781  };  };
782    
783    
# Line 790  for debugging. The macro is referenced o Line 802  for debugging. The macro is referenced o
802    "AssertB", "AssertB not", "Reverse",                            \    "AssertB", "AssertB not", "Reverse",                            \
803    "Once", "Bra", "CBra", "Cond", "SBra", "SCBra", "SCond",        \    "Once", "Bra", "CBra", "Cond", "SBra", "SCBra", "SCond",        \
804    "Cond ref", "Cond rec", "Cond def", "Brazero", "Braminzero",    \    "Cond ref", "Cond rec", "Cond def", "Brazero", "Braminzero",    \
805    "*PRUNE", "*SKIP", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT"    "*PRUNE", "*SKIP", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT",      \
806      "Skip zero"
807    
808    
809  /* This macro defines the length of fixed length operations in the compiled  /* This macro defines the length of fixed length operations in the compiled
# Line 855  in UTF-8 mode. The code that uses this t Line 868  in UTF-8 mode. The code that uses this t
868    1,                             /* DEF                                    */ \    1,                             /* DEF                                    */ \
869    1, 1,                          /* BRAZERO, BRAMINZERO                    */ \    1, 1,                          /* BRAZERO, BRAMINZERO                    */ \
870    1, 1, 1, 1,                    /* PRUNE, SKIP, THEN, COMMIT,             */ \    1, 1, 1, 1,                    /* PRUNE, SKIP, THEN, COMMIT,             */ \
871    1, 1                           /* FAIL, ACCEPT                           */    1, 1, 1                        /* FAIL, ACCEPT, SKIPZERO                 */
872    
873    
874  /* A magic value for OP_RREF to indicate the "any recursion" condition. */  /* A magic value for OP_RREF to indicate the "any recursion" condition. */
# Line 871  enum { ERR0,  ERR1,  ERR2,  ERR3,  ERR4, Line 884  enum { ERR0,  ERR1,  ERR2,  ERR3,  ERR4,
884         ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39,         ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39,
885         ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,         ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,
886         ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,         ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
887         ERR60, ERR61, ERR62 };         ERR60, ERR61, ERR62, ERR63 };
888    
889  /* The real format of the start of the pcre block; the index of names and the  /* The real format of the start of the pcre block; the index of names and the
890  code vector run on as long as necessary after the end. We store an explicit  code vector run on as long as necessary after the end. We store an explicit
# Line 934  typedef struct compile_data { Line 947  typedef struct compile_data {
947    uschar *name_table;           /* The name/number table */    uschar *name_table;           /* The name/number table */
948    int  names_found;             /* Number of entries so far */    int  names_found;             /* Number of entries so far */
949    int  name_entry_size;         /* Size of each entry */    int  name_entry_size;         /* Size of each entry */
950    int  bracount;                /* Count of capturing parens */    int  bracount;                /* Count of capturing parens as we compile */
951      int  final_bracount;          /* Saved value after first pass */
952    int  top_backref;             /* Maximum back reference */    int  top_backref;             /* Maximum back reference */
953    unsigned int backref_map;     /* Bitmap of low back refs */    unsigned int backref_map;     /* Bitmap of low back refs */
954    int  external_options;        /* External (initial) options */    int  external_options;        /* External (initial) options */
# Line 1036  typedef struct dfa_match_data { Line 1050  typedef struct dfa_match_data {
1050  #define ctype_letter  0x02  #define ctype_letter  0x02
1051  #define ctype_digit   0x04  #define ctype_digit   0x04
1052  #define ctype_xdigit  0x08  #define ctype_xdigit  0x08
1053  #define ctype_word    0x10   /* alphameric or '_' */  #define ctype_word    0x10   /* alphanumeric or '_' */
1054  #define ctype_meta    0x80   /* regexp meta char or zero (end pattern) */  #define ctype_meta    0x80   /* regexp meta char or zero (end pattern) */
1055    
1056  /* Offsets for the bitmap tables in pcre_cbits. Each table contains a set  /* Offsets for the bitmap tables in pcre_cbits. Each table contains a set

Legend:
Removed from v.268  
changed lines
  Added in v.335

  ViewVC Help
Powered by ViewVC 1.1.5