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 'sml.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
10 #kate author Christoph Cullmann (cullmann@kde.org)
11 #generated: Sun Feb 3 22:02:06 2008, localtime
13 package Syntax::Highlight::Engine::Kate::SML;
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(@_);
26 'Comment' => 'Comment',
27 'Data Type' => 'DataType',
28 'Decimal' => 'DecVal',
30 'Keyword' => 'Keyword',
31 'Normal Text' => 'Normal',
34 'String Char' => 'Char',
36 $self->listAdd('keywords',
81 $self->listAdd('types',
98 'Multiline/Inline Comment' => {
99 callback => \&parseMultilineInlineComment,
100 attribute => 'Comment',
103 callback => \&parseNormal,
104 attribute => 'Normal Text',
107 callback => \&parseString,
108 attribute => 'String',
111 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
112 $self->basecontext('Normal');
113 $self->keywordscase(0);
115 bless ($self, $class);
123 sub parseMultilineInlineComment {
124 my ($self, $text) = @_;
125 # attribute => 'Comment'
129 # type => 'Detect2Chars'
130 if ($self->testDetect2Chars($text, '*', ')', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
137 my ($self, $text) = @_;
138 # attribute => 'Comment'
141 # context => 'Multiline/Inline Comment'
142 # type => 'Detect2Chars'
143 if ($self->testDetect2Chars($text, '(', '*', 0, 0, 0, undef, 0, 'Multiline/Inline Comment', 'Comment')) {
146 # attribute => 'String'
148 # context => 'String'
149 # type => 'DetectChar'
150 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
153 # String => 'keywords'
154 # attribute => 'Keyword'
157 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
161 # attribute => 'Data Type'
164 if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) {
167 # attribute => 'Float'
169 # items => 'ARRAY(0x18342d0)'
171 if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) {
173 # attribute => 'Float'
176 if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) {
180 # attribute => 'Decimal'
183 if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Decimal')) {
186 # attribute => 'Decimal'
189 if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) {
196 my ($self, $text) = @_;
197 # attribute => 'String Char'
199 # type => 'HlCStringChar'
200 if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) {
203 # attribute => 'String'
206 # type => 'DetectChar'
207 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
220 Syntax::Highlight::Engine::Kate::SML - a Plugin for SML syntax highlighting
224 require Syntax::Highlight::Engine::Kate::SML;
225 my $sh = new Syntax::Highlight::Engine::Kate::SML([
230 Syntax::Highlight::Engine::Kate::SML is a plugin module that provides syntax highlighting
231 for SML to the Syntax::Haghlight::Engine::Kate highlighting engine.
233 This code is generated from the syntax definition files used
235 It works quite fine, but can use refinement and optimization.
237 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
243 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
249 Unknown. If you find any, please contact the author