Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Syntax / Highlight / Engine / Kate / WINE_Config.pm
CommitLineData
3fea05b9 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 'winehq.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:06 2008, localtime
11
12package Syntax::Highlight::Engine::Kate::WINE_Config;
13
14our $VERSION = '0.06';
15
16use strict;
17use warnings;
18use base('Syntax::Highlight::Engine::Kate::Template');
19
20sub new {
21 my $proto = shift;
22 my $class = ref($proto) || $proto;
23 my $self = $class->SUPER::new(@_);
24 $self->attributes({
25 'Comment' => 'Comment',
26 'Key' => 'DataType',
27 'Normal Text' => 'Normal',
28 'RegistryBeginEnd' => 'Float',
29 'Section' => 'Keyword',
30 'Value' => 'Variable',
31 'ValueFilesystem1' => 'BaseN',
32 'ValueFilesystem2' => 'DecVal',
33 });
34 $self->contextdata({
35 'Normal' => {
36 callback => \&parseNormal,
37 attribute => 'Normal Text',
38 },
39 'Value' => {
40 callback => \&parseValue,
41 attribute => 'Normal Text',
42 lineending => '#pop',
43 },
44 });
45 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
46 $self->basecontext('Normal');
47 $self->keywordscase(1);
48 $self->initialize;
49 bless ($self, $class);
50 return $self;
51}
52
53sub language {
54 return 'WINE Config';
55}
56
57sub parseNormal {
58 my ($self, $text) = @_;
59 # String => 'WINE REGISTRY Version.*$'
60 # attribute => 'RegistryBeginEnd'
61 # context => '#stay'
62 # type => 'RegExpr'
63 if ($self->testRegExpr($text, 'WINE REGISTRY Version.*$', 0, 0, 0, undef, 0, '#stay', 'RegistryBeginEnd')) {
64 return 1
65 }
66 # String => '#\s*<\s*wineconf\s*>'
67 # attribute => 'RegistryBeginEnd'
68 # column => '0'
69 # context => '#stay'
70 # type => 'RegExpr'
71 if ($self->testRegExpr($text, '#\\s*<\\s*wineconf\\s*>', 0, 0, 0, 0, 0, '#stay', 'RegistryBeginEnd')) {
72 return 1
73 }
74 # String => '#\s*<\s*\/\s*wineconf\s*>'
75 # attribute => 'RegistryBeginEnd'
76 # column => '0'
77 # context => '#stay'
78 # type => 'RegExpr'
79 if ($self->testRegExpr($text, '#\\s*<\\s*\\/\\s*wineconf\\s*>', 0, 0, 0, 0, 0, '#stay', 'RegistryBeginEnd')) {
80 return 1
81 }
82 # String => '\[.*\]$'
83 # attribute => 'Section'
84 # column => '0'
85 # context => '#stay'
86 # type => 'RegExpr'
87 if ($self->testRegExpr($text, '\\[.*\\]$', 0, 0, 0, 0, 0, '#stay', 'Section')) {
88 return 1
89 }
90 # String => ';.*$'
91 # attribute => 'Comment'
92 # context => '#stay'
93 # type => 'RegExpr'
94 if ($self->testRegExpr($text, ';.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) {
95 return 1
96 }
97 # String => '\s*"\s*[a-zA-Z0-9_.:*]*\s*"'
98 # attribute => 'Key'
99 # context => '#stay'
100 # type => 'RegExpr'
101 if ($self->testRegExpr($text, '\\s*"\\s*[a-zA-Z0-9_.:*]*\\s*"', 0, 0, 0, undef, 0, '#stay', 'Key')) {
102 return 1
103 }
104 # attribute => 'Normal Text'
105 # char => '='
106 # context => 'Value'
107 # type => 'DetectChar'
108 if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Value', 'Normal Text')) {
109 return 1
110 }
111 return 0;
112};
113
114sub parseValue {
115 my ($self, $text) = @_;
116 # String => '\s*".*"'
117 # attribute => 'Value'
118 # context => '#stay'
119 # type => 'RegExpr'
120 if ($self->testRegExpr($text, '\\s*".*"', 0, 0, 0, undef, 0, '#stay', 'Value')) {
121 return 1
122 }
123 # String => ';.*$'
124 # attribute => 'Comment'
125 # context => '#stay'
126 # type => 'RegExpr'
127 if ($self->testRegExpr($text, ';.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) {
128 return 1
129 }
130 return 0;
131};
132
133
1341;
135
136__END__
137
138=head1 NAME
139
140Syntax::Highlight::Engine::Kate::WINE_Config - a Plugin for WINE Config syntax highlighting
141
142=head1 SYNOPSIS
143
144 require Syntax::Highlight::Engine::Kate::WINE_Config;
145 my $sh = new Syntax::Highlight::Engine::Kate::WINE_Config([
146 ]);
147
148=head1 DESCRIPTION
149
150Syntax::Highlight::Engine::Kate::WINE_Config is a plugin module that provides syntax highlighting
151for WINE Config to the Syntax::Haghlight::Engine::Kate highlighting engine.
152
153This code is generated from the syntax definition files used
154by the Kate project.
155It works quite fine, but can use refinement and optimization.
156
157It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
158
159=cut
160
161=head1 AUTHOR
162
163Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
164
165=cut
166
167=head1 BUGS
168
169Unknown. If you find any, please contact the author
170
171=cut
172