Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Syntax / Highlight / Engine / Kate / REXX.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 'rexx.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7
8 #kate xml version 1.01
9 #kate version 2.3
10 #generated: Sun Feb  3 22:02:06 2008, localtime
11
12 package Syntax::Highlight::Engine::Kate::REXX;
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       'Alert' => 'Alert',
26       'Built In' => 'Normal',
27       'Comment' => 'Comment',
28       'Function' => 'Function',
29       'Instructions' => 'Keyword',
30       'Normal Text' => 'Normal',
31       'String' => 'String',
32       'Symbol' => 'Normal',
33    });
34    $self->listAdd('builtin',
35       'abbrev',
36       'abs',
37       'address',
38       'b2x',
39       'bitand',
40       'bitor',
41       'bitxor',
42       'c2d',
43       'c2x',
44       'center',
45       'charin',
46       'charout',
47       'chars',
48       'compare',
49       'condition',
50       'copies',
51       'd2c',
52       'd2x',
53       'datatype',
54       'date',
55       'delstr',
56       'delword',
57       'digits',
58       'errortext',
59       'form',
60       'format',
61       'fuzz',
62       'insert',
63       'lastpos',
64       'left',
65       'linein',
66       'lineout',
67       'lines',
68       'max',
69       'min',
70       'overlay',
71       'pos',
72       'queued',
73       'random',
74       'reverse',
75       'right',
76       'sign',
77       'sourceline',
78       'space',
79       'stream',
80       'strip',
81       'substr',
82       'subword',
83       'symbol',
84       'time',
85       'trace',
86       'translate',
87       'trunc',
88       'value',
89       'verify',
90       'word',
91       'wordindex',
92       'wordlength',
93       'wordpos',
94       'words',
95       'x2b',
96       'x2c',
97       'x2d',
98       'xrange',
99    );
100    $self->listAdd('instructions',
101       'arg',
102       'drop',
103       'else',
104       'end',
105       'exit',
106       'forever',
107       'if',
108       'interpret',
109       'iterate',
110       'leave',
111       'nop',
112       'options',
113       'otherwise',
114       'pull',
115       'push',
116       'queue',
117       'return',
118       'say',
119       'select',
120       'syntax',
121       'then',
122    );
123    $self->contextdata({
124       'Commentar 1' => {
125          callback => \&parseCommentar1,
126          attribute => 'Comment',
127       },
128       'Normal' => {
129          callback => \&parseNormal,
130          attribute => 'Normal Text',
131       },
132       'String' => {
133          callback => \&parseString,
134          attribute => 'String',
135          lineending => '#pop',
136       },
137    });
138    $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
139    $self->basecontext('Normal');
140    $self->keywordscase(0);
141    $self->initialize;
142    bless ($self, $class);
143    return $self;
144 }
145
146 sub language {
147    return 'REXX';
148 }
149
150 sub parseCommentar1 {
151    my ($self, $text) = @_;
152    # String => '(FIXME|TODO)'
153    # attribute => 'Alert'
154    # context => '#stay'
155    # type => 'RegExpr'
156    if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) {
157       return 1
158    }
159    # attribute => 'Comment'
160    # char => '*'
161    # char1 => '/'
162    # context => '#pop'
163    # endRegion => 'Comment'
164    # type => 'Detect2Chars'
165    if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
166       return 1
167    }
168    return 0;
169 };
170
171 sub parseNormal {
172    my ($self, $text) = @_;
173    # String => 'instructions'
174    # attribute => 'Instructions'
175    # context => '#stay'
176    # type => 'keyword'
177    if ($self->testKeyword($text, 'instructions', 0, undef, 0, '#stay', 'Instructions')) {
178       return 1
179    }
180    # String => 'builtin'
181    # attribute => 'Built In'
182    # context => '#stay'
183    # type => 'keyword'
184    if ($self->testKeyword($text, 'builtin', 0, undef, 0, '#stay', 'Built In')) {
185       return 1
186    }
187    # String => '\bsignal([\s]*(on|off)[\s]*(error|failure|halt|notready|novalue|syntax|lostdigits))*'
188    # attribute => 'Instructions'
189    # context => '#stay'
190    # insensitive => 'true'
191    # type => 'RegExpr'
192    if ($self->testRegExpr($text, '\\bsignal([\\s]*(on|off)[\\s]*(error|failure|halt|notready|novalue|syntax|lostdigits))*', 1, 0, 0, undef, 0, '#stay', 'Instructions')) {
193       return 1
194    }
195    # String => '\bcall([\s]*(on|off)[\s]*(error|failure|halt|notready))*'
196    # attribute => 'Instructions'
197    # context => '#stay'
198    # insensitive => 'true'
199    # type => 'RegExpr'
200    if ($self->testRegExpr($text, '\\bcall([\\s]*(on|off)[\\s]*(error|failure|halt|notready))*', 1, 0, 0, undef, 0, '#stay', 'Instructions')) {
201       return 1
202    }
203    # String => '\b(trace|address)\s*[_\w\d]'
204    # attribute => 'Instructions'
205    # context => '#stay'
206    # insensitive => 'true'
207    # type => 'RegExpr'
208    if ($self->testRegExpr($text, '\\b(trace|address)\\s*[_\\w\\d]', 1, 0, 0, undef, 0, '#stay', 'Instructions')) {
209       return 1
210    }
211    # String => '\bprocedure([\s]*expose)?'
212    # attribute => 'Instructions'
213    # context => '#stay'
214    # insensitive => 'true'
215    # type => 'RegExpr'
216    if ($self->testRegExpr($text, '\\bprocedure([\\s]*expose)?', 1, 0, 0, undef, 0, '#stay', 'Instructions')) {
217       return 1
218    }
219    # String => '\bdo([\s]*forever)?'
220    # attribute => 'Instructions'
221    # context => '#stay'
222    # insensitive => 'true'
223    # type => 'RegExpr'
224    if ($self->testRegExpr($text, '\\bdo([\\s]*forever)?', 1, 0, 0, undef, 0, '#stay', 'Instructions')) {
225       return 1
226    }
227    # attribute => 'String'
228    # char => '''
229    # context => 'String'
230    # type => 'DetectChar'
231    if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String', 'String')) {
232       return 1
233    }
234    # attribute => 'Comment'
235    # beginRegion => 'Comment'
236    # char => '/'
237    # char1 => '*'
238    # context => 'Commentar 1'
239    # type => 'Detect2Chars'
240    if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) {
241       return 1
242    }
243    # String => ':!%&()+,-/.*<=>?[]{|}~^;'
244    # attribute => 'Symbol'
245    # context => '#stay'
246    # type => 'AnyChar'
247    if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]{|}~^;', 0, 0, undef, 0, '#stay', 'Symbol')) {
248       return 1
249    }
250    # String => '\b[_\w][_\w\d]*(?=[\s]*[(:])'
251    # attribute => 'Function'
252    # context => '#stay'
253    # type => 'RegExpr'
254    if ($self->testRegExpr($text, '\\b[_\\w][_\\w\\d]*(?=[\\s]*[(:])', 0, 0, 0, undef, 0, '#stay', 'Function')) {
255       return 1
256    }
257    return 0;
258 };
259
260 sub parseString {
261    my ($self, $text) = @_;
262    # attribute => 'String'
263    # context => '#stay'
264    # type => 'LineContinue'
265    if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) {
266       return 1
267    }
268    # attribute => 'String'
269    # char => '''
270    # context => '#pop'
271    # type => 'DetectChar'
272    if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) {
273       return 1
274    }
275    return 0;
276 };
277
278
279 1;
280
281 __END__
282
283 =head1 NAME
284
285 Syntax::Highlight::Engine::Kate::REXX - a Plugin for REXX syntax highlighting
286
287 =head1 SYNOPSIS
288
289  require Syntax::Highlight::Engine::Kate::REXX;
290  my $sh = new Syntax::Highlight::Engine::Kate::REXX([
291  ]);
292
293 =head1 DESCRIPTION
294
295 Syntax::Highlight::Engine::Kate::REXX is a  plugin module that provides syntax highlighting
296 for REXX to the Syntax::Haghlight::Engine::Kate highlighting engine.
297
298 This code is generated from the syntax definition files used
299 by the Kate project.
300 It works quite fine, but can use refinement and optimization.
301
302 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
303
304 =cut
305
306 =head1 AUTHOR
307
308 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
309
310 =cut
311
312 =head1 BUGS
313
314 Unknown. If you find any, please contact the author
315
316 =cut
317