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 'modula-2.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::Modulaminus2;
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 'Directive' => 'Others',
27 'Keyword' => 'Keyword',
28 'Normal Text' => 'Normal',
33 $self->listAdd('directives',
92 $self->listAdd('keywords',
158 $self->listAdd('types',
175 callback => \&parseComment2,
176 attribute => 'Comment',
179 callback => \&parseComment3,
180 attribute => 'Comment',
181 lineending => '#pop',
184 callback => \&parseNormal,
185 attribute => 'Normal Text',
188 callback => \&parsePrep1,
189 attribute => 'Directive',
192 callback => \&parseString1,
193 attribute => 'String',
194 lineending => '#pop',
197 callback => \&parseString2,
198 attribute => 'String',
199 lineending => '#pop',
202 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
203 $self->basecontext('Normal');
204 $self->keywordscase(0);
206 bless ($self, $class);
215 my ($self, $text) = @_;
216 # attribute => 'Comment'
220 # type => 'Detect2Chars'
221 if ($self->testDetect2Chars($text, '*', ')', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
228 my ($self, $text) = @_;
233 my ($self, $text) = @_;
234 # String => 'keywords'
235 # attribute => 'Keyword'
238 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
241 # String => 'directives'
242 # attribute => 'Directive'
245 if ($self->testKeyword($text, 'directives', 0, undef, 0, '#stay', 'Directive')) {
249 # attribute => 'Type'
252 if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Type')) {
255 # attribute => 'Number'
258 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Number')) {
261 # attribute => 'Number'
264 if ($self->testInt($text, 0, undef, 0, '#stay', 'Number')) {
267 # attribute => 'String'
269 # context => 'String1'
270 # type => 'DetectChar'
271 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String1', 'String')) {
274 # attribute => 'String'
276 # context => 'String2'
277 # type => 'DetectChar'
278 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String2', 'String')) {
282 # attribute => 'Directive'
284 # type => 'StringDetect'
285 if ($self->testStringDetect($text, '(*$', 0, 0, 0, undef, 0, 'Prep1', 'Directive')) {
288 # attribute => 'Comment'
291 # context => 'Comment2'
292 # type => 'Detect2Chars'
293 if ($self->testDetect2Chars($text, '(', '*', 0, 0, 0, undef, 0, 'Comment2', 'Comment')) {
300 my ($self, $text) = @_;
302 # attribute => 'Directive'
304 # type => 'StringDetect'
305 if ($self->testStringDetect($text, '$*)', 0, 0, 0, undef, 0, 'Prep1', 'Directive')) {
312 my ($self, $text) = @_;
313 # attribute => 'String'
316 # type => 'DetectChar'
317 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
324 my ($self, $text) = @_;
325 # attribute => 'String'
328 # type => 'DetectChar'
329 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) {
342 Syntax::Highlight::Engine::Kate::Modulaminus2 - a Plugin for Modula-2 syntax highlighting
346 require Syntax::Highlight::Engine::Kate::Modulaminus2;
347 my $sh = new Syntax::Highlight::Engine::Kate::Modulaminus2([
352 Syntax::Highlight::Engine::Kate::Modulaminus2 is a plugin module that provides syntax highlighting
353 for Modula-2 to the Syntax::Haghlight::Engine::Kate highlighting engine.
355 This code is generated from the syntax definition files used
357 It works quite fine, but can use refinement and optimization.
359 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
365 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
371 Unknown. If you find any, please contact the author