Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Syntax / Highlight / Engine / Kate / Email.pm
1 # Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved.
2 # This program is free software; you can redistribute it and/or
3 # modify it under the same terms as Perl itself.
4
5 # This file was generated from the 'email.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7
8 #kate xml version 1.00
9 #kate version 2.4
10 #kate author Carl A Joslin (carl.joslin@joslin.dyndns.org)
11 #generated: Sun Feb  3 22:02:04 2008, localtime
12
13 package Syntax::Highlight::Engine::Kate::Email;
14
15 our $VERSION = '0.06';
16
17 use strict;
18 use warnings;
19 use base('Syntax::Highlight::Engine::Kate::Template');
20
21 sub new {
22    my $proto = shift;
23    my $class = ref($proto) || $proto;
24    my $self = $class->SUPER::new(@_);
25    $self->attributes({
26       'Normal Text' => 'Normal',
27       'base64' => 'RegionMarker',
28       'common' => 'Keyword',
29       'email' => 'Function',
30       'indent1' => 'DataType',
31       'indent2' => 'DecVal',
32       'indent3' => 'Float',
33       'indent4' => 'BaseN',
34       'indent5' => 'BString',
35       'indent6' => 'Reserved',
36       'marker' => 'Alert',
37       'other' => 'Others',
38       'rfc' => 'Operator',
39       'rfc-main' => 'Alert',
40       'sign' => 'Comment',
41       'string' => 'String',
42    });
43    $self->contextdata({
44       'headder' => {
45          callback => \&parseheadder,
46          attribute => 'Normal Text',
47       },
48    });
49    $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
50    $self->basecontext('headder');
51    $self->keywordscase(0);
52    $self->initialize;
53    bless ($self, $class);
54    return $self;
55 }
56
57 sub language {
58    return 'Email';
59 }
60
61 sub parseheadder {
62    my ($self, $text) = @_;
63    # String => '^[Tt]o:.*$'
64    # attribute => 'rfc-main'
65    # context => '#stay'
66    # type => 'RegExpr'
67    if ($self->testRegExpr($text, '^[Tt]o:.*$', 0, 0, 0, undef, 0, '#stay', 'rfc-main')) {
68       return 1
69    }
70    # String => '^[Ff]rom:.*$'
71    # attribute => 'rfc-main'
72    # context => '#stay'
73    # type => 'RegExpr'
74    if ($self->testRegExpr($text, '^[Ff]rom:.*$', 0, 0, 0, undef, 0, '#stay', 'rfc-main')) {
75       return 1
76    }
77    # String => '^[Cc][Cc]:.*$'
78    # attribute => 'rfc-main'
79    # context => '#stay'
80    # type => 'RegExpr'
81    if ($self->testRegExpr($text, '^[Cc][Cc]:.*$', 0, 0, 0, undef, 0, '#stay', 'rfc-main')) {
82       return 1
83    }
84    # String => '^[Bb][Cc][Cc]:.*$'
85    # attribute => 'rfc-main'
86    # context => '#stay'
87    # type => 'RegExpr'
88    if ($self->testRegExpr($text, '^[Bb][Cc][Cc]:.*$', 0, 0, 0, undef, 0, '#stay', 'rfc-main')) {
89       return 1
90    }
91    # String => '^[Ss]ubject:.*$'
92    # attribute => 'rfc-main'
93    # context => '#stay'
94    # type => 'RegExpr'
95    if ($self->testRegExpr($text, '^[Ss]ubject:.*$', 0, 0, 0, undef, 0, '#stay', 'rfc-main')) {
96       return 1
97    }
98    # String => '^[Dd]ate:.*$'
99    # attribute => 'rfc-main'
100    # context => '#stay'
101    # type => 'RegExpr'
102    if ($self->testRegExpr($text, '^[Dd]ate:.*$', 0, 0, 0, undef, 0, '#stay', 'rfc-main')) {
103       return 1
104    }
105    # String => '^[Ss]ender:'
106    # attribute => 'rfc'
107    # context => '#stay'
108    # type => 'RegExpr'
109    if ($self->testRegExpr($text, '^[Ss]ender:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
110       return 1
111    }
112    # String => '^[Rr]eply-[Tt]o:'
113    # attribute => 'rfc'
114    # context => '#stay'
115    # type => 'RegExpr'
116    if ($self->testRegExpr($text, '^[Rr]eply-[Tt]o:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
117       return 1
118    }
119    # String => '^[Mm]essage-[Ii][Dd]:'
120    # attribute => 'rfc'
121    # context => '#stay'
122    # type => 'RegExpr'
123    if ($self->testRegExpr($text, '^[Mm]essage-[Ii][Dd]:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
124       return 1
125    }
126    # String => '^[Ii]n-[Rr]eply-[Tt]o:'
127    # attribute => 'rfc'
128    # context => '#stay'
129    # type => 'RegExpr'
130    if ($self->testRegExpr($text, '^[Ii]n-[Rr]eply-[Tt]o:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
131       return 1
132    }
133    # String => '^[Rr]eferences:'
134    # attribute => 'rfc'
135    # context => '#stay'
136    # type => 'RegExpr'
137    if ($self->testRegExpr($text, '^[Rr]eferences:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
138       return 1
139    }
140    # String => '^[Cc]omments:'
141    # attribute => 'rfc'
142    # context => '#stay'
143    # type => 'RegExpr'
144    if ($self->testRegExpr($text, '^[Cc]omments:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
145       return 1
146    }
147    # String => '^[Kk]eywors:'
148    # attribute => 'rfc'
149    # context => '#stay'
150    # type => 'RegExpr'
151    if ($self->testRegExpr($text, '^[Kk]eywors:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
152       return 1
153    }
154    # String => '^[Rr]esent-[Dd]ate:'
155    # attribute => 'rfc'
156    # context => '#stay'
157    # type => 'RegExpr'
158    if ($self->testRegExpr($text, '^[Rr]esent-[Dd]ate:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
159       return 1
160    }
161    # String => '^[Rr]esent-[Ff]rom:'
162    # attribute => 'rfc'
163    # context => '#stay'
164    # type => 'RegExpr'
165    if ($self->testRegExpr($text, '^[Rr]esent-[Ff]rom:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
166       return 1
167    }
168    # String => '^[Rr]esent-[Ss]ender:'
169    # attribute => 'rfc'
170    # context => '#stay'
171    # type => 'RegExpr'
172    if ($self->testRegExpr($text, '^[Rr]esent-[Ss]ender:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
173       return 1
174    }
175    # String => '^[Rr]esent-[Tt]o:'
176    # attribute => 'rfc'
177    # context => '#stay'
178    # type => 'RegExpr'
179    if ($self->testRegExpr($text, '^[Rr]esent-[Tt]o:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
180       return 1
181    }
182    # String => '^[Rr]esent-[Cc][Cc]:'
183    # attribute => 'rfc'
184    # context => '#stay'
185    # type => 'RegExpr'
186    if ($self->testRegExpr($text, '^[Rr]esent-[Cc][Cc]:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
187       return 1
188    }
189    # String => '^[Rr]esent-[Bb][Cc][Cc]:'
190    # attribute => 'rfc'
191    # context => '#stay'
192    # type => 'RegExpr'
193    if ($self->testRegExpr($text, '^[Rr]esent-[Bb][Cc][Cc]:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
194       return 1
195    }
196    # String => '^[Rr]esent-[Mm]essage-[Ii][Dd]:'
197    # attribute => 'rfc'
198    # context => '#stay'
199    # type => 'RegExpr'
200    if ($self->testRegExpr($text, '^[Rr]esent-[Mm]essage-[Ii][Dd]:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
201       return 1
202    }
203    # String => '^[Rr]esent-[Rr]eply-[Tt]o:'
204    # attribute => 'rfc'
205    # context => '#stay'
206    # type => 'RegExpr'
207    if ($self->testRegExpr($text, '^[Rr]esent-[Rr]eply-[Tt]o:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
208       return 1
209    }
210    # String => '^[Rr]eturn-[Pp]ath:'
211    # attribute => 'rfc'
212    # context => '#stay'
213    # type => 'RegExpr'
214    if ($self->testRegExpr($text, '^[Rr]eturn-[Pp]ath:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
215       return 1
216    }
217    # String => '^[Rr]eceived:'
218    # attribute => 'rfc'
219    # context => '#stay'
220    # type => 'RegExpr'
221    if ($self->testRegExpr($text, '^[Rr]eceived:', 0, 0, 0, undef, 0, '#stay', 'rfc')) {
222       return 1
223    }
224    # String => '^[Xx]-[Mm]ozilla-[Ss]tatus:'
225    # attribute => 'common'
226    # context => '#stay'
227    # type => 'RegExpr'
228    if ($self->testRegExpr($text, '^[Xx]-[Mm]ozilla-[Ss]tatus:', 0, 0, 0, undef, 0, '#stay', 'common')) {
229       return 1
230    }
231    # String => '^[Xx]-[Mm]ozilla-[Ss]tatus2:'
232    # attribute => 'common'
233    # context => '#stay'
234    # type => 'RegExpr'
235    if ($self->testRegExpr($text, '^[Xx]-[Mm]ozilla-[Ss]tatus2:', 0, 0, 0, undef, 0, '#stay', 'common')) {
236       return 1
237    }
238    # String => '^[Ee]nverlope-[Tt]o:'
239    # attribute => 'common'
240    # context => '#stay'
241    # type => 'RegExpr'
242    if ($self->testRegExpr($text, '^[Ee]nverlope-[Tt]o:', 0, 0, 0, undef, 0, '#stay', 'common')) {
243       return 1
244    }
245    # String => '^[Dd]elivery-[Dd]ate:'
246    # attribute => 'common'
247    # context => '#stay'
248    # type => 'RegExpr'
249    if ($self->testRegExpr($text, '^[Dd]elivery-[Dd]ate:', 0, 0, 0, undef, 0, '#stay', 'common')) {
250       return 1
251    }
252    # String => '^[Xx]-[Oo]riginating-[Ii][Pp]:'
253    # attribute => 'common'
254    # context => '#stay'
255    # type => 'RegExpr'
256    if ($self->testRegExpr($text, '^[Xx]-[Oo]riginating-[Ii][Pp]:', 0, 0, 0, undef, 0, '#stay', 'common')) {
257       return 1
258    }
259    # String => '^[Xx]-[Oo]riginating-[Ee]mail:'
260    # attribute => 'common'
261    # context => '#stay'
262    # type => 'RegExpr'
263    if ($self->testRegExpr($text, '^[Xx]-[Oo]riginating-[Ee]mail:', 0, 0, 0, undef, 0, '#stay', 'common')) {
264       return 1
265    }
266    # String => '^[Xx]-[Ss]ender:'
267    # attribute => 'common'
268    # context => '#stay'
269    # type => 'RegExpr'
270    if ($self->testRegExpr($text, '^[Xx]-[Ss]ender:', 0, 0, 0, undef, 0, '#stay', 'common')) {
271       return 1
272    }
273    # String => '^[Mm]ime-[Vv]ersion:'
274    # attribute => 'common'
275    # context => '#stay'
276    # type => 'RegExpr'
277    if ($self->testRegExpr($text, '^[Mm]ime-[Vv]ersion:', 0, 0, 0, undef, 0, '#stay', 'common')) {
278       return 1
279    }
280    # String => '^[Cc]ontent-[Tt]ype:'
281    # attribute => 'common'
282    # context => '#stay'
283    # type => 'RegExpr'
284    if ($self->testRegExpr($text, '^[Cc]ontent-[Tt]ype:', 0, 0, 0, undef, 0, '#stay', 'common')) {
285       return 1
286    }
287    # String => '^[Xx]-[Mm]ailing-[Ll]ist:'
288    # attribute => 'common'
289    # context => '#stay'
290    # type => 'RegExpr'
291    if ($self->testRegExpr($text, '^[Xx]-[Mm]ailing-[Ll]ist:', 0, 0, 0, undef, 0, '#stay', 'common')) {
292       return 1
293    }
294    # String => '^[Xx]-[Ll]oop:'
295    # attribute => 'common'
296    # context => '#stay'
297    # type => 'RegExpr'
298    if ($self->testRegExpr($text, '^[Xx]-[Ll]oop:', 0, 0, 0, undef, 0, '#stay', 'common')) {
299       return 1
300    }
301    # String => '^[Ll]ist-[Pp]ost:'
302    # attribute => 'common'
303    # context => '#stay'
304    # type => 'RegExpr'
305    if ($self->testRegExpr($text, '^[Ll]ist-[Pp]ost:', 0, 0, 0, undef, 0, '#stay', 'common')) {
306       return 1
307    }
308    # String => '^[Ll]ist-[Hh]elp:'
309    # attribute => 'common'
310    # context => '#stay'
311    # type => 'RegExpr'
312    if ($self->testRegExpr($text, '^[Ll]ist-[Hh]elp:', 0, 0, 0, undef, 0, '#stay', 'common')) {
313       return 1
314    }
315    # String => '^[Ll]ist-[Uu]nsubscribe:'
316    # attribute => 'common'
317    # context => '#stay'
318    # type => 'RegExpr'
319    if ($self->testRegExpr($text, '^[Ll]ist-[Uu]nsubscribe:', 0, 0, 0, undef, 0, '#stay', 'common')) {
320       return 1
321    }
322    # String => '^[Pp]recedence:'
323    # attribute => 'common'
324    # context => '#stay'
325    # type => 'RegExpr'
326    if ($self->testRegExpr($text, '^[Pp]recedence:', 0, 0, 0, undef, 0, '#stay', 'common')) {
327       return 1
328    }
329    # String => '^[Cc]ontent-[Tt]ransfer-[Ee]ncoding:'
330    # attribute => 'common'
331    # context => '#stay'
332    # type => 'RegExpr'
333    if ($self->testRegExpr($text, '^[Cc]ontent-[Tt]ransfer-[Ee]ncoding:', 0, 0, 0, undef, 0, '#stay', 'common')) {
334       return 1
335    }
336    # String => '^[Cc]ontent-[Tt]ype:'
337    # attribute => 'common'
338    # context => '#stay'
339    # type => 'RegExpr'
340    if ($self->testRegExpr($text, '^[Cc]ontent-[Tt]ype:', 0, 0, 0, undef, 0, '#stay', 'common')) {
341       return 1
342    }
343    # String => '^[Xx]-[Bb]ulkmail:'
344    # attribute => 'common'
345    # context => '#stay'
346    # type => 'RegExpr'
347    if ($self->testRegExpr($text, '^[Xx]-[Bb]ulkmail:', 0, 0, 0, undef, 0, '#stay', 'common')) {
348       return 1
349    }
350    # String => '^[Pp]recedence:'
351    # attribute => 'common'
352    # context => '#stay'
353    # type => 'RegExpr'
354    if ($self->testRegExpr($text, '^[Pp]recedence:', 0, 0, 0, undef, 0, '#stay', 'common')) {
355       return 1
356    }
357    # String => '^[Cc]ontent-[Dd]isposition:'
358    # attribute => 'common'
359    # context => '#stay'
360    # type => 'RegExpr'
361    if ($self->testRegExpr($text, '^[Cc]ontent-[Dd]isposition:', 0, 0, 0, undef, 0, '#stay', 'common')) {
362       return 1
363    }
364    # String => '^[0-9a-zA-Z-.]+:'
365    # attribute => 'other'
366    # context => '#stay'
367    # type => 'RegExpr'
368    if ($self->testRegExpr($text, '^[0-9a-zA-Z-.]+:', 0, 0, 0, undef, 0, '#stay', 'other')) {
369       return 1
370    }
371    # String => '[a-zA-Z0-9.\-]+\@[a-zA-Z0-9.\-]+'
372    # attribute => 'email'
373    # context => '#stay'
374    # type => 'RegExpr'
375    if ($self->testRegExpr($text, '[a-zA-Z0-9.\\-]+\\@[a-zA-Z0-9.\\-]+', 0, 0, 0, undef, 0, '#stay', 'email')) {
376       return 1
377    }
378    # String => '[a-zA-Z0-9.\-]*\s*<[a-zA-Z0-9.\-]+\@[a-zA-Z0-9.\-]+>'
379    # attribute => 'email'
380    # context => '#stay'
381    # type => 'RegExpr'
382    if ($self->testRegExpr($text, '[a-zA-Z0-9.\\-]*\\s*<[a-zA-Z0-9.\\-]+\\@[a-zA-Z0-9.\\-]+>', 0, 0, 0, undef, 0, '#stay', 'email')) {
383       return 1
384    }
385    # String => '"[a-zA-Z0-9. \-]+"\s*<[a-zA-Z0-9.\-]+\@[a-zA-Z0-9.\-]+>'
386    # attribute => 'email'
387    # context => '#stay'
388    # type => 'RegExpr'
389    if ($self->testRegExpr($text, '"[a-zA-Z0-9. \\-]+"\\s*<[a-zA-Z0-9.\\-]+\\@[a-zA-Z0-9.\\-]+>', 0, 0, 0, undef, 0, '#stay', 'email')) {
390       return 1
391    }
392    # String => '".*"'
393    # attribute => 'string'
394    # context => '#stay'
395    # type => 'RegExpr'
396    if ($self->testRegExpr($text, '".*"', 0, 0, 0, undef, 0, '#stay', 'string')) {
397       return 1
398    }
399    # String => ''.*''
400    # attribute => 'string'
401    # context => '#stay'
402    # type => 'RegExpr'
403    if ($self->testRegExpr($text, '\'.*\'', 0, 0, 0, undef, 0, '#stay', 'string')) {
404       return 1
405    }
406    # String => '^[|>]\s*[|>]\s*[|>]\s*[|>]\s*[|>]\s*[|>].*'
407    # attribute => 'indent6'
408    # context => '#stay'
409    # type => 'RegExpr'
410    if ($self->testRegExpr($text, '^[|>]\\s*[|>]\\s*[|>]\\s*[|>]\\s*[|>]\\s*[|>].*', 0, 0, 0, undef, 0, '#stay', 'indent6')) {
411       return 1
412    }
413    # String => '^[|>]\s*[|>]\s*[|>]\s*[|>]\s*[|>].*'
414    # attribute => 'indent5'
415    # context => '#stay'
416    # type => 'RegExpr'
417    if ($self->testRegExpr($text, '^[|>]\\s*[|>]\\s*[|>]\\s*[|>]\\s*[|>].*', 0, 0, 0, undef, 0, '#stay', 'indent5')) {
418       return 1
419    }
420    # String => '^[|>]\s*[|>]\s*[|>]\s*[|>].*'
421    # attribute => 'indent4'
422    # context => '#stay'
423    # type => 'RegExpr'
424    if ($self->testRegExpr($text, '^[|>]\\s*[|>]\\s*[|>]\\s*[|>].*', 0, 0, 0, undef, 0, '#stay', 'indent4')) {
425       return 1
426    }
427    # String => '^[|>]\s*[|>]\s*[|>].*'
428    # attribute => 'indent3'
429    # context => '#stay'
430    # type => 'RegExpr'
431    if ($self->testRegExpr($text, '^[|>]\\s*[|>]\\s*[|>].*', 0, 0, 0, undef, 0, '#stay', 'indent3')) {
432       return 1
433    }
434    # String => '^[|>]\s*[|>].*'
435    # attribute => 'indent2'
436    # context => '#stay'
437    # type => 'RegExpr'
438    if ($self->testRegExpr($text, '^[|>]\\s*[|>].*', 0, 0, 0, undef, 0, '#stay', 'indent2')) {
439       return 1
440    }
441    # String => '^[|>].*'
442    # attribute => 'indent1'
443    # context => '#stay'
444    # type => 'RegExpr'
445    if ($self->testRegExpr($text, '^[|>].*', 0, 0, 0, undef, 0, '#stay', 'indent1')) {
446       return 1
447    }
448    # String => '^([A-Za-z0-9+/][A-Za-z0-9+/][A-Za-z0-9+/][A-Za-z0-9+/]){10,20}$'
449    # attribute => 'base64'
450    # context => '#stay'
451    # type => 'RegExpr'
452    if ($self->testRegExpr($text, '^([A-Za-z0-9+/][A-Za-z0-9+/][A-Za-z0-9+/][A-Za-z0-9+/]){10,20}$', 0, 0, 0, undef, 0, '#stay', 'base64')) {
453       return 1
454    }
455    # String => '^[A-Za-z0-9+=/]+=$'
456    # attribute => 'base64'
457    # context => '#stay'
458    # type => 'RegExpr'
459    if ($self->testRegExpr($text, '^[A-Za-z0-9+=/]+=$', 0, 0, 0, undef, 0, '#stay', 'base64')) {
460       return 1
461    }
462    # String => '^(- )?--(--.*)?'
463    # attribute => 'marker'
464    # context => '#stay'
465    # type => 'RegExpr'
466    if ($self->testRegExpr($text, '^(- )?--(--.*)?', 0, 0, 0, undef, 0, '#stay', 'marker')) {
467       return 1
468    }
469    return 0;
470 };
471
472
473 1;
474
475 __END__
476
477 =head1 NAME
478
479 Syntax::Highlight::Engine::Kate::Email - a Plugin for Email syntax highlighting
480
481 =head1 SYNOPSIS
482
483  require Syntax::Highlight::Engine::Kate::Email;
484  my $sh = new Syntax::Highlight::Engine::Kate::Email([
485  ]);
486
487 =head1 DESCRIPTION
488
489 Syntax::Highlight::Engine::Kate::Email is a  plugin module that provides syntax highlighting
490 for Email to the Syntax::Haghlight::Engine::Kate highlighting engine.
491
492 This code is generated from the syntax definition files used
493 by the Kate project.
494 It works quite fine, but can use refinement and optimization.
495
496 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
497
498 =cut
499
500 =head1 AUTHOR
501
502 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
503
504 =cut
505
506 =head1 BUGS
507
508 Unknown. If you find any, please contact the author
509
510 =cut
511