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 'ini.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
9 #kate author Jan Janssen (medhefgo@web.de)
10 #generated: Sun Feb 3 22:02:05 2008, localtime
12 package Syntax::Highlight::Engine::Kate::INI_Files;
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(@_);
25 'Assignment' => 'Others',
26 'Comment' => 'Comment',
29 'Keyword' => 'Keyword',
30 'Normal Text' => 'DataType',
31 'Section' => 'Keyword',
34 $self->listAdd('keywords',
62 callback => \&parseComment,
63 attribute => 'Comment',
67 callback => \&parseValue,
72 callback => \&parseini,
73 attribute => 'Normal Text',
76 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
77 $self->basecontext('ini');
78 $self->keywordscase(0);
80 bless ($self, $class);
89 my ($self, $text) = @_;
90 # type => 'DetectSpaces'
91 if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) {
94 # context => '##Alerts'
95 # type => 'IncludeRules'
96 if ($self->includePlugin('Alerts', $text)) {
99 # type => 'DetectIdentifier'
100 if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) {
107 my ($self, $text) = @_;
108 # attribute => 'Float'
110 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
115 if ($self->testInt($text, 0, undef, 0, '#stay', 'Int')) {
118 # String => 'keywords'
119 # attribute => 'Keyword'
121 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
125 # attribute => 'Comment'
128 if ($self->testRegExpr($text, ';.*$', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
132 # attribute => 'Comment'
135 if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
142 my ($self, $text) = @_;
143 # attribute => 'Section'
144 # beginRegion => 'Section'
148 # endRegion => 'Section'
149 # type => 'RangeDetect'
150 if ($self->testRangeDetect($text, '[', ']', 0, 0, undef, 0, '#pop', 'Section')) {
153 # attribute => 'Assignment'
156 # type => 'DetectChar'
157 if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Value', 'Assignment')) {
160 # attribute => 'Comment'
162 # context => 'Comment'
163 # firstNonSpace => 'true'
164 # type => 'DetectChar'
165 if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 1, 'Comment', 'Comment')) {
168 # attribute => 'Comment'
170 # context => 'Comment'
171 # firstNonSpace => 'true'
172 # type => 'DetectChar'
173 if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'Comment', 'Comment')) {
186 Syntax::Highlight::Engine::Kate::INI_Files - a Plugin for INI Files syntax highlighting
190 require Syntax::Highlight::Engine::Kate::INI_Files;
191 my $sh = new Syntax::Highlight::Engine::Kate::INI_Files([
196 Syntax::Highlight::Engine::Kate::INI_Files is a plugin module that provides syntax highlighting
197 for INI Files to the Syntax::Haghlight::Engine::Kate highlighting engine.
199 This code is generated from the syntax definition files used
201 It works quite fine, but can use refinement and optimization.
203 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
209 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
215 Unknown. If you find any, please contact the author