Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Syntax / Highlight / Engine / Kate / CUE_Sheet.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 'cue.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7
8 #kate xml version 0.91
9 #kate version 2.1
10 #generated: Sun Feb  3 22:02:04 2008, localtime
11
12 package Syntax::Highlight::Engine::Kate::CUE_Sheet;
13
14 our $VERSION = '0.06';
15
16 use strict;
17 use warnings;
18 use base('Syntax::Highlight::Engine::Kate::Template');
19
20 sub new {
21    my $proto = shift;
22    my $class = ref($proto) || $proto;
23    my $self = $class->SUPER::new(@_);
24    $self->attributes({
25       'Comment' => 'Comment',
26       'Decimal' => 'DecVal',
27       'Flags' => 'Reserved',
28       'Format' => 'Function',
29       'Keyword' => 'Keyword',
30       'Mode' => 'Operator',
31       'Normal Text' => 'Normal',
32       'String' => 'String',
33    });
34    $self->listAdd('flags',
35       '4CH',
36       'DCP',
37       'PRE',
38       'SCMS',
39    );
40    $self->listAdd('format',
41       'AIFF',
42       'BINARY',
43       'MOTOTOLA',
44       'MP3',
45       'WAVE',
46    );
47    $self->listAdd('keywords',
48       'CATALOG',
49       'CDTEXTFILE',
50       'FILE',
51       'FLAGS',
52       'INDEX',
53       'ISRC',
54       'PERFORMER',
55       'POSTGAP',
56       'PREGAP',
57       'REM',
58       'SONGWRITER',
59       'TITLE',
60       'TRACK',
61    );
62    $self->listAdd('mode',
63       'AUDIO',
64       'CDG',
65       'CDI',
66       'MODE1',
67       'MODE2',
68       'RAW',
69    );
70    $self->contextdata({
71       'Comment' => {
72          callback => \&parseComment,
73          attribute => 'Comment',
74          lineending => '#pop',
75       },
76       'Normal' => {
77          callback => \&parseNormal,
78          attribute => 'Normal Text',
79       },
80       'String' => {
81          callback => \&parseString,
82          attribute => 'String',
83          lineending => '#pop',
84       },
85    });
86    $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
87    $self->basecontext('Normal');
88    $self->keywordscase(0);
89    $self->initialize;
90    bless ($self, $class);
91    return $self;
92 }
93
94 sub language {
95    return 'CUE Sheet';
96 }
97
98 sub parseComment {
99    my ($self, $text) = @_;
100    return 0;
101 };
102
103 sub parseNormal {
104    my ($self, $text) = @_;
105    # String => 'keywords'
106    # attribute => 'Keyword'
107    # context => '#stay'
108    # type => 'keyword'
109    if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
110       return 1
111    }
112    # String => 'format'
113    # attribute => 'Format'
114    # context => '#stay'
115    # type => 'keyword'
116    if ($self->testKeyword($text, 'format', 0, undef, 0, '#stay', 'Format')) {
117       return 1
118    }
119    # String => 'mode'
120    # attribute => 'Mode'
121    # context => '#stay'
122    # type => 'keyword'
123    if ($self->testKeyword($text, 'mode', 0, undef, 0, '#stay', 'Mode')) {
124       return 1
125    }
126    # String => 'flags'
127    # attribute => 'Flags'
128    # context => '#stay'
129    # type => 'keyword'
130    if ($self->testKeyword($text, 'flags', 0, undef, 0, '#stay', 'Flags')) {
131       return 1
132    }
133    # attribute => 'Decimal'
134    # context => '#stay'
135    # type => 'Int'
136    if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
137       return 1
138    }
139    # attribute => 'String'
140    # char => '"'
141    # context => 'String'
142    # type => 'DetectChar'
143    if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
144       return 1
145    }
146    # attribute => 'Comment'
147    # char => ';'
148    # context => 'Comment'
149    # type => 'DetectChar'
150    if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
151       return 1
152    }
153    return 0;
154 };
155
156 sub parseString {
157    my ($self, $text) = @_;
158    # attribute => 'String'
159    # context => '#stay'
160    # type => 'LineContinue'
161    if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) {
162       return 1
163    }
164    # attribute => 'String'
165    # char => '"'
166    # context => '#pop'
167    # type => 'DetectChar'
168    if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
169       return 1
170    }
171    return 0;
172 };
173
174
175 1;
176
177 __END__
178
179 =head1 NAME
180
181 Syntax::Highlight::Engine::Kate::CUE_Sheet - a Plugin for CUE Sheet syntax highlighting
182
183 =head1 SYNOPSIS
184
185  require Syntax::Highlight::Engine::Kate::CUE_Sheet;
186  my $sh = new Syntax::Highlight::Engine::Kate::CUE_Sheet([
187  ]);
188
189 =head1 DESCRIPTION
190
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.
193
194 This code is generated from the syntax definition files used
195 by the Kate project.
196 It works quite fine, but can use refinement and optimization.
197
198 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
199
200 =cut
201
202 =head1 AUTHOR
203
204 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
205
206 =cut
207
208 =head1 BUGS
209
210 Unknown. If you find any, please contact the author
211
212 =cut
213