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 'cue.xml' file of the syntax highlight |
6
|
|
|
|
|
|
|
# engine of the kate text editor (http://www.kate-editor.org |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
#kate xml version 0.91 |
9
|
|
|
|
|
|
|
#kate version 2.1 |
10
|
|
|
|
|
|
|
#generated: Sun Feb 3 22:02:04 2008, localtime |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Syntax::Highlight::Engine::Kate::CUE_Sheet; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.14'; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
470
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
17
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
31
|
|
18
|
1
|
|
|
1
|
|
5
|
use base('Syntax::Highlight::Engine::Kate::Template'); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
484
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
1
|
|
|
1
|
0
|
551
|
my $proto = shift; |
22
|
1
|
|
33
|
|
|
6
|
my $class = ref($proto) || $proto; |
23
|
1
|
|
|
|
|
7
|
my $self = $class->SUPER::new(@_); |
24
|
1
|
|
|
|
|
9
|
$self->attributes({ |
25
|
|
|
|
|
|
|
'Comment' => 'Comment', |
26
|
|
|
|
|
|
|
'Decimal' => 'DecVal', |
27
|
|
|
|
|
|
|
'Flags' => 'Reserved', |
28
|
|
|
|
|
|
|
'Format' => 'Function', |
29
|
|
|
|
|
|
|
'Keyword' => 'Keyword', |
30
|
|
|
|
|
|
|
'Mode' => 'Operator', |
31
|
|
|
|
|
|
|
'Normal Text' => 'Normal', |
32
|
|
|
|
|
|
|
'String' => 'String', |
33
|
|
|
|
|
|
|
}); |
34
|
1
|
|
|
|
|
5
|
$self->listAdd('flags', |
35
|
|
|
|
|
|
|
'4CH', |
36
|
|
|
|
|
|
|
'DCP', |
37
|
|
|
|
|
|
|
'PRE', |
38
|
|
|
|
|
|
|
'SCMS', |
39
|
|
|
|
|
|
|
); |
40
|
1
|
|
|
|
|
3
|
$self->listAdd('format', |
41
|
|
|
|
|
|
|
'AIFF', |
42
|
|
|
|
|
|
|
'BINARY', |
43
|
|
|
|
|
|
|
'MOTOTOLA', |
44
|
|
|
|
|
|
|
'MP3', |
45
|
|
|
|
|
|
|
'WAVE', |
46
|
|
|
|
|
|
|
); |
47
|
1
|
|
|
|
|
4
|
$self->listAdd('keywords', |
48
|
|
|
|
|
|
|
'CATALOG', |
49
|
|
|
|
|
|
|
'CDTEXTFILE', |
50
|
|
|
|
|
|
|
'FILE', |
51
|
|
|
|
|
|
|
'FLAGS', |
52
|
|
|
|
|
|
|
'INDEX', |
53
|
|
|
|
|
|
|
'ISRC', |
54
|
|
|
|
|
|
|
'PERFORMER', |
55
|
|
|
|
|
|
|
'POSTGAP', |
56
|
|
|
|
|
|
|
'PREGAP', |
57
|
|
|
|
|
|
|
'REM', |
58
|
|
|
|
|
|
|
'SONGWRITER', |
59
|
|
|
|
|
|
|
'TITLE', |
60
|
|
|
|
|
|
|
'TRACK', |
61
|
|
|
|
|
|
|
); |
62
|
1
|
|
|
|
|
3
|
$self->listAdd('mode', |
63
|
|
|
|
|
|
|
'AUDIO', |
64
|
|
|
|
|
|
|
'CDG', |
65
|
|
|
|
|
|
|
'CDI', |
66
|
|
|
|
|
|
|
'MODE1', |
67
|
|
|
|
|
|
|
'MODE2', |
68
|
|
|
|
|
|
|
'RAW', |
69
|
|
|
|
|
|
|
); |
70
|
1
|
|
|
|
|
9
|
$self->contextdata({ |
71
|
|
|
|
|
|
|
'Comment' => { |
72
|
|
|
|
|
|
|
callback => \&parseComment, |
73
|
|
|
|
|
|
|
attribute => 'Comment', |
74
|
|
|
|
|
|
|
lineending => '#pop', |
75
|
|
|
|
|
|
|
}, |
76
|
|
|
|
|
|
|
'Normal' => { |
77
|
|
|
|
|
|
|
callback => \&parseNormal, |
78
|
|
|
|
|
|
|
attribute => 'Normal Text', |
79
|
|
|
|
|
|
|
}, |
80
|
|
|
|
|
|
|
'String' => { |
81
|
|
|
|
|
|
|
callback => \&parseString, |
82
|
|
|
|
|
|
|
attribute => 'String', |
83
|
|
|
|
|
|
|
lineending => '#pop', |
84
|
|
|
|
|
|
|
}, |
85
|
|
|
|
|
|
|
}); |
86
|
1
|
|
|
|
|
5
|
$self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); |
87
|
1
|
|
|
|
|
4
|
$self->basecontext('Normal'); |
88
|
1
|
|
|
|
|
5
|
$self->keywordscase(0); |
89
|
1
|
|
|
|
|
3
|
$self->initialize; |
90
|
1
|
|
|
|
|
2
|
bless ($self, $class); |
91
|
1
|
|
|
|
|
2
|
return $self; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
sub language { |
95
|
0
|
|
|
0
|
0
|
|
return 'CUE Sheet'; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub parseComment { |
99
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
100
|
0
|
|
|
|
|
|
return 0; |
101
|
|
|
|
|
|
|
}; |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
sub parseNormal { |
104
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
105
|
|
|
|
|
|
|
# String => 'keywords' |
106
|
|
|
|
|
|
|
# attribute => 'Keyword' |
107
|
|
|
|
|
|
|
# context => '#stay' |
108
|
|
|
|
|
|
|
# type => 'keyword' |
109
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { |
110
|
0
|
|
|
|
|
|
return 1 |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
# String => 'format' |
113
|
|
|
|
|
|
|
# attribute => 'Format' |
114
|
|
|
|
|
|
|
# context => '#stay' |
115
|
|
|
|
|
|
|
# type => 'keyword' |
116
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'format', 0, undef, 0, '#stay', 'Format')) { |
117
|
0
|
|
|
|
|
|
return 1 |
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
# String => 'mode' |
120
|
|
|
|
|
|
|
# attribute => 'Mode' |
121
|
|
|
|
|
|
|
# context => '#stay' |
122
|
|
|
|
|
|
|
# type => 'keyword' |
123
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'mode', 0, undef, 0, '#stay', 'Mode')) { |
124
|
0
|
|
|
|
|
|
return 1 |
125
|
|
|
|
|
|
|
} |
126
|
|
|
|
|
|
|
# String => 'flags' |
127
|
|
|
|
|
|
|
# attribute => 'Flags' |
128
|
|
|
|
|
|
|
# context => '#stay' |
129
|
|
|
|
|
|
|
# type => 'keyword' |
130
|
0
|
0
|
|
|
|
|
if ($self->testKeyword($text, 'flags', 0, undef, 0, '#stay', 'Flags')) { |
131
|
0
|
|
|
|
|
|
return 1 |
132
|
|
|
|
|
|
|
} |
133
|
|
|
|
|
|
|
# attribute => 'Decimal' |
134
|
|
|
|
|
|
|
# context => '#stay' |
135
|
|
|
|
|
|
|
# type => 'Int' |
136
|
0
|
0
|
|
|
|
|
if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { |
137
|
0
|
|
|
|
|
|
return 1 |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
# attribute => 'String' |
140
|
|
|
|
|
|
|
# char => '"' |
141
|
|
|
|
|
|
|
# context => 'String' |
142
|
|
|
|
|
|
|
# type => 'DetectChar' |
143
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { |
144
|
0
|
|
|
|
|
|
return 1 |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
# attribute => 'Comment' |
147
|
|
|
|
|
|
|
# char => ';' |
148
|
|
|
|
|
|
|
# context => 'Comment' |
149
|
|
|
|
|
|
|
# type => 'DetectChar' |
150
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { |
151
|
0
|
|
|
|
|
|
return 1 |
152
|
|
|
|
|
|
|
} |
153
|
0
|
|
|
|
|
|
return 0; |
154
|
|
|
|
|
|
|
}; |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
sub parseString { |
157
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
158
|
|
|
|
|
|
|
# attribute => 'String' |
159
|
|
|
|
|
|
|
# context => '#stay' |
160
|
|
|
|
|
|
|
# type => 'LineContinue' |
161
|
0
|
0
|
|
|
|
|
if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { |
162
|
0
|
|
|
|
|
|
return 1 |
163
|
|
|
|
|
|
|
} |
164
|
|
|
|
|
|
|
# attribute => 'String' |
165
|
|
|
|
|
|
|
# char => '"' |
166
|
|
|
|
|
|
|
# context => '#pop' |
167
|
|
|
|
|
|
|
# type => 'DetectChar' |
168
|
0
|
0
|
|
|
|
|
if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { |
169
|
0
|
|
|
|
|
|
return 1 |
170
|
|
|
|
|
|
|
} |
171
|
0
|
|
|
|
|
|
return 0; |
172
|
|
|
|
|
|
|
}; |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
1; |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
__END__ |