1 /*************************************************
2 *      Perl-Compatible Regular Expressions       *
3 *************************************************/
4 
5 /* This file was automatically written by the pcre2_dftables auxiliary
6 program. It contains character tables that are used when no external
7 tables are passed to PCRE2 by the application that calls it. The tables
8 are used only for characters whose code values are less than 256, and
9 only relevant if not in UCP mode. */
10 
11 /* This set of tables was written in the C locale. */
12 
13 /* The pcre2_ftables program (which is distributed with PCRE2) can be used
14 to build alternative versions of this file. This is necessary if you are
15 running in an EBCDIC environment, or if you want to default to a different
16 encoding, for example ISO-8859-1. When pcre2_dftables is run, it creates
17 these tables in the "C" locale by default. This happens automatically if
18 PCRE2 is configured with --enable-rebuild-chartables. However, you can run
19 pcre2_dftables manually with the -L option to build tables using the LC_ALL
20 locale. */
21 
22 #ifdef HAVE_CONFIG_H
23 #include "config.h"
24 #endif
25 
26 #include "pcre2_internal.h"
27 
28 const uint8_t PRIV(default_tables)[] = {
29 
30 /* This table is a lower casing table. */
31 
32     0,  1,  2,  3,  4,  5,  6,  7,
33     8,  9, 10, 11, 12, 13, 14, 15,
34    16, 17, 18, 19, 20, 21, 22, 23,
35    24, 25, 26, 27, 28, 29, 30, 31,
36    32, 33, 34, 35, 36, 37, 38, 39,
37    40, 41, 42, 43, 44, 45, 46, 47,
38    48, 49, 50, 51, 52, 53, 54, 55,
39    56, 57, 58, 59, 60, 61, 62, 63,
40    64, 97, 98, 99,100,101,102,103,
41   104,105,106,107,108,109,110,111,
42   112,113,114,115,116,117,118,119,
43   120,121,122, 91, 92, 93, 94, 95,
44    96, 97, 98, 99,100,101,102,103,
45   104,105,106,107,108,109,110,111,
46   112,113,114,115,116,117,118,119,
47   120,121,122,123,124,125,126,127,
48   128,129,130,131,132,133,134,135,
49   136,137,138,139,140,141,142,143,
50   144,145,146,147,148,149,150,151,
51   152,153,154,155,156,157,158,159,
52   160,161,162,163,164,165,166,167,
53   168,169,170,171,172,173,174,175,
54   176,177,178,179,180,181,182,183,
55   184,185,186,187,188,189,190,191,
56   192,193,194,195,196,197,198,199,
57   200,201,202,203,204,205,206,207,
58   208,209,210,211,212,213,214,215,
59   216,217,218,219,220,221,222,223,
60   224,225,226,227,228,229,230,231,
61   232,233,234,235,236,237,238,239,
62   240,241,242,243,244,245,246,247,
63   248,249,250,251,252,253,254,255,
64 
65 /* This table is a case flipping table. */
66 
67     0,  1,  2,  3,  4,  5,  6,  7,
68     8,  9, 10, 11, 12, 13, 14, 15,
69    16, 17, 18, 19, 20, 21, 22, 23,
70    24, 25, 26, 27, 28, 29, 30, 31,
71    32, 33, 34, 35, 36, 37, 38, 39,
72    40, 41, 42, 43, 44, 45, 46, 47,
73    48, 49, 50, 51, 52, 53, 54, 55,
74    56, 57, 58, 59, 60, 61, 62, 63,
75    64, 97, 98, 99,100,101,102,103,
76   104,105,106,107,108,109,110,111,
77   112,113,114,115,116,117,118,119,
78   120,121,122, 91, 92, 93, 94, 95,
79    96, 65, 66, 67, 68, 69, 70, 71,
80    72, 73, 74, 75, 76, 77, 78, 79,
81    80, 81, 82, 83, 84, 85, 86, 87,
82    88, 89, 90,123,124,125,126,127,
83   128,129,130,131,132,133,134,135,
84   136,137,138,139,140,141,142,143,
85   144,145,146,147,148,149,150,151,
86   152,153,154,155,156,157,158,159,
87   160,161,162,163,164,165,166,167,
88   168,169,170,171,172,173,174,175,
89   176,177,178,179,180,181,182,183,
90   184,185,186,187,188,189,190,191,
91   192,193,194,195,196,197,198,199,
92   200,201,202,203,204,205,206,207,
93   208,209,210,211,212,213,214,215,
94   216,217,218,219,220,221,222,223,
95   224,225,226,227,228,229,230,231,
96   232,233,234,235,236,237,238,239,
97   240,241,242,243,244,245,246,247,
98   248,249,250,251,252,253,254,255,
99 
100 /* This table contains bit maps for various character classes. Each map is 32
101 bytes long and the bits run from the least significant end of each byte. The
102 classes that have their own maps are: space, xdigit, digit, upper, lower, word,
103 graph, print, punct, and cntrl. Other classes are built from combinations. */
104 
105   0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00,  /* space */
106   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
107   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
108   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
109 
110   0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,  /* xdigit */
111   0x7e,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,
112   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
113   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
114 
115   0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,  /* digit */
116   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
117   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
118   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
119 
120   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* upper */
121   0xfe,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
122   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
123   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
124 
125   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* lower */
126   0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,
127   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
128   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
129 
130   0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,  /* word */
131   0xfe,0xff,0xff,0x87,0xfe,0xff,0xff,0x07,
132   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
133   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
134 
135   0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,  /* graph */
136   0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
137   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
138   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
139 
140   0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,  /* print */
141   0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
142   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
143   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
144 
145   0x00,0x00,0x00,0x00,0xfe,0xff,0x00,0xfc,  /* punct */
146   0x01,0x00,0x00,0xf8,0x01,0x00,0x00,0x78,
147   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
148   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
149 
150   0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,  /* cntrl */
151   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
152   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
153   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
154 
155 /* This table identifies various classes of character by individual bits:
156   0x01   white space character
157   0x02   letter
158   0x04   lower case letter
159   0x08   decimal digit
160   0x10   word (alphanumeric or '_')
161 */
162 
163   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*   0-  7 */
164   0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00, /*   8- 15 */
165   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  16- 23 */
166   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  24- 31 */
167   0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*    - '  */
168   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  ( - /  */
169   0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, /*  0 - 7  */
170   0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00, /*  8 - ?  */
171   0x00,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  @ - G  */
172   0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  H - O  */
173   0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  P - W  */
174   0x12,0x12,0x12,0x00,0x00,0x00,0x00,0x10, /*  X - _  */
175   0x00,0x16,0x16,0x16,0x16,0x16,0x16,0x16, /*  ` - g  */
176   0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16, /*  h - o  */
177   0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16, /*  p - w  */
178   0x16,0x16,0x16,0x00,0x00,0x00,0x00,0x00, /*  x -127 */
179   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */
180   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */
181   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */
182   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 152-159 */
183   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160-167 */
184   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 168-175 */
185   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 176-183 */
186   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */
187   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 192-199 */
188   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 200-207 */
189   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 208-215 */
190   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 216-223 */
191   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 224-231 */
192   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 232-239 */
193   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */
194   0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */
195 
196 /* End of pcre2_chartables.c */
197