@@ -7,7 +7,14 @@ program. It contains character tables that are used when no external
7
7
tables are passed to PCRE2 by the application that calls it. The tables
8
8
are used only for characters whose code values are less than 256. */
9
9
10
- /* The following #includes are present because without them gcc 4.x may remove
10
+ /*The dftables program (which is distributed with PCRE2) can be used to
11
+ build alternative versions of this file. This is necessary if you are
12
+ running in an EBCDIC environment, or if you want to default to a different
13
+ encoding, for example ISO-8859-1. When dftables is run, it creates these
14
+ tables in the current locale. This happens automatically if PCRE2 is
15
+ configured with --enable-rebuild-chartables. */
16
+
17
+ /* The following #include is present because without it gcc 4.x may remove
11
18
the array definition from the final binary if PCRE2 is built into a static
12
19
library and dead code stripping is activated. This leads to link errors.
13
20
Pulling in the header ensures that the array gets flagged as "someone
@@ -92,11 +99,10 @@ const uint8_t PRIV(default_tables)[] = {
92
99
240 ,241 ,242 ,243 ,244 ,245 ,246 ,247 ,
93
100
248 ,249 ,250 ,251 ,252 ,253 ,254 ,255 ,
94
101
95
- /* This table contains bit maps for various character classes.
96
- Each map is 32 bytes long and the bits run from the least
97
- significant end of each byte. The classes that have their own
98
- maps are: space, xdigit, digit, upper, lower, word, graph
99
- print, punct, and cntrl. Other classes are built from combinations. */
102
+ /* This table contains bit maps for various character classes. Each map is 32
103
+ bytes long and the bits run from the least significant end of each byte. The
104
+ classes that have their own maps are: space, xdigit, digit, upper, lower, word,
105
+ graph print, punct, and cntrl. Other classes are built from combinations. */
100
106
101
107
0x00 ,0x3e ,0x00 ,0x00 ,0x01 ,0x00 ,0x00 ,0x00 ,
102
108
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
@@ -151,28 +157,27 @@ print, punct, and cntrl. Other classes are built from combinations. */
151
157
/* This table identifies various classes of character by individual bits:
152
158
0x01 white space character
153
159
0x02 letter
154
- 0x04 decimal digit
155
- 0x08 hexadecimal digit
160
+ 0x04 lower case letter
161
+ 0x08 decimal digit
156
162
0x10 alphanumeric or '_'
157
- 0x80 regular expression metacharacter or binary zero
158
163
*/
159
164
160
- 0x80 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , /* 0- 7 */
165
+ 0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , /* 0- 7 */
161
166
0x00 ,0x01 ,0x01 ,0x01 ,0x01 ,0x01 ,0x00 ,0x00 , /* 8- 15 */
162
167
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , /* 16- 23 */
163
168
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , /* 24- 31 */
164
- 0x01 ,0x00 ,0x00 ,0x00 ,0x80 ,0x00 ,0x00 ,0x00 , /* - ' */
165
- 0x80 , 0x80 , 0x80 , 0x80 ,0x00 ,0x00 ,0x80 ,0x00 , /* ( - / */
166
- 0x1c , 0x1c , 0x1c , 0x1c , 0x1c , 0x1c , 0x1c , 0x1c , /* 0 - 7 */
167
- 0x1c , 0x1c ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x80 , /* 8 - ? */
168
- 0x00 ,0x1a , 0x1a , 0x1a , 0x1a , 0x1a , 0x1a ,0x12 , /* @ - G */
169
+ 0x01 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , /* - ' */
170
+ 0x00 , 0x00 , 0x00 , 0x00 ,0x00 ,0x00 ,0x00 ,0x00 , /* ( - / */
171
+ 0x18 , 0x18 , 0x18 , 0x18 , 0x18 , 0x18 , 0x18 , 0x18 , /* 0 - 7 */
172
+ 0x18 , 0x18 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , /* 8 - ? */
173
+ 0x00 ,0x12 , 0x12 , 0x12 , 0x12 , 0x12 , 0x12 ,0x12 , /* @ - G */
169
174
0x12 ,0x12 ,0x12 ,0x12 ,0x12 ,0x12 ,0x12 ,0x12 , /* H - O */
170
175
0x12 ,0x12 ,0x12 ,0x12 ,0x12 ,0x12 ,0x12 ,0x12 , /* P - W */
171
- 0x12 ,0x12 ,0x12 ,0x80 , 0x80 ,0x00 ,0x80 ,0x10 , /* X - _ */
172
- 0x00 ,0x1a , 0x1a , 0x1a , 0x1a , 0x1a , 0x1a , 0x12 , /* ` - g */
173
- 0x12 , 0x12 , 0x12 , 0x12 , 0x12 , 0x12 , 0x12 , 0x12 , /* h - o */
174
- 0x12 , 0x12 , 0x12 , 0x12 , 0x12 , 0x12 , 0x12 , 0x12 , /* p - w */
175
- 0x12 , 0x12 , 0x12 , 0x80 , 0x80 ,0x00 ,0x00 ,0x00 , /* x -127 */
176
+ 0x12 ,0x12 ,0x12 ,0x00 , 0x00 ,0x00 ,0x00 ,0x10 , /* X - _ */
177
+ 0x00 ,0x16 , 0x16 , 0x16 , 0x16 , 0x16 , 0x16 , 0x16 , /* ` - g */
178
+ 0x16 , 0x16 , 0x16 , 0x16 , 0x16 , 0x16 , 0x16 , 0x16 , /* h - o */
179
+ 0x16 , 0x16 , 0x16 , 0x16 , 0x16 , 0x16 , 0x16 , 0x16 , /* p - w */
180
+ 0x16 , 0x16 , 0x16 , 0x00 , 0x00 ,0x00 ,0x00 ,0x00 , /* x -127 */
176
181
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , /* 128-135 */
177
182
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , /* 136-143 */
178
183
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 , /* 144-151 */
0 commit comments