/[pcre]/code/trunk/pcre_tables.c
ViewVC logotype

Diff of /code/trunk/pcre_tables.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 85 by nigel, Sat Feb 24 21:41:13 2007 UTC revision 200 by ph10, Wed Aug 1 09:10:40 2007 UTC
# Line 6  Line 6 
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-2007 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
# Line 44  uses macros to change their names from _ Line 44  uses macros to change their names from _
44  clashes with the library. */  clashes with the library. */
45    
46    
47    #ifdef HAVE_CONFIG_H
48    #include <config.h>
49    #endif
50    
51  #include "pcre_internal.h"  #include "pcre_internal.h"
52    
53    
54  /* 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
55  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. */
56    
57  const uschar _pcre_OP_lengths[] = { OP_LENGTHS };  const uschar _pcre_OP_lengths[] = { OP_LENGTHS };
58    
# Line 61  const uschar _pcre_OP_lengths[] = { OP_L Line 65  const uschar _pcre_OP_lengths[] = { OP_L
65  /* These are the breakpoints for different numbers of bytes in a UTF-8  /* These are the breakpoints for different numbers of bytes in a UTF-8
66  character. */  character. */
67    
68    #ifdef SUPPORT_UTF8
69    
70  const int _pcre_utf8_table1[] =  const int _pcre_utf8_table1[] =
71    { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff};    { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff};
72    
# Line 72  first byte of a character, indexed by th Line 78  first byte of a character, indexed by th
78  const int _pcre_utf8_table2[] = { 0,    0xc0, 0xe0, 0xf0, 0xf8, 0xfc};  const int _pcre_utf8_table2[] = { 0,    0xc0, 0xe0, 0xf0, 0xf8, 0xfc};
79  const int _pcre_utf8_table3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};  const int _pcre_utf8_table3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
80    
81  /* Table of the number of extra characters, indexed by the first character  /* Table of the number of extra bytes, indexed by the first byte masked with
82  masked with 0x3f. The highest number for a valid UTF-8 character is in fact  0x3f. The highest number for a valid UTF-8 first byte is in fact 0x3d. */
 0x3d. */  
83    
84  const uschar _pcre_utf8_table4[] = {  const uschar _pcre_utf8_table4[] = {
85    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,    1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
# Line 82  const uschar _pcre_utf8_table4[] = { Line 87  const uschar _pcre_utf8_table4[] = {
87    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,
88    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 };
89    
90  /* This table translates Unicode property names into code values for the  /* This table translates Unicode property names into type and code values. It
91  ucp_findchar() function. */  is searched by binary chop, so must be in collating sequence of name. */
92    
93  const ucp_type_table _pcre_utt[] = {  const ucp_type_table _pcre_utt[] = {
94    { "C",  128 + ucp_C },    { "Any",                 PT_ANY,  0 },
95    { "Cc", ucp_Cc },    { "Arabic",              PT_SC,   ucp_Arabic },
96    { "Cf", ucp_Cf },    { "Armenian",            PT_SC,   ucp_Armenian },
97    { "Cn", ucp_Cn },    { "Balinese",            PT_SC,   ucp_Balinese },
98    { "Co", ucp_Co },    { "Bengali",             PT_SC,   ucp_Bengali },
99    { "Cs", ucp_Cs },    { "Bopomofo",            PT_SC,   ucp_Bopomofo },
100    { "L",  128 + ucp_L },    { "Braille",             PT_SC,   ucp_Braille },
101    { "Ll", ucp_Ll },    { "Buginese",            PT_SC,   ucp_Buginese },
102    { "Lm", ucp_Lm },    { "Buhid",               PT_SC,   ucp_Buhid },
103    { "Lo", ucp_Lo },    { "C",                   PT_GC,   ucp_C },
104    { "Lt", ucp_Lt },    { "Canadian_Aboriginal", PT_SC,   ucp_Canadian_Aboriginal },
105    { "Lu", ucp_Lu },    { "Cc",                  PT_PC,   ucp_Cc },
106    { "M",  128 + ucp_M },    { "Cf",                  PT_PC,   ucp_Cf },
107    { "Mc", ucp_Mc },    { "Cherokee",            PT_SC,   ucp_Cherokee },
108    { "Me", ucp_Me },    { "Cn",                  PT_PC,   ucp_Cn },
109    { "Mn", ucp_Mn },    { "Co",                  PT_PC,   ucp_Co },
110    { "N",  128 + ucp_N },    { "Common",              PT_SC,   ucp_Common },
111    { "Nd", ucp_Nd },    { "Coptic",              PT_SC,   ucp_Coptic },
112    { "Nl", ucp_Nl },    { "Cs",                  PT_PC,   ucp_Cs },
113    { "No", ucp_No },    { "Cuneiform",           PT_SC,   ucp_Cuneiform },
114    { "P",  128 + ucp_P },    { "Cypriot",             PT_SC,   ucp_Cypriot },
115    { "Pc", ucp_Pc },    { "Cyrillic",            PT_SC,   ucp_Cyrillic },
116    { "Pd", ucp_Pd },    { "Deseret",             PT_SC,   ucp_Deseret },
117    { "Pe", ucp_Pe },    { "Devanagari",          PT_SC,   ucp_Devanagari },
118    { "Pf", ucp_Pf },    { "Ethiopic",            PT_SC,   ucp_Ethiopic },
119    { "Pi", ucp_Pi },    { "Georgian",            PT_SC,   ucp_Georgian },
120    { "Po", ucp_Po },    { "Glagolitic",          PT_SC,   ucp_Glagolitic },
121    { "Ps", ucp_Ps },    { "Gothic",              PT_SC,   ucp_Gothic },
122    { "S",  128 + ucp_S },    { "Greek",               PT_SC,   ucp_Greek },
123    { "Sc", ucp_Sc },    { "Gujarati",            PT_SC,   ucp_Gujarati },
124    { "Sk", ucp_Sk },    { "Gurmukhi",            PT_SC,   ucp_Gurmukhi },
125    { "Sm", ucp_Sm },    { "Han",                 PT_SC,   ucp_Han },
126    { "So", ucp_So },    { "Hangul",              PT_SC,   ucp_Hangul },
127    { "Z",  128 + ucp_Z },    { "Hanunoo",             PT_SC,   ucp_Hanunoo },
128    { "Zl", ucp_Zl },    { "Hebrew",              PT_SC,   ucp_Hebrew },
129    { "Zp", ucp_Zp },    { "Hiragana",            PT_SC,   ucp_Hiragana },
130    { "Zs", ucp_Zs }    { "Inherited",           PT_SC,   ucp_Inherited },
131      { "Kannada",             PT_SC,   ucp_Kannada },
132      { "Katakana",            PT_SC,   ucp_Katakana },
133      { "Kharoshthi",          PT_SC,   ucp_Kharoshthi },
134      { "Khmer",               PT_SC,   ucp_Khmer },
135      { "L",                   PT_GC,   ucp_L },
136      { "L&",                  PT_LAMP, 0 },
137      { "Lao",                 PT_SC,   ucp_Lao },
138      { "Latin",               PT_SC,   ucp_Latin },
139      { "Limbu",               PT_SC,   ucp_Limbu },
140      { "Linear_B",            PT_SC,   ucp_Linear_B },
141      { "Ll",                  PT_PC,   ucp_Ll },
142      { "Lm",                  PT_PC,   ucp_Lm },
143      { "Lo",                  PT_PC,   ucp_Lo },
144      { "Lt",                  PT_PC,   ucp_Lt },
145      { "Lu",                  PT_PC,   ucp_Lu },
146      { "M",                   PT_GC,   ucp_M },
147      { "Malayalam",           PT_SC,   ucp_Malayalam },
148      { "Mc",                  PT_PC,   ucp_Mc },
149      { "Me",                  PT_PC,   ucp_Me },
150      { "Mn",                  PT_PC,   ucp_Mn },
151      { "Mongolian",           PT_SC,   ucp_Mongolian },
152      { "Myanmar",             PT_SC,   ucp_Myanmar },
153      { "N",                   PT_GC,   ucp_N },
154      { "Nd",                  PT_PC,   ucp_Nd },
155      { "New_Tai_Lue",         PT_SC,   ucp_New_Tai_Lue },
156      { "Nko",                 PT_SC,   ucp_Nko },
157      { "Nl",                  PT_PC,   ucp_Nl },
158      { "No",                  PT_PC,   ucp_No },
159      { "Ogham",               PT_SC,   ucp_Ogham },
160      { "Old_Italic",          PT_SC,   ucp_Old_Italic },
161      { "Old_Persian",         PT_SC,   ucp_Old_Persian },
162      { "Oriya",               PT_SC,   ucp_Oriya },
163      { "Osmanya",             PT_SC,   ucp_Osmanya },
164      { "P",                   PT_GC,   ucp_P },
165      { "Pc",                  PT_PC,   ucp_Pc },
166      { "Pd",                  PT_PC,   ucp_Pd },
167      { "Pe",                  PT_PC,   ucp_Pe },
168      { "Pf",                  PT_PC,   ucp_Pf },
169      { "Phags_Pa",            PT_SC,   ucp_Phags_Pa },
170      { "Phoenician",          PT_SC,   ucp_Phoenician },
171      { "Pi",                  PT_PC,   ucp_Pi },
172      { "Po",                  PT_PC,   ucp_Po },
173      { "Ps",                  PT_PC,   ucp_Ps },
174      { "Runic",               PT_SC,   ucp_Runic },
175      { "S",                   PT_GC,   ucp_S },
176      { "Sc",                  PT_PC,   ucp_Sc },
177      { "Shavian",             PT_SC,   ucp_Shavian },
178      { "Sinhala",             PT_SC,   ucp_Sinhala },
179      { "Sk",                  PT_PC,   ucp_Sk },
180      { "Sm",                  PT_PC,   ucp_Sm },
181      { "So",                  PT_PC,   ucp_So },
182      { "Syloti_Nagri",        PT_SC,   ucp_Syloti_Nagri },
183      { "Syriac",              PT_SC,   ucp_Syriac },
184      { "Tagalog",             PT_SC,   ucp_Tagalog },
185      { "Tagbanwa",            PT_SC,   ucp_Tagbanwa },
186      { "Tai_Le",              PT_SC,   ucp_Tai_Le },
187      { "Tamil",               PT_SC,   ucp_Tamil },
188      { "Telugu",              PT_SC,   ucp_Telugu },
189      { "Thaana",              PT_SC,   ucp_Thaana },
190      { "Thai",                PT_SC,   ucp_Thai },
191      { "Tibetan",             PT_SC,   ucp_Tibetan },
192      { "Tifinagh",            PT_SC,   ucp_Tifinagh },
193      { "Ugaritic",            PT_SC,   ucp_Ugaritic },
194      { "Yi",                  PT_SC,   ucp_Yi },
195      { "Z",                   PT_GC,   ucp_Z },
196      { "Zl",                  PT_PC,   ucp_Zl },
197      { "Zp",                  PT_PC,   ucp_Zp },
198      { "Zs",                  PT_PC,   ucp_Zs }
199  };  };
200    
201  const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table);  const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table);
202    
203    #endif  /* SUPPORT_UTF8 */
204    
205  /* End of pcre_tables.c */  /* End of pcre_tables.c */

Legend:
Removed from v.85  
changed lines
  Added in v.200

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12