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 'ahdl.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #kate author Dominik Haumann (dhdev@gmx.de)
11 #generated: Sun Feb 3 22:02:04 2008, localtime
13 package Syntax::Highlight::Engine::Kate::AHDL;
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(@_);
28 'Comment' => 'Comment',
29 'Data Type' => 'DataType',
30 'Decimal' => 'DecVal',
32 'Keyword' => 'Keyword',
33 'Normal Text' => 'Normal',
35 'Operator' => 'Others',
36 'Region Marker' => 'RegionMarker',
39 $self->listAdd('keywords',
82 $self->listAdd('operator',
97 $self->listAdd('types',
122 callback => \&parsecomment,
123 attribute => 'Comment',
126 callback => \&parsenormal,
127 attribute => 'Normal Text',
130 callback => \&parsestring,
131 attribute => 'String',
134 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
135 $self->basecontext('normal');
136 $self->keywordscase(0);
138 bless ($self, $class);
147 my ($self, $text) = @_;
148 # attribute => 'Comment'
151 # type => 'DetectChar'
152 if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
159 my ($self, $text) = @_;
160 # String => '\bdefaults\b'
161 # attribute => 'Keyword'
162 # beginRegion => 'def'
164 # insensitive => 'true'
166 if ($self->testRegExpr($text, '\\bdefaults\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
169 # String => '\bend\s+defaults\b'
170 # attribute => 'Keyword'
173 # insensitive => 'true'
175 if ($self->testRegExpr($text, '\\bend\\s+defaults\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
179 # attribute => 'Keyword'
180 # beginRegion => 'if'
182 # insensitive => 'true'
184 if ($self->testRegExpr($text, '\\bif\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
187 # String => '\bend\s+if\b'
188 # attribute => 'Keyword'
191 # insensitive => 'true'
193 if ($self->testRegExpr($text, '\\bend\\s+if\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
196 # String => '\btable\b'
197 # attribute => 'Keyword'
198 # beginRegion => 'table'
200 # insensitive => 'true'
202 if ($self->testRegExpr($text, '\\btable\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
205 # String => '\bend\s+table\b'
206 # attribute => 'Keyword'
208 # endRegion => 'table'
209 # insensitive => 'true'
211 if ($self->testRegExpr($text, '\\bend\\s+table\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
214 # String => '\bcase\b'
215 # attribute => 'Keyword'
216 # beginRegion => 'case'
218 # insensitive => 'true'
220 if ($self->testRegExpr($text, '\\bcase\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
223 # String => '\bend\s+case\b'
224 # attribute => 'Keyword'
226 # endRegion => 'case'
227 # insensitive => 'true'
229 if ($self->testRegExpr($text, '\\bend\\s+case\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
232 # String => '\bbegin\b'
233 # attribute => 'Keyword'
234 # beginRegion => 'block'
236 # insensitive => 'true'
238 if ($self->testRegExpr($text, '\\bbegin\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
241 # String => '\bend\b'
242 # attribute => 'Keyword'
244 # endRegion => 'block'
245 # insensitive => 'true'
247 if ($self->testRegExpr($text, '\\bend\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
250 # attribute => 'Normal Text'
251 # beginRegion => 'bracket'
254 # type => 'DetectChar'
255 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) {
258 # attribute => 'Normal Text'
261 # endRegion => 'bracket'
262 # type => 'DetectChar'
263 if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) {
266 # String => 'keywords'
267 # attribute => 'Keyword'
270 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
274 # attribute => 'Data Type'
277 if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) {
280 # String => 'operator'
281 # attribute => 'Operator'
284 if ($self->testKeyword($text, 'operator', 0, undef, 0, '#stay', 'Operator')) {
287 # String => '\b(\d+)\b'
288 # attribute => 'Decimal'
291 if ($self->testRegExpr($text, '\\b(\\d+)\\b', 0, 0, 0, undef, 0, '#stay', 'Decimal')) {
294 # String => '\bb"(0|1|x)+"'
297 # insensitive => 'true'
299 if ($self->testRegExpr($text, '\\bb"(0|1|x)+"', 1, 0, 0, undef, 0, '#stay', 'Bit')) {
302 # String => '\b(o|q)"[0-7*]"'
303 # attribute => 'Octal'
305 # insensitive => 'true'
307 if ($self->testRegExpr($text, '\\b(o|q)"[0-7*]"', 1, 0, 0, undef, 0, '#stay', 'Octal')) {
310 # String => '\b(h|x)"[0-9a-f]*"'
313 # insensitive => 'true'
315 if ($self->testRegExpr($text, '\\b(h|x)"[0-9a-f]*"', 1, 0, 0, undef, 0, '#stay', 'Hex')) {
318 # attribute => 'String'
320 # context => 'string'
321 # type => 'DetectChar'
322 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string', 'String')) {
325 # String => '--\s*BEGIN.*$'
326 # attribute => 'Region Marker'
327 # beginRegion => 'region'
329 # firstNonSpace => 'true'
331 if ($self->testRegExpr($text, '--\\s*BEGIN.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) {
334 # String => '--\s*END.*$'
335 # attribute => 'Region Marker'
337 # endRegion => 'region'
338 # firstNonSpace => 'true'
340 if ($self->testRegExpr($text, '--\\s*END.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) {
344 # attribute => 'Comment'
347 if ($self->testRegExpr($text, '--.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) {
350 # attribute => 'Comment'
352 # context => 'comment'
353 # type => 'DetectChar'
354 if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, 'comment', 'Comment')) {
357 # attribute => 'Char'
360 if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) {
367 my ($self, $text) = @_;
368 # attribute => 'Char'
372 # type => 'Detect2Chars'
373 if ($self->testDetect2Chars($text, '\\', '"', 0, 0, 0, undef, 0, '#stay', 'Char')) {
376 # attribute => 'String'
379 # type => 'DetectChar'
380 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
393 Syntax::Highlight::Engine::Kate::AHDL - a Plugin for AHDL syntax highlighting
397 require Syntax::Highlight::Engine::Kate::AHDL;
398 my $sh = new Syntax::Highlight::Engine::Kate::AHDL([
403 Syntax::Highlight::Engine::Kate::AHDL is a plugin module that provides syntax highlighting
404 for AHDL to the Syntax::Haghlight::Engine::Kate highlighting engine.
406 This code is generated from the syntax definition files used
408 It works quite fine, but can use refinement and optimization.
410 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
416 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
422 Unknown. If you find any, please contact the author