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 'logtalk.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #kate author Paulo Moura (pmoura@logtalk.org)
11 #generated: Sun Feb 3 22:02:05 2008, localtime
13 package Syntax::Highlight::Engine::Kate::Logtalk;
15 our $VERSION = '0.06';
19 use base('Syntax::Highlight::Engine::Kate::Template');
23 my $class = ref($proto) || $proto;
24 my $self = $class->SUPER::new(@_);
26 'Built-in' => 'Keyword',
27 'Comment' => 'Comment',
28 'Directive' => 'Keyword',
31 'Operator' => 'DataType',
33 'Variable' => 'Others',
37 callback => \&parseatom,
38 attribute => 'String',
41 callback => \&parsedirective,
42 attribute => 'Directive',
44 'entityrelations' => {
45 callback => \&parseentityrelations,
46 attribute => 'Normal',
48 'multiline comment' => {
49 callback => \&parsemultilinecomment,
50 attribute => 'Comment',
53 callback => \&parsenormal,
54 attribute => 'Normal',
56 'single line comment' => {
57 callback => \&parsesinglelinecomment,
58 attribute => 'Comment',
62 callback => \&parsestring,
63 attribute => 'String',
66 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
67 $self->basecontext('normal');
68 $self->keywordscase(1);
70 bless ($self, $class);
79 my ($self, $text) = @_;
80 # attribute => 'String'
83 # type => 'DetectChar'
84 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) {
91 my ($self, $text) = @_;
92 # String => '\b(category|object|protocol)(?=[(])'
93 # attribute => 'Directive'
94 # beginRegion => 'Entity'
95 # context => 'entityrelations'
97 if ($self->testRegExpr($text, '\\b(category|object|protocol)(?=[(])', 0, 0, 0, undef, 0, 'entityrelations', 'Directive')) {
100 # String => '\bend_(category|object|protocol)[.]'
101 # attribute => 'Directive'
103 # endRegion => 'Entity'
105 if ($self->testRegExpr($text, '\\bend_(category|object|protocol)[.]', 0, 0, 0, undef, 0, '#pop', 'Directive')) {
108 # String => '\bp(ublic|r(otected|ivate))(?=[(])'
109 # attribute => 'Directive'
112 if ($self->testRegExpr($text, '\\bp(ublic|r(otected|ivate))(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) {
115 # String => '\bencoding(?=[(])'
116 # attribute => 'Directive'
119 if ($self->testRegExpr($text, '\\bencoding(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) {
122 # String => '\bin(fo|itialization)(?=[(])'
123 # attribute => 'Directive'
126 if ($self->testRegExpr($text, '\\bin(fo|itialization)(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) {
129 # String => '\bdynamic[.]'
130 # attribute => 'Directive'
133 if ($self->testRegExpr($text, '\\bdynamic[.]', 0, 0, 0, undef, 0, '#pop', 'Directive')) {
136 # String => '\b(alias|d(ynamic|iscontiguous)|m(etapredicate|ode|ultifile))(?=[(])'
137 # attribute => 'Directive'
140 if ($self->testRegExpr($text, '\\b(alias|d(ynamic|iscontiguous)|m(etapredicate|ode|ultifile))(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) {
143 # String => '\bop(?=[(])'
144 # attribute => 'Directive'
147 if ($self->testRegExpr($text, '\\bop(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) {
150 # String => '\b(calls|uses)(?=[(])'
151 # attribute => 'Directive'
154 if ($self->testRegExpr($text, '\\b(calls|uses)(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) {
160 sub parseentityrelations {
161 my ($self, $text) = @_;
162 # String => '\b(extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])'
163 # attribute => 'Directive'
166 if ($self->testRegExpr($text, '\\b(extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Directive')) {
169 # attribute => 'Normal'
172 # context => 'normal'
173 # type => 'Detect2Chars'
174 if ($self->testDetect2Chars($text, ')', '.', 0, 0, 0, undef, 0, 'normal', 'Normal')) {
180 sub parsemultilinecomment {
181 my ($self, $text) = @_;
182 # attribute => 'Comment'
186 # endRegion => 'Comment'
187 # type => 'Detect2Chars'
188 if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
195 my ($self, $text) = @_;
197 # attribute => 'Normal'
198 # context => 'directive'
200 if ($self->testRegExpr($text, '^\\s*:-', 0, 0, 0, undef, 0, 'directive', 'Normal')) {
203 # String => '\b(after|before)(?=[(])'
204 # attribute => 'Built-in'
207 if ($self->testRegExpr($text, '\\b(after|before)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
210 # String => '\b(parameter|this|se(lf|nder))(?=[(])'
211 # attribute => 'Built-in'
214 if ($self->testRegExpr($text, '\\b(parameter|this|se(lf|nder))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
217 # String => '\b(current_predicate|predicate_property)(?=[(])'
218 # attribute => 'Built-in'
221 if ($self->testRegExpr($text, '\\b(current_predicate|predicate_property)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
224 # String => '\b(expand_term|phrase)(?=[(])'
225 # attribute => 'Built-in'
228 if ($self->testRegExpr($text, '\\b(expand_term|phrase)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
231 # String => '\b(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])'
232 # attribute => 'Built-in'
235 if ($self->testRegExpr($text, '\\b(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
238 # String => '\b(object|protocol|category)_property(?=[(])'
239 # attribute => 'Built-in'
242 if ($self->testRegExpr($text, '\\b(object|protocol|category)_property(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
245 # String => '\bextends_(object|protocol)(?=[(])'
246 # attribute => 'Built-in'
249 if ($self->testRegExpr($text, '\\bextends_(object|protocol)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
252 # String => '\bimplements_protocol(?=[(])'
253 # attribute => 'Built-in'
256 if ($self->testRegExpr($text, '\\bimplements_protocol(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
259 # String => '\b(instantiates|specializes)_class(?=[(])'
260 # attribute => 'Built-in'
263 if ($self->testRegExpr($text, '\\b(instantiates|specializes)_class(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
266 # String => '\bimports_category(?=[(])'
267 # attribute => 'Built-in'
270 if ($self->testRegExpr($text, '\\bimports_category(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
273 # String => '\b(current_event|(abolish|define)_events)(?=[(])'
274 # attribute => 'Built-in'
277 if ($self->testRegExpr($text, '\\b(current_event|(abolish|define)_events)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
280 # String => '\b(current|set)_logtalk_flag(?=[(])'
281 # attribute => 'Built-in'
284 if ($self->testRegExpr($text, '\\b(current|set)_logtalk_flag(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
287 # String => '\blogtalk_(compile|l(ibrary_path|oad))(?=[(])'
288 # attribute => 'Built-in'
291 if ($self->testRegExpr($text, '\\blogtalk_(compile|l(ibrary_path|oad))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
294 # String => '\b(clause|retract(all)?)(?=[(])'
295 # attribute => 'Built-in'
298 if ($self->testRegExpr($text, '\\b(clause|retract(all)?)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
301 # String => '\ba(bolish|ssert(a|z))(?=[(])'
302 # attribute => 'Built-in'
305 if ($self->testRegExpr($text, '\\ba(bolish|ssert(a|z))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
308 # String => '\b(ca(ll|tch)|throw)(?=[(])'
309 # attribute => 'Built-in'
312 if ($self->testRegExpr($text, '\\b(ca(ll|tch)|throw)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
315 # String => '\b(fail|true)\b'
316 # attribute => 'Built-in'
319 if ($self->testRegExpr($text, '\\b(fail|true)\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
322 # String => '\b((bag|set)of|f(ind|or)all)(?=[(])'
323 # attribute => 'Built-in'
326 if ($self->testRegExpr($text, '\\b((bag|set)of|f(ind|or)all)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
329 # String => '\bunify_with_occurs_check(?=[(])'
330 # attribute => 'Built-in'
333 if ($self->testRegExpr($text, '\\bunify_with_occurs_check(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
336 # String => '\b(functor|arg|copy_term)(?=[(])'
337 # attribute => 'Built-in'
340 if ($self->testRegExpr($text, '\\b(functor|arg|copy_term)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
343 # String => '\b(rem|mod|abs|sign)(?=[(])'
344 # attribute => 'Built-in'
347 if ($self->testRegExpr($text, '\\b(rem|mod|abs|sign)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
350 # String => '\bfloat(_(integer|fractional)_part)?(?=[(])'
351 # attribute => 'Built-in'
354 if ($self->testRegExpr($text, '\\bfloat(_(integer|fractional)_part)?(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
357 # String => '\b(floor|truncate|round|ceiling)(?=[(])'
358 # attribute => 'Built-in'
361 if ($self->testRegExpr($text, '\\b(floor|truncate|round|ceiling)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
364 # String => '\b(cos|atan|exp|log|s(in|qrt))(?=[(])'
365 # attribute => 'Built-in'
368 if ($self->testRegExpr($text, '\\b(cos|atan|exp|log|s(in|qrt))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
371 # String => '\b(var|atom(ic)?|integer|float|compound|n(onvar|umber))(?=[(])'
372 # attribute => 'Built-in'
375 if ($self->testRegExpr($text, '\\b(var|atom(ic)?|integer|float|compound|n(onvar|umber))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
378 # String => '\b(current|set)_(in|out)put(?=[(])'
379 # attribute => 'Built-in'
382 if ($self->testRegExpr($text, '\\b(current|set)_(in|out)put(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
385 # String => '\b(open|close)(?=[(])'
386 # attribute => 'Built-in'
389 if ($self->testRegExpr($text, '\\b(open|close)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
392 # String => '\bflush_output(?=[(])'
393 # attribute => 'Built-in'
396 if ($self->testRegExpr($text, '\\bflush_output(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
399 # String => '\bflush_output\b'
400 # attribute => 'Built-in'
403 if ($self->testRegExpr($text, '\\bflush_output\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
406 # String => '\b(stream_property|at_end_of_stream|set_stream_position)(?=[(])'
407 # attribute => 'Built-in'
410 if ($self->testRegExpr($text, '\\b(stream_property|at_end_of_stream|set_stream_position)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
413 # String => '\b(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])'
414 # attribute => 'Built-in'
417 if ($self->testRegExpr($text, '\\b(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
421 # attribute => 'Built-in'
424 if ($self->testRegExpr($text, '\\bnl\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
427 # String => '\bread(_term)?(?=[(])'
428 # attribute => 'Built-in'
431 if ($self->testRegExpr($text, '\\bread(_term)?(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
434 # String => '\bwrite(q|_(canonical|term))?(?=[(])'
435 # attribute => 'Built-in'
438 if ($self->testRegExpr($text, '\\bwrite(q|_(canonical|term))?(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
441 # String => '\b(current_)?op(?=[(])'
442 # attribute => 'Built-in'
445 if ($self->testRegExpr($text, '\\b(current_)?op(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
448 # String => '\b(current_)?char_conversion(?=[(])'
449 # attribute => 'Built-in'
452 if ($self->testRegExpr($text, '\\b(current_)?char_conversion(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
455 # String => '\batom_(length|c(hars|o(ncat|des)))(?=[(])'
456 # attribute => 'Built-in'
459 if ($self->testRegExpr($text, '\\batom_(length|c(hars|o(ncat|des)))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
462 # String => '\b(char_code|sub_atom)(?=[(])'
463 # attribute => 'Built-in'
466 if ($self->testRegExpr($text, '\\b(char_code|sub_atom)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
469 # String => '\bnumber_c(hars|odes)(?=[(])'
470 # attribute => 'Built-in'
473 if ($self->testRegExpr($text, '\\bnumber_c(hars|odes)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
476 # String => '\b(set|current)_prolog_flag(?=[(])'
477 # attribute => 'Built-in'
480 if ($self->testRegExpr($text, '\\b(set|current)_prolog_flag(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
483 # String => '\bhalt\b'
484 # attribute => 'Built-in'
487 if ($self->testRegExpr($text, '\\bhalt\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
490 # String => '\bhalt(?=[(])'
491 # attribute => 'Built-in'
494 if ($self->testRegExpr($text, '\\bhalt(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
497 # String => '\b[A-Z_]\w*'
498 # attribute => 'Variable'
501 if ($self->testRegExpr($text, '\\b[A-Z_]\\w*', 0, 0, 0, undef, 0, '#stay', 'Variable')) {
504 # attribute => 'Comment'
506 # context => 'single line comment'
507 # type => 'DetectChar'
508 if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, 'single line comment', 'Comment')) {
511 # attribute => 'Comment'
512 # beginRegion => 'Comment'
515 # context => 'multiline comment'
516 # type => 'Detect2Chars'
517 if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'multiline comment', 'Comment')) {
520 # attribute => 'String'
522 # context => 'string'
523 # type => 'DetectChar'
524 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string', 'String')) {
527 # attribute => 'String'
530 # type => 'DetectChar'
531 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'atom', 'String')) {
535 # attribute => 'Number'
538 if ($self->testRegExpr($text, '0\'.', 0, 0, 0, undef, 0, '#stay', 'Number')) {
541 # String => '0b[0-1]+'
542 # attribute => 'Number'
545 if ($self->testRegExpr($text, '0b[0-1]+', 0, 0, 0, undef, 0, '#stay', 'Number')) {
548 # String => '0o[0-7]+'
549 # attribute => 'Number'
552 if ($self->testRegExpr($text, '0o[0-7]+', 0, 0, 0, undef, 0, '#stay', 'Number')) {
555 # String => '0x[0-9a-fA-F]+'
556 # attribute => 'Number'
559 if ($self->testRegExpr($text, '0x[0-9a-fA-F]+', 0, 0, 0, undef, 0, '#stay', 'Number')) {
562 # String => '\d+(\.\d+)?([eE]([-+])?\d+)?'
563 # attribute => 'Number'
566 if ($self->testRegExpr($text, '\\d+(\\.\\d+)?([eE]([-+])?\\d+)?', 0, 0, 0, undef, 0, '#stay', 'Number')) {
569 # attribute => 'Operator'
573 # type => 'Detect2Chars'
574 if ($self->testDetect2Chars($text, ':', ':', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
577 # attribute => 'Operator'
581 # type => 'Detect2Chars'
582 if ($self->testDetect2Chars($text, '^', '^', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
585 # attribute => 'Operator'
586 # beginRegion => 'external'
589 # type => 'DetectChar'
590 if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
593 # attribute => 'Operator'
596 # endRegion => 'external'
597 # type => 'DetectChar'
598 if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
601 # String => '\bonce(?=[(])'
602 # attribute => 'Built-in'
605 if ($self->testRegExpr($text, '\\bonce(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
608 # String => '\brepeat\b'
609 # attribute => 'Built-in'
612 if ($self->testRegExpr($text, '\\brepeat\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) {
615 # attribute => 'Operator'
619 # type => 'Detect2Chars'
620 if ($self->testDetect2Chars($text, '>', '>', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
623 # attribute => 'Operator'
627 # type => 'Detect2Chars'
628 if ($self->testDetect2Chars($text, '<', '<', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
631 # attribute => 'Operator'
635 # type => 'Detect2Chars'
636 if ($self->testDetect2Chars($text, '/', '\\', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
639 # attribute => 'Operator'
643 # type => 'Detect2Chars'
644 if ($self->testDetect2Chars($text, '\\', '/', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
647 # attribute => 'Operator'
651 # type => 'Detect2Chars'
652 if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
656 # attribute => 'Operator'
659 if ($self->testRegExpr($text, '\\bis\\b', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
663 # attribute => 'Operator'
665 # type => 'StringDetect'
666 if ($self->testStringDetect($text, '=:=', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
670 # attribute => 'Operator'
672 # type => 'StringDetect'
673 if ($self->testStringDetect($text, '=\\=', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
676 # attribute => 'Operator'
679 # type => 'DetectChar'
680 if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
683 # attribute => 'Operator'
687 # type => 'Detect2Chars'
688 if ($self->testDetect2Chars($text, '=', '<', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
691 # attribute => 'Operator'
694 # type => 'DetectChar'
695 if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
698 # attribute => 'Operator'
702 # type => 'Detect2Chars'
703 if ($self->testDetect2Chars($text, '>', '=', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
707 # attribute => 'Operator'
709 # type => 'StringDetect'
710 if ($self->testStringDetect($text, '=..', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
713 # attribute => 'Operator'
716 # type => 'DetectChar'
717 if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
720 # attribute => 'Operator'
724 # type => 'Detect2Chars'
725 if ($self->testDetect2Chars($text, '\\', '=', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
728 # attribute => 'Operator'
732 # type => 'Detect2Chars'
733 if ($self->testDetect2Chars($text, '=', '=', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
737 # attribute => 'Operator'
739 # type => 'StringDetect'
740 if ($self->testStringDetect($text, '\\==', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
744 # attribute => 'Operator'
746 # type => 'StringDetect'
747 if ($self->testStringDetect($text, '@=<', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
750 # attribute => 'Operator'
754 # type => 'Detect2Chars'
755 if ($self->testDetect2Chars($text, '@', '<', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
759 # attribute => 'Operator'
761 # type => 'StringDetect'
762 if ($self->testStringDetect($text, '@>=', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
765 # attribute => 'Operator'
769 # type => 'Detect2Chars'
770 if ($self->testDetect2Chars($text, '@', '>', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
773 # attribute => 'Operator'
777 # type => 'Detect2Chars'
778 if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
782 # attribute => 'Operator'
785 if ($self->testAnyChar($text, '+-*/', 0, 0, undef, 0, '#stay', 'Operator')) {
788 # String => '\b(mod|rem)\b'
789 # attribute => 'Operator'
792 if ($self->testRegExpr($text, '\\b(mod|rem)\\b', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
795 # attribute => 'Operator'
799 # type => 'Detect2Chars'
800 if ($self->testDetect2Chars($text, '*', '*', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
804 # attribute => 'Operator'
806 # type => 'StringDetect'
807 if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
811 # attribute => 'Operator'
814 if ($self->testAnyChar($text, '!;', 0, 0, undef, 0, '#stay', 'Operator')) {
817 # attribute => 'Operator'
821 # type => 'Detect2Chars'
822 if ($self->testDetect2Chars($text, '-', '>', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
825 # attribute => 'Operator'
829 # type => 'Detect2Chars'
830 if ($self->testDetect2Chars($text, '\\', '+', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
834 # attribute => 'Operator'
837 if ($self->testAnyChar($text, '?@', 0, 0, undef, 0, '#stay', 'Operator')) {
840 # attribute => 'Normal'
844 # firstNonSpace => 'false'
845 # type => 'Detect2Chars'
846 if ($self->testDetect2Chars($text, ':', '-', 0, 0, 0, undef, 0, '#stay', 'Normal')) {
849 # String => '\b[a-z]\w*'
850 # attribute => 'Normal'
853 if ($self->testRegExpr($text, '\\b[a-z]\\w*', 0, 0, 0, undef, 0, '#stay', 'Normal')) {
859 sub parsesinglelinecomment {
860 my ($self, $text) = @_;
865 my ($self, $text) = @_;
866 # attribute => 'String'
869 # type => 'DetectChar'
870 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
883 Syntax::Highlight::Engine::Kate::Logtalk - a Plugin for Logtalk syntax highlighting
887 require Syntax::Highlight::Engine::Kate::Logtalk;
888 my $sh = new Syntax::Highlight::Engine::Kate::Logtalk([
893 Syntax::Highlight::Engine::Kate::Logtalk is a plugin module that provides syntax highlighting
894 for Logtalk to the Syntax::Haghlight::Engine::Kate highlighting engine.
896 This code is generated from the syntax definition files used
898 It works quite fine, but can use refinement and optimization.
900 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
906 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
912 Unknown. If you find any, please contact the author