File Coverage

blib/lib/Syntax/Highlight/Engine/Kate/De_DE.pm
Criterion Covered Total %
statement 24 57 42.1
branch 0 28 0.0
condition 1 3 33.3
subroutine 4 7 57.1
pod 0 4 0.0
total 29 99 29.2


line stmt bran cond sub pod time code
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 'logohighlightstyle.de_DE.xml' file of the syntax highlight
6             # engine of the kate text editor (http://www.kate-editor.org
7              
8             #kate xml version 0.2
9             #kate version 2.1
10             #generated: Sun Feb 3 22:02:04 2008, localtime
11              
12             package Syntax::Highlight::Engine::Kate::De_DE;
13              
14             our $VERSION = '0.12';
15              
16 1     1   618 use strict;
  1         2  
  1         33  
17 1     1   5 use warnings;
  1         3  
  1         34  
18 1     1   6 use base('Syntax::Highlight::Engine::Kate::Template');
  1         3  
  1         603  
19              
20             sub new {
21 1     1 0 626 my $proto = shift;
22 1   33     41 my $class = ref($proto) || $proto;
23 1         9 my $self = $class->SUPER::new(@_);
24 1         21 $self->attributes({
25             'Boolean Operators' => 'BString',
26             'Comment' => 'Comment',
27             'Execution Controllers' => 'BaseN',
28             'Expressers' => 'Datatype',
29             'MetaFunctions' => 'Function',
30             'Normal' => 'Normal',
31             'Normal Text' => 'Normal',
32             'Number' => 'Float',
33             'Operator' => 'Operator',
34             'Raw String' => 'String',
35             'Scopes' => 'RegionMarker',
36             'Statements' => 'Keyword',
37             'String' => 'String',
38             });
39 1         12 $self->listAdd('boolops',
40             'nicht',
41             'oder',
42             'und',
43             );
44 1         7 $self->listAdd('controllers',
45             'abbrechen',
46             'bis',
47             'fürjedes',
48             'in',
49             'solange',
50             'sonst',
51             'tue',
52             'von',
53             'warte',
54             'wdh',
55             'wenn',
56             'wiederhole',
57             'zurück',
58             );
59 1         6 $self->listAdd('metafunctions',
60             'lerne',
61             );
62 1         7 $self->listAdd('statements',
63             'drucke',
64             'drücke',
65             'eingabefenster',
66             'gehe',
67             'gehex',
68             'gehey',
69             'gx',
70             'gy',
71             'indiemitte',
72             'lauf',
73             'ls',
74             'lösche',
75             'nachlinks',
76             'nachrechts',
77             'nachricht',
78             'nl',
79             'nr',
80             'papierfarbe',
81             'papiergröße',
82             'pf',
83             'pg',
84             'richtung',
85             'rtg',
86             'rw',
87             'rückwärts',
88             'schriftart',
89             'schriftgröße',
90             'stbr',
91             'stf',
92             'sth',
93             'stiftbreite',
94             'stiftfarbe',
95             'stifthoch',
96             'stiftrunter',
97             'str',
98             'umbruchan',
99             'umbruchaus',
100             'verberge',
101             'vg',
102             'vorwärts',
103             'vw',
104             'wc',
105             'wechsle',
106             'zeige',
107             'zg',
108             'zufall',
109             'zurücksetzen',
110             );
111 1         17 $self->contextdata({
112             'Normal' => {
113             callback => \&parseNormal,
114             attribute => 'Normal Text',
115             },
116             'String' => {
117             callback => \&parseString,
118             attribute => 'String',
119             },
120             });
121 1         10 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
122 1         4 $self->basecontext('Normal');
123 1         5 $self->keywordscase(0);
124 1         27 $self->initialize;
125 1         2 bless ($self, $class);
126 1         4 return $self;
127             }
128              
129             sub language {
130 0     0 0   return 'de_DE';
131             }
132              
133             sub parseNormal {
134 0     0 0   my ($self, $text) = @_;
135             # String => 'metafunctions'
136             # attribute => 'MetaFunctions'
137             # context => '#stay'
138             # type => 'keyword'
139 0 0         if ($self->testKeyword($text, 'metafunctions', 0, undef, 0, '#stay', 'MetaFunctions')) {
140 0           return 1
141             }
142             # String => 'statements'
143             # attribute => 'Statements'
144             # context => '#stay'
145             # type => 'keyword'
146 0 0         if ($self->testKeyword($text, 'statements', 0, undef, 0, '#stay', 'Statements')) {
147 0           return 1
148             }
149             # String => 'controllers'
150             # attribute => 'Execution Controllers'
151             # context => '#stay'
152             # type => 'keyword'
153 0 0         if ($self->testKeyword($text, 'controllers', 0, undef, 0, '#stay', 'Execution Controllers')) {
154 0           return 1
155             }
156             # String => 'boolops'
157             # attribute => 'Boolean Operators'
158             # context => '#stay'
159             # type => 'keyword'
160 0 0         if ($self->testKeyword($text, 'boolops', 0, undef, 0, '#stay', 'Boolean Operators')) {
161 0           return 1
162             }
163             # String => '([!=><][=]|[><])'
164             # attribute => 'Expressers'
165             # context => '#stay'
166             # type => 'RegExpr'
167 0 0         if ($self->testRegExpr($text, '([!=><][=]|[><])', 0, 0, 0, undef, 0, '#stay', 'Expressers')) {
168 0           return 1
169             }
170             # String => '[a-zA-Z_][a-zA-Z_0-9]+'
171             # attribute => 'Normal'
172             # context => '#stay'
173             # type => 'RegExpr'
174 0 0         if ($self->testRegExpr($text, '[a-zA-Z_][a-zA-Z_0-9]+', 0, 0, 0, undef, 0, '#stay', 'Normal')) {
175 0           return 1
176             }
177             # String => '([0-9]+\.[0-9]*|\.[0-9]+)?|[0-9]*'
178             # attribute => 'Number'
179             # context => '#stay'
180             # type => 'RegExpr'
181 0 0         if ($self->testRegExpr($text, '([0-9]+\\.[0-9]*|\\.[0-9]+)?|[0-9]*', 0, 0, 0, undef, 0, '#stay', 'Number')) {
182 0           return 1
183             }
184             # String => '#.*$'
185             # attribute => 'Comment'
186             # context => '#stay'
187             # type => 'RegExpr'
188 0 0         if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) {
189 0           return 1
190             }
191             # String => '[+*/\(\)-]'
192             # attribute => 'Operator'
193             # context => '#stay'
194             # type => 'RegExpr'
195 0 0         if ($self->testRegExpr($text, '[+*/\\(\\)-]', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
196 0           return 1
197             }
198             # String => '[\[\]]'
199             # attribute => 'Scopes'
200             # context => '#stay'
201             # type => 'RegExpr'
202 0 0         if ($self->testRegExpr($text, '[\\[\\]]', 0, 0, 0, undef, 0, '#stay', 'Scopes')) {
203 0           return 1
204             }
205             # attribute => 'String'
206             # char => '"'
207             # context => 'String'
208             # type => 'DetectChar'
209 0 0         if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
210 0           return 1
211             }
212 0           return 0;
213             };
214              
215             sub parseString {
216 0     0 0   my ($self, $text) = @_;
217             # attribute => 'String'
218             # context => '#stay'
219             # type => 'HlCStringChar'
220 0 0         if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String')) {
221 0           return 1
222             }
223             # String => '%[a-zA-Z]'
224             # attribute => 'Operator'
225             # context => '#stay'
226             # type => 'RegExpr'
227 0 0         if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
228 0           return 1
229             }
230             # attribute => 'String'
231             # char => '"'
232             # context => '#pop'
233             # type => 'DetectChar'
234 0 0         if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
235 0           return 1
236             }
237 0           return 0;
238             };
239              
240              
241             1;
242              
243             __END__