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 'kbasic.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::KBasic;
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(@_);
25 'Comment' => 'Comment',
26 'Identifier' => 'Others',
27 'Keyword' => 'Keyword',
28 'Normal Text' => 'Normal',
30 'Types' => 'DataType',
32 $self->listAdd('keywords',
81 $self->listAdd('types',
96 callback => \&parseComment,
97 attribute => 'Comment',
101 callback => \&parseNormal,
102 attribute => 'Normal Text',
105 callback => \&parseString,
106 attribute => 'String',
107 lineending => '#pop',
110 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
111 $self->basecontext('Normal');
112 $self->keywordscase(0);
114 bless ($self, $class);
123 my ($self, $text) = @_;
128 my ($self, $text) = @_;
129 # String => 'keywords'
130 # attribute => 'Keyword'
133 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
137 # attribute => 'Identifier'
140 if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Identifier')) {
143 # attribute => 'String'
146 if ($self->testFloat($text, 0, undef, 0, '#stay', 'String')) {
149 # attribute => 'Types'
152 if ($self->testInt($text, 0, undef, 0, '#stay', 'Types')) {
155 # attribute => 'String'
157 # context => 'String'
158 # type => 'DetectChar'
159 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
162 # attribute => 'Comment'
164 # context => 'Comment'
165 # type => 'DetectChar'
166 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
173 my ($self, $text) = @_;
174 # attribute => 'String'
177 # type => 'DetectChar'
178 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) {
191 Syntax::Highlight::Engine::Kate::KBasic - a Plugin for KBasic syntax highlighting
195 require Syntax::Highlight::Engine::Kate::KBasic;
196 my $sh = new Syntax::Highlight::Engine::Kate::KBasic([
201 Syntax::Highlight::Engine::Kate::KBasic is a plugin module that provides syntax highlighting
202 for KBasic to the Syntax::Haghlight::Engine::Kate highlighting engine.
204 This code is generated from the syntax definition files used
206 It works quite fine, but can use refinement and optimization.
208 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
214 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
220 Unknown. If you find any, please contact the author