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 'postscript.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #generated: Sun Feb 3 22:02:06 2008, localtime
12 package Syntax::Highlight::Engine::Kate::PostScript;
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 'Comment' => 'Comment',
26 'Data Type' => 'DataType',
27 'Decimal' => 'DecVal',
30 'Keyword' => 'Keyword',
31 'Normal Text' => 'Normal',
34 $self->listAdd('keywords',
47 'Courier-BoldOblique',
56 'GlobalFontDirectory',
59 'Helvetica-BoldOblique',
70 'SharedFontDirectory',
120 'currentblackgeneration',
121 'currentcacheparams',
124 'currentcolorrendering',
125 'currentcolorscreen',
127 'currentcolortransfer',
139 'currenthalftonephase',
146 'currentobjectformat',
154 'currentstrokeadjust',
155 'currentsystemparams',
157 'currentundercolorremoval',
326 'setblackgeneration',
366 'setundercolorremoval',
402 'undefineuserobject',
431 callback => \&parseComment,
432 attribute => 'Comment',
433 lineending => '#pop',
436 callback => \&parseHeader,
437 attribute => 'Header',
438 lineending => '#pop',
441 callback => \&parseNormal,
442 attribute => 'Normal Text',
445 callback => \&parseString,
446 attribute => 'String',
449 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
450 $self->basecontext('Normal');
451 $self->keywordscase(0);
453 bless ($self, $class);
462 my ($self, $text) = @_;
467 my ($self, $text) = @_;
472 my ($self, $text) = @_;
473 # String => 'keywords'
474 # attribute => 'Keyword'
477 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
480 # attribute => 'Header'
483 # context => 'Header'
484 # type => 'Detect2Chars'
485 if ($self->testDetect2Chars($text, '%', '!', 0, 0, 0, undef, 0, 'Header', 'Header')) {
488 # attribute => 'Comment'
490 # context => 'Comment'
491 # type => 'DetectChar'
492 if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
495 # attribute => 'Float'
498 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
501 # attribute => 'Decimal'
504 if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
507 # attribute => 'String'
509 # context => 'String'
510 # type => 'DetectChar'
511 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'String', 'String')) {
514 # String => '\/{1,2}[^\s\(\)\{\}\[\]%/]*'
515 # attribute => 'Data Type'
518 if ($self->testRegExpr($text, '\\/{1,2}[^\\s\\(\\)\\{\\}\\[\\]%/]*', 0, 0, 0, undef, 0, '#stay', 'Data Type')) {
525 my ($self, $text) = @_;
526 # attribute => 'String'
529 # type => 'DetectChar'
530 if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'String')) {
543 Syntax::Highlight::Engine::Kate::PostScript - a Plugin for PostScript syntax highlighting
547 require Syntax::Highlight::Engine::Kate::PostScript;
548 my $sh = new Syntax::Highlight::Engine::Kate::PostScript([
553 Syntax::Highlight::Engine::Kate::PostScript is a plugin module that provides syntax highlighting
554 for PostScript to the Syntax::Haghlight::Engine::Kate highlighting engine.
556 This code is generated from the syntax definition files used
558 It works quite fine, but can use refinement and optimization.
560 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
566 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
572 Unknown. If you find any, please contact the author