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 'cue.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:04 2008, localtime
12 package Syntax::Highlight::Engine::Kate::CUE_Sheet;
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 'Decimal' => 'DecVal',
27 'Flags' => 'Reserved',
28 'Format' => 'Function',
29 'Keyword' => 'Keyword',
31 'Normal Text' => 'Normal',
34 $self->listAdd('flags',
40 $self->listAdd('format',
47 $self->listAdd('keywords',
62 $self->listAdd('mode',
72 callback => \&parseComment,
73 attribute => 'Comment',
77 callback => \&parseNormal,
78 attribute => 'Normal Text',
81 callback => \&parseString,
82 attribute => 'String',
86 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
87 $self->basecontext('Normal');
88 $self->keywordscase(0);
90 bless ($self, $class);
99 my ($self, $text) = @_;
104 my ($self, $text) = @_;
105 # String => 'keywords'
106 # attribute => 'Keyword'
109 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
113 # attribute => 'Format'
116 if ($self->testKeyword($text, 'format', 0, undef, 0, '#stay', 'Format')) {
120 # attribute => 'Mode'
123 if ($self->testKeyword($text, 'mode', 0, undef, 0, '#stay', 'Mode')) {
127 # attribute => 'Flags'
130 if ($self->testKeyword($text, 'flags', 0, undef, 0, '#stay', 'Flags')) {
133 # attribute => 'Decimal'
136 if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
139 # attribute => 'String'
141 # context => 'String'
142 # type => 'DetectChar'
143 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
146 # attribute => 'Comment'
148 # context => 'Comment'
149 # type => 'DetectChar'
150 if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
157 my ($self, $text) = @_;
158 # attribute => 'String'
160 # type => 'LineContinue'
161 if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) {
164 # attribute => 'String'
167 # type => 'DetectChar'
168 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
181 Syntax::Highlight::Engine::Kate::CUE_Sheet - a Plugin for CUE Sheet syntax highlighting
185 require Syntax::Highlight::Engine::Kate::CUE_Sheet;
186 my $sh = new Syntax::Highlight::Engine::Kate::CUE_Sheet([
191 Syntax::Highlight::Engine::Kate::CUE_Sheet is a plugin module that provides syntax highlighting
192 for CUE Sheet to the Syntax::Haghlight::Engine::Kate highlighting engine.
194 This code is generated from the syntax definition files used
196 It works quite fine, but can use refinement and optimization.
198 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
204 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
210 Unknown. If you find any, please contact the author