Kate/WINE_Config.pm

filter: Statementstmt 48.8% 22 / 45 Branchbran 0.0% 0 / 18 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 4 totaltotal 34.1% 27 / 79 SCAR 37.9
CC
11
Cov
35%
parseNormal
72.0
parseValue
12.0
new
2.0
CRAP 44.5
« Kate/Common_Lisp.pm ↑ Summary Kate/Scilab.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 '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 1 our $VERSION = '0.14';
15  
16 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use base('Syntax::Highlight::Engine::Kate::Template');
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 sub new {
21 1 ▶ my $proto = shift;
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
22 1 ▶ my $class = ref($proto) || $proto;
Condition33%1/3
ref $proto || $proto
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
23 1 my $self = $class->SUPER::new(@_);
24 1 $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 $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 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
46 1 $self->basecontext('Normal');
47 1 $self->keywordscase(1);
48 1 $self->initialize;
49 1 bless ($self, $class);
50 1 return $self;
51 }
52  
53 sub language {
54 0 ▶ return 'WINE Config';
Subroutine language: not called CC=1 SCAR=6.9
Pod undocumented
55 }
56  
57 sub parseNormal {
58 0 ▶ my ($self, $text) = @_;
Subroutine parseNormal: not called CC=8 SCAR=42.8
Pod undocumented
59 # String => 'WINE REGISTRY Version.*$'
60 # attribute => 'RegistryBeginEnd'
61 # context => '#stay'
62 # type => 'RegExpr'
63 0 ▶ if ($self->testRegExpr($text, 'WINE REGISTRY Version.*$', 0, 0, 0, undef, 0, '#stay', 'RegistryBeginEnd')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "WINE REGISTRY Version.*\$", 0, 0, 0, undef, 0, "#stay", "RegistryBeginEnd")) 0 0 0
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 ▶ if ($self->testRegExpr($text, '#\\s*<\\s*wineconf\\s*>', 0, 0, 0, 0, 0, '#stay', 'RegistryBeginEnd')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "#\\s*<\\s*wineconf\\s*>", 0, 0, 0, 0, 0, "#stay", "RegistryBeginEnd")) 0 0 0
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 ▶ if ($self->testRegExpr($text, '#\\s*<\\s*\\/\\s*wineconf\\s*>', 0, 0, 0, 0, 0, '#stay', 'RegistryBeginEnd')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "#\\s*<\\s*\\/\\s*wineconf\\s*>", 0, 0, 0, 0, 0, "#stay", "RegistryBeginEnd")) 0 0 0
80 0 return 1
81 }
82 # String => '\[.*\]$'
83 # attribute => 'Section'
84 # column => '0'
85 # context => '#stay'
86 # type => 'RegExpr'
87 0 ▶ if ($self->testRegExpr($text, '\\[.*\\]$', 0, 0, 0, 0, 0, '#stay', 'Section')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\[.*\\]\$", 0, 0, 0, 0, 0, "#stay", "Section")) 0 0 0
88 0 return 1
89 }
90 # String => ';.*$'
91 # attribute => 'Comment'
92 # context => '#stay'
93 # type => 'RegExpr'
94 0 ▶ if ($self->testRegExpr($text, ';.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, ";.*\$", 0, 0, 0, undef, 0, "#stay", "Comment")) 0 0 0
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 ▶ if ($self->testRegExpr($text, '\\s*"\\s*[a-zA-Z0-9_.:*]*\\s*"', 0, 0, 0, undef, 0, '#stay', 'Key')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\s*\"\\s*[a-zA-Z0-9_.:*]*\\s*\"", 0, 0, 0, undef, 0, "#stay", "Key")) 0 0 0
102 0 return 1
103 }
104 # attribute => 'Normal Text'
105 # char => '='
106 # context => 'Value'
107 # type => 'DetectChar'
108 0 ▶ if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Value', 'Normal Text')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testDetectChar($text, "=", 0, 0, 0, undef, 0, "Value", "Normal Text")) 0 0 0
109 0 return 1
110 }
111 0 return 0;
112 };
113  
114 sub parseValue {
115 0 ▶ my ($self, $text) = @_;
Subroutine parseValue: not called CC=3 SCAR=24.8
Pod undocumented
116 # String => '\s*".*"'
117 # attribute => 'Value'
118 # context => '#stay'
119 # type => 'RegExpr'
120 0 ▶ if ($self->testRegExpr($text, '\\s*".*"', 0, 0, 0, undef, 0, '#stay', 'Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, "\\s*\".*\"", 0, 0, 0, undef, 0, "#stay", "Value")) 0 0 0
121 0 return 1
122 }
123 # String => ';.*$'
124 # attribute => 'Comment'
125 # context => '#stay'
126 # type => 'RegExpr'
127 0 ▶ if ($self->testRegExpr($text, ';.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->testRegExpr($text, ";.*\$", 0, 0, 0, undef, 0, "#stay", "Comment")) 0 0 0
128 0 return 1
129 }
130 0 return 0;
131 };
132  
133  
134 1 1;
135  
136 __END__
« Kate/Common_Lisp.pm ↑ Summary Kate/Scilab.pm »