/[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 96 by nigel, Fri Mar 2 13:10:43 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-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
# Line 48  clashes with the library. */ Line 48  clashes with the library. */
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    
# Line 72  first byte of a character, indexed by th Line 72  first byte of a character, indexed by th
72  const int _pcre_utf8_table2[] = { 0,    0xc0, 0xe0, 0xf0, 0xf8, 0xfc};  const int _pcre_utf8_table2[] = { 0,    0xc0, 0xe0, 0xf0, 0xf8, 0xfc};
73  const int _pcre_utf8_table3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};  const int _pcre_utf8_table3[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
74    
75  /* 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
76  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. */  
77    
78  const uschar _pcre_utf8_table4[] = {  const uschar _pcre_utf8_table4[] = {
79    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 81  const uschar _pcre_utf8_table4[] = {
81    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,
82    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 };
83    
84  /* This table translates Unicode property names into code values for the  /* This table translates Unicode property names into type and code values. It
85  ucp_findchar() function. */  is searched by binary chop, so must be in collating sequence of name. */
86    
87  const ucp_type_table _pcre_utt[] = {  const ucp_type_table _pcre_utt[] = {
88    { "C",  128 + ucp_C },    { "Any",                 PT_ANY,  0 },
89    { "Cc", ucp_Cc },    { "Arabic",              PT_SC,   ucp_Arabic },
90    { "Cf", ucp_Cf },    { "Armenian",            PT_SC,   ucp_Armenian },
91    { "Cn", ucp_Cn },    { "Balinese",            PT_SC,   ucp_Balinese },
92    { "Co", ucp_Co },    { "Bengali",             PT_SC,   ucp_Bengali },
93    { "Cs", ucp_Cs },    { "Bopomofo",            PT_SC,   ucp_Bopomofo },
94    { "L",  128 + ucp_L },    { "Braille",             PT_SC,   ucp_Braille },
95    { "Ll", ucp_Ll },    { "Buginese",            PT_SC,   ucp_Buginese },
96    { "Lm", ucp_Lm },    { "Buhid",               PT_SC,   ucp_Buhid },
97    { "Lo", ucp_Lo },    { "C",                   PT_GC,   ucp_C },
98    { "Lt", ucp_Lt },    { "Canadian_Aboriginal", PT_SC,   ucp_Canadian_Aboriginal },
99    { "Lu", ucp_Lu },    { "Cc",                  PT_PC,   ucp_Cc },
100    { "M",  128 + ucp_M },    { "Cf",                  PT_PC,   ucp_Cf },
101    { "Mc", ucp_Mc },    { "Cherokee",            PT_SC,   ucp_Cherokee },
102    { "Me", ucp_Me },    { "Cn",                  PT_PC,   ucp_Cn },
103    { "Mn", ucp_Mn },    { "Co",                  PT_PC,   ucp_Co },
104    { "N",  128 + ucp_N },    { "Common",              PT_SC,   ucp_Common },
105    { "Nd", ucp_Nd },    { "Coptic",              PT_SC,   ucp_Coptic },
106    { "Nl", ucp_Nl },    { "Cs",                  PT_PC,   ucp_Cs },
107    { "No", ucp_No },    { "Cuneiform",           PT_SC,   ucp_Cuneiform },
108    { "P",  128 + ucp_P },    { "Cypriot",             PT_SC,   ucp_Cypriot },
109    { "Pc", ucp_Pc },    { "Cyrillic",            PT_SC,   ucp_Cyrillic },
110    { "Pd", ucp_Pd },    { "Deseret",             PT_SC,   ucp_Deseret },
111    { "Pe", ucp_Pe },    { "Devanagari",          PT_SC,   ucp_Devanagari },
112    { "Pf", ucp_Pf },    { "Ethiopic",            PT_SC,   ucp_Ethiopic },
113    { "Pi", ucp_Pi },    { "Georgian",            PT_SC,   ucp_Georgian },
114    { "Po", ucp_Po },    { "Glagolitic",          PT_SC,   ucp_Glagolitic },
115    { "Ps", ucp_Ps },    { "Gothic",              PT_SC,   ucp_Gothic },
116    { "S",  128 + ucp_S },    { "Greek",               PT_SC,   ucp_Greek },
117    { "Sc", ucp_Sc },    { "Gujarati",            PT_SC,   ucp_Gujarati },
118    { "Sk", ucp_Sk },    { "Gurmukhi",            PT_SC,   ucp_Gurmukhi },
119    { "Sm", ucp_Sm },    { "Han",                 PT_SC,   ucp_Han },
120    { "So", ucp_So },    { "Hangul",              PT_SC,   ucp_Hangul },
121    { "Z",  128 + ucp_Z },    { "Hanunoo",             PT_SC,   ucp_Hanunoo },
122    { "Zl", ucp_Zl },    { "Hebrew",              PT_SC,   ucp_Hebrew },
123    { "Zp", ucp_Zp },    { "Hiragana",            PT_SC,   ucp_Hiragana },
124    { "Zs", ucp_Zs }    { "Inherited",           PT_SC,   ucp_Inherited },
125      { "Kannada",             PT_SC,   ucp_Kannada },
126      { "Katakana",            PT_SC,   ucp_Katakana },
127      { "Kharoshthi",          PT_SC,   ucp_Kharoshthi },
128      { "Khmer",               PT_SC,   ucp_Khmer },
129      { "L",                   PT_GC,   ucp_L },
130      { "L&",                  PT_LAMP, 0 },
131      { "Lao",                 PT_SC,   ucp_Lao },
132      { "Latin",               PT_SC,   ucp_Latin },
133      { "Limbu",               PT_SC,   ucp_Limbu },
134      { "Linear_B",            PT_SC,   ucp_Linear_B },
135      { "Ll",                  PT_PC,   ucp_Ll },
136      { "Lm",                  PT_PC,   ucp_Lm },
137      { "Lo",                  PT_PC,   ucp_Lo },
138      { "Lt",                  PT_PC,   ucp_Lt },
139      { "Lu",                  PT_PC,   ucp_Lu },
140      { "M",                   PT_GC,   ucp_M },
141      { "Malayalam",           PT_SC,   ucp_Malayalam },
142      { "Mc",                  PT_PC,   ucp_Mc },
143      { "Me",                  PT_PC,   ucp_Me },
144      { "Mn",                  PT_PC,   ucp_Mn },
145      { "Mongolian",           PT_SC,   ucp_Mongolian },
146      { "Myanmar",             PT_SC,   ucp_Myanmar },
147      { "N",                   PT_GC,   ucp_N },
148      { "Nd",                  PT_PC,   ucp_Nd },
149      { "New_Tai_Lue",         PT_SC,   ucp_New_Tai_Lue },
150      { "Nko",                 PT_SC,   ucp_Nko },
151      { "Nl",                  PT_PC,   ucp_Nl },
152      { "No",                  PT_PC,   ucp_No },
153      { "Ogham",               PT_SC,   ucp_Ogham },
154      { "Old_Italic",          PT_SC,   ucp_Old_Italic },
155      { "Old_Persian",         PT_SC,   ucp_Old_Persian },
156      { "Oriya",               PT_SC,   ucp_Oriya },
157      { "Osmanya",             PT_SC,   ucp_Osmanya },
158      { "P",                   PT_GC,   ucp_P },
159      { "Pc",                  PT_PC,   ucp_Pc },
160      { "Pd",                  PT_PC,   ucp_Pd },
161      { "Pe",                  PT_PC,   ucp_Pe },
162      { "Pf",                  PT_PC,   ucp_Pf },
163      { "Phags_Pa",            PT_SC,   ucp_Phags_Pa },
164      { "Phoenician",          PT_SC,   ucp_Phoenician },
165      { "Pi",                  PT_PC,   ucp_Pi },
166      { "Po",                  PT_PC,   ucp_Po },
167      { "Ps",                  PT_PC,   ucp_Ps },
168      { "Runic",               PT_SC,   ucp_Runic },
169      { "S",                   PT_GC,   ucp_S },
170      { "Sc",                  PT_PC,   ucp_Sc },
171      { "Shavian",             PT_SC,   ucp_Shavian },
172      { "Sinhala",             PT_SC,   ucp_Sinhala },
173      { "Sk",                  PT_PC,   ucp_Sk },
174      { "Sm",                  PT_PC,   ucp_Sm },
175      { "So",                  PT_PC,   ucp_So },
176      { "Syloti_Nagri",        PT_SC,   ucp_Syloti_Nagri },
177      { "Syriac",              PT_SC,   ucp_Syriac },
178      { "Tagalog",             PT_SC,   ucp_Tagalog },
179      { "Tagbanwa",            PT_SC,   ucp_Tagbanwa },
180      { "Tai_Le",              PT_SC,   ucp_Tai_Le },
181      { "Tamil",               PT_SC,   ucp_Tamil },
182      { "Telugu",              PT_SC,   ucp_Telugu },
183      { "Thaana",              PT_SC,   ucp_Thaana },
184      { "Thai",                PT_SC,   ucp_Thai },
185      { "Tibetan",             PT_SC,   ucp_Tibetan },
186      { "Tifinagh",            PT_SC,   ucp_Tifinagh },
187      { "Ugaritic",            PT_SC,   ucp_Ugaritic },
188      { "Yi",                  PT_SC,   ucp_Yi },
189      { "Z",                   PT_GC,   ucp_Z },
190      { "Zl",                  PT_PC,   ucp_Zl },
191      { "Zp",                  PT_PC,   ucp_Zp },
192      { "Zs",                  PT_PC,   ucp_Zs }
193  };  };
194    
195  const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table);  const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table);

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

  ViewVC Help
Powered by ViewVC 1.1.5