6 |
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. |
7 |
|
|
8 |
Written by Philip Hazel |
Written by Philip Hazel |
9 |
Copyright (c) 1997-2005 University of Cambridge |
Copyright (c) 1997-2006 University of Cambridge |
10 |
|
|
11 |
----------------------------------------------------------------------------- |
----------------------------------------------------------------------------- |
12 |
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
39 |
|
|
40 |
|
|
41 |
/* This module contains some fixed tables that are used by more than one of the |
/* This module contains some fixed tables that are used by more than one of the |
42 |
PCRE code modules. */ |
PCRE code modules. The tables are also #included by the pcretest program, which |
43 |
|
uses macros to change their names from _pcre_xxx to xxxx, thereby avoiding name |
44 |
|
clashes with the library. */ |
45 |
|
|
46 |
|
|
47 |
#include "pcre_internal.h" |
#include "pcre_internal.h" |
48 |
|
|
49 |
|
|
50 |
/* Table of sizes for the fixed-length opcodes. It's defined in a macro so that |
/* Table of sizes for the fixed-length opcodes. It's defined in a macro so that |
51 |
the definition is next to the definition of the opcodes in internal.h. */ |
the definition is next to the definition of the opcodes in pcre_internal.h. */ |
52 |
|
|
53 |
const uschar _pcre_OP_lengths[] = { OP_LENGTHS }; |
const uschar _pcre_OP_lengths[] = { OP_LENGTHS }; |
54 |
|
|
82 |
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, |
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, |
83 |
3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 }; |
3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 }; |
84 |
|
|
85 |
/* This table translates Unicode property names into code values for the |
/* This table translates Unicode property names into type and code values. It |
86 |
ucp_findchar() function. It is used by pcretest as well as by the library |
is searched by binary chop, so must be in collating sequence of name. */ |
|
functions. */ |
|
87 |
|
|
88 |
const ucp_type_table _pcre_utt[] = { |
const ucp_type_table _pcre_utt[] = { |
89 |
{ "C", 128 + ucp_C }, |
{ "Any", PT_ANY, 0 }, |
90 |
{ "Cc", ucp_Cc }, |
{ "Arabic", PT_SC, ucp_Arabic }, |
91 |
{ "Cf", ucp_Cf }, |
{ "Armenian", PT_SC, ucp_Armenian }, |
92 |
{ "Cn", ucp_Cn }, |
{ "Bengali", PT_SC, ucp_Bengali }, |
93 |
{ "Co", ucp_Co }, |
{ "Bopomofo", PT_SC, ucp_Bopomofo }, |
94 |
{ "Cs", ucp_Cs }, |
{ "Braille", PT_SC, ucp_Braille }, |
95 |
{ "L", 128 + ucp_L }, |
{ "Buginese", PT_SC, ucp_Buginese }, |
96 |
{ "Ll", ucp_Ll }, |
{ "Buhid", PT_SC, ucp_Buhid }, |
97 |
{ "Lm", ucp_Lm }, |
{ "C", PT_GC, ucp_C }, |
98 |
{ "Lo", ucp_Lo }, |
{ "Canadian_Aboriginal", PT_SC, ucp_Canadian_Aboriginal }, |
99 |
{ "Lt", ucp_Lt }, |
{ "Cc", PT_PC, ucp_Cc }, |
100 |
{ "Lu", ucp_Lu }, |
{ "Cf", PT_PC, ucp_Cf }, |
101 |
{ "M", 128 + ucp_M }, |
{ "Cherokee", PT_SC, ucp_Cherokee }, |
102 |
{ "Mc", ucp_Mc }, |
{ "Cn", PT_PC, ucp_Cn }, |
103 |
{ "Me", ucp_Me }, |
{ "Co", PT_PC, ucp_Co }, |
104 |
{ "Mn", ucp_Mn }, |
{ "Common", PT_SC, ucp_Common }, |
105 |
{ "N", 128 + ucp_N }, |
{ "Coptic", PT_SC, ucp_Coptic }, |
106 |
{ "Nd", ucp_Nd }, |
{ "Cs", PT_PC, ucp_Cs }, |
107 |
{ "Nl", ucp_Nl }, |
{ "Cypriot", PT_SC, ucp_Cypriot }, |
108 |
{ "No", ucp_No }, |
{ "Cyrillic", PT_SC, ucp_Cyrillic }, |
109 |
{ "P", 128 + ucp_P }, |
{ "Deseret", PT_SC, ucp_Deseret }, |
110 |
{ "Pc", ucp_Pc }, |
{ "Devanagari", PT_SC, ucp_Devanagari }, |
111 |
{ "Pd", ucp_Pd }, |
{ "Ethiopic", PT_SC, ucp_Ethiopic }, |
112 |
{ "Pe", ucp_Pe }, |
{ "Georgian", PT_SC, ucp_Georgian }, |
113 |
{ "Pf", ucp_Pf }, |
{ "Glagolitic", PT_SC, ucp_Glagolitic }, |
114 |
{ "Pi", ucp_Pi }, |
{ "Gothic", PT_SC, ucp_Gothic }, |
115 |
{ "Po", ucp_Po }, |
{ "Greek", PT_SC, ucp_Greek }, |
116 |
{ "Ps", ucp_Ps }, |
{ "Gujarati", PT_SC, ucp_Gujarati }, |
117 |
{ "S", 128 + ucp_S }, |
{ "Gurmukhi", PT_SC, ucp_Gurmukhi }, |
118 |
{ "Sc", ucp_Sc }, |
{ "Han", PT_SC, ucp_Han }, |
119 |
{ "Sk", ucp_Sk }, |
{ "Hangul", PT_SC, ucp_Hangul }, |
120 |
{ "Sm", ucp_Sm }, |
{ "Hanunoo", PT_SC, ucp_Hanunoo }, |
121 |
{ "So", ucp_So }, |
{ "Hebrew", PT_SC, ucp_Hebrew }, |
122 |
{ "Z", 128 + ucp_Z }, |
{ "Hiragana", PT_SC, ucp_Hiragana }, |
123 |
{ "Zl", ucp_Zl }, |
{ "Inherited", PT_SC, ucp_Inherited }, |
124 |
{ "Zp", ucp_Zp }, |
{ "Kannada", PT_SC, ucp_Kannada }, |
125 |
{ "Zs", ucp_Zs } |
{ "Katakana", PT_SC, ucp_Katakana }, |
126 |
|
{ "Kharoshthi", PT_SC, ucp_Kharoshthi }, |
127 |
|
{ "Khmer", PT_SC, ucp_Khmer }, |
128 |
|
{ "L", PT_GC, ucp_L }, |
129 |
|
{ "L&", PT_LAMP, 0 }, |
130 |
|
{ "Lao", PT_SC, ucp_Lao }, |
131 |
|
{ "Latin", PT_SC, ucp_Latin }, |
132 |
|
{ "Limbu", PT_SC, ucp_Limbu }, |
133 |
|
{ "Linear_B", PT_SC, ucp_Linear_B }, |
134 |
|
{ "Ll", PT_PC, ucp_Ll }, |
135 |
|
{ "Lm", PT_PC, ucp_Lm }, |
136 |
|
{ "Lo", PT_PC, ucp_Lo }, |
137 |
|
{ "Lt", PT_PC, ucp_Lt }, |
138 |
|
{ "Lu", PT_PC, ucp_Lu }, |
139 |
|
{ "M", PT_GC, ucp_M }, |
140 |
|
{ "Malayalam", PT_SC, ucp_Malayalam }, |
141 |
|
{ "Mc", PT_PC, ucp_Mc }, |
142 |
|
{ "Me", PT_PC, ucp_Me }, |
143 |
|
{ "Mn", PT_PC, ucp_Mn }, |
144 |
|
{ "Mongolian", PT_SC, ucp_Mongolian }, |
145 |
|
{ "Myanmar", PT_SC, ucp_Myanmar }, |
146 |
|
{ "N", PT_GC, ucp_N }, |
147 |
|
{ "Nd", PT_PC, ucp_Nd }, |
148 |
|
{ "New_Tai_Lue", PT_SC, ucp_New_Tai_Lue }, |
149 |
|
{ "Nl", PT_PC, ucp_Nl }, |
150 |
|
{ "No", PT_PC, ucp_No }, |
151 |
|
{ "Ogham", PT_SC, ucp_Ogham }, |
152 |
|
{ "Old_Italic", PT_SC, ucp_Old_Italic }, |
153 |
|
{ "Old_Persian", PT_SC, ucp_Old_Persian }, |
154 |
|
{ "Oriya", PT_SC, ucp_Oriya }, |
155 |
|
{ "Osmanya", PT_SC, ucp_Osmanya }, |
156 |
|
{ "P", PT_GC, ucp_P }, |
157 |
|
{ "Pc", PT_PC, ucp_Pc }, |
158 |
|
{ "Pd", PT_PC, ucp_Pd }, |
159 |
|
{ "Pe", PT_PC, ucp_Pe }, |
160 |
|
{ "Pf", PT_PC, ucp_Pf }, |
161 |
|
{ "Pi", PT_PC, ucp_Pi }, |
162 |
|
{ "Po", PT_PC, ucp_Po }, |
163 |
|
{ "Ps", PT_PC, ucp_Ps }, |
164 |
|
{ "Runic", PT_SC, ucp_Runic }, |
165 |
|
{ "S", PT_GC, ucp_S }, |
166 |
|
{ "Sc", PT_PC, ucp_Sc }, |
167 |
|
{ "Shavian", PT_SC, ucp_Shavian }, |
168 |
|
{ "Sinhala", PT_SC, ucp_Sinhala }, |
169 |
|
{ "Sk", PT_PC, ucp_Sk }, |
170 |
|
{ "Sm", PT_PC, ucp_Sm }, |
171 |
|
{ "So", PT_PC, ucp_So }, |
172 |
|
{ "Syloti_Nagri", PT_SC, ucp_Syloti_Nagri }, |
173 |
|
{ "Syriac", PT_SC, ucp_Syriac }, |
174 |
|
{ "Tagalog", PT_SC, ucp_Tagalog }, |
175 |
|
{ "Tagbanwa", PT_SC, ucp_Tagbanwa }, |
176 |
|
{ "Tai_Le", PT_SC, ucp_Tai_Le }, |
177 |
|
{ "Tamil", PT_SC, ucp_Tamil }, |
178 |
|
{ "Telugu", PT_SC, ucp_Telugu }, |
179 |
|
{ "Thaana", PT_SC, ucp_Thaana }, |
180 |
|
{ "Thai", PT_SC, ucp_Thai }, |
181 |
|
{ "Tibetan", PT_SC, ucp_Tibetan }, |
182 |
|
{ "Tifinagh", PT_SC, ucp_Tifinagh }, |
183 |
|
{ "Ugaritic", PT_SC, ucp_Ugaritic }, |
184 |
|
{ "Yi", PT_SC, ucp_Yi }, |
185 |
|
{ "Z", PT_GC, ucp_Z }, |
186 |
|
{ "Zl", PT_PC, ucp_Zl }, |
187 |
|
{ "Zp", PT_PC, ucp_Zp }, |
188 |
|
{ "Zs", PT_PC, ucp_Zs } |
189 |
}; |
}; |
190 |
|
|
191 |
const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table); |
const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table); |