| 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 'eiffel.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.1 | ||||||||||||||||||||
| 10 | #kate author Sebastian Vuorinen | ||||||||||||||||||||
| 11 | #generated: Sun Feb 3 22:02:04 2008, localtime | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | package Syntax::Highlight::Engine::Kate::Eiffel; | ||||||||||||||||||||
| 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 | 1 | ▶ | my $proto = shift; | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 23 | 1 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition33%1/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 24 | 1 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 25 | 1 | $self->attributes({ | |||||||||||||||||||
| 26 | 'Assertions' => 'Others', | ||||||||||||||||||||
| 27 | 'Char' => 'Char', | ||||||||||||||||||||
| 28 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 29 | 'Decimal' => 'DecVal', | ||||||||||||||||||||
| 30 | 'Float' => 'Float', | ||||||||||||||||||||
| 31 | 'Keyword' => 'Keyword', | ||||||||||||||||||||
| 32 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 33 | 'Predefined entities' => 'Others', | ||||||||||||||||||||
| 34 | 'String' => 'String', | ||||||||||||||||||||
| 35 | }); | ||||||||||||||||||||
| 36 | 1 | $self->listAdd('assertions', | |||||||||||||||||||
| 37 | 'check', | ||||||||||||||||||||
| 38 | 'ensure', | ||||||||||||||||||||
| 39 | 'invariant', | ||||||||||||||||||||
| 40 | 'require', | ||||||||||||||||||||
| 41 | 'variant', | ||||||||||||||||||||
| 42 | ); | ||||||||||||||||||||
| 43 | 1 | $self->listAdd('keywords', | |||||||||||||||||||
| 44 | 'agent', | ||||||||||||||||||||
| 45 | 'alias', | ||||||||||||||||||||
| 46 | 'all', | ||||||||||||||||||||
| 47 | 'and', | ||||||||||||||||||||
| 48 | 'as', | ||||||||||||||||||||
| 49 | 'assign', | ||||||||||||||||||||
| 50 | 'class', | ||||||||||||||||||||
| 51 | 'convert', | ||||||||||||||||||||
| 52 | 'create', | ||||||||||||||||||||
| 53 | 'creation', | ||||||||||||||||||||
| 54 | 'debug', | ||||||||||||||||||||
| 55 | 'deferred', | ||||||||||||||||||||
| 56 | 'do', | ||||||||||||||||||||
| 57 | 'else', | ||||||||||||||||||||
| 58 | 'elseif', | ||||||||||||||||||||
| 59 | 'end', | ||||||||||||||||||||
| 60 | 'expanded', | ||||||||||||||||||||
| 61 | 'export', | ||||||||||||||||||||
| 62 | 'external', | ||||||||||||||||||||
| 63 | 'feature', | ||||||||||||||||||||
| 64 | 'from', | ||||||||||||||||||||
| 65 | 'frozen', | ||||||||||||||||||||
| 66 | 'if', | ||||||||||||||||||||
| 67 | 'implies', | ||||||||||||||||||||
| 68 | 'indexing', | ||||||||||||||||||||
| 69 | 'infix', | ||||||||||||||||||||
| 70 | 'inherit', | ||||||||||||||||||||
| 71 | 'inspect', | ||||||||||||||||||||
| 72 | 'is', | ||||||||||||||||||||
| 73 | 'like', | ||||||||||||||||||||
| 74 | 'local', | ||||||||||||||||||||
| 75 | 'loop', | ||||||||||||||||||||
| 76 | 'not', | ||||||||||||||||||||
| 77 | 'obsolete', | ||||||||||||||||||||
| 78 | 'old', | ||||||||||||||||||||
| 79 | 'once', | ||||||||||||||||||||
| 80 | 'or', | ||||||||||||||||||||
| 81 | 'prefix', | ||||||||||||||||||||
| 82 | 'pure', | ||||||||||||||||||||
| 83 | 'redefine', | ||||||||||||||||||||
| 84 | 'reference', | ||||||||||||||||||||
| 85 | 'rename', | ||||||||||||||||||||
| 86 | 'rescue', | ||||||||||||||||||||
| 87 | 'retry', | ||||||||||||||||||||
| 88 | 'separate', | ||||||||||||||||||||
| 89 | 'then', | ||||||||||||||||||||
| 90 | 'undefine', | ||||||||||||||||||||
| 91 | ); | ||||||||||||||||||||
| 92 | 1 | $self->listAdd('predefined-entities', | |||||||||||||||||||
| 93 | 'Current', | ||||||||||||||||||||
| 94 | 'False', | ||||||||||||||||||||
| 95 | 'Precursor', | ||||||||||||||||||||
| 96 | 'Result', | ||||||||||||||||||||
| 97 | 'TUPLE', | ||||||||||||||||||||
| 98 | 'True', | ||||||||||||||||||||
| 99 | ); | ||||||||||||||||||||
| 100 | 1 | $self->contextdata({ | |||||||||||||||||||
| 101 | 'Documentation' => { | ||||||||||||||||||||
| 102 | callback => \&parseDocumentation, | ||||||||||||||||||||
| 103 | attribute => 'Comment', | ||||||||||||||||||||
| 104 | lineending => '#pop', | ||||||||||||||||||||
| 105 | }, | ||||||||||||||||||||
| 106 | 'Normal' => { | ||||||||||||||||||||
| 107 | callback => \&parseNormal, | ||||||||||||||||||||
| 108 | attribute => 'Normal Text', | ||||||||||||||||||||
| 109 | }, | ||||||||||||||||||||
| 110 | 'Quoted String' => { | ||||||||||||||||||||
| 111 | callback => \&parseQuotedString, | ||||||||||||||||||||
| 112 | attribute => 'String', | ||||||||||||||||||||
| 113 | lineending => '#pop', | ||||||||||||||||||||
| 114 | }, | ||||||||||||||||||||
| 115 | }); | ||||||||||||||||||||
| 116 | 1 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 117 | 1 | $self->basecontext('Normal'); | |||||||||||||||||||
| 118 | 1 | $self->keywordscase(0); | |||||||||||||||||||
| 119 | 1 | $self->initialize; | |||||||||||||||||||
| 120 | 1 | bless ($self, $class); | |||||||||||||||||||
| 121 | 1 | return $self; | |||||||||||||||||||
| 122 | } | ||||||||||||||||||||
| 123 | |||||||||||||||||||||
| 124 | sub language { | ||||||||||||||||||||
| 125 | 0 | ▶ | return 'Eiffel'; | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 126 | } | ||||||||||||||||||||
| 127 | |||||||||||||||||||||
| 128 | sub parseDocumentation { | ||||||||||||||||||||
| 129 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseDocumentation: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 130 | 0 | return 0; | |||||||||||||||||||
| 131 | }; | ||||||||||||||||||||
| 132 | |||||||||||||||||||||
| 133 | sub parseNormal { | ||||||||||||||||||||
| 134 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseNormal: not called CC=9 SCAR=45.0
Pod
undocumented
| |||||||||||||||||||||
| 135 | # String => 'keywords' | ||||||||||||||||||||
| 136 | # attribute => 'Keyword' | ||||||||||||||||||||
| 137 | # context => '#stay' | ||||||||||||||||||||
| 138 | # type => 'keyword' | ||||||||||||||||||||
| 139 | 0 | ▶ | if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 140 | 0 | return 1 | |||||||||||||||||||
| 141 | } | ||||||||||||||||||||
| 142 | # String => 'predefined-entities' | ||||||||||||||||||||
| 143 | # attribute => 'Predefined entities' | ||||||||||||||||||||
| 144 | # context => '#stay' | ||||||||||||||||||||
| 145 | # type => 'keyword' | ||||||||||||||||||||
| 146 | 0 | ▶ | if ($self->testKeyword($text, 'predefined-entities', 0, undef, 0, '#stay', 'Predefined entities')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 147 | 0 | return 1 | |||||||||||||||||||
| 148 | } | ||||||||||||||||||||
| 149 | # String => 'assertions' | ||||||||||||||||||||
| 150 | # attribute => 'Assertions' | ||||||||||||||||||||
| 151 | # context => '#stay' | ||||||||||||||||||||
| 152 | # type => 'keyword' | ||||||||||||||||||||
| 153 | 0 | ▶ | if ($self->testKeyword($text, 'assertions', 0, undef, 0, '#stay', 'Assertions')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 154 | 0 | return 1 | |||||||||||||||||||
| 155 | } | ||||||||||||||||||||
| 156 | # attribute => 'Decimal' | ||||||||||||||||||||
| 157 | # context => '#stay' | ||||||||||||||||||||
| 158 | # type => 'Int' | ||||||||||||||||||||
| 159 | 0 | ▶ | if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 160 | 0 | return 1 | |||||||||||||||||||
| 161 | } | ||||||||||||||||||||
| 162 | # attribute => 'Float' | ||||||||||||||||||||
| 163 | # context => '#stay' | ||||||||||||||||||||
| 164 | # type => 'Float' | ||||||||||||||||||||
| 165 | 0 | ▶ | if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 166 | 0 | return 1 | |||||||||||||||||||
| 167 | } | ||||||||||||||||||||
| 168 | # attribute => 'Char' | ||||||||||||||||||||
| 169 | # context => '#stay' | ||||||||||||||||||||
| 170 | # type => 'HlCChar' | ||||||||||||||||||||
| 171 | 0 | ▶ | if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 172 | 0 | return 1 | |||||||||||||||||||
| 173 | } | ||||||||||||||||||||
| 174 | # attribute => 'String' | ||||||||||||||||||||
| 175 | # char => '"' | ||||||||||||||||||||
| 176 | # context => 'Quoted String' | ||||||||||||||||||||
| 177 | # type => 'DetectChar' | ||||||||||||||||||||
| 178 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Quoted String', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 179 | 0 | return 1 | |||||||||||||||||||
| 180 | } | ||||||||||||||||||||
| 181 | # attribute => 'Comment' | ||||||||||||||||||||
| 182 | # char => '-' | ||||||||||||||||||||
| 183 | # char1 => '-' | ||||||||||||||||||||
| 184 | # context => 'Documentation' | ||||||||||||||||||||
| 185 | # type => 'Detect2Chars' | ||||||||||||||||||||
| 186 | 0 | ▶ | if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'Documentation', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 187 | 0 | return 1 | |||||||||||||||||||
| 188 | } | ||||||||||||||||||||
| 189 | 0 | return 0; | |||||||||||||||||||
| 190 | }; | ||||||||||||||||||||
| 191 | |||||||||||||||||||||
| 192 | sub parseQuotedString { | ||||||||||||||||||||
| 193 | 0 | ▶ | my ($self, $text) = @_; | ||||||||||||||||||
|
Subroutine
parseQuotedString: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 194 | # attribute => 'String' | ||||||||||||||||||||
| 195 | # char => '"' | ||||||||||||||||||||
| 196 | # context => '#pop' | ||||||||||||||||||||
| 197 | # type => 'DetectChar' | ||||||||||||||||||||
| 198 | 0 | ▶ | if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 199 | 0 | return 1 | |||||||||||||||||||
| 200 | } | ||||||||||||||||||||
| 201 | 0 | return 0; | |||||||||||||||||||
| 202 | }; | ||||||||||||||||||||
| 203 | |||||||||||||||||||||
| 204 | |||||||||||||||||||||
| 205 | 1 | 1; | |||||||||||||||||||
| 206 | |||||||||||||||||||||
| 207 | __END__ | ||||||||||||||||||||