| 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 'mab.xml' file of the syntax highlight | ||||||||||||||||||||
| 6 | # engine of the kate text editor (http://www.kate-editor.org | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | #kate xml version 1.03 | ||||||||||||||||||||
| 9 | #kate version 2.4 | ||||||||||||||||||||
| 10 | #generated: Sun Feb 3 22:02:05 2008, localtime | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | package Syntax::Highlight::Engine::Kate::MABminusDB; | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 1 | our $VERSION = '0.16'; | |||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 17 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 18 | 1 | ▶ | use base('Syntax::Highlight::Engine::Kate::Template'); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 21 | 1 | my $proto = shift; | |||||||||||||||||||
| 22 | 1 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition33%1/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table33%1/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 23 | 1 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 24 | 1 | $self->attributes({ | |||||||||||||||||||
| 25 | 'Comment' => 'Comment', | ||||||||||||||||||||
| 26 | 'Database Header' => 'Operator', | ||||||||||||||||||||
| 27 | 'Header Medium' => 'Reserved', | ||||||||||||||||||||
| 28 | 'Header Piece' => 'Keyword', | ||||||||||||||||||||
| 29 | 'Mab Comment Description' => 'Others', | ||||||||||||||||||||
| 30 | 'Mab Comment Type' => 'Alert', | ||||||||||||||||||||
| 31 | 'Mab I Field' => 'DecVal', | ||||||||||||||||||||
| 32 | 'Mab M Field' => 'Float', | ||||||||||||||||||||
| 33 | 'Normal Text' => 'Normal', | ||||||||||||||||||||
| 34 | }); | ||||||||||||||||||||
| 35 | 1 | $self->contextdata({ | |||||||||||||||||||
| 36 | 'Section' => { | ||||||||||||||||||||
| 37 | callback => \&parseSection, | ||||||||||||||||||||
| 38 | attribute => 'Normal Text', | ||||||||||||||||||||
| 39 | }, | ||||||||||||||||||||
| 40 | }); | ||||||||||||||||||||
| 41 | 1 | $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); | |||||||||||||||||||
| 42 | 1 | $self->basecontext('Section'); | |||||||||||||||||||
| 43 | 1 | $self->keywordscase(1); | |||||||||||||||||||
| 44 | 1 | $self->initialize; | |||||||||||||||||||
| 45 | 1 | bless ($self, $class); | |||||||||||||||||||
| 46 | 1 | return $self; | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 0 | ▶ | sub language { | ||||||||||||||||||
|
Subroutine
language: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 50 | 0 | return 'MAB-DB'; | |||||||||||||||||||
| 51 | } | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | 0 | ▶ | sub parseSection { | ||||||||||||||||||
|
Subroutine
parseSection: not called CC=9 SCAR=45.0
Pod
undocumented
| |||||||||||||||||||||
| 54 | 0 | my ($self, $text) = @_; | |||||||||||||||||||
| 55 | # String => '\*I [a-zA-Z0-9]* ' | ||||||||||||||||||||
| 56 | # attribute => 'Mab I Field' | ||||||||||||||||||||
| 57 | # column => '0' | ||||||||||||||||||||
| 58 | # context => '#stay' | ||||||||||||||||||||
| 59 | # type => 'RegExpr' | ||||||||||||||||||||
| 60 | 0 | ▶ | if ($self->testRegExpr($text, '\\*I [a-zA-Z0-9]* ', 0, 0, 0, 0, 0, '#stay', 'Mab I Field')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 61 | 0 | return 1 | |||||||||||||||||||
| 62 | } | ||||||||||||||||||||
| 63 | # String => '\*\*\*\**E.*' | ||||||||||||||||||||
| 64 | # attribute => 'Header Piece' | ||||||||||||||||||||
| 65 | # column => '0' | ||||||||||||||||||||
| 66 | # context => '#stay' | ||||||||||||||||||||
| 67 | # type => 'RegExpr' | ||||||||||||||||||||
| 68 | 0 | ▶ | if ($self->testRegExpr($text, '\\*\\*\\*\\**E.*', 0, 0, 0, 0, 0, '#stay', 'Header Piece')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 69 | 0 | return 1 | |||||||||||||||||||
| 70 | } | ||||||||||||||||||||
| 71 | # String => '\*\*\*\**M.*' | ||||||||||||||||||||
| 72 | # attribute => 'Header Medium' | ||||||||||||||||||||
| 73 | # column => '0' | ||||||||||||||||||||
| 74 | # context => '#stay' | ||||||||||||||||||||
| 75 | # type => 'RegExpr' | ||||||||||||||||||||
| 76 | 0 | ▶ | if ($self->testRegExpr($text, '\\*\\*\\*\\**M.*', 0, 0, 0, 0, 0, '#stay', 'Header Medium')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 77 | 0 | return 1 | |||||||||||||||||||
| 78 | } | ||||||||||||||||||||
| 79 | # String => '\*\*\*\* BIBLIOTHECA.*' | ||||||||||||||||||||
| 80 | # attribute => 'Database Header' | ||||||||||||||||||||
| 81 | # column => '0' | ||||||||||||||||||||
| 82 | # context => '#stay' | ||||||||||||||||||||
| 83 | # type => 'RegExpr' | ||||||||||||||||||||
| 84 | 0 | ▶ | if ($self->testRegExpr($text, '\\*\\*\\*\\* BIBLIOTHECA.*', 0, 0, 0, 0, 0, '#stay', 'Database Header')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 85 | 0 | return 1 | |||||||||||||||||||
| 86 | } | ||||||||||||||||||||
| 87 | # String => '\*M [a-zA-Z0-9]* ' | ||||||||||||||||||||
| 88 | # attribute => 'Mab M Field' | ||||||||||||||||||||
| 89 | # column => '0' | ||||||||||||||||||||
| 90 | # context => '#stay' | ||||||||||||||||||||
| 91 | # type => 'RegExpr' | ||||||||||||||||||||
| 92 | 0 | ▶ | if ($self->testRegExpr($text, '\\*M [a-zA-Z0-9]* ', 0, 0, 0, 0, 0, '#stay', 'Mab M Field')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 93 | 0 | return 1 | |||||||||||||||||||
| 94 | } | ||||||||||||||||||||
| 95 | # String => '\*X TYP .*' | ||||||||||||||||||||
| 96 | # attribute => 'Mab Comment Description' | ||||||||||||||||||||
| 97 | # column => '0' | ||||||||||||||||||||
| 98 | # context => '#stay' | ||||||||||||||||||||
| 99 | # type => 'RegExpr' | ||||||||||||||||||||
| 100 | 0 | ▶ | if ($self->testRegExpr($text, '\\*X TYP .*', 0, 0, 0, 0, 0, '#stay', 'Mab Comment Description')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 101 | 0 | return 1 | |||||||||||||||||||
| 102 | } | ||||||||||||||||||||
| 103 | # String => '\*X DESC .*' | ||||||||||||||||||||
| 104 | # attribute => 'Mab Comment Type' | ||||||||||||||||||||
| 105 | # column => '0' | ||||||||||||||||||||
| 106 | # context => '#stay' | ||||||||||||||||||||
| 107 | # type => 'RegExpr' | ||||||||||||||||||||
| 108 | 0 | ▶ | if ($self->testRegExpr($text, '\\*X DESC .*', 0, 0, 0, 0, 0, '#stay', 'Mab Comment Type')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 109 | 0 | return 1 | |||||||||||||||||||
| 110 | } | ||||||||||||||||||||
| 111 | # String => '\*X .*' | ||||||||||||||||||||
| 112 | # attribute => 'Comment' | ||||||||||||||||||||
| 113 | # column => '0' | ||||||||||||||||||||
| 114 | # context => '#stay' | ||||||||||||||||||||
| 115 | # type => 'RegExpr' | ||||||||||||||||||||
| 116 | 0 | ▶ | if ($self->testRegExpr($text, '\\*X .*', 0, 0, 0, 0, 0, '#stay', 'Comment')) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 117 | 0 | return 1 | |||||||||||||||||||
| 118 | } | ||||||||||||||||||||
| 119 | 0 | return 0; | |||||||||||||||||||
| 120 | }; | ||||||||||||||||||||
| 121 | |||||||||||||||||||||
| 122 | |||||||||||||||||||||
| 123 | 1 | 1; | |||||||||||||||||||
| 124 | |||||||||||||||||||||
| 125 | __END__ | ||||||||||||||||||||