| 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 'picsrc.xml' file of the syntax highlight | ||||||||||||||||||||
| 6 | # engine of the kate text editor (http://www.kate-editor.org | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | #kate xml version 1.07 | ||||||||||||||||||||
| 9 | #kate version 2.3 | ||||||||||||||||||||
| 10 | #kate author Alain GIBAUD (alain.gibaud@univ-valenciennes.fr) | ||||||||||||||||||||
| 11 | #generated: Sun Feb 3 22:02:06 2008, localtime | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | package Syntax::Highlight::Engine::Kate::PicAsm; | ||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 1 | our $VERSION = '0.16'; | |||||||||||||||||||
| 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 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 22 | 2 | my $proto = shift; | |||||||||||||||||||
| 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 | 'Alert' => 'Alert', | ||||||||||||||||||||
| 27 | 'Based Numbers' => 'BaseN', | ||||||||||||||||||||
| 28 | 'Char' => 'Char', | ||||||||||||||||||||
| 29 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 30 | 'Directives' => 'Others', | ||||||||||||||||||||
| 31 | 'Error' => 'Error', | ||||||||||||||||||||
| 32 | 'GPASM-macros' => 'BString', | ||||||||||||||||||||
| 33 | 'InstructionAttr' => 'Operator', | ||||||||||||||||||||
| 34 | 'Instructions' => 'Keyword', | ||||||||||||||||||||
| 35 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 36 | 'Prep. Lib' => 'Others', | ||||||||||||||||||||
| 37 | 'Preprocessor' => 'Others', | ||||||||||||||||||||
| 38 | 'String' => 'String', | ||||||||||||||||||||
| 39 | 'Symbol' => 'Variable', | ||||||||||||||||||||
| 40 | 'Unbased Numbers' => 'DecVal', | ||||||||||||||||||||
| 41 | }); | ||||||||||||||||||||
| 42 | 2 | $self->listAdd('conditional', | |||||||||||||||||||
| 43 | 'else', | ||||||||||||||||||||
| 44 | 'endif', | ||||||||||||||||||||
| 45 | 'endw', | ||||||||||||||||||||
| 46 | 'idef', | ||||||||||||||||||||
| 47 | 'if', | ||||||||||||||||||||
| 48 | 'ifndef', | ||||||||||||||||||||
| 49 | 'include', | ||||||||||||||||||||
| 50 | 'while', | ||||||||||||||||||||
| 51 | '{', | ||||||||||||||||||||
| 52 | '}', | ||||||||||||||||||||
| 53 | ); | ||||||||||||||||||||
| 54 | 2 | $self->listAdd('directives', | |||||||||||||||||||
| 55 | 'CBLOCK', | ||||||||||||||||||||
| 56 | 'CONSTANT', | ||||||||||||||||||||
| 57 | 'DA', | ||||||||||||||||||||
| 58 | 'DATA', | ||||||||||||||||||||
| 59 | 'DB', | ||||||||||||||||||||
| 60 | 'DE', | ||||||||||||||||||||
| 61 | 'DT', | ||||||||||||||||||||
| 62 | 'DW', | ||||||||||||||||||||
| 63 | 'END', | ||||||||||||||||||||
| 64 | 'ENDC', | ||||||||||||||||||||
| 65 | 'ENDM', | ||||||||||||||||||||
| 66 | 'EQU', | ||||||||||||||||||||
| 67 | 'ERROR', | ||||||||||||||||||||
| 68 | 'ERRORLEVEL', | ||||||||||||||||||||
| 69 | 'EXITM', | ||||||||||||||||||||
| 70 | 'FILL', | ||||||||||||||||||||
| 71 | 'LIST', | ||||||||||||||||||||
| 72 | 'LOCAL', | ||||||||||||||||||||
| 73 | 'MACRO', | ||||||||||||||||||||
| 74 | 'MESSG', | ||||||||||||||||||||
| 75 | 'NOEXPAND', | ||||||||||||||||||||
| 76 | 'NOLIST', | ||||||||||||||||||||
| 77 | 'ORG', | ||||||||||||||||||||
| 78 | 'PAGE', | ||||||||||||||||||||
| 79 | 'PROCESSOR', | ||||||||||||||||||||
| 80 | 'RADIX', | ||||||||||||||||||||
| 81 | 'RES', | ||||||||||||||||||||
| 82 | 'SET', | ||||||||||||||||||||
| 83 | 'SPACE', | ||||||||||||||||||||
| 84 | 'SUBTITLE', | ||||||||||||||||||||
| 85 | 'TITLE', | ||||||||||||||||||||
| 86 | 'VARIABLE', | ||||||||||||||||||||
| 87 | '__BADRAM', | ||||||||||||||||||||
| 88 | '__CONFIG', | ||||||||||||||||||||
| 89 | '__IDLOCS', | ||||||||||||||||||||
| 90 | '__MAXRAM', | ||||||||||||||||||||
| 91 | 'cblock', | ||||||||||||||||||||
| 92 | 'constant', | ||||||||||||||||||||
| 93 | 'da', | ||||||||||||||||||||
| 94 | 'data', | ||||||||||||||||||||
| 95 | 'db', | ||||||||||||||||||||
| 96 | 'de', | ||||||||||||||||||||
| 97 | 'dt', | ||||||||||||||||||||
| 98 | 'dw', | ||||||||||||||||||||
| 99 | 'end', | ||||||||||||||||||||
| 100 | 'endc', | ||||||||||||||||||||
| 101 | 'endm', | ||||||||||||||||||||
| 102 | 'equ', | ||||||||||||||||||||
| 103 | 'error', | ||||||||||||||||||||
| 104 | 'errorlevel', | ||||||||||||||||||||
| 105 | 'exitm', | ||||||||||||||||||||
| 106 | 'fill', | ||||||||||||||||||||
| 107 | 'list', | ||||||||||||||||||||
| 108 | 'local', | ||||||||||||||||||||
| 109 | 'macro', | ||||||||||||||||||||
| 110 | 'messg', | ||||||||||||||||||||
| 111 | 'noexpand', | ||||||||||||||||||||
| 112 | 'nolist', | ||||||||||||||||||||
| 113 | 'org', | ||||||||||||||||||||
| 114 | 'page', | ||||||||||||||||||||
| 115 | 'processor', | ||||||||||||||||||||
| 116 | 'radix', | ||||||||||||||||||||
| 117 | 'res', | ||||||||||||||||||||
| 118 | 'set', | ||||||||||||||||||||
| 119 | 'space', | ||||||||||||||||||||
| 120 | 'subtitle', | ||||||||||||||||||||
| 121 | 'title', | ||||||||||||||||||||
| 122 | 'variable', | ||||||||||||||||||||
| 123 | ); | ||||||||||||||||||||
| 124 | 2 | $self->listAdd('gpasm_macro', | |||||||||||||||||||
| 125 | 'ADDCF', | ||||||||||||||||||||
| 126 | 'B', | ||||||||||||||||||||
| 127 | 'CLRC', | ||||||||||||||||||||
| 128 | 'CLRZ', | ||||||||||||||||||||
| 129 | 'MOVFW', | ||||||||||||||||||||
| 130 | 'SETC', | ||||||||||||||||||||
| 131 | 'SETZ', | ||||||||||||||||||||
| 132 | 'SKPC', | ||||||||||||||||||||
| 133 | 'SKPNC', | ||||||||||||||||||||
| 134 | 'SKPNZ', | ||||||||||||||||||||
| 135 | 'SKPZ', | ||||||||||||||||||||
| 136 | 'SUBCF', | ||||||||||||||||||||
| 137 | 'TSTF', | ||||||||||||||||||||
| 138 | 'addcf', | ||||||||||||||||||||
| 139 | 'b', | ||||||||||||||||||||
| 140 | 'clrc', | ||||||||||||||||||||
| 141 | 'clrz', | ||||||||||||||||||||
| 142 | 'movfw', | ||||||||||||||||||||
| 143 | 'setc', | ||||||||||||||||||||
| 144 | 'setz', | ||||||||||||||||||||
| 145 | 'skpc', | ||||||||||||||||||||
| 146 | 'skpnc', | ||||||||||||||||||||
| 147 | 'skpnz', | ||||||||||||||||||||
| 148 | 'skpz', | ||||||||||||||||||||
| 149 | 'subcf', | ||||||||||||||||||||
| 150 | 'tstf', | ||||||||||||||||||||
| 151 | ); | ||||||||||||||||||||
| 152 | 2 | $self->listAdd('instruction_attr', | |||||||||||||||||||
| 153 | 'A', | ||||||||||||||||||||
| 154 | 'ACCESS', | ||||||||||||||||||||
| 155 | 'BANKED', | ||||||||||||||||||||
| 156 | 'F', | ||||||||||||||||||||
| 157 | 'W', | ||||||||||||||||||||
| 158 | ); | ||||||||||||||||||||
| 159 | 2 | $self->listAdd('instructions', | |||||||||||||||||||
| 160 | 'ADDLW', | ||||||||||||||||||||
| 161 | 'ADDWF', | ||||||||||||||||||||
| 162 | 'ADDWFC', | ||||||||||||||||||||
| 163 | 'ANDLW', | ||||||||||||||||||||
| 164 | 'ANDWF', | ||||||||||||||||||||
| 165 | 'BC', | ||||||||||||||||||||
| 166 | 'BCF', | ||||||||||||||||||||
| 167 | 'BN', | ||||||||||||||||||||
| 168 | 'BNC', | ||||||||||||||||||||
| 169 | 'BNOV', | ||||||||||||||||||||
| 170 | 'BNZ', | ||||||||||||||||||||
| 171 | 'BOV', | ||||||||||||||||||||
| 172 | 'BRA', | ||||||||||||||||||||
| 173 | 'BSF', | ||||||||||||||||||||
| 174 | 'BTFSC', | ||||||||||||||||||||
| 175 | 'BTFSS', | ||||||||||||||||||||
| 176 | 'BTG', | ||||||||||||||||||||
| 177 | 'BZ', | ||||||||||||||||||||
| 178 | 'CALL', | ||||||||||||||||||||
| 179 | 'CLRF', | ||||||||||||||||||||
| 180 | 'CLRW', | ||||||||||||||||||||
| 181 | 'CLRWDT', | ||||||||||||||||||||
| 182 | 'COMF', | ||||||||||||||||||||
| 183 | 'CPFSEQ', | ||||||||||||||||||||
| 184 | 'CPFSGT', | ||||||||||||||||||||
| 185 | 'CPFSLT', | ||||||||||||||||||||
| 186 | 'DAW', | ||||||||||||||||||||
| 187 | 'DCFSNZ', | ||||||||||||||||||||
| 188 | 'DECF', | ||||||||||||||||||||
| 189 | 'DECFSZ', | ||||||||||||||||||||
| 190 | 'GOTO', | ||||||||||||||||||||
| 191 | 'INCF', | ||||||||||||||||||||
| 192 | 'INCFSZ', | ||||||||||||||||||||
| 193 | 'INFSNZ', | ||||||||||||||||||||
| 194 | 'IORLW', | ||||||||||||||||||||
| 195 | 'IORWF', | ||||||||||||||||||||
| 196 | 'LFSR', | ||||||||||||||||||||
| 197 | 'MOVF', | ||||||||||||||||||||
| 198 | 'MOVFF', | ||||||||||||||||||||
| 199 | 'MOVLB', | ||||||||||||||||||||
| 200 | 'MOVLW', | ||||||||||||||||||||
| 201 | 'MOVWF', | ||||||||||||||||||||
| 202 | 'MULLW', | ||||||||||||||||||||
| 203 | 'MULWF', | ||||||||||||||||||||
| 204 | 'NEGF', | ||||||||||||||||||||
| 205 | 'NOP', | ||||||||||||||||||||
| 206 | 'OPTION', | ||||||||||||||||||||
| 207 | 'POP', | ||||||||||||||||||||
| 208 | 'PUSH', | ||||||||||||||||||||
| 209 | 'RCALL', | ||||||||||||||||||||
| 210 | 'RESET', | ||||||||||||||||||||
| 211 | 'RETFIE', | ||||||||||||||||||||
| 212 | 'RETLW', | ||||||||||||||||||||
| 213 | 'RETURN', | ||||||||||||||||||||
| 214 | 'RLCF', | ||||||||||||||||||||
| 215 | 'RLF', | ||||||||||||||||||||
| 216 | 'RLNCF', | ||||||||||||||||||||
| 217 | 'RRCF', | ||||||||||||||||||||
| 218 | 'RRF', | ||||||||||||||||||||
| 219 | 'RRNCF', | ||||||||||||||||||||
| 220 | 'SETF', | ||||||||||||||||||||
| 221 | 'SLEEP', | ||||||||||||||||||||
| 222 | 'SUBFWB', | ||||||||||||||||||||
| 223 | 'SUBLW', | ||||||||||||||||||||
| 224 | 'SUBWF', | ||||||||||||||||||||
| 225 | 'SUBWFB', | ||||||||||||||||||||
| 226 | 'SWAPF', | ||||||||||||||||||||
| 227 | 'TBLRD', | ||||||||||||||||||||
| 228 | 'TBLWT', | ||||||||||||||||||||
| 229 | 'TSTFSZ', | ||||||||||||||||||||
| 230 | 'XORLW', | ||||||||||||||||||||
| 231 | 'XORWF', | ||||||||||||||||||||
| 232 | 'addlw', | ||||||||||||||||||||
| 233 | 'addwf', | ||||||||||||||||||||
| 234 | 'addwfc', | ||||||||||||||||||||
| 235 | 'andlw', | ||||||||||||||||||||
| 236 | 'andwf', | ||||||||||||||||||||
| 237 | 'bc', | ||||||||||||||||||||
| 238 | 'bcf', | ||||||||||||||||||||
| 239 | 'bn', | ||||||||||||||||||||
| 240 | 'bnc', | ||||||||||||||||||||
| 241 | 'bnov', | ||||||||||||||||||||
| 242 | 'bnz', | ||||||||||||||||||||
| 243 | 'bov', | ||||||||||||||||||||
| 244 | 'bra', | ||||||||||||||||||||
| 245 | 'bsf', | ||||||||||||||||||||
| 246 | 'btfsc', | ||||||||||||||||||||
| 247 | 'btfss', | ||||||||||||||||||||
| 248 | 'btg', | ||||||||||||||||||||
| 249 | 'bz', | ||||||||||||||||||||
| 250 | 'call', | ||||||||||||||||||||
| 251 | 'clrf', | ||||||||||||||||||||
| 252 | 'clrw', | ||||||||||||||||||||
| 253 | 'clrwdt', | ||||||||||||||||||||
| 254 | 'comf', | ||||||||||||||||||||
| 255 | 'cpfseq', | ||||||||||||||||||||
| 256 | 'cpfsgt', | ||||||||||||||||||||
| 257 | 'cpfslt', | ||||||||||||||||||||
| 258 | 'daw', | ||||||||||||||||||||
| 259 | 'dcfsnz', | ||||||||||||||||||||
| 260 | 'decf', | ||||||||||||||||||||
| 261 | 'decfsz', | ||||||||||||||||||||
| 262 | 'goto', | ||||||||||||||||||||
| 263 | 'incf', | ||||||||||||||||||||
| 264 | 'incfsz', | ||||||||||||||||||||
| 265 | 'infsnz', | ||||||||||||||||||||
| 266 | 'iorlw', | ||||||||||||||||||||
| 267 | 'iorwf', | ||||||||||||||||||||
| 268 | 'lfsr', | ||||||||||||||||||||
| 269 | 'movf', | ||||||||||||||||||||
| 270 | 'movff', | ||||||||||||||||||||
| 271 | 'movlb', | ||||||||||||||||||||
| 272 | 'movlw', | ||||||||||||||||||||
| 273 | 'movwf', | ||||||||||||||||||||
| 274 | 'mullw', | ||||||||||||||||||||
| 275 | 'mulwf', | ||||||||||||||||||||
| 276 | 'negf', | ||||||||||||||||||||
| 277 | 'nop', | ||||||||||||||||||||
| 278 | 'option', | ||||||||||||||||||||
| 279 | 'pop', | ||||||||||||||||||||
| 280 | 'push', | ||||||||||||||||||||
| 281 | 'rcall', | ||||||||||||||||||||
| 282 | 'reset', | ||||||||||||||||||||
| 283 | 'retfie', | ||||||||||||||||||||
| 284 | 'retlw', | ||||||||||||||||||||
| 285 | 'return', | ||||||||||||||||||||
| 286 | 'rlcf', | ||||||||||||||||||||
| 287 | 'rlf', | ||||||||||||||||||||
| 288 | 'rlncf', | ||||||||||||||||||||
| 289 | 'rrcf', | ||||||||||||||||||||
| 290 | 'rrf', | ||||||||||||||||||||
| 291 | 'rrncf', | ||||||||||||||||||||
| 292 | 'setf', | ||||||||||||||||||||
| 293 | 'sleep', | ||||||||||||||||||||
| 294 | 'subfwb', | ||||||||||||||||||||
| 295 | 'sublw', | ||||||||||||||||||||
| 296 | 'subwf', | ||||||||||||||||||||
| 297 | 'subwfb', | ||||||||||||||||||||
| 298 | 'swapf', | ||||||||||||||||||||
| 299 | 'tblrd', | ||||||||||||||||||||
| 300 | 'tblwt', | ||||||||||||||||||||
| 301 | 'tstfsz', | ||||||||||||||||||||
| 302 | 'xorlw', | ||||||||||||||||||||
| 303 | 'xorwf', | ||||||||||||||||||||
| 304 | ); | ||||||||||||||||||||
| 305 | 2 | $self->contextdata({ | |||||||||||||||||||
| 306 | 'ASCIIChar' => { | ||||||||||||||||||||
| 307 | callback => \&parseASCIIChar, | ||||||||||||||||||||
| 308 | attribute => 'Char', | ||||||||||||||||||||
| 309 | lineending => '#pop', | ||||||||||||||||||||
| 310 | }, | ||||||||||||||||||||
| 311 | 'QuotedNumError' => { | ||||||||||||||||||||
| 312 | callback => \&parseQuotedNumError, | ||||||||||||||||||||
| 313 | attribute => 'Error', | ||||||||||||||||||||
| 314 | lineending => '#pop#pop', | ||||||||||||||||||||
| 315 | }, | ||||||||||||||||||||
| 316 | 'binaryDigits' => { | ||||||||||||||||||||
| 317 | callback => \&parsebinaryDigits, | ||||||||||||||||||||
| 318 | attribute => 'Based Numbers', | ||||||||||||||||||||
| 319 | lineending => '#pop', | ||||||||||||||||||||
| 320 | }, | ||||||||||||||||||||
| 321 | 'comment' => { | ||||||||||||||||||||
| 322 | callback => \&parsecomment, | ||||||||||||||||||||
| 323 | attribute => 'Comment', | ||||||||||||||||||||
| 324 | lineending => '#pop', | ||||||||||||||||||||
| 325 | }, | ||||||||||||||||||||
| 326 | 'decimalDigits' => { | ||||||||||||||||||||
| 327 | callback => \&parsedecimalDigits, | ||||||||||||||||||||
| 328 | attribute => 'Based Numbers', | ||||||||||||||||||||
| 329 | lineending => '#pop', | ||||||||||||||||||||
| 330 | }, | ||||||||||||||||||||
| 331 | 'hexDigits' => { | ||||||||||||||||||||
| 332 | callback => \&parsehexDigits, | ||||||||||||||||||||
| 333 | attribute => 'Based Numbers', | ||||||||||||||||||||
| 334 | lineending => '#pop', | ||||||||||||||||||||
| 335 | }, | ||||||||||||||||||||
| 336 | 'normal' => { | ||||||||||||||||||||
| 337 | callback => \&parsenormal, | ||||||||||||||||||||
| 338 | attribute => 'Normal Text', | ||||||||||||||||||||
| 339 | }, | ||||||||||||||||||||
| 340 | 'octDigits' => { | ||||||||||||||||||||
| 341 | callback => \&parseoctDigits, | ||||||||||||||||||||
| 342 | attribute => 'Based Numbers', | ||||||||||||||||||||
| 343 | lineending => '#pop', | ||||||||||||||||||||
| 344 | }, | ||||||||||||||||||||
| 345 | 'string' => { | ||||||||||||||||||||
| 346 | callback => \&parsestring, | ||||||||||||||||||||
| 347 | attribute => 'String', | ||||||||||||||||||||
| 348 | lineending => '#pop', | ||||||||||||||||||||
| 349 | }, | ||||||||||||||||||||
| 350 | }); | ||||||||||||||||||||
| 351 | 2 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 352 | 2 | $self->basecontext('normal'); | |||||||||||||||||||
| 353 | 2 | $self->keywordscase(0); | |||||||||||||||||||
| 354 | 2 | $self->initialize; | |||||||||||||||||||
| 355 | 2 | bless ($self, $class); | |||||||||||||||||||
| 356 | 2 | return $self; | |||||||||||||||||||
| 357 | } | ||||||||||||||||||||
| 358 | |||||||||||||||||||||
| 359 | 0 | ▶ | sub language { | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 360 | 0 | return 'PicAsm'; | |||||||||||||||||||
| 361 | } | ||||||||||||||||||||
| 362 | |||||||||||||||||||||
| 363 | 0 | ▶ | sub parseASCIIChar { | ||||||||||||||||||
|
Subroutine
parseASCIIChar: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 364 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 365 | # attribute => 'Char' | ||||||||||||||||||||
| 366 | # char => ''' | ||||||||||||||||||||
| 367 | # context => '#pop' | ||||||||||||||||||||
| 368 | # type => 'DetectChar' | ||||||||||||||||||||
| 369 | 0 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 370 | 0 | return 1 | |||||||||||||||||||
| 371 | } | ||||||||||||||||||||
| 372 | # String => '.[^']' | ||||||||||||||||||||
| 373 | # attribute => 'Error' | ||||||||||||||||||||
| 374 | # context => 'QuotedNumError' | ||||||||||||||||||||
| 375 | # type => 'RegExpr' | ||||||||||||||||||||
| 376 | 0 | ▶ | if ($self->testRegExpr($text, '.[^\']', 0, 0, 0, undef, 0, 'QuotedNumError', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 377 | 0 | return 1 | |||||||||||||||||||
| 378 | } | ||||||||||||||||||||
| 379 | 0 | return 0; | |||||||||||||||||||
| 380 | }; | ||||||||||||||||||||
| 381 | |||||||||||||||||||||
| 382 | 0 | ▶ | sub parseQuotedNumError { | ||||||||||||||||||
|
Subroutine
parseQuotedNumError: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 383 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 384 | # attribute => 'Error' | ||||||||||||||||||||
| 385 | # char => ''' | ||||||||||||||||||||
| 386 | # context => '#pop#pop' | ||||||||||||||||||||
| 387 | # type => 'DetectChar' | ||||||||||||||||||||
| 388 | 0 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop#pop', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 389 | 0 | return 1 | |||||||||||||||||||
| 390 | } | ||||||||||||||||||||
| 391 | 0 | return 0; | |||||||||||||||||||
| 392 | }; | ||||||||||||||||||||
| 393 | |||||||||||||||||||||
| 394 | 62 | ▶ | sub parsebinaryDigits { | ||||||||||||||||||
|
Subroutine
parsebinaryDigits: called CC=3 SCAR=11.2
Pod
undocumented
| |||||||||||||||||||||
| 395 | 62 | my ($self, $text) = @_; | |||||||||||||||||||
| 396 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 397 | # char => ''' | ||||||||||||||||||||
| 398 | # context => '#pop' | ||||||||||||||||||||
| 399 | # type => 'DetectChar' | ||||||||||||||||||||
| 400 | 62 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 401 | 6 | return 1 | |||||||||||||||||||
| 402 | } | ||||||||||||||||||||
| 403 | # String => '[^0-1]' | ||||||||||||||||||||
| 404 | # attribute => 'Error' | ||||||||||||||||||||
| 405 | # context => 'QuotedNumError' | ||||||||||||||||||||
| 406 | # type => 'RegExpr' | ||||||||||||||||||||
| 407 | 56 | ▶ | if ($self->testRegExpr($text, '[^0-1]', 0, 0, 0, undef, 0, 'QuotedNumError', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 408 | 0 | return 1 | |||||||||||||||||||
| 409 | } | ||||||||||||||||||||
| 410 | 56 | return 0; | |||||||||||||||||||
| 411 | }; | ||||||||||||||||||||
| 412 | |||||||||||||||||||||
| 413 | 7336 | ▶ | sub parsecomment { | ||||||||||||||||||
|
Subroutine
parsecomment: called CC=3 SCAR=12.7
Pod
undocumented
| |||||||||||||||||||||
| 414 | 7336 | my ($self, $text) = @_; | |||||||||||||||||||
| 415 | # String => '(INPUT|OUTPUT|PARAMETERS|AUTHOR|EMAIL)' | ||||||||||||||||||||
| 416 | # attribute => 'Instructions' | ||||||||||||||||||||
| 417 | # context => '#stay' | ||||||||||||||||||||
| 418 | # type => 'RegExpr' | ||||||||||||||||||||
| 419 | 7336 | ▶ | if ($self->testRegExpr($text, '(INPUT|OUTPUT|PARAMETERS|AUTHOR|EMAIL)', 0, 0, 0, undef, 0, '#stay', 'Instructions')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 420 | 0 | return 1 | |||||||||||||||||||
| 421 | } | ||||||||||||||||||||
| 422 | # String => '(FIXME|TODO)' | ||||||||||||||||||||
| 423 | # attribute => 'Alert' | ||||||||||||||||||||
| 424 | # context => '#stay' | ||||||||||||||||||||
| 425 | # type => 'RegExpr' | ||||||||||||||||||||
| 426 | 7336 | ▶ | if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 427 | 0 | return 1 | |||||||||||||||||||
| 428 | } | ||||||||||||||||||||
| 429 | 7336 | return 0; | |||||||||||||||||||
| 430 | }; | ||||||||||||||||||||
| 431 | |||||||||||||||||||||
| 432 | 76 | ▶ | sub parsedecimalDigits { | ||||||||||||||||||
|
Subroutine
parsedecimalDigits: called CC=3 SCAR=11.2
Pod
undocumented
| |||||||||||||||||||||
| 433 | 76 | my ($self, $text) = @_; | |||||||||||||||||||
| 434 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 435 | # char => ''' | ||||||||||||||||||||
| 436 | # context => '#pop' | ||||||||||||||||||||
| 437 | # type => 'DetectChar' | ||||||||||||||||||||
| 438 | 76 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 439 | 22 | return 1 | |||||||||||||||||||
| 440 | } | ||||||||||||||||||||
| 441 | # String => '\D' | ||||||||||||||||||||
| 442 | # attribute => 'Error' | ||||||||||||||||||||
| 443 | # context => 'QuotedNumError' | ||||||||||||||||||||
| 444 | # type => 'RegExpr' | ||||||||||||||||||||
| 445 | 54 | ▶ | if ($self->testRegExpr($text, '\\D', 0, 0, 0, undef, 0, 'QuotedNumError', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 446 | 0 | return 1 | |||||||||||||||||||
| 447 | } | ||||||||||||||||||||
| 448 | 54 | return 0; | |||||||||||||||||||
| 449 | }; | ||||||||||||||||||||
| 450 | |||||||||||||||||||||
| 451 | 0 | ▶ | sub parsehexDigits { | ||||||||||||||||||
|
Subroutine
parsehexDigits: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 452 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 453 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 454 | # char => ''' | ||||||||||||||||||||
| 455 | # context => '#pop' | ||||||||||||||||||||
| 456 | # type => 'DetectChar' | ||||||||||||||||||||
| 457 | 0 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 458 | 0 | return 1 | |||||||||||||||||||
| 459 | } | ||||||||||||||||||||
| 460 | # String => '[^0-9A-Fa-f]' | ||||||||||||||||||||
| 461 | # attribute => 'Error' | ||||||||||||||||||||
| 462 | # context => 'QuotedNumError' | ||||||||||||||||||||
| 463 | # type => 'RegExpr' | ||||||||||||||||||||
| 464 | 0 | ▶ | if ($self->testRegExpr($text, '[^0-9A-Fa-f]', 0, 0, 0, undef, 0, 'QuotedNumError', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 465 | 0 | return 1 | |||||||||||||||||||
| 466 | } | ||||||||||||||||||||
| 467 | 0 | return 0; | |||||||||||||||||||
| 468 | }; | ||||||||||||||||||||
| 469 | |||||||||||||||||||||
| 470 | 4276 | ▶ | sub parsenormal { | ||||||||||||||||||
|
Subroutine
parsenormal: called CC=30 SCAR=40.2
Pod
undocumented
| |||||||||||||||||||||
| 471 | 4276 | my ($self, $text) = @_; | |||||||||||||||||||
| 472 | # String => 'directives' | ||||||||||||||||||||
| 473 | # attribute => 'Directives' | ||||||||||||||||||||
| 474 | # context => '#stay' | ||||||||||||||||||||
| 475 | # type => 'keyword' | ||||||||||||||||||||
| 476 | 4276 | ▶ | if ($self->testKeyword($text, 'directives', 0, undef, 0, '#stay', 'Directives')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 477 | 78 | return 1 | |||||||||||||||||||
| 478 | } | ||||||||||||||||||||
| 479 | # String => 'instructions' | ||||||||||||||||||||
| 480 | # attribute => 'Instructions' | ||||||||||||||||||||
| 481 | # context => '#stay' | ||||||||||||||||||||
| 482 | # type => 'keyword' | ||||||||||||||||||||
| 483 | 4198 | ▶ | if ($self->testKeyword($text, 'instructions', 0, undef, 0, '#stay', 'Instructions')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 484 | 198 | return 1 | |||||||||||||||||||
| 485 | } | ||||||||||||||||||||
| 486 | # String => 'instruction_attr' | ||||||||||||||||||||
| 487 | # attribute => 'InstructionAttr' | ||||||||||||||||||||
| 488 | # context => '#stay' | ||||||||||||||||||||
| 489 | # type => 'keyword' | ||||||||||||||||||||
| 490 | 4000 | ▶ | if ($self->testKeyword($text, 'instruction_attr', 0, undef, 0, '#stay', 'InstructionAttr')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 491 | 22 | return 1 | |||||||||||||||||||
| 492 | } | ||||||||||||||||||||
| 493 | # String => 'conditional' | ||||||||||||||||||||
| 494 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 495 | # context => '#stay' | ||||||||||||||||||||
| 496 | # type => 'keyword' | ||||||||||||||||||||
| 497 | 3978 | ▶ | if ($self->testKeyword($text, 'conditional', 0, undef, 0, '#stay', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 498 | 2 | return 1 | |||||||||||||||||||
| 499 | } | ||||||||||||||||||||
| 500 | # String => 'gpasm_macro' | ||||||||||||||||||||
| 501 | # attribute => 'GPASM-macros' | ||||||||||||||||||||
| 502 | # context => '#stay' | ||||||||||||||||||||
| 503 | # type => 'keyword' | ||||||||||||||||||||
| 504 | 3976 | ▶ | if ($self->testKeyword($text, 'gpasm_macro', 0, undef, 0, '#stay', 'GPASM-macros')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 505 | 0 | return 1 | |||||||||||||||||||
| 506 | } | ||||||||||||||||||||
| 507 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 508 | # context => '#stay' | ||||||||||||||||||||
| 509 | # type => 'HlCHex' | ||||||||||||||||||||
| 510 | 3976 | ▶ | if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 511 | 6 | return 1 | |||||||||||||||||||
| 512 | } | ||||||||||||||||||||
| 513 | # String => '([ \t,][0-9A-F]+H[ \t,])' | ||||||||||||||||||||
| 514 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 515 | # context => '#stay' | ||||||||||||||||||||
| 516 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 517 | # type => 'RegExpr' | ||||||||||||||||||||
| 518 | 3970 | ▶ | if ($self->testRegExpr($text, '([ \\t,][0-9A-F]+H[ \\t,])', 1, 0, 0, undef, 0, '#stay', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 519 | 0 | return 1 | |||||||||||||||||||
| 520 | } | ||||||||||||||||||||
| 521 | # String => '([ \t,][0-9A-F]+H)$' | ||||||||||||||||||||
| 522 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 523 | # context => '#stay' | ||||||||||||||||||||
| 524 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 525 | # type => 'RegExpr' | ||||||||||||||||||||
| 526 | 3970 | ▶ | if ($self->testRegExpr($text, '([ \\t,][0-9A-F]+H)$', 1, 0, 0, undef, 0, '#stay', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 527 | 0 | return 1 | |||||||||||||||||||
| 528 | } | ||||||||||||||||||||
| 529 | # String => '([ \t,][0-9]+D)' | ||||||||||||||||||||
| 530 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 531 | # context => '#stay' | ||||||||||||||||||||
| 532 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 533 | # type => 'RegExpr' | ||||||||||||||||||||
| 534 | 3970 | ▶ | if ($self->testRegExpr($text, '([ \\t,][0-9]+D)', 1, 0, 0, undef, 0, '#stay', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 535 | 0 | return 1 | |||||||||||||||||||
| 536 | } | ||||||||||||||||||||
| 537 | # String => '([ \t,][0-7]+O)' | ||||||||||||||||||||
| 538 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 539 | # context => '#stay' | ||||||||||||||||||||
| 540 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 541 | # type => 'RegExpr' | ||||||||||||||||||||
| 542 | 3970 | ▶ | if ($self->testRegExpr($text, '([ \\t,][0-7]+O)', 1, 0, 0, undef, 0, '#stay', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 543 | 0 | return 1 | |||||||||||||||||||
| 544 | } | ||||||||||||||||||||
| 545 | # String => '([ \t,][0-1]+B)' | ||||||||||||||||||||
| 546 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 547 | # context => '#stay' | ||||||||||||||||||||
| 548 | # insensitive => 'TRUE' | ||||||||||||||||||||
| 549 | # type => 'RegExpr' | ||||||||||||||||||||
| 550 | 3970 | ▶ | if ($self->testRegExpr($text, '([ \\t,][0-1]+B)', 1, 0, 0, undef, 0, '#stay', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 551 | 0 | return 1 | |||||||||||||||||||
| 552 | } | ||||||||||||||||||||
| 553 | # attribute => 'Unbased Numbers' | ||||||||||||||||||||
| 554 | # context => '#stay' | ||||||||||||||||||||
| 555 | # type => 'Int' | ||||||||||||||||||||
| 556 | 3970 | ▶ | if ($self->testInt($text, 0, undef, 0, '#stay', 'Unbased Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 557 | 40 | return 1 | |||||||||||||||||||
| 558 | } | ||||||||||||||||||||
| 559 | # attribute => 'Char' | ||||||||||||||||||||
| 560 | # context => '#stay' | ||||||||||||||||||||
| 561 | # type => 'HlCChar' | ||||||||||||||||||||
| 562 | 3930 | ▶ | if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 563 | 0 | return 1 | |||||||||||||||||||
| 564 | } | ||||||||||||||||||||
| 565 | # attribute => 'Char' | ||||||||||||||||||||
| 566 | # char => 'A' | ||||||||||||||||||||
| 567 | # char1 => ''' | ||||||||||||||||||||
| 568 | # context => 'ASCIIChar' | ||||||||||||||||||||
| 569 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 570 | 3930 | ▶ | if ($self->testDetect2Chars($text, 'A', '\'', 0, 0, 0, undef, 0, 'ASCIIChar', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 571 | 0 | return 1 | |||||||||||||||||||
| 572 | } | ||||||||||||||||||||
| 573 | # attribute => 'Char' | ||||||||||||||||||||
| 574 | # char => 'a' | ||||||||||||||||||||
| 575 | # char1 => ''' | ||||||||||||||||||||
| 576 | # context => 'ASCIIChar' | ||||||||||||||||||||
| 577 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 578 | 3930 | ▶ | if ($self->testDetect2Chars($text, 'a', '\'', 0, 0, 0, undef, 0, 'ASCIIChar', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 579 | 0 | return 1 | |||||||||||||||||||
| 580 | } | ||||||||||||||||||||
| 581 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 582 | # char => 'B' | ||||||||||||||||||||
| 583 | # char1 => ''' | ||||||||||||||||||||
| 584 | # context => 'binaryDigits' | ||||||||||||||||||||
| 585 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 586 | 3930 | ▶ | if ($self->testDetect2Chars($text, 'B', '\'', 0, 0, 0, undef, 0, 'binaryDigits', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 587 | 6 | return 1 | |||||||||||||||||||
| 588 | } | ||||||||||||||||||||
| 589 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 590 | # char => 'b' | ||||||||||||||||||||
| 591 | # char1 => ''' | ||||||||||||||||||||
| 592 | # context => 'binaryDigits' | ||||||||||||||||||||
| 593 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 594 | 3924 | ▶ | if ($self->testDetect2Chars($text, 'b', '\'', 0, 0, 0, undef, 0, 'binaryDigits', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 595 | 0 | return 1 | |||||||||||||||||||
| 596 | } | ||||||||||||||||||||
| 597 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 598 | # char => 'H' | ||||||||||||||||||||
| 599 | # char1 => ''' | ||||||||||||||||||||
| 600 | # context => 'hexDigits' | ||||||||||||||||||||
| 601 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 602 | 3924 | ▶ | if ($self->testDetect2Chars($text, 'H', '\'', 0, 0, 0, undef, 0, 'hexDigits', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 603 | 0 | return 1 | |||||||||||||||||||
| 604 | } | ||||||||||||||||||||
| 605 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 606 | # char => 'h' | ||||||||||||||||||||
| 607 | # char1 => ''' | ||||||||||||||||||||
| 608 | # context => 'hexDigits' | ||||||||||||||||||||
| 609 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 610 | 3924 | ▶ | if ($self->testDetect2Chars($text, 'h', '\'', 0, 0, 0, undef, 0, 'hexDigits', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 611 | 0 | return 1 | |||||||||||||||||||
| 612 | } | ||||||||||||||||||||
| 613 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 614 | # char => 'O' | ||||||||||||||||||||
| 615 | # char1 => ''' | ||||||||||||||||||||
| 616 | # context => 'octDigits' | ||||||||||||||||||||
| 617 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 618 | 3924 | ▶ | if ($self->testDetect2Chars($text, 'O', '\'', 0, 0, 0, undef, 0, 'octDigits', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 619 | 0 | return 1 | |||||||||||||||||||
| 620 | } | ||||||||||||||||||||
| 621 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 622 | # char => 'o' | ||||||||||||||||||||
| 623 | # char1 => ''' | ||||||||||||||||||||
| 624 | # context => 'octDigits' | ||||||||||||||||||||
| 625 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 626 | 3924 | ▶ | if ($self->testDetect2Chars($text, 'o', '\'', 0, 0, 0, undef, 0, 'octDigits', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 627 | 0 | return 1 | |||||||||||||||||||
| 628 | } | ||||||||||||||||||||
| 629 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 630 | # char => 'D' | ||||||||||||||||||||
| 631 | # char1 => ''' | ||||||||||||||||||||
| 632 | # context => 'decimalDigits' | ||||||||||||||||||||
| 633 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 634 | 3924 | ▶ | if ($self->testDetect2Chars($text, 'D', '\'', 0, 0, 0, undef, 0, 'decimalDigits', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 635 | 22 | return 1 | |||||||||||||||||||
| 636 | } | ||||||||||||||||||||
| 637 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 638 | # char => 'd' | ||||||||||||||||||||
| 639 | # char1 => ''' | ||||||||||||||||||||
| 640 | # context => 'decimalDigits' | ||||||||||||||||||||
| 641 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 642 | 3902 | ▶ | if ($self->testDetect2Chars($text, 'd', '\'', 0, 0, 0, undef, 0, 'decimalDigits', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 643 | 0 | return 1 | |||||||||||||||||||
| 644 | } | ||||||||||||||||||||
| 645 | # attribute => 'String' | ||||||||||||||||||||
| 646 | # char => '"' | ||||||||||||||||||||
| 647 | # context => 'string' | ||||||||||||||||||||
| 648 | # type => 'DetectChar' | ||||||||||||||||||||
| 649 | 3902 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 650 | 2 | return 1 | |||||||||||||||||||
| 651 | } | ||||||||||||||||||||
| 652 | # attribute => 'Comment' | ||||||||||||||||||||
| 653 | # char => ';' | ||||||||||||||||||||
| 654 | # context => 'comment' | ||||||||||||||||||||
| 655 | # type => 'DetectChar' | ||||||||||||||||||||
| 656 | 3900 | ▶ | if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, 'comment', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 657 | 262 | return 1 | |||||||||||||||||||
| 658 | } | ||||||||||||||||||||
| 659 | # String => '-/*%+=><&|^!~' | ||||||||||||||||||||
| 660 | # attribute => 'Symbol' | ||||||||||||||||||||
| 661 | # context => '#stay' | ||||||||||||||||||||
| 662 | # type => 'AnyChar' | ||||||||||||||||||||
| 663 | 3638 | ▶ | if ($self->testAnyChar($text, '-/*%+=><&|^!~', 0, 0, undef, 0, '#stay', 'Symbol')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 664 | 28 | return 1 | |||||||||||||||||||
| 665 | } | ||||||||||||||||||||
| 666 | # String => '#define' | ||||||||||||||||||||
| 667 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 668 | # context => '#stay' | ||||||||||||||||||||
| 669 | # type => 'StringDetect' | ||||||||||||||||||||
| 670 | 3610 | ▶ | if ($self->testStringDetect($text, '#define', 0, 0, 0, undef, 0, '#stay', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 671 | 0 | return 1 | |||||||||||||||||||
| 672 | } | ||||||||||||||||||||
| 673 | # String => '#undefine' | ||||||||||||||||||||
| 674 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 675 | # context => '#stay' | ||||||||||||||||||||
| 676 | # type => 'StringDetect' | ||||||||||||||||||||
| 677 | 3610 | ▶ | if ($self->testStringDetect($text, '#undefine', 0, 0, 0, undef, 0, '#stay', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 678 | 0 | return 1 | |||||||||||||||||||
| 679 | } | ||||||||||||||||||||
| 680 | # String => '#v' | ||||||||||||||||||||
| 681 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 682 | # context => '#stay' | ||||||||||||||||||||
| 683 | # type => 'StringDetect' | ||||||||||||||||||||
| 684 | 3610 | ▶ | if ($self->testStringDetect($text, '#v', 0, 0, 0, undef, 0, '#stay', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 685 | 0 | return 1 | |||||||||||||||||||
| 686 | } | ||||||||||||||||||||
| 687 | 3610 | return 0; | |||||||||||||||||||
| 688 | }; | ||||||||||||||||||||
| 689 | |||||||||||||||||||||
| 690 | 0 | ▶ | sub parseoctDigits { | ||||||||||||||||||
|
Subroutine
parseoctDigits: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 691 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 692 | # attribute => 'Based Numbers' | ||||||||||||||||||||
| 693 | # char => ''' | ||||||||||||||||||||
| 694 | # context => '#pop' | ||||||||||||||||||||
| 695 | # type => 'DetectChar' | ||||||||||||||||||||
| 696 | 0 | ▶ | if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Based Numbers')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 697 | 0 | return 1 | |||||||||||||||||||
| 698 | } | ||||||||||||||||||||
| 699 | # String => '[^0-7]' | ||||||||||||||||||||
| 700 | # attribute => 'Error' | ||||||||||||||||||||
| 701 | # context => 'QuotedNumError' | ||||||||||||||||||||
| 702 | # type => 'RegExpr' | ||||||||||||||||||||
| 703 | 0 | ▶ | if ($self->testRegExpr($text, '[^0-7]', 0, 0, 0, undef, 0, 'QuotedNumError', 'Error')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 704 | 0 | return 1 | |||||||||||||||||||
| 705 | } | ||||||||||||||||||||
| 706 | 0 | return 0; | |||||||||||||||||||
| 707 | }; | ||||||||||||||||||||
| 708 | |||||||||||||||||||||
| 709 | 24 | ▶ | sub parsestring { | ||||||||||||||||||
|
Subroutine
parsestring: called CC=4 SCAR=14.8
Pod
undocumented
| |||||||||||||||||||||
| 710 | 24 | my ($self, $text) = @_; | |||||||||||||||||||
| 711 | # attribute => 'String' | ||||||||||||||||||||
| 712 | # context => '#stay' | ||||||||||||||||||||
| 713 | # type => 'LineContinue' | ||||||||||||||||||||
| 714 | 24 | ▶ | if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 715 | 0 | return 1 | |||||||||||||||||||
| 716 | } | ||||||||||||||||||||
| 717 | # attribute => 'Char' | ||||||||||||||||||||
| 718 | # context => '#stay' | ||||||||||||||||||||
| 719 | # type => 'HlCStringChar' | ||||||||||||||||||||
| 720 | 24 | ▶ | if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 721 | 0 | return 1 | |||||||||||||||||||
| 722 | } | ||||||||||||||||||||
| 723 | # attribute => 'String' | ||||||||||||||||||||
| 724 | # char => '"' | ||||||||||||||||||||
| 725 | # context => '#pop' | ||||||||||||||||||||
| 726 | # type => 'DetectChar' | ||||||||||||||||||||
| 727 | 24 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 728 | 2 | return 1 | |||||||||||||||||||
| 729 | } | ||||||||||||||||||||
| 730 | 22 | return 0; | |||||||||||||||||||
| 731 | }; | ||||||||||||||||||||
| 732 | |||||||||||||||||||||
| 733 | |||||||||||||||||||||
| 734 | 1 | 1; | |||||||||||||||||||
| 735 | |||||||||||||||||||||
| 736 | __END__ | ||||||||||||||||||||