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 'scheme.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #kate author Dominik Haumann (dhdev@gmx.de)
11 #generated: Sun Feb 3 22:02:06 2008, localtime
13 package Syntax::Highlight::Engine::Kate::Scheme;
15 our $VERSION = '0.06';
19 use base('Syntax::Highlight::Engine::Kate::Template');
23 my $class = ref($proto) || $proto;
24 my $self = $class->SUPER::new(@_);
27 'Brackets1' => 'Others',
28 'Brackets2' => 'Others',
29 'Brackets3' => 'Others',
30 'Brackets4' => 'Others',
31 'Brackets5' => 'Others',
32 'Brackets6' => 'Others',
34 'Comment' => 'Comment',
36 'Decimal' => 'DecVal',
37 'Definition' => 'Reserved',
39 'Function' => 'Function',
40 'Keyword' => 'Keyword',
42 'Operator' => 'Operator',
43 'Region Marker' => 'RegionMarker',
46 $self->listAdd('characters',
94 $self->listAdd('defines',
106 'define-reader-ctor',
108 'define-syntax-macro',
114 $self->listAdd('keywords',
143 'call-with-current-continuation',
144 'call-with-input-file',
145 'call-with-output-file',
193 'current-input-port',
194 'current-output-port',
222 'interaction-environment',
277 'scheme-report-environment',
313 'vector->listlist->vector',
320 'with-input-from-file',
321 'with-output-to-file',
326 $self->listAdd('operators',
341 callback => \&parseDefault,
342 attribute => 'Normal',
345 callback => \&parseLevel0,
346 attribute => 'Normal',
349 callback => \&parseLevel1,
350 attribute => 'Normal',
353 callback => \&parseLevel2,
354 attribute => 'Normal',
357 callback => \&parseLevel3,
358 attribute => 'Normal',
361 callback => \&parseLevel4,
362 attribute => 'Normal',
365 callback => \&parseLevel5,
366 attribute => 'Normal',
369 callback => \&parseLevel6,
370 attribute => 'Normal',
372 'MultiLineComment' => {
373 callback => \&parseMultiLineComment,
374 attribute => 'Comment',
377 callback => \&parseSpecialNumber,
378 attribute => 'Normal',
379 lineending => '#pop',
382 callback => \&parseString,
383 attribute => 'String',
386 callback => \&parsefunction_decl,
387 attribute => 'Function',
390 $self->deliminators('\\s||\\.|\\(|\\)|,|\\%|\\&|;|\\[|\\]|\\^|\\{|\\||\\}|\\~|-|\\+|\\*|\\?|\\!|<|>|=|\\/|:|#|\\\\');
391 $self->basecontext('Level0');
392 $self->keywordscase(0);
394 bless ($self, $class);
403 my ($self, $text) = @_;
404 # String => ';+\s*BEGIN.*$'
405 # attribute => 'Region Marker'
406 # beginRegion => 'region'
409 if ($self->testRegExpr($text, ';+\\s*BEGIN.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) {
412 # String => ';+\s*END.*$'
413 # attribute => 'Region Marker'
415 # endRegion => 'region'
417 if ($self->testRegExpr($text, ';+\\s*END.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) {
421 # attribute => 'Comment'
424 if ($self->testRegExpr($text, ';.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) {
427 # attribute => 'Comment'
428 # beginRegion => 'region'
431 # context => 'MultiLineComment'
432 # type => 'Detect2Chars'
433 if ($self->testDetect2Chars($text, '#', '!', 0, 0, 0, undef, 0, 'MultiLineComment', 'Comment')) {
436 # String => 'keywords'
437 # attribute => 'Keyword'
440 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
443 # String => 'operators'
444 # attribute => 'Operator'
447 if ($self->testKeyword($text, 'operators', 0, undef, 0, '#stay', 'Operator')) {
450 # String => 'defines'
451 # attribute => 'Definition'
452 # context => 'function_decl'
454 if ($self->testKeyword($text, 'defines', 0, undef, 0, 'function_decl', 'Definition')) {
457 # String => 'characters'
458 # attribute => 'Char'
461 if ($self->testKeyword($text, 'characters', 0, undef, 0, '#stay', 'Char')) {
465 # attribute => 'Char'
468 if ($self->testRegExpr($text, '#\\\\.', 0, 0, 0, undef, 0, '#stay', 'Char')) {
471 # attribute => 'String'
473 # context => 'String'
474 # type => 'DetectChar'
475 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
478 # String => '#[bodxei]'
479 # attribute => 'Char'
480 # context => 'SpecialNumber'
482 if ($self->testRegExpr($text, '#[bodxei]', 0, 0, 0, undef, 0, 'SpecialNumber', 'Char')) {
486 # attribute => 'Decimal'
489 if ($self->testRegExpr($text, '#[tf]', 0, 0, 0, undef, 0, '#stay', 'Decimal')) {
492 # attribute => 'Float'
495 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
498 # attribute => 'Decimal'
501 if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
504 # attribute => 'Brackets1'
506 # context => 'Level1'
507 # type => 'DetectChar'
508 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level1', 'Brackets1')) {
515 my ($self, $text) = @_;
516 # attribute => 'Brackets1'
518 # context => 'Level1'
519 # type => 'DetectChar'
520 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level1', 'Brackets1')) {
523 # context => 'Default'
524 # type => 'IncludeRules'
525 if ($self->includeRules('Default', $text)) {
532 my ($self, $text) = @_;
533 # attribute => 'Brackets2'
535 # context => 'Level2'
536 # type => 'DetectChar'
537 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level2', 'Brackets2')) {
540 # attribute => 'Brackets1'
543 # type => 'DetectChar'
544 if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Brackets1')) {
547 # context => 'Default'
548 # type => 'IncludeRules'
549 if ($self->includeRules('Default', $text)) {
556 my ($self, $text) = @_;
557 # attribute => 'Brackets3'
559 # context => 'Level3'
560 # type => 'DetectChar'
561 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level3', 'Brackets3')) {
564 # attribute => 'Brackets2'
567 # type => 'DetectChar'
568 if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Brackets2')) {
571 # context => 'Default'
572 # type => 'IncludeRules'
573 if ($self->includeRules('Default', $text)) {
580 my ($self, $text) = @_;
581 # attribute => 'Brackets4'
583 # context => 'Level4'
584 # type => 'DetectChar'
585 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level4', 'Brackets4')) {
588 # attribute => 'Brackets3'
591 # type => 'DetectChar'
592 if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Brackets3')) {
595 # context => 'Default'
596 # type => 'IncludeRules'
597 if ($self->includeRules('Default', $text)) {
604 my ($self, $text) = @_;
605 # attribute => 'Brackets5'
607 # context => 'Level5'
608 # type => 'DetectChar'
609 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level5', 'Brackets5')) {
612 # attribute => 'Brackets4'
615 # type => 'DetectChar'
616 if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Brackets4')) {
619 # context => 'Default'
620 # type => 'IncludeRules'
621 if ($self->includeRules('Default', $text)) {
628 my ($self, $text) = @_;
629 # attribute => 'Brackets6'
631 # context => 'Level6'
632 # type => 'DetectChar'
633 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level6', 'Brackets6')) {
636 # attribute => 'Brackets5'
639 # type => 'DetectChar'
640 if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Brackets5')) {
643 # context => 'Default'
644 # type => 'IncludeRules'
645 if ($self->includeRules('Default', $text)) {
652 my ($self, $text) = @_;
653 # attribute => 'Brackets1'
655 # context => 'Level1'
656 # type => 'DetectChar'
657 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Level1', 'Brackets1')) {
660 # attribute => 'Brackets6'
663 # type => 'DetectChar'
664 if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Brackets6')) {
667 # context => 'Default'
668 # type => 'IncludeRules'
669 if ($self->includeRules('Default', $text)) {
675 sub parseMultiLineComment {
676 my ($self, $text) = @_;
678 # attribute => 'Comment'
681 # endRegion => 'region'
683 if ($self->testRegExpr($text, '!#\\s*$', 0, 0, 0, 0, 0, '#pop', 'Comment')) {
689 sub parseSpecialNumber {
690 my ($self, $text) = @_;
691 # attribute => 'Float'
694 if ($self->testFloat($text, 0, undef, 0, '#pop', 'Float')) {
697 # attribute => 'Decimal'
700 if ($self->testInt($text, 0, undef, 0, '#pop', 'Decimal')) {
703 # attribute => 'BaseN'
706 if ($self->testHlCOct($text, 0, undef, 0, '#pop', 'BaseN')) {
709 # attribute => 'Float'
712 if ($self->testHlCHex($text, 0, undef, 0, '#pop', 'Float')) {
719 my ($self, $text) = @_;
720 # String => 'characters'
721 # attribute => 'Char'
724 if ($self->testKeyword($text, 'characters', 0, undef, 0, '#stay', 'Char')) {
728 # attribute => 'Char'
731 if ($self->testRegExpr($text, '#\\\\.', 0, 0, 0, undef, 0, '#stay', 'Char')) {
734 # attribute => 'Char'
738 # type => 'Detect2Chars'
739 if ($self->testDetect2Chars($text, '\\', '"', 0, 0, 0, undef, 0, '#stay', 'Char')) {
742 # attribute => 'Char'
746 # type => 'Detect2Chars'
747 if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Char')) {
750 # attribute => 'String'
753 # type => 'DetectChar'
754 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
760 sub parsefunction_decl {
761 my ($self, $text) = @_;
762 # String => '\s*[A-Za-z0-9-+\<\>//\*]*\s*'
763 # attribute => 'Function'
766 if ($self->testRegExpr($text, '\\s*[A-Za-z0-9-+\\<\\>//\\*]*\\s*', 0, 0, 0, undef, 0, '#pop', 'Function')) {
779 Syntax::Highlight::Engine::Kate::Scheme - a Plugin for Scheme syntax highlighting
783 require Syntax::Highlight::Engine::Kate::Scheme;
784 my $sh = new Syntax::Highlight::Engine::Kate::Scheme([
789 Syntax::Highlight::Engine::Kate::Scheme is a plugin module that provides syntax highlighting
790 for Scheme to the Syntax::Haghlight::Engine::Kate highlighting engine.
792 This code is generated from the syntax definition files used
794 It works quite fine, but can use refinement and optimization.
796 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
802 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
808 Unknown. If you find any, please contact the author