• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

src/pcre/pcre_chartables.c

00001 /*************************************************
00002 *      Perl-Compatible Regular Expressions       *
00003 *************************************************/
00004 
00005 /* This file contains character tables that are used when no external tables
00006 are passed to PCRE by the application that calls it. The tables are used only
00007 for characters whose code values are less than 256.
00008 
00009 This is a default version of the tables that assumes ASCII encoding. A program
00010 called dftables (which is distributed with PCRE) can be used to build
00011 alternative versions of this file. This is necessary if you are running in an
00012 EBCDIC environment, or if you want to default to a different encoding, for
00013 example ISO-8859-1. When dftables is run, it creates these tables in the
00014 current locale. If PCRE is configured with --enable-rebuild-chartables, this
00015 happens automatically.
00016 
00017 The following #includes are present because without the gcc 4.x may remove the
00018 array definition from the final binary if PCRE is built into a static library
00019 and dead code stripping is activated. This leads to link errors. Pulling in the
00020 header ensures that the array gets flagged as "someone outside this compilation
00021 unit might reference this" and so it will always be supplied to the linker. */
00022 
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #else if defined(_WINDOWS)
00026 #include <spl/configwin32.h>
00027 #endif
00028 
00029 #include "pcre_internal.h"
00030 
00031 const unsigned char _pcre_default_tables[] = {
00032 
00033 /* This table is a lower casing table. */
00034 
00035     0,  1,  2,  3,  4,  5,  6,  7,
00036     8,  9, 10, 11, 12, 13, 14, 15,
00037    16, 17, 18, 19, 20, 21, 22, 23,
00038    24, 25, 26, 27, 28, 29, 30, 31,
00039    32, 33, 34, 35, 36, 37, 38, 39,
00040    40, 41, 42, 43, 44, 45, 46, 47,
00041    48, 49, 50, 51, 52, 53, 54, 55,
00042    56, 57, 58, 59, 60, 61, 62, 63,
00043    64, 97, 98, 99,100,101,102,103,
00044   104,105,106,107,108,109,110,111,
00045   112,113,114,115,116,117,118,119,
00046   120,121,122, 91, 92, 93, 94, 95,
00047    96, 97, 98, 99,100,101,102,103,
00048   104,105,106,107,108,109,110,111,
00049   112,113,114,115,116,117,118,119,
00050   120,121,122,123,124,125,126,127,
00051   128,129,130,131,132,133,134,135,
00052   136,137,138,139,140,141,142,143,
00053   144,145,146,147,148,149,150,151,
00054   152,153,154,155,156,157,158,159,
00055   160,161,162,163,164,165,166,167,
00056   168,169,170,171,172,173,174,175,
00057   176,177,178,179,180,181,182,183,
00058   184,185,186,187,188,189,190,191,
00059   192,193,194,195,196,197,198,199,
00060   200,201,202,203,204,205,206,207,
00061   208,209,210,211,212,213,214,215,
00062   216,217,218,219,220,221,222,223,
00063   224,225,226,227,228,229,230,231,
00064   232,233,234,235,236,237,238,239,
00065   240,241,242,243,244,245,246,247,
00066   248,249,250,251,252,253,254,255,
00067 
00068 /* This table is a case flipping table. */
00069 
00070     0,  1,  2,  3,  4,  5,  6,  7,
00071     8,  9, 10, 11, 12, 13, 14, 15,
00072    16, 17, 18, 19, 20, 21, 22, 23,
00073    24, 25, 26, 27, 28, 29, 30, 31,
00074    32, 33, 34, 35, 36, 37, 38, 39,
00075    40, 41, 42, 43, 44, 45, 46, 47,
00076    48, 49, 50, 51, 52, 53, 54, 55,
00077    56, 57, 58, 59, 60, 61, 62, 63,
00078    64, 97, 98, 99,100,101,102,103,
00079   104,105,106,107,108,109,110,111,
00080   112,113,114,115,116,117,118,119,
00081   120,121,122, 91, 92, 93, 94, 95,
00082    96, 65, 66, 67, 68, 69, 70, 71,
00083    72, 73, 74, 75, 76, 77, 78, 79,
00084    80, 81, 82, 83, 84, 85, 86, 87,
00085    88, 89, 90,123,124,125,126,127,
00086   128,129,130,131,132,133,134,135,
00087   136,137,138,139,140,141,142,143,
00088   144,145,146,147,148,149,150,151,
00089   152,153,154,155,156,157,158,159,
00090   160,161,162,163,164,165,166,167,
00091   168,169,170,171,172,173,174,175,
00092   176,177,178,179,180,181,182,183,
00093   184,185,186,187,188,189,190,191,
00094   192,193,194,195,196,197,198,199,
00095   200,201,202,203,204,205,206,207,
00096   208,209,210,211,212,213,214,215,
00097   216,217,218,219,220,221,222,223,
00098   224,225,226,227,228,229,230,231,
00099   232,233,234,235,236,237,238,239,
00100   240,241,242,243,244,245,246,247,
00101   248,249,250,251,252,253,254,255,
00102 
00103 /* This table contains bit maps for various character classes. Each map is 32
00104 bytes long and the bits run from the least significant end of each byte. The
00105 classes that have their own maps are: space, xdigit, digit, upper, lower, word,
00106 graph, print, punct, and cntrl. Other classes are built from combinations. */
00107 
00108   0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00,
00109   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00110   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00111   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00112 
00113   0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
00114   0x7e,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,
00115   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00116   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00117 
00118   0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
00119   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00120   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00121   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00122 
00123   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00124   0xfe,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
00125   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00126   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00127 
00128   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00129   0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,
00130   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00131   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00132 
00133   0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
00134   0xfe,0xff,0xff,0x87,0xfe,0xff,0xff,0x07,
00135   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00136   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00137 
00138   0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
00139   0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
00140   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00141   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00142 
00143   0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
00144   0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
00145   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00146   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00147 
00148   0x00,0x00,0x00,0x00,0xfe,0xff,0x00,0xfc,
00149   0x01,0x00,0x00,0xf8,0x01,0x00,0x00,0x78,
00150   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00151   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00152 
00153   0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,
00154   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
00155   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00156   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
00157 
00158 /* This table identifies various classes of character by individual bits:
00159   0x01   white space character
00160   0x02   letter
00161   0x04   decimal digit
00162   0x08   hexadecimal digit
00163   0x10   alphanumeric or '_'
00164   0x80   regular expression metacharacter or binary zero
00165 */
00166 
00167   0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*   0-  7 */
00168   0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00, /*   8- 15 */
00169   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  16- 23 */
00170   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  24- 31 */
00171   0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /*    - '  */
00172   0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x00, /*  ( - /  */
00173   0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /*  0 - 7  */
00174   0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x80, /*  8 - ?  */
00175   0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /*  @ - G  */
00176   0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  H - O  */
00177   0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  P - W  */
00178   0x12,0x12,0x12,0x80,0x80,0x00,0x80,0x10, /*  X - _  */
00179   0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /*  ` - g  */
00180   0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  h - o  */
00181   0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  p - w  */
00182   0x12,0x12,0x12,0x80,0x80,0x00,0x00,0x00, /*  x -127 */
00183   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */
00184   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */
00185   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */
00186   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 152-159 */
00187   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160-167 */
00188   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 168-175 */
00189   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 176-183 */
00190   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */
00191   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 192-199 */
00192   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 200-207 */
00193   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 208-215 */
00194   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 216-223 */
00195   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 224-231 */
00196   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 232-239 */
00197   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */
00198   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */
00199 
00200 /* End of pcre_chartables.c */