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 'spice.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #kate author Steven Robson (s.a.robson@sms.ed.ac.uk) and Anders Lund
11 #generated: Sun Feb 3 22:02:06 2008, localtime
13 package Syntax::Highlight::Engine::Kate::Spice;
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 'Keyword' => 'Keyword',
28 'Normal Text' => 'Normal',
31 'String Char' => 'Char',
35 callback => \&parseCommentar1,
36 attribute => 'Comment',
40 callback => \&parseNormal,
41 attribute => 'Normal Text',
44 callback => \&parseString,
45 attribute => 'String',
49 $self->deliminators('\\s||\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|\\.');
50 $self->basecontext('Normal');
51 $self->keywordscase(0);
53 bless ($self, $class);
62 my ($self, $text) = @_;
67 my ($self, $text) = @_;
69 # attribute => 'Keyword'
72 if ($self->testRegExpr($text, '\\B\\.\\w+', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
75 # attribute => 'Number'
78 if ($self->testInt($text, 0, undef, 0, '#stay', 'Number')) {
81 # attribute => 'Number'
84 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Number')) {
88 # attribute => 'Comment'
89 # context => 'Commentar 1'
91 if ($self->testAnyChar($text, '$*', 0, 0, undef, 0, 'Commentar 1', 'Comment')) {
94 # attribute => 'String'
97 # type => 'DetectChar'
98 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
101 # attribute => 'String'
103 # context => 'String'
104 # type => 'DetectChar'
105 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String', 'String')) {
112 my ($self, $text) = @_;
113 # attribute => 'String'
115 # type => 'LineContinue'
116 if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) {
119 # attribute => 'String Char'
121 # type => 'HlCStringChar'
122 if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) {
125 # attribute => 'String'
128 # type => 'DetectChar'
129 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) {
142 Syntax::Highlight::Engine::Kate::Spice - a Plugin for Spice syntax highlighting
146 require Syntax::Highlight::Engine::Kate::Spice;
147 my $sh = new Syntax::Highlight::Engine::Kate::Spice([
152 Syntax::Highlight::Engine::Kate::Spice is a plugin module that provides syntax highlighting
153 for Spice to the Syntax::Haghlight::Engine::Kate highlighting engine.
155 This code is generated from the syntax definition files used
157 It works quite fine, but can use refinement and optimization.
159 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
165 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
171 Unknown. If you find any, please contact the author