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 'debianchangelog.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::Debian_Changelog;
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(@_);
28 'Keyword' => 'Keyword',
29 'Normal Text' => 'Normal',
30 'Version' => 'DataType',
32 $self->listAdd('distributions',
39 $self->listAdd('keywords',
42 $self->listAdd('urgencies',
51 callback => \&parseHead,
52 attribute => 'Normal Text',
56 callback => \&parseVersion,
57 attribute => 'Version',
61 callback => \&parsenoname,
62 attribute => 'Normal Text',
65 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
66 $self->basecontext('noname');
67 $self->keywordscase(0);
69 bless ($self, $class);
74 return 'Debian Changelog';
78 my ($self, $text) = @_;
79 # attribute => 'Keyword'
81 # context => 'Version'
82 # type => 'DetectChar'
83 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Version', 'Keyword')) {
87 # attribute => 'Keyword'
90 if ($self->testRegExpr($text, '[,;=]', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
93 # String => 'keywords'
94 # attribute => 'Keyword'
97 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
100 # String => 'distributions'
101 # attribute => 'Data'
104 if ($self->testKeyword($text, 'distributions', 0, undef, 0, '#stay', 'Data')) {
107 # String => 'urgencies'
108 # attribute => 'Data'
111 if ($self->testKeyword($text, 'urgencies', 0, undef, 0, '#stay', 'Data')) {
118 my ($self, $text) = @_;
119 # attribute => 'Keyword'
122 # type => 'DetectChar'
123 if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Keyword')) {
130 my ($self, $text) = @_;
132 # attribute => 'Keyword'
136 if ($self->testRegExpr($text, '[^ ]*', 0, 0, 0, 0, 0, 'Head', 'Keyword')) {
139 # String => '<.*@.*>'
140 # attribute => 'Email'
143 if ($self->testRegExpr($text, '<.*@.*>', 0, 0, 0, undef, 0, '#stay', 'Email')) {
147 # attribute => 'Keyword'
151 if ($self->testRegExpr($text, ' \\-\\-', 0, 0, 0, 0, 0, '#stay', 'Keyword')) {
155 # attribute => 'Keyword'
159 if ($self->testRegExpr($text, ' \\*', 0, 0, 0, 0, 0, '#stay', 'Keyword')) {
162 # String => '[Cc][Ll][Oo][Ss][Ee][Ss]:[\s]*(([Bb][Uu][Gg]\s*)?#\s*\d+)(\s*, *([Bb[Uu][Gg]\s*)?#\s*\d+)*'
166 if ($self->testRegExpr($text, '[Cc][Ll][Oo][Ss][Ee][Ss]:[\\s]*(([Bb][Uu][Gg]\\s*)?#\\s*\\d+)(\\s*, *([Bb[Uu][Gg]\\s*)?#\\s*\\d+)*', 0, 0, 0, undef, 0, '#stay', 'Bug')) {
179 Syntax::Highlight::Engine::Kate::Debian_Changelog - a Plugin for Debian Changelog syntax highlighting
183 require Syntax::Highlight::Engine::Kate::Debian_Changelog;
184 my $sh = new Syntax::Highlight::Engine::Kate::Debian_Changelog([
189 Syntax::Highlight::Engine::Kate::Debian_Changelog is a plugin module that provides syntax highlighting
190 for Debian Changelog to the Syntax::Haghlight::Engine::Kate highlighting engine.
192 This code is generated from the syntax definition files used
194 It works quite fine, but can use refinement and optimization.
196 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
202 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
208 Unknown. If you find any, please contact the author