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 'm3u.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
9 #kate author Jan Janssen (medhefgo@web.de)
10 #generated: Sun Feb 3 22:02:05 2008, localtime
12 package Syntax::Highlight::Engine::Kate::M3U;
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',
29 'M3USpec' => 'Keyword',
30 'Normal Text' => 'Normal',
34 callback => \&parseFindEXTINF,
35 attribute => 'Normal Text',
38 callback => \&parseM3U,
39 attribute => 'Normal Text',
42 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
43 $self->basecontext('M3U');
44 $self->keywordscase(1);
46 bless ($self, $class);
55 my ($self, $text) = @_;
57 # attribute => 'Lenght'
59 if ($self->testRegExpr($text, ':\\d+', 0, 0, 0, undef, 0, '#stay', 'Lenght')) {
63 # attribute => 'Descr'
66 if ($self->testRegExpr($text, ',.*$', 0, 0, 0, undef, 0, '#pop', 'Descr')) {
73 my ($self, $text) = @_;
75 # attribute => 'M3USpec'
78 # type => 'StringDetect'
79 if ($self->testStringDetect($text, '#EXTM3U', 0, 0, 0, 0, 0, '#pop', 'M3USpec')) {
83 # attribute => 'EXTINF'
85 # context => 'FindEXTINF'
86 # type => 'StringDetect'
87 if ($self->testStringDetect($text, '#EXTINF', 0, 0, 0, 0, 0, 'FindEXTINF', 'EXTINF')) {
91 # attribute => 'Comment'
92 # firstNonSpace => 'true'
94 if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 1, '#stay', 'Comment')) {
107 Syntax::Highlight::Engine::Kate::M3U - a Plugin for M3U syntax highlighting
111 require Syntax::Highlight::Engine::Kate::M3U;
112 my $sh = new Syntax::Highlight::Engine::Kate::M3U([
117 Syntax::Highlight::Engine::Kate::M3U is a plugin module that provides syntax highlighting
118 for M3U to the Syntax::Haghlight::Engine::Kate highlighting engine.
120 This code is generated from the syntax definition files used
122 It works quite fine, but can use refinement and optimization.
124 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
130 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
136 Unknown. If you find any, please contact the author