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 'ilerpg.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:05 2008, localtime
12 package Syntax::Highlight::Engine::Kate::ILERPG;
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(@_);
27 'BoldComment' => 'Alert',
29 'Comment' => 'Comment',
30 'Constant' => 'DataType',
31 'Decimal' => 'DecVal',
32 'Directive' => 'Others',
33 'DivideComment' => 'Alert',
37 'Keyword' => 'Keyword',
38 'Normal Text' => 'Normal',
43 $self->listAdd('biffs',
78 $self->listAdd('opcodes',
237 callback => \&parseDefault,
238 attribute => 'Normal Text',
241 callback => \&parsecontext1,
242 attribute => 'Normal Text',
243 lineending => '#pop',
246 callback => \&parsecontext3,
247 attribute => 'Comment',
248 lineending => '#pop',
251 callback => \&parsecontext4,
252 attribute => 'Constant',
255 callback => \&parsecontext5,
256 attribute => 'Constant',
259 callback => \&parsecontext6,
260 attribute => 'Keyword',
261 lineending => '#pop#pop',
264 callback => \&parsecontext7,
265 attribute => 'BoldComment',
266 lineending => 'Default',
269 callback => \&parsecontext8,
271 lineending => '#pop#pop#pop',
274 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
275 $self->basecontext('Default');
276 $self->keywordscase(0);
278 bless ($self, $class);
287 my ($self, $text) = @_;
288 # String => '[POIHFDC ]?\*'
289 # attribute => 'Comment'
290 # context => 'context3'
292 if ($self->testRegExpr($text, '[POIHFDC ]?\\*', 0, 0, 0, undef, 0, 'context3', 'Comment')) {
295 # String => 'POIHFDC'
296 # attribute => 'Keyword'
297 # context => 'context1'
299 if ($self->testAnyChar($text, 'POIHFDC', 0, 0, undef, 0, 'context1', 'Keyword')) {
306 my ($self, $text) = @_;
307 # String => 'opcodes'
308 # attribute => 'Keyword'
311 if ($self->testKeyword($text, 'opcodes', 0, undef, 0, '#stay', 'Keyword')) {
314 # attribute => 'Biff'
316 # context => 'context7'
317 # type => 'DetectChar'
318 if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, 'context7', 'Biff')) {
321 # attribute => 'Constant'
323 # context => 'context3'
324 # type => 'DetectChar'
325 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'context3', 'Constant')) {
328 # attribute => 'Float'
331 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
334 # String => '[Xx]'[0-9a-fA-F]{2,}''
338 if ($self->testRegExpr($text, '[Xx]\'[0-9a-fA-F]{2,}\'', 0, 0, 0, undef, 0, '#stay', 'Hex')) {
341 # attribute => 'Decimal'
343 # items => 'ARRAY(0x1190f00)'
345 if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
347 # attribute => 'Decimal'
349 # insensitive => 'TRUE'
350 # type => 'StringDetect'
351 if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
355 # attribute => 'Decimal'
357 # insensitive => 'TRUE'
358 # type => 'StringDetect'
359 if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
363 # attribute => 'Decimal'
365 # insensitive => 'TRUE'
366 # type => 'StringDetect'
367 if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
371 # attribute => 'Decimal'
373 # insensitive => 'TRUE'
374 # type => 'StringDetect'
375 if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
379 # attribute => 'Decimal'
381 # insensitive => 'TRUE'
382 # type => 'StringDetect'
383 if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
387 # attribute => 'Decimal'
389 # insensitive => 'TRUE'
390 # type => 'StringDetect'
391 if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
395 # attribute => 'Decimal'
397 # insensitive => 'TRUE'
398 # type => 'StringDetect'
399 if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
403 # attribute => 'Decimal'
405 # insensitive => 'TRUE'
406 # type => 'StringDetect'
407 if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) {
415 my ($self, $text) = @_;
416 # String => '\(*(FIXME|TODO)\)*'
417 # attribute => 'BoldComment'
420 if ($self->testRegExpr($text, '\\(*(FIXME|TODO)\\)*', 0, 0, 0, undef, 0, '#stay', 'BoldComment')) {
423 # String => '\(*(NOTE:)\)*'
424 # attribute => 'BoldComment'
427 if ($self->testRegExpr($text, '\\(*(NOTE:)\\)*', 0, 0, 0, undef, 0, '#stay', 'BoldComment')) {
430 # attribute => 'BoldComment'
432 # context => 'context6'
433 # type => 'DetectChar'
434 if ($self->testDetectChar($text, '!', 0, 0, 0, undef, 0, 'context6', 'BoldComment')) {
438 # attribute => 'DivideComment'
441 if ($self->testRegExpr($text, '-|=', 0, 0, 0, undef, 0, '#stay', 'DivideComment')) {
448 my ($self, $text) = @_;
449 # attribute => 'Constant'
452 # type => 'DetectChar'
453 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Constant')) {
460 my ($self, $text) = @_;
462 # attribute => 'Normal Text'
465 if ($self->testAnyChar($text, 'FHDICO', 0, 0, undef, 0, '#stay', 'Normal Text')) {
468 # attribute => 'Constant'
471 # type => 'DetectChar'
472 if ($self->testDetectChar($text, ' ', 0, 0, 0, undef, 0, '#pop', 'Constant')) {
479 my ($self, $text) = @_;
484 my ($self, $text) = @_;
485 # attribute => 'BoldComment'
487 # context => 'context3'
488 # type => 'DetectChar'
489 if ($self->testDetectChar($text, '!', 0, 0, 0, undef, 0, 'context3', 'BoldComment')) {
496 my ($self, $text) = @_;
498 # attribute => 'Biff'
499 # context => '#pop#pop'
501 if ($self->testKeyword($text, 'biffs', 0, undef, 0, '#pop#pop', 'Biff')) {
504 # attribute => 'Biff'
506 # context => '#pop#pop'
507 # type => 'DetectChar'
508 if ($self->testDetectChar($text, ' ', 0, 0, 0, undef, 0, '#pop#pop', 'Biff')) {
521 Syntax::Highlight::Engine::Kate::ILERPG - a Plugin for ILERPG syntax highlighting
525 require Syntax::Highlight::Engine::Kate::ILERPG;
526 my $sh = new Syntax::Highlight::Engine::Kate::ILERPG([
531 Syntax::Highlight::Engine::Kate::ILERPG is a plugin module that provides syntax highlighting
532 for ILERPG to the Syntax::Haghlight::Engine::Kate highlighting engine.
534 This code is generated from the syntax definition files used
536 It works quite fine, but can use refinement and optimization.
538 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
544 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
550 Unknown. If you find any, please contact the author