Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Syntax / Highlight / Engine / Kate / Fortran.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 'fortran.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7
8 #kate xml version 1.11
9 #kate version 2.4
10 #kate author Franchin Matteo (fnch@libero.it)
11 #generated: Sun Feb  3 22:02:05 2008, localtime
12
13 package Syntax::Highlight::Engine::Kate::Fortran;
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       'Comment' => 'Comment',
27       'Data Type' => 'DataType',
28       'Decimal' => 'DecVal',
29       'Elemental Procedure' => 'BString',
30       'Float' => 'Float',
31       'IO Function' => 'Function',
32       'Inquiry Function' => 'Function',
33       'Keyword' => 'Keyword',
34       'Logical' => 'Reserved',
35       'Non elemental subroutine' => 'Keyword',
36       'Normal Text' => 'Normal',
37       'Operator' => 'Operator',
38       'Preprocessor' => 'Others',
39       'String' => 'String',
40       'Symbol' => 'Normal',
41       'Transformational Function' => 'Variable',
42    });
43    $self->listAdd('elemental_procs',
44       'abs',
45       'achar',
46       'acos',
47       'adjustl',
48       'adjustr',
49       'aimag',
50       'aint',
51       'alog',
52       'alog10',
53       'amax0',
54       'amax1',
55       'amin0',
56       'amin1',
57       'amod',
58       'anint',
59       'aprime',
60       'asin',
61       'atan',
62       'atan2',
63       'btest',
64       'cabs',
65       'ccos',
66       'ceiling',
67       'cexp',
68       'char',
69       'clog',
70       'cmplx',
71       'conjg',
72       'cos',
73       'cosh',
74       'csin',
75       'csqrt',
76       'dabs',
77       'dacos',
78       'dasin',
79       'datan',
80       'datan2',
81       'dble',
82       'dcmplx',
83       'dconjg',
84       'dcos',
85       'dcosh',
86       'ddim',
87       'ddmim',
88       'dexp',
89       'dfloat',
90       'dim',
91       'dimag',
92       'dint',
93       'dlog',
94       'dlog10',
95       'dmax1',
96       'dmin1',
97       'dmod',
98       'dnint',
99       'dprod',
100       'dreal',
101       'dsign',
102       'dsin',
103       'dsinh',
104       'dsqrt',
105       'dtan',
106       'dtanh',
107       'exp',
108       'exponent',
109       'float',
110       'floor',
111       'fraction',
112       'iabs',
113       'iachar',
114       'iand',
115       'ibclr',
116       'ibits',
117       'ibset',
118       'ichar',
119       'idim',
120       'idint',
121       'idnint',
122       'ieor',
123       'ifix',
124       'index',
125       'int',
126       'ior',
127       'ishft',
128       'ishftc',
129       'isign',
130       'len_trim',
131       'lge',
132       'lgt',
133       'lle',
134       'llt',
135       'log',
136       'log10',
137       'logical',
138       'max',
139       'max0',
140       'max1',
141       'merge',
142       'min',
143       'min0',
144       'min1',
145       'mod',
146       'modulo',
147       'mvbits',
148       'nearest',
149       'nint',
150       'not',
151       'rand',
152       'real',
153       'rrspacing',
154       'scale',
155       'scan',
156       'set_exponent',
157       'sign',
158       'sin',
159       'sinh',
160       'sngl',
161       'spacing',
162       'sqrt',
163       'tan',
164       'tanh',
165       'verify',
166    );
167    $self->listAdd('inquire_keywords',
168       'access',
169       'action',
170       'blank',
171       'delim',
172       'direct',
173       'err',
174       'exist',
175       'file',
176       'form',
177       'formatted',
178       'iostat',
179       'name',
180       'named',
181       'nextrec',
182       'number',
183       'opened',
184       'pad',
185       'position',
186       'read',
187       'readwrite',
188       'recl',
189       'sequential',
190       'unformatted',
191       'unit',
192       'write',
193    );
194    $self->listAdd('inquiry_fn',
195       'allocated',
196       'associated',
197       'bit_size',
198       'digits',
199       'epsilon',
200       'huge',
201       'kind',
202       'lbound',
203       'len',
204       'maxexponent',
205       'minexponent',
206       'precision',
207       'present',
208       'radix',
209       'range',
210       'shape',
211       'size',
212       'tiny',
213       'ubound',
214    );
215    $self->listAdd('io_functions',
216       'access',
217       'backspace',
218       'close',
219       'format',
220       'inquire',
221       'open',
222       'print',
223       'read',
224       'rewind',
225       'write',
226    );
227    $self->listAdd('io_keywords',
228       'advance',
229       'end',
230       'eor',
231       'err',
232       'fmt',
233       'iostat',
234       'size',
235       'status',
236       'unit',
237    );
238    $self->listAdd('keywords',
239       'allocate',
240       'assignment',
241       'break',
242       'call',
243       'case',
244       'common',
245       'contains',
246       'continue',
247       'cycle',
248       'deallocate',
249       'default',
250       'do',
251       'elemental',
252       'else',
253       'elseif',
254       'elsewhere',
255       'entry',
256       'equivalence',
257       'exit',
258       'external',
259       'for',
260       'forall',
261       'go',
262       'goto',
263       'if',
264       'implicit',
265       'include',
266       'interface',
267       'intrinsic',
268       'namelist',
269       'none',
270       'nullify',
271       'only',
272       'operator',
273       'pause',
274       'procedure',
275       'pure',
276       'record',
277       'recursive',
278       'result',
279       'return',
280       'select',
281       'selectcase',
282       'stop',
283       'then',
284       'to',
285       'use',
286       'where',
287       'while',
288    );
289    $self->listAdd('non_elem_subr',
290       'date_and_time',
291       'random_number',
292       'random_seed',
293       'system_clock',
294    );
295    $self->listAdd('open_keywords',
296       'access',
297       'action',
298       'blank',
299       'delim',
300       'err',
301       'file',
302       'form',
303       'iostat',
304       'pad',
305       'position',
306       'recl',
307       'status',
308       'unit',
309    );
310    $self->listAdd('transform_fn',
311       'all',
312       'any',
313       'count',
314       'cshift',
315       'dot_product',
316       'eoshift',
317       'matmul',
318       'maxloc',
319       'maxval',
320       'minloc',
321       'minval',
322       'pack',
323       'product',
324       'repeat',
325       'reshape',
326       'selected_int_kind',
327       'selected_real_kind',
328       'spread',
329       'sum',
330       'transfer',
331       'transpose',
332       'trim',
333       'unpack',
334    );
335    $self->listAdd('types',
336       'allocatable',
337       'double',
338       'optional',
339       'parameter',
340       'pointer',
341       'precision',
342       'private',
343       'public',
344       'save',
345       'sequence',
346       'target',
347    );
348    $self->contextdata({
349       'default' => {
350          callback => \&parsedefault,
351          attribute => 'Normal Text',
352       },
353       'end_of_string' => {
354          callback => \&parseend_of_string,
355          attribute => 'String',
356          fallthrough => '#pop#pop',
357       },
358       'find_begin_stmnts' => {
359          callback => \&parsefind_begin_stmnts,
360          attribute => 'Normal Text',
361       },
362       'find_comments' => {
363          callback => \&parsefind_comments,
364          attribute => 'Normal Text',
365       },
366       'find_decls' => {
367          callback => \&parsefind_decls,
368          attribute => 'Normal Text',
369       },
370       'find_end_stmnts' => {
371          callback => \&parsefind_end_stmnts,
372          attribute => 'Normal Text',
373       },
374       'find_intrinsics' => {
375          callback => \&parsefind_intrinsics,
376          attribute => 'Normal Text',
377       },
378       'find_io_paren' => {
379          callback => \&parsefind_io_paren,
380          attribute => 'Normal Text',
381       },
382       'find_io_stmnts' => {
383          callback => \&parsefind_io_stmnts,
384          attribute => 'Normal Text',
385       },
386       'find_numbers' => {
387          callback => \&parsefind_numbers,
388          attribute => 'Normal Text',
389       },
390       'find_op_and_log' => {
391          callback => \&parsefind_op_and_log,
392          attribute => 'Normal Text',
393       },
394       'find_paren' => {
395          callback => \&parsefind_paren,
396          attribute => 'Data Type',
397          lineending => '#pop',
398       },
399       'find_preprocessor' => {
400          callback => \&parsefind_preprocessor,
401          attribute => 'Normal Text',
402       },
403       'find_strings' => {
404          callback => \&parsefind_strings,
405          attribute => 'String',
406       },
407       'find_symbols' => {
408          callback => \&parsefind_symbols,
409          attribute => 'Normal Text',
410       },
411       'format_stmnt' => {
412          callback => \&parseformat_stmnt,
413          attribute => 'Normal Text',
414       },
415       'inside_func_paren' => {
416          callback => \&parseinside_func_paren,
417          attribute => 'Normal Text',
418       },
419       'string_1' => {
420          callback => \&parsestring_1,
421          attribute => 'String',
422          fallthrough => '#pop',
423       },
424       'string_2' => {
425          callback => \&parsestring_2,
426          attribute => 'String',
427          fallthrough => '#pop',
428       },
429    });
430    $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
431    $self->basecontext('default');
432    $self->keywordscase(0);
433    $self->initialize;
434    bless ($self, $class);
435    return $self;
436 }
437
438 sub language {
439    return 'Fortran';
440 }
441
442 sub parsedefault {
443    my ($self, $text) = @_;
444    # context => 'find_strings'
445    # type => 'IncludeRules'
446    if ($self->includeRules('find_strings', $text)) {
447       return 1
448    }
449    # context => 'find_decls'
450    # type => 'IncludeRules'
451    if ($self->includeRules('find_decls', $text)) {
452       return 1
453    }
454    # context => 'find_intrinsics'
455    # type => 'IncludeRules'
456    if ($self->includeRules('find_intrinsics', $text)) {
457       return 1
458    }
459    # context => 'find_io_stmnts'
460    # type => 'IncludeRules'
461    if ($self->includeRules('find_io_stmnts', $text)) {
462       return 1
463    }
464    # context => 'find_op_and_log'
465    # type => 'IncludeRules'
466    if ($self->includeRules('find_op_and_log', $text)) {
467       return 1
468    }
469    # context => 'find_numbers'
470    # type => 'IncludeRules'
471    if ($self->includeRules('find_numbers', $text)) {
472       return 1
473    }
474    # context => 'find_preprocessor'
475    # type => 'IncludeRules'
476    if ($self->includeRules('find_preprocessor', $text)) {
477       return 1
478    }
479    # context => 'find_comments'
480    # type => 'IncludeRules'
481    if ($self->includeRules('find_comments', $text)) {
482       return 1
483    }
484    # context => 'find_symbols'
485    # type => 'IncludeRules'
486    if ($self->includeRules('find_symbols', $text)) {
487       return 1
488    }
489    # context => 'find_end_stmnts'
490    # type => 'IncludeRules'
491    if ($self->includeRules('find_end_stmnts', $text)) {
492       return 1
493    }
494    # context => 'find_begin_stmnts'
495    # type => 'IncludeRules'
496    if ($self->includeRules('find_begin_stmnts', $text)) {
497       return 1
498    }
499    return 0;
500 };
501
502 sub parseend_of_string {
503    my ($self, $text) = @_;
504    # type => 'DetectSpaces'
505    if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) {
506       return 1
507    }
508    # String => '&\s*$'
509    # attribute => 'Keyword'
510    # context => '#stay'
511    # type => 'RegExpr'
512    if ($self->testRegExpr($text, '&\\s*$', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
513       return 1
514    }
515    # attribute => 'Keyword'
516    # char => '&'
517    # context => '#pop'
518    # firstNonSpace => 'true'
519    # type => 'DetectChar'
520    if ($self->testDetectChar($text, '&', 0, 0, 0, undef, 1, '#pop', 'Keyword')) {
521       return 1
522    }
523    # String => '(!.*)?$'
524    # attribute => 'Comment'
525    # context => '#stay'
526    # firstNonSpace => 'true'
527    # type => 'RegExpr'
528    if ($self->testRegExpr($text, '(!.*)?$', 0, 0, 0, undef, 1, '#stay', 'Comment')) {
529       return 1
530    }
531    return 0;
532 };
533
534 sub parsefind_begin_stmnts {
535    my ($self, $text) = @_;
536    # String => '\bmodule\s+procedure\b'
537    # attribute => 'Keyword'
538    # context => '#stay'
539    # insensitive => 'TRUE'
540    # type => 'RegExpr'
541    if ($self->testRegExpr($text, '\\bmodule\\s+procedure\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
542       return 1
543    }
544    # String => '\b(program|subroutine|function|module|block\s*data)\b'
545    # attribute => 'Keyword'
546    # beginRegion => 'Unit'
547    # context => '#stay'
548    # insensitive => 'TRUE'
549    # type => 'RegExpr'
550    if ($self->testRegExpr($text, '\\b(program|subroutine|function|module|block\\s*data)\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
551       return 1
552    }
553    return 0;
554 };
555
556 sub parsefind_comments {
557    my ($self, $text) = @_;
558    # String => '[cC\*].*$'
559    # attribute => 'Comment'
560    # column => '0'
561    # context => '#stay'
562    # type => 'RegExpr'
563    if ($self->testRegExpr($text, '[cC\\*].*$', 0, 0, 0, 0, 0, '#stay', 'Comment')) {
564       return 1
565    }
566    # String => '!.*$'
567    # attribute => 'Comment'
568    # context => '#stay'
569    # type => 'RegExpr'
570    if ($self->testRegExpr($text, '!.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) {
571       return 1
572    }
573    return 0;
574 };
575
576 sub parsefind_decls {
577    my ($self, $text) = @_;
578    # String => '\binteger[\*]\d{1,2}'
579    # attribute => 'Data Type'
580    # context => '#stay'
581    # insensitive => 'TRUE'
582    # type => 'RegExpr'
583    if ($self->testRegExpr($text, '\\binteger[\\*]\\d{1,2}', 1, 0, 0, undef, 0, '#stay', 'Data Type')) {
584       return 1
585    }
586    # String => '\breal[\*]\d{1,2}'
587    # attribute => 'Data Type'
588    # context => '#stay'
589    # insensitive => 'TRUE'
590    # type => 'RegExpr'
591    if ($self->testRegExpr($text, '\\breal[\\*]\\d{1,2}', 1, 0, 0, undef, 0, '#stay', 'Data Type')) {
592       return 1
593    }
594    # String => '\bcomplex[\*]\d{1,2}'
595    # attribute => 'Data Type'
596    # context => '#stay'
597    # insensitive => 'TRUE'
598    # type => 'RegExpr'
599    if ($self->testRegExpr($text, '\\bcomplex[\\*]\\d{1,2}', 1, 0, 0, undef, 0, '#stay', 'Data Type')) {
600       return 1
601    }
602    # String => '\bend\s*type\b'
603    # attribute => 'Data Type'
604    # context => '#stay'
605    # insensitive => 'TRUE'
606    # type => 'RegExpr'
607    if ($self->testRegExpr($text, '\\bend\\s*type\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) {
608       return 1
609    }
610    # String => 'types'
611    # attribute => 'Data Type'
612    # context => '#stay'
613    # type => 'keyword'
614    if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) {
615       return 1
616    }
617    # String => '^\s*data\b'
618    # attribute => 'Data Type'
619    # context => '#stay'
620    # insensitive => 'TRUE'
621    # type => 'RegExpr'
622    if ($self->testRegExpr($text, '^\\s*data\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) {
623       return 1
624    }
625    # String => '^\s*real\s*[(]'
626    # attribute => 'Data Type'
627    # context => 'find_paren'
628    # insensitive => 'TRUE'
629    # type => 'RegExpr'
630    if ($self->testRegExpr($text, '^\\s*real\\s*[(]', 1, 0, 0, undef, 0, 'find_paren', 'Data Type')) {
631       return 1
632    }
633    # String => '^\s*real(?![\w\*])'
634    # attribute => 'Data Type'
635    # context => '#stay'
636    # insensitive => 'TRUE'
637    # type => 'RegExpr'
638    if ($self->testRegExpr($text, '^\\s*real(?![\\w\\*])', 1, 0, 0, undef, 0, '#stay', 'Data Type')) {
639       return 1
640    }
641    # String => '\bcharacter[*][0-9]+\b'
642    # attribute => 'Data Type'
643    # context => '#stay'
644    # insensitive => 'TRUE'
645    # type => 'RegExpr'
646    if ($self->testRegExpr($text, '\\bcharacter[*][0-9]+\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) {
647       return 1
648    }
649    # String => '\b(type|integer|complex|character|logical|intent|dimension)\b\s*[(]'
650    # attribute => 'Data Type'
651    # context => 'find_paren'
652    # insensitive => 'TRUE'
653    # type => 'RegExpr'
654    if ($self->testRegExpr($text, '\\b(type|integer|complex|character|logical|intent|dimension)\\b\\s*[(]', 1, 0, 0, undef, 0, 'find_paren', 'Data Type')) {
655       return 1
656    }
657    # String => '\b(type|integer|complex|character|logical|intent|dimension)\b'
658    # attribute => 'Data Type'
659    # context => '#stay'
660    # insensitive => 'TRUE'
661    # type => 'RegExpr'
662    if ($self->testRegExpr($text, '\\b(type|integer|complex|character|logical|intent|dimension)\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) {
663       return 1
664    }
665    # attribute => 'Data Type'
666    # char => ':'
667    # char1 => ':'
668    # context => '#stay'
669    # type => 'Detect2Chars'
670    if ($self->testDetect2Chars($text, ':', ':', 0, 0, 0, undef, 0, '#stay', 'Data Type')) {
671       return 1
672    }
673    return 0;
674 };
675
676 sub parsefind_end_stmnts {
677    my ($self, $text) = @_;
678    # String => '\bend\s*(program|subroutine|function|module|block\s*data)\b'
679    # attribute => 'Keyword'
680    # context => '#stay'
681    # endRegion => 'Unit'
682    # insensitive => 'TRUE'
683    # type => 'RegExpr'
684    if ($self->testRegExpr($text, '\\bend\\s*(program|subroutine|function|module|block\\s*data)\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
685       return 1
686    }
687    # String => '\bend\s*(do|if|select|where|forall|interface)\b'
688    # attribute => 'Keyword'
689    # context => '#stay'
690    # insensitive => 'TRUE'
691    # type => 'RegExpr'
692    if ($self->testRegExpr($text, '\\bend\\s*(do|if|select|where|forall|interface)\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
693       return 1
694    }
695    # String => '\bend\b'
696    # attribute => 'Keyword'
697    # context => '#stay'
698    # endRegion => 'Unit'
699    # insensitive => 'TRUE'
700    # type => 'RegExpr'
701    if ($self->testRegExpr($text, '\\bend\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
702       return 1
703    }
704    return 0;
705 };
706
707 sub parsefind_intrinsics {
708    my ($self, $text) = @_;
709    # String => 'keywords'
710    # attribute => 'Keyword'
711    # context => '#stay'
712    # type => 'keyword'
713    if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
714       return 1
715    }
716    # String => 'elemental_procs'
717    # attribute => 'Elemental Procedure'
718    # context => '#stay'
719    # type => 'keyword'
720    if ($self->testKeyword($text, 'elemental_procs', 0, undef, 0, '#stay', 'Elemental Procedure')) {
721       return 1
722    }
723    # String => 'inquiry_fn'
724    # attribute => 'Inquiry Function'
725    # context => '#stay'
726    # type => 'keyword'
727    if ($self->testKeyword($text, 'inquiry_fn', 0, undef, 0, '#stay', 'Inquiry Function')) {
728       return 1
729    }
730    # String => 'transform_fn'
731    # attribute => 'Transformational Function'
732    # context => '#stay'
733    # type => 'keyword'
734    if ($self->testKeyword($text, 'transform_fn', 0, undef, 0, '#stay', 'Transformational Function')) {
735       return 1
736    }
737    # String => 'non_elem_subr'
738    # attribute => 'Non elemental subroutine'
739    # context => '#stay'
740    # type => 'keyword'
741    if ($self->testKeyword($text, 'non_elem_subr', 0, undef, 0, '#stay', 'Non elemental subroutine')) {
742       return 1
743    }
744    return 0;
745 };
746
747 sub parsefind_io_paren {
748    my ($self, $text) = @_;
749    # attribute => 'IO Function'
750    # char => '*'
751    # context => '#stay'
752    # type => 'DetectChar'
753    if ($self->testDetectChar($text, '*', 0, 0, 0, undef, 0, '#stay', 'IO Function')) {
754       return 1
755    }
756    # attribute => 'Normal Text'
757    # char => '('
758    # context => 'inside_func_paren'
759    # type => 'DetectChar'
760    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'inside_func_paren', 'Normal Text')) {
761       return 1
762    }
763    # attribute => 'IO Function'
764    # char => ')'
765    # context => '#pop'
766    # type => 'DetectChar'
767    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'IO Function')) {
768       return 1
769    }
770    # String => 'io_keywords'
771    # attribute => 'IO Function'
772    # context => '#stay'
773    # type => 'keyword'
774    if ($self->testKeyword($text, 'io_keywords', 0, undef, 0, '#stay', 'IO Function')) {
775       return 1
776    }
777    # String => 'inquire_keywords'
778    # attribute => 'IO Function'
779    # context => '#stay'
780    # type => 'keyword'
781    if ($self->testKeyword($text, 'inquire_keywords', 0, undef, 0, '#stay', 'IO Function')) {
782       return 1
783    }
784    # String => 'open_keywords'
785    # attribute => 'IO Function'
786    # context => '#stay'
787    # type => 'keyword'
788    if ($self->testKeyword($text, 'open_keywords', 0, undef, 0, '#stay', 'IO Function')) {
789       return 1
790    }
791    # context => 'find_strings'
792    # type => 'IncludeRules'
793    if ($self->includeRules('find_strings', $text)) {
794       return 1
795    }
796    # context => 'find_intrinsics'
797    # type => 'IncludeRules'
798    if ($self->includeRules('find_intrinsics', $text)) {
799       return 1
800    }
801    # context => 'find_numbers'
802    # type => 'IncludeRules'
803    if ($self->includeRules('find_numbers', $text)) {
804       return 1
805    }
806    # context => 'find_symbols'
807    # type => 'IncludeRules'
808    if ($self->includeRules('find_symbols', $text)) {
809       return 1
810    }
811    return 0;
812 };
813
814 sub parsefind_io_stmnts {
815    my ($self, $text) = @_;
816    # String => '\b(read|write|backspace|rewind|end\s*file|close)\s*[(]'
817    # attribute => 'IO Function'
818    # context => 'find_io_paren'
819    # insensitive => 'TRUE'
820    # type => 'RegExpr'
821    if ($self->testRegExpr($text, '\\b(read|write|backspace|rewind|end\\s*file|close)\\s*[(]', 1, 0, 0, undef, 0, 'find_io_paren', 'IO Function')) {
822       return 1
823    }
824    # String => '\bopen\s*[(]'
825    # attribute => 'IO Function'
826    # context => 'find_io_paren'
827    # insensitive => 'TRUE'
828    # type => 'RegExpr'
829    if ($self->testRegExpr($text, '\\bopen\\s*[(]', 1, 0, 0, undef, 0, 'find_io_paren', 'IO Function')) {
830       return 1
831    }
832    # String => '\binquire\s*[(]'
833    # attribute => 'IO Function'
834    # context => 'find_io_paren'
835    # insensitive => 'TRUE'
836    # type => 'RegExpr'
837    if ($self->testRegExpr($text, '\\binquire\\s*[(]', 1, 0, 0, undef, 0, 'find_io_paren', 'IO Function')) {
838       return 1
839    }
840    # String => '\bformat\s*[(]'
841    # attribute => 'IO Function'
842    # context => 'format_stmnt'
843    # insensitive => 'TRUE'
844    # type => 'RegExpr'
845    if ($self->testRegExpr($text, '\\bformat\\s*[(]', 1, 0, 0, undef, 0, 'format_stmnt', 'IO Function')) {
846       return 1
847    }
848    # String => '\bend\s*file\b'
849    # attribute => 'IO Function'
850    # context => '#stay'
851    # insensitive => 'TRUE'
852    # type => 'RegExpr'
853    if ($self->testRegExpr($text, '\\bend\\s*file\\b', 1, 0, 0, undef, 0, '#stay', 'IO Function')) {
854       return 1
855    }
856    # String => 'io_functions'
857    # attribute => 'IO Function'
858    # context => '#stay'
859    # type => 'keyword'
860    if ($self->testKeyword($text, 'io_functions', 0, undef, 0, '#stay', 'IO Function')) {
861       return 1
862    }
863    return 0;
864 };
865
866 sub parsefind_numbers {
867    my ($self, $text) = @_;
868    # String => '[0-9]*\.[0-9]+([de][+-]?[0-9]+)?([_]([0-9]+|[a-z][\w_]*))?'
869    # attribute => 'Float'
870    # context => '#stay'
871    # insensitive => 'TRUE'
872    # type => 'RegExpr'
873    if ($self->testRegExpr($text, '[0-9]*\\.[0-9]+([de][+-]?[0-9]+)?([_]([0-9]+|[a-z][\\w_]*))?', 1, 0, 0, undef, 0, '#stay', 'Float')) {
874       return 1
875    }
876    # String => '\b[0-9]+\.[0-9]*([de][+-]?[0-9]+)?([_]([0-9]+|[a-z][\w_]*))?(?![a-z])'
877    # attribute => 'Float'
878    # context => '#stay'
879    # insensitive => 'TRUE'
880    # type => 'RegExpr'
881    if ($self->testRegExpr($text, '\\b[0-9]+\\.[0-9]*([de][+-]?[0-9]+)?([_]([0-9]+|[a-z][\\w_]*))?(?![a-z])', 1, 0, 0, undef, 0, '#stay', 'Float')) {
882       return 1
883    }
884    # String => '\b[0-9]+[de][+-]?[0-9]+([_]([0-9]+|[a-z][\w_]*))?'
885    # attribute => 'Float'
886    # context => '#stay'
887    # insensitive => 'TRUE'
888    # type => 'RegExpr'
889    if ($self->testRegExpr($text, '\\b[0-9]+[de][+-]?[0-9]+([_]([0-9]+|[a-z][\\w_]*))?', 1, 0, 0, undef, 0, '#stay', 'Float')) {
890       return 1
891    }
892    # String => '\b[0-9]+([_]([0-9]+|[a-zA-Z][\w_]*))?'
893    # attribute => 'Decimal'
894    # context => '#stay'
895    # type => 'RegExpr'
896    if ($self->testRegExpr($text, '\\b[0-9]+([_]([0-9]+|[a-zA-Z][\\w_]*))?', 0, 0, 0, undef, 0, '#stay', 'Decimal')) {
897       return 1
898    }
899    # String => '\b[bozx](['][0-9a-f]+[']|["][0-9a-f]+["])'
900    # attribute => 'Decimal'
901    # context => '#stay'
902    # insensitive => 'TRUE'
903    # type => 'RegExpr'
904    if ($self->testRegExpr($text, '\\b[bozx]([\'][0-9a-f]+[\']|["][0-9a-f]+["])', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
905       return 1
906    }
907    return 0;
908 };
909
910 sub parsefind_op_and_log {
911    my ($self, $text) = @_;
912    # String => '\.(true|false)\.'
913    # attribute => 'Logical'
914    # context => '#stay'
915    # insensitive => 'TRUE'
916    # type => 'RegExpr'
917    if ($self->testRegExpr($text, '\\.(true|false)\\.', 1, 0, 0, undef, 0, '#stay', 'Logical')) {
918       return 1
919    }
920    # String => '\.[A-Za-z]+\.'
921    # attribute => 'Operator'
922    # context => '#stay'
923    # type => 'RegExpr'
924    if ($self->testRegExpr($text, '\\.[A-Za-z]+\\.', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
925       return 1
926    }
927    # String => '(==|/=|<|<=|>|>=)'
928    # attribute => 'Operator'
929    # context => '#stay'
930    # type => 'RegExpr'
931    if ($self->testRegExpr($text, '(==|/=|<|<=|>|>=)', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
932       return 1
933    }
934    return 0;
935 };
936
937 sub parsefind_paren {
938    my ($self, $text) = @_;
939    # attribute => 'Data Type'
940    # char => '('
941    # context => 'find_paren'
942    # type => 'DetectChar'
943    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'find_paren', 'Data Type')) {
944       return 1
945    }
946    # attribute => 'Data Type'
947    # char => ')'
948    # context => '#pop'
949    # type => 'DetectChar'
950    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Data Type')) {
951       return 1
952    }
953    return 0;
954 };
955
956 sub parsefind_preprocessor {
957    my ($self, $text) = @_;
958    # String => '(#|cDEC\$|CDEC\$).*$'
959    # attribute => 'Preprocessor'
960    # column => '0'
961    # context => '#stay'
962    # type => 'RegExpr'
963    if ($self->testRegExpr($text, '(#|cDEC\\$|CDEC\\$).*$', 0, 0, 0, 0, 0, '#stay', 'Preprocessor')) {
964       return 1
965    }
966    return 0;
967 };
968
969 sub parsefind_strings {
970    my ($self, $text) = @_;
971    # attribute => 'String'
972    # char => '''
973    # context => 'string_1'
974    # type => 'DetectChar'
975    if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'string_1', 'String')) {
976       return 1
977    }
978    # attribute => 'String'
979    # char => '"'
980    # context => 'string_2'
981    # type => 'DetectChar'
982    if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string_2', 'String')) {
983       return 1
984    }
985    return 0;
986 };
987
988 sub parsefind_symbols {
989    my ($self, $text) = @_;
990    # attribute => 'Keyword'
991    # char => '*'
992    # char1 => '*'
993    # context => '#stay'
994    # type => 'Detect2Chars'
995    if ($self->testDetect2Chars($text, '*', '*', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
996       return 1
997    }
998    # attribute => 'Keyword'
999    # char => '('
1000    # char1 => '/'
1001    # context => '#stay'
1002    # type => 'Detect2Chars'
1003    if ($self->testDetect2Chars($text, '(', '/', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
1004       return 1
1005    }
1006    # attribute => 'Keyword'
1007    # char => '/'
1008    # char1 => ')'
1009    # context => '#stay'
1010    # type => 'Detect2Chars'
1011    if ($self->testDetect2Chars($text, '/', ')', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
1012       return 1
1013    }
1014    # String => '&+-*/=?[]^{|}~'
1015    # attribute => 'Keyword'
1016    # context => '#stay'
1017    # type => 'AnyChar'
1018    if ($self->testAnyChar($text, '&+-*/=?[]^{|}~', 0, 0, undef, 0, '#stay', 'Keyword')) {
1019       return 1
1020    }
1021    # String => '(),'
1022    # attribute => 'Symbol'
1023    # context => '#stay'
1024    # type => 'AnyChar'
1025    if ($self->testAnyChar($text, '(),', 0, 0, undef, 0, '#stay', 'Symbol')) {
1026       return 1
1027    }
1028    return 0;
1029 };
1030
1031 sub parseformat_stmnt {
1032    my ($self, $text) = @_;
1033    # attribute => 'IO Function'
1034    # char => '('
1035    # context => 'format_stmnt'
1036    # type => 'DetectChar'
1037    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'format_stmnt', 'IO Function')) {
1038       return 1
1039    }
1040    # attribute => 'IO Function'
1041    # char => ')'
1042    # context => '#pop'
1043    # type => 'DetectChar'
1044    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'IO Function')) {
1045       return 1
1046    }
1047    # String => '[0-9]*/'
1048    # attribute => 'IO Function'
1049    # context => '#stay'
1050    # insensitive => 'TRUE'
1051    # type => 'RegExpr'
1052    if ($self->testRegExpr($text, '[0-9]*/', 1, 0, 0, undef, 0, '#stay', 'IO Function')) {
1053       return 1
1054    }
1055    # String => ':'
1056    # attribute => 'IO Function'
1057    # context => '#stay'
1058    # type => 'AnyChar'
1059    if ($self->testAnyChar($text, ':', 0, 0, undef, 0, '#stay', 'IO Function')) {
1060       return 1
1061    }
1062    # context => 'find_strings'
1063    # type => 'IncludeRules'
1064    if ($self->includeRules('find_strings', $text)) {
1065       return 1
1066    }
1067    # context => 'find_symbols'
1068    # type => 'IncludeRules'
1069    if ($self->includeRules('find_symbols', $text)) {
1070       return 1
1071    }
1072    return 0;
1073 };
1074
1075 sub parseinside_func_paren {
1076    my ($self, $text) = @_;
1077    # attribute => 'Normal Text'
1078    # char => '('
1079    # context => 'inside_func_paren'
1080    # type => 'DetectChar'
1081    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'inside_func_paren', 'Normal Text')) {
1082       return 1
1083    }
1084    # attribute => 'Normal Text'
1085    # char => ')'
1086    # context => '#pop'
1087    # type => 'DetectChar'
1088    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) {
1089       return 1
1090    }
1091    # context => 'find_strings'
1092    # type => 'IncludeRules'
1093    if ($self->includeRules('find_strings', $text)) {
1094       return 1
1095    }
1096    # context => 'find_intrinsics'
1097    # type => 'IncludeRules'
1098    if ($self->includeRules('find_intrinsics', $text)) {
1099       return 1
1100    }
1101    # context => 'find_numbers'
1102    # type => 'IncludeRules'
1103    if ($self->includeRules('find_numbers', $text)) {
1104       return 1
1105    }
1106    return 0;
1107 };
1108
1109 sub parsestring_1 {
1110    my ($self, $text) = @_;
1111    # String => '[^']*''
1112    # attribute => 'String'
1113    # context => '#pop'
1114    # type => 'RegExpr'
1115    if ($self->testRegExpr($text, '[^\']*\'', 0, 0, 0, undef, 0, '#pop', 'String')) {
1116       return 1
1117    }
1118    # String => '&\s*$'
1119    # attribute => 'Keyword'
1120    # context => 'end_of_string'
1121    # type => 'RegExpr'
1122    if ($self->testRegExpr($text, '&\\s*$', 0, 0, 0, undef, 0, 'end_of_string', 'Keyword')) {
1123       return 1
1124    }
1125    # String => '.*(?=&\s*$)'
1126    # attribute => 'String'
1127    # context => 'end_of_string'
1128    # type => 'RegExpr'
1129    if ($self->testRegExpr($text, '.*(?=&\\s*$)', 0, 0, 0, undef, 0, 'end_of_string', 'String')) {
1130       return 1
1131    }
1132    return 0;
1133 };
1134
1135 sub parsestring_2 {
1136    my ($self, $text) = @_;
1137    # String => '[^"]*"'
1138    # attribute => 'String'
1139    # context => '#pop'
1140    # type => 'RegExpr'
1141    if ($self->testRegExpr($text, '[^"]*"', 0, 0, 0, undef, 0, '#pop', 'String')) {
1142       return 1
1143    }
1144    # String => '&\s*$'
1145    # attribute => 'Keyword'
1146    # context => 'end_of_string'
1147    # type => 'RegExpr'
1148    if ($self->testRegExpr($text, '&\\s*$', 0, 0, 0, undef, 0, 'end_of_string', 'Keyword')) {
1149       return 1
1150    }
1151    # String => '.*(?=&\s*$)'
1152    # attribute => 'String'
1153    # context => 'end_of_string'
1154    # type => 'RegExpr'
1155    if ($self->testRegExpr($text, '.*(?=&\\s*$)', 0, 0, 0, undef, 0, 'end_of_string', 'String')) {
1156       return 1
1157    }
1158    return 0;
1159 };
1160
1161
1162 1;
1163
1164 __END__
1165
1166 =head1 NAME
1167
1168 Syntax::Highlight::Engine::Kate::Fortran - a Plugin for Fortran syntax highlighting
1169
1170 =head1 SYNOPSIS
1171
1172  require Syntax::Highlight::Engine::Kate::Fortran;
1173  my $sh = new Syntax::Highlight::Engine::Kate::Fortran([
1174  ]);
1175
1176 =head1 DESCRIPTION
1177
1178 Syntax::Highlight::Engine::Kate::Fortran is a  plugin module that provides syntax highlighting
1179 for Fortran to the Syntax::Haghlight::Engine::Kate highlighting engine.
1180
1181 This code is generated from the syntax definition files used
1182 by the Kate project.
1183 It works quite fine, but can use refinement and optimization.
1184
1185 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
1186
1187 =cut
1188
1189 =head1 AUTHOR
1190
1191 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
1192
1193 =cut
1194
1195 =head1 BUGS
1196
1197 Unknown. If you find any, please contact the author
1198
1199 =cut
1200