| 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 'doxygen.xml' file of the syntax highlight | ||||||||||||||||||||
| 6 | # engine of the kate text editor (http://www.kate-editor.org | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | #kate xml version 1.25 | ||||||||||||||||||||
| 9 | #kate version 2.4 | ||||||||||||||||||||
| 10 | #kate author Dominik Haumann (dhdev@gmx.de) | ||||||||||||||||||||
| 11 | #generated: Sun Feb 3 22:02:04 2008, localtime | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | package Syntax::Highlight::Engine::Kate::Doxygen; | ||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 1 | our $VERSION = '0.14'; | |||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | 1 | ▶ | use base('Syntax::Highlight::Engine::Kate::Template'); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | sub new { | ||||||||||||||||||||
| 22 | 6 | ▶ | my $proto = shift; | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 23 | 6 | ▶ | 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
| |||||||||||||||||||||
| 24 | 6 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 25 | 6 | $self->attributes({ | |||||||||||||||||||
| 26 | 'Comment' => 'Reserved', | ||||||||||||||||||||
| 27 | 'Description' => 'Function', | ||||||||||||||||||||
| 28 | 'HTML Comment' => 'Comment', | ||||||||||||||||||||
| 29 | 'HTML Tag' => 'Keyword', | ||||||||||||||||||||
| 30 | 'Identifier' => 'Others', | ||||||||||||||||||||
| 31 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 32 | 'Tags' => 'Keyword', | ||||||||||||||||||||
| 33 | 'Types' => 'DataType', | ||||||||||||||||||||
| 34 | 'Word' => 'Operator', | ||||||||||||||||||||
| 35 | }); | ||||||||||||||||||||
| 36 | 6 | $self->listAdd('TagOnly', | |||||||||||||||||||
| 37 | '@#', | ||||||||||||||||||||
| 38 | '@$', | ||||||||||||||||||||
| 39 | '@@', | ||||||||||||||||||||
| 40 | '@\\\\', | ||||||||||||||||||||
| 41 | '@arg', | ||||||||||||||||||||
| 42 | '@attention', | ||||||||||||||||||||
| 43 | '@author', | ||||||||||||||||||||
| 44 | '@callgraph', | ||||||||||||||||||||
| 45 | '@code', | ||||||||||||||||||||
| 46 | '@dot', | ||||||||||||||||||||
| 47 | '@else', | ||||||||||||||||||||
| 48 | '@endcode', | ||||||||||||||||||||
| 49 | '@enddot', | ||||||||||||||||||||
| 50 | '@endhtmlonly', | ||||||||||||||||||||
| 51 | '@endif', | ||||||||||||||||||||
| 52 | '@endlatexonly', | ||||||||||||||||||||
| 53 | '@endlink', | ||||||||||||||||||||
| 54 | '@endmanonly', | ||||||||||||||||||||
| 55 | '@endverbatim', | ||||||||||||||||||||
| 56 | '@endxmlonly', | ||||||||||||||||||||
| 57 | '@f$', | ||||||||||||||||||||
| 58 | '@f[', | ||||||||||||||||||||
| 59 | '@f]', | ||||||||||||||||||||
| 60 | '@hideinitializer', | ||||||||||||||||||||
| 61 | '@htmlonly', | ||||||||||||||||||||
| 62 | '@interface', | ||||||||||||||||||||
| 63 | '@internal', | ||||||||||||||||||||
| 64 | '@invariant', | ||||||||||||||||||||
| 65 | '@latexonly', | ||||||||||||||||||||
| 66 | '@li', | ||||||||||||||||||||
| 67 | '@manonly', | ||||||||||||||||||||
| 68 | '@n', | ||||||||||||||||||||
| 69 | '@nosubgrouping', | ||||||||||||||||||||
| 70 | '@note', | ||||||||||||||||||||
| 71 | '@only', | ||||||||||||||||||||
| 72 | '@par', | ||||||||||||||||||||
| 73 | '@post', | ||||||||||||||||||||
| 74 | '@pre', | ||||||||||||||||||||
| 75 | '@remarks', | ||||||||||||||||||||
| 76 | '@return', | ||||||||||||||||||||
| 77 | '@returns', | ||||||||||||||||||||
| 78 | '@sa', | ||||||||||||||||||||
| 79 | '@see', | ||||||||||||||||||||
| 80 | '@showinitializer', | ||||||||||||||||||||
| 81 | '@since', | ||||||||||||||||||||
| 82 | '@test', | ||||||||||||||||||||
| 83 | '@todo', | ||||||||||||||||||||
| 84 | '@verbatim', | ||||||||||||||||||||
| 85 | '@warning', | ||||||||||||||||||||
| 86 | '@xmlonly', | ||||||||||||||||||||
| 87 | '@~', | ||||||||||||||||||||
| 88 | '\\\\#', | ||||||||||||||||||||
| 89 | '\\\\$', | ||||||||||||||||||||
| 90 | '\\\\@', | ||||||||||||||||||||
| 91 | '\\\\\\\\', | ||||||||||||||||||||
| 92 | '\\\\arg', | ||||||||||||||||||||
| 93 | '\\\\attention', | ||||||||||||||||||||
| 94 | '\\\\author', | ||||||||||||||||||||
| 95 | '\\\\callgraph', | ||||||||||||||||||||
| 96 | '\\\\code', | ||||||||||||||||||||
| 97 | '\\\\dot', | ||||||||||||||||||||
| 98 | '\\\\else', | ||||||||||||||||||||
| 99 | '\\\\endcode', | ||||||||||||||||||||
| 100 | '\\\\enddot', | ||||||||||||||||||||
| 101 | '\\\\endhtmlonly', | ||||||||||||||||||||
| 102 | '\\\\endif', | ||||||||||||||||||||
| 103 | '\\\\endlatexonly', | ||||||||||||||||||||
| 104 | '\\\\endlink', | ||||||||||||||||||||
| 105 | '\\\\endmanonly', | ||||||||||||||||||||
| 106 | '\\\\endverbatim', | ||||||||||||||||||||
| 107 | '\\\\endxmlonly', | ||||||||||||||||||||
| 108 | '\\\\f$', | ||||||||||||||||||||
| 109 | '\\\\f[', | ||||||||||||||||||||
| 110 | '\\\\f]', | ||||||||||||||||||||
| 111 | '\\\\hideinitializer', | ||||||||||||||||||||
| 112 | '\\\\htmlonly', | ||||||||||||||||||||
| 113 | '\\\\interface', | ||||||||||||||||||||
| 114 | '\\\\internal', | ||||||||||||||||||||
| 115 | '\\\\invariant', | ||||||||||||||||||||
| 116 | '\\\\latexonly', | ||||||||||||||||||||
| 117 | '\\\\li', | ||||||||||||||||||||
| 118 | '\\\\manonly', | ||||||||||||||||||||
| 119 | '\\\\n', | ||||||||||||||||||||
| 120 | '\\\\nosubgrouping', | ||||||||||||||||||||
| 121 | '\\\\note', | ||||||||||||||||||||
| 122 | '\\\\only', | ||||||||||||||||||||
| 123 | '\\\\par', | ||||||||||||||||||||
| 124 | '\\\\post', | ||||||||||||||||||||
| 125 | '\\\\pre', | ||||||||||||||||||||
| 126 | '\\\\remarks', | ||||||||||||||||||||
| 127 | '\\\\return', | ||||||||||||||||||||
| 128 | '\\\\returns', | ||||||||||||||||||||
| 129 | '\\\\sa', | ||||||||||||||||||||
| 130 | '\\\\see', | ||||||||||||||||||||
| 131 | '\\\\showinitializer', | ||||||||||||||||||||
| 132 | '\\\\since', | ||||||||||||||||||||
| 133 | '\\\\test', | ||||||||||||||||||||
| 134 | '\\\\todo', | ||||||||||||||||||||
| 135 | '\\\\verbatim', | ||||||||||||||||||||
| 136 | '\\\\warning', | ||||||||||||||||||||
| 137 | '\\\\xmlonly', | ||||||||||||||||||||
| 138 | '\\\\~', | ||||||||||||||||||||
| 139 | ); | ||||||||||||||||||||
| 140 | 6 | $self->listAdd('TagString', | |||||||||||||||||||
| 141 | '@addindex', | ||||||||||||||||||||
| 142 | '@brief', | ||||||||||||||||||||
| 143 | '@bug', | ||||||||||||||||||||
| 144 | '@date', | ||||||||||||||||||||
| 145 | '@deprecated', | ||||||||||||||||||||
| 146 | '@fn', | ||||||||||||||||||||
| 147 | '@ingroup', | ||||||||||||||||||||
| 148 | '@line', | ||||||||||||||||||||
| 149 | '@mainpage', | ||||||||||||||||||||
| 150 | '@name', | ||||||||||||||||||||
| 151 | '@overload', | ||||||||||||||||||||
| 152 | '@short', | ||||||||||||||||||||
| 153 | '@skip', | ||||||||||||||||||||
| 154 | '@skipline', | ||||||||||||||||||||
| 155 | '@typedef', | ||||||||||||||||||||
| 156 | '@until', | ||||||||||||||||||||
| 157 | '@var', | ||||||||||||||||||||
| 158 | '\\\\addindex', | ||||||||||||||||||||
| 159 | '\\\\brief', | ||||||||||||||||||||
| 160 | '\\\\bug', | ||||||||||||||||||||
| 161 | '\\\\date', | ||||||||||||||||||||
| 162 | '\\\\deprecated', | ||||||||||||||||||||
| 163 | '\\\\fn', | ||||||||||||||||||||
| 164 | '\\\\ingroup', | ||||||||||||||||||||
| 165 | '\\\\line', | ||||||||||||||||||||
| 166 | '\\\\mainpage', | ||||||||||||||||||||
| 167 | '\\\\name', | ||||||||||||||||||||
| 168 | '\\\\overload', | ||||||||||||||||||||
| 169 | '\\\\short', | ||||||||||||||||||||
| 170 | '\\\\skip', | ||||||||||||||||||||
| 171 | '\\\\skipline', | ||||||||||||||||||||
| 172 | '\\\\typedef', | ||||||||||||||||||||
| 173 | '\\\\until', | ||||||||||||||||||||
| 174 | '\\\\var', | ||||||||||||||||||||
| 175 | ); | ||||||||||||||||||||
| 176 | 6 | $self->listAdd('TagWord', | |||||||||||||||||||
| 177 | '@a', | ||||||||||||||||||||
| 178 | '@addtogroup', | ||||||||||||||||||||
| 179 | '@anchor', | ||||||||||||||||||||
| 180 | '@b', | ||||||||||||||||||||
| 181 | '@c', | ||||||||||||||||||||
| 182 | '@class', | ||||||||||||||||||||
| 183 | '@copydoc', | ||||||||||||||||||||
| 184 | '@def', | ||||||||||||||||||||
| 185 | '@dontinclude', | ||||||||||||||||||||
| 186 | '@dotfile', | ||||||||||||||||||||
| 187 | '@e', | ||||||||||||||||||||
| 188 | '@elseif', | ||||||||||||||||||||
| 189 | '@em', | ||||||||||||||||||||
| 190 | '@enum', | ||||||||||||||||||||
| 191 | '@example', | ||||||||||||||||||||
| 192 | '@exception', | ||||||||||||||||||||
| 193 | '@exceptions', | ||||||||||||||||||||
| 194 | '@file', | ||||||||||||||||||||
| 195 | '@htmlinclude', | ||||||||||||||||||||
| 196 | '@if', | ||||||||||||||||||||
| 197 | '@ifnot', | ||||||||||||||||||||
| 198 | '@include', | ||||||||||||||||||||
| 199 | '@link', | ||||||||||||||||||||
| 200 | '@namespace', | ||||||||||||||||||||
| 201 | '@p', | ||||||||||||||||||||
| 202 | '@package', | ||||||||||||||||||||
| 203 | '@param', | ||||||||||||||||||||
| 204 | '@ref', | ||||||||||||||||||||
| 205 | '@relates', | ||||||||||||||||||||
| 206 | '@relatesalso', | ||||||||||||||||||||
| 207 | '@retval', | ||||||||||||||||||||
| 208 | '@throw', | ||||||||||||||||||||
| 209 | '@throws', | ||||||||||||||||||||
| 210 | '@verbinclude', | ||||||||||||||||||||
| 211 | '@version', | ||||||||||||||||||||
| 212 | '@xrefitem', | ||||||||||||||||||||
| 213 | '\\\\a', | ||||||||||||||||||||
| 214 | '\\\\addtogroup', | ||||||||||||||||||||
| 215 | '\\\\anchor', | ||||||||||||||||||||
| 216 | '\\\\b', | ||||||||||||||||||||
| 217 | '\\\\c', | ||||||||||||||||||||
| 218 | '\\\\class', | ||||||||||||||||||||
| 219 | '\\\\copydoc', | ||||||||||||||||||||
| 220 | '\\\\def', | ||||||||||||||||||||
| 221 | '\\\\dontinclude', | ||||||||||||||||||||
| 222 | '\\\\dotfile', | ||||||||||||||||||||
| 223 | '\\\\e', | ||||||||||||||||||||
| 224 | '\\\\elseif', | ||||||||||||||||||||
| 225 | '\\\\em', | ||||||||||||||||||||
| 226 | '\\\\enum', | ||||||||||||||||||||
| 227 | '\\\\example', | ||||||||||||||||||||
| 228 | '\\\\exception', | ||||||||||||||||||||
| 229 | '\\\\exceptions', | ||||||||||||||||||||
| 230 | '\\\\file', | ||||||||||||||||||||
| 231 | '\\\\htmlinclude', | ||||||||||||||||||||
| 232 | '\\\\if', | ||||||||||||||||||||
| 233 | '\\\\ifnot', | ||||||||||||||||||||
| 234 | '\\\\include', | ||||||||||||||||||||
| 235 | '\\\\link', | ||||||||||||||||||||
| 236 | '\\\\namespace', | ||||||||||||||||||||
| 237 | '\\\\p', | ||||||||||||||||||||
| 238 | '\\\\package', | ||||||||||||||||||||
| 239 | '\\\\param', | ||||||||||||||||||||
| 240 | '\\\\ref', | ||||||||||||||||||||
| 241 | '\\\\relates', | ||||||||||||||||||||
| 242 | '\\\\relatesalso', | ||||||||||||||||||||
| 243 | '\\\\retval', | ||||||||||||||||||||
| 244 | '\\\\throw', | ||||||||||||||||||||
| 245 | '\\\\throws', | ||||||||||||||||||||
| 246 | '\\\\verbinclude', | ||||||||||||||||||||
| 247 | '\\\\version', | ||||||||||||||||||||
| 248 | '\\\\xrefitem', | ||||||||||||||||||||
| 249 | ); | ||||||||||||||||||||
| 250 | 6 | $self->listAdd('TagWordString', | |||||||||||||||||||
| 251 | '@defgroup', | ||||||||||||||||||||
| 252 | '@page', | ||||||||||||||||||||
| 253 | '@paragraph', | ||||||||||||||||||||
| 254 | '@section', | ||||||||||||||||||||
| 255 | '@struct', | ||||||||||||||||||||
| 256 | '@subsection', | ||||||||||||||||||||
| 257 | '@subsubsection', | ||||||||||||||||||||
| 258 | '@union', | ||||||||||||||||||||
| 259 | '@weakgroup', | ||||||||||||||||||||
| 260 | '\\\\defgroup', | ||||||||||||||||||||
| 261 | '\\\\page', | ||||||||||||||||||||
| 262 | '\\\\paragraph', | ||||||||||||||||||||
| 263 | '\\\\section', | ||||||||||||||||||||
| 264 | '\\\\struct', | ||||||||||||||||||||
| 265 | '\\\\subsection', | ||||||||||||||||||||
| 266 | '\\\\subsubsection', | ||||||||||||||||||||
| 267 | '\\\\union', | ||||||||||||||||||||
| 268 | '\\\\weakgroup', | ||||||||||||||||||||
| 269 | ); | ||||||||||||||||||||
| 270 | 6 | $self->listAdd('TagWordWord', | |||||||||||||||||||
| 271 | '@image', | ||||||||||||||||||||
| 272 | '\\\\image', | ||||||||||||||||||||
| 273 | ); | ||||||||||||||||||||
| 274 | 6 | $self->contextdata({ | |||||||||||||||||||
| 275 | 'BlockComment' => { | ||||||||||||||||||||
| 276 | callback => \&parseBlockComment, | ||||||||||||||||||||
| 277 | attribute => 'Comment', | ||||||||||||||||||||
| 278 | }, | ||||||||||||||||||||
| 279 | 'LineComment' => { | ||||||||||||||||||||
| 280 | callback => \&parseLineComment, | ||||||||||||||||||||
| 281 | attribute => 'Comment', | ||||||||||||||||||||
| 282 | lineending => '#pop', | ||||||||||||||||||||
| 283 | }, | ||||||||||||||||||||
| 284 | 'ML_Tag2ndWord' => { | ||||||||||||||||||||
| 285 | callback => \&parseML_Tag2ndWord, | ||||||||||||||||||||
| 286 | attribute => 'Comment', | ||||||||||||||||||||
| 287 | lineending => '#pop', | ||||||||||||||||||||
| 288 | }, | ||||||||||||||||||||
| 289 | 'ML_TagString' => { | ||||||||||||||||||||
| 290 | callback => \&parseML_TagString, | ||||||||||||||||||||
| 291 | attribute => 'Comment', | ||||||||||||||||||||
| 292 | lineending => '#pop', | ||||||||||||||||||||
| 293 | }, | ||||||||||||||||||||
| 294 | 'ML_TagWord' => { | ||||||||||||||||||||
| 295 | callback => \&parseML_TagWord, | ||||||||||||||||||||
| 296 | attribute => 'Comment', | ||||||||||||||||||||
| 297 | lineending => '#pop', | ||||||||||||||||||||
| 298 | }, | ||||||||||||||||||||
| 299 | 'ML_TagWordString' => { | ||||||||||||||||||||
| 300 | callback => \&parseML_TagWordString, | ||||||||||||||||||||
| 301 | attribute => 'Comment', | ||||||||||||||||||||
| 302 | lineending => '#pop', | ||||||||||||||||||||
| 303 | }, | ||||||||||||||||||||
| 304 | 'ML_TagWordWord' => { | ||||||||||||||||||||
| 305 | callback => \&parseML_TagWordWord, | ||||||||||||||||||||
| 306 | attribute => 'Comment', | ||||||||||||||||||||
| 307 | lineending => '#pop', | ||||||||||||||||||||
| 308 | }, | ||||||||||||||||||||
| 309 | 'ML_htmlcomment' => { | ||||||||||||||||||||
| 310 | callback => \&parseML_htmlcomment, | ||||||||||||||||||||
| 311 | attribute => 'HTML Comment', | ||||||||||||||||||||
| 312 | }, | ||||||||||||||||||||
| 313 | 'ML_htmltag' => { | ||||||||||||||||||||
| 314 | callback => \&parseML_htmltag, | ||||||||||||||||||||
| 315 | attribute => 'Identifier', | ||||||||||||||||||||
| 316 | }, | ||||||||||||||||||||
| 317 | 'ML_identifiers' => { | ||||||||||||||||||||
| 318 | callback => \&parseML_identifiers, | ||||||||||||||||||||
| 319 | attribute => 'Identifier', | ||||||||||||||||||||
| 320 | }, | ||||||||||||||||||||
| 321 | 'ML_types1' => { | ||||||||||||||||||||
| 322 | callback => \&parseML_types1, | ||||||||||||||||||||
| 323 | attribute => 'Types', | ||||||||||||||||||||
| 324 | }, | ||||||||||||||||||||
| 325 | 'ML_types2' => { | ||||||||||||||||||||
| 326 | callback => \&parseML_types2, | ||||||||||||||||||||
| 327 | attribute => 'Types', | ||||||||||||||||||||
| 328 | }, | ||||||||||||||||||||
| 329 | 'Normal' => { | ||||||||||||||||||||
| 330 | callback => \&parseNormal, | ||||||||||||||||||||
| 331 | attribute => 'Normal Text', | ||||||||||||||||||||
| 332 | }, | ||||||||||||||||||||
| 333 | 'SL_Tag2ndWord' => { | ||||||||||||||||||||
| 334 | callback => \&parseSL_Tag2ndWord, | ||||||||||||||||||||
| 335 | attribute => 'Comment', | ||||||||||||||||||||
| 336 | lineending => '#pop', | ||||||||||||||||||||
| 337 | }, | ||||||||||||||||||||
| 338 | 'SL_TagString' => { | ||||||||||||||||||||
| 339 | callback => \&parseSL_TagString, | ||||||||||||||||||||
| 340 | attribute => 'Comment', | ||||||||||||||||||||
| 341 | lineending => '#pop', | ||||||||||||||||||||
| 342 | }, | ||||||||||||||||||||
| 343 | 'SL_TagWord' => { | ||||||||||||||||||||
| 344 | callback => \&parseSL_TagWord, | ||||||||||||||||||||
| 345 | attribute => 'Comment', | ||||||||||||||||||||
| 346 | lineending => '#pop', | ||||||||||||||||||||
| 347 | }, | ||||||||||||||||||||
| 348 | 'SL_TagWordString' => { | ||||||||||||||||||||
| 349 | callback => \&parseSL_TagWordString, | ||||||||||||||||||||
| 350 | attribute => 'Comment', | ||||||||||||||||||||
| 351 | lineending => '#pop', | ||||||||||||||||||||
| 352 | }, | ||||||||||||||||||||
| 353 | 'SL_TagWordWord' => { | ||||||||||||||||||||
| 354 | callback => \&parseSL_TagWordWord, | ||||||||||||||||||||
| 355 | attribute => 'Comment', | ||||||||||||||||||||
| 356 | lineending => '#pop', | ||||||||||||||||||||
| 357 | }, | ||||||||||||||||||||
| 358 | 'SL_htmlcomment' => { | ||||||||||||||||||||
| 359 | callback => \&parseSL_htmlcomment, | ||||||||||||||||||||
| 360 | attribute => 'HTML Comment', | ||||||||||||||||||||
| 361 | lineending => '#pop', | ||||||||||||||||||||
| 362 | }, | ||||||||||||||||||||
| 363 | 'SL_htmltag' => { | ||||||||||||||||||||
| 364 | callback => \&parseSL_htmltag, | ||||||||||||||||||||
| 365 | attribute => 'Identifier', | ||||||||||||||||||||
| 366 | lineending => '#pop', | ||||||||||||||||||||
| 367 | }, | ||||||||||||||||||||
| 368 | 'SL_identifiers' => { | ||||||||||||||||||||
| 369 | callback => \&parseSL_identifiers, | ||||||||||||||||||||
| 370 | attribute => 'Identifier', | ||||||||||||||||||||
| 371 | lineending => '#pop', | ||||||||||||||||||||
| 372 | }, | ||||||||||||||||||||
| 373 | 'SL_types1' => { | ||||||||||||||||||||
| 374 | callback => \&parseSL_types1, | ||||||||||||||||||||
| 375 | attribute => 'Types', | ||||||||||||||||||||
| 376 | lineending => '#pop', | ||||||||||||||||||||
| 377 | }, | ||||||||||||||||||||
| 378 | 'SL_types2' => { | ||||||||||||||||||||
| 379 | callback => \&parseSL_types2, | ||||||||||||||||||||
| 380 | attribute => 'Types', | ||||||||||||||||||||
| 381 | lineending => '#pop', | ||||||||||||||||||||
| 382 | }, | ||||||||||||||||||||
| 383 | }); | ||||||||||||||||||||
| 384 | 6 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\\\|\\$|\\~'); | |||||||||||||||||||
| 385 | 6 | $self->basecontext('Normal'); | |||||||||||||||||||
| 386 | 6 | $self->keywordscase(0); | |||||||||||||||||||
| 387 | 6 | $self->initialize; | |||||||||||||||||||
| 388 | 6 | bless ($self, $class); | |||||||||||||||||||
| 389 | 6 | return $self; | |||||||||||||||||||
| 390 | } | ||||||||||||||||||||
| 391 | |||||||||||||||||||||
| 392 | sub language { | ||||||||||||||||||||
| 393 | 0 | ▶ | return 'Doxygen'; | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 394 | } | ||||||||||||||||||||
| 395 | |||||||||||||||||||||
| 396 | sub parseBlockComment { | ||||||||||||||||||||
| 397 | 2702 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseBlockComment: called CC=14 SCAR=28.6
Pod
undocumented
| |||||||||||||||||||||
| 398 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 399 | 2702 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 400 | 170 | return 1 | |||||||||||||||||||
| 401 | } | ||||||||||||||||||||
| 402 | # attribute => 'Comment' | ||||||||||||||||||||
| 403 | # char => '*' | ||||||||||||||||||||
| 404 | # char1 => '/' | ||||||||||||||||||||
| 405 | # context => '#pop' | ||||||||||||||||||||
| 406 | # endRegion => 'BlockComment' | ||||||||||||||||||||
| 407 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 408 | 2532 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 409 | 206 | return 1 | |||||||||||||||||||
| 410 | } | ||||||||||||||||||||
| 411 | # context => '##Alerts' | ||||||||||||||||||||
| 412 | # type => 'IncludeRules' | ||||||||||||||||||||
| 413 | 2326 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 414 | 0 | return 1 | |||||||||||||||||||
| 415 | } | ||||||||||||||||||||
| 416 | # String => 'TagOnly' | ||||||||||||||||||||
| 417 | # attribute => 'Tags' | ||||||||||||||||||||
| 418 | # context => '#stay' | ||||||||||||||||||||
| 419 | # type => 'keyword' | ||||||||||||||||||||
| 420 | 2326 | ▶ | if ($self->testKeyword($text, 'TagOnly', 0, undef, 0, '#stay', 'Tags')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 421 | 0 | return 1 | |||||||||||||||||||
| 422 | } | ||||||||||||||||||||
| 423 | # String => 'TagWord' | ||||||||||||||||||||
| 424 | # attribute => 'Tags' | ||||||||||||||||||||
| 425 | # context => 'ML_TagWord' | ||||||||||||||||||||
| 426 | # type => 'keyword' | ||||||||||||||||||||
| 427 | 2326 | ▶ | if ($self->testKeyword($text, 'TagWord', 0, undef, 0, 'ML_TagWord', 'Tags')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 428 | 8 | return 1 | |||||||||||||||||||
| 429 | } | ||||||||||||||||||||
| 430 | # String => 'TagWordWord' | ||||||||||||||||||||
| 431 | # attribute => 'Tags' | ||||||||||||||||||||
| 432 | # context => 'ML_TagWordWord' | ||||||||||||||||||||
| 433 | # type => 'keyword' | ||||||||||||||||||||
| 434 | 2318 | ▶ | if ($self->testKeyword($text, 'TagWordWord', 0, undef, 0, 'ML_TagWordWord', 'Tags')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 435 | 0 | return 1 | |||||||||||||||||||
| 436 | } | ||||||||||||||||||||
| 437 | # String => 'TagString' | ||||||||||||||||||||
| 438 | # attribute => 'Tags' | ||||||||||||||||||||
| 439 | # context => 'ML_TagString' | ||||||||||||||||||||
| 440 | # type => 'keyword' | ||||||||||||||||||||
| 441 | 2318 | ▶ | if ($self->testKeyword($text, 'TagString', 0, undef, 0, 'ML_TagString', 'Tags')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 442 | 0 | return 1 | |||||||||||||||||||
| 443 | } | ||||||||||||||||||||
| 444 | # String => 'TagWordString' | ||||||||||||||||||||
| 445 | # attribute => 'Tags' | ||||||||||||||||||||
| 446 | # context => 'ML_TagWordString' | ||||||||||||||||||||
| 447 | # type => 'keyword' | ||||||||||||||||||||
| 448 | 2318 | ▶ | if ($self->testKeyword($text, 'TagWordString', 0, undef, 0, 'ML_TagWordString', 'Tags')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 449 | 0 | return 1 | |||||||||||||||||||
| 450 | } | ||||||||||||||||||||
| 451 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 452 | 2318 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 453 | 876 | return 1 | |||||||||||||||||||
| 454 | } | ||||||||||||||||||||
| 455 | # String => '\\(<|>)' | ||||||||||||||||||||
| 456 | # attribute => 'Tags' | ||||||||||||||||||||
| 457 | # context => '#stay' | ||||||||||||||||||||
| 458 | # type => 'RegExpr' | ||||||||||||||||||||
| 459 | 1442 | ▶ | if ($self->testRegExpr($text, '\\\\(<|>)', 0, 0, 0, undef, 0, '#stay', 'Tags')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 460 | 0 | return 1 | |||||||||||||||||||
| 461 | } | ||||||||||||||||||||
| 462 | # attribute => 'Comment' | ||||||||||||||||||||
| 463 | # char => '<' | ||||||||||||||||||||
| 464 | # char1 => '<' | ||||||||||||||||||||
| 465 | # context => '#stay' | ||||||||||||||||||||
| 466 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 467 | 1442 | ▶ | if ($self->testDetect2Chars($text, '<', '<', 0, 0, 0, undef, 0, '#stay', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 468 | 0 | return 1 | |||||||||||||||||||
| 469 | } | ||||||||||||||||||||
| 470 | # String => '<\s*\/?\s*[a-zA-Z_:][a-zA-Z0-9._:-]*' | ||||||||||||||||||||
| 471 | # attribute => 'HTML Tag' | ||||||||||||||||||||
| 472 | # context => 'ML_htmltag' | ||||||||||||||||||||
| 473 | # type => 'RegExpr' | ||||||||||||||||||||
| 474 | 1442 | ▶ | if ($self->testRegExpr($text, '<\\s*\\/?\\s*[a-zA-Z_:][a-zA-Z0-9._:-]*', 0, 0, 0, undef, 0, 'ML_htmltag', 'HTML Tag')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 475 | 122 | return 1 | |||||||||||||||||||
| 476 | } | ||||||||||||||||||||
| 477 | # String => '<!--' | ||||||||||||||||||||
| 478 | # attribute => 'HTML Comment' | ||||||||||||||||||||
| 479 | # context => 'ML_htmlcomment' | ||||||||||||||||||||
| 480 | # type => 'StringDetect' | ||||||||||||||||||||
| 481 | 1320 | ▶ | if ($self->testStringDetect($text, '<!--', 0, 0, 0, undef, 0, 'ML_htmlcomment', 'HTML Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 482 | 4 | return 1 | |||||||||||||||||||
| 483 | } | ||||||||||||||||||||
| 484 | 1316 | return 0; | |||||||||||||||||||
| 485 | }; | ||||||||||||||||||||
| 486 | |||||||||||||||||||||
| 487 | sub parseLineComment { | ||||||||||||||||||||
| 488 | 1670 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseLineComment: called CC=12 SCAR=27.8
Pod
undocumented
| |||||||||||||||||||||
| 489 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 490 | 1670 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 491 | 76 | return 1 | |||||||||||||||||||
| 492 | } | ||||||||||||||||||||
| 493 | # context => '##Alerts' | ||||||||||||||||||||
| 494 | # type => 'IncludeRules' | ||||||||||||||||||||
| 495 | 1594 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 496 | 0 | return 1 | |||||||||||||||||||
| 497 | } | ||||||||||||||||||||
| 498 | # String => 'TagOnly' | ||||||||||||||||||||
| 499 | # attribute => 'Tags' | ||||||||||||||||||||
| 500 | # context => '#stay' | ||||||||||||||||||||
| 501 | # type => 'keyword' | ||||||||||||||||||||
| 502 | 1594 | ▶ | if ($self->testKeyword($text, 'TagOnly', 0, undef, 0, '#stay', 'Tags')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 503 | 0 | return 1 | |||||||||||||||||||
| 504 | } | ||||||||||||||||||||
| 505 | # String => 'TagWord' | ||||||||||||||||||||
| 506 | # attribute => 'Tags' | ||||||||||||||||||||
| 507 | # context => 'SL_TagWord' | ||||||||||||||||||||
| 508 | # type => 'keyword' | ||||||||||||||||||||
| 509 | 1594 | ▶ | if ($self->testKeyword($text, 'TagWord', 0, undef, 0, 'SL_TagWord', 'Tags')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 510 | 0 | return 1 | |||||||||||||||||||
| 511 | } | ||||||||||||||||||||
| 512 | # String => 'TagWordWord' | ||||||||||||||||||||
| 513 | # attribute => 'Tags' | ||||||||||||||||||||
| 514 | # context => 'SL_TagWordWord' | ||||||||||||||||||||
| 515 | # type => 'keyword' | ||||||||||||||||||||
| 516 | 1594 | ▶ | if ($self->testKeyword($text, 'TagWordWord', 0, undef, 0, 'SL_TagWordWord', 'Tags')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 517 | 0 | return 1 | |||||||||||||||||||
| 518 | } | ||||||||||||||||||||
| 519 | # String => 'TagString' | ||||||||||||||||||||
| 520 | # attribute => 'Tags' | ||||||||||||||||||||
| 521 | # context => 'SL_TagString' | ||||||||||||||||||||
| 522 | # type => 'keyword' | ||||||||||||||||||||
| 523 | 1594 | ▶ | if ($self->testKeyword($text, 'TagString', 0, undef, 0, 'SL_TagString', 'Tags')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 524 | 0 | return 1 | |||||||||||||||||||
| 525 | } | ||||||||||||||||||||
| 526 | # String => 'TagWordString' | ||||||||||||||||||||
| 527 | # attribute => 'Tags' | ||||||||||||||||||||
| 528 | # context => 'SL_TagWordString' | ||||||||||||||||||||
| 529 | # type => 'keyword' | ||||||||||||||||||||
| 530 | 1594 | ▶ | if ($self->testKeyword($text, 'TagWordString', 0, undef, 0, 'SL_TagWordString', 'Tags')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 531 | 0 | return 1 | |||||||||||||||||||
| 532 | } | ||||||||||||||||||||
| 533 | # type => 'DetectIdentifier' | ||||||||||||||||||||
| 534 | 1594 | ▶ | if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 535 | 618 | return 1 | |||||||||||||||||||
| 536 | } | ||||||||||||||||||||
| 537 | # String => '<!--' | ||||||||||||||||||||
| 538 | # attribute => 'HTML Comment' | ||||||||||||||||||||
| 539 | # context => 'SL_htmlcomment' | ||||||||||||||||||||
| 540 | # type => 'StringDetect' | ||||||||||||||||||||
| 541 | 976 | ▶ | if ($self->testStringDetect($text, '<!--', 0, 0, 0, undef, 0, 'SL_htmlcomment', 'HTML Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 542 | 2 | return 1 | |||||||||||||||||||
| 543 | } | ||||||||||||||||||||
| 544 | # attribute => 'Comment' | ||||||||||||||||||||
| 545 | # char => '<' | ||||||||||||||||||||
| 546 | # char1 => '<' | ||||||||||||||||||||
| 547 | # context => '#stay' | ||||||||||||||||||||
| 548 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 549 | 974 | ▶ | if ($self->testDetect2Chars($text, '<', '<', 0, 0, 0, undef, 0, '#stay', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 550 | 0 | return 1 | |||||||||||||||||||
| 551 | } | ||||||||||||||||||||
| 552 | # String => '<\s*\/?\s*[a-zA-Z_:][a-zA-Z0-9._:-]*' | ||||||||||||||||||||
| 553 | # attribute => 'HTML Tag' | ||||||||||||||||||||
| 554 | # context => 'SL_htmltag' | ||||||||||||||||||||
| 555 | # type => 'RegExpr' | ||||||||||||||||||||
| 556 | 974 | ▶ | if ($self->testRegExpr($text, '<\\s*\\/?\\s*[a-zA-Z_:][a-zA-Z0-9._:-]*', 0, 0, 0, undef, 0, 'SL_htmltag', 'HTML Tag')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 557 | 36 | return 1 | |||||||||||||||||||
| 558 | } | ||||||||||||||||||||
| 559 | 938 | return 0; | |||||||||||||||||||
| 560 | }; | ||||||||||||||||||||
| 561 | |||||||||||||||||||||
| 562 | sub parseML_Tag2ndWord { | ||||||||||||||||||||
| 563 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseML_Tag2ndWord: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||
| 564 | # attribute => 'Comment' | ||||||||||||||||||||
| 565 | # char => '*' | ||||||||||||||||||||
| 566 | # char1 => '/' | ||||||||||||||||||||
| 567 | # context => '#pop' | ||||||||||||||||||||
| 568 | # lookAhead => 'true' | ||||||||||||||||||||
| 569 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 570 | 0 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 571 | 0 | return 1 | |||||||||||||||||||
| 572 | } | ||||||||||||||||||||
| 573 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 574 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 575 | 0 | return 1 | |||||||||||||||||||
| 576 | } | ||||||||||||||||||||
| 577 | # String => '\S\s' | ||||||||||||||||||||
| 578 | # attribute => 'Word' | ||||||||||||||||||||
| 579 | # context => '#pop' | ||||||||||||||||||||
| 580 | # type => 'RegExpr' | ||||||||||||||||||||
| 581 | 0 | ▶ | if ($self->testRegExpr($text, '\\S\\s', 0, 0, 0, undef, 0, '#pop', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 582 | 0 | return 1 | |||||||||||||||||||
| 583 | } | ||||||||||||||||||||
| 584 | # String => '\S' | ||||||||||||||||||||
| 585 | # attribute => 'Word' | ||||||||||||||||||||
| 586 | # context => '#stay' | ||||||||||||||||||||
| 587 | # type => 'RegExpr' | ||||||||||||||||||||
| 588 | 0 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 589 | 0 | return 1 | |||||||||||||||||||
| 590 | } | ||||||||||||||||||||
| 591 | 0 | return 0; | |||||||||||||||||||
| 592 | }; | ||||||||||||||||||||
| 593 | |||||||||||||||||||||
| 594 | sub parseML_TagString { | ||||||||||||||||||||
| 595 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseML_TagString: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||
| 596 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 597 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 598 | 0 | return 1 | |||||||||||||||||||
| 599 | } | ||||||||||||||||||||
| 600 | # attribute => 'Comment' | ||||||||||||||||||||
| 601 | # char => '*' | ||||||||||||||||||||
| 602 | # char1 => '/' | ||||||||||||||||||||
| 603 | # context => '#pop' | ||||||||||||||||||||
| 604 | # lookAhead => 'true' | ||||||||||||||||||||
| 605 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 606 | 0 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 607 | 0 | return 1 | |||||||||||||||||||
| 608 | } | ||||||||||||||||||||
| 609 | # String => '<!--' | ||||||||||||||||||||
| 610 | # attribute => 'HTML Comment' | ||||||||||||||||||||
| 611 | # context => 'ML_htmlcomment' | ||||||||||||||||||||
| 612 | # type => 'StringDetect' | ||||||||||||||||||||
| 613 | 0 | ▶ | if ($self->testStringDetect($text, '<!--', 0, 0, 0, undef, 0, 'ML_htmlcomment', 'HTML Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 614 | 0 | return 1 | |||||||||||||||||||
| 615 | } | ||||||||||||||||||||
| 616 | # attribute => 'Comment' | ||||||||||||||||||||
| 617 | # char => '<' | ||||||||||||||||||||
| 618 | # char1 => '<' | ||||||||||||||||||||
| 619 | # context => '#stay' | ||||||||||||||||||||
| 620 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 621 | 0 | ▶ | if ($self->testDetect2Chars($text, '<', '<', 0, 0, 0, undef, 0, '#stay', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 622 | 0 | return 1 | |||||||||||||||||||
| 623 | } | ||||||||||||||||||||
| 624 | # String => '<\s*\/?\s*[a-zA-Z_:][a-zA-Z0-9._:-]*' | ||||||||||||||||||||
| 625 | # attribute => 'HTML Tag' | ||||||||||||||||||||
| 626 | # context => 'ML_htmltag' | ||||||||||||||||||||
| 627 | # type => 'RegExpr' | ||||||||||||||||||||
| 628 | 0 | ▶ | if ($self->testRegExpr($text, '<\\s*\\/?\\s*[a-zA-Z_:][a-zA-Z0-9._:-]*', 0, 0, 0, undef, 0, 'ML_htmltag', 'HTML Tag')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 629 | 0 | return 1 | |||||||||||||||||||
| 630 | } | ||||||||||||||||||||
| 631 | # String => '.' | ||||||||||||||||||||
| 632 | # attribute => 'Description' | ||||||||||||||||||||
| 633 | # context => '#stay' | ||||||||||||||||||||
| 634 | # type => 'RegExpr' | ||||||||||||||||||||
| 635 | 0 | ▶ | if ($self->testRegExpr($text, '.', 0, 0, 0, undef, 0, '#stay', 'Description')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 636 | 0 | return 1 | |||||||||||||||||||
| 637 | } | ||||||||||||||||||||
| 638 | 0 | return 0; | |||||||||||||||||||
| 639 | }; | ||||||||||||||||||||
| 640 | |||||||||||||||||||||
| 641 | sub parseML_TagWord { | ||||||||||||||||||||
| 642 | 92 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseML_TagWord: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||||||||||||
| 643 | # attribute => 'Comment' | ||||||||||||||||||||
| 644 | # char => '*' | ||||||||||||||||||||
| 645 | # char1 => '/' | ||||||||||||||||||||
| 646 | # context => '#pop' | ||||||||||||||||||||
| 647 | # lookAhead => 'true' | ||||||||||||||||||||
| 648 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 649 | 92 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 650 | 0 | return 1 | |||||||||||||||||||
| 651 | } | ||||||||||||||||||||
| 652 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 653 | 92 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 654 | 8 | return 1 | |||||||||||||||||||
| 655 | } | ||||||||||||||||||||
| 656 | # String => '\S\s' | ||||||||||||||||||||
| 657 | # attribute => 'Word' | ||||||||||||||||||||
| 658 | # context => '#pop' | ||||||||||||||||||||
| 659 | # type => 'RegExpr' | ||||||||||||||||||||
| 660 | 84 | ▶ | if ($self->testRegExpr($text, '\\S\\s', 0, 0, 0, undef, 0, '#pop', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 661 | 8 | return 1 | |||||||||||||||||||
| 662 | } | ||||||||||||||||||||
| 663 | # String => '\S' | ||||||||||||||||||||
| 664 | # attribute => 'Word' | ||||||||||||||||||||
| 665 | # context => '#stay' | ||||||||||||||||||||
| 666 | # type => 'RegExpr' | ||||||||||||||||||||
| 667 | 76 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 668 | 66 | return 1 | |||||||||||||||||||
| 669 | } | ||||||||||||||||||||
| 670 | 10 | return 0; | |||||||||||||||||||
| 671 | }; | ||||||||||||||||||||
| 672 | |||||||||||||||||||||
| 673 | sub parseML_TagWordString { | ||||||||||||||||||||
| 674 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseML_TagWordString: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||
| 675 | # attribute => 'Comment' | ||||||||||||||||||||
| 676 | # char => '*' | ||||||||||||||||||||
| 677 | # char1 => '/' | ||||||||||||||||||||
| 678 | # context => '#pop' | ||||||||||||||||||||
| 679 | # lookAhead => 'true' | ||||||||||||||||||||
| 680 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 681 | 0 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 682 | 0 | return 1 | |||||||||||||||||||
| 683 | } | ||||||||||||||||||||
| 684 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 685 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 686 | 0 | return 1 | |||||||||||||||||||
| 687 | } | ||||||||||||||||||||
| 688 | # String => '\S\s' | ||||||||||||||||||||
| 689 | # attribute => 'Word' | ||||||||||||||||||||
| 690 | # context => '#pop' | ||||||||||||||||||||
| 691 | # type => 'RegExpr' | ||||||||||||||||||||
| 692 | 0 | ▶ | if ($self->testRegExpr($text, '\\S\\s', 0, 0, 0, undef, 0, '#pop', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 693 | 0 | return 1 | |||||||||||||||||||
| 694 | } | ||||||||||||||||||||
| 695 | # String => '\S' | ||||||||||||||||||||
| 696 | # attribute => 'Word' | ||||||||||||||||||||
| 697 | # context => '#stay' | ||||||||||||||||||||
| 698 | # type => 'RegExpr' | ||||||||||||||||||||
| 699 | 0 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 700 | 0 | return 1 | |||||||||||||||||||
| 701 | } | ||||||||||||||||||||
| 702 | 0 | return 0; | |||||||||||||||||||
| 703 | }; | ||||||||||||||||||||
| 704 | |||||||||||||||||||||
| 705 | sub parseML_TagWordWord { | ||||||||||||||||||||
| 706 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseML_TagWordWord: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||
| 707 | # attribute => 'Comment' | ||||||||||||||||||||
| 708 | # char => '*' | ||||||||||||||||||||
| 709 | # char1 => '/' | ||||||||||||||||||||
| 710 | # context => '#pop' | ||||||||||||||||||||
| 711 | # lookAhead => 'true' | ||||||||||||||||||||
| 712 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 713 | 0 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 714 | 0 | return 1 | |||||||||||||||||||
| 715 | } | ||||||||||||||||||||
| 716 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 717 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 718 | 0 | return 1 | |||||||||||||||||||
| 719 | } | ||||||||||||||||||||
| 720 | # String => '\S\s' | ||||||||||||||||||||
| 721 | # attribute => 'Word' | ||||||||||||||||||||
| 722 | # context => '#pop' | ||||||||||||||||||||
| 723 | # type => 'RegExpr' | ||||||||||||||||||||
| 724 | 0 | ▶ | if ($self->testRegExpr($text, '\\S\\s', 0, 0, 0, undef, 0, '#pop', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 725 | 0 | return 1 | |||||||||||||||||||
| 726 | } | ||||||||||||||||||||
| 727 | # String => '\S' | ||||||||||||||||||||
| 728 | # attribute => 'Word' | ||||||||||||||||||||
| 729 | # context => '#stay' | ||||||||||||||||||||
| 730 | # type => 'RegExpr' | ||||||||||||||||||||
| 731 | 0 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 732 | 0 | return 1 | |||||||||||||||||||
| 733 | } | ||||||||||||||||||||
| 734 | 0 | return 0; | |||||||||||||||||||
| 735 | }; | ||||||||||||||||||||
| 736 | |||||||||||||||||||||
| 737 | sub parseML_htmlcomment { | ||||||||||||||||||||
| 738 | 42 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseML_htmlcomment: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||||||||||||
| 739 | # attribute => 'Comment' | ||||||||||||||||||||
| 740 | # char => '*' | ||||||||||||||||||||
| 741 | # char1 => '/' | ||||||||||||||||||||
| 742 | # context => '#pop' | ||||||||||||||||||||
| 743 | # lookAhead => 'true' | ||||||||||||||||||||
| 744 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 745 | 42 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 746 | 2 | return 1 | |||||||||||||||||||
| 747 | } | ||||||||||||||||||||
| 748 | # context => '##Alerts' | ||||||||||||||||||||
| 749 | # type => 'IncludeRules' | ||||||||||||||||||||
| 750 | 40 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 751 | 0 | return 1 | |||||||||||||||||||
| 752 | } | ||||||||||||||||||||
| 753 | # String => '-->' | ||||||||||||||||||||
| 754 | # attribute => 'HTML Comment' | ||||||||||||||||||||
| 755 | # context => '#pop' | ||||||||||||||||||||
| 756 | # type => 'StringDetect' | ||||||||||||||||||||
| 757 | 40 | ▶ | if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'HTML Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 758 | 2 | return 1 | |||||||||||||||||||
| 759 | } | ||||||||||||||||||||
| 760 | 38 | return 0; | |||||||||||||||||||
| 761 | }; | ||||||||||||||||||||
| 762 | |||||||||||||||||||||
| 763 | sub parseML_htmltag { | ||||||||||||||||||||
| 764 | 730 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseML_htmltag: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||||||||||||
| 765 | # attribute => 'Comment' | ||||||||||||||||||||
| 766 | # char => '*' | ||||||||||||||||||||
| 767 | # char1 => '/' | ||||||||||||||||||||
| 768 | # context => '#pop' | ||||||||||||||||||||
| 769 | # lookAhead => 'true' | ||||||||||||||||||||
| 770 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 771 | 730 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 772 | 60 | return 1 | |||||||||||||||||||
| 773 | } | ||||||||||||||||||||
| 774 | # attribute => 'HTML Tag' | ||||||||||||||||||||
| 775 | # char => '/' | ||||||||||||||||||||
| 776 | # char1 => '>' | ||||||||||||||||||||
| 777 | # context => '#pop' | ||||||||||||||||||||
| 778 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 779 | 670 | ▶ | if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop', 'HTML Tag')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 780 | 0 | return 1 | |||||||||||||||||||
| 781 | } | ||||||||||||||||||||
| 782 | # attribute => 'HTML Tag' | ||||||||||||||||||||
| 783 | # char => '>' | ||||||||||||||||||||
| 784 | # context => '#pop' | ||||||||||||||||||||
| 785 | # type => 'DetectChar' | ||||||||||||||||||||
| 786 | 670 | ▶ | if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'HTML Tag')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 787 | 62 | return 1 | |||||||||||||||||||
| 788 | } | ||||||||||||||||||||
| 789 | # String => '\s*=\s*' | ||||||||||||||||||||
| 790 | # attribute => 'Identifier' | ||||||||||||||||||||
| 791 | # context => 'ML_identifiers' | ||||||||||||||||||||
| 792 | # type => 'RegExpr' | ||||||||||||||||||||
| 793 | 608 | ▶ | if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'ML_identifiers', 'Identifier')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 794 | 92 | return 1 | |||||||||||||||||||
| 795 | } | ||||||||||||||||||||
| 796 | 516 | return 0; | |||||||||||||||||||
| 797 | }; | ||||||||||||||||||||
| 798 | |||||||||||||||||||||
| 799 | sub parseML_identifiers { | ||||||||||||||||||||
| 800 | 110 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseML_identifiers: called CC=5 SCAR=16.6
Pod
undocumented
| |||||||||||||||||||||
| 801 | # attribute => 'Comment' | ||||||||||||||||||||
| 802 | # char => '*' | ||||||||||||||||||||
| 803 | # char1 => '/' | ||||||||||||||||||||
| 804 | # context => '#pop' | ||||||||||||||||||||
| 805 | # lookAhead => 'true' | ||||||||||||||||||||
| 806 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 807 | 110 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 808 | 30 | return 1 | |||||||||||||||||||
| 809 | } | ||||||||||||||||||||
| 810 | # String => '\s*#?[a-zA-Z0-9]*' | ||||||||||||||||||||
| 811 | # attribute => 'String' | ||||||||||||||||||||
| 812 | # context => '#pop' | ||||||||||||||||||||
| 813 | # type => 'RegExpr' | ||||||||||||||||||||
| 814 | 80 | ▶ | if ($self->testRegExpr($text, '\\s*#?[a-zA-Z0-9]*', 0, 0, 0, undef, 0, '#pop', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 815 | 0 | return 1 | |||||||||||||||||||
| 816 | } | ||||||||||||||||||||
| 817 | # attribute => 'Types' | ||||||||||||||||||||
| 818 | # char => ''' | ||||||||||||||||||||
| 819 | # context => 'ML_types1' | ||||||||||||||||||||
| 820 | # type => 'DetectChar' | ||||||||||||||||||||
| 821 | 80 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'ML_types1', 'Types')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 822 | 24 | return 1 | |||||||||||||||||||
| 823 | } | ||||||||||||||||||||
| 824 | # attribute => 'Types' | ||||||||||||||||||||
| 825 | # char => '"' | ||||||||||||||||||||
| 826 | # context => 'ML_types2' | ||||||||||||||||||||
| 827 | # type => 'DetectChar' | ||||||||||||||||||||
| 828 | 56 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'ML_types2', 'Types')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 829 | 56 | return 1 | |||||||||||||||||||
| 830 | } | ||||||||||||||||||||
| 831 | 0 | return 0; | |||||||||||||||||||
| 832 | }; | ||||||||||||||||||||
| 833 | |||||||||||||||||||||
| 834 | sub parseML_types1 { | ||||||||||||||||||||
| 835 | 114 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseML_types1: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||
| 836 | # attribute => 'Comment' | ||||||||||||||||||||
| 837 | # char => '*' | ||||||||||||||||||||
| 838 | # char1 => '/' | ||||||||||||||||||||
| 839 | # context => '#pop' | ||||||||||||||||||||
| 840 | # lookAhead => 'true' | ||||||||||||||||||||
| 841 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 842 | 114 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 843 | 8 | return 1 | |||||||||||||||||||
| 844 | } | ||||||||||||||||||||
| 845 | # attribute => 'Types' | ||||||||||||||||||||
| 846 | # char => ''' | ||||||||||||||||||||
| 847 | # context => '#pop#pop' | ||||||||||||||||||||
| 848 | # type => 'DetectChar' | ||||||||||||||||||||
| 849 | 106 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 850 | 16 | return 1 | |||||||||||||||||||
| 851 | } | ||||||||||||||||||||
| 852 | 90 | return 0; | |||||||||||||||||||
| 853 | }; | ||||||||||||||||||||
| 854 | |||||||||||||||||||||
| 855 | sub parseML_types2 { | ||||||||||||||||||||
| 856 | 316 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseML_types2: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||
| 857 | # attribute => 'Comment' | ||||||||||||||||||||
| 858 | # char => '*' | ||||||||||||||||||||
| 859 | # char1 => '/' | ||||||||||||||||||||
| 860 | # context => '#pop' | ||||||||||||||||||||
| 861 | # lookAhead => 'true' | ||||||||||||||||||||
| 862 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 863 | 316 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 864 | 10 | return 1 | |||||||||||||||||||
| 865 | } | ||||||||||||||||||||
| 866 | # attribute => 'Types' | ||||||||||||||||||||
| 867 | # char => '"' | ||||||||||||||||||||
| 868 | # context => '#pop#pop' | ||||||||||||||||||||
| 869 | # type => 'DetectChar' | ||||||||||||||||||||
| 870 | 306 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 871 | 46 | return 1 | |||||||||||||||||||
| 872 | } | ||||||||||||||||||||
| 873 | 260 | return 0; | |||||||||||||||||||
| 874 | }; | ||||||||||||||||||||
| 875 | |||||||||||||||||||||
| 876 | sub parseNormal { | ||||||||||||||||||||
| 877 | 13754 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseNormal: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||
| 878 | # String => '//(!|(/(?=[^/]|$)))<?' | ||||||||||||||||||||
| 879 | # attribute => 'Comment' | ||||||||||||||||||||
| 880 | # context => 'LineComment' | ||||||||||||||||||||
| 881 | # type => 'RegExpr' | ||||||||||||||||||||
| 882 | 13754 | ▶ | if ($self->testRegExpr($text, '//(!|(/(?=[^/]|$)))<?', 0, 0, 0, undef, 0, 'LineComment', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 883 | 88 | return 1 | |||||||||||||||||||
| 884 | } | ||||||||||||||||||||
| 885 | # String => '/\*(\*[^*/]|!|\*$)<?' | ||||||||||||||||||||
| 886 | # attribute => 'Comment' | ||||||||||||||||||||
| 887 | # beginRegion => 'BlockComment' | ||||||||||||||||||||
| 888 | # context => 'BlockComment' | ||||||||||||||||||||
| 889 | # type => 'RegExpr' | ||||||||||||||||||||
| 890 | 13666 | ▶ | if ($self->testRegExpr($text, '/\\*(\\*[^*/]|!|\\*$)<?', 0, 0, 0, undef, 0, 'BlockComment', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 891 | 206 | return 1 | |||||||||||||||||||
| 892 | } | ||||||||||||||||||||
| 893 | 13460 | return 0; | |||||||||||||||||||
| 894 | }; | ||||||||||||||||||||
| 895 | |||||||||||||||||||||
| 896 | sub parseSL_Tag2ndWord { | ||||||||||||||||||||
| 897 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSL_Tag2ndWord: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 898 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 899 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 900 | 0 | return 1 | |||||||||||||||||||
| 901 | } | ||||||||||||||||||||
| 902 | # String => '\S\s' | ||||||||||||||||||||
| 903 | # attribute => 'Word' | ||||||||||||||||||||
| 904 | # context => '#pop' | ||||||||||||||||||||
| 905 | # type => 'RegExpr' | ||||||||||||||||||||
| 906 | 0 | ▶ | if ($self->testRegExpr($text, '\\S\\s', 0, 0, 0, undef, 0, '#pop', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 907 | 0 | return 1 | |||||||||||||||||||
| 908 | } | ||||||||||||||||||||
| 909 | # String => '\S' | ||||||||||||||||||||
| 910 | # attribute => 'Word' | ||||||||||||||||||||
| 911 | # context => '#stay' | ||||||||||||||||||||
| 912 | # type => 'RegExpr' | ||||||||||||||||||||
| 913 | 0 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 914 | 0 | return 1 | |||||||||||||||||||
| 915 | } | ||||||||||||||||||||
| 916 | 0 | return 0; | |||||||||||||||||||
| 917 | }; | ||||||||||||||||||||
| 918 | |||||||||||||||||||||
| 919 | sub parseSL_TagString { | ||||||||||||||||||||
| 920 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSL_TagString: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||
| 921 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 922 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 923 | 0 | return 1 | |||||||||||||||||||
| 924 | } | ||||||||||||||||||||
| 925 | # String => '<!--' | ||||||||||||||||||||
| 926 | # attribute => 'HTML Comment' | ||||||||||||||||||||
| 927 | # context => 'SL_htmlcomment' | ||||||||||||||||||||
| 928 | # type => 'StringDetect' | ||||||||||||||||||||
| 929 | 0 | ▶ | if ($self->testStringDetect($text, '<!--', 0, 0, 0, undef, 0, 'SL_htmlcomment', 'HTML Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 930 | 0 | return 1 | |||||||||||||||||||
| 931 | } | ||||||||||||||||||||
| 932 | # attribute => 'Comment' | ||||||||||||||||||||
| 933 | # char => '<' | ||||||||||||||||||||
| 934 | # char1 => '<' | ||||||||||||||||||||
| 935 | # context => '#stay' | ||||||||||||||||||||
| 936 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 937 | 0 | ▶ | if ($self->testDetect2Chars($text, '<', '<', 0, 0, 0, undef, 0, '#stay', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 938 | 0 | return 1 | |||||||||||||||||||
| 939 | } | ||||||||||||||||||||
| 940 | # String => '<\s*\/?\s*[a-zA-Z_:][a-zA-Z0-9._:-]*' | ||||||||||||||||||||
| 941 | # attribute => 'HTML Tag' | ||||||||||||||||||||
| 942 | # context => 'SL_htmltag' | ||||||||||||||||||||
| 943 | # type => 'RegExpr' | ||||||||||||||||||||
| 944 | 0 | ▶ | if ($self->testRegExpr($text, '<\\s*\\/?\\s*[a-zA-Z_:][a-zA-Z0-9._:-]*', 0, 0, 0, undef, 0, 'SL_htmltag', 'HTML Tag')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 945 | 0 | return 1 | |||||||||||||||||||
| 946 | } | ||||||||||||||||||||
| 947 | # String => '.' | ||||||||||||||||||||
| 948 | # attribute => 'Description' | ||||||||||||||||||||
| 949 | # context => '#stay' | ||||||||||||||||||||
| 950 | # type => 'RegExpr' | ||||||||||||||||||||
| 951 | 0 | ▶ | if ($self->testRegExpr($text, '.', 0, 0, 0, undef, 0, '#stay', 'Description')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 952 | 0 | return 1 | |||||||||||||||||||
| 953 | } | ||||||||||||||||||||
| 954 | 0 | return 0; | |||||||||||||||||||
| 955 | }; | ||||||||||||||||||||
| 956 | |||||||||||||||||||||
| 957 | sub parseSL_TagWord { | ||||||||||||||||||||
| 958 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSL_TagWord: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 959 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 960 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 961 | 0 | return 1 | |||||||||||||||||||
| 962 | } | ||||||||||||||||||||
| 963 | # String => '\S\s' | ||||||||||||||||||||
| 964 | # attribute => 'Word' | ||||||||||||||||||||
| 965 | # context => '#pop' | ||||||||||||||||||||
| 966 | # type => 'RegExpr' | ||||||||||||||||||||
| 967 | 0 | ▶ | if ($self->testRegExpr($text, '\\S\\s', 0, 0, 0, undef, 0, '#pop', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 968 | 0 | return 1 | |||||||||||||||||||
| 969 | } | ||||||||||||||||||||
| 970 | # String => '\S' | ||||||||||||||||||||
| 971 | # attribute => 'Word' | ||||||||||||||||||||
| 972 | # context => '#stay' | ||||||||||||||||||||
| 973 | # type => 'RegExpr' | ||||||||||||||||||||
| 974 | 0 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 975 | 0 | return 1 | |||||||||||||||||||
| 976 | } | ||||||||||||||||||||
| 977 | 0 | return 0; | |||||||||||||||||||
| 978 | }; | ||||||||||||||||||||
| 979 | |||||||||||||||||||||
| 980 | sub parseSL_TagWordString { | ||||||||||||||||||||
| 981 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSL_TagWordString: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 982 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 983 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 984 | 0 | return 1 | |||||||||||||||||||
| 985 | } | ||||||||||||||||||||
| 986 | # String => '\S\s' | ||||||||||||||||||||
| 987 | # attribute => 'Word' | ||||||||||||||||||||
| 988 | # context => '#pop' | ||||||||||||||||||||
| 989 | # type => 'RegExpr' | ||||||||||||||||||||
| 990 | 0 | ▶ | if ($self->testRegExpr($text, '\\S\\s', 0, 0, 0, undef, 0, '#pop', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 991 | 0 | return 1 | |||||||||||||||||||
| 992 | } | ||||||||||||||||||||
| 993 | # String => '\S' | ||||||||||||||||||||
| 994 | # attribute => 'Word' | ||||||||||||||||||||
| 995 | # context => '#stay' | ||||||||||||||||||||
| 996 | # type => 'RegExpr' | ||||||||||||||||||||
| 997 | 0 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 998 | 0 | return 1 | |||||||||||||||||||
| 999 | } | ||||||||||||||||||||
| 1000 | 0 | return 0; | |||||||||||||||||||
| 1001 | }; | ||||||||||||||||||||
| 1002 | |||||||||||||||||||||
| 1003 | sub parseSL_TagWordWord { | ||||||||||||||||||||
| 1004 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSL_TagWordWord: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 1005 | # type => 'DetectSpaces' | ||||||||||||||||||||
| 1006 | 0 | ▶ | if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1007 | 0 | return 1 | |||||||||||||||||||
| 1008 | } | ||||||||||||||||||||
| 1009 | # String => '\S\s' | ||||||||||||||||||||
| 1010 | # attribute => 'Word' | ||||||||||||||||||||
| 1011 | # context => '#pop' | ||||||||||||||||||||
| 1012 | # type => 'RegExpr' | ||||||||||||||||||||
| 1013 | 0 | ▶ | if ($self->testRegExpr($text, '\\S\\s', 0, 0, 0, undef, 0, '#pop', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1014 | 0 | return 1 | |||||||||||||||||||
| 1015 | } | ||||||||||||||||||||
| 1016 | # String => '\S' | ||||||||||||||||||||
| 1017 | # attribute => 'Word' | ||||||||||||||||||||
| 1018 | # context => '#stay' | ||||||||||||||||||||
| 1019 | # type => 'RegExpr' | ||||||||||||||||||||
| 1020 | 0 | ▶ | if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Word')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1021 | 0 | return 1 | |||||||||||||||||||
| 1022 | } | ||||||||||||||||||||
| 1023 | 0 | return 0; | |||||||||||||||||||
| 1024 | }; | ||||||||||||||||||||
| 1025 | |||||||||||||||||||||
| 1026 | sub parseSL_htmlcomment { | ||||||||||||||||||||
| 1027 | 8 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSL_htmlcomment: called CC=3 SCAR=11.2
Pod
undocumented
| |||||||||||||||||||||
| 1028 | # context => '##Alerts' | ||||||||||||||||||||
| 1029 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1030 | 8 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1031 | 0 | return 1 | |||||||||||||||||||
| 1032 | } | ||||||||||||||||||||
| 1033 | # String => '-->' | ||||||||||||||||||||
| 1034 | # attribute => 'HTML Comment' | ||||||||||||||||||||
| 1035 | # context => '#pop' | ||||||||||||||||||||
| 1036 | # type => 'StringDetect' | ||||||||||||||||||||
| 1037 | 8 | ▶ | if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'HTML Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1038 | 2 | return 1 | |||||||||||||||||||
| 1039 | } | ||||||||||||||||||||
| 1040 | 6 | return 0; | |||||||||||||||||||
| 1041 | }; | ||||||||||||||||||||
| 1042 | |||||||||||||||||||||
| 1043 | sub parseSL_htmltag { | ||||||||||||||||||||
| 1044 | 330 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSL_htmltag: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||
| 1045 | # attribute => 'HTML Tag' | ||||||||||||||||||||
| 1046 | # char => '/' | ||||||||||||||||||||
| 1047 | # char1 => '>' | ||||||||||||||||||||
| 1048 | # context => '#pop' | ||||||||||||||||||||
| 1049 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 1050 | 330 | ▶ | if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop', 'HTML Tag')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1051 | 4 | return 1 | |||||||||||||||||||
| 1052 | } | ||||||||||||||||||||
| 1053 | # attribute => 'HTML Tag' | ||||||||||||||||||||
| 1054 | # char => '>' | ||||||||||||||||||||
| 1055 | # context => '#pop' | ||||||||||||||||||||
| 1056 | # type => 'DetectChar' | ||||||||||||||||||||
| 1057 | 326 | ▶ | if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'HTML Tag')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1058 | 30 | return 1 | |||||||||||||||||||
| 1059 | } | ||||||||||||||||||||
| 1060 | # String => '\s*=\s*' | ||||||||||||||||||||
| 1061 | # attribute => 'Identifier' | ||||||||||||||||||||
| 1062 | # context => 'SL_identifiers' | ||||||||||||||||||||
| 1063 | # type => 'RegExpr' | ||||||||||||||||||||
| 1064 | 296 | ▶ | if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'SL_identifiers', 'Identifier')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1065 | 46 | return 1 | |||||||||||||||||||
| 1066 | } | ||||||||||||||||||||
| 1067 | 250 | return 0; | |||||||||||||||||||
| 1068 | }; | ||||||||||||||||||||
| 1069 | |||||||||||||||||||||
| 1070 | sub parseSL_identifiers { | ||||||||||||||||||||
| 1071 | 54 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSL_identifiers: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||||||||||||
| 1072 | # String => '\s*#?[a-zA-Z0-9]*' | ||||||||||||||||||||
| 1073 | # attribute => 'String' | ||||||||||||||||||||
| 1074 | # context => '#pop' | ||||||||||||||||||||
| 1075 | # type => 'RegExpr' | ||||||||||||||||||||
| 1076 | 54 | ▶ | if ($self->testRegExpr($text, '\\s*#?[a-zA-Z0-9]*', 0, 0, 0, undef, 0, '#pop', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1077 | 0 | return 1 | |||||||||||||||||||
| 1078 | } | ||||||||||||||||||||
| 1079 | # attribute => 'Types' | ||||||||||||||||||||
| 1080 | # char => ''' | ||||||||||||||||||||
| 1081 | # context => 'SL_types1' | ||||||||||||||||||||
| 1082 | # type => 'DetectChar' | ||||||||||||||||||||
| 1083 | 54 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'SL_types1', 'Types')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1084 | 12 | return 1 | |||||||||||||||||||
| 1085 | } | ||||||||||||||||||||
| 1086 | # attribute => 'Types' | ||||||||||||||||||||
| 1087 | # char => '"' | ||||||||||||||||||||
| 1088 | # context => 'SL_types2' | ||||||||||||||||||||
| 1089 | # type => 'DetectChar' | ||||||||||||||||||||
| 1090 | 42 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'SL_types2', 'Types')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1091 | 34 | return 1 | |||||||||||||||||||
| 1092 | } | ||||||||||||||||||||
| 1093 | 8 | return 0; | |||||||||||||||||||
| 1094 | }; | ||||||||||||||||||||
| 1095 | |||||||||||||||||||||
| 1096 | sub parseSL_types1 { | ||||||||||||||||||||
| 1097 | 84 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSL_types1: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 1098 | # attribute => 'Types' | ||||||||||||||||||||
| 1099 | # char => ''' | ||||||||||||||||||||
| 1100 | # context => '#pop#pop' | ||||||||||||||||||||
| 1101 | # type => 'DetectChar' | ||||||||||||||||||||
| 1102 | 84 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1103 | 12 | return 1 | |||||||||||||||||||
| 1104 | } | ||||||||||||||||||||
| 1105 | 72 | return 0; | |||||||||||||||||||
| 1106 | }; | ||||||||||||||||||||
| 1107 | |||||||||||||||||||||
| 1108 | sub parseSL_types2 { | ||||||||||||||||||||
| 1109 | 216 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSL_types2: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 1110 | # attribute => 'Types' | ||||||||||||||||||||
| 1111 | # char => '"' | ||||||||||||||||||||
| 1112 | # context => '#pop#pop' | ||||||||||||||||||||
| 1113 | # type => 'DetectChar' | ||||||||||||||||||||
| 1114 | 216 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1115 | 34 | return 1 | |||||||||||||||||||
| 1116 | } | ||||||||||||||||||||
| 1117 | 182 | return 0; | |||||||||||||||||||
| 1118 | }; | ||||||||||||||||||||
| 1119 | |||||||||||||||||||||
| 1120 | |||||||||||||||||||||
| 1121 | 1 | 1; | |||||||||||||||||||
| 1122 | |||||||||||||||||||||
| 1123 | __END__ | ||||||||||||||||||||