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 'ansys.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
9 #kate author Giovanni Bacci (giovanni@castellodilari.it)
10 #generated: Sun Feb 3 22:02:04 2008, localtime
12 package Syntax::Highlight::Engine::Kate::Ansys;
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 'APDLcmd' => 'Function',
26 'AUX12cmds' => 'Function',
27 'AUX15cmds' => 'Function',
28 'AUX2cmds' => 'Function',
29 'AUX3cmds' => 'Function',
30 'Commands' => 'Others',
31 'DBcmd' => 'Function',
32 'DISPLAYcmds' => 'Function',
33 'GRPH_cmds' => 'Function',
34 'Keyword' => 'Keyword',
36 'MatProp' => 'DataType',
37 'Normal Text' => 'Normal',
38 'NumFloat' => 'Float',
40 'OPTIMIZATIONcmds' => 'Function',
41 'POST1Commands' => 'Function',
42 'POST26Commands' => 'Function',
43 'PREP7Commands' => 'Function',
44 'PROBcmds' => 'Function',
45 'REDUORDERcmds' => 'Function',
46 'RUNSTATcmds' => 'Function',
47 'SESSIONcmd' => 'Function',
48 'SOLUCommands' => 'Function',
50 'comment' => 'Comment',
52 'functions_arg' => 'Keyword',
53 'variable' => 'Others',
55 $self->listAdd('APDL_commands',
125 $self->listAdd('POST1_commands',
326 $self->listAdd('POST26_cmds',
392 $self->listAdd('aux12_cmds',
403 $self->listAdd('aux15_cmds',
408 $self->listAdd('aux2_cmds',
415 $self->listAdd('aux3_cmds',
424 $self->listAdd('database_cmds',
490 $self->listAdd('display_cmds',
505 $self->listAdd('elements',
682 $self->listAdd('force-displacement-labels',
729 $self->listAdd('graphic_cmds',
831 $self->listAdd('material_properties',
883 $self->listAdd('optimization_cmds',
931 $self->listAdd('parametric_functions',
957 $self->listAdd('prep7_commands',
1521 $self->listAdd('probabilistic_cmds',
1551 $self->listAdd('reduced_order_cmds',
1575 $self->listAdd('runstats_cmds',
1586 $self->listAdd('session_cmds',
1634 $self->listAdd('solution_commands',
2001 $self->listAdd('various_labels',
2003 $self->contextdata({
2005 callback => \&parseNormalText,
2006 attribute => 'Normal Text',
2007 lineending => '#pop',
2010 callback => \&parsecomment,
2011 attribute => 'comment',
2012 lineending => '#pop',
2014 'doublequotestring' => {
2015 callback => \&parsedoublequotestring,
2016 attribute => 'String',
2018 'functions_arg' => {
2019 callback => \&parsefunctions_arg,
2020 attribute => 'NumFloat',
2021 lineending => '#pop',
2024 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|\\/|\\*');
2025 $self->basecontext('Normal Text');
2026 $self->keywordscase(0);
2028 bless ($self, $class);
2036 sub parseNormalText {
2037 my ($self, $text) = @_;
2039 # attribute => 'comment'
2040 # context => 'comment'
2041 # firstNonSpace => 'true'
2042 # insensitive => 'true'
2043 # type => 'StringDetect'
2044 if ($self->testStringDetect($text, 'C***', 1, 0, 0, undef, 1, 'comment', 'comment')) {
2047 # attribute => 'comment'
2049 # context => 'comment'
2050 # type => 'DetectChar'
2051 if ($self->testDetectChar($text, '!', 0, 0, 0, undef, 0, 'comment', 'comment')) {
2054 # String => '^[A-Za-z0-9]+\='
2055 # attribute => 'Normal Text'
2056 # context => '#stay'
2058 if ($self->testRegExpr($text, '^[A-Za-z0-9]+\\=', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) {
2061 # String => 'elements'
2062 # attribute => 'Keyword'
2063 # context => '#stay'
2065 if ($self->testKeyword($text, 'elements', 0, undef, 0, '#stay', 'Keyword')) {
2068 # String => 'material_properties'
2069 # attribute => 'MatProp'
2070 # context => '#stay'
2072 if ($self->testKeyword($text, 'material_properties', 0, undef, 0, '#stay', 'MatProp')) {
2075 # String => 'force-displacement-labels'
2076 # attribute => 'Labels'
2077 # context => '#stay'
2079 if ($self->testKeyword($text, 'force-displacement-labels', 0, undef, 0, '#stay', 'Labels')) {
2082 # String => 'parametric_functions'
2083 # attribute => 'Commands'
2084 # context => 'functions_arg'
2086 if ($self->testKeyword($text, 'parametric_functions', 0, undef, 0, 'functions_arg', 'Commands')) {
2089 # String => 'session_cmds'
2090 # attribute => 'SESSIONcmd'
2091 # context => '#stay'
2092 # firstNonSpace => 'true'
2094 if ($self->testKeyword($text, 'session_cmds', 0, undef, 1, '#stay', 'SESSIONcmd')) {
2097 # String => 'database_cmds'
2098 # attribute => 'DBcmd'
2099 # context => '#stay'
2100 # firstNonSpace => 'true'
2102 if ($self->testKeyword($text, 'database_cmds', 0, undef, 1, '#stay', 'DBcmd')) {
2105 # String => 'graphic_cmds'
2106 # attribute => 'GRPH_cmds'
2107 # context => '#stay'
2108 # firstNonSpace => 'true'
2110 if ($self->testKeyword($text, 'graphic_cmds', 0, undef, 1, '#stay', 'GRPH_cmds')) {
2113 # String => 'APDL_commands'
2114 # attribute => 'APDLcmd'
2115 # context => '#stay'
2116 # firstNonSpace => 'true'
2118 if ($self->testKeyword($text, 'APDL_commands', 0, undef, 1, '#stay', 'APDLcmd')) {
2121 # String => 'prep7_commands'
2122 # attribute => 'PREP7Commands'
2123 # context => '#stay'
2124 # firstNonSpace => 'true'
2126 if ($self->testKeyword($text, 'prep7_commands', 0, undef, 1, '#stay', 'PREP7Commands')) {
2129 # String => 'solution_commands'
2130 # attribute => 'SOLUCommands'
2131 # context => '#stay'
2132 # firstNonSpace => 'true'
2134 if ($self->testKeyword($text, 'solution_commands', 0, undef, 1, '#stay', 'SOLUCommands')) {
2137 # String => 'POST1_commands'
2138 # attribute => 'POST1Commands'
2139 # context => '#stay'
2140 # firstNonSpace => 'true'
2142 if ($self->testKeyword($text, 'POST1_commands', 0, undef, 1, '#stay', 'POST1Commands')) {
2145 # String => 'POST26_cmds'
2146 # attribute => 'POST26Commands'
2147 # context => '#stay'
2148 # firstNonSpace => 'true'
2150 if ($self->testKeyword($text, 'POST26_cmds', 0, undef, 1, '#stay', 'POST26Commands')) {
2153 # String => 'aux2_cmds'
2154 # attribute => 'AUX2cmds'
2155 # context => '#stay'
2156 # firstNonSpace => 'true'
2158 if ($self->testKeyword($text, 'aux2_cmds', 0, undef, 1, '#stay', 'AUX2cmds')) {
2161 # String => 'aux3_cmds'
2162 # attribute => 'AUX3cmds'
2163 # context => '#stay'
2164 # firstNonSpace => 'true'
2166 if ($self->testKeyword($text, 'aux3_cmds', 0, undef, 1, '#stay', 'AUX3cmds')) {
2169 # String => 'aux12_cmds'
2170 # attribute => 'AUX12cmds'
2171 # context => '#stay'
2172 # firstNonSpace => 'true'
2174 if ($self->testKeyword($text, 'aux12_cmds', 0, undef, 1, '#stay', 'AUX12cmds')) {
2177 # String => 'aux15_cmds'
2178 # attribute => 'AUX15cmds'
2179 # context => '#stay'
2180 # firstNonSpace => 'true'
2182 if ($self->testKeyword($text, 'aux15_cmds', 0, undef, 1, '#stay', 'AUX15cmds')) {
2185 # String => 'runstats_cmds'
2186 # attribute => 'RUNSTATScmds'
2187 # context => '#stay'
2188 # firstNonSpace => 'true'
2190 if ($self->testKeyword($text, 'runstats_cmds', 0, undef, 1, '#stay', 'RUNSTATScmds')) {
2193 # String => 'optimization_cmds'
2194 # attribute => 'OPTIMIZATIONcmds'
2195 # context => '#stay'
2196 # firstNonSpace => 'true'
2198 if ($self->testKeyword($text, 'optimization_cmds', 0, undef, 1, '#stay', 'OPTIMIZATIONcmds')) {
2201 # String => 'probabilistic_cmds'
2202 # attribute => 'PROBcmds'
2203 # context => '#stay'
2204 # firstNonSpace => 'true'
2206 if ($self->testKeyword($text, 'probabilistic_cmds', 0, undef, 1, '#stay', 'PROBcmds')) {
2209 # String => 'display_cmds'
2210 # attribute => 'DISPLAYcmds'
2211 # context => '#stay'
2212 # firstNonSpace => 'true'
2214 if ($self->testKeyword($text, 'display_cmds', 0, undef, 1, '#stay', 'DISPLAYcmds')) {
2217 # String => 'reduced_order_cmds'
2218 # attribute => 'REDUORDERcmds'
2219 # context => '#stay'
2220 # firstNonSpace => 'true'
2222 if ($self->testKeyword($text, 'reduced_order_cmds', 0, undef, 1, '#stay', 'REDUORDERcmds')) {
2225 # attribute => 'String'
2227 # context => 'doublequotestring'
2228 # type => 'DetectChar'
2229 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'doublequotestring', 'String')) {
2232 # attribute => 'variable'
2235 # context => '#stay'
2236 # type => 'RangeDetect'
2237 if ($self->testRangeDetect($text, '%', '%', 0, 0, undef, 0, '#stay', 'variable')) {
2240 # String => 'APDL_commands'
2241 # attribute => 'MatProp'
2242 # context => '#stay'
2244 if ($self->testKeyword($text, 'APDL_commands', 0, undef, 0, '#stay', 'MatProp')) {
2247 # attribute => 'NumFloat'
2248 # context => '#stay'
2250 if ($self->testFloat($text, 0, undef, 0, '#stay', 'NumFloat')) {
2253 # attribute => 'NumInt'
2254 # context => '#stay'
2255 # items => 'ARRAY(0xef0140)'
2257 if ($self->testInt($text, 0, undef, 0, '#stay', 'NumInt')) {
2259 # attribute => 'NumInt'
2260 # context => '#stay'
2261 # type => 'StringDetect'
2262 if ($self->testStringDetect($text, '**', 0, 0, 0, undef, 0, '#stay', 'NumInt')) {
2270 my ($self, $text) = @_;
2274 sub parsedoublequotestring {
2275 my ($self, $text) = @_;
2276 # attribute => 'String'
2279 # type => 'DetectChar'
2280 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
2286 sub parsefunctions_arg {
2287 my ($self, $text) = @_;
2288 # attribute => 'Keyword'
2290 # context => '#stay'
2291 # type => 'DetectChar'
2292 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
2295 # attribute => 'Keyword'
2298 # type => 'DetectChar'
2299 if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Keyword')) {
2312 Syntax::Highlight::Engine::Kate::Ansys - a Plugin for Ansys syntax highlighting
2316 require Syntax::Highlight::Engine::Kate::Ansys;
2317 my $sh = new Syntax::Highlight::Engine::Kate::Ansys([
2322 Syntax::Highlight::Engine::Kate::Ansys is a plugin module that provides syntax highlighting
2323 for Ansys to the Syntax::Haghlight::Engine::Kate highlighting engine.
2325 This code is generated from the syntax definition files used
2326 by the Kate project.
2327 It works quite fine, but can use refinement and optimization.
2329 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
2335 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
2341 Unknown. If you find any, please contact the author