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