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 'rexx.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:06 2008, localtime
12 package Syntax::Highlight::Engine::Kate::REXX;
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(@_);
26 'Built In' => 'Normal',
27 'Comment' => 'Comment',
28 'Function' => 'Function',
29 'Instructions' => 'Keyword',
30 'Normal Text' => 'Normal',
34 $self->listAdd('builtin',
100 $self->listAdd('instructions',
125 callback => \&parseCommentar1,
126 attribute => 'Comment',
129 callback => \&parseNormal,
130 attribute => 'Normal Text',
133 callback => \&parseString,
134 attribute => 'String',
135 lineending => '#pop',
138 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
139 $self->basecontext('Normal');
140 $self->keywordscase(0);
142 bless ($self, $class);
150 sub parseCommentar1 {
151 my ($self, $text) = @_;
152 # String => '(FIXME|TODO)'
153 # attribute => 'Alert'
156 if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) {
159 # attribute => 'Comment'
163 # endRegion => 'Comment'
164 # type => 'Detect2Chars'
165 if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
172 my ($self, $text) = @_;
173 # String => 'instructions'
174 # attribute => 'Instructions'
177 if ($self->testKeyword($text, 'instructions', 0, undef, 0, '#stay', 'Instructions')) {
180 # String => 'builtin'
181 # attribute => 'Built In'
184 if ($self->testKeyword($text, 'builtin', 0, undef, 0, '#stay', 'Built In')) {
187 # String => '\bsignal([\s]*(on|off)[\s]*(error|failure|halt|notready|novalue|syntax|lostdigits))*'
188 # attribute => 'Instructions'
190 # insensitive => 'true'
192 if ($self->testRegExpr($text, '\\bsignal([\\s]*(on|off)[\\s]*(error|failure|halt|notready|novalue|syntax|lostdigits))*', 1, 0, 0, undef, 0, '#stay', 'Instructions')) {
195 # String => '\bcall([\s]*(on|off)[\s]*(error|failure|halt|notready))*'
196 # attribute => 'Instructions'
198 # insensitive => 'true'
200 if ($self->testRegExpr($text, '\\bcall([\\s]*(on|off)[\\s]*(error|failure|halt|notready))*', 1, 0, 0, undef, 0, '#stay', 'Instructions')) {
203 # String => '\b(trace|address)\s*[_\w\d]'
204 # attribute => 'Instructions'
206 # insensitive => 'true'
208 if ($self->testRegExpr($text, '\\b(trace|address)\\s*[_\\w\\d]', 1, 0, 0, undef, 0, '#stay', 'Instructions')) {
211 # String => '\bprocedure([\s]*expose)?'
212 # attribute => 'Instructions'
214 # insensitive => 'true'
216 if ($self->testRegExpr($text, '\\bprocedure([\\s]*expose)?', 1, 0, 0, undef, 0, '#stay', 'Instructions')) {
219 # String => '\bdo([\s]*forever)?'
220 # attribute => 'Instructions'
222 # insensitive => 'true'
224 if ($self->testRegExpr($text, '\\bdo([\\s]*forever)?', 1, 0, 0, undef, 0, '#stay', 'Instructions')) {
227 # attribute => 'String'
229 # context => 'String'
230 # type => 'DetectChar'
231 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String', 'String')) {
234 # attribute => 'Comment'
235 # beginRegion => 'Comment'
238 # context => 'Commentar 1'
239 # type => 'Detect2Chars'
240 if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) {
243 # String => ':!%&()+,-/.*<=>?[]{|}~^;'
244 # attribute => 'Symbol'
247 if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]{|}~^;', 0, 0, undef, 0, '#stay', 'Symbol')) {
250 # String => '\b[_\w][_\w\d]*(?=[\s]*[(:])'
251 # attribute => 'Function'
254 if ($self->testRegExpr($text, '\\b[_\\w][_\\w\\d]*(?=[\\s]*[(:])', 0, 0, 0, undef, 0, '#stay', 'Function')) {
261 my ($self, $text) = @_;
262 # attribute => 'String'
264 # type => 'LineContinue'
265 if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) {
268 # attribute => 'String'
271 # type => 'DetectChar'
272 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) {
285 Syntax::Highlight::Engine::Kate::REXX - a Plugin for REXX syntax highlighting
289 require Syntax::Highlight::Engine::Kate::REXX;
290 my $sh = new Syntax::Highlight::Engine::Kate::REXX([
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.
298 This code is generated from the syntax definition files used
300 It works quite fine, but can use refinement and optimization.
302 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
308 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
314 Unknown. If you find any, please contact the author