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.
5 # This file was generated from the 'cs.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #generated: Sun Feb 3 22:02:04 2008, localtime
12 package Syntax::Highlight::Engine::Kate::Cdash;
14 our $VERSION = '0.06';
18 use base('Syntax::Highlight::Engine::Kate::Template');
22 my $class = ref($proto) || $proto;
23 my $self = $class->SUPER::new(@_);
26 'Comment' => 'Comment',
27 'Data Type' => 'DataType',
28 'Decimal' => 'DecVal',
30 'Function' => 'Function',
32 'Keyword' => 'Keyword',
33 'Normal Text' => 'Normal',
36 'String Char' => 'Char',
39 $self->listAdd('keywords',
109 $self->listAdd('types',
130 callback => \&parseCommentar1,
131 attribute => 'Comment',
132 lineending => '#pop',
135 callback => \&parseCommentar2,
136 attribute => 'Comment',
139 callback => \&parseMember,
140 attribute => 'Normal Text',
141 lineending => '#pop',
142 fallthrough => '#pop',
145 callback => \&parseNormal,
146 attribute => 'Normal Text',
149 callback => \&parseString,
150 attribute => 'String',
151 lineending => '#pop',
154 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
155 $self->basecontext('Normal');
156 $self->keywordscase(0);
158 bless ($self, $class);
166 sub parseCommentar1 {
167 my ($self, $text) = @_;
171 sub parseCommentar2 {
172 my ($self, $text) = @_;
173 # attribute => 'Comment'
177 # type => 'Detect2Chars'
178 if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
185 my ($self, $text) = @_;
186 # String => '\b[_\w][_\w\d]*(?=[\s]*)'
187 # attribute => 'Function'
190 if ($self->testRegExpr($text, '\\b[_\\w][_\\w\\d]*(?=[\\s]*)', 0, 0, 0, undef, 0, '#pop', 'Function')) {
197 my ($self, $text) = @_;
198 # String => 'keywords'
199 # attribute => 'Keyword'
202 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
206 # attribute => 'Data Type'
209 if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) {
212 # attribute => 'Float'
214 # items => 'ARRAY(0x10f55a0)'
216 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
218 # attribute => 'Float'
221 if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) {
225 # attribute => 'Octal'
228 if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) {
234 if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) {
237 # attribute => 'Decimal'
239 # items => 'ARRAY(0x1095b90)'
241 if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
243 # attribute => 'Decimal'
245 # insensitive => 'TRUE'
246 # type => 'StringDetect'
247 if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
251 # attribute => 'Decimal'
253 # insensitive => 'TRUE'
254 # type => 'StringDetect'
255 if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
259 # attribute => 'Decimal'
261 # insensitive => 'TRUE'
262 # type => 'StringDetect'
263 if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
267 # attribute => 'Decimal'
269 # insensitive => 'TRUE'
270 # type => 'StringDetect'
271 if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
275 # attribute => 'Decimal'
277 # insensitive => 'TRUE'
278 # type => 'StringDetect'
279 if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
283 # attribute => 'Decimal'
285 # insensitive => 'TRUE'
286 # type => 'StringDetect'
287 if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
291 # attribute => 'Decimal'
293 # insensitive => 'TRUE'
294 # type => 'StringDetect'
295 if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
299 # attribute => 'Decimal'
301 # insensitive => 'TRUE'
302 # type => 'StringDetect'
303 if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
307 # attribute => 'Char'
310 if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) {
313 # attribute => 'String'
315 # context => 'String'
316 # type => 'DetectChar'
317 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
320 # context => '##Doxygen'
321 # type => 'IncludeRules'
322 if ($self->includePlugin('Doxygen', $text)) {
325 # attribute => 'Comment'
328 # context => 'Commentar 1'
329 # type => 'Detect2Chars'
330 if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) {
333 # attribute => 'Comment'
336 # context => 'Commentar 2'
337 # type => 'Detect2Chars'
338 if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) {
341 # attribute => 'Symbol'
342 # beginRegion => 'block1'
345 # type => 'DetectChar'
346 if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
349 # attribute => 'Symbol'
352 # endRegion => 'block1'
353 # type => 'DetectChar'
354 if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
357 # String => '#region.*$'
358 # attribute => 'Decimal'
359 # beginRegion => 'Region1'
362 if ($self->testRegExpr($text, '#region.*$', 0, 0, 0, undef, 0, '#stay', 'Decimal')) {
365 # String => '#endregion.*$'
366 # attribute => 'Decimal'
368 # endRegion => 'Region1'
370 if ($self->testRegExpr($text, '#endregion.*$', 0, 0, 0, undef, 0, '#stay', 'Decimal')) {
373 # String => '\b[_\w][_\w\d]*(?=[\s]*[(])'
374 # attribute => 'Function'
377 if ($self->testRegExpr($text, '\\b[_\\w][_\\w\\d]*(?=[\\s]*[(])', 0, 0, 0, undef, 0, '#stay', 'Function')) {
380 # String => '[.]{1,1}'
381 # attribute => 'Symbol'
382 # context => 'Member'
384 if ($self->testRegExpr($text, '[.]{1,1}', 0, 0, 0, undef, 0, 'Member', 'Symbol')) {
387 # String => ':!%&()+,-/.*<=>?[]|~^;'
388 # attribute => 'Symbol'
391 if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]|~^;', 0, 0, undef, 0, '#stay', 'Symbol')) {
398 my ($self, $text) = @_;
399 # attribute => 'String'
401 # type => 'LineContinue'
402 if ($self->testLineContinue($text, 0, undef, 0, '#pop', 'String')) {
405 # attribute => 'String Char'
407 # type => 'HlCStringChar'
408 if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) {
411 # attribute => 'String'
414 # type => 'DetectChar'
415 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
428 Syntax::Highlight::Engine::Kate::Cdash - a Plugin for C# syntax highlighting
432 require Syntax::Highlight::Engine::Kate::Cdash;
433 my $sh = new Syntax::Highlight::Engine::Kate::Cdash([
438 Syntax::Highlight::Engine::Kate::Cdash is a plugin module that provides syntax highlighting
439 for C# to the Syntax::Haghlight::Engine::Kate highlighting engine.
441 This code is generated from the syntax definition files used
443 It works quite fine, but can use refinement and optimization.
445 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
451 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
457 Unknown. If you find any, please contact the author