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 'winehq.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:06 2008, localtime |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::WINE_Config; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
517
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
17
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
18
|
1
|
|
|
1
|
|
5
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
427
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
1
|
|
|
1
|
0
|
629
|
my $proto = shift; |
22
|
1
|
|
33
|
|
|
8
|
my $class = ref($proto) || $proto; |
23
|
1
|
|
|
|
|
9
|
my $self = $class->SUPER::new(@_); |
24
|
1
|
|
|
|
|
12
|
$self->attributes({ |
25
|
|
|
|
|
|
|
'Comment' => 'Comment', |
26
|
|
|
|
|
|
|
'Key' => 'DataType', |
27
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
28
|
|
|
|
|
|
|
'RegistryBeginEnd' => 'Float', |
29
|
|
|
|
|
|
|
'Section' => 'Keyword', |
30
|
|
|
|
|
|
|
'Value' => 'Variable', |
31
|
|
|
|
|
|
|
'ValueFilesystem1' => 'BaseN', |
32
|
|
|
|
|
|
|
'ValueFilesystem2' => 'DecVal', |
33
|
|
|
|
|
|
|
}); |
34
|
1
|
|
|
|
|
9
|
$self->contextdata({ |
35
|
|
|
|
|
|
|
'Normal' => { |
36
|
|
|
|
|
|
|
callback => \&parseNormal, |
37
|
|
|
|
|
|
|
attribute => 'Normal Text', |
38
|
|
|
|
|
|
|
}, |
39
|
|
|
|
|
|
|
'Value' => { |
40
|
|
|
|
|
|
|
callback => \&parseValue, |
41
|
|
|
|
|
|
|
attribute => 'Normal Text', |
42
|
|
|
|
|
|
|
lineending => '#pop', |
43
|
|
|
|
|
|
|
}, |
44
|
|
|
|
|
|
|
}); |
45
|
1
|
|
|
|
|
7
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
46
|
1
|
|
|
|
|
3
|
$self->basecontext('Normal'); |
47
|
1
|
|
|
|
|
5
|
$self->keywordscase(1); |
48
|
1
|
|
|
|
|
3
|
$self->initialize; |
49
|
1
|
|
|
|
|
3
|
bless ($self, $class); |
50
|
1
|
|
|
|
|
2
|
return $self; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub language { |
54
|
0
|
|
|
0
|
0
|
|
return 'WINE Config'; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub parseNormal { |
58
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
59
|
|
|
|
|
|
|
# String => 'WINE REGISTRY Version.*$' |
60
|
|
|
|
|
|
|
# attribute => 'RegistryBeginEnd' |
61
|
|
|
|
|
|
|
# context => '#stay' |
62
|
|
|
|
|
|
|
# type => 'RegExpr' |
63
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, 'WINE REGISTRY Version.*$', 0, 0, 0, undef, 0, '#stay', 'RegistryBeginEnd')) { |
64
|
0
|
|
|
|
|
|
return 1 |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
# String => '#\s*<\s*wineconf\s*>' |
67
|
|
|
|
|
|
|
# attribute => 'RegistryBeginEnd' |
68
|
|
|
|
|
|
|
# column => '0' |
69
|
|
|
|
|
|
|
# context => '#stay' |
70
|
|
|
|
|
|
|
# type => 'RegExpr' |
71
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '#\\s*<\\s*wineconf\\s*>', 0, 0, 0, 0, 0, '#stay', 'RegistryBeginEnd')) { |
72
|
0
|
|
|
|
|
|
return 1 |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
# String => '#\s*<\s*\/\s*wineconf\s*>' |
75
|
|
|
|
|
|
|
# attribute => 'RegistryBeginEnd' |
76
|
|
|
|
|
|
|
# column => '0' |
77
|
|
|
|
|
|
|
# context => '#stay' |
78
|
|
|
|
|
|
|
# type => 'RegExpr' |
79
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '#\\s*<\\s*\\/\\s*wineconf\\s*>', 0, 0, 0, 0, 0, '#stay', 'RegistryBeginEnd')) { |
80
|
0
|
|
|
|
|
|
return 1 |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
# String => '\[.*\]$' |
83
|
|
|
|
|
|
|
# attribute => 'Section' |
84
|
|
|
|
|
|
|
# column => '0' |
85
|
|
|
|
|
|
|
# context => '#stay' |
86
|
|
|
|
|
|
|
# type => 'RegExpr' |
87
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\[.*\\]$', 0, 0, 0, 0, 0, '#stay', 'Section')) { |
88
|
0
|
|
|
|
|
|
return 1 |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
# String => ';.*$' |
91
|
|
|
|
|
|
|
# attribute => 'Comment' |
92
|
|
|
|
|
|
|
# context => '#stay' |
93
|
|
|
|
|
|
|
# type => 'RegExpr' |
94
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, ';.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { |
95
|
0
|
|
|
|
|
|
return 1 |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
# String => '\s*"\s*[a-zA-Z0-9_.:*]*\s*"' |
98
|
|
|
|
|
|
|
# attribute => 'Key' |
99
|
|
|
|
|
|
|
# context => '#stay' |
100
|
|
|
|
|
|
|
# type => 'RegExpr' |
101
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\s*"\\s*[a-zA-Z0-9_.:*]*\\s*"', 0, 0, 0, undef, 0, '#stay', 'Key')) { |
102
|
0
|
|
|
|
|
|
return 1 |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
# attribute => 'Normal Text' |
105
|
|
|
|
|
|
|
# char => '=' |
106
|
|
|
|
|
|
|
# context => 'Value' |
107
|
|
|
|
|
|
|
# type => 'DetectChar' |
108
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Value', 'Normal Text')) { |
109
|
0
|
|
|
|
|
|
return 1 |
110
|
|
|
|
|
|
|
} |
111
|
0
|
|
|
|
|
|
return 0; |
112
|
|
|
|
|
|
|
}; |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub parseValue { |
115
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
116
|
|
|
|
|
|
|
# String => '\s*".*"' |
117
|
|
|
|
|
|
|
# attribute => 'Value' |
118
|
|
|
|
|
|
|
# context => '#stay' |
119
|
|
|
|
|
|
|
# type => 'RegExpr' |
120
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, '\\s*".*"', 0, 0, 0, undef, 0, '#stay', 'Value')) { |
121
|
0
|
|
|
|
|
|
return 1 |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
# String => ';.*$' |
124
|
|
|
|
|
|
|
# attribute => 'Comment' |
125
|
|
|
|
|
|
|
# context => '#stay' |
126
|
|
|
|
|
|
|
# type => 'RegExpr' |
127
|
0
|
0
|
|
|
|
|
if ($self->testRegExpr($text, ';.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { |
128
|
0
|
|
|
|
|
|
return 1 |
129
|
|
|
|
|
|
|
} |
130
|
0
|
|
|
|
|
|
return 0; |
131
|
|
|
|
|
|
|
}; |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
1; |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
__END__ |