Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Syntax / Highlight / Engine / Kate / ChangeLog.pm
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.
4
5 # This file was generated from the 'changelog.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7
8 #kate xml version 1.04
9 #kate version 2.4
10 #kate author Dominik Haumann (dhdev@gmx.de)
11 #generated: Sun Feb  3 22:02:04 2008, localtime
12
13 package Syntax::Highlight::Engine::Kate::ChangeLog;
14
15 our $VERSION = '0.06';
16
17 use strict;
18 use warnings;
19 use base('Syntax::Highlight::Engine::Kate::Template');
20
21 sub new {
22    my $proto = shift;
23    my $class = ref($proto) || $proto;
24    my $self = $class->SUPER::new(@_);
25    $self->attributes({
26       'Date' => 'DataType',
27       'E-Mail' => 'Others',
28       'Entry' => 'DecVal',
29       'Name' => 'Keyword',
30       'Normal Text' => 'Normal',
31    });
32    $self->contextdata({
33       'Normal' => {
34          callback => \&parseNormal,
35          attribute => 'Normal Text',
36       },
37       'entry' => {
38          callback => \&parseentry,
39          attribute => 'Normal Text',
40          lineending => '#pop',
41       },
42       'line' => {
43          callback => \&parseline,
44          attribute => 'Normal Text',
45          lineending => '#pop',
46       },
47    });
48    $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
49    $self->basecontext('Normal');
50    $self->keywordscase(0);
51    $self->initialize;
52    bless ($self, $class);
53    return $self;
54 }
55
56 sub language {
57    return 'ChangeLog';
58 }
59
60 sub parseNormal {
61    my ($self, $text) = @_;
62    # attribute => 'Entry'
63    # char => '*'
64    # context => 'entry'
65    # firstNonSpace => 'true'
66    # type => 'DetectChar'
67    if ($self->testDetectChar($text, '*', 0, 0, 0, undef, 1, 'entry', 'Entry')) {
68       return 1
69    }
70    # String => '\d\d\d\d\s*-\s*\d\d\s*-\s*\d\d\s*'
71    # attribute => 'Date'
72    # column => '0'
73    # context => 'line'
74    # type => 'RegExpr'
75    if ($self->testRegExpr($text, '\\d\\d\\d\\d\\s*-\\s*\\d\\d\\s*-\\s*\\d\\d\\s*', 0, 0, 0, 0, 0, 'line', 'Date')) {
76       return 1
77    }
78    return 0;
79 };
80
81 sub parseentry {
82    my ($self, $text) = @_;
83    # String => '.*:'
84    # attribute => 'Entry'
85    # context => '#pop'
86    # minimal => 'true'
87    # type => 'RegExpr'
88    if ($self->testRegExpr($text, '.*?:', 0, 0, 0, undef, 0, '#pop', 'Entry')) {
89       return 1
90    }
91    return 0;
92 };
93
94 sub parseline {
95    my ($self, $text) = @_;
96    # String => '(\w\s*)+'
97    # attribute => 'Name'
98    # context => '#stay'
99    # type => 'RegExpr'
100    if ($self->testRegExpr($text, '(\\w\\s*)+', 0, 0, 0, undef, 0, '#stay', 'Name')) {
101       return 1
102    }
103    # String => '<.*>\s*$'
104    # attribute => 'E-Mail'
105    # context => '#pop'
106    # type => 'RegExpr'
107    if ($self->testRegExpr($text, '<.*>\\s*$', 0, 0, 0, undef, 0, '#pop', 'E-Mail')) {
108       return 1
109    }
110    return 0;
111 };
112
113
114 1;
115
116 __END__
117
118 =head1 NAME
119
120 Syntax::Highlight::Engine::Kate::ChangeLog - a Plugin for ChangeLog syntax highlighting
121
122 =head1 SYNOPSIS
123
124  require Syntax::Highlight::Engine::Kate::ChangeLog;
125  my $sh = new Syntax::Highlight::Engine::Kate::ChangeLog([
126  ]);
127
128 =head1 DESCRIPTION
129
130 Syntax::Highlight::Engine::Kate::ChangeLog is a  plugin module that provides syntax highlighting
131 for ChangeLog to the Syntax::Haghlight::Engine::Kate highlighting engine.
132
133 This code is generated from the syntax definition files used
134 by the Kate project.
135 It works quite fine, but can use refinement and optimization.
136
137 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
138
139 =cut
140
141 =head1 AUTHOR
142
143 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
144
145 =cut
146
147 =head1 BUGS
148
149 Unknown. If you find any, please contact the author
150
151 =cut
152