line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pod::Parser::Groffmom::Color; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Pod::Parser::Groffmom - Color formatting for groff -mom. |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 VERSION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
Version 0.042 |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = '0.042'; |
14
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
15
|
|
|
|
|
|
|
|
16
|
7
|
|
|
7
|
|
42
|
use warnings; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
248
|
|
17
|
7
|
|
|
7
|
|
34
|
use strict; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
204
|
|
18
|
|
|
|
|
|
|
|
19
|
7
|
|
|
7
|
|
37
|
use base 'Exporter'; |
|
7
|
|
|
|
|
11
|
|
|
7
|
|
|
|
|
752
|
|
20
|
|
|
|
|
|
|
our @EXPORT = qw(color_definitions get_highlighter); |
21
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( all => \@EXPORT ); |
22
|
|
|
|
|
|
|
|
23
|
7
|
|
|
7
|
|
8590
|
use Syntax::Highlight::Engine::Kate; |
|
7
|
|
|
|
|
161471
|
|
|
7
|
|
|
|
|
2755
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub color_definitions { |
26
|
7
|
|
|
7
|
0
|
27
|
return <<' END'; |
27
|
|
|
|
|
|
|
.NEWCOLOR Alert RGB #0000ff |
28
|
|
|
|
|
|
|
.NEWCOLOR BaseN RGB #007f00 |
29
|
|
|
|
|
|
|
.NEWCOLOR BString RGB #c9a7ff |
30
|
|
|
|
|
|
|
.NEWCOLOR Char RGB #ff00ff |
31
|
|
|
|
|
|
|
.NEWCOLOR Comment RGB #7f7f7f |
32
|
|
|
|
|
|
|
.NEWCOLOR DataType RGB #0000ff |
33
|
|
|
|
|
|
|
.NEWCOLOR DecVal RGB #00007f |
34
|
|
|
|
|
|
|
.NEWCOLOR Error RGB #ff0000 |
35
|
|
|
|
|
|
|
.NEWCOLOR Float RGB #00007f |
36
|
|
|
|
|
|
|
.NEWCOLOR Function RGB #007f00 |
37
|
|
|
|
|
|
|
.NEWCOLOR IString RGB #ff0000 |
38
|
|
|
|
|
|
|
.NEWCOLOR Operator RGB #ffa500 |
39
|
|
|
|
|
|
|
.NEWCOLOR Others RGB #b03060 |
40
|
|
|
|
|
|
|
.NEWCOLOR RegionMarker RGB #96b9ff |
41
|
|
|
|
|
|
|
.NEWCOLOR Reserved RGB #9b30ff |
42
|
|
|
|
|
|
|
.NEWCOLOR String RGB #ff0000 |
43
|
|
|
|
|
|
|
.NEWCOLOR Variable RGB #0000ff |
44
|
|
|
|
|
|
|
.NEWCOLOR Warning RGB #0000ff |
45
|
|
|
|
|
|
|
END |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub get_highlighter { |
49
|
1
|
|
|
1
|
0
|
3
|
my ($language) = @_; |
50
|
1
|
|
|
|
|
58
|
return Syntax::Highlight::Engine::Kate->new( |
51
|
|
|
|
|
|
|
language => $language, |
52
|
|
|
|
|
|
|
substitutions => { "\\" => "\\\\", }, |
53
|
|
|
|
|
|
|
format_table => { |
54
|
|
|
|
|
|
|
Alert => [ "\\*[Alert]", "\\*[black]" ], |
55
|
|
|
|
|
|
|
BaseN => [ "\\*[BaseN]", "\\*[black]" ], |
56
|
|
|
|
|
|
|
BString => [ "\\*[BString]", "\\*[black]" ], |
57
|
|
|
|
|
|
|
Char => [ "\\*[Char]", "\\*[black]" ], |
58
|
|
|
|
|
|
|
Comment => [ "\\*[Comment]\\f[I]", "\\f[P]\\*[black]" ], |
59
|
|
|
|
|
|
|
DataType => [ "\\*[DataType]", "\\*[black]" ], |
60
|
|
|
|
|
|
|
DecVal => [ "\\*[DecVal]", "\\*[black]" ], |
61
|
|
|
|
|
|
|
Error => [ "\\*[Error]\\f[BI]", "\\f[P]\\*[black]" ], |
62
|
|
|
|
|
|
|
Float => [ "\\*[Float]", "\\*[black]" ], |
63
|
|
|
|
|
|
|
Function => [ "\\*[Function]", "\\*[black]" ], |
64
|
|
|
|
|
|
|
IString => [ "\\*[IString]", "" ], |
65
|
|
|
|
|
|
|
Keyword => [ "\\f[B]", "\\f[P]" ], |
66
|
|
|
|
|
|
|
Normal => [ "", "" ], |
67
|
|
|
|
|
|
|
Operator => [ "\\*[Operator]", "\\*[black]" ], |
68
|
|
|
|
|
|
|
Others => [ "\\*[Others]", "\\*[black]" ], |
69
|
|
|
|
|
|
|
RegionMarker => [ "\\*[RegionMarker]\\f[I]", "\\[P]\\*[black]" ], |
70
|
|
|
|
|
|
|
Reserved => [ "\\*[Reserved]\\f[B]", "\\f[P]\\*[black]" ], |
71
|
|
|
|
|
|
|
String => [ "\\*[String]", "\\*[black]" ], |
72
|
|
|
|
|
|
|
Variable => [ "\\*[Variable]\\f[B]", "\\f[P]\\*[black]" ], |
73
|
|
|
|
|
|
|
Warning => [ "\\*[Warning]\\f[BI]", "\\f[P]\\*[black]" ], |
74
|
|
|
|
|
|
|
}, |
75
|
|
|
|
|
|
|
); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
__END__ |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 Supported Syntaxes |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
The following syntaxes are from L<Syntax::Highlight::Engine::Kate>. See that |
85
|
|
|
|
|
|
|
module for a (possibly) more up-to-date list. Enter these names exactly as |
86
|
|
|
|
|
|
|
seen: |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=begin highlight Common Lisp |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
(eval-after-load "cperl-mode" |
91
|
|
|
|
|
|
|
'(add-hook 'cperl-mode-hook |
92
|
|
|
|
|
|
|
(lambda () (local-set-key "\C-ct" 'cperl-prove)))) |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
(defun cperl-prove () |
95
|
|
|
|
|
|
|
"Run the current test." |
96
|
|
|
|
|
|
|
(interactive) |
97
|
|
|
|
|
|
|
(shell-command (concat "prove -lv --merge -It/tests " |
98
|
|
|
|
|
|
|
(shell-quote_argument (buffer-file-name))))) |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=end highlight |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=over 4 |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item * "4GL" |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item * "4GL-PER" |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item * "ABC" |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item * "AHDL" |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item * "ANSI C89" |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item * "ASP" |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item * "AVR Assembler" |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item * "AWK" |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=item * "Ada" |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=item * "Ansys" |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=item * "Apache Configuration" |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=item * "Asm6502" |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=item * "Bash" |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=item * "BibTeX" |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=item * "C" |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=item * "C#" |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=item * "C++" |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=item * "CGiS" |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=item * "CMake" |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=item * "CSS" |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=item * "CUE Sheet" |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=item * "Cg" |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=item * "ChangeLog" |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=item * "Cisco" |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=item * "Clipper" |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=item * "ColdFusion" |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=item * "Common Lisp" |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=item * "Component-Pascal" |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=item * "D" |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=item * "Debian Changelog" |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=item * "Debian Control" |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
=item * "Diff" |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=item * "Doxygen" |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=item * "E Language" |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=item * "Eiffel" |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=item * "Email" |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=item * "Euphoria" |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=item * "Fortran" |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=item * "FreeBASIC" |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=item * "GDL" |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=item * "GLSL" |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=item * "GNU Assembler" |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=item * "GNU Gettext" |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=item * "HTML" |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=item * "Haskell" |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=item * "IDL" |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
=item * "ILERPG" |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
=item * "INI Files" |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
=item * "Inform" |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=item * "Intel x86 (NASM)" |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
=item * "JSP" |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
=item * "Java" |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
=item * "JavaScript" |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=item * "Javadoc" |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
=item * "KBasic" |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
=item * "Kate File Template" |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
=item * "LDIF" |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
=item * "LPC" |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
=item * "LaTeX" |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
=item * "Lex/Flex" |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
=item * "LilyPond" |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
=item * "Literate Haskell" |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
=item * "Lua" |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=item * "M3U" |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
=item * "MAB-DB" |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
=item * "MIPS Assembler" |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
=item * "Makefile" |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
=item * "Mason" |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
=item * "Matlab" |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
=item * "Modula-2" |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
=item * "Music Publisher" |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
=item * "Octave" |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
=item * "PHP (HTML)" |
249
|
|
|
|
|
|
|
|
250
|
|
|
|
|
|
|
=item * "POV-Ray" |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
=item * "Pascal" |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
=item * "Perl" |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
=item * "PicAsm" |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
=item * "Pike" |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
=item * "PostScript" |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
=item * "Prolog" |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
=item * "PureBasic" |
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
=item * "Python" |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
=item * "Quake Script" |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
=item * "R Script" |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
=item * "REXX" |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
=item * "RPM Spec" |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
=item * "RSI IDL" |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
=item * "RenderMan RIB" |
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
=item * "Ruby" |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
=item * "SGML" |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
=item * "SML" |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
=item * "SQL" |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
=item * "SQL (MySQL)" |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
=item * "SQL (PostgreSQL)" |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
=item * "Sather" |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
=item * "Scheme" |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
=item * "Sieve" |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
=item * "Spice" |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
=item * "Stata" |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
=item * "TI Basic" |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
=item * "TaskJuggler" |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
=item * "Tcl/Tk" |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
=item * "UnrealScript" |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
=item * "VHDL" |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
=item * "VRML" |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
=item * "Velocity" |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
=item * "Verilog" |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
=item * "WINE Config" |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
=item * "Wikimedia" |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
=item * "XML" |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
=item * "XML (Debug)" |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
=item * "Yacc/Bison" |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
=item * "de_DE" |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
=item * "en_EN" |
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
=item * "ferite" |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
=item * "nl" |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
=item * "progress" |
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
=item * "scilab" |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
=item * "txt2tags" |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
=item * "x.org Configuration" |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
=item * "xHarbour" |
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
=item * "xslt" |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
=item * "yacas" |
349
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
=back |
351
|
|
|
|
|
|
|
|