| 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 'cgis.xml' file of the syntax highlight | ||||||||||||||||||||
| 6 | # engine of the kate text editor (http://www.kate-editor.org | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | #kate xml version 1.02 | ||||||||||||||||||||
| 9 | #kate version 2.4 | ||||||||||||||||||||
| 10 | #generated: Sun Feb 3 22:02:04 2008, localtime | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | package Syntax::Highlight::Engine::Kate::CGiS; | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 1 | our $VERSION = '0.16'; | |||||||||||||||||||
| 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 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 21 | 1 | my $proto = shift; | |||||||||||||||||||
| 22 | 1 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition33%1/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 23 | 1 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 24 | 1 | $self->attributes({ | |||||||||||||||||||
| 25 | 'Alert' => 'Alert', | ||||||||||||||||||||
| 26 | 'Char' => 'Char', | ||||||||||||||||||||
| 27 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 28 | 'Data Type' => 'DataType', | ||||||||||||||||||||
| 29 | 'Decimal' => 'DecVal', | ||||||||||||||||||||
| 30 | 'Float' => 'Float', | ||||||||||||||||||||
| 31 | 'Hex' => 'BaseN', | ||||||||||||||||||||
| 32 | 'Hint' => 'Others', | ||||||||||||||||||||
| 33 | 'Keyword' => 'Keyword', | ||||||||||||||||||||
| 34 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 35 | 'Octal' => 'BaseN', | ||||||||||||||||||||
| 36 | 'Region Marker' => 'RegionMarker', | ||||||||||||||||||||
| 37 | 'String' => 'String', | ||||||||||||||||||||
| 38 | 'String Char' => 'Char', | ||||||||||||||||||||
| 39 | 'Symbol' => 'Normal', | ||||||||||||||||||||
| 40 | }); | ||||||||||||||||||||
| 41 | 1 | $self->listAdd('keywords', | |||||||||||||||||||
| 42 | '1D', | ||||||||||||||||||||
| 43 | '2D', | ||||||||||||||||||||
| 44 | 'break', | ||||||||||||||||||||
| 45 | 'continue', | ||||||||||||||||||||
| 46 | 'do', | ||||||||||||||||||||
| 47 | 'else', | ||||||||||||||||||||
| 48 | 'extern', | ||||||||||||||||||||
| 49 | 'for', | ||||||||||||||||||||
| 50 | 'forall', | ||||||||||||||||||||
| 51 | 'foreach', | ||||||||||||||||||||
| 52 | 'function', | ||||||||||||||||||||
| 53 | 'if', | ||||||||||||||||||||
| 54 | 'in', | ||||||||||||||||||||
| 55 | 'inout', | ||||||||||||||||||||
| 56 | 'internal', | ||||||||||||||||||||
| 57 | 'out', | ||||||||||||||||||||
| 58 | 'reduction', | ||||||||||||||||||||
| 59 | 'return', | ||||||||||||||||||||
| 60 | 'struct', | ||||||||||||||||||||
| 61 | 'typedef', | ||||||||||||||||||||
| 62 | 'while', | ||||||||||||||||||||
| 63 | ); | ||||||||||||||||||||
| 64 | 1 | $self->listAdd('types', | |||||||||||||||||||
| 65 | 'bool', | ||||||||||||||||||||
| 66 | 'bool2', | ||||||||||||||||||||
| 67 | 'bool3', | ||||||||||||||||||||
| 68 | 'bool4', | ||||||||||||||||||||
| 69 | 'float', | ||||||||||||||||||||
| 70 | 'float2', | ||||||||||||||||||||
| 71 | 'float3', | ||||||||||||||||||||
| 72 | 'float4', | ||||||||||||||||||||
| 73 | 'half', | ||||||||||||||||||||
| 74 | 'half2', | ||||||||||||||||||||
| 75 | 'half3', | ||||||||||||||||||||
| 76 | 'half4', | ||||||||||||||||||||
| 77 | 'int', | ||||||||||||||||||||
| 78 | 'int2', | ||||||||||||||||||||
| 79 | 'int3', | ||||||||||||||||||||
| 80 | 'int4', | ||||||||||||||||||||
| 81 | ); | ||||||||||||||||||||
| 82 | 1 | $self->contextdata({ | |||||||||||||||||||
| 83 | 'Code' => { | ||||||||||||||||||||
| 84 | callback => \&parseCode, | ||||||||||||||||||||
| 85 | attribute => 'Normal Text', | ||||||||||||||||||||
| 86 | }, | ||||||||||||||||||||
| 87 | 'Commentar 1' => { | ||||||||||||||||||||
| 88 | callback => \&parseCommentar1, | ||||||||||||||||||||
| 89 | attribute => 'Comment', | ||||||||||||||||||||
| 90 | lineending => '#pop', | ||||||||||||||||||||
| 91 | }, | ||||||||||||||||||||
| 92 | 'Commentar 2' => { | ||||||||||||||||||||
| 93 | callback => \&parseCommentar2, | ||||||||||||||||||||
| 94 | attribute => 'Comment', | ||||||||||||||||||||
| 95 | }, | ||||||||||||||||||||
| 96 | 'Common' => { | ||||||||||||||||||||
| 97 | callback => \&parseCommon, | ||||||||||||||||||||
| 98 | attribute => 'Normal Text', | ||||||||||||||||||||
| 99 | }, | ||||||||||||||||||||
| 100 | 'Control' => { | ||||||||||||||||||||
| 101 | callback => \&parseControl, | ||||||||||||||||||||
| 102 | attribute => 'Normal Text', | ||||||||||||||||||||
| 103 | }, | ||||||||||||||||||||
| 104 | 'Hint' => { | ||||||||||||||||||||
| 105 | callback => \&parseHint, | ||||||||||||||||||||
| 106 | attribute => 'Hint', | ||||||||||||||||||||
| 107 | }, | ||||||||||||||||||||
| 108 | 'Interface' => { | ||||||||||||||||||||
| 109 | callback => \&parseInterface, | ||||||||||||||||||||
| 110 | attribute => 'Normal Text', | ||||||||||||||||||||
| 111 | }, | ||||||||||||||||||||
| 112 | 'Normal' => { | ||||||||||||||||||||
| 113 | callback => \&parseNormal, | ||||||||||||||||||||
| 114 | attribute => 'Normal Text', | ||||||||||||||||||||
| 115 | }, | ||||||||||||||||||||
| 116 | 'Region Marker' => { | ||||||||||||||||||||
| 117 | callback => \&parseRegionMarker, | ||||||||||||||||||||
| 118 | attribute => 'Region Marker', | ||||||||||||||||||||
| 119 | lineending => '#pop', | ||||||||||||||||||||
| 120 | }, | ||||||||||||||||||||
| 121 | }); | ||||||||||||||||||||
| 122 | 1 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 123 | 1 | $self->basecontext('Normal'); | |||||||||||||||||||
| 124 | 1 | $self->keywordscase(0); | |||||||||||||||||||
| 125 | 1 | $self->initialize; | |||||||||||||||||||
| 126 | 1 | bless ($self, $class); | |||||||||||||||||||
| 127 | 1 | return $self; | |||||||||||||||||||
| 128 | } | ||||||||||||||||||||
| 129 | |||||||||||||||||||||
| 130 | 0 | ▶ | sub language { | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 131 | 0 | return 'CGiS'; | |||||||||||||||||||
| 132 | } | ||||||||||||||||||||
| 133 | |||||||||||||||||||||
| 134 | 0 | ▶ | sub parseCode { | ||||||||||||||||||
|
Subroutine
parseCode: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||
| 135 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 136 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 137 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 138 | 0 | return 1 | |||||||||||||||||||
| 139 | } | ||||||||||||||||||||
| 140 | # String => 'CONTROL' | ||||||||||||||||||||
| 141 | # attribute => 'Keyword' | ||||||||||||||||||||
| 142 | # context => 'Control' | ||||||||||||||||||||
| 143 | # type => 'StringDetect' | ||||||||||||||||||||
| 144 | 0 | ▶ | if ($self->testStringDetect($text, 'CONTROL', 0, 0, 0, undef, 0, 'Control', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 145 | 0 | return 1 | |||||||||||||||||||
| 146 | } | ||||||||||||||||||||
| 147 | # String => '#HINT' | ||||||||||||||||||||
| 148 | # attribute => 'Hint' | ||||||||||||||||||||
| 149 | # context => 'Hint' | ||||||||||||||||||||
| 150 | # type => 'StringDetect' | ||||||||||||||||||||
| 151 | 0 | ▶ | if ($self->testStringDetect($text, '#HINT', 0, 0, 0, undef, 0, 'Hint', 'Hint')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 152 | 0 | return 1 | |||||||||||||||||||
| 153 | } | ||||||||||||||||||||
| 154 | # context => 'Common' | ||||||||||||||||||||
| 155 | # type => 'IncludeRules' | ||||||||||||||||||||
| 156 | 0 | ▶ | if ($self->includeRules('Common', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 157 | 0 | return 1 | |||||||||||||||||||
| 158 | } | ||||||||||||||||||||
| 159 | 0 | return 0; | |||||||||||||||||||
| 160 | }; | ||||||||||||||||||||
| 161 | |||||||||||||||||||||
| 162 | 0 | ▶ | sub parseCommentar1 { | ||||||||||||||||||
|
Subroutine
parseCommentar1: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 163 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 164 | # context => '##Alerts' | ||||||||||||||||||||
| 165 | # type => 'IncludeRules' | ||||||||||||||||||||
| 166 | 0 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 167 | 0 | return 1 | |||||||||||||||||||
| 168 | } | ||||||||||||||||||||
| 169 | 0 | return 0; | |||||||||||||||||||
| 170 | }; | ||||||||||||||||||||
| 171 | |||||||||||||||||||||
| 172 | 0 | ▶ | sub parseCommentar2 { | ||||||||||||||||||
|
Subroutine
parseCommentar2: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 173 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 174 | # attribute => 'Comment' | ||||||||||||||||||||
| 175 | # char => '*' | ||||||||||||||||||||
| 176 | # char1 => '/' | ||||||||||||||||||||
| 177 | # context => '#pop' | ||||||||||||||||||||
| 178 | # endRegion => 'Comment' | ||||||||||||||||||||
| 179 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 180 | 0 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 181 | 0 | return 1 | |||||||||||||||||||
| 182 | } | ||||||||||||||||||||
| 183 | # context => '##Alerts' | ||||||||||||||||||||
| 184 | # type => 'IncludeRules' | ||||||||||||||||||||
| 185 | 0 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 186 | 0 | return 1 | |||||||||||||||||||
| 187 | } | ||||||||||||||||||||
| 188 | 0 | return 0; | |||||||||||||||||||
| 189 | }; | ||||||||||||||||||||
| 190 | |||||||||||||||||||||
| 191 | 0 | ▶ | sub parseCommon { | ||||||||||||||||||
|
Subroutine
parseCommon: not called CC=16 SCAR=56.1
Pod
undocumented
| |||||||||||||||||||||
| 192 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 193 | # String => '//BEGIN' | ||||||||||||||||||||
| 194 | # attribute => 'Region Marker' | ||||||||||||||||||||
| 195 | # beginRegion => 'Region1' | ||||||||||||||||||||
| 196 | # context => 'Region Marker' | ||||||||||||||||||||
| 197 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 198 | # type => 'StringDetect' | ||||||||||||||||||||
| 199 | 0 | ▶ | if ($self->testStringDetect($text, '//BEGIN', 0, 0, 0, undef, 1, 'Region Marker', 'Region Marker')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 200 | 0 | return 1 | |||||||||||||||||||
| 201 | } | ||||||||||||||||||||
| 202 | # String => '//END' | ||||||||||||||||||||
| 203 | # attribute => 'Region Marker' | ||||||||||||||||||||
| 204 | # context => 'Region Marker' | ||||||||||||||||||||
| 205 | # endRegion => 'Region1' | ||||||||||||||||||||
| 206 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 207 | # type => 'StringDetect' | ||||||||||||||||||||
| 208 | 0 | ▶ | if ($self->testStringDetect($text, '//END', 0, 0, 0, undef, 1, 'Region Marker', 'Region Marker')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 209 | 0 | return 1 | |||||||||||||||||||
| 210 | } | ||||||||||||||||||||
| 211 | # String => 'keywords' | ||||||||||||||||||||
| 212 | # attribute => 'Keyword' | ||||||||||||||||||||
| 213 | # context => '#stay' | ||||||||||||||||||||
| 214 | # type => 'keyword' | ||||||||||||||||||||
| 215 | 0 | ▶ | if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 216 | 0 | return 1 | |||||||||||||||||||
| 217 | } | ||||||||||||||||||||
| 218 | # String => 'types' | ||||||||||||||||||||
| 219 | # attribute => 'Data Type' | ||||||||||||||||||||
| 220 | # context => '#stay' | ||||||||||||||||||||
| 221 | # type => 'keyword' | ||||||||||||||||||||
| 222 | 0 | ▶ | if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 223 | 0 | return 1 | |||||||||||||||||||
| 224 | } | ||||||||||||||||||||
| 225 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 226 | 0 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 227 | 0 | return 1 | |||||||||||||||||||
| 228 | } | ||||||||||||||||||||
| 229 | # attribute => 'Symbol' | ||||||||||||||||||||
| 230 | # beginRegion => 'Brace1' | ||||||||||||||||||||
| 231 | # char => '{' | ||||||||||||||||||||
| 232 | # context => '#stay' | ||||||||||||||||||||
| 233 | # type => 'DetectChar' | ||||||||||||||||||||
| 234 | 0 | ▶ | if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 235 | 0 | return 1 | |||||||||||||||||||
| 236 | } | ||||||||||||||||||||
| 237 | # attribute => 'Symbol' | ||||||||||||||||||||
| 238 | # char => '}' | ||||||||||||||||||||
| 239 | # context => '#stay' | ||||||||||||||||||||
| 240 | # endRegion => 'Brace1' | ||||||||||||||||||||
| 241 | # type => 'DetectChar' | ||||||||||||||||||||
| 242 | 0 | ▶ | if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 243 | 0 | return 1 | |||||||||||||||||||
| 244 | } | ||||||||||||||||||||
| 245 | # attribute => 'Float' | ||||||||||||||||||||
| 246 | # context => '#stay' | ||||||||||||||||||||
| 247 | # items => 'ARRAY(0x11a5b70)' | ||||||||||||||||||||
| 248 | # type => 'Float' | ||||||||||||||||||||
| 249 | 0 | ▶ | if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 250 | # String => 'fF' | ||||||||||||||||||||
| 251 | # attribute => 'Float' | ||||||||||||||||||||
| 252 | # context => '#stay' | ||||||||||||||||||||
| 253 | # type => 'AnyChar' | ||||||||||||||||||||
| 254 | 0 | ▶ | if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 255 | 0 | return 1 | |||||||||||||||||||
| 256 | } | ||||||||||||||||||||
| 257 | } | ||||||||||||||||||||
| 258 | # attribute => 'Octal' | ||||||||||||||||||||
| 259 | # context => '#stay' | ||||||||||||||||||||
| 260 | # type => 'HlCOct' | ||||||||||||||||||||
| 261 | 0 | ▶ | if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 262 | 0 | return 1 | |||||||||||||||||||
| 263 | } | ||||||||||||||||||||
| 264 | # attribute => 'Hex' | ||||||||||||||||||||
| 265 | # context => '#stay' | ||||||||||||||||||||
| 266 | # type => 'HlCHex' | ||||||||||||||||||||
| 267 | 0 | ▶ | if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 268 | 0 | return 1 | |||||||||||||||||||
| 269 | } | ||||||||||||||||||||
| 270 | # attribute => 'Decimal' | ||||||||||||||||||||
| 271 | # context => '#stay' | ||||||||||||||||||||
| 272 | # type => 'Int' | ||||||||||||||||||||
| 273 | 0 | ▶ | if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 274 | 0 | return 1 | |||||||||||||||||||
| 275 | } | ||||||||||||||||||||
| 276 | # context => '##Doxygen' | ||||||||||||||||||||
| 277 | # type => 'IncludeRules' | ||||||||||||||||||||
| 278 | 0 | ▶ | if ($self->includePlugin('Doxygen', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 279 | 0 | return 1 | |||||||||||||||||||
| 280 | } | ||||||||||||||||||||
| 281 | # attribute => 'Comment' | ||||||||||||||||||||
| 282 | # char => '/' | ||||||||||||||||||||
| 283 | # char1 => '/' | ||||||||||||||||||||
| 284 | # context => 'Commentar 1' | ||||||||||||||||||||
| 285 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 286 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 287 | 0 | return 1 | |||||||||||||||||||
| 288 | } | ||||||||||||||||||||
| 289 | # attribute => 'Comment' | ||||||||||||||||||||
| 290 | # beginRegion => 'Comment' | ||||||||||||||||||||
| 291 | # char => '/' | ||||||||||||||||||||
| 292 | # char1 => '*' | ||||||||||||||||||||
| 293 | # context => 'Commentar 2' | ||||||||||||||||||||
| 294 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 295 | 0 | ▶ | if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 296 | 0 | return 1 | |||||||||||||||||||
| 297 | } | ||||||||||||||||||||
| 298 | 0 | return 0; | |||||||||||||||||||
| 299 | }; | ||||||||||||||||||||
| 300 | |||||||||||||||||||||
| 301 | 0 | ▶ | sub parseControl { | ||||||||||||||||||
|
Subroutine
parseControl: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 302 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 303 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 304 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 305 | 0 | return 1 | |||||||||||||||||||
| 306 | } | ||||||||||||||||||||
| 307 | # String => 'CODE' | ||||||||||||||||||||
| 308 | # attribute => 'Keyword' | ||||||||||||||||||||
| 309 | # context => 'Code' | ||||||||||||||||||||
| 310 | # type => 'StringDetect' | ||||||||||||||||||||
| 311 | 0 | ▶ | if ($self->testStringDetect($text, 'CODE', 0, 0, 0, undef, 0, 'Code', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 312 | 0 | return 1 | |||||||||||||||||||
| 313 | } | ||||||||||||||||||||
| 314 | # context => 'Common' | ||||||||||||||||||||
| 315 | # type => 'IncludeRules' | ||||||||||||||||||||
| 316 | 0 | ▶ | if ($self->includeRules('Common', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 317 | 0 | return 1 | |||||||||||||||||||
| 318 | } | ||||||||||||||||||||
| 319 | 0 | return 0; | |||||||||||||||||||
| 320 | }; | ||||||||||||||||||||
| 321 | |||||||||||||||||||||
| 322 | 0 | ▶ | sub parseHint { | ||||||||||||||||||
|
Subroutine
parseHint: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 323 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 324 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 325 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 326 | 0 | return 1 | |||||||||||||||||||
| 327 | } | ||||||||||||||||||||
| 328 | # attribute => 'Hint' | ||||||||||||||||||||
| 329 | # char => ')' | ||||||||||||||||||||
| 330 | # context => '#pop' | ||||||||||||||||||||
| 331 | # type => 'DetectChar' | ||||||||||||||||||||
| 332 | 0 | ▶ | if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Hint')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 333 | 0 | return 1 | |||||||||||||||||||
| 334 | } | ||||||||||||||||||||
| 335 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 336 | 0 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 337 | 0 | return 1 | |||||||||||||||||||
| 338 | } | ||||||||||||||||||||
| 339 | 0 | return 0; | |||||||||||||||||||
| 340 | }; | ||||||||||||||||||||
| 341 | |||||||||||||||||||||
| 342 | 0 | ▶ | sub parseInterface { | ||||||||||||||||||
|
Subroutine
parseInterface: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||
| 343 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 344 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 345 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 346 | 0 | return 1 | |||||||||||||||||||
| 347 | } | ||||||||||||||||||||
| 348 | # String => 'CONTROL' | ||||||||||||||||||||
| 349 | # attribute => 'Keyword' | ||||||||||||||||||||
| 350 | # context => 'Control' | ||||||||||||||||||||
| 351 | # type => 'StringDetect' | ||||||||||||||||||||
| 352 | 0 | ▶ | if ($self->testStringDetect($text, 'CONTROL', 0, 0, 0, undef, 0, 'Control', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 353 | 0 | return 1 | |||||||||||||||||||
| 354 | } | ||||||||||||||||||||
| 355 | # String => 'CODE' | ||||||||||||||||||||
| 356 | # attribute => 'Keyword' | ||||||||||||||||||||
| 357 | # context => 'Code' | ||||||||||||||||||||
| 358 | # type => 'StringDetect' | ||||||||||||||||||||
| 359 | 0 | ▶ | if ($self->testStringDetect($text, 'CODE', 0, 0, 0, undef, 0, 'Code', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 360 | 0 | return 1 | |||||||||||||||||||
| 361 | } | ||||||||||||||||||||
| 362 | # context => 'Common' | ||||||||||||||||||||
| 363 | # type => 'IncludeRules' | ||||||||||||||||||||
| 364 | 0 | ▶ | if ($self->includeRules('Common', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 365 | 0 | return 1 | |||||||||||||||||||
| 366 | } | ||||||||||||||||||||
| 367 | 0 | return 0; | |||||||||||||||||||
| 368 | }; | ||||||||||||||||||||
| 369 | |||||||||||||||||||||
| 370 | 0 | ▶ | sub parseNormal { | ||||||||||||||||||
|
Subroutine
parseNormal: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 371 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 372 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 373 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 374 | 0 | return 1 | |||||||||||||||||||
| 375 | } | ||||||||||||||||||||
| 376 | # String => 'PROGRAM' | ||||||||||||||||||||
| 377 | # attribute => 'Keyword' | ||||||||||||||||||||
| 378 | # context => '#stay' | ||||||||||||||||||||
| 379 | # type => 'StringDetect' | ||||||||||||||||||||
| 380 | 0 | ▶ | if ($self->testStringDetect($text, 'PROGRAM', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 381 | 0 | return 1 | |||||||||||||||||||
| 382 | } | ||||||||||||||||||||
| 383 | # String => 'INTERFACE' | ||||||||||||||||||||
| 384 | # attribute => 'Keyword' | ||||||||||||||||||||
| 385 | # context => 'Interface' | ||||||||||||||||||||
| 386 | # type => 'StringDetect' | ||||||||||||||||||||
| 387 | 0 | ▶ | if ($self->testStringDetect($text, 'INTERFACE', 0, 0, 0, undef, 0, 'Interface', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 388 | 0 | return 1 | |||||||||||||||||||
| 389 | } | ||||||||||||||||||||
| 390 | 0 | return 0; | |||||||||||||||||||
| 391 | }; | ||||||||||||||||||||
| 392 | |||||||||||||||||||||
| 393 | 0 | ▶ | sub parseRegionMarker { | ||||||||||||||||||
|
Subroutine
parseRegionMarker: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 394 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 395 | 0 | return 0; | |||||||||||||||||||
| 396 | }; | ||||||||||||||||||||
| 397 | |||||||||||||||||||||
| 398 | |||||||||||||||||||||
| 399 | 1 | 1; | |||||||||||||||||||
| 400 | |||||||||||||||||||||
| 401 | __END__ | ||||||||||||||||||||