Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Syntax / Highlight / Engine / Kate / TaskJuggler.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 'taskjuggler.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7
8 #kate xml version 1.21
9 #kate version 2.1
10 #generated: Sun Feb  3 22:02:06 2008, localtime
11
12 package Syntax::Highlight::Engine::Kate::TaskJuggler;
13
14 our $VERSION = '0.06';
15
16 use strict;
17 use warnings;
18 use base('Syntax::Highlight::Engine::Kate::Template');
19
20 sub new {
21    my $proto = shift;
22    my $class = ref($proto) || $proto;
23    my $self = $class->SUPER::new(@_);
24    $self->attributes({
25       'Builtin Function' => 'Function',
26       'Char' => 'Char',
27       'Comment' => 'Comment',
28       'Data Types' => 'DataType',
29       'Decimal' => 'DecVal',
30       'Float' => 'Float',
31       'Hex' => 'BaseN',
32       'Keyword' => 'Keyword',
33       'Normal Text' => 'Normal',
34       'Octal' => 'BaseN',
35       'String' => 'String',
36       'String Char' => 'Char',
37       'Symbol' => 'Normal',
38    });
39    $self->listAdd('builtinfuncs',
40       'accountid',
41       'accountreport',
42       'accumulate',
43       'allocate',
44       'allowredefinitions',
45       'alternative',
46       'barlabels',
47       'booking',
48       'caption',
49       'celltext',
50       'cellurl',
51       'columns',
52       'complete',
53       'completed',
54       'copyright',
55       'cost',
56       'credit',
57       'criticalness',
58       'csvaccountreport',
59       'csvresourcereport',
60       'csvtaskreport',
61       'currency',
62       'currencydigits',
63       'currencyformat',
64       'dailymax',
65       'dailyworkinghours',
66       'db',
67       'depends',
68       'disabled',
69       'duration',
70       'efficiency',
71       'effort',
72       'empty',
73       'end',
74       'endbuffer',
75       'endbufferstart',
76       'endcredit',
77       'endsAfter',
78       'endsBefore',
79       'export',
80       'extend',
81       'finished',
82       'flags',
83       'follows',
84       'freeload',
85       'gapduration',
86       'gaplength',
87       'headline',
88       'hideaccount',
89       'hidecelltext',
90       'hidecellurl',
91       'hideresource',
92       'hidetask',
93       'hierarchindex',
94       'hierarchno',
95       'htmlaccountreport',
96       'htmlresourcereport',
97       'htmlstatusreport',
98       'htmltaskreport',
99       'htmlweeklycalendar',
100       'id',
101       'include',
102       'index',
103       'inherit',
104       'inprogress',
105       'journalentry',
106       'kotrusid',
107       'kotrusmode',
108       'label',
109       'late',
110       'length',
111       'limits',
112       'load',
113       'loadunit',
114       'macro',
115       'mandatory',
116       'maxeffort',
117       'maxend',
118       'maxstart',
119       'milestone',
120       'mineffort',
121       'minend',
122       'minstart',
123       'monthlymax',
124       'name',
125       'no',
126       'nokotrus',
127       'note',
128       'notimestamp',
129       'notstarted',
130       'now',
131       'numberformat',
132       'ontime',
133       'optimize',
134       'order',
135       'pathcriticalness',
136       'persistent',
137       'precedes',
138       'priority',
139       'profit',
140       'projectid',
141       'projectids',
142       'projection',
143       'rate',
144       'rawhead',
145       'rawstylesheet',
146       'rawtail',
147       'reference',
148       'resourceid',
149       'resourcereport',
150       'resources',
151       'responsibilities',
152       'responsible',
153       'revenue',
154       'rollupaccount',
155       'rollupresource',
156       'rolluptask',
157       'scenario',
158       'scenarios',
159       'schedule',
160       'scheduled',
161       'scheduling',
162       'select',
163       'separator',
164       'seqno',
165       'shorttimeformat',
166       'showprojectids',
167       'sortaccounts',
168       'sortresources',
169       'sorttasks',
170       'start',
171       'startbuffer',
172       'startbufferend',
173       'startcredit',
174       'startsAfter',
175       'startsBefore',
176       'status',
177       'statusnote',
178       'subtitle',
179       'subtitleurl',
180       'supplement',
181       'table',
182       'taskattributes',
183       'taskid',
184       'taskprefix',
185       'taskreport',
186       'taskroot',
187       'text',
188       'timeformat',
189       'timezone',
190       'timingresolution',
191       'title',
192       'titleurl',
193       'total',
194       'tree',
195       'treeLevel',
196       'url',
197       'utilization',
198       'vacation',
199       'version',
200       'weeklymax',
201       'weekstartsmonday',
202       'weekstartssunday',
203       'workinghours',
204       'xml',
205       'xmlreport',
206       'yearlyworkingdays',
207    );
208    $self->listAdd('keywords',
209       'account',
210       'project',
211       'resource',
212       'scenario',
213       'shift',
214       'task',
215    );
216    $self->listAdd('types',
217       'alap',
218       'all',
219       'asap',
220       'completeddown',
221       'completedup',
222       'containstask',
223       'criticalnessdown',
224       'criticalnessup',
225       'd',
226       'daily',
227       'day',
228       'days',
229       'enddown',
230       'endup',
231       'fri',
232       'fullnamedown',
233       'fullnameup',
234       'h',
235       'hours',
236       'iddown',
237       'idup',
238       'indexdown',
239       'indexup',
240       'inprogressearly',
241       'inprogresslate',
242       'isAResource',
243       'isATask',
244       'isAccount',
245       'isAllocated',
246       'isAllocatedToProject',
247       'isAnAccount',
248       'isChildOf',
249       'isDutyOf',
250       'isLeaf',
251       'isMilestone',
252       'isParentOf',
253       'isResource',
254       'isTask',
255       'isTaskOfProject',
256       'isTaskStatus',
257       'isactualallocated',
258       'isatask',
259       'isplanallocated',
260       'issubtaskof',
261       'kotrusiddown',
262       'kotrusidup',
263       'longauto',
264       'm',
265       'maxeffortdown',
266       'maxeffortup',
267       'maxloaded',
268       'min',
269       'minallocated',
270       'mineffortdown',
271       'mineffortup',
272       'minloaded',
273       'minutes',
274       'mon',
275       'month',
276       'monthly',
277       'months',
278       'namedown',
279       'nameup',
280       'off',
281       'pathcriticalnessdown',
282       'pathcriticalnessup',
283       'prioritydown',
284       'priorityup',
285       'quarter',
286       'quarterly',
287       'random',
288       'ratedown',
289       'rateup',
290       'responsibledown',
291       'responsibleup',
292       'sat',
293       'sequencedown',
294       'sequenceup',
295       'shortauto',
296       'startdown',
297       'startup',
298       'statusdown',
299       'statusup',
300       'sun',
301       'thu',
302       'tue',
303       'undefined',
304       'w',
305       'wed',
306       'week',
307       'weekly',
308       'weeks',
309       'y',
310       'year',
311       'yearly',
312       'years',
313    );
314    $self->contextdata({
315       'Comment1' => {
316          callback => \&parseComment1,
317          attribute => 'Comment',
318          lineending => '#pop',
319       },
320       'Comment2' => {
321          callback => \&parseComment2,
322          attribute => 'Comment',
323       },
324       'Normal' => {
325          callback => \&parseNormal,
326          attribute => 'Normal Text',
327       },
328       'String1' => {
329          callback => \&parseString1,
330          attribute => 'String',
331       },
332       'String2' => {
333          callback => \&parseString2,
334          attribute => 'String',
335       },
336    });
337    $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
338    $self->basecontext('Normal');
339    $self->keywordscase(0);
340    $self->initialize;
341    bless ($self, $class);
342    return $self;
343 }
344
345 sub language {
346    return 'TaskJuggler';
347 }
348
349 sub parseComment1 {
350    my ($self, $text) = @_;
351    # context => '##Alerts'
352    # type => 'IncludeRules'
353    if ($self->includePlugin('Alerts', $text)) {
354       return 1
355    }
356    return 0;
357 };
358
359 sub parseComment2 {
360    my ($self, $text) = @_;
361    # attribute => 'Comment'
362    # char => '*'
363    # char1 => '/'
364    # context => '#pop'
365    # type => 'Detect2Chars'
366    if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
367       return 1
368    }
369    return 0;
370 };
371
372 sub parseNormal {
373    my ($self, $text) = @_;
374    # String => 'builtinfuncs'
375    # attribute => 'Builtin Function'
376    # context => '#stay'
377    # type => 'keyword'
378    if ($self->testKeyword($text, 'builtinfuncs', 0, undef, 0, '#stay', 'Builtin Function')) {
379       return 1
380    }
381    # String => 'keywords'
382    # attribute => 'Keyword'
383    # context => '#stay'
384    # type => 'keyword'
385    if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
386       return 1
387    }
388    # String => 'types'
389    # attribute => 'Data Types'
390    # context => '#stay'
391    # type => 'keyword'
392    if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Types')) {
393       return 1
394    }
395    # attribute => 'Symbol'
396    # beginRegion => 'Brace2'
397    # char => '{'
398    # context => '#stay'
399    # type => 'DetectChar'
400    if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
401       return 1
402    }
403    # attribute => 'Symbol'
404    # char => '}'
405    # context => '#stay'
406    # endRegion => 'Brace2'
407    # type => 'DetectChar'
408    if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
409       return 1
410    }
411    # attribute => 'Symbol'
412    # beginRegion => 'Brace1'
413    # char => '['
414    # context => '#stay'
415    # type => 'DetectChar'
416    if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
417       return 1
418    }
419    # attribute => 'Symbol'
420    # char => ']'
421    # context => '#stay'
422    # endRegion => 'Brace1'
423    # type => 'DetectChar'
424    if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
425       return 1
426    }
427    # attribute => 'Float'
428    # context => '#stay'
429    # items => 'ARRAY(0x1782620)'
430    # type => 'Float'
431    if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
432       # String => 'fF'
433       # attribute => 'Float'
434       # context => '#stay'
435       # type => 'AnyChar'
436       if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) {
437          return 1
438       }
439    }
440    # attribute => 'Decimal'
441    # context => '#stay'
442    # items => 'ARRAY(0x16a0c30)'
443    # type => 'Int'
444    if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
445       # String => 'ULL'
446       # attribute => 'Decimal'
447       # context => '#stay'
448       # insensitive => 'TRUE'
449       # type => 'StringDetect'
450       if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
451          return 1
452       }
453       # String => 'LUL'
454       # attribute => 'Decimal'
455       # context => '#stay'
456       # insensitive => 'TRUE'
457       # type => 'StringDetect'
458       if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
459          return 1
460       }
461       # String => 'LLU'
462       # attribute => 'Decimal'
463       # context => '#stay'
464       # insensitive => 'TRUE'
465       # type => 'StringDetect'
466       if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
467          return 1
468       }
469       # String => 'UL'
470       # attribute => 'Decimal'
471       # context => '#stay'
472       # insensitive => 'TRUE'
473       # type => 'StringDetect'
474       if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
475          return 1
476       }
477       # String => 'LU'
478       # attribute => 'Decimal'
479       # context => '#stay'
480       # insensitive => 'TRUE'
481       # type => 'StringDetect'
482       if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
483          return 1
484       }
485       # String => 'LL'
486       # attribute => 'Decimal'
487       # context => '#stay'
488       # insensitive => 'TRUE'
489       # type => 'StringDetect'
490       if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
491          return 1
492       }
493       # String => 'U'
494       # attribute => 'Decimal'
495       # context => '#stay'
496       # insensitive => 'TRUE'
497       # type => 'StringDetect'
498       if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
499          return 1
500       }
501       # String => 'L'
502       # attribute => 'Decimal'
503       # context => '#stay'
504       # insensitive => 'TRUE'
505       # type => 'StringDetect'
506       if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
507          return 1
508       }
509    }
510    # attribute => 'String'
511    # char => '''
512    # context => 'String1'
513    # type => 'DetectChar'
514    if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String1', 'String')) {
515       return 1
516    }
517    # attribute => 'String'
518    # char => '"'
519    # context => 'String2'
520    # type => 'DetectChar'
521    if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String2', 'String')) {
522       return 1
523    }
524    # attribute => 'Comment'
525    # char => '#'
526    # context => 'Comment1'
527    # type => 'DetectChar'
528    if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Comment1', 'Comment')) {
529       return 1
530    }
531    # attribute => 'Comment'
532    # char => '/'
533    # char1 => '*'
534    # context => 'Comment2'
535    # type => 'Detect2Chars'
536    if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Comment2', 'Comment')) {
537       return 1
538    }
539    return 0;
540 };
541
542 sub parseString1 {
543    my ($self, $text) = @_;
544    # attribute => 'String'
545    # char => '''
546    # context => '#pop'
547    # type => 'DetectChar'
548    if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) {
549       return 1
550    }
551    return 0;
552 };
553
554 sub parseString2 {
555    my ($self, $text) = @_;
556    # attribute => 'String'
557    # char => '"'
558    # context => '#pop'
559    # type => 'DetectChar'
560    if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
561       return 1
562    }
563    return 0;
564 };
565
566
567 1;
568
569 __END__
570
571 =head1 NAME
572
573 Syntax::Highlight::Engine::Kate::TaskJuggler - a Plugin for TaskJuggler syntax highlighting
574
575 =head1 SYNOPSIS
576
577  require Syntax::Highlight::Engine::Kate::TaskJuggler;
578  my $sh = new Syntax::Highlight::Engine::Kate::TaskJuggler([
579  ]);
580
581 =head1 DESCRIPTION
582
583 Syntax::Highlight::Engine::Kate::TaskJuggler is a  plugin module that provides syntax highlighting
584 for TaskJuggler to the Syntax::Haghlight::Engine::Kate highlighting engine.
585
586 This code is generated from the syntax definition files used
587 by the Kate project.
588 It works quite fine, but can use refinement and optimization.
589
590 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
591
592 =cut
593
594 =head1 AUTHOR
595
596 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
597
598 =cut
599
600 =head1 BUGS
601
602 Unknown. If you find any, please contact the author
603
604 =cut
605