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 'euphoria.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #kate author Irv Mullins (irvm@ellijay.com)
11 #generated: Sun Feb 3 22:02:04 2008, localtime
13 package Syntax::Highlight::Engine::Kate::Euphoria;
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 'Directive' => 'Others',
28 'GtkKeyword' => 'Keyword',
29 'Keyword' => 'Keyword',
30 'Normal Text' => 'Normal',
32 'Region Marker' => 'RegionMarker',
36 $self->listAdd('GtkKeywords',
55 'cell_renderer_toggle',
79 'font_selection_dialog',
125 'separator_menu_item',
153 $self->listAdd('constants',
157 $self->listAdd('keywords',
197 'display_text_image',
306 $self->listAdd('types',
317 callback => \&parseComment,
318 attribute => 'Comment',
319 lineending => '#pop',
322 callback => \&parseNormal,
323 attribute => 'Normal Text',
326 callback => \&parseString,
327 attribute => 'String',
328 lineending => '#pop',
331 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
332 $self->basecontext('Normal');
333 $self->keywordscase(0);
335 bless ($self, $class);
344 my ($self, $text) = @_;
345 # context => '##Alerts'
346 # type => 'IncludeRules'
347 if ($self->includePlugin('Alerts', $text)) {
354 my ($self, $text) = @_;
355 # String => '\bend\s+for\b'
356 # attribute => 'Keyword'
358 # endRegion => 'regFor'
360 if ($self->testRegExpr($text, '\\bend\\s+for\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
363 # String => '\bfor\b'
364 # attribute => 'Keyword'
365 # beginRegion => 'regFor'
368 if ($self->testRegExpr($text, '\\bfor\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
371 # String => '\bend\s+if\b'
372 # attribute => 'Keyword'
374 # endRegion => 'regIf'
376 if ($self->testRegExpr($text, '\\bend\\s+if\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
380 # attribute => 'Keyword'
381 # beginRegion => 'regIf'
384 if ($self->testRegExpr($text, '\\bif\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
387 # String => '\bend\s+function\b'
388 # attribute => 'Keyword'
390 # endRegion => 'regFunction'
392 if ($self->testRegExpr($text, '\\bend\\s+function\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
395 # String => '\bfunction\b'
396 # attribute => 'Keyword'
397 # beginRegion => 'regFunction'
400 if ($self->testRegExpr($text, '\\bfunction\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
403 # String => '\bend\s+procedure\b'
404 # attribute => 'Keyword'
406 # endRegion => 'regProcedure'
408 if ($self->testRegExpr($text, '\\bend\\s+procedure\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
411 # String => '\bprocedure\b'
412 # attribute => 'Keyword'
413 # beginRegion => 'regProcedure'
416 if ($self->testRegExpr($text, '\\bprocedure\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
419 # String => '\bend\s+while\b'
420 # attribute => 'Keyword'
422 # endRegion => 'regWhile'
424 if ($self->testRegExpr($text, '\\bend\\s+while\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
427 # String => '\bwhile\b'
428 # attribute => 'Keyword'
429 # beginRegion => 'regWhile'
432 if ($self->testRegExpr($text, '\\bwhile\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
435 # String => '\bend\s+type\b'
436 # attribute => 'Keyword'
438 # endRegion => 'regType'
440 if ($self->testRegExpr($text, '\\bend\\s+type\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
443 # String => '\btype\b'
444 # attribute => 'Keyword'
445 # beginRegion => 'regType'
448 if ($self->testRegExpr($text, '\\btype\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
451 # String => 'keywords'
452 # attribute => 'Keyword'
455 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
458 # String => 'GtkKeywords'
459 # attribute => 'GtkKeyword'
462 if ($self->testKeyword($text, 'GtkKeywords', 0, undef, 0, '#stay', 'GtkKeyword')) {
466 # attribute => 'Type'
469 if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Type')) {
472 # attribute => 'Number'
475 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Number')) {
478 # attribute => 'Number'
481 if ($self->testInt($text, 0, undef, 0, '#stay', 'Number')) {
484 # attribute => 'String'
486 # context => 'String'
487 # type => 'DetectChar'
488 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
491 # String => '--\s*BEGIN.*'
492 # attribute => 'Region Marker'
493 # beginRegion => 'regMarker'
495 # firstNonSpace => 'true'
497 if ($self->testRegExpr($text, '--\\s*BEGIN.*', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) {
500 # String => '--\s*END.*'
501 # attribute => 'Region Marker'
503 # endRegion => 'regMarker'
504 # firstNonSpace => 'true'
506 if ($self->testRegExpr($text, '--\\s*END.*', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) {
509 # attribute => 'Comment'
512 # context => 'Comment'
513 # type => 'Detect2Chars'
514 if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
521 my ($self, $text) = @_;
522 # attribute => 'String'
525 # type => 'DetectChar'
526 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
539 Syntax::Highlight::Engine::Kate::Euphoria - a Plugin for Euphoria syntax highlighting
543 require Syntax::Highlight::Engine::Kate::Euphoria;
544 my $sh = new Syntax::Highlight::Engine::Kate::Euphoria([
549 Syntax::Highlight::Engine::Kate::Euphoria is a plugin module that provides syntax highlighting
550 for Euphoria to the Syntax::Haghlight::Engine::Kate highlighting engine.
552 This code is generated from the syntax definition files used
554 It works quite fine, but can use refinement and optimization.
556 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
562 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
568 Unknown. If you find any, please contact the author