line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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 'mab.xml' file of the syntax highlight |
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 1.03 |
9
|
|
|
|
|
|
|
#kate version 2.4 |
10
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:05 2008, localtime |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::MABminusDB; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.07'; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
895
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
46
|
|
17
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
18
|
1
|
|
|
1
|
|
7
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
496
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
1
|
|
|
1
|
0
|
604
|
my $proto = shift; |
22
|
1
|
|
33
|
|
|
10
|
my $class = ref($proto) || $proto; |
23
|
1
|
|
|
|
|
12
|
my $self = $class->SUPER::new(@_); |
24
|
1
|
|
|
|
|
25
|
$self->attributes({ |
25
|
|
|
|
|
|
|
'Comment' => 'Comment', |
26
|
|
|
|
|
|
|
'Database Header' => 'Operator', |
27
|
|
|
|
|
|
|
'Header Medium' => 'Reserved', |
28
|
|
|
|
|
|
|
'Header Piece' => 'Keyword', |
29
|
|
|
|
|
|
|
'Mab Comment Description' => 'Others', |
30
|
|
|
|
|
|
|
'Mab Comment Type' => 'Alert', |
31
|
|
|
|
|
|
|
'Mab I Field' => 'DecVal', |
32
|
|
|
|
|
|
|
'Mab M Field' => 'Float', |
33
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
34
|
|
|
|
|
|
|
}); |
35
|
1
|
|
|
|
|
13
|
$self->contextdata({ |
36
|
|
|
|
|
|
|
'Section' => { |
37
|
|
|
|
|
|
|
callback => \&parseSection, |
38
|
|
|
|
|
|
|
attribute => 'Normal Text', |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
}); |
41
|
1
|
|
|
|
|
8
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
42
|
1
|
|
|
|
|
4
|
$self->basecontext('Section'); |
43
|
1
|
|
|
|
|
10
|
$self->keywordscase(1); |
44
|
1
|
|
|
|
|
5
|
$self->initialize; |
45
|
1
|
|
|
|
|
4
|
bless ($self, $class); |
46
|
1
|
|
|
|
|
3
|
return $self; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub language { |
50
|
0
|
|
|
0
|
0
|
|
return 'MAB-DB'; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub parseSection { |
54
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
55
|
|
|
|
|
|
|
# String => '\*I [a-zA-Z0-9]* ' |
56
|
|
|
|
|
|
|
# attribute => 'Mab I Field' |
57
|
|
|
|
|
|
|
# column => '0' |
58
|
|
|
|
|
|
|
# context => '#stay' |
59
|
|
|
|
|
|
|
# type => 'RegExpr' |
60
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\*I [a-zA-Z0-9]* ', 0, 0, 0, 0, 0, '#stay', 'Mab I Field')) { |
61
|
0
|
|
|
|
|
|
return 1 |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
# String => '\*\*\*\**E.*' |
64
|
|
|
|
|
|
|
# attribute => 'Header Piece' |
65
|
|
|
|
|
|
|
# column => '0' |
66
|
|
|
|
|
|
|
# context => '#stay' |
67
|
|
|
|
|
|
|
# type => 'RegExpr' |
68
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\*\\*\\*\\**E.*', 0, 0, 0, 0, 0, '#stay', 'Header Piece')) { |
69
|
0
|
|
|
|
|
|
return 1 |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
# String => '\*\*\*\**M.*' |
72
|
|
|
|
|
|
|
# attribute => 'Header Medium' |
73
|
|
|
|
|
|
|
# column => '0' |
74
|
|
|
|
|
|
|
# context => '#stay' |
75
|
|
|
|
|
|
|
# type => 'RegExpr' |
76
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\*\\*\\*\\**M.*', 0, 0, 0, 0, 0, '#stay', 'Header Medium')) { |
77
|
0
|
|
|
|
|
|
return 1 |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
# String => '\*\*\*\* BIBLIOTHECA.*' |
80
|
|
|
|
|
|
|
# attribute => 'Database Header' |
81
|
|
|
|
|
|
|
# column => '0' |
82
|
|
|
|
|
|
|
# context => '#stay' |
83
|
|
|
|
|
|
|
# type => 'RegExpr' |
84
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\*\\*\\*\\* BIBLIOTHECA.*', 0, 0, 0, 0, 0, '#stay', 'Database Header')) { |
85
|
0
|
|
|
|
|
|
return 1 |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
# String => '\*M [a-zA-Z0-9]* ' |
88
|
|
|
|
|
|
|
# attribute => 'Mab M Field' |
89
|
|
|
|
|
|
|
# column => '0' |
90
|
|
|
|
|
|
|
# context => '#stay' |
91
|
|
|
|
|
|
|
# type => 'RegExpr' |
92
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\*M [a-zA-Z0-9]* ', 0, 0, 0, 0, 0, '#stay', 'Mab M Field')) { |
93
|
0
|
|
|
|
|
|
return 1 |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
# String => '\*X TYP .*' |
96
|
|
|
|
|
|
|
# attribute => 'Mab Comment Description' |
97
|
|
|
|
|
|
|
# column => '0' |
98
|
|
|
|
|
|
|
# context => '#stay' |
99
|
|
|
|
|
|
|
# type => 'RegExpr' |
100
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\*X TYP .*', 0, 0, 0, 0, 0, '#stay', 'Mab Comment Description')) { |
101
|
0
|
|
|
|
|
|
return 1 |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
# String => '\*X DESC .*' |
104
|
|
|
|
|
|
|
# attribute => 'Mab Comment Type' |
105
|
|
|
|
|
|
|
# column => '0' |
106
|
|
|
|
|
|
|
# context => '#stay' |
107
|
|
|
|
|
|
|
# type => 'RegExpr' |
108
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\*X DESC .*', 0, 0, 0, 0, 0, '#stay', 'Mab Comment Type')) { |
109
|
0
|
|
|
|
|
|
return 1 |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
# String => '\*X .*' |
112
|
|
|
|
|
|
|
# attribute => 'Comment' |
113
|
|
|
|
|
|
|
# column => '0' |
114
|
|
|
|
|
|
|
# context => '#stay' |
115
|
|
|
|
|
|
|
# type => 'RegExpr' |
116
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\*X .*', 0, 0, 0, 0, 0, '#stay', 'Comment')) { |
117
|
0
|
|
|
|
|
|
return 1 |
118
|
|
|
|
|
|
|
} |
119
|
0
|
|
|
|
|
|
return 0; |
120
|
|
|
|
|
|
|
}; |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
1; |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
__END__ |