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 'povray.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::POVminusRay;
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(@_);
26 'Comment' => 'Comment',
27 'Constant' => 'Float',
28 'Declaration' => 'Operator',
29 'Declare Keyword' => 'Variable',
30 'Declare Macro' => 'DecVal',
31 'Directives' => 'Others',
32 'Filetype' => 'DataType',
34 'Functions' => 'Function',
35 'Keyword' => 'Keyword',
36 'Macro' => 'Operator',
37 'Normal Text' => 'Normal',
38 'Objects' => 'Keyword',
39 'Region Marker' => 'RegionMarker',
41 'String Char' => 'IString',
42 'Symbol' => 'BString',
43 'Texturing' => 'Keyword',
44 'Transforms' => 'Keyword',
46 $self->listAdd('attention',
51 $self->listAdd('constants',
60 $self->listAdd('directives',
83 $self->listAdd('filetypes',
96 $self->listAdd('functions',
157 $self->listAdd('identifiers',
175 $self->listAdd('keywords',
283 'dispersion_samples',
491 'reflection_exponent',
618 $self->listAdd('objects',
654 $self->listAdd('texturing',
762 'reflection_exponent',
802 $self->listAdd('transforms',
811 callback => \&parseCommentar,
812 attribute => 'Comment',
815 callback => \&parseCommentar1,
816 attribute => 'Comment',
817 lineending => '#pop',
820 callback => \&parseCommentar2,
821 attribute => 'Comment',
824 callback => \&parseDeclaration,
825 attribute => 'Declaration',
826 lineending => '#pop',
828 'Declare_Keyword' => {
829 callback => \&parseDeclare_Keyword,
830 attribute => 'Declare Keyword',
831 lineending => '#pop',
834 callback => \&parseDeclare_Macro,
835 attribute => 'Declare Macro',
836 lineending => '#pop',
839 callback => \&parseMacro,
840 attribute => 'Macro',
841 lineending => '#pop',
844 callback => \&parseNormal,
845 attribute => 'Normal Text',
848 callback => \&parseString,
849 attribute => 'String',
850 lineending => '#pop',
853 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
854 $self->basecontext('Normal');
855 $self->keywordscase(0);
857 bless ($self, $class);
866 my ($self, $text) = @_;
867 # attribute => 'Comment'
871 # type => 'Detect2Chars'
872 if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
878 sub parseCommentar1 {
879 my ($self, $text) = @_;
880 # String => 'attention'
881 # attribute => 'Decimal'
884 if ($self->testKeyword($text, 'attention', 0, undef, 0, '#stay', 'Decimal')) {
890 sub parseCommentar2 {
891 my ($self, $text) = @_;
892 # String => 'attention'
893 # attribute => 'Decimal'
896 if ($self->testKeyword($text, 'attention', 0, undef, 0, '#stay', 'Decimal')) {
899 # attribute => 'Comment'
903 # endRegion => 'Comment'
904 # type => 'Detect2Chars'
905 if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
911 sub parseDeclaration {
912 my ($self, $text) = @_;
914 # attribute => 'Declare Keyword'
915 # context => 'Declare_Keyword'
917 if ($self->testRegExpr($text, '\\w+', 0, 0, 0, undef, 0, 'Declare_Keyword', 'Declare Keyword')) {
920 # attribute => 'Declaration'
922 # type => 'LineContinue'
923 if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Declaration')) {
927 # attribute => 'Symbol'
928 # context => '#pop#pop'
930 if ($self->testAnyChar($text, '=[(', 0, 0, undef, 0, '#pop#pop', 'Symbol')) {
936 sub parseDeclare_Keyword {
937 my ($self, $text) = @_;
938 # attribute => 'Declare Keyword'
940 # type => 'LineContinue'
941 if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Declare Keyword')) {
945 # attribute => 'Symbol'
946 # context => '#pop#pop'
948 if ($self->testAnyChar($text, '=[(', 0, 0, undef, 0, '#pop#pop', 'Symbol')) {
954 sub parseDeclare_Macro {
955 my ($self, $text) = @_;
956 # attribute => 'Declare Macro'
958 # type => 'LineContinue'
959 if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Declare Macro')) {
962 # attribute => 'Symbol'
964 # context => '#pop#pop'
965 # type => 'DetectChar'
966 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#pop#pop', 'Symbol')) {
973 my ($self, $text) = @_;
975 # attribute => 'Declare Macro'
976 # context => 'Declare_Macro'
978 if ($self->testRegExpr($text, '\\w+', 0, 0, 0, undef, 0, 'Declare_Macro', 'Declare Macro')) {
981 # attribute => 'Macro'
983 # type => 'LineContinue'
984 if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Macro')) {
987 # attribute => 'Symbol'
989 # context => '#pop#pop'
990 # type => 'DetectChar'
991 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#pop#pop', 'Symbol')) {
998 my ($self, $text) = @_;
999 # String => '#declare'
1000 # attribute => 'Declaration'
1001 # context => 'Declaration'
1002 # type => 'StringDetect'
1003 if ($self->testStringDetect($text, '#declare', 0, 0, 0, undef, 0, 'Declaration', 'Declaration')) {
1006 # String => '#local'
1007 # attribute => 'Declaration'
1008 # context => 'Declaration'
1009 # type => 'StringDetect'
1010 if ($self->testStringDetect($text, '#local', 0, 0, 0, undef, 0, 'Declaration', 'Declaration')) {
1013 # String => '#macro'
1014 # attribute => 'Macro'
1015 # context => 'Macro'
1016 # type => 'StringDetect'
1017 if ($self->testStringDetect($text, '#macro', 0, 0, 0, undef, 0, 'Macro', 'Macro')) {
1020 # String => 'objects'
1021 # attribute => 'Objects'
1022 # context => '#stay'
1024 if ($self->testKeyword($text, 'objects', 0, undef, 0, '#stay', 'Objects')) {
1027 # String => 'texturing'
1028 # attribute => 'Texturing'
1029 # context => '#stay'
1031 if ($self->testKeyword($text, 'texturing', 0, undef, 0, '#stay', 'Texturing')) {
1034 # String => 'transforms'
1035 # attribute => 'Transforms'
1036 # context => '#stay'
1038 if ($self->testKeyword($text, 'transforms', 0, undef, 0, '#stay', 'Transforms')) {
1041 # String => 'filetypes'
1042 # attribute => 'Filetype'
1043 # context => '#stay'
1045 if ($self->testKeyword($text, 'filetypes', 0, undef, 0, '#stay', 'Filetype')) {
1048 # String => 'identifiers'
1049 # attribute => 'Keyword'
1050 # context => '#stay'
1052 if ($self->testKeyword($text, 'identifiers', 0, undef, 0, '#stay', 'Keyword')) {
1055 # String => 'constants'
1056 # attribute => 'Constant'
1057 # context => '#stay'
1059 if ($self->testKeyword($text, 'constants', 0, undef, 0, '#stay', 'Constant')) {
1062 # String => 'functions'
1063 # attribute => 'Functions'
1064 # context => '#stay'
1066 if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'Functions')) {
1069 # String => 'directives'
1070 # attribute => 'Directives'
1071 # context => '#stay'
1073 if ($self->testKeyword($text, 'directives', 0, undef, 0, '#stay', 'Directives')) {
1076 # String => 'keywords'
1077 # attribute => 'Keyword'
1078 # context => '#stay'
1080 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
1083 # attribute => 'Float'
1084 # context => '#stay'
1086 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
1089 # attribute => 'Float'
1090 # context => '#stay'
1092 if ($self->testInt($text, 0, undef, 0, '#stay', 'Float')) {
1095 # attribute => 'Char'
1096 # context => '#stay'
1098 if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) {
1101 # attribute => 'String'
1103 # context => 'String'
1104 # type => 'DetectChar'
1105 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
1108 # String => '//\s*BEGIN.*$'
1109 # attribute => 'Region Marker'
1110 # beginRegion => 'Region1'
1111 # context => '#stay'
1112 # firstNonSpace => 'true'
1114 if ($self->testRegExpr($text, '//\\s*BEGIN.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) {
1117 # String => '//\s*END.*$'
1118 # attribute => 'Region Marker'
1119 # context => '#stay'
1120 # endRegion => 'Region1'
1121 # firstNonSpace => 'true'
1123 if ($self->testRegExpr($text, '//\\s*END.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) {
1126 # attribute => 'Comment'
1129 # context => 'Commentar 1'
1130 # type => 'Detect2Chars'
1131 if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) {
1134 # attribute => 'Comment'
1135 # beginRegion => 'Comment'
1138 # context => 'Commentar 2'
1139 # type => 'Detect2Chars'
1140 if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) {
1143 # attribute => 'Symbol'
1144 # beginRegion => 'Brace1'
1146 # context => '#stay'
1147 # type => 'DetectChar'
1148 if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
1151 # attribute => 'Symbol'
1153 # context => '#stay'
1154 # endRegion => 'Brace1'
1155 # type => 'DetectChar'
1156 if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
1159 # String => ':!%&()+,-/.*<=>?[]{|}~^;'
1160 # attribute => 'Symbol'
1161 # context => '#stay'
1163 if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]{|}~^;', 0, 0, undef, 0, '#stay', 'Symbol')) {
1170 my ($self, $text) = @_;
1171 # attribute => 'String'
1172 # context => '#stay'
1173 # type => 'LineContinue'
1174 if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) {
1177 # attribute => 'String Char'
1178 # context => '#stay'
1179 # type => 'HlCStringChar'
1180 if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) {
1183 # attribute => 'String'
1186 # type => 'DetectChar'
1187 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
1200 Syntax::Highlight::Engine::Kate::POVminusRay - a Plugin for POV-Ray syntax highlighting
1204 require Syntax::Highlight::Engine::Kate::POVminusRay;
1205 my $sh = new Syntax::Highlight::Engine::Kate::POVminusRay([
1210 Syntax::Highlight::Engine::Kate::POVminusRay is a plugin module that provides syntax highlighting
1211 for POV-Ray to the Syntax::Haghlight::Engine::Kate highlighting engine.
1213 This code is generated from the syntax definition files used
1214 by the Kate project.
1215 It works quite fine, but can use refinement and optimization.
1217 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
1223 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
1229 Unknown. If you find any, please contact the author