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 'stata.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #kate author Edwin Leuven (e.leuven@uva.nl)
11 #generated: Sun Feb 3 22:02:06 2008, localtime
13 package Syntax::Highlight::Engine::Kate::Stata;
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(@_);
26 'Comment' => 'Comment',
27 'Data Type' => 'DataType',
28 'Keyword' => 'Keyword',
30 'Normal Text' => 'Normal',
32 'String Char' => 'Char',
34 $self->listAdd('keywords',
442 $self->listAdd('types',
464 callback => \&parseComment1,
465 attribute => 'Comment',
466 lineending => '#pop',
469 callback => \&parseComment2,
470 attribute => 'Comment',
473 callback => \&parseNormal,
474 attribute => 'Normal Text',
477 callback => \&parsestring,
478 attribute => 'String',
479 lineending => '#pop',
482 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
483 $self->basecontext('Normal');
484 $self->keywordscase(0);
486 bless ($self, $class);
495 my ($self, $text) = @_;
500 my ($self, $text) = @_;
501 # attribute => 'Comment'
505 # endRegion => 'Comment'
506 # type => 'Detect2Chars'
507 if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
514 my ($self, $text) = @_;
515 # String => 'keywords'
516 # attribute => 'Keyword'
519 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
523 # attribute => 'Data Type'
526 if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) {
529 # attribute => 'String'
531 # context => 'string'
532 # type => 'DetectChar'
533 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string', 'String')) {
536 # attribute => 'Macro'
540 # type => 'RangeDetect'
541 if ($self->testRangeDetect($text, '`', '\'', 0, 0, undef, 0, '#stay', 'Macro')) {
544 # attribute => 'Comment'
547 # context => 'Comment 1'
548 # type => 'Detect2Chars'
549 if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment 1', 'Comment')) {
552 # attribute => 'Comment'
553 # beginRegion => 'Comment'
556 # context => 'Comment 2'
557 # type => 'Detect2Chars'
558 if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Comment 2', 'Comment')) {
561 # attribute => 'Normal Text'
562 # beginRegion => 'block'
565 # type => 'DetectChar'
566 if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) {
569 # attribute => 'Normal Text'
572 # endRegion => 'block'
573 # type => 'DetectChar'
574 if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) {
581 my ($self, $text) = @_;
582 # attribute => 'String Char'
584 # type => 'HlCStringChar'
585 if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) {
588 # attribute => 'String'
591 # type => 'DetectChar'
592 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
605 Syntax::Highlight::Engine::Kate::Stata - a Plugin for Stata syntax highlighting
609 require Syntax::Highlight::Engine::Kate::Stata;
610 my $sh = new Syntax::Highlight::Engine::Kate::Stata([
615 Syntax::Highlight::Engine::Kate::Stata is a plugin module that provides syntax highlighting
616 for Stata to the Syntax::Haghlight::Engine::Kate highlighting engine.
618 This code is generated from the syntax definition files used
620 It works quite fine, but can use refinement and optimization.
622 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
628 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
634 Unknown. If you find any, please contact the author