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 'mips.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:05 2008, localtime
13 package Syntax::Highlight::Engine::Kate::MIPS_Assembler;
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(@_);
27 'Comment' => 'Comment',
28 'Decimal' => 'DecVal',
30 'Floating Point Register' => 'Float',
31 'Hardware Instruction' => 'Keyword',
34 'Main Register' => 'DataType',
35 'Normal Text' => 'Normal',
37 'Other Register' => 'DataType',
38 'Pseudo Instruction' => 'Function',
39 'Region Marker' => 'RegionMarker',
40 'Section' => 'DataType',
78 $self->listAdd('hardware',
200 $self->listAdd('pseudo',
259 $self->listAdd('register1',
304 $self->listAdd('register2',
327 $self->listAdd('section',
333 $self->listAdd('type',
350 callback => \&parsenormal,
351 attribute => 'Normal Text',
354 callback => \&parsestring,
355 attribute => 'String',
358 $self->deliminators('\\s||\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|\\.');
359 $self->basecontext('normal');
360 $self->keywordscase(0);
362 bless ($self, $class);
367 return 'MIPS Assembler';
371 my ($self, $text) = @_;
372 # String => 'hardware'
373 # attribute => 'Hardware Instruction'
376 if ($self->testKeyword($text, 'hardware', 0, undef, 0, '#stay', 'Hardware Instruction')) {
380 # attribute => 'Pseudo Instruction'
383 if ($self->testKeyword($text, 'pseudo', 0, undef, 0, '#stay', 'Pseudo Instruction')) {
386 # String => 'register1'
387 # attribute => 'Other Register'
390 if ($self->testKeyword($text, 'register1', 0, undef, 0, '#stay', 'Other Register')) {
393 # String => 'register2'
394 # attribute => 'Main Register'
397 if ($self->testKeyword($text, 'register2', 0, undef, 0, '#stay', 'Main Register')) {
401 # attribute => 'Floating Point Register'
404 if ($self->testKeyword($text, 'fp', 0, undef, 0, '#stay', 'Floating Point Register')) {
407 # String => 'section'
408 # attribute => 'Type'
411 if ($self->testKeyword($text, 'section', 0, undef, 0, '#stay', 'Type')) {
415 # attribute => 'Section'
418 if ($self->testKeyword($text, 'type', 0, undef, 0, '#stay', 'Section')) {
421 # String => '#\s*BEGIN.*$'
422 # attribute => 'Region Marker'
423 # beginRegion => 'region'
425 # firstNonSpace => 'true'
427 if ($self->testRegExpr($text, '#\\s*BEGIN.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) {
430 # String => '#\s*END.*$'
431 # attribute => 'Region Marker'
433 # endRegion => 'region'
434 # firstNonSpace => 'true'
436 if ($self->testRegExpr($text, '#\\s*END.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) {
440 # attribute => 'Comment'
443 if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) {
446 # String => '[\w_\.]+:'
447 # attribute => 'Label'
449 # firstNonSpace => 'true'
451 if ($self->testRegExpr($text, '[\\w_\\.]+:', 0, 0, 0, undef, 1, '#stay', 'Label')) {
454 # attribute => 'String'
456 # context => 'string'
457 # type => 'DetectChar'
458 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string', 'String')) {
461 # attribute => 'Float'
464 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
467 # attribute => 'Octal'
470 if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) {
476 if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) {
479 # attribute => 'Decimal'
482 if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
489 my ($self, $text) = @_;
491 # attribute => 'Char'
494 if ($self->testRegExpr($text, '\\\\.', 0, 0, 0, undef, 0, '#stay', 'Char')) {
497 # attribute => 'String'
500 # type => 'DetectChar'
501 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
514 Syntax::Highlight::Engine::Kate::MIPS_Assembler - a Plugin for MIPS Assembler syntax highlighting
518 require Syntax::Highlight::Engine::Kate::MIPS_Assembler;
519 my $sh = new Syntax::Highlight::Engine::Kate::MIPS_Assembler([
524 Syntax::Highlight::Engine::Kate::MIPS_Assembler is a plugin module that provides syntax highlighting
525 for MIPS Assembler to the Syntax::Haghlight::Engine::Kate highlighting engine.
527 This code is generated from the syntax definition files used
529 It works quite fine, but can use refinement and optimization.
531 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
537 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
543 Unknown. If you find any, please contact the author