| 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 'bash.xml' file of the syntax highlight | ||||||||||||||||||||
| 6 | # engine of the kate text editor (http://www.kate-editor.org | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | #kate xml version 2.05 | ||||||||||||||||||||
| 9 | #kate version 2.4 | ||||||||||||||||||||
| 10 | #kate author Wilbert Berendsen (wilbert@kde.nl) | ||||||||||||||||||||
| 11 | #generated: Sun Feb 3 22:02:04 2008, localtime | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | package Syntax::Highlight::Engine::Kate::Bash; | ||||||||||||||||||||
| 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 | 2 | ▶ | my $proto = shift; | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 23 | 2 | ▶ | 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 | 2 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 25 | 2 | $self->attributes({ | |||||||||||||||||||
| 26 | 'Backquote' => 'Keyword', | ||||||||||||||||||||
| 27 | 'Builtin' => 'Reserved', | ||||||||||||||||||||
| 28 | 'Command' => 'BString', | ||||||||||||||||||||
| 29 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 30 | 'Control' => 'Keyword', | ||||||||||||||||||||
| 31 | 'Escape' => 'DataType', | ||||||||||||||||||||
| 32 | 'Expression' => 'Others', | ||||||||||||||||||||
| 33 | 'Function' => 'Char', | ||||||||||||||||||||
| 34 | 'Keyword' => 'Keyword', | ||||||||||||||||||||
| 35 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 36 | 'Option' => 'Normal', | ||||||||||||||||||||
| 37 | 'Path' => 'Normal', | ||||||||||||||||||||
| 38 | 'Redirection' => 'Operator', | ||||||||||||||||||||
| 39 | 'String DoubleQ' => 'String', | ||||||||||||||||||||
| 40 | 'String Escape' => 'DataType', | ||||||||||||||||||||
| 41 | 'String SingleQ' => 'String', | ||||||||||||||||||||
| 42 | 'String Transl.' => 'String', | ||||||||||||||||||||
| 43 | 'Variable' => 'Others', | ||||||||||||||||||||
| 44 | }); | ||||||||||||||||||||
| 45 | 2 | $self->listAdd('builtins', | |||||||||||||||||||
| 46 | '.', | ||||||||||||||||||||
| 47 | ':', | ||||||||||||||||||||
| 48 | 'alias', | ||||||||||||||||||||
| 49 | 'bg', | ||||||||||||||||||||
| 50 | 'bind', | ||||||||||||||||||||
| 51 | 'break', | ||||||||||||||||||||
| 52 | 'builtin', | ||||||||||||||||||||
| 53 | 'cd', | ||||||||||||||||||||
| 54 | 'command', | ||||||||||||||||||||
| 55 | 'compgen', | ||||||||||||||||||||
| 56 | 'complete', | ||||||||||||||||||||
| 57 | 'continue', | ||||||||||||||||||||
| 58 | 'dirs', | ||||||||||||||||||||
| 59 | 'disown', | ||||||||||||||||||||
| 60 | 'echo', | ||||||||||||||||||||
| 61 | 'enable', | ||||||||||||||||||||
| 62 | 'eval', | ||||||||||||||||||||
| 63 | 'exec', | ||||||||||||||||||||
| 64 | 'exit', | ||||||||||||||||||||
| 65 | 'fc', | ||||||||||||||||||||
| 66 | 'fg', | ||||||||||||||||||||
| 67 | 'getopts', | ||||||||||||||||||||
| 68 | 'hash', | ||||||||||||||||||||
| 69 | 'help', | ||||||||||||||||||||
| 70 | 'history', | ||||||||||||||||||||
| 71 | 'jobs', | ||||||||||||||||||||
| 72 | 'kill', | ||||||||||||||||||||
| 73 | 'let', | ||||||||||||||||||||
| 74 | 'logout', | ||||||||||||||||||||
| 75 | 'popd', | ||||||||||||||||||||
| 76 | 'printf', | ||||||||||||||||||||
| 77 | 'pushd', | ||||||||||||||||||||
| 78 | 'pwd', | ||||||||||||||||||||
| 79 | 'return', | ||||||||||||||||||||
| 80 | 'set', | ||||||||||||||||||||
| 81 | 'shift', | ||||||||||||||||||||
| 82 | 'shopt', | ||||||||||||||||||||
| 83 | 'source', | ||||||||||||||||||||
| 84 | 'suspend', | ||||||||||||||||||||
| 85 | 'test', | ||||||||||||||||||||
| 86 | 'times', | ||||||||||||||||||||
| 87 | 'trap', | ||||||||||||||||||||
| 88 | 'type', | ||||||||||||||||||||
| 89 | 'ulimit', | ||||||||||||||||||||
| 90 | 'umask', | ||||||||||||||||||||
| 91 | 'unalias', | ||||||||||||||||||||
| 92 | 'wait', | ||||||||||||||||||||
| 93 | ); | ||||||||||||||||||||
| 94 | 2 | $self->listAdd('builtins_var', | |||||||||||||||||||
| 95 | 'declare', | ||||||||||||||||||||
| 96 | 'export', | ||||||||||||||||||||
| 97 | 'local', | ||||||||||||||||||||
| 98 | 'read', | ||||||||||||||||||||
| 99 | 'readonly', | ||||||||||||||||||||
| 100 | 'typeset', | ||||||||||||||||||||
| 101 | 'unset', | ||||||||||||||||||||
| 102 | ); | ||||||||||||||||||||
| 103 | 2 | $self->listAdd('keywords', | |||||||||||||||||||
| 104 | '.', | ||||||||||||||||||||
| 105 | 'elif', | ||||||||||||||||||||
| 106 | 'else', | ||||||||||||||||||||
| 107 | 'for', | ||||||||||||||||||||
| 108 | 'function', | ||||||||||||||||||||
| 109 | 'in', | ||||||||||||||||||||
| 110 | 'select', | ||||||||||||||||||||
| 111 | 'set', | ||||||||||||||||||||
| 112 | 'then', | ||||||||||||||||||||
| 113 | 'until', | ||||||||||||||||||||
| 114 | 'while', | ||||||||||||||||||||
| 115 | ); | ||||||||||||||||||||
| 116 | 2 | $self->listAdd('unixcommands', | |||||||||||||||||||
| 117 | 'aclocal', | ||||||||||||||||||||
| 118 | 'aconnect', | ||||||||||||||||||||
| 119 | 'aplay', | ||||||||||||||||||||
| 120 | 'apm', | ||||||||||||||||||||
| 121 | 'apmsleep', | ||||||||||||||||||||
| 122 | 'apropos', | ||||||||||||||||||||
| 123 | 'ar', | ||||||||||||||||||||
| 124 | 'arch', | ||||||||||||||||||||
| 125 | 'arecord', | ||||||||||||||||||||
| 126 | 'as', | ||||||||||||||||||||
| 127 | 'as86', | ||||||||||||||||||||
| 128 | 'autoconf', | ||||||||||||||||||||
| 129 | 'autoheader', | ||||||||||||||||||||
| 130 | 'automake', | ||||||||||||||||||||
| 131 | 'awk', | ||||||||||||||||||||
| 132 | 'awk', | ||||||||||||||||||||
| 133 | 'basename', | ||||||||||||||||||||
| 134 | 'bash', | ||||||||||||||||||||
| 135 | 'bc', | ||||||||||||||||||||
| 136 | 'bison', | ||||||||||||||||||||
| 137 | 'bunzip2', | ||||||||||||||||||||
| 138 | 'bzcat', | ||||||||||||||||||||
| 139 | 'bzcmp', | ||||||||||||||||||||
| 140 | 'bzdiff', | ||||||||||||||||||||
| 141 | 'bzegrep', | ||||||||||||||||||||
| 142 | 'bzfgrep', | ||||||||||||||||||||
| 143 | 'bzgrep', | ||||||||||||||||||||
| 144 | 'bzip2', | ||||||||||||||||||||
| 145 | 'bzip2recover', | ||||||||||||||||||||
| 146 | 'bzless', | ||||||||||||||||||||
| 147 | 'bzmore', | ||||||||||||||||||||
| 148 | 'c++', | ||||||||||||||||||||
| 149 | 'cal', | ||||||||||||||||||||
| 150 | 'cat', | ||||||||||||||||||||
| 151 | 'cat', | ||||||||||||||||||||
| 152 | 'cc', | ||||||||||||||||||||
| 153 | 'cd-read', | ||||||||||||||||||||
| 154 | 'cdda2wav', | ||||||||||||||||||||
| 155 | 'cdparanoia', | ||||||||||||||||||||
| 156 | 'cdrdao', | ||||||||||||||||||||
| 157 | 'cdrecord', | ||||||||||||||||||||
| 158 | 'chattr', | ||||||||||||||||||||
| 159 | 'chfn', | ||||||||||||||||||||
| 160 | 'chgrp', | ||||||||||||||||||||
| 161 | 'chgrp', | ||||||||||||||||||||
| 162 | 'chmod', | ||||||||||||||||||||
| 163 | 'chmod', | ||||||||||||||||||||
| 164 | 'chown', | ||||||||||||||||||||
| 165 | 'chown', | ||||||||||||||||||||
| 166 | 'chroot', | ||||||||||||||||||||
| 167 | 'chsh', | ||||||||||||||||||||
| 168 | 'chvt', | ||||||||||||||||||||
| 169 | 'clear', | ||||||||||||||||||||
| 170 | 'cmp', | ||||||||||||||||||||
| 171 | 'co', | ||||||||||||||||||||
| 172 | 'col', | ||||||||||||||||||||
| 173 | 'comm', | ||||||||||||||||||||
| 174 | 'cp', | ||||||||||||||||||||
| 175 | 'cp', | ||||||||||||||||||||
| 176 | 'cpio', | ||||||||||||||||||||
| 177 | 'cpp', | ||||||||||||||||||||
| 178 | 'cut', | ||||||||||||||||||||
| 179 | 'date', | ||||||||||||||||||||
| 180 | 'dc', | ||||||||||||||||||||
| 181 | 'dcop', | ||||||||||||||||||||
| 182 | 'dd', | ||||||||||||||||||||
| 183 | 'dd', | ||||||||||||||||||||
| 184 | 'deallocvt', | ||||||||||||||||||||
| 185 | 'df', | ||||||||||||||||||||
| 186 | 'df', | ||||||||||||||||||||
| 187 | 'diff', | ||||||||||||||||||||
| 188 | 'diff3', | ||||||||||||||||||||
| 189 | 'dir', | ||||||||||||||||||||
| 190 | 'dir', | ||||||||||||||||||||
| 191 | 'dircolors', | ||||||||||||||||||||
| 192 | 'dircolors', | ||||||||||||||||||||
| 193 | 'directomatic', | ||||||||||||||||||||
| 194 | 'dirname', | ||||||||||||||||||||
| 195 | 'dmesg', | ||||||||||||||||||||
| 196 | 'dnsdomainname', | ||||||||||||||||||||
| 197 | 'domainname', | ||||||||||||||||||||
| 198 | 'du', | ||||||||||||||||||||
| 199 | 'du', | ||||||||||||||||||||
| 200 | 'dumpkeys', | ||||||||||||||||||||
| 201 | 'echo', | ||||||||||||||||||||
| 202 | 'ed', | ||||||||||||||||||||
| 203 | 'egrep', | ||||||||||||||||||||
| 204 | 'env', | ||||||||||||||||||||
| 205 | 'expr', | ||||||||||||||||||||
| 206 | 'false', | ||||||||||||||||||||
| 207 | 'fbset', | ||||||||||||||||||||
| 208 | 'fgconsole', | ||||||||||||||||||||
| 209 | 'fgrep', | ||||||||||||||||||||
| 210 | 'file', | ||||||||||||||||||||
| 211 | 'find', | ||||||||||||||||||||
| 212 | 'flex', | ||||||||||||||||||||
| 213 | 'flex++', | ||||||||||||||||||||
| 214 | 'fmt', | ||||||||||||||||||||
| 215 | 'free', | ||||||||||||||||||||
| 216 | 'ftp', | ||||||||||||||||||||
| 217 | 'funzip', | ||||||||||||||||||||
| 218 | 'fuser', | ||||||||||||||||||||
| 219 | 'fuser', | ||||||||||||||||||||
| 220 | 'g++', | ||||||||||||||||||||
| 221 | 'gawk', | ||||||||||||||||||||
| 222 | 'gawk', | ||||||||||||||||||||
| 223 | 'gc', | ||||||||||||||||||||
| 224 | 'gcc', | ||||||||||||||||||||
| 225 | 'gdb', | ||||||||||||||||||||
| 226 | 'getent', | ||||||||||||||||||||
| 227 | 'getkeycodes', | ||||||||||||||||||||
| 228 | 'getopt', | ||||||||||||||||||||
| 229 | 'gettext', | ||||||||||||||||||||
| 230 | 'gettextize', | ||||||||||||||||||||
| 231 | 'gimp', | ||||||||||||||||||||
| 232 | 'gimp-remote', | ||||||||||||||||||||
| 233 | 'gimptool', | ||||||||||||||||||||
| 234 | 'gmake', | ||||||||||||||||||||
| 235 | 'gocr', | ||||||||||||||||||||
| 236 | 'grep', | ||||||||||||||||||||
| 237 | 'groups', | ||||||||||||||||||||
| 238 | 'gs', | ||||||||||||||||||||
| 239 | 'gunzip', | ||||||||||||||||||||
| 240 | 'gzexe', | ||||||||||||||||||||
| 241 | 'gzip', | ||||||||||||||||||||
| 242 | 'head', | ||||||||||||||||||||
| 243 | 'hexdump', | ||||||||||||||||||||
| 244 | 'hostname', | ||||||||||||||||||||
| 245 | 'id', | ||||||||||||||||||||
| 246 | 'igawk', | ||||||||||||||||||||
| 247 | 'install', | ||||||||||||||||||||
| 248 | 'install', | ||||||||||||||||||||
| 249 | 'join', | ||||||||||||||||||||
| 250 | 'kbd_mode', | ||||||||||||||||||||
| 251 | 'kbdrate', | ||||||||||||||||||||
| 252 | 'kdialog', | ||||||||||||||||||||
| 253 | 'kfile', | ||||||||||||||||||||
| 254 | 'kill', | ||||||||||||||||||||
| 255 | 'killall', | ||||||||||||||||||||
| 256 | 'killall', | ||||||||||||||||||||
| 257 | 'last', | ||||||||||||||||||||
| 258 | 'lastb', | ||||||||||||||||||||
| 259 | 'ld', | ||||||||||||||||||||
| 260 | 'ld86', | ||||||||||||||||||||
| 261 | 'ldd', | ||||||||||||||||||||
| 262 | 'less', | ||||||||||||||||||||
| 263 | 'lex', | ||||||||||||||||||||
| 264 | 'link', | ||||||||||||||||||||
| 265 | 'ln', | ||||||||||||||||||||
| 266 | 'ln', | ||||||||||||||||||||
| 267 | 'loadkeys', | ||||||||||||||||||||
| 268 | 'loadunimap', | ||||||||||||||||||||
| 269 | 'locate', | ||||||||||||||||||||
| 270 | 'lockfile', | ||||||||||||||||||||
| 271 | 'login', | ||||||||||||||||||||
| 272 | 'logname', | ||||||||||||||||||||
| 273 | 'lp', | ||||||||||||||||||||
| 274 | 'lpr', | ||||||||||||||||||||
| 275 | 'ls', | ||||||||||||||||||||
| 276 | 'ls', | ||||||||||||||||||||
| 277 | 'lsattr', | ||||||||||||||||||||
| 278 | 'lsmod', | ||||||||||||||||||||
| 279 | 'lsmod.old', | ||||||||||||||||||||
| 280 | 'lynx', | ||||||||||||||||||||
| 281 | 'm4', | ||||||||||||||||||||
| 282 | 'make', | ||||||||||||||||||||
| 283 | 'man', | ||||||||||||||||||||
| 284 | 'mapscrn', | ||||||||||||||||||||
| 285 | 'mesg', | ||||||||||||||||||||
| 286 | 'mkdir', | ||||||||||||||||||||
| 287 | 'mkdir', | ||||||||||||||||||||
| 288 | 'mkfifo', | ||||||||||||||||||||
| 289 | 'mknod', | ||||||||||||||||||||
| 290 | 'mknod', | ||||||||||||||||||||
| 291 | 'mktemp', | ||||||||||||||||||||
| 292 | 'more', | ||||||||||||||||||||
| 293 | 'mount', | ||||||||||||||||||||
| 294 | 'msgfmt', | ||||||||||||||||||||
| 295 | 'mv', | ||||||||||||||||||||
| 296 | 'mv', | ||||||||||||||||||||
| 297 | 'namei', | ||||||||||||||||||||
| 298 | 'nano', | ||||||||||||||||||||
| 299 | 'nasm', | ||||||||||||||||||||
| 300 | 'nawk', | ||||||||||||||||||||
| 301 | 'netstat', | ||||||||||||||||||||
| 302 | 'nice', | ||||||||||||||||||||
| 303 | 'nisdomainname', | ||||||||||||||||||||
| 304 | 'nl', | ||||||||||||||||||||
| 305 | 'nm', | ||||||||||||||||||||
| 306 | 'nm86', | ||||||||||||||||||||
| 307 | 'nmap', | ||||||||||||||||||||
| 308 | 'nohup', | ||||||||||||||||||||
| 309 | 'nop', | ||||||||||||||||||||
| 310 | 'od', | ||||||||||||||||||||
| 311 | 'openvt', | ||||||||||||||||||||
| 312 | 'passwd', | ||||||||||||||||||||
| 313 | 'patch', | ||||||||||||||||||||
| 314 | 'pcregrep', | ||||||||||||||||||||
| 315 | 'pcretest', | ||||||||||||||||||||
| 316 | 'perl', | ||||||||||||||||||||
| 317 | 'perror', | ||||||||||||||||||||
| 318 | 'pgawk', | ||||||||||||||||||||
| 319 | 'pidof', | ||||||||||||||||||||
| 320 | 'pidof', | ||||||||||||||||||||
| 321 | 'ping', | ||||||||||||||||||||
| 322 | 'pr', | ||||||||||||||||||||
| 323 | 'printf', | ||||||||||||||||||||
| 324 | 'procmail', | ||||||||||||||||||||
| 325 | 'prune', | ||||||||||||||||||||
| 326 | 'ps', | ||||||||||||||||||||
| 327 | 'ps2ascii', | ||||||||||||||||||||
| 328 | 'ps2epsi', | ||||||||||||||||||||
| 329 | 'ps2frag', | ||||||||||||||||||||
| 330 | 'ps2pdf', | ||||||||||||||||||||
| 331 | 'ps2ps', | ||||||||||||||||||||
| 332 | 'psbook', | ||||||||||||||||||||
| 333 | 'psmerge', | ||||||||||||||||||||
| 334 | 'psnup', | ||||||||||||||||||||
| 335 | 'psresize', | ||||||||||||||||||||
| 336 | 'psselect', | ||||||||||||||||||||
| 337 | 'pstops', | ||||||||||||||||||||
| 338 | 'pstree', | ||||||||||||||||||||
| 339 | 'pwd', | ||||||||||||||||||||
| 340 | 'rbash', | ||||||||||||||||||||
| 341 | 'rcs', | ||||||||||||||||||||
| 342 | 'readlink', | ||||||||||||||||||||
| 343 | 'red', | ||||||||||||||||||||
| 344 | 'resizecons', | ||||||||||||||||||||
| 345 | 'rev', | ||||||||||||||||||||
| 346 | 'rm', | ||||||||||||||||||||
| 347 | 'rm', | ||||||||||||||||||||
| 348 | 'rmdir', | ||||||||||||||||||||
| 349 | 'run-parts', | ||||||||||||||||||||
| 350 | 'sash', | ||||||||||||||||||||
| 351 | 'scp', | ||||||||||||||||||||
| 352 | 'sed', | ||||||||||||||||||||
| 353 | 'sed', | ||||||||||||||||||||
| 354 | 'seq', | ||||||||||||||||||||
| 355 | 'setfont', | ||||||||||||||||||||
| 356 | 'setkeycodes', | ||||||||||||||||||||
| 357 | 'setleds', | ||||||||||||||||||||
| 358 | 'setmetamode', | ||||||||||||||||||||
| 359 | 'setserial', | ||||||||||||||||||||
| 360 | 'setterm', | ||||||||||||||||||||
| 361 | 'sh', | ||||||||||||||||||||
| 362 | 'showkey', | ||||||||||||||||||||
| 363 | 'shred', | ||||||||||||||||||||
| 364 | 'shred', | ||||||||||||||||||||
| 365 | 'size', | ||||||||||||||||||||
| 366 | 'size86', | ||||||||||||||||||||
| 367 | 'skill', | ||||||||||||||||||||
| 368 | 'sleep', | ||||||||||||||||||||
| 369 | 'slogin', | ||||||||||||||||||||
| 370 | 'snice', | ||||||||||||||||||||
| 371 | 'sort', | ||||||||||||||||||||
| 372 | 'sox', | ||||||||||||||||||||
| 373 | 'split', | ||||||||||||||||||||
| 374 | 'ssed', | ||||||||||||||||||||
| 375 | 'ssh', | ||||||||||||||||||||
| 376 | 'ssh-add', | ||||||||||||||||||||
| 377 | 'ssh-agent', | ||||||||||||||||||||
| 378 | 'ssh-keygen', | ||||||||||||||||||||
| 379 | 'ssh-keyscan', | ||||||||||||||||||||
| 380 | 'stat', | ||||||||||||||||||||
| 381 | 'stat', | ||||||||||||||||||||
| 382 | 'strings', | ||||||||||||||||||||
| 383 | 'strip', | ||||||||||||||||||||
| 384 | 'stty', | ||||||||||||||||||||
| 385 | 'su', | ||||||||||||||||||||
| 386 | 'sudo', | ||||||||||||||||||||
| 387 | 'suidperl', | ||||||||||||||||||||
| 388 | 'sum', | ||||||||||||||||||||
| 389 | 'sync', | ||||||||||||||||||||
| 390 | 'tac', | ||||||||||||||||||||
| 391 | 'tail', | ||||||||||||||||||||
| 392 | 'tar', | ||||||||||||||||||||
| 393 | 'tee', | ||||||||||||||||||||
| 394 | 'tempfile', | ||||||||||||||||||||
| 395 | 'test', | ||||||||||||||||||||
| 396 | 'touch', | ||||||||||||||||||||
| 397 | 'tr', | ||||||||||||||||||||
| 398 | 'true', | ||||||||||||||||||||
| 399 | 'umount', | ||||||||||||||||||||
| 400 | 'uname', | ||||||||||||||||||||
| 401 | 'unicode_start', | ||||||||||||||||||||
| 402 | 'unicode_stop', | ||||||||||||||||||||
| 403 | 'uniq', | ||||||||||||||||||||
| 404 | 'unlink', | ||||||||||||||||||||
| 405 | 'unlink', | ||||||||||||||||||||
| 406 | 'unzip', | ||||||||||||||||||||
| 407 | 'updatedb', | ||||||||||||||||||||
| 408 | 'updmap', | ||||||||||||||||||||
| 409 | 'uptime', | ||||||||||||||||||||
| 410 | 'users', | ||||||||||||||||||||
| 411 | 'utmpdump', | ||||||||||||||||||||
| 412 | 'uuidgen', | ||||||||||||||||||||
| 413 | 'vdir', | ||||||||||||||||||||
| 414 | 'vmstat', | ||||||||||||||||||||
| 415 | 'w', | ||||||||||||||||||||
| 416 | 'wall', | ||||||||||||||||||||
| 417 | 'wc', | ||||||||||||||||||||
| 418 | 'wc', | ||||||||||||||||||||
| 419 | 'wget', | ||||||||||||||||||||
| 420 | 'whatis', | ||||||||||||||||||||
| 421 | 'whereis', | ||||||||||||||||||||
| 422 | 'which', | ||||||||||||||||||||
| 423 | 'who', | ||||||||||||||||||||
| 424 | 'whoami', | ||||||||||||||||||||
| 425 | 'write', | ||||||||||||||||||||
| 426 | 'xargs', | ||||||||||||||||||||
| 427 | 'xhost', | ||||||||||||||||||||
| 428 | 'xmodmap', | ||||||||||||||||||||
| 429 | 'xset', | ||||||||||||||||||||
| 430 | 'yacc', | ||||||||||||||||||||
| 431 | 'yes', | ||||||||||||||||||||
| 432 | 'ypdomainname', | ||||||||||||||||||||
| 433 | 'zcat', | ||||||||||||||||||||
| 434 | 'zcmp', | ||||||||||||||||||||
| 435 | 'zdiff', | ||||||||||||||||||||
| 436 | 'zegrep', | ||||||||||||||||||||
| 437 | 'zfgrep', | ||||||||||||||||||||
| 438 | 'zforce', | ||||||||||||||||||||
| 439 | 'zgrep', | ||||||||||||||||||||
| 440 | 'zip', | ||||||||||||||||||||
| 441 | 'zless', | ||||||||||||||||||||
| 442 | 'zmore', | ||||||||||||||||||||
| 443 | 'znew', | ||||||||||||||||||||
| 444 | 'zsh', | ||||||||||||||||||||
| 445 | 'zsoelim', | ||||||||||||||||||||
| 446 | ); | ||||||||||||||||||||
| 447 | 2 | $self->contextdata({ | |||||||||||||||||||
| 448 | 'Assign' => { | ||||||||||||||||||||
| 449 | callback => \&parseAssign, | ||||||||||||||||||||
| 450 | attribute => 'Normal Text', | ||||||||||||||||||||
| 451 | lineending => '#pop', | ||||||||||||||||||||
| 452 | fallthrough => '#pop', | ||||||||||||||||||||
| 453 | }, | ||||||||||||||||||||
| 454 | 'AssignArray' => { | ||||||||||||||||||||
| 455 | callback => \&parseAssignArray, | ||||||||||||||||||||
| 456 | attribute => 'Normal Text', | ||||||||||||||||||||
| 457 | lineending => '#pop', | ||||||||||||||||||||
| 458 | }, | ||||||||||||||||||||
| 459 | 'AssignSubscr' => { | ||||||||||||||||||||
| 460 | callback => \&parseAssignSubscr, | ||||||||||||||||||||
| 461 | attribute => 'Normal Text', | ||||||||||||||||||||
| 462 | lineending => '#pop', | ||||||||||||||||||||
| 463 | fallthrough => '#pop', | ||||||||||||||||||||
| 464 | }, | ||||||||||||||||||||
| 465 | 'Case' => { | ||||||||||||||||||||
| 466 | callback => \&parseCase, | ||||||||||||||||||||
| 467 | attribute => 'Normal Text', | ||||||||||||||||||||
| 468 | }, | ||||||||||||||||||||
| 469 | 'CaseExpr' => { | ||||||||||||||||||||
| 470 | callback => \&parseCaseExpr, | ||||||||||||||||||||
| 471 | attribute => 'Normal Text', | ||||||||||||||||||||
| 472 | }, | ||||||||||||||||||||
| 473 | 'CaseIn' => { | ||||||||||||||||||||
| 474 | callback => \&parseCaseIn, | ||||||||||||||||||||
| 475 | attribute => 'Normal Text', | ||||||||||||||||||||
| 476 | }, | ||||||||||||||||||||
| 477 | 'Comment' => { | ||||||||||||||||||||
| 478 | callback => \&parseComment, | ||||||||||||||||||||
| 479 | attribute => 'Comment', | ||||||||||||||||||||
| 480 | lineending => '#pop', | ||||||||||||||||||||
| 481 | }, | ||||||||||||||||||||
| 482 | 'CommentBackq' => { | ||||||||||||||||||||
| 483 | callback => \&parseCommentBackq, | ||||||||||||||||||||
| 484 | attribute => 'Comment', | ||||||||||||||||||||
| 485 | lineending => '#pop', | ||||||||||||||||||||
| 486 | }, | ||||||||||||||||||||
| 487 | 'CommentParen' => { | ||||||||||||||||||||
| 488 | callback => \&parseCommentParen, | ||||||||||||||||||||
| 489 | attribute => 'Comment', | ||||||||||||||||||||
| 490 | lineending => '#pop', | ||||||||||||||||||||
| 491 | }, | ||||||||||||||||||||
| 492 | 'ExprBracket' => { | ||||||||||||||||||||
| 493 | callback => \&parseExprBracket, | ||||||||||||||||||||
| 494 | attribute => 'Normal Text', | ||||||||||||||||||||
| 495 | }, | ||||||||||||||||||||
| 496 | 'ExprDblBracket' => { | ||||||||||||||||||||
| 497 | callback => \&parseExprDblBracket, | ||||||||||||||||||||
| 498 | attribute => 'Normal Text', | ||||||||||||||||||||
| 499 | }, | ||||||||||||||||||||
| 500 | 'ExprDblParen' => { | ||||||||||||||||||||
| 501 | callback => \&parseExprDblParen, | ||||||||||||||||||||
| 502 | attribute => 'Normal Text', | ||||||||||||||||||||
| 503 | }, | ||||||||||||||||||||
| 504 | 'ExprDblParenSubst' => { | ||||||||||||||||||||
| 505 | callback => \&parseExprDblParenSubst, | ||||||||||||||||||||
| 506 | attribute => 'Normal Text', | ||||||||||||||||||||
| 507 | }, | ||||||||||||||||||||
| 508 | 'ExprSubParen' => { | ||||||||||||||||||||
| 509 | callback => \&parseExprSubParen, | ||||||||||||||||||||
| 510 | attribute => 'Normal Text', | ||||||||||||||||||||
| 511 | }, | ||||||||||||||||||||
| 512 | 'FindAll' => { | ||||||||||||||||||||
| 513 | callback => \&parseFindAll, | ||||||||||||||||||||
| 514 | attribute => 'Normal Text', | ||||||||||||||||||||
| 515 | }, | ||||||||||||||||||||
| 516 | 'FindCommands' => { | ||||||||||||||||||||
| 517 | callback => \&parseFindCommands, | ||||||||||||||||||||
| 518 | attribute => 'Normal Text', | ||||||||||||||||||||
| 519 | }, | ||||||||||||||||||||
| 520 | 'FindComments' => { | ||||||||||||||||||||
| 521 | callback => \&parseFindComments, | ||||||||||||||||||||
| 522 | attribute => 'Normal Text', | ||||||||||||||||||||
| 523 | lineending => '#pop', | ||||||||||||||||||||
| 524 | }, | ||||||||||||||||||||
| 525 | 'FindCommentsBackq' => { | ||||||||||||||||||||
| 526 | callback => \&parseFindCommentsBackq, | ||||||||||||||||||||
| 527 | attribute => 'Normal Text', | ||||||||||||||||||||
| 528 | lineending => '#pop', | ||||||||||||||||||||
| 529 | }, | ||||||||||||||||||||
| 530 | 'FindCommentsParen' => { | ||||||||||||||||||||
| 531 | callback => \&parseFindCommentsParen, | ||||||||||||||||||||
| 532 | attribute => 'Normal Text', | ||||||||||||||||||||
| 533 | lineending => '#pop', | ||||||||||||||||||||
| 534 | }, | ||||||||||||||||||||
| 535 | 'FindMost' => { | ||||||||||||||||||||
| 536 | callback => \&parseFindMost, | ||||||||||||||||||||
| 537 | attribute => 'Normal Text', | ||||||||||||||||||||
| 538 | }, | ||||||||||||||||||||
| 539 | 'FindOthers' => { | ||||||||||||||||||||
| 540 | callback => \&parseFindOthers, | ||||||||||||||||||||
| 541 | attribute => 'Normal Text', | ||||||||||||||||||||
| 542 | }, | ||||||||||||||||||||
| 543 | 'FindStrings' => { | ||||||||||||||||||||
| 544 | callback => \&parseFindStrings, | ||||||||||||||||||||
| 545 | attribute => 'Normal Text', | ||||||||||||||||||||
| 546 | }, | ||||||||||||||||||||
| 547 | 'FindSubstitutions' => { | ||||||||||||||||||||
| 548 | callback => \&parseFindSubstitutions, | ||||||||||||||||||||
| 549 | attribute => 'Normal Text', | ||||||||||||||||||||
| 550 | }, | ||||||||||||||||||||
| 551 | 'FunctionDef' => { | ||||||||||||||||||||
| 552 | callback => \&parseFunctionDef, | ||||||||||||||||||||
| 553 | attribute => 'Function', | ||||||||||||||||||||
| 554 | lineending => '#pop', | ||||||||||||||||||||
| 555 | fallthrough => '#pop', | ||||||||||||||||||||
| 556 | }, | ||||||||||||||||||||
| 557 | 'Group' => { | ||||||||||||||||||||
| 558 | callback => \&parseGroup, | ||||||||||||||||||||
| 559 | attribute => 'Normal Text', | ||||||||||||||||||||
| 560 | }, | ||||||||||||||||||||
| 561 | 'HereDoc' => { | ||||||||||||||||||||
| 562 | callback => \&parseHereDoc, | ||||||||||||||||||||
| 563 | attribute => 'Normal Text', | ||||||||||||||||||||
| 564 | }, | ||||||||||||||||||||
| 565 | 'HereDocINQ' => { | ||||||||||||||||||||
| 566 | callback => \&parseHereDocINQ, | ||||||||||||||||||||
| 567 | attribute => 'Normal Text', | ||||||||||||||||||||
| 568 | dynamic => 1, | ||||||||||||||||||||
| 569 | }, | ||||||||||||||||||||
| 570 | 'HereDocIQ' => { | ||||||||||||||||||||
| 571 | callback => \&parseHereDocIQ, | ||||||||||||||||||||
| 572 | attribute => 'Normal Text', | ||||||||||||||||||||
| 573 | dynamic => 1, | ||||||||||||||||||||
| 574 | }, | ||||||||||||||||||||
| 575 | 'HereDocNQ' => { | ||||||||||||||||||||
| 576 | callback => \&parseHereDocNQ, | ||||||||||||||||||||
| 577 | attribute => 'Normal Text', | ||||||||||||||||||||
| 578 | dynamic => 1, | ||||||||||||||||||||
| 579 | }, | ||||||||||||||||||||
| 580 | 'HereDocQ' => { | ||||||||||||||||||||
| 581 | callback => \&parseHereDocQ, | ||||||||||||||||||||
| 582 | attribute => 'Normal Text', | ||||||||||||||||||||
| 583 | dynamic => 1, | ||||||||||||||||||||
| 584 | }, | ||||||||||||||||||||
| 585 | 'HereDocRemainder' => { | ||||||||||||||||||||
| 586 | callback => \&parseHereDocRemainder, | ||||||||||||||||||||
| 587 | attribute => 'Normal Text', | ||||||||||||||||||||
| 588 | lineending => '#pop', | ||||||||||||||||||||
| 589 | }, | ||||||||||||||||||||
| 590 | 'ProcessSubst' => { | ||||||||||||||||||||
| 591 | callback => \&parseProcessSubst, | ||||||||||||||||||||
| 592 | attribute => 'Normal Text', | ||||||||||||||||||||
| 593 | }, | ||||||||||||||||||||
| 594 | 'Start' => { | ||||||||||||||||||||
| 595 | callback => \&parseStart, | ||||||||||||||||||||
| 596 | attribute => 'Normal Text', | ||||||||||||||||||||
| 597 | }, | ||||||||||||||||||||
| 598 | 'StringDQ' => { | ||||||||||||||||||||
| 599 | callback => \&parseStringDQ, | ||||||||||||||||||||
| 600 | attribute => 'String DoubleQ', | ||||||||||||||||||||
| 601 | }, | ||||||||||||||||||||
| 602 | 'StringEsc' => { | ||||||||||||||||||||
| 603 | callback => \&parseStringEsc, | ||||||||||||||||||||
| 604 | attribute => 'String SingleQ', | ||||||||||||||||||||
| 605 | }, | ||||||||||||||||||||
| 606 | 'StringSQ' => { | ||||||||||||||||||||
| 607 | callback => \&parseStringSQ, | ||||||||||||||||||||
| 608 | attribute => 'String SingleQ', | ||||||||||||||||||||
| 609 | }, | ||||||||||||||||||||
| 610 | 'SubShell' => { | ||||||||||||||||||||
| 611 | callback => \&parseSubShell, | ||||||||||||||||||||
| 612 | attribute => 'Normal Text', | ||||||||||||||||||||
| 613 | }, | ||||||||||||||||||||
| 614 | 'Subscript' => { | ||||||||||||||||||||
| 615 | callback => \&parseSubscript, | ||||||||||||||||||||
| 616 | attribute => 'Variable', | ||||||||||||||||||||
| 617 | }, | ||||||||||||||||||||
| 618 | 'SubstBackq' => { | ||||||||||||||||||||
| 619 | callback => \&parseSubstBackq, | ||||||||||||||||||||
| 620 | attribute => 'Normal Text', | ||||||||||||||||||||
| 621 | }, | ||||||||||||||||||||
| 622 | 'SubstCommand' => { | ||||||||||||||||||||
| 623 | callback => \&parseSubstCommand, | ||||||||||||||||||||
| 624 | attribute => 'Normal Text', | ||||||||||||||||||||
| 625 | }, | ||||||||||||||||||||
| 626 | 'SubstFile' => { | ||||||||||||||||||||
| 627 | callback => \&parseSubstFile, | ||||||||||||||||||||
| 628 | attribute => 'Normal Text', | ||||||||||||||||||||
| 629 | }, | ||||||||||||||||||||
| 630 | 'VarBrace' => { | ||||||||||||||||||||
| 631 | callback => \&parseVarBrace, | ||||||||||||||||||||
| 632 | attribute => 'Variable', | ||||||||||||||||||||
| 633 | }, | ||||||||||||||||||||
| 634 | 'VarName' => { | ||||||||||||||||||||
| 635 | callback => \&parseVarName, | ||||||||||||||||||||
| 636 | attribute => 'Normal Text', | ||||||||||||||||||||
| 637 | lineending => '#pop', | ||||||||||||||||||||
| 638 | fallthrough => '#pop', | ||||||||||||||||||||
| 639 | }, | ||||||||||||||||||||
| 640 | }); | ||||||||||||||||||||
| 641 | 2 | $self->deliminators('\\s||\\(|\\)|\\!|\\+|,|<|=|>|\\&|\\*|\\/|;|\\?|\\||\\~|\\\\|\\^|\\%|#|\\[|\\]|\\$|\\.|_|\\{|\\}|:|-'); | |||||||||||||||||||
| 642 | 2 | $self->basecontext('Start'); | |||||||||||||||||||
| 643 | 2 | $self->keywordscase(0); | |||||||||||||||||||
| 644 | 2 | $self->initialize; | |||||||||||||||||||
| 645 | 2 | bless ($self, $class); | |||||||||||||||||||
| 646 | 2 | return $self; | |||||||||||||||||||
| 647 | } | ||||||||||||||||||||
| 648 | |||||||||||||||||||||
| 649 | sub language { | ||||||||||||||||||||
| 650 | 0 | ▶ | return 'Bash'; | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 651 | } | ||||||||||||||||||||
| 652 | |||||||||||||||||||||
| 653 | sub parseAssign { | ||||||||||||||||||||
| 654 | 50 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseAssign: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 655 | # attribute => 'Variable' | ||||||||||||||||||||
| 656 | # char => '(' | ||||||||||||||||||||
| 657 | # context => 'AssignArray' | ||||||||||||||||||||
| 658 | # type => 'DetectChar' | ||||||||||||||||||||
| 659 | 50 | ▶ | if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'AssignArray', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 660 | 4 | return 1 | |||||||||||||||||||
| 661 | } | ||||||||||||||||||||
| 662 | # context => 'FindStrings' | ||||||||||||||||||||
| 663 | # type => 'IncludeRules' | ||||||||||||||||||||
| 664 | 46 | ▶ | if ($self->includeRules('FindStrings', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 665 | 10 | return 1 | |||||||||||||||||||
| 666 | } | ||||||||||||||||||||
| 667 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 668 | # type => 'IncludeRules' | ||||||||||||||||||||
| 669 | 36 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 670 | 4 | return 1 | |||||||||||||||||||
| 671 | } | ||||||||||||||||||||
| 672 | # context => 'FindOthers' | ||||||||||||||||||||
| 673 | # type => 'IncludeRules' | ||||||||||||||||||||
| 674 | 32 | ▶ | if ($self->includeRules('FindOthers', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 675 | 8 | return 1 | |||||||||||||||||||
| 676 | } | ||||||||||||||||||||
| 677 | # String => '[\w:,+_./-]+' | ||||||||||||||||||||
| 678 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 679 | # context => '#stay' | ||||||||||||||||||||
| 680 | # type => 'RegExpr' | ||||||||||||||||||||
| 681 | 24 | ▶ | if ($self->testRegExpr($text, '[\\w:,+_./-]+', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 682 | 12 | return 1 | |||||||||||||||||||
| 683 | } | ||||||||||||||||||||
| 684 | 12 | return 0; | |||||||||||||||||||
| 685 | }; | ||||||||||||||||||||
| 686 | |||||||||||||||||||||
| 687 | sub parseAssignArray { | ||||||||||||||||||||
| 688 | 46 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseAssignArray: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||||||||||||
| 689 | # attribute => 'Variable' | ||||||||||||||||||||
| 690 | # char => ')' | ||||||||||||||||||||
| 691 | # context => '#pop' | ||||||||||||||||||||
| 692 | # type => 'DetectChar' | ||||||||||||||||||||
| 693 | 46 | ▶ | if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 694 | 4 | return 1 | |||||||||||||||||||
| 695 | } | ||||||||||||||||||||
| 696 | # attribute => 'Variable' | ||||||||||||||||||||
| 697 | # char => '[' | ||||||||||||||||||||
| 698 | # context => 'Subscript' | ||||||||||||||||||||
| 699 | # type => 'DetectChar' | ||||||||||||||||||||
| 700 | 42 | ▶ | if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'Subscript', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 701 | 4 | return 1 | |||||||||||||||||||
| 702 | } | ||||||||||||||||||||
| 703 | # attribute => 'Variable' | ||||||||||||||||||||
| 704 | # char => '=' | ||||||||||||||||||||
| 705 | # context => 'Assign' | ||||||||||||||||||||
| 706 | # type => 'DetectChar' | ||||||||||||||||||||
| 707 | 38 | ▶ | if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Assign', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 708 | 4 | return 1 | |||||||||||||||||||
| 709 | } | ||||||||||||||||||||
| 710 | # context => 'FindMost' | ||||||||||||||||||||
| 711 | # type => 'IncludeRules' | ||||||||||||||||||||
| 712 | 34 | ▶ | if ($self->includeRules('FindMost', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 713 | 0 | return 1 | |||||||||||||||||||
| 714 | } | ||||||||||||||||||||
| 715 | 34 | return 0; | |||||||||||||||||||
| 716 | }; | ||||||||||||||||||||
| 717 | |||||||||||||||||||||
| 718 | sub parseAssignSubscr { | ||||||||||||||||||||
| 719 | 4 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseAssignSubscr: called CC=6 SCAR=27.3
Pod
undocumented
| |||||||||||||||||||||
| 720 | # attribute => 'Variable' | ||||||||||||||||||||
| 721 | # char => '[' | ||||||||||||||||||||
| 722 | # context => 'Subscript' | ||||||||||||||||||||
| 723 | # type => 'DetectChar' | ||||||||||||||||||||
| 724 | 4 | ▶ | if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'Subscript', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 725 | 2 | return 1 | |||||||||||||||||||
| 726 | } | ||||||||||||||||||||
| 727 | # attribute => 'Variable' | ||||||||||||||||||||
| 728 | # char => '=' | ||||||||||||||||||||
| 729 | # context => 'Assign' | ||||||||||||||||||||
| 730 | # type => 'DetectChar' | ||||||||||||||||||||
| 731 | 2 | ▶ | if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Assign', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 732 | 2 | return 1 | |||||||||||||||||||
| 733 | } | ||||||||||||||||||||
| 734 | # context => 'FindStrings' | ||||||||||||||||||||
| 735 | # type => 'IncludeRules' | ||||||||||||||||||||
| 736 | 0 | ▶ | if ($self->includeRules('FindStrings', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 737 | 0 | return 1 | |||||||||||||||||||
| 738 | } | ||||||||||||||||||||
| 739 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 740 | # type => 'IncludeRules' | ||||||||||||||||||||
| 741 | 0 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 742 | 0 | return 1 | |||||||||||||||||||
| 743 | } | ||||||||||||||||||||
| 744 | # context => 'FindOthers' | ||||||||||||||||||||
| 745 | # type => 'IncludeRules' | ||||||||||||||||||||
| 746 | 0 | ▶ | if ($self->includeRules('FindOthers', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 747 | 0 | return 1 | |||||||||||||||||||
| 748 | } | ||||||||||||||||||||
| 749 | 0 | return 0; | |||||||||||||||||||
| 750 | }; | ||||||||||||||||||||
| 751 | |||||||||||||||||||||
| 752 | sub parseCase { | ||||||||||||||||||||
| 753 | 6 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCase: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||
| 754 | # String => '\sin\b' | ||||||||||||||||||||
| 755 | # attribute => 'Keyword' | ||||||||||||||||||||
| 756 | # context => 'CaseIn' | ||||||||||||||||||||
| 757 | # type => 'RegExpr' | ||||||||||||||||||||
| 758 | 6 | ▶ | if ($self->testRegExpr($text, '\\sin\\b', 0, 0, 0, undef, 0, 'CaseIn', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 759 | 2 | return 1 | |||||||||||||||||||
| 760 | } | ||||||||||||||||||||
| 761 | # context => 'FindMost' | ||||||||||||||||||||
| 762 | # type => 'IncludeRules' | ||||||||||||||||||||
| 763 | 4 | ▶ | if ($self->includeRules('FindMost', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 764 | 2 | return 1 | |||||||||||||||||||
| 765 | } | ||||||||||||||||||||
| 766 | 2 | return 0; | |||||||||||||||||||
| 767 | }; | ||||||||||||||||||||
| 768 | |||||||||||||||||||||
| 769 | sub parseCaseExpr { | ||||||||||||||||||||
| 770 | 64 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCaseExpr: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||
| 771 | # attribute => 'Keyword' | ||||||||||||||||||||
| 772 | # char => ';' | ||||||||||||||||||||
| 773 | # char1 => ';' | ||||||||||||||||||||
| 774 | # context => '#pop' | ||||||||||||||||||||
| 775 | # endRegion => 'caseexpr' | ||||||||||||||||||||
| 776 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 777 | 64 | ▶ | if ($self->testDetect2Chars($text, ';', ';', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 778 | 4 | return 1 | |||||||||||||||||||
| 779 | } | ||||||||||||||||||||
| 780 | # context => 'FindAll' | ||||||||||||||||||||
| 781 | # type => 'IncludeRules' | ||||||||||||||||||||
| 782 | 60 | ▶ | if ($self->includeRules('FindAll', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 783 | 4 | return 1 | |||||||||||||||||||
| 784 | } | ||||||||||||||||||||
| 785 | 56 | return 0; | |||||||||||||||||||
| 786 | }; | ||||||||||||||||||||
| 787 | |||||||||||||||||||||
| 788 | sub parseCaseIn { | ||||||||||||||||||||
| 789 | 26 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCaseIn: called CC=5 SCAR=16.6
Pod
undocumented
| |||||||||||||||||||||
| 790 | # String => '\besac(?=$|[\s;)])' | ||||||||||||||||||||
| 791 | # attribute => 'Keyword' | ||||||||||||||||||||
| 792 | # context => '#pop#pop' | ||||||||||||||||||||
| 793 | # endRegion => 'case' | ||||||||||||||||||||
| 794 | # type => 'RegExpr' | ||||||||||||||||||||
| 795 | 26 | ▶ | if ($self->testRegExpr($text, '\\besac(?=$|[\\s;)])', 0, 0, 0, undef, 0, '#pop#pop', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 796 | 2 | return 1 | |||||||||||||||||||
| 797 | } | ||||||||||||||||||||
| 798 | # attribute => 'Keyword' | ||||||||||||||||||||
| 799 | # beginRegion => 'caseexpr' | ||||||||||||||||||||
| 800 | # char => ')' | ||||||||||||||||||||
| 801 | # context => 'CaseExpr' | ||||||||||||||||||||
| 802 | # type => 'DetectChar' | ||||||||||||||||||||
| 803 | 24 | ▶ | if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, 'CaseExpr', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 804 | 4 | return 1 | |||||||||||||||||||
| 805 | } | ||||||||||||||||||||
| 806 | # String => '(|' | ||||||||||||||||||||
| 807 | # attribute => 'Keyword' | ||||||||||||||||||||
| 808 | # context => '#stay' | ||||||||||||||||||||
| 809 | # type => 'AnyChar' | ||||||||||||||||||||
| 810 | 20 | ▶ | if ($self->testAnyChar($text, '(|', 0, 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 811 | 0 | return 1 | |||||||||||||||||||
| 812 | } | ||||||||||||||||||||
| 813 | # context => 'FindMost' | ||||||||||||||||||||
| 814 | # type => 'IncludeRules' | ||||||||||||||||||||
| 815 | 20 | ▶ | if ($self->includeRules('FindMost', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 816 | 0 | return 1 | |||||||||||||||||||
| 817 | } | ||||||||||||||||||||
| 818 | 20 | return 0; | |||||||||||||||||||
| 819 | }; | ||||||||||||||||||||
| 820 | |||||||||||||||||||||
| 821 | sub parseComment { | ||||||||||||||||||||
| 822 | 2470 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseComment: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||||||||||||
| 823 | # context => '##Alerts' | ||||||||||||||||||||
| 824 | # type => 'IncludeRules' | ||||||||||||||||||||
| 825 | 2470 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 826 | 0 | return 1 | |||||||||||||||||||
| 827 | } | ||||||||||||||||||||
| 828 | 2470 | return 0; | |||||||||||||||||||
| 829 | }; | ||||||||||||||||||||
| 830 | |||||||||||||||||||||
| 831 | sub parseCommentBackq { | ||||||||||||||||||||
| 832 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCommentBackq: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 833 | # String => '[^`](?=`)' | ||||||||||||||||||||
| 834 | # attribute => 'Comment' | ||||||||||||||||||||
| 835 | # context => '#pop' | ||||||||||||||||||||
| 836 | # type => 'RegExpr' | ||||||||||||||||||||
| 837 | 0 | ▶ | if ($self->testRegExpr($text, '[^`](?=`)', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 838 | 0 | return 1 | |||||||||||||||||||
| 839 | } | ||||||||||||||||||||
| 840 | # context => '##Alerts' | ||||||||||||||||||||
| 841 | # type => 'IncludeRules' | ||||||||||||||||||||
| 842 | 0 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 843 | 0 | return 1 | |||||||||||||||||||
| 844 | } | ||||||||||||||||||||
| 845 | 0 | return 0; | |||||||||||||||||||
| 846 | }; | ||||||||||||||||||||
| 847 | |||||||||||||||||||||
| 848 | sub parseCommentParen { | ||||||||||||||||||||
| 849 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCommentParen: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 850 | # String => '[^)](?=\))' | ||||||||||||||||||||
| 851 | # attribute => 'Comment' | ||||||||||||||||||||
| 852 | # context => '#pop' | ||||||||||||||||||||
| 853 | # type => 'RegExpr' | ||||||||||||||||||||
| 854 | 0 | ▶ | if ($self->testRegExpr($text, '[^)](?=\\))', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 855 | 0 | return 1 | |||||||||||||||||||
| 856 | } | ||||||||||||||||||||
| 857 | # context => '##Alerts' | ||||||||||||||||||||
| 858 | # type => 'IncludeRules' | ||||||||||||||||||||
| 859 | 0 | ▶ | if ($self->includePlugin('Alerts', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 860 | 0 | return 1 | |||||||||||||||||||
| 861 | } | ||||||||||||||||||||
| 862 | 0 | return 0; | |||||||||||||||||||
| 863 | }; | ||||||||||||||||||||
| 864 | |||||||||||||||||||||
| 865 | sub parseExprBracket { | ||||||||||||||||||||
| 866 | 56 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseExprBracket: called CC=5 SCAR=16.6
Pod
undocumented
| |||||||||||||||||||||
| 867 | # String => '\s\](?=($|[\s;|&]))' | ||||||||||||||||||||
| 868 | # attribute => 'Builtin' | ||||||||||||||||||||
| 869 | # context => '#pop' | ||||||||||||||||||||
| 870 | # endRegion => 'expression' | ||||||||||||||||||||
| 871 | # type => 'RegExpr' | ||||||||||||||||||||
| 872 | 56 | ▶ | if ($self->testRegExpr($text, '\\s\\](?=($|[\\s;|&]))', 0, 0, 0, undef, 0, '#pop', 'Builtin')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 873 | 6 | return 1 | |||||||||||||||||||
| 874 | } | ||||||||||||||||||||
| 875 | # String => '\](?=($|[\s;|&]))' | ||||||||||||||||||||
| 876 | # attribute => 'Builtin' | ||||||||||||||||||||
| 877 | # column => '0' | ||||||||||||||||||||
| 878 | # context => '#pop' | ||||||||||||||||||||
| 879 | # endRegion => 'expression' | ||||||||||||||||||||
| 880 | # type => 'RegExpr' | ||||||||||||||||||||
| 881 | 50 | ▶ | if ($self->testRegExpr($text, '\\](?=($|[\\s;|&]))', 0, 0, 0, 0, 0, '#pop', 'Builtin')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 882 | 0 | return 1 | |||||||||||||||||||
| 883 | } | ||||||||||||||||||||
| 884 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 885 | # char => '(' | ||||||||||||||||||||
| 886 | # context => 'ExprSubParen' | ||||||||||||||||||||
| 887 | # type => 'DetectChar' | ||||||||||||||||||||
| 888 | 50 | ▶ | if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'ExprSubParen', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 889 | 0 | return 1 | |||||||||||||||||||
| 890 | } | ||||||||||||||||||||
| 891 | # context => 'FindMost' | ||||||||||||||||||||
| 892 | # type => 'IncludeRules' | ||||||||||||||||||||
| 893 | 50 | ▶ | if ($self->includeRules('FindMost', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 894 | 10 | return 1 | |||||||||||||||||||
| 895 | } | ||||||||||||||||||||
| 896 | 40 | return 0; | |||||||||||||||||||
| 897 | }; | ||||||||||||||||||||
| 898 | |||||||||||||||||||||
| 899 | sub parseExprDblBracket { | ||||||||||||||||||||
| 900 | 16 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseExprDblBracket: called CC=5 SCAR=16.6
Pod
undocumented
| |||||||||||||||||||||
| 901 | # String => '\s\]\](?=($|[\s;|&]))' | ||||||||||||||||||||
| 902 | # attribute => 'Keyword' | ||||||||||||||||||||
| 903 | # context => '#pop' | ||||||||||||||||||||
| 904 | # endRegion => 'expression' | ||||||||||||||||||||
| 905 | # type => 'RegExpr' | ||||||||||||||||||||
| 906 | 16 | ▶ | if ($self->testRegExpr($text, '\\s\\]\\](?=($|[\\s;|&]))', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 907 | 2 | return 1 | |||||||||||||||||||
| 908 | } | ||||||||||||||||||||
| 909 | # String => '\]\](?=($|[\s;|&]))' | ||||||||||||||||||||
| 910 | # attribute => 'Keyword' | ||||||||||||||||||||
| 911 | # column => '0' | ||||||||||||||||||||
| 912 | # context => '#pop' | ||||||||||||||||||||
| 913 | # endRegion => 'expression' | ||||||||||||||||||||
| 914 | # type => 'RegExpr' | ||||||||||||||||||||
| 915 | 14 | ▶ | if ($self->testRegExpr($text, '\\]\\](?=($|[\\s;|&]))', 0, 0, 0, 0, 0, '#pop', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 916 | 0 | return 1 | |||||||||||||||||||
| 917 | } | ||||||||||||||||||||
| 918 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 919 | # char => '(' | ||||||||||||||||||||
| 920 | # context => 'ExprSubParen' | ||||||||||||||||||||
| 921 | # type => 'DetectChar' | ||||||||||||||||||||
| 922 | 14 | ▶ | if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'ExprSubParen', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 923 | 0 | return 1 | |||||||||||||||||||
| 924 | } | ||||||||||||||||||||
| 925 | # context => 'FindMost' | ||||||||||||||||||||
| 926 | # type => 'IncludeRules' | ||||||||||||||||||||
| 927 | 14 | ▶ | if ($self->includeRules('FindMost', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 928 | 2 | return 1 | |||||||||||||||||||
| 929 | } | ||||||||||||||||||||
| 930 | 12 | return 0; | |||||||||||||||||||
| 931 | }; | ||||||||||||||||||||
| 932 | |||||||||||||||||||||
| 933 | sub parseExprDblParen { | ||||||||||||||||||||
| 934 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseExprDblParen: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 935 | # attribute => 'Keyword' | ||||||||||||||||||||
| 936 | # char => ')' | ||||||||||||||||||||
| 937 | # char1 => ')' | ||||||||||||||||||||
| 938 | # context => '#pop' | ||||||||||||||||||||
| 939 | # endRegion => 'expression' | ||||||||||||||||||||
| 940 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 941 | 0 | ▶ | if ($self->testDetect2Chars($text, ')', ')', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 942 | 0 | return 1 | |||||||||||||||||||
| 943 | } | ||||||||||||||||||||
| 944 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 945 | # char => '(' | ||||||||||||||||||||
| 946 | # context => 'ExprSubParen' | ||||||||||||||||||||
| 947 | # type => 'DetectChar' | ||||||||||||||||||||
| 948 | 0 | ▶ | if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'ExprSubParen', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 949 | 0 | return 1 | |||||||||||||||||||
| 950 | } | ||||||||||||||||||||
| 951 | # context => 'FindMost' | ||||||||||||||||||||
| 952 | # type => 'IncludeRules' | ||||||||||||||||||||
| 953 | 0 | ▶ | if ($self->includeRules('FindMost', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 954 | 0 | return 1 | |||||||||||||||||||
| 955 | } | ||||||||||||||||||||
| 956 | 0 | return 0; | |||||||||||||||||||
| 957 | }; | ||||||||||||||||||||
| 958 | |||||||||||||||||||||
| 959 | sub parseExprDblParenSubst { | ||||||||||||||||||||
| 960 | 46 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseExprDblParenSubst: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||||||||||||
| 961 | # attribute => 'Variable' | ||||||||||||||||||||
| 962 | # char => ')' | ||||||||||||||||||||
| 963 | # char1 => ')' | ||||||||||||||||||||
| 964 | # context => '#pop' | ||||||||||||||||||||
| 965 | # endRegion => 'expression' | ||||||||||||||||||||
| 966 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 967 | 46 | ▶ | if ($self->testDetect2Chars($text, ')', ')', 0, 0, 0, undef, 0, '#pop', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 968 | 4 | return 1 | |||||||||||||||||||
| 969 | } | ||||||||||||||||||||
| 970 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 971 | # char => '(' | ||||||||||||||||||||
| 972 | # context => 'ExprSubParen' | ||||||||||||||||||||
| 973 | # type => 'DetectChar' | ||||||||||||||||||||
| 974 | 42 | ▶ | if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'ExprSubParen', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 975 | 0 | return 1 | |||||||||||||||||||
| 976 | } | ||||||||||||||||||||
| 977 | # context => 'FindMost' | ||||||||||||||||||||
| 978 | # type => 'IncludeRules' | ||||||||||||||||||||
| 979 | 42 | ▶ | if ($self->includeRules('FindMost', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 980 | 4 | return 1 | |||||||||||||||||||
| 981 | } | ||||||||||||||||||||
| 982 | 38 | return 0; | |||||||||||||||||||
| 983 | }; | ||||||||||||||||||||
| 984 | |||||||||||||||||||||
| 985 | sub parseExprSubParen { | ||||||||||||||||||||
| 986 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseExprSubParen: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 987 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 988 | # char => ')' | ||||||||||||||||||||
| 989 | # context => '#pop' | ||||||||||||||||||||
| 990 | # type => 'DetectChar' | ||||||||||||||||||||
| 991 | 0 | ▶ | if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 992 | 0 | return 1 | |||||||||||||||||||
| 993 | } | ||||||||||||||||||||
| 994 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 995 | # char => '(' | ||||||||||||||||||||
| 996 | # context => 'ExprSubParen' | ||||||||||||||||||||
| 997 | # type => 'DetectChar' | ||||||||||||||||||||
| 998 | 0 | ▶ | if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'ExprSubParen', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 999 | 0 | return 1 | |||||||||||||||||||
| 1000 | } | ||||||||||||||||||||
| 1001 | # context => 'FindMost' | ||||||||||||||||||||
| 1002 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1003 | 0 | ▶ | if ($self->includeRules('FindMost', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1004 | 0 | return 1 | |||||||||||||||||||
| 1005 | } | ||||||||||||||||||||
| 1006 | 0 | return 0; | |||||||||||||||||||
| 1007 | }; | ||||||||||||||||||||
| 1008 | |||||||||||||||||||||
| 1009 | sub parseFindAll { | ||||||||||||||||||||
| 1010 | 986 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindAll: called CC=6 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 1011 | # context => 'FindComments' | ||||||||||||||||||||
| 1012 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1013 | 986 | ▶ | if ($self->includeRules('FindComments', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1014 | 72 | return 1 | |||||||||||||||||||
| 1015 | } | ||||||||||||||||||||
| 1016 | # context => 'FindCommands' | ||||||||||||||||||||
| 1017 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1018 | 914 | ▶ | if ($self->includeRules('FindCommands', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1019 | 176 | return 1 | |||||||||||||||||||
| 1020 | } | ||||||||||||||||||||
| 1021 | # context => 'FindStrings' | ||||||||||||||||||||
| 1022 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1023 | 738 | ▶ | if ($self->includeRules('FindStrings', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1024 | 22 | return 1 | |||||||||||||||||||
| 1025 | } | ||||||||||||||||||||
| 1026 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 1027 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1028 | 716 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1029 | 54 | return 1 | |||||||||||||||||||
| 1030 | } | ||||||||||||||||||||
| 1031 | # context => 'FindOthers' | ||||||||||||||||||||
| 1032 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1033 | 662 | ▶ | if ($self->includeRules('FindOthers', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1034 | 38 | return 1 | |||||||||||||||||||
| 1035 | } | ||||||||||||||||||||
| 1036 | 624 | return 0; | |||||||||||||||||||
| 1037 | }; | ||||||||||||||||||||
| 1038 | |||||||||||||||||||||
| 1039 | sub parseFindCommands { | ||||||||||||||||||||
| 1040 | 1030 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindCommands: called CC=29 SCAR=33.9
Pod
undocumented
| |||||||||||||||||||||
| 1041 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1042 | # beginRegion => 'expression' | ||||||||||||||||||||
| 1043 | # char => '(' | ||||||||||||||||||||
| 1044 | # char1 => '(' | ||||||||||||||||||||
| 1045 | # context => 'ExprDblParen' | ||||||||||||||||||||
| 1046 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 1047 | 1030 | ▶ | if ($self->testDetect2Chars($text, '(', '(', 0, 0, 0, undef, 0, 'ExprDblParen', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1048 | 0 | return 1 | |||||||||||||||||||
| 1049 | } | ||||||||||||||||||||
| 1050 | # String => '\[\[(?=($|\s))' | ||||||||||||||||||||
| 1051 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1052 | # beginRegion => 'expression' | ||||||||||||||||||||
| 1053 | # column => '0' | ||||||||||||||||||||
| 1054 | # context => 'ExprDblBracket' | ||||||||||||||||||||
| 1055 | # type => 'RegExpr' | ||||||||||||||||||||
| 1056 | 1030 | ▶ | if ($self->testRegExpr($text, '\\[\\[(?=($|\\s))', 0, 0, 0, 0, 0, 'ExprDblBracket', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1057 | 0 | return 1 | |||||||||||||||||||
| 1058 | } | ||||||||||||||||||||
| 1059 | # String => '\s\[\[(?=($|\s))' | ||||||||||||||||||||
| 1060 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1061 | # beginRegion => 'expression' | ||||||||||||||||||||
| 1062 | # context => 'ExprDblBracket' | ||||||||||||||||||||
| 1063 | # type => 'RegExpr' | ||||||||||||||||||||
| 1064 | 1030 | ▶ | if ($self->testRegExpr($text, '\\s\\[\\[(?=($|\\s))', 0, 0, 0, undef, 0, 'ExprDblBracket', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1065 | 2 | return 1 | |||||||||||||||||||
| 1066 | } | ||||||||||||||||||||
| 1067 | # String => '\[(?=($|\s))' | ||||||||||||||||||||
| 1068 | # attribute => 'Builtin' | ||||||||||||||||||||
| 1069 | # beginRegion => 'expression' | ||||||||||||||||||||
| 1070 | # column => '0' | ||||||||||||||||||||
| 1071 | # context => 'ExprBracket' | ||||||||||||||||||||
| 1072 | # type => 'RegExpr' | ||||||||||||||||||||
| 1073 | 1028 | ▶ | if ($self->testRegExpr($text, '\\[(?=($|\\s))', 0, 0, 0, 0, 0, 'ExprBracket', 'Builtin')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1074 | 0 | return 1 | |||||||||||||||||||
| 1075 | } | ||||||||||||||||||||
| 1076 | # String => '\s\[(?=($|\s))' | ||||||||||||||||||||
| 1077 | # attribute => 'Builtin' | ||||||||||||||||||||
| 1078 | # beginRegion => 'expression' | ||||||||||||||||||||
| 1079 | # context => 'ExprBracket' | ||||||||||||||||||||
| 1080 | # type => 'RegExpr' | ||||||||||||||||||||
| 1081 | 1028 | ▶ | if ($self->testRegExpr($text, '\\s\\[(?=($|\\s))', 0, 0, 0, undef, 0, 'ExprBracket', 'Builtin')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1082 | 6 | return 1 | |||||||||||||||||||
| 1083 | } | ||||||||||||||||||||
| 1084 | # String => '\{(?=($|\s))' | ||||||||||||||||||||
| 1085 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1086 | # beginRegion => 'group' | ||||||||||||||||||||
| 1087 | # context => 'Group' | ||||||||||||||||||||
| 1088 | # type => 'RegExpr' | ||||||||||||||||||||
| 1089 | 1022 | ▶ | if ($self->testRegExpr($text, '\\{(?=($|\\s))', 0, 0, 0, undef, 0, 'Group', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1090 | 4 | return 1 | |||||||||||||||||||
| 1091 | } | ||||||||||||||||||||
| 1092 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1093 | # beginRegion => 'subshell' | ||||||||||||||||||||
| 1094 | # char => '(' | ||||||||||||||||||||
| 1095 | # context => 'SubShell' | ||||||||||||||||||||
| 1096 | # type => 'DetectChar' | ||||||||||||||||||||
| 1097 | 1018 | ▶ | if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'SubShell', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1098 | 2 | return 1 | |||||||||||||||||||
| 1099 | } | ||||||||||||||||||||
| 1100 | # String => '\bdo(?![\w$+-])' | ||||||||||||||||||||
| 1101 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1102 | # beginRegion => 'do' | ||||||||||||||||||||
| 1103 | # context => '#stay' | ||||||||||||||||||||
| 1104 | # type => 'RegExpr' | ||||||||||||||||||||
| 1105 | 1016 | ▶ | if ($self->testRegExpr($text, '\\bdo(?![\\w$+-])', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1106 | 4 | return 1 | |||||||||||||||||||
| 1107 | } | ||||||||||||||||||||
| 1108 | # String => '\bdone(?![\w$+-])' | ||||||||||||||||||||
| 1109 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1110 | # context => '#stay' | ||||||||||||||||||||
| 1111 | # endRegion => 'do' | ||||||||||||||||||||
| 1112 | # type => 'RegExpr' | ||||||||||||||||||||
| 1113 | 1012 | ▶ | if ($self->testRegExpr($text, '\\bdone(?![\\w$+-])', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1114 | 4 | return 1 | |||||||||||||||||||
| 1115 | } | ||||||||||||||||||||
| 1116 | # String => '\bif(?![\w$+-])' | ||||||||||||||||||||
| 1117 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1118 | # beginRegion => 'if' | ||||||||||||||||||||
| 1119 | # context => '#stay' | ||||||||||||||||||||
| 1120 | # type => 'RegExpr' | ||||||||||||||||||||
| 1121 | 1008 | ▶ | if ($self->testRegExpr($text, '\\bif(?![\\w$+-])', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1122 | 4 | return 1 | |||||||||||||||||||
| 1123 | } | ||||||||||||||||||||
| 1124 | # String => '\bfi(?![\w$+-])' | ||||||||||||||||||||
| 1125 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1126 | # context => '#stay' | ||||||||||||||||||||
| 1127 | # endRegion => 'if' | ||||||||||||||||||||
| 1128 | # type => 'RegExpr' | ||||||||||||||||||||
| 1129 | 1004 | ▶ | if ($self->testRegExpr($text, '\\bfi(?![\\w$+-])', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1130 | 4 | return 1 | |||||||||||||||||||
| 1131 | } | ||||||||||||||||||||
| 1132 | # String => '\bcase(?![\w$+-])' | ||||||||||||||||||||
| 1133 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1134 | # beginRegion => 'case' | ||||||||||||||||||||
| 1135 | # context => 'Case' | ||||||||||||||||||||
| 1136 | # type => 'RegExpr' | ||||||||||||||||||||
| 1137 | 1000 | ▶ | if ($self->testRegExpr($text, '\\bcase(?![\\w$+-])', 0, 0, 0, undef, 0, 'Case', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1138 | 2 | return 1 | |||||||||||||||||||
| 1139 | } | ||||||||||||||||||||
| 1140 | # String => '-[A-Za-z0-9]+' | ||||||||||||||||||||
| 1141 | # attribute => 'Option' | ||||||||||||||||||||
| 1142 | # context => '#stay' | ||||||||||||||||||||
| 1143 | # type => 'RegExpr' | ||||||||||||||||||||
| 1144 | 998 | ▶ | if ($self->testRegExpr($text, '-[A-Za-z0-9]+', 0, 0, 0, undef, 0, '#stay', 'Option')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1145 | 12 | return 1 | |||||||||||||||||||
| 1146 | } | ||||||||||||||||||||
| 1147 | # String => '--[a-z][A-Za-z0-9_-]*' | ||||||||||||||||||||
| 1148 | # attribute => 'Option' | ||||||||||||||||||||
| 1149 | # context => '#stay' | ||||||||||||||||||||
| 1150 | # type => 'RegExpr' | ||||||||||||||||||||
| 1151 | 986 | ▶ | if ($self->testRegExpr($text, '--[a-z][A-Za-z0-9_-]*', 0, 0, 0, undef, 0, '#stay', 'Option')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1152 | 2 | return 1 | |||||||||||||||||||
| 1153 | } | ||||||||||||||||||||
| 1154 | # String => '\b[A-Za-z_][A-Za-z0-9_]*=' | ||||||||||||||||||||
| 1155 | # attribute => 'Variable' | ||||||||||||||||||||
| 1156 | # context => 'Assign' | ||||||||||||||||||||
| 1157 | # type => 'RegExpr' | ||||||||||||||||||||
| 1158 | 984 | ▶ | if ($self->testRegExpr($text, '\\b[A-Za-z_][A-Za-z0-9_]*=', 0, 0, 0, undef, 0, 'Assign', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1159 | 18 | return 1 | |||||||||||||||||||
| 1160 | } | ||||||||||||||||||||
| 1161 | # String => '\b[A-Za-z_][A-Za-z0-9_]*(?=\[[^]]+\]=)' | ||||||||||||||||||||
| 1162 | # attribute => 'Variable' | ||||||||||||||||||||
| 1163 | # context => 'AssignSubscr' | ||||||||||||||||||||
| 1164 | # type => 'RegExpr' | ||||||||||||||||||||
| 1165 | 966 | ▶ | if ($self->testRegExpr($text, '\\b[A-Za-z_][A-Za-z0-9_]*(?=\\[[^]]+\\]=)', 0, 0, 0, undef, 0, 'AssignSubscr', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1166 | 2 | return 1 | |||||||||||||||||||
| 1167 | } | ||||||||||||||||||||
| 1168 | # String => ':()' | ||||||||||||||||||||
| 1169 | # attribute => 'Function' | ||||||||||||||||||||
| 1170 | # context => '#stay' | ||||||||||||||||||||
| 1171 | # type => 'StringDetect' | ||||||||||||||||||||
| 1172 | 964 | ▶ | if ($self->testStringDetect($text, ':()', 0, 0, 0, undef, 0, '#stay', 'Function')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1173 | 0 | return 1 | |||||||||||||||||||
| 1174 | } | ||||||||||||||||||||
| 1175 | # String => '\bfunction\b' | ||||||||||||||||||||
| 1176 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1177 | # context => 'FunctionDef' | ||||||||||||||||||||
| 1178 | # type => 'RegExpr' | ||||||||||||||||||||
| 1179 | 964 | ▶ | if ($self->testRegExpr($text, '\\bfunction\\b', 0, 0, 0, undef, 0, 'FunctionDef', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1180 | 0 | return 1 | |||||||||||||||||||
| 1181 | } | ||||||||||||||||||||
| 1182 | # String => 'keywords' | ||||||||||||||||||||
| 1183 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1184 | # context => '#stay' | ||||||||||||||||||||
| 1185 | # type => 'keyword' | ||||||||||||||||||||
| 1186 | 964 | ▶ | if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1187 | 16 | return 1 | |||||||||||||||||||
| 1188 | } | ||||||||||||||||||||
| 1189 | # String => 'builtins' | ||||||||||||||||||||
| 1190 | # attribute => 'Builtin' | ||||||||||||||||||||
| 1191 | # context => '#stay' | ||||||||||||||||||||
| 1192 | # type => 'keyword' | ||||||||||||||||||||
| 1193 | 948 | ▶ | if ($self->testKeyword($text, 'builtins', 0, undef, 0, '#stay', 'Builtin')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1194 | 26 | return 1 | |||||||||||||||||||
| 1195 | } | ||||||||||||||||||||
| 1196 | # String => 'unixcommands' | ||||||||||||||||||||
| 1197 | # attribute => 'Command' | ||||||||||||||||||||
| 1198 | # context => '#stay' | ||||||||||||||||||||
| 1199 | # type => 'keyword' | ||||||||||||||||||||
| 1200 | 922 | ▶ | if ($self->testKeyword($text, 'unixcommands', 0, undef, 0, '#stay', 'Command')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1201 | 36 | return 1 | |||||||||||||||||||
| 1202 | } | ||||||||||||||||||||
| 1203 | # String => 'builtins_var' | ||||||||||||||||||||
| 1204 | # attribute => 'Builtin' | ||||||||||||||||||||
| 1205 | # context => 'VarName' | ||||||||||||||||||||
| 1206 | # type => 'keyword' | ||||||||||||||||||||
| 1207 | 886 | ▶ | if ($self->testKeyword($text, 'builtins_var', 0, undef, 0, 'VarName', 'Builtin')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1208 | 14 | return 1 | |||||||||||||||||||
| 1209 | } | ||||||||||||||||||||
| 1210 | # String => '<<<' | ||||||||||||||||||||
| 1211 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1212 | # context => '#stay' | ||||||||||||||||||||
| 1213 | # type => 'StringDetect' | ||||||||||||||||||||
| 1214 | 872 | ▶ | if ($self->testStringDetect($text, '<<<', 0, 0, 0, undef, 0, '#stay', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1215 | 2 | return 1 | |||||||||||||||||||
| 1216 | } | ||||||||||||||||||||
| 1217 | # String => '<<' | ||||||||||||||||||||
| 1218 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1219 | # context => 'HereDoc' | ||||||||||||||||||||
| 1220 | # lookAhead => 'true' | ||||||||||||||||||||
| 1221 | # type => 'StringDetect' | ||||||||||||||||||||
| 1222 | 870 | ▶ | if ($self->testStringDetect($text, '<<', 0, 0, 1, undef, 0, 'HereDoc', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1223 | 2 | return 1 | |||||||||||||||||||
| 1224 | } | ||||||||||||||||||||
| 1225 | # String => '[<>]\(' | ||||||||||||||||||||
| 1226 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1227 | # context => 'ProcessSubst' | ||||||||||||||||||||
| 1228 | # type => 'RegExpr' | ||||||||||||||||||||
| 1229 | 868 | ▶ | if ($self->testRegExpr($text, '[<>]\\(', 0, 0, 0, undef, 0, 'ProcessSubst', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1230 | 2 | return 1 | |||||||||||||||||||
| 1231 | } | ||||||||||||||||||||
| 1232 | # String => '([0-9]*(>{1,2}|<)(&[0-9]+-?)?|&>|>&|[0-9]*<>)' | ||||||||||||||||||||
| 1233 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1234 | # context => '#stay' | ||||||||||||||||||||
| 1235 | # type => 'RegExpr' | ||||||||||||||||||||
| 1236 | 866 | ▶ | if ($self->testRegExpr($text, '([0-9]*(>{1,2}|<)(&[0-9]+-?)?|&>|>&|[0-9]*<>)', 0, 0, 0, undef, 0, '#stay', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1237 | 10 | return 1 | |||||||||||||||||||
| 1238 | } | ||||||||||||||||||||
| 1239 | # String => '([|&])\1?' | ||||||||||||||||||||
| 1240 | # attribute => 'Control' | ||||||||||||||||||||
| 1241 | # context => '#stay' | ||||||||||||||||||||
| 1242 | # type => 'RegExpr' | ||||||||||||||||||||
| 1243 | 856 | ▶ | if ($self->testRegExpr($text, '([|&])\\1?', 0, 0, 0, undef, 0, '#stay', 'Control')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1244 | 22 | return 1 | |||||||||||||||||||
| 1245 | } | ||||||||||||||||||||
| 1246 | # String => '[A-Za-z_:][A-Za-z0-9_:#%@-]*\s*\(\)' | ||||||||||||||||||||
| 1247 | # attribute => 'Function' | ||||||||||||||||||||
| 1248 | # context => '#stay' | ||||||||||||||||||||
| 1249 | # type => 'RegExpr' | ||||||||||||||||||||
| 1250 | 834 | ▶ | if ($self->testRegExpr($text, '[A-Za-z_:][A-Za-z0-9_:#%@-]*\\s*\\(\\)', 0, 0, 0, undef, 0, '#stay', 'Function')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1251 | 2 | return 1 | |||||||||||||||||||
| 1252 | } | ||||||||||||||||||||
| 1253 | 832 | return 0; | |||||||||||||||||||
| 1254 | }; | ||||||||||||||||||||
| 1255 | |||||||||||||||||||||
| 1256 | sub parseFindComments { | ||||||||||||||||||||
| 1257 | 1206 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindComments: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||
| 1258 | # attribute => 'Comment' | ||||||||||||||||||||
| 1259 | # char => '#' | ||||||||||||||||||||
| 1260 | # context => 'Comment' | ||||||||||||||||||||
| 1261 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 1262 | # type => 'DetectChar' | ||||||||||||||||||||
| 1263 | 1206 | ▶ | if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'Comment', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1264 | 66 | return 1 | |||||||||||||||||||
| 1265 | } | ||||||||||||||||||||
| 1266 | # String => '[\s;](?=#)' | ||||||||||||||||||||
| 1267 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 1268 | # context => 'Comment' | ||||||||||||||||||||
| 1269 | # type => 'RegExpr' | ||||||||||||||||||||
| 1270 | 1140 | ▶ | if ($self->testRegExpr($text, '[\\s;](?=#)', 0, 0, 0, undef, 0, 'Comment', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1271 | 6 | return 1 | |||||||||||||||||||
| 1272 | } | ||||||||||||||||||||
| 1273 | 1134 | return 0; | |||||||||||||||||||
| 1274 | }; | ||||||||||||||||||||
| 1275 | |||||||||||||||||||||
| 1276 | sub parseFindCommentsBackq { | ||||||||||||||||||||
| 1277 | 44 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindCommentsBackq: called CC=3 SCAR=12.7
Pod
undocumented
| |||||||||||||||||||||
| 1278 | # attribute => 'Comment' | ||||||||||||||||||||
| 1279 | # char => '#' | ||||||||||||||||||||
| 1280 | # context => 'CommentBackq' | ||||||||||||||||||||
| 1281 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 1282 | # type => 'DetectChar' | ||||||||||||||||||||
| 1283 | 44 | ▶ | if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'CommentBackq', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1284 | 0 | return 1 | |||||||||||||||||||
| 1285 | } | ||||||||||||||||||||
| 1286 | # String => '[\s;](?=#)' | ||||||||||||||||||||
| 1287 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 1288 | # context => 'CommentBackq' | ||||||||||||||||||||
| 1289 | # type => 'RegExpr' | ||||||||||||||||||||
| 1290 | 44 | ▶ | if ($self->testRegExpr($text, '[\\s;](?=#)', 0, 0, 0, undef, 0, 'CommentBackq', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1291 | 0 | return 1 | |||||||||||||||||||
| 1292 | } | ||||||||||||||||||||
| 1293 | 44 | return 0; | |||||||||||||||||||
| 1294 | }; | ||||||||||||||||||||
| 1295 | |||||||||||||||||||||
| 1296 | sub parseFindCommentsParen { | ||||||||||||||||||||
| 1297 | 80 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindCommentsParen: called CC=3 SCAR=12.7
Pod
undocumented
| |||||||||||||||||||||
| 1298 | # attribute => 'Comment' | ||||||||||||||||||||
| 1299 | # char => '#' | ||||||||||||||||||||
| 1300 | # context => 'CommentParen' | ||||||||||||||||||||
| 1301 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 1302 | # type => 'DetectChar' | ||||||||||||||||||||
| 1303 | 80 | ▶ | if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'CommentParen', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1304 | 0 | return 1 | |||||||||||||||||||
| 1305 | } | ||||||||||||||||||||
| 1306 | # String => '[\s;](?=#)' | ||||||||||||||||||||
| 1307 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 1308 | # context => 'CommentParen' | ||||||||||||||||||||
| 1309 | # type => 'RegExpr' | ||||||||||||||||||||
| 1310 | 80 | ▶ | if ($self->testRegExpr($text, '[\\s;](?=#)', 0, 0, 0, undef, 0, 'CommentParen', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1311 | 0 | return 1 | |||||||||||||||||||
| 1312 | } | ||||||||||||||||||||
| 1313 | 80 | return 0; | |||||||||||||||||||
| 1314 | }; | ||||||||||||||||||||
| 1315 | |||||||||||||||||||||
| 1316 | sub parseFindMost { | ||||||||||||||||||||
| 1317 | 220 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindMost: called CC=5 SCAR=16.6
Pod
undocumented
| |||||||||||||||||||||
| 1318 | # context => 'FindComments' | ||||||||||||||||||||
| 1319 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1320 | 220 | ▶ | if ($self->includeRules('FindComments', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1321 | 0 | return 1 | |||||||||||||||||||
| 1322 | } | ||||||||||||||||||||
| 1323 | # context => 'FindStrings' | ||||||||||||||||||||
| 1324 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1325 | 220 | ▶ | if ($self->includeRules('FindStrings', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1326 | 4 | return 1 | |||||||||||||||||||
| 1327 | } | ||||||||||||||||||||
| 1328 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 1329 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1330 | 216 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1331 | 14 | return 1 | |||||||||||||||||||
| 1332 | } | ||||||||||||||||||||
| 1333 | # context => 'FindOthers' | ||||||||||||||||||||
| 1334 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1335 | 202 | ▶ | if ($self->includeRules('FindOthers', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1336 | 0 | return 1 | |||||||||||||||||||
| 1337 | } | ||||||||||||||||||||
| 1338 | 202 | return 0; | |||||||||||||||||||
| 1339 | }; | ||||||||||||||||||||
| 1340 | |||||||||||||||||||||
| 1341 | sub parseFindOthers { | ||||||||||||||||||||
| 1342 | 1008 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindOthers: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||||||||||||
| 1343 | # String => '\\[][;"\\'$`{}()|&<>* ]' | ||||||||||||||||||||
| 1344 | # attribute => 'Escape' | ||||||||||||||||||||
| 1345 | # context => '#stay' | ||||||||||||||||||||
| 1346 | # type => 'RegExpr' | ||||||||||||||||||||
| 1347 | 1008 | ▶ | if ($self->testRegExpr($text, '\\\\[][;"\\\\\'$`{}()|&<>* ]', 0, 0, 0, undef, 0, '#stay', 'Escape')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1348 | 18 | return 1 | |||||||||||||||||||
| 1349 | } | ||||||||||||||||||||
| 1350 | # String => '\\$' | ||||||||||||||||||||
| 1351 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1352 | # context => '#stay' | ||||||||||||||||||||
| 1353 | # type => 'RegExpr' | ||||||||||||||||||||
| 1354 | 990 | ▶ | if ($self->testRegExpr($text, '\\\\$', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1355 | 0 | return 1 | |||||||||||||||||||
| 1356 | } | ||||||||||||||||||||
| 1357 | # String => '\{(?!(\s|$))\S*\}' | ||||||||||||||||||||
| 1358 | # attribute => 'Escape' | ||||||||||||||||||||
| 1359 | # context => '#stay' | ||||||||||||||||||||
| 1360 | # type => 'RegExpr' | ||||||||||||||||||||
| 1361 | 990 | ▶ | if ($self->testRegExpr($text, '\\{(?!(\\s|$))\\S*\\}', 0, 0, 0, undef, 0, '#stay', 'Escape')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1362 | 2 | return 1 | |||||||||||||||||||
| 1363 | } | ||||||||||||||||||||
| 1364 | # String => '\.?/[\w_@.+-]+(?=([\s/):]|$))' | ||||||||||||||||||||
| 1365 | # attribute => 'Path' | ||||||||||||||||||||
| 1366 | # context => '#stay' | ||||||||||||||||||||
| 1367 | # type => 'RegExpr' | ||||||||||||||||||||
| 1368 | 988 | ▶ | if ($self->testRegExpr($text, '\\.?/[\\w_@.+-]+(?=([\\s/):]|$))', 0, 0, 0, undef, 0, '#stay', 'Path')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1369 | 32 | return 1 | |||||||||||||||||||
| 1370 | } | ||||||||||||||||||||
| 1371 | 956 | return 0; | |||||||||||||||||||
| 1372 | }; | ||||||||||||||||||||
| 1373 | |||||||||||||||||||||
| 1374 | sub parseFindStrings { | ||||||||||||||||||||
| 1375 | 1156 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindStrings: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||
| 1376 | # attribute => 'String SingleQ' | ||||||||||||||||||||
| 1377 | # char => ''' | ||||||||||||||||||||
| 1378 | # context => 'StringSQ' | ||||||||||||||||||||
| 1379 | # type => 'DetectChar' | ||||||||||||||||||||
| 1380 | 1156 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'StringSQ', 'String SingleQ')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1381 | 10 | return 1 | |||||||||||||||||||
| 1382 | } | ||||||||||||||||||||
| 1383 | # attribute => 'String DoubleQ' | ||||||||||||||||||||
| 1384 | # char => '"' | ||||||||||||||||||||
| 1385 | # context => 'StringDQ' | ||||||||||||||||||||
| 1386 | # type => 'DetectChar' | ||||||||||||||||||||
| 1387 | 1146 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'StringDQ', 'String DoubleQ')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1388 | 28 | return 1 | |||||||||||||||||||
| 1389 | } | ||||||||||||||||||||
| 1390 | # attribute => 'String SingleQ' | ||||||||||||||||||||
| 1391 | # char => '$' | ||||||||||||||||||||
| 1392 | # char1 => ''' | ||||||||||||||||||||
| 1393 | # context => 'StringEsc' | ||||||||||||||||||||
| 1394 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 1395 | 1118 | ▶ | if ($self->testDetect2Chars($text, '$', '\'', 0, 0, 0, undef, 0, 'StringEsc', 'String SingleQ')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1396 | 2 | return 1 | |||||||||||||||||||
| 1397 | } | ||||||||||||||||||||
| 1398 | # attribute => 'String Transl.' | ||||||||||||||||||||
| 1399 | # char => '$' | ||||||||||||||||||||
| 1400 | # char1 => '"' | ||||||||||||||||||||
| 1401 | # context => 'StringDQ' | ||||||||||||||||||||
| 1402 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 1403 | 1116 | ▶ | if ($self->testDetect2Chars($text, '$', '"', 0, 0, 0, undef, 0, 'StringDQ', 'String Transl.')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1404 | 2 | return 1 | |||||||||||||||||||
| 1405 | } | ||||||||||||||||||||
| 1406 | 1114 | return 0; | |||||||||||||||||||
| 1407 | }; | ||||||||||||||||||||
| 1408 | |||||||||||||||||||||
| 1409 | sub parseFindSubstitutions { | ||||||||||||||||||||
| 1410 | 2600 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFindSubstitutions: called CC=14 SCAR=26.4
Pod
undocumented
| |||||||||||||||||||||
| 1411 | # String => '\$[*@#?$!_0-9-]' | ||||||||||||||||||||
| 1412 | # attribute => 'Variable' | ||||||||||||||||||||
| 1413 | # context => '#stay' | ||||||||||||||||||||
| 1414 | # type => 'RegExpr' | ||||||||||||||||||||
| 1415 | 2600 | ▶ | if ($self->testRegExpr($text, '\\$[*@#?$!_0-9-]', 0, 0, 0, undef, 0, '#stay', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1416 | 8 | return 1 | |||||||||||||||||||
| 1417 | } | ||||||||||||||||||||
| 1418 | # String => '\$[A-Za-z_][A-Za-z0-9_]*\[' | ||||||||||||||||||||
| 1419 | # attribute => 'Variable' | ||||||||||||||||||||
| 1420 | # context => 'Subscript' | ||||||||||||||||||||
| 1421 | # type => 'RegExpr' | ||||||||||||||||||||
| 1422 | 2592 | ▶ | if ($self->testRegExpr($text, '\\$[A-Za-z_][A-Za-z0-9_]*\\[', 0, 0, 0, undef, 0, 'Subscript', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1423 | 0 | return 1 | |||||||||||||||||||
| 1424 | } | ||||||||||||||||||||
| 1425 | # String => '\$[A-Za-z_][A-Za-z0-9_]*' | ||||||||||||||||||||
| 1426 | # attribute => 'Variable' | ||||||||||||||||||||
| 1427 | # context => '#stay' | ||||||||||||||||||||
| 1428 | # type => 'RegExpr' | ||||||||||||||||||||
| 1429 | 2592 | ▶ | if ($self->testRegExpr($text, '\\$[A-Za-z_][A-Za-z0-9_]*', 0, 0, 0, undef, 0, '#stay', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1430 | 58 | return 1 | |||||||||||||||||||
| 1431 | } | ||||||||||||||||||||
| 1432 | # String => '\$\{[*@#?$!_0-9-]\}' | ||||||||||||||||||||
| 1433 | # attribute => 'Variable' | ||||||||||||||||||||
| 1434 | # context => '#stay' | ||||||||||||||||||||
| 1435 | # type => 'RegExpr' | ||||||||||||||||||||
| 1436 | 2534 | ▶ | if ($self->testRegExpr($text, '\\$\\{[*@#?$!_0-9-]\\}', 0, 0, 0, undef, 0, '#stay', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1437 | 2 | return 1 | |||||||||||||||||||
| 1438 | } | ||||||||||||||||||||
| 1439 | # String => '\$\{#[A-Za-z_][A-Za-z0-9_]*\}' | ||||||||||||||||||||
| 1440 | # attribute => 'Variable' | ||||||||||||||||||||
| 1441 | # context => '#stay' | ||||||||||||||||||||
| 1442 | # type => 'RegExpr' | ||||||||||||||||||||
| 1443 | 2532 | ▶ | if ($self->testRegExpr($text, '\\$\\{#[A-Za-z_][A-Za-z0-9_]*\\}', 0, 0, 0, undef, 0, '#stay', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1444 | 0 | return 1 | |||||||||||||||||||
| 1445 | } | ||||||||||||||||||||
| 1446 | # String => '\$\{![A-Za-z_][A-Za-z0-9_]*\*?\}' | ||||||||||||||||||||
| 1447 | # attribute => 'Variable' | ||||||||||||||||||||
| 1448 | # context => '#stay' | ||||||||||||||||||||
| 1449 | # type => 'RegExpr' | ||||||||||||||||||||
| 1450 | 2532 | ▶ | if ($self->testRegExpr($text, '\\$\\{![A-Za-z_][A-Za-z0-9_]*\\*?\\}', 0, 0, 0, undef, 0, '#stay', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1451 | 4 | return 1 | |||||||||||||||||||
| 1452 | } | ||||||||||||||||||||
| 1453 | # String => '\$\{[A-Za-z_][A-Za-z0-9_]*' | ||||||||||||||||||||
| 1454 | # attribute => 'Variable' | ||||||||||||||||||||
| 1455 | # context => 'VarBrace' | ||||||||||||||||||||
| 1456 | # type => 'RegExpr' | ||||||||||||||||||||
| 1457 | 2528 | ▶ | if ($self->testRegExpr($text, '\\$\\{[A-Za-z_][A-Za-z0-9_]*', 0, 0, 0, undef, 0, 'VarBrace', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1458 | 10 | return 1 | |||||||||||||||||||
| 1459 | } | ||||||||||||||||||||
| 1460 | # String => '\$\{[*@#?$!_0-9-](?=[:#%/])' | ||||||||||||||||||||
| 1461 | # attribute => 'Variable' | ||||||||||||||||||||
| 1462 | # context => 'VarBrace' | ||||||||||||||||||||
| 1463 | # type => 'RegExpr' | ||||||||||||||||||||
| 1464 | 2518 | ▶ | if ($self->testRegExpr($text, '\\$\\{[*@#?$!_0-9-](?=[:#%/])', 0, 0, 0, undef, 0, 'VarBrace', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1465 | 2 | return 1 | |||||||||||||||||||
| 1466 | } | ||||||||||||||||||||
| 1467 | # String => '$((' | ||||||||||||||||||||
| 1468 | # attribute => 'Variable' | ||||||||||||||||||||
| 1469 | # beginRegion => 'expression' | ||||||||||||||||||||
| 1470 | # context => 'ExprDblParenSubst' | ||||||||||||||||||||
| 1471 | # type => 'StringDetect' | ||||||||||||||||||||
| 1472 | 2516 | ▶ | if ($self->testStringDetect($text, '$((', 0, 0, 0, undef, 0, 'ExprDblParenSubst', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1473 | 4 | return 1 | |||||||||||||||||||
| 1474 | } | ||||||||||||||||||||
| 1475 | # String => '$(<' | ||||||||||||||||||||
| 1476 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1477 | # context => 'SubstFile' | ||||||||||||||||||||
| 1478 | # type => 'StringDetect' | ||||||||||||||||||||
| 1479 | 2512 | ▶ | if ($self->testStringDetect($text, '$(<', 0, 0, 0, undef, 0, 'SubstFile', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1480 | 4 | return 1 | |||||||||||||||||||
| 1481 | } | ||||||||||||||||||||
| 1482 | # String => '$(' | ||||||||||||||||||||
| 1483 | # attribute => 'Variable' | ||||||||||||||||||||
| 1484 | # context => 'SubstCommand' | ||||||||||||||||||||
| 1485 | # type => 'StringDetect' | ||||||||||||||||||||
| 1486 | 2508 | ▶ | if ($self->testStringDetect($text, '$(', 0, 0, 0, undef, 0, 'SubstCommand', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1487 | 4 | return 1 | |||||||||||||||||||
| 1488 | } | ||||||||||||||||||||
| 1489 | # attribute => 'Backquote' | ||||||||||||||||||||
| 1490 | # char => '`' | ||||||||||||||||||||
| 1491 | # context => 'SubstBackq' | ||||||||||||||||||||
| 1492 | # type => 'DetectChar' | ||||||||||||||||||||
| 1493 | 2504 | ▶ | if ($self->testDetectChar($text, '`', 0, 0, 0, undef, 0, 'SubstBackq', 'Backquote')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1494 | 6 | return 1 | |||||||||||||||||||
| 1495 | } | ||||||||||||||||||||
| 1496 | # String => '\\[`$\\]' | ||||||||||||||||||||
| 1497 | # attribute => 'Escape' | ||||||||||||||||||||
| 1498 | # context => '#stay' | ||||||||||||||||||||
| 1499 | # type => 'RegExpr' | ||||||||||||||||||||
| 1500 | 2498 | ▶ | if ($self->testRegExpr($text, '\\\\[`$\\\\]', 0, 0, 0, undef, 0, '#stay', 'Escape')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1501 | 2 | return 1 | |||||||||||||||||||
| 1502 | } | ||||||||||||||||||||
| 1503 | 2496 | return 0; | |||||||||||||||||||
| 1504 | }; | ||||||||||||||||||||
| 1505 | |||||||||||||||||||||
| 1506 | sub parseFunctionDef { | ||||||||||||||||||||
| 1507 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseFunctionDef: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 1508 | # String => '\s+[A-Za-z_:][A-Za-z0-9_:#%@-]*(\s*\(\))?' | ||||||||||||||||||||
| 1509 | # attribute => 'Function' | ||||||||||||||||||||
| 1510 | # context => '#pop' | ||||||||||||||||||||
| 1511 | # type => 'RegExpr' | ||||||||||||||||||||
| 1512 | 0 | ▶ | if ($self->testRegExpr($text, '\\s+[A-Za-z_:][A-Za-z0-9_:#%@-]*(\\s*\\(\\))?', 0, 0, 0, undef, 0, '#pop', 'Function')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1513 | 0 | return 1 | |||||||||||||||||||
| 1514 | } | ||||||||||||||||||||
| 1515 | 0 | return 0; | |||||||||||||||||||
| 1516 | }; | ||||||||||||||||||||
| 1517 | |||||||||||||||||||||
| 1518 | sub parseGroup { | ||||||||||||||||||||
| 1519 | 140 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseGroup: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||
| 1520 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1521 | # char => '}' | ||||||||||||||||||||
| 1522 | # context => '#pop' | ||||||||||||||||||||
| 1523 | # endRegion => 'group' | ||||||||||||||||||||
| 1524 | # type => 'DetectChar' | ||||||||||||||||||||
| 1525 | 140 | ▶ | if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1526 | 4 | return 1 | |||||||||||||||||||
| 1527 | } | ||||||||||||||||||||
| 1528 | # context => 'FindAll' | ||||||||||||||||||||
| 1529 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1530 | 136 | ▶ | if ($self->includeRules('FindAll', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1531 | 36 | return 1 | |||||||||||||||||||
| 1532 | } | ||||||||||||||||||||
| 1533 | 100 | return 0; | |||||||||||||||||||
| 1534 | }; | ||||||||||||||||||||
| 1535 | |||||||||||||||||||||
| 1536 | sub parseHereDoc { | ||||||||||||||||||||
| 1537 | 2 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseHereDoc: called CC=10 SCAR=39.1
Pod
undocumented
| |||||||||||||||||||||
| 1538 | # String => '(<<\s*"([^|&;()<>\s]+)")' | ||||||||||||||||||||
| 1539 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1540 | # context => 'HereDocQ' | ||||||||||||||||||||
| 1541 | # lookAhead => 'true' | ||||||||||||||||||||
| 1542 | # type => 'RegExpr' | ||||||||||||||||||||
| 1543 | 2 | ▶ | if ($self->testRegExpr($text, '(<<\\s*"([^|&;()<>\\s]+)")', 0, 0, 1, undef, 0, 'HereDocQ', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1544 | 0 | return 1 | |||||||||||||||||||
| 1545 | } | ||||||||||||||||||||
| 1546 | # String => '(<<\s*'([^|&;()<>\s]+)')' | ||||||||||||||||||||
| 1547 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1548 | # context => 'HereDocQ' | ||||||||||||||||||||
| 1549 | # lookAhead => 'true' | ||||||||||||||||||||
| 1550 | # type => 'RegExpr' | ||||||||||||||||||||
| 1551 | 2 | ▶ | if ($self->testRegExpr($text, '(<<\\s*\'([^|&;()<>\\s]+)\')', 0, 0, 1, undef, 0, 'HereDocQ', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1552 | 0 | return 1 | |||||||||||||||||||
| 1553 | } | ||||||||||||||||||||
| 1554 | # String => '(<<\s*\\([^|&;()<>\s]+))' | ||||||||||||||||||||
| 1555 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1556 | # context => 'HereDocQ' | ||||||||||||||||||||
| 1557 | # lookAhead => 'true' | ||||||||||||||||||||
| 1558 | # type => 'RegExpr' | ||||||||||||||||||||
| 1559 | 2 | ▶ | if ($self->testRegExpr($text, '(<<\\s*\\\\([^|&;()<>\\s]+))', 0, 0, 1, undef, 0, 'HereDocQ', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1560 | 0 | return 1 | |||||||||||||||||||
| 1561 | } | ||||||||||||||||||||
| 1562 | # String => '(<<\s*([^|&;()<>\s]+))' | ||||||||||||||||||||
| 1563 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1564 | # context => 'HereDocNQ' | ||||||||||||||||||||
| 1565 | # lookAhead => 'true' | ||||||||||||||||||||
| 1566 | # type => 'RegExpr' | ||||||||||||||||||||
| 1567 | 2 | ▶ | if ($self->testRegExpr($text, '(<<\\s*([^|&;()<>\\s]+))', 0, 0, 1, undef, 0, 'HereDocNQ', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1568 | 2 | return 1 | |||||||||||||||||||
| 1569 | } | ||||||||||||||||||||
| 1570 | # String => '(<<-\s*"([^|&;()<>\s]+)")' | ||||||||||||||||||||
| 1571 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1572 | # context => 'HereDocIQ' | ||||||||||||||||||||
| 1573 | # lookAhead => 'true' | ||||||||||||||||||||
| 1574 | # type => 'RegExpr' | ||||||||||||||||||||
| 1575 | 0 | ▶ | if ($self->testRegExpr($text, '(<<-\\s*"([^|&;()<>\\s]+)")', 0, 0, 1, undef, 0, 'HereDocIQ', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1576 | 0 | return 1 | |||||||||||||||||||
| 1577 | } | ||||||||||||||||||||
| 1578 | # String => '(<<-\s*'([^|&;()<>\s]+)')' | ||||||||||||||||||||
| 1579 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1580 | # context => 'HereDocIQ' | ||||||||||||||||||||
| 1581 | # lookAhead => 'true' | ||||||||||||||||||||
| 1582 | # type => 'RegExpr' | ||||||||||||||||||||
| 1583 | 0 | ▶ | if ($self->testRegExpr($text, '(<<-\\s*\'([^|&;()<>\\s]+)\')', 0, 0, 1, undef, 0, 'HereDocIQ', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1584 | 0 | return 1 | |||||||||||||||||||
| 1585 | } | ||||||||||||||||||||
| 1586 | # String => '(<<-\s*\\([^|&;()<>\s]+))' | ||||||||||||||||||||
| 1587 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1588 | # context => 'HereDocIQ' | ||||||||||||||||||||
| 1589 | # lookAhead => 'true' | ||||||||||||||||||||
| 1590 | # type => 'RegExpr' | ||||||||||||||||||||
| 1591 | 0 | ▶ | if ($self->testRegExpr($text, '(<<-\\s*\\\\([^|&;()<>\\s]+))', 0, 0, 1, undef, 0, 'HereDocIQ', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1592 | 0 | return 1 | |||||||||||||||||||
| 1593 | } | ||||||||||||||||||||
| 1594 | # String => '(<<-\s*([^|&;()<>\s]+))' | ||||||||||||||||||||
| 1595 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1596 | # context => 'HereDocINQ' | ||||||||||||||||||||
| 1597 | # lookAhead => 'true' | ||||||||||||||||||||
| 1598 | # type => 'RegExpr' | ||||||||||||||||||||
| 1599 | 0 | ▶ | if ($self->testRegExpr($text, '(<<-\\s*([^|&;()<>\\s]+))', 0, 0, 1, undef, 0, 'HereDocINQ', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1600 | 0 | return 1 | |||||||||||||||||||
| 1601 | } | ||||||||||||||||||||
| 1602 | # String => '<<' | ||||||||||||||||||||
| 1603 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1604 | # context => '#pop' | ||||||||||||||||||||
| 1605 | # type => 'StringDetect' | ||||||||||||||||||||
| 1606 | 0 | ▶ | if ($self->testStringDetect($text, '<<', 0, 0, 0, undef, 0, '#pop', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1607 | 0 | return 1 | |||||||||||||||||||
| 1608 | } | ||||||||||||||||||||
| 1609 | 0 | return 0; | |||||||||||||||||||
| 1610 | }; | ||||||||||||||||||||
| 1611 | |||||||||||||||||||||
| 1612 | sub parseHereDocINQ { | ||||||||||||||||||||
| 1613 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseHereDocINQ: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||
| 1614 | # String => '%1' | ||||||||||||||||||||
| 1615 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1616 | # context => 'HereDocRemainder' | ||||||||||||||||||||
| 1617 | # dynamic => 'true' | ||||||||||||||||||||
| 1618 | # type => 'RegExpr' | ||||||||||||||||||||
| 1619 | 0 | ▶ | if ($self->testRegExpr($text, '%1', 0, 1, 0, undef, 0, 'HereDocRemainder', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1620 | 0 | return 1 | |||||||||||||||||||
| 1621 | } | ||||||||||||||||||||
| 1622 | # String => '\s*%2[\s;]*$' | ||||||||||||||||||||
| 1623 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1624 | # column => '0' | ||||||||||||||||||||
| 1625 | # context => '#pop#pop' | ||||||||||||||||||||
| 1626 | # dynamic => 'true' | ||||||||||||||||||||
| 1627 | # type => 'RegExpr' | ||||||||||||||||||||
| 1628 | 0 | ▶ | if ($self->testRegExpr($text, '\\s*%2[\\s;]*$', 0, 1, 0, 0, 0, '#pop#pop', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1629 | 0 | return 1 | |||||||||||||||||||
| 1630 | } | ||||||||||||||||||||
| 1631 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 1632 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1633 | 0 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1634 | 0 | return 1 | |||||||||||||||||||
| 1635 | } | ||||||||||||||||||||
| 1636 | 0 | return 0; | |||||||||||||||||||
| 1637 | }; | ||||||||||||||||||||
| 1638 | |||||||||||||||||||||
| 1639 | sub parseHereDocIQ { | ||||||||||||||||||||
| 1640 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseHereDocIQ: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 1641 | # String => '%1' | ||||||||||||||||||||
| 1642 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1643 | # context => 'HereDocRemainder' | ||||||||||||||||||||
| 1644 | # dynamic => 'true' | ||||||||||||||||||||
| 1645 | # type => 'RegExpr' | ||||||||||||||||||||
| 1646 | 0 | ▶ | if ($self->testRegExpr($text, '%1', 0, 1, 0, undef, 0, 'HereDocRemainder', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1647 | 0 | return 1 | |||||||||||||||||||
| 1648 | } | ||||||||||||||||||||
| 1649 | # String => '\s*%2[\s;]*$' | ||||||||||||||||||||
| 1650 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1651 | # column => '0' | ||||||||||||||||||||
| 1652 | # context => '#pop#pop' | ||||||||||||||||||||
| 1653 | # dynamic => 'true' | ||||||||||||||||||||
| 1654 | # type => 'RegExpr' | ||||||||||||||||||||
| 1655 | 0 | ▶ | if ($self->testRegExpr($text, '\\s*%2[\\s;]*$', 0, 1, 0, 0, 0, '#pop#pop', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1656 | 0 | return 1 | |||||||||||||||||||
| 1657 | } | ||||||||||||||||||||
| 1658 | 0 | return 0; | |||||||||||||||||||
| 1659 | }; | ||||||||||||||||||||
| 1660 | |||||||||||||||||||||
| 1661 | sub parseHereDocNQ { | ||||||||||||||||||||
| 1662 | 964 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseHereDocNQ: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||||||||||||
| 1663 | # String => '%1' | ||||||||||||||||||||
| 1664 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1665 | # context => 'HereDocRemainder' | ||||||||||||||||||||
| 1666 | # dynamic => 'true' | ||||||||||||||||||||
| 1667 | # type => 'RegExpr' | ||||||||||||||||||||
| 1668 | 964 | ▶ | if ($self->testRegExpr($text, '%1', 0, 1, 0, undef, 0, 'HereDocRemainder', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1669 | 2 | return 1 | |||||||||||||||||||
| 1670 | } | ||||||||||||||||||||
| 1671 | # String => '%2[\s;]*$' | ||||||||||||||||||||
| 1672 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1673 | # column => '0' | ||||||||||||||||||||
| 1674 | # context => '#pop#pop' | ||||||||||||||||||||
| 1675 | # dynamic => 'true' | ||||||||||||||||||||
| 1676 | # type => 'RegExpr' | ||||||||||||||||||||
| 1677 | 962 | ▶ | if ($self->testRegExpr($text, '%2[\\s;]*$', 0, 1, 0, 0, 0, '#pop#pop', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1678 | 0 | return 1 | |||||||||||||||||||
| 1679 | } | ||||||||||||||||||||
| 1680 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 1681 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1682 | 962 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1683 | 12 | return 1 | |||||||||||||||||||
| 1684 | } | ||||||||||||||||||||
| 1685 | 950 | return 0; | |||||||||||||||||||
| 1686 | }; | ||||||||||||||||||||
| 1687 | |||||||||||||||||||||
| 1688 | sub parseHereDocQ { | ||||||||||||||||||||
| 1689 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseHereDocQ: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 1690 | # String => '%1' | ||||||||||||||||||||
| 1691 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1692 | # context => 'HereDocRemainder' | ||||||||||||||||||||
| 1693 | # dynamic => 'true' | ||||||||||||||||||||
| 1694 | # type => 'RegExpr' | ||||||||||||||||||||
| 1695 | 0 | ▶ | if ($self->testRegExpr($text, '%1', 0, 1, 0, undef, 0, 'HereDocRemainder', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1696 | 0 | return 1 | |||||||||||||||||||
| 1697 | } | ||||||||||||||||||||
| 1698 | # String => '%2[\s;]*$' | ||||||||||||||||||||
| 1699 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1700 | # column => '0' | ||||||||||||||||||||
| 1701 | # context => '#pop#pop' | ||||||||||||||||||||
| 1702 | # dynamic => 'true' | ||||||||||||||||||||
| 1703 | # type => 'RegExpr' | ||||||||||||||||||||
| 1704 | 0 | ▶ | if ($self->testRegExpr($text, '%2[\\s;]*$', 0, 1, 0, 0, 0, '#pop#pop', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1705 | 0 | return 1 | |||||||||||||||||||
| 1706 | } | ||||||||||||||||||||
| 1707 | 0 | return 0; | |||||||||||||||||||
| 1708 | }; | ||||||||||||||||||||
| 1709 | |||||||||||||||||||||
| 1710 | sub parseHereDocRemainder { | ||||||||||||||||||||
| 1711 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseHereDocRemainder: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 1712 | # context => 'FindAll' | ||||||||||||||||||||
| 1713 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1714 | 0 | ▶ | if ($self->includeRules('FindAll', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1715 | 0 | return 1 | |||||||||||||||||||
| 1716 | } | ||||||||||||||||||||
| 1717 | 0 | return 0; | |||||||||||||||||||
| 1718 | }; | ||||||||||||||||||||
| 1719 | |||||||||||||||||||||
| 1720 | sub parseProcessSubst { | ||||||||||||||||||||
| 1721 | 24 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseProcessSubst: called CC=7 SCAR=22.8
Pod
undocumented
| |||||||||||||||||||||
| 1722 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1723 | # char => ')' | ||||||||||||||||||||
| 1724 | # context => '#pop' | ||||||||||||||||||||
| 1725 | # type => 'DetectChar' | ||||||||||||||||||||
| 1726 | 24 | ▶ | if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1727 | 2 | return 1 | |||||||||||||||||||
| 1728 | } | ||||||||||||||||||||
| 1729 | # context => 'FindCommentsParen' | ||||||||||||||||||||
| 1730 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1731 | 22 | ▶ | if ($self->includeRules('FindCommentsParen', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1732 | 0 | return 1 | |||||||||||||||||||
| 1733 | } | ||||||||||||||||||||
| 1734 | # context => 'FindCommands' | ||||||||||||||||||||
| 1735 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1736 | 22 | ▶ | if ($self->includeRules('FindCommands', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1737 | 0 | return 1 | |||||||||||||||||||
| 1738 | } | ||||||||||||||||||||
| 1739 | # context => 'FindStrings' | ||||||||||||||||||||
| 1740 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1741 | 22 | ▶ | if ($self->includeRules('FindStrings', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1742 | 0 | return 1 | |||||||||||||||||||
| 1743 | } | ||||||||||||||||||||
| 1744 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 1745 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1746 | 22 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1747 | 0 | return 1 | |||||||||||||||||||
| 1748 | } | ||||||||||||||||||||
| 1749 | # context => 'FindOthers' | ||||||||||||||||||||
| 1750 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1751 | 22 | ▶ | if ($self->includeRules('FindOthers', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1752 | 0 | return 1 | |||||||||||||||||||
| 1753 | } | ||||||||||||||||||||
| 1754 | 22 | return 0; | |||||||||||||||||||
| 1755 | }; | ||||||||||||||||||||
| 1756 | |||||||||||||||||||||
| 1757 | sub parseStart { | ||||||||||||||||||||
| 1758 | 760 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseStart: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 1759 | # context => 'FindAll' | ||||||||||||||||||||
| 1760 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1761 | 760 | ▶ | if ($self->includeRules('FindAll', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1762 | 320 | return 1 | |||||||||||||||||||
| 1763 | } | ||||||||||||||||||||
| 1764 | 440 | return 0; | |||||||||||||||||||
| 1765 | }; | ||||||||||||||||||||
| 1766 | |||||||||||||||||||||
| 1767 | sub parseStringDQ { | ||||||||||||||||||||
| 1768 | 560 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseStringDQ: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||
| 1769 | # attribute => 'String DoubleQ' | ||||||||||||||||||||
| 1770 | # char => '"' | ||||||||||||||||||||
| 1771 | # context => '#pop' | ||||||||||||||||||||
| 1772 | # type => 'DetectChar' | ||||||||||||||||||||
| 1773 | 560 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String DoubleQ')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1774 | 30 | return 1 | |||||||||||||||||||
| 1775 | } | ||||||||||||||||||||
| 1776 | # String => '\\[`"\\$\n]' | ||||||||||||||||||||
| 1777 | # attribute => 'String Escape' | ||||||||||||||||||||
| 1778 | # context => '#stay' | ||||||||||||||||||||
| 1779 | # type => 'RegExpr' | ||||||||||||||||||||
| 1780 | 530 | ▶ | if ($self->testRegExpr($text, '\\\\[`"\\\\$\\n]', 0, 0, 0, undef, 0, '#stay', 'String Escape')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1781 | 6 | return 1 | |||||||||||||||||||
| 1782 | } | ||||||||||||||||||||
| 1783 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 1784 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1785 | 524 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1786 | 14 | return 1 | |||||||||||||||||||
| 1787 | } | ||||||||||||||||||||
| 1788 | 510 | return 0; | |||||||||||||||||||
| 1789 | }; | ||||||||||||||||||||
| 1790 | |||||||||||||||||||||
| 1791 | sub parseStringEsc { | ||||||||||||||||||||
| 1792 | 52 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseStringEsc: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||
| 1793 | # attribute => 'String SingleQ' | ||||||||||||||||||||
| 1794 | # char => ''' | ||||||||||||||||||||
| 1795 | # context => '#pop' | ||||||||||||||||||||
| 1796 | # type => 'DetectChar' | ||||||||||||||||||||
| 1797 | 52 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String SingleQ')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1798 | 2 | return 1 | |||||||||||||||||||
| 1799 | } | ||||||||||||||||||||
| 1800 | # String => '\\[abefnrtv\\']' | ||||||||||||||||||||
| 1801 | # attribute => 'String Escape' | ||||||||||||||||||||
| 1802 | # context => '#stay' | ||||||||||||||||||||
| 1803 | # type => 'RegExpr' | ||||||||||||||||||||
| 1804 | 50 | ▶ | if ($self->testRegExpr($text, '\\\\[abefnrtv\\\\\']', 0, 0, 0, undef, 0, '#stay', 'String Escape')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1805 | 2 | return 1 | |||||||||||||||||||
| 1806 | } | ||||||||||||||||||||
| 1807 | # String => '\\([0-7]{1,3}|x[A-Fa-f0-9]{1,2}|c.)' | ||||||||||||||||||||
| 1808 | # attribute => 'String Escape' | ||||||||||||||||||||
| 1809 | # context => '#stay' | ||||||||||||||||||||
| 1810 | # type => 'RegExpr' | ||||||||||||||||||||
| 1811 | 48 | ▶ | if ($self->testRegExpr($text, '\\\\([0-7]{1,3}|x[A-Fa-f0-9]{1,2}|c.)', 0, 0, 0, undef, 0, '#stay', 'String Escape')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1812 | 2 | return 1 | |||||||||||||||||||
| 1813 | } | ||||||||||||||||||||
| 1814 | 46 | return 0; | |||||||||||||||||||
| 1815 | }; | ||||||||||||||||||||
| 1816 | |||||||||||||||||||||
| 1817 | sub parseStringSQ { | ||||||||||||||||||||
| 1818 | 124 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseStringSQ: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 1819 | # attribute => 'String SingleQ' | ||||||||||||||||||||
| 1820 | # char => ''' | ||||||||||||||||||||
| 1821 | # context => '#pop' | ||||||||||||||||||||
| 1822 | # type => 'DetectChar' | ||||||||||||||||||||
| 1823 | 124 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String SingleQ')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1824 | 10 | return 1 | |||||||||||||||||||
| 1825 | } | ||||||||||||||||||||
| 1826 | 114 | return 0; | |||||||||||||||||||
| 1827 | }; | ||||||||||||||||||||
| 1828 | |||||||||||||||||||||
| 1829 | sub parseSubShell { | ||||||||||||||||||||
| 1830 | 32 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSubShell: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||
| 1831 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1832 | # char => ')' | ||||||||||||||||||||
| 1833 | # context => '#pop' | ||||||||||||||||||||
| 1834 | # endRegion => 'subshell' | ||||||||||||||||||||
| 1835 | # type => 'DetectChar' | ||||||||||||||||||||
| 1836 | 32 | ▶ | if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1837 | 2 | return 1 | |||||||||||||||||||
| 1838 | } | ||||||||||||||||||||
| 1839 | # context => 'FindAll' | ||||||||||||||||||||
| 1840 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1841 | 30 | ▶ | if ($self->includeRules('FindAll', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1842 | 2 | return 1 | |||||||||||||||||||
| 1843 | } | ||||||||||||||||||||
| 1844 | 28 | return 0; | |||||||||||||||||||
| 1845 | }; | ||||||||||||||||||||
| 1846 | |||||||||||||||||||||
| 1847 | sub parseSubscript { | ||||||||||||||||||||
| 1848 | 32 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSubscript: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||||||||||||
| 1849 | # attribute => 'Variable' | ||||||||||||||||||||
| 1850 | # char => ']' | ||||||||||||||||||||
| 1851 | # context => '#pop' | ||||||||||||||||||||
| 1852 | # type => 'DetectChar' | ||||||||||||||||||||
| 1853 | 32 | ▶ | if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1854 | 10 | return 1 | |||||||||||||||||||
| 1855 | } | ||||||||||||||||||||
| 1856 | # context => 'FindStrings' | ||||||||||||||||||||
| 1857 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1858 | 22 | ▶ | if ($self->includeRules('FindStrings', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1859 | 2 | return 1 | |||||||||||||||||||
| 1860 | } | ||||||||||||||||||||
| 1861 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 1862 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1863 | 20 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1864 | 2 | return 1 | |||||||||||||||||||
| 1865 | } | ||||||||||||||||||||
| 1866 | # context => 'FindOthers' | ||||||||||||||||||||
| 1867 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1868 | 18 | ▶ | if ($self->includeRules('FindOthers', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1869 | 0 | return 1 | |||||||||||||||||||
| 1870 | } | ||||||||||||||||||||
| 1871 | 18 | return 0; | |||||||||||||||||||
| 1872 | }; | ||||||||||||||||||||
| 1873 | |||||||||||||||||||||
| 1874 | sub parseSubstBackq { | ||||||||||||||||||||
| 1875 | 50 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSubstBackq: called CC=7 SCAR=20.3
Pod
undocumented
| |||||||||||||||||||||
| 1876 | # attribute => 'Keyword' | ||||||||||||||||||||
| 1877 | # char => '`' | ||||||||||||||||||||
| 1878 | # context => '#pop' | ||||||||||||||||||||
| 1879 | # type => 'DetectChar' | ||||||||||||||||||||
| 1880 | 50 | ▶ | if ($self->testDetectChar($text, '`', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1881 | 6 | return 1 | |||||||||||||||||||
| 1882 | } | ||||||||||||||||||||
| 1883 | # context => 'FindCommentsBackq' | ||||||||||||||||||||
| 1884 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1885 | 44 | ▶ | if ($self->includeRules('FindCommentsBackq', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1886 | 0 | return 1 | |||||||||||||||||||
| 1887 | } | ||||||||||||||||||||
| 1888 | # context => 'FindCommands' | ||||||||||||||||||||
| 1889 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1890 | 44 | ▶ | if ($self->includeRules('FindCommands', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1891 | 4 | return 1 | |||||||||||||||||||
| 1892 | } | ||||||||||||||||||||
| 1893 | # context => 'FindStrings' | ||||||||||||||||||||
| 1894 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1895 | 40 | ▶ | if ($self->includeRules('FindStrings', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1896 | 0 | return 1 | |||||||||||||||||||
| 1897 | } | ||||||||||||||||||||
| 1898 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 1899 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1900 | 40 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1901 | 2 | return 1 | |||||||||||||||||||
| 1902 | } | ||||||||||||||||||||
| 1903 | # context => 'FindOthers' | ||||||||||||||||||||
| 1904 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1905 | 38 | ▶ | if ($self->includeRules('FindOthers', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1906 | 0 | return 1 | |||||||||||||||||||
| 1907 | } | ||||||||||||||||||||
| 1908 | 38 | return 0; | |||||||||||||||||||
| 1909 | }; | ||||||||||||||||||||
| 1910 | |||||||||||||||||||||
| 1911 | sub parseSubstCommand { | ||||||||||||||||||||
| 1912 | 54 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSubstCommand: called CC=7 SCAR=20.3
Pod
undocumented
| |||||||||||||||||||||
| 1913 | # attribute => 'Variable' | ||||||||||||||||||||
| 1914 | # char => ')' | ||||||||||||||||||||
| 1915 | # context => '#pop' | ||||||||||||||||||||
| 1916 | # type => 'DetectChar' | ||||||||||||||||||||
| 1917 | 54 | ▶ | if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1918 | 4 | return 1 | |||||||||||||||||||
| 1919 | } | ||||||||||||||||||||
| 1920 | # context => 'FindCommentsParen' | ||||||||||||||||||||
| 1921 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1922 | 50 | ▶ | if ($self->includeRules('FindCommentsParen', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1923 | 0 | return 1 | |||||||||||||||||||
| 1924 | } | ||||||||||||||||||||
| 1925 | # context => 'FindCommands' | ||||||||||||||||||||
| 1926 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1927 | 50 | ▶ | if ($self->includeRules('FindCommands', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1928 | 18 | return 1 | |||||||||||||||||||
| 1929 | } | ||||||||||||||||||||
| 1930 | # context => 'FindStrings' | ||||||||||||||||||||
| 1931 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1932 | 32 | ▶ | if ($self->includeRules('FindStrings', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1933 | 4 | return 1 | |||||||||||||||||||
| 1934 | } | ||||||||||||||||||||
| 1935 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 1936 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1937 | 28 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1938 | 0 | return 1 | |||||||||||||||||||
| 1939 | } | ||||||||||||||||||||
| 1940 | # context => 'FindOthers' | ||||||||||||||||||||
| 1941 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1942 | 28 | ▶ | if ($self->includeRules('FindOthers', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1943 | 0 | return 1 | |||||||||||||||||||
| 1944 | } | ||||||||||||||||||||
| 1945 | 28 | return 0; | |||||||||||||||||||
| 1946 | }; | ||||||||||||||||||||
| 1947 | |||||||||||||||||||||
| 1948 | sub parseSubstFile { | ||||||||||||||||||||
| 1949 | 12 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseSubstFile: called CC=6 SCAR=19.1
Pod
undocumented
| |||||||||||||||||||||
| 1950 | # attribute => 'Redirection' | ||||||||||||||||||||
| 1951 | # char => ')' | ||||||||||||||||||||
| 1952 | # context => '#pop' | ||||||||||||||||||||
| 1953 | # type => 'DetectChar' | ||||||||||||||||||||
| 1954 | 12 | ▶ | if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Redirection')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1955 | 4 | return 1 | |||||||||||||||||||
| 1956 | } | ||||||||||||||||||||
| 1957 | # context => 'FindCommentsParen' | ||||||||||||||||||||
| 1958 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1959 | 8 | ▶ | if ($self->includeRules('FindCommentsParen', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1960 | 0 | return 1 | |||||||||||||||||||
| 1961 | } | ||||||||||||||||||||
| 1962 | # context => 'FindStrings' | ||||||||||||||||||||
| 1963 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1964 | 8 | ▶ | if ($self->includeRules('FindStrings', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1965 | 0 | return 1 | |||||||||||||||||||
| 1966 | } | ||||||||||||||||||||
| 1967 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 1968 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1969 | 8 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1970 | 2 | return 1 | |||||||||||||||||||
| 1971 | } | ||||||||||||||||||||
| 1972 | # context => 'FindOthers' | ||||||||||||||||||||
| 1973 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1974 | 6 | ▶ | if ($self->includeRules('FindOthers', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1975 | 6 | return 1 | |||||||||||||||||||
| 1976 | } | ||||||||||||||||||||
| 1977 | 0 | return 0; | |||||||||||||||||||
| 1978 | }; | ||||||||||||||||||||
| 1979 | |||||||||||||||||||||
| 1980 | sub parseVarBrace { | ||||||||||||||||||||
| 1981 | 44 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseVarBrace: called CC=5 SCAR=16.6
Pod
undocumented
| |||||||||||||||||||||
| 1982 | # attribute => 'Variable' | ||||||||||||||||||||
| 1983 | # char => '}' | ||||||||||||||||||||
| 1984 | # context => '#pop' | ||||||||||||||||||||
| 1985 | # type => 'DetectChar' | ||||||||||||||||||||
| 1986 | 44 | ▶ | if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1987 | 12 | return 1 | |||||||||||||||||||
| 1988 | } | ||||||||||||||||||||
| 1989 | # attribute => 'Variable' | ||||||||||||||||||||
| 1990 | # char => '[' | ||||||||||||||||||||
| 1991 | # context => 'Subscript' | ||||||||||||||||||||
| 1992 | # type => 'DetectChar' | ||||||||||||||||||||
| 1993 | 32 | ▶ | if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'Subscript', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1994 | 4 | return 1 | |||||||||||||||||||
| 1995 | } | ||||||||||||||||||||
| 1996 | # context => 'FindStrings' | ||||||||||||||||||||
| 1997 | # type => 'IncludeRules' | ||||||||||||||||||||
| 1998 | 28 | ▶ | if ($self->includeRules('FindStrings', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 1999 | 0 | return 1 | |||||||||||||||||||
| 2000 | } | ||||||||||||||||||||
| 2001 | # context => 'FindSubstitutions' | ||||||||||||||||||||
| 2002 | # type => 'IncludeRules' | ||||||||||||||||||||
| 2003 | 28 | ▶ | if ($self->includeRules('FindSubstitutions', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 2004 | 0 | return 1 | |||||||||||||||||||
| 2005 | } | ||||||||||||||||||||
| 2006 | 28 | return 0; | |||||||||||||||||||
| 2007 | }; | ||||||||||||||||||||
| 2008 | |||||||||||||||||||||
| 2009 | sub parseVarName { | ||||||||||||||||||||
| 2010 | 104 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseVarName: called CC=8 SCAR=21.4
Pod
undocumented
| |||||||||||||||||||||
| 2011 | # String => '-[A-Za-z0-9]+' | ||||||||||||||||||||
| 2012 | # attribute => 'Option' | ||||||||||||||||||||
| 2013 | # context => '#stay' | ||||||||||||||||||||
| 2014 | # type => 'RegExpr' | ||||||||||||||||||||
| 2015 | 104 | ▶ | if ($self->testRegExpr($text, '-[A-Za-z0-9]+', 0, 0, 0, undef, 0, '#stay', 'Option')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 2016 | 2 | return 1 | |||||||||||||||||||
| 2017 | } | ||||||||||||||||||||
| 2018 | # String => '--[a-z][A-Za-z0-9_-]*' | ||||||||||||||||||||
| 2019 | # attribute => 'Option' | ||||||||||||||||||||
| 2020 | # context => '#stay' | ||||||||||||||||||||
| 2021 | # type => 'RegExpr' | ||||||||||||||||||||
| 2022 | 102 | ▶ | if ($self->testRegExpr($text, '--[a-z][A-Za-z0-9_-]*', 0, 0, 0, undef, 0, '#stay', 'Option')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 2023 | 0 | return 1 | |||||||||||||||||||
| 2024 | } | ||||||||||||||||||||
| 2025 | # String => '\b[A-Za-z_][A-Za-z0-9_]*' | ||||||||||||||||||||
| 2026 | # attribute => 'Variable' | ||||||||||||||||||||
| 2027 | # context => '#stay' | ||||||||||||||||||||
| 2028 | # type => 'RegExpr' | ||||||||||||||||||||
| 2029 | 102 | ▶ | if ($self->testRegExpr($text, '\\b[A-Za-z_][A-Za-z0-9_]*', 0, 0, 0, undef, 0, '#stay', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 2030 | 40 | return 1 | |||||||||||||||||||
| 2031 | } | ||||||||||||||||||||
| 2032 | # attribute => 'Variable' | ||||||||||||||||||||
| 2033 | # char => '[' | ||||||||||||||||||||
| 2034 | # context => 'Subscript' | ||||||||||||||||||||
| 2035 | # type => 'DetectChar' | ||||||||||||||||||||
| 2036 | 62 | ▶ | if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'Subscript', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 2037 | 0 | return 1 | |||||||||||||||||||
| 2038 | } | ||||||||||||||||||||
| 2039 | # attribute => 'Variable' | ||||||||||||||||||||
| 2040 | # char => '=' | ||||||||||||||||||||
| 2041 | # context => 'Assign' | ||||||||||||||||||||
| 2042 | # type => 'DetectChar' | ||||||||||||||||||||
| 2043 | 62 | ▶ | if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Assign', 'Variable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 2044 | 6 | return 1 | |||||||||||||||||||
| 2045 | } | ||||||||||||||||||||
| 2046 | # context => 'FindMost' | ||||||||||||||||||||
| 2047 | # type => 'IncludeRules' | ||||||||||||||||||||
| 2048 | 56 | ▶ | if ($self->includeRules('FindMost', $text)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 2049 | 0 | return 1 | |||||||||||||||||||
| 2050 | } | ||||||||||||||||||||
| 2051 | # String => '[^]})|;`&><]' | ||||||||||||||||||||
| 2052 | # attribute => 'Normal Text' | ||||||||||||||||||||
| 2053 | # context => '#stay' | ||||||||||||||||||||
| 2054 | # type => 'RegExpr' | ||||||||||||||||||||
| 2055 | 56 | ▶ | if ($self->testRegExpr($text, '[^]})|;`&><]', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 2056 | 50 | return 1 | |||||||||||||||||||
| 2057 | } | ||||||||||||||||||||
| 2058 | 6 | return 0; | |||||||||||||||||||
| 2059 | }; | ||||||||||||||||||||
| 2060 | |||||||||||||||||||||
| 2061 | |||||||||||||||||||||
| 2062 | 1 | 1; | |||||||||||||||||||
| 2063 | |||||||||||||||||||||
| 2064 | __END__ | ||||||||||||||||||||