| 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 'glsl.xml' file of the syntax highlight | ||||||||||||||||||||
| 6 | # engine of the kate text editor (http://www.kate-editor.org | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | #kate xml version 1.02 | ||||||||||||||||||||
| 9 | #kate version 2.4 | ||||||||||||||||||||
| 10 | #kate author Oliver Richers (o.richers@tu-bs.de) | ||||||||||||||||||||
| 11 | #generated: Sun Feb 3 22:02:05 2008, localtime | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | package Syntax::Highlight::Engine::Kate::GLSL; | ||||||||||||||||||||
| 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 | 'Alert' => 'Alert', | ||||||||||||||||||||
| 27 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 28 | 'Data Type' => 'DataType', | ||||||||||||||||||||
| 29 | 'Decimal' => 'DecVal', | ||||||||||||||||||||
| 30 | 'Float' => 'Float', | ||||||||||||||||||||
| 31 | 'Function' => 'Function', | ||||||||||||||||||||
| 32 | 'Hex' => 'BaseN', | ||||||||||||||||||||
| 33 | 'Keyword' => 'Keyword', | ||||||||||||||||||||
| 34 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 35 | 'Octal' => 'BaseN', | ||||||||||||||||||||
| 36 | 'Preprocessor' => 'Others', | ||||||||||||||||||||
| 37 | 'StdFunction' => 'Function', | ||||||||||||||||||||
| 38 | 'StdVariable' => 'Function', | ||||||||||||||||||||
| 39 | 'Symbol' => 'Normal', | ||||||||||||||||||||
| 40 | 'Type Qualifier' => 'DataType', | ||||||||||||||||||||
| 41 | }); | ||||||||||||||||||||
| 42 | 2 | $self->listAdd('attention', | |||||||||||||||||||
| 43 | 'BUG', | ||||||||||||||||||||
| 44 | 'FIXME', | ||||||||||||||||||||
| 45 | 'TODO', | ||||||||||||||||||||
| 46 | ); | ||||||||||||||||||||
| 47 | 2 | $self->listAdd('keywords', | |||||||||||||||||||
| 48 | 'break', | ||||||||||||||||||||
| 49 | 'continue', | ||||||||||||||||||||
| 50 | 'discard', | ||||||||||||||||||||
| 51 | 'do', | ||||||||||||||||||||
| 52 | 'else', | ||||||||||||||||||||
| 53 | 'false', | ||||||||||||||||||||
| 54 | 'for', | ||||||||||||||||||||
| 55 | 'if', | ||||||||||||||||||||
| 56 | 'return', | ||||||||||||||||||||
| 57 | 'struct', | ||||||||||||||||||||
| 58 | 'true', | ||||||||||||||||||||
| 59 | 'while', | ||||||||||||||||||||
| 60 | ); | ||||||||||||||||||||
| 61 | 2 | $self->listAdd('stdlib', | |||||||||||||||||||
| 62 | 'abs', | ||||||||||||||||||||
| 63 | 'acos', | ||||||||||||||||||||
| 64 | 'all', | ||||||||||||||||||||
| 65 | 'any', | ||||||||||||||||||||
| 66 | 'asin', | ||||||||||||||||||||
| 67 | 'atan', | ||||||||||||||||||||
| 68 | 'ceil', | ||||||||||||||||||||
| 69 | 'clamp', | ||||||||||||||||||||
| 70 | 'cos', | ||||||||||||||||||||
| 71 | 'cross', | ||||||||||||||||||||
| 72 | 'dFdx', | ||||||||||||||||||||
| 73 | 'dFdy', | ||||||||||||||||||||
| 74 | 'degrees', | ||||||||||||||||||||
| 75 | 'distance', | ||||||||||||||||||||
| 76 | 'dot', | ||||||||||||||||||||
| 77 | 'equal', | ||||||||||||||||||||
| 78 | 'exp', | ||||||||||||||||||||
| 79 | 'exp2', | ||||||||||||||||||||
| 80 | 'faceforward', | ||||||||||||||||||||
| 81 | 'floor', | ||||||||||||||||||||
| 82 | 'fract', | ||||||||||||||||||||
| 83 | 'ftransform', | ||||||||||||||||||||
| 84 | 'fwidth', | ||||||||||||||||||||
| 85 | 'greaterThan', | ||||||||||||||||||||
| 86 | 'greaterThanEqual', | ||||||||||||||||||||
| 87 | 'inversesqrt', | ||||||||||||||||||||
| 88 | 'length', | ||||||||||||||||||||
| 89 | 'lessThan', | ||||||||||||||||||||
| 90 | 'lessThenEqual', | ||||||||||||||||||||
| 91 | 'log', | ||||||||||||||||||||
| 92 | 'log2', | ||||||||||||||||||||
| 93 | 'matrixCompMult', | ||||||||||||||||||||
| 94 | 'max', | ||||||||||||||||||||
| 95 | 'min', | ||||||||||||||||||||
| 96 | 'mix', | ||||||||||||||||||||
| 97 | 'mod', | ||||||||||||||||||||
| 98 | 'noise1', | ||||||||||||||||||||
| 99 | 'noise2', | ||||||||||||||||||||
| 100 | 'noise3', | ||||||||||||||||||||
| 101 | 'noise4', | ||||||||||||||||||||
| 102 | 'normalize', | ||||||||||||||||||||
| 103 | 'not', | ||||||||||||||||||||
| 104 | 'notEqual', | ||||||||||||||||||||
| 105 | 'pow', | ||||||||||||||||||||
| 106 | 'radians', | ||||||||||||||||||||
| 107 | 'reflect', | ||||||||||||||||||||
| 108 | 'refract', | ||||||||||||||||||||
| 109 | 'shadow1D', | ||||||||||||||||||||
| 110 | 'shadow1DLod', | ||||||||||||||||||||
| 111 | 'shadow1DProj', | ||||||||||||||||||||
| 112 | 'shadow1DProjLod', | ||||||||||||||||||||
| 113 | 'shadow2D', | ||||||||||||||||||||
| 114 | 'shadow2DLod', | ||||||||||||||||||||
| 115 | 'shadow2DProj', | ||||||||||||||||||||
| 116 | 'shadow2DProjLod', | ||||||||||||||||||||
| 117 | 'sign', | ||||||||||||||||||||
| 118 | 'sin', | ||||||||||||||||||||
| 119 | 'smoothstep', | ||||||||||||||||||||
| 120 | 'sqrt', | ||||||||||||||||||||
| 121 | 'step', | ||||||||||||||||||||
| 122 | 'tan', | ||||||||||||||||||||
| 123 | 'texture1D', | ||||||||||||||||||||
| 124 | 'texture1DLod', | ||||||||||||||||||||
| 125 | 'texture1DProj', | ||||||||||||||||||||
| 126 | 'texture1DProjLod', | ||||||||||||||||||||
| 127 | 'texture2D', | ||||||||||||||||||||
| 128 | 'texture2DLod', | ||||||||||||||||||||
| 129 | 'texture2DProj', | ||||||||||||||||||||
| 130 | 'texture2DProjLod', | ||||||||||||||||||||
| 131 | 'texture3D', | ||||||||||||||||||||
| 132 | 'texture3DLod', | ||||||||||||||||||||
| 133 | 'texture3DProj', | ||||||||||||||||||||
| 134 | 'texture3DProjLod', | ||||||||||||||||||||
| 135 | 'textureCube', | ||||||||||||||||||||
| 136 | 'textureCubeLod', | ||||||||||||||||||||
| 137 | ); | ||||||||||||||||||||
| 138 | 2 | $self->listAdd('stdvar', | |||||||||||||||||||
| 139 | 'gl_BackColor', | ||||||||||||||||||||
| 140 | 'gl_BackLightModelProduct', | ||||||||||||||||||||
| 141 | 'gl_BackLightProduct', | ||||||||||||||||||||
| 142 | 'gl_BackMaterial', | ||||||||||||||||||||
| 143 | 'gl_BackSecondaryColor', | ||||||||||||||||||||
| 144 | 'gl_ClipPlane', | ||||||||||||||||||||
| 145 | 'gl_ClipVertex', | ||||||||||||||||||||
| 146 | 'gl_Color', | ||||||||||||||||||||
| 147 | 'gl_Color', | ||||||||||||||||||||
| 148 | 'gl_DepthRange', | ||||||||||||||||||||
| 149 | 'gl_DepthRangeParameters', | ||||||||||||||||||||
| 150 | 'gl_EyePlaneQ', | ||||||||||||||||||||
| 151 | 'gl_EyePlaneR', | ||||||||||||||||||||
| 152 | 'gl_EyePlaneS', | ||||||||||||||||||||
| 153 | 'gl_EyePlaneT', | ||||||||||||||||||||
| 154 | 'gl_Fog', | ||||||||||||||||||||
| 155 | 'gl_FogColor', | ||||||||||||||||||||
| 156 | 'gl_FogFragCoord', | ||||||||||||||||||||
| 157 | 'gl_FogParameters', | ||||||||||||||||||||
| 158 | 'gl_FragColor', | ||||||||||||||||||||
| 159 | 'gl_FragCoord', | ||||||||||||||||||||
| 160 | 'gl_FragData', | ||||||||||||||||||||
| 161 | 'gl_FragDepth', | ||||||||||||||||||||
| 162 | 'gl_FragFacing', | ||||||||||||||||||||
| 163 | 'gl_FrontColor', | ||||||||||||||||||||
| 164 | 'gl_FrontLightModelProduct', | ||||||||||||||||||||
| 165 | 'gl_FrontLightProduct', | ||||||||||||||||||||
| 166 | 'gl_FrontMaterial', | ||||||||||||||||||||
| 167 | 'gl_FrontSecondaryColor', | ||||||||||||||||||||
| 168 | 'gl_LightModel', | ||||||||||||||||||||
| 169 | 'gl_LightModelParameters', | ||||||||||||||||||||
| 170 | 'gl_LightModelProducts', | ||||||||||||||||||||
| 171 | 'gl_LightProducts', | ||||||||||||||||||||
| 172 | 'gl_LightSource', | ||||||||||||||||||||
| 173 | 'gl_LightSourceParameters', | ||||||||||||||||||||
| 174 | 'gl_MaterialParameters', | ||||||||||||||||||||
| 175 | 'gl_MaxClipPlanes', | ||||||||||||||||||||
| 176 | 'gl_MaxCombinedTextureImageUnits', | ||||||||||||||||||||
| 177 | 'gl_MaxDrawBuffers', | ||||||||||||||||||||
| 178 | 'gl_MaxFragmentUniformComponents', | ||||||||||||||||||||
| 179 | 'gl_MaxLights', | ||||||||||||||||||||
| 180 | 'gl_MaxTextureCoords', | ||||||||||||||||||||
| 181 | 'gl_MaxTextureImageUnits', | ||||||||||||||||||||
| 182 | 'gl_MaxTextureUnits', | ||||||||||||||||||||
| 183 | 'gl_MaxVaryingFloats', | ||||||||||||||||||||
| 184 | 'gl_MaxVertexAttributes', | ||||||||||||||||||||
| 185 | 'gl_MaxVertexTextureImageUnits', | ||||||||||||||||||||
| 186 | 'gl_MaxVertexUniformComponents', | ||||||||||||||||||||
| 187 | 'gl_ModelViewMatrix', | ||||||||||||||||||||
| 188 | 'gl_ModelViewMatrixInverse', | ||||||||||||||||||||
| 189 | 'gl_ModelViewMatrixInverseTranspose', | ||||||||||||||||||||
| 190 | 'gl_ModelViewMatrixTranspose', | ||||||||||||||||||||
| 191 | 'gl_ModelViewProjectionMatrix', | ||||||||||||||||||||
| 192 | 'gl_ModelViewProjectionMatrixInverse', | ||||||||||||||||||||
| 193 | 'gl_ModelViewProjectionMatrixInverseTranspose', | ||||||||||||||||||||
| 194 | 'gl_ModelViewProjectionMatrixTranspose', | ||||||||||||||||||||
| 195 | 'gl_MultiTexCoord0', | ||||||||||||||||||||
| 196 | 'gl_MultiTexCoord1', | ||||||||||||||||||||
| 197 | 'gl_MultiTexCoord2', | ||||||||||||||||||||
| 198 | 'gl_MultiTexCoord2', | ||||||||||||||||||||
| 199 | 'gl_MultiTexCoord3', | ||||||||||||||||||||
| 200 | 'gl_MultiTexCoord4', | ||||||||||||||||||||
| 201 | 'gl_MultiTexCoord5', | ||||||||||||||||||||
| 202 | 'gl_MultiTexCoord6', | ||||||||||||||||||||
| 203 | 'gl_MultiTexCoord7', | ||||||||||||||||||||
| 204 | 'gl_NormScale', | ||||||||||||||||||||
| 205 | 'gl_Normal', | ||||||||||||||||||||
| 206 | 'gl_NormalMatrix', | ||||||||||||||||||||
| 207 | 'gl_ObjectPlaneQ', | ||||||||||||||||||||
| 208 | 'gl_ObjectPlaneR', | ||||||||||||||||||||
| 209 | 'gl_ObjectPlaneS', | ||||||||||||||||||||
| 210 | 'gl_ObjectPlaneT', | ||||||||||||||||||||
| 211 | 'gl_Point', | ||||||||||||||||||||
| 212 | 'gl_PointParameters', | ||||||||||||||||||||
| 213 | 'gl_PointSize', | ||||||||||||||||||||
| 214 | 'gl_Position', | ||||||||||||||||||||
| 215 | 'gl_ProjectionMatrix', | ||||||||||||||||||||
| 216 | 'gl_ProjectionMatrixInverse', | ||||||||||||||||||||
| 217 | 'gl_ProjectionMatrixInverseTranspose', | ||||||||||||||||||||
| 218 | 'gl_ProjectionMatrixTranspose', | ||||||||||||||||||||
| 219 | 'gl_SecondaryColor', | ||||||||||||||||||||
| 220 | 'gl_SecondaryColor', | ||||||||||||||||||||
| 221 | 'gl_TexCoord', | ||||||||||||||||||||
| 222 | 'gl_TextureEnvColor', | ||||||||||||||||||||
| 223 | 'gl_TextureMatrix', | ||||||||||||||||||||
| 224 | 'gl_TextureMatrixInverse', | ||||||||||||||||||||
| 225 | 'gl_TextureMatrixInverseTranspose', | ||||||||||||||||||||
| 226 | 'gl_TextureMatrixTranspose', | ||||||||||||||||||||
| 227 | 'gl_Vertex', | ||||||||||||||||||||
| 228 | ); | ||||||||||||||||||||
| 229 | 2 | $self->listAdd('typequal', | |||||||||||||||||||
| 230 | 'attribute', | ||||||||||||||||||||
| 231 | 'const', | ||||||||||||||||||||
| 232 | 'in', | ||||||||||||||||||||
| 233 | 'inout', | ||||||||||||||||||||
| 234 | 'out', | ||||||||||||||||||||
| 235 | 'uniform', | ||||||||||||||||||||
| 236 | 'varying', | ||||||||||||||||||||
| 237 | ); | ||||||||||||||||||||
| 238 | 2 | $self->listAdd('types', | |||||||||||||||||||
| 239 | 'bool', | ||||||||||||||||||||
| 240 | 'bvec2', | ||||||||||||||||||||
| 241 | 'bvec3', | ||||||||||||||||||||
| 242 | 'bvec4', | ||||||||||||||||||||
| 243 | 'float', | ||||||||||||||||||||
| 244 | 'int', | ||||||||||||||||||||
| 245 | 'ivec2', | ||||||||||||||||||||
| 246 | 'ivec3', | ||||||||||||||||||||
| 247 | 'ivec4', | ||||||||||||||||||||
| 248 | 'mat2', | ||||||||||||||||||||
| 249 | 'mat3', | ||||||||||||||||||||
| 250 | 'mat4', | ||||||||||||||||||||
| 251 | 'sampler1D', | ||||||||||||||||||||
| 252 | 'sampler1DShadow', | ||||||||||||||||||||
| 253 | 'sampler2D', | ||||||||||||||||||||
| 254 | 'sampler2DShadow', | ||||||||||||||||||||
| 255 | 'sampler3D', | ||||||||||||||||||||
| 256 | 'samplerCube', | ||||||||||||||||||||
| 257 | 'vec2', | ||||||||||||||||||||
| 258 | 'vec3', | ||||||||||||||||||||
| 259 | 'vec4', | ||||||||||||||||||||
| 260 | 'void', | ||||||||||||||||||||
| 261 | ); | ||||||||||||||||||||
| 262 | 2 | $self->contextdata({ | |||||||||||||||||||
| 263 | 'Commentar 1' => { | ||||||||||||||||||||
| 264 | callback => \&parseCommentar1, | ||||||||||||||||||||
| 265 | attribute => 'Comment', | ||||||||||||||||||||
| 266 | lineending => '#pop', | ||||||||||||||||||||
| 267 | }, | ||||||||||||||||||||
| 268 | 'Commentar 2' => { | ||||||||||||||||||||
| 269 | callback => \&parseCommentar2, | ||||||||||||||||||||
| 270 | attribute => 'Comment', | ||||||||||||||||||||
| 271 | }, | ||||||||||||||||||||
| 272 | 'Member' => { | ||||||||||||||||||||
| 273 | callback => \&parseMember, | ||||||||||||||||||||
| 274 | attribute => 'Normal Text', | ||||||||||||||||||||
| 275 | lineending => '#pop', | ||||||||||||||||||||
| 276 | fallthrough => '#pop', | ||||||||||||||||||||
| 277 | }, | ||||||||||||||||||||
| 278 | 'Normal' => { | ||||||||||||||||||||
| 279 | callback => \&parseNormal, | ||||||||||||||||||||
| 280 | attribute => 'Normal Text', | ||||||||||||||||||||
| 281 | }, | ||||||||||||||||||||
| 282 | 'Preprocessor' => { | ||||||||||||||||||||
| 283 | callback => \&parsePreprocessor, | ||||||||||||||||||||
| 284 | attribute => 'Preprocessor', | ||||||||||||||||||||
| 285 | lineending => '#pop', | ||||||||||||||||||||
| 286 | }, | ||||||||||||||||||||
| 287 | }); | ||||||||||||||||||||
| 288 | 2 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 289 | 2 | $self->basecontext('Normal'); | |||||||||||||||||||
| 290 | 2 | $self->keywordscase(0); | |||||||||||||||||||
| 291 | 2 | $self->initialize; | |||||||||||||||||||
| 292 | 2 | bless ($self, $class); | |||||||||||||||||||
| 293 | 2 | return $self; | |||||||||||||||||||
| 294 | } | ||||||||||||||||||||
| 295 | |||||||||||||||||||||
| 296 | sub language { | ||||||||||||||||||||
| 297 | 0 | ▶ | return 'GLSL'; | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 298 | } | ||||||||||||||||||||
| 299 | |||||||||||||||||||||
| 300 | sub parseCommentar1 { | ||||||||||||||||||||
| 301 | 654 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCommentar1: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 302 | # String => 'attention' | ||||||||||||||||||||
| 303 | # attribute => 'Alert' | ||||||||||||||||||||
| 304 | # context => '#stay' | ||||||||||||||||||||
| 305 | # type => 'keyword' | ||||||||||||||||||||
| 306 | 654 | ▶ | if ($self->testKeyword($text, 'attention', 0, undef, 0, '#stay', 'Alert')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 307 | 6 | return 1 | |||||||||||||||||||
| 308 | } | ||||||||||||||||||||
| 309 | 648 | return 0; | |||||||||||||||||||
| 310 | }; | ||||||||||||||||||||
| 311 | |||||||||||||||||||||
| 312 | sub parseCommentar2 { | ||||||||||||||||||||
| 313 | 60 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseCommentar2: called CC=3 SCAR=11.2
Pod
undocumented
| |||||||||||||||||||||
| 314 | # attribute => 'Comment' | ||||||||||||||||||||
| 315 | # char => '*' | ||||||||||||||||||||
| 316 | # char1 => '/' | ||||||||||||||||||||
| 317 | # context => '#pop' | ||||||||||||||||||||
| 318 | # endRegion => 'Comment' | ||||||||||||||||||||
| 319 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 320 | 60 | ▶ | if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 321 | 2 | return 1 | |||||||||||||||||||
| 322 | } | ||||||||||||||||||||
| 323 | # String => 'attention' | ||||||||||||||||||||
| 324 | # attribute => 'Alert' | ||||||||||||||||||||
| 325 | # context => '#stay' | ||||||||||||||||||||
| 326 | # type => 'keyword' | ||||||||||||||||||||
| 327 | 58 | ▶ | if ($self->testKeyword($text, 'attention', 0, undef, 0, '#stay', 'Alert')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 328 | 0 | return 1 | |||||||||||||||||||
| 329 | } | ||||||||||||||||||||
| 330 | 58 | return 0; | |||||||||||||||||||
| 331 | }; | ||||||||||||||||||||
| 332 | |||||||||||||||||||||
| 333 | sub parseMember { | ||||||||||||||||||||
| 334 | 4 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseMember: called CC=2 SCAR=7.6
Pod
undocumented
| |||||||||||||||||||||
| 335 | # String => '\b[_\w][_\w\d]*(?=[\s]*)' | ||||||||||||||||||||
| 336 | # attribute => 'Function' | ||||||||||||||||||||
| 337 | # context => '#pop' | ||||||||||||||||||||
| 338 | # type => 'RegExpr' | ||||||||||||||||||||
| 339 | 4 | ▶ | if ($self->testRegExpr($text, '\\b[_\\w][_\\w\\d]*(?=[\\s]*)', 0, 0, 0, undef, 0, '#pop', 'Function')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 340 | 4 | return 1 | |||||||||||||||||||
| 341 | } | ||||||||||||||||||||
| 342 | 0 | return 0; | |||||||||||||||||||
| 343 | }; | ||||||||||||||||||||
| 344 | |||||||||||||||||||||
| 345 | sub parseNormal { | ||||||||||||||||||||
| 346 | 540 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseNormal: called CC=18 SCAR=29.0
Pod
undocumented
| |||||||||||||||||||||
| 347 | # String => 'keywords' | ||||||||||||||||||||
| 348 | # attribute => 'Keyword' | ||||||||||||||||||||
| 349 | # context => '#stay' | ||||||||||||||||||||
| 350 | # type => 'keyword' | ||||||||||||||||||||
| 351 | 540 | ▶ | if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 352 | 26 | return 1 | |||||||||||||||||||
| 353 | } | ||||||||||||||||||||
| 354 | # String => 'types' | ||||||||||||||||||||
| 355 | # attribute => 'Data Type' | ||||||||||||||||||||
| 356 | # context => '#stay' | ||||||||||||||||||||
| 357 | # type => 'keyword' | ||||||||||||||||||||
| 358 | 514 | ▶ | if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 359 | 56 | return 1 | |||||||||||||||||||
| 360 | } | ||||||||||||||||||||
| 361 | # String => 'typequal' | ||||||||||||||||||||
| 362 | # attribute => 'Type Qualifier' | ||||||||||||||||||||
| 363 | # context => '#stay' | ||||||||||||||||||||
| 364 | # type => 'keyword' | ||||||||||||||||||||
| 365 | 458 | ▶ | if ($self->testKeyword($text, 'typequal', 0, undef, 0, '#stay', 'Type Qualifier')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 366 | 14 | return 1 | |||||||||||||||||||
| 367 | } | ||||||||||||||||||||
| 368 | # String => 'stdlib' | ||||||||||||||||||||
| 369 | # attribute => 'StdFunction' | ||||||||||||||||||||
| 370 | # context => '#stay' | ||||||||||||||||||||
| 371 | # type => 'keyword' | ||||||||||||||||||||
| 372 | 444 | ▶ | if ($self->testKeyword($text, 'stdlib', 0, undef, 0, '#stay', 'StdFunction')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 373 | 16 | return 1 | |||||||||||||||||||
| 374 | } | ||||||||||||||||||||
| 375 | # String => 'stdvar' | ||||||||||||||||||||
| 376 | # attribute => 'StdVariable' | ||||||||||||||||||||
| 377 | # context => '#stay' | ||||||||||||||||||||
| 378 | # type => 'keyword' | ||||||||||||||||||||
| 379 | 428 | ▶ | if ($self->testKeyword($text, 'stdvar', 0, undef, 0, '#stay', 'StdVariable')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 380 | 6 | return 1 | |||||||||||||||||||
| 381 | } | ||||||||||||||||||||
| 382 | # attribute => 'Float' | ||||||||||||||||||||
| 383 | # context => '#stay' | ||||||||||||||||||||
| 384 | # type => 'Float' | ||||||||||||||||||||
| 385 | 422 | ▶ | if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 386 | 8 | return 1 | |||||||||||||||||||
| 387 | } | ||||||||||||||||||||
| 388 | # attribute => 'Octal' | ||||||||||||||||||||
| 389 | # context => '#stay' | ||||||||||||||||||||
| 390 | # type => 'HlCOct' | ||||||||||||||||||||
| 391 | 414 | ▶ | if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 392 | 0 | return 1 | |||||||||||||||||||
| 393 | } | ||||||||||||||||||||
| 394 | # attribute => 'Hex' | ||||||||||||||||||||
| 395 | # context => '#stay' | ||||||||||||||||||||
| 396 | # type => 'HlCHex' | ||||||||||||||||||||
| 397 | 414 | ▶ | if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 398 | 0 | return 1 | |||||||||||||||||||
| 399 | } | ||||||||||||||||||||
| 400 | # attribute => 'Decimal' | ||||||||||||||||||||
| 401 | # context => '#stay' | ||||||||||||||||||||
| 402 | # type => 'Int' | ||||||||||||||||||||
| 403 | 414 | ▶ | if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 404 | 0 | return 1 | |||||||||||||||||||
| 405 | } | ||||||||||||||||||||
| 406 | # attribute => 'Comment' | ||||||||||||||||||||
| 407 | # char => '/' | ||||||||||||||||||||
| 408 | # char1 => '/' | ||||||||||||||||||||
| 409 | # context => 'Commentar 1' | ||||||||||||||||||||
| 410 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 411 | 414 | ▶ | if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 412 | 34 | return 1 | |||||||||||||||||||
| 413 | } | ||||||||||||||||||||
| 414 | # attribute => 'Comment' | ||||||||||||||||||||
| 415 | # beginRegion => 'Comment' | ||||||||||||||||||||
| 416 | # char => '/' | ||||||||||||||||||||
| 417 | # char1 => '*' | ||||||||||||||||||||
| 418 | # context => 'Commentar 2' | ||||||||||||||||||||
| 419 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 420 | 380 | ▶ | if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 421 | 2 | return 1 | |||||||||||||||||||
| 422 | } | ||||||||||||||||||||
| 423 | # attribute => 'Symbol' | ||||||||||||||||||||
| 424 | # beginRegion => 'Brace1' | ||||||||||||||||||||
| 425 | # char => '{' | ||||||||||||||||||||
| 426 | # context => '#stay' | ||||||||||||||||||||
| 427 | # type => 'DetectChar' | ||||||||||||||||||||
| 428 | 378 | ▶ | if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 429 | 4 | return 1 | |||||||||||||||||||
| 430 | } | ||||||||||||||||||||
| 431 | # attribute => 'Symbol' | ||||||||||||||||||||
| 432 | # char => '}' | ||||||||||||||||||||
| 433 | # context => '#stay' | ||||||||||||||||||||
| 434 | # endRegion => 'Brace1' | ||||||||||||||||||||
| 435 | # type => 'DetectChar' | ||||||||||||||||||||
| 436 | 374 | ▶ | if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 437 | 4 | return 1 | |||||||||||||||||||
| 438 | } | ||||||||||||||||||||
| 439 | # attribute => 'Preprocessor' | ||||||||||||||||||||
| 440 | # char => '#' | ||||||||||||||||||||
| 441 | # context => 'Preprocessor' | ||||||||||||||||||||
| 442 | # firstNonSpace => 'true' | ||||||||||||||||||||
| 443 | # type => 'DetectChar' | ||||||||||||||||||||
| 444 | 370 | ▶ | if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'Preprocessor', 'Preprocessor')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 445 | 4 | return 1 | |||||||||||||||||||
| 446 | } | ||||||||||||||||||||
| 447 | # String => '\b[_\w][_\w\d]*(?=[\s]*[(])' | ||||||||||||||||||||
| 448 | # attribute => 'Function' | ||||||||||||||||||||
| 449 | # context => '#stay' | ||||||||||||||||||||
| 450 | # type => 'RegExpr' | ||||||||||||||||||||
| 451 | 366 | ▶ | if ($self->testRegExpr($text, '\\b[_\\w][_\\w\\d]*(?=[\\s]*[(])', 0, 0, 0, undef, 0, '#stay', 'Function')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 452 | 4 | return 1 | |||||||||||||||||||
| 453 | } | ||||||||||||||||||||
| 454 | # String => '[.]{1,1}' | ||||||||||||||||||||
| 455 | # attribute => 'Symbol' | ||||||||||||||||||||
| 456 | # context => 'Member' | ||||||||||||||||||||
| 457 | # type => 'RegExpr' | ||||||||||||||||||||
| 458 | 362 | ▶ | if ($self->testRegExpr($text, '[.]{1,1}', 0, 0, 0, undef, 0, 'Member', 'Symbol')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 459 | 4 | return 1 | |||||||||||||||||||
| 460 | } | ||||||||||||||||||||
| 461 | # String => '.+-/*%<>[]()^|&~=!:;,?;' | ||||||||||||||||||||
| 462 | # attribute => 'Symbol' | ||||||||||||||||||||
| 463 | # context => '#stay' | ||||||||||||||||||||
| 464 | # type => 'AnyChar' | ||||||||||||||||||||
| 465 | 358 | ▶ | if ($self->testAnyChar($text, '.+-/*%<>[]()^|&~=!:;,?;', 0, 0, undef, 0, '#stay', 'Symbol')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 466 | 38 | return 1 | |||||||||||||||||||
| 467 | } | ||||||||||||||||||||
| 468 | 320 | return 0; | |||||||||||||||||||
| 469 | }; | ||||||||||||||||||||
| 470 | |||||||||||||||||||||
| 471 | sub parsePreprocessor { | ||||||||||||||||||||
| 472 | 52 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parsePreprocessor: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 473 | 52 | return 0; | |||||||||||||||||||
| 474 | }; | ||||||||||||||||||||
| 475 | |||||||||||||||||||||
| 476 | |||||||||||||||||||||
| 477 | 1 | 1; | |||||||||||||||||||
| 478 | |||||||||||||||||||||
| 479 | __END__ | ||||||||||||||||||||