--Boundary-00
nZtBg+gxX5hyvZ
Content-Type: Multipart/Mixed;
boundaryoundary-00
nZtBg+gxX5hyvZ"
--Boundary-00
nZtBg+gxX5hyvZ
Content-Type: text/plain;
charset so-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Am Dienstag, 7. Dezember 2004 01:52 schrieb David Ross:
> CT wrote:
> >http://developers.slashdot.org/developers/04/12/06/1158251.shtml?tid6&t
> >id"RAD in Ruby"
> >
> >I didn't know KDevelop had Ruby support.
> >
> >Cheers!
> >CT
>
> KDevelop uses Kate by default. Its even better in this recent
> release because the regex engine. The past releases engine
> was not too great, so it was difficult to implement a few
> specifications. The syntax highlighting uses regexes to identify
> keywords. :)
>
> David Ross
If you want better Ruby syntax highlighting for Kate,
(perhaps it is already better for Kate versions newer than 2.2)
just copy the file in the attachement into the following directory:
~/.kde/share/apps/katepart/syntax/
The newest available version (1.07) of "ruby.xml"
wasn't really good, so I did many improvements.
--
Stefan
--Boundary-00
nZtBg+gxX5hyvZ
Content-Type: text/xml;
charset so-8859-1";
name uby.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename uby.xml"
<?xml version.0" encoding TF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
This file is part of KDE's kate project.
Ruby syntax highlighting definition for Kate.
Copyright (C) 2004 by Sebastian Vuorinen (sebastian dot vuorinen at helsinki dot fi)
Copyright (C) 2004 by Stefan Lang (langstefan / gmx.at)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-->
<!--
TODO: * Regular expressions spanning over multiple lines
work only if newlines are escaped.
* HERE documents could be terminated too early (most work).
* "Nested" HERE documents aren't recognized.
* Division is detected correctly only, if whitespace
is around the "/" operator.
E.g.: detected correctly: 1 / 2
"/" interpreted as regex start: 1/2
-->
<!-- Hold the "language" opening tag on a single line, as mentioned in "language.dtd". -->
<language name uby" version.10" kateversion.2" section cripts" extensions .rb" mimetype
pplication/x-ruby" author tefan Lang <langstefan / gmx.at>" license GPL">
<highlighting>
<list name eywords">
<item> BEGIN </item>
<item> END </item>
<item> and </item>
<item> begin </item>
<item> break </item>
<item> case </item>
<!-- Doesn't work. Because of question mark?
Included regex below. -->
<item> defined? </item>
<item> do </item>
<item> else </item>
<item> elsif </item>
<item> end </item>
<item> ensure </item>
<item> for </item>
<item> if </item>
<item> in </item>
<item> include </item>
<item> next </item>
<item> not </item>
<item> or </item>
<item> redo </item>
<item> rescue </item>
<item> retry </item>
<item> return </item>
<item> then </item>
<item> unless </item>
<item> until </item>
<item> when </item>
<item> while </item>
<item> yield </item>
</list>
<list name
ccess-control">
<item> private_class_method </item>
<item> private </item>
<item> protected </item>
<item> public_class_method </item>
<item> public </item>
</list>
<list name
ttribute-definitions">
<item> attr_reader </item>
<item> attr_writer </item>
<item> attr_accessor </item>
</list>
<list name
efinitions">
<item> alias </item>
<item> module </item>
<item> class </item>
<item> def </item>
<item> undef </item>
</list>
<list name seudo-variables">
<item> self </item>
<item> super </item>
<item> nil </item>
<item> false </item>
<item> true </item>
<item> caller </item>
<item> __FILE__ </item>
<item> __LINE__ </item>
</list>
<list name
efault-globals">
<item> $stdout </item>
<item> $defout </item>
<item> $stderr </item>
<item> $deferr </item>
<item> $stdin </item>
</list>
<!-- Kernel module methods. -->
<list name ernel-methods">
<item> Array </item>
<item> Float </item>
<item> Integer </item>
<item> String </item>
<!-- backquote ` -->
<item> abort </item>
<item> at_exit </item>
<item> autoload </item>
<!-- Doesn't work. Because of question mark?
Included regex below. -->
<item> autoload? </item>
<item> binding </item>
<!-- Doesn't work. Because of question mark?
Included regex below. -->
<item> block_given? </item>
<item> callcc </item>
<item> caller </item>
<item> catch </item>
<item> chomp </item>
<item> chomp! </item>
<item> chop </item>
<item> chop! </item>
<item> eval </item>
<item> exec </item>
<item> exit </item>
<item> exit! </item>
<item> fail </item>
<item> fork </item>
<item> format </item>
<item> getc </item>
<item> gets </item>
<item> global_variables </item>
<item> gsub </item>
<item> gsub! </item>
<!-- Doesn't work. Because of question mark?
Included regex below. -->
<item> iterator? </item>
<item> lambda </item>
<item> load </item>
<item> local_variables </item>
<item> loop </item>
<item> method_missing </item>
<item> open </item>
<item> p </item>
<item> print </item>
<item> printf </item>
<item> proc </item>
<item> putc </item>
<item> puts </item>
<item> raise </item>
<item> rand </item>
<item> readline </item>
<item> readlines </item>
<item> require </item>
<item> scan </item>
<item> select </item>
<item> set_trace_func </item>
<item> sleep </item>
<item> split </item>
<item> sprintf </item>
<item> srand </item>
<item> sub </item>
<item> sub! </item>
<item> syscall </item>
<item> system </item>
<item> test </item>
<item> throw </item>
<item> trace_var </item>
<item> trap </item>
<item> untrace_var </item>
<item> warn </item>
</list>
<list name
ttention">
<item> TODO </item>
<item> FIXME </item>
<item> NOTE </item>
</list>
<contexts>
<context name ormal" attribute ormal Text" lineEndContext stay">
<!-- __END__ token on own line. -->
<RegExpr attribute eyword" String __END__$" context
ATA"/>
<!-- "shebang" line -->
<RegExpr attribute eyword" String #!\/.*" context stay"/>
<!-- "def" - "end" blocks -->
<!-- check for statement modifiers with regexes -->
<RegExpr attribute eyword" String \ (|\[|\{)\s*(if|unless|while|until)\b" context stay" beginRegion
ef block"/>
<RegExpr attribute eyword" String \s*(while|until)\b(?!.*\bdo\b)" context stay" beginRegion
ef block"/>
<RegExpr attribute eyword" String ;\s*(while|until)\b(?!.*\bdo\b)" context stay" beginRegion
ef block"/>
<RegExpr attribute eyword" String \s*(if|unless)\b" context stay" beginRegion
ef block"/>
<RegExpr attribute eyword" String ;\s*(if|unless)\b" context stay" beginRegion
ef block"/>
<RegExpr attribute eyword" String bclass\b" context stay" beginRegion
ef block"/>
<RegExpr attribute eyword" String bmodule\b" context stay" beginRegion
ef block"/>
<RegExpr attribute eyword" String bbegin\b" context stay" beginRegion
ef block"/>
<RegExpr attribute eyword" String bfor\b(?!.*\bdo\b)" context stay" beginRegion
ef block"/>
<RegExpr attribute eyword" String bcase\b" context stay" beginRegion
ef block"/>
<RegExpr attribute eyword" String bdo\b" context stay" beginRegion
ef block"/>
<RegExpr attribute eyword" String bdef\b" context stay" beginRegion
ef block"/>
<RegExpr attribute eyword" String bend\b" context stay" endRegion
ef block"/>
<StringDetect attribute perator" String .." context stay"/>
<Detect2Chars attribute perator" char " char1 " context stay"/>
<!-- marks a message (being sent, not defined) -->
<RegExpr attribute essage" String .[_a-z][_a-zA-Z0-9]*\b" context stay"/>
<keyword attribute eyword" String eywords" context stay"/>
<RegExpr attribute eyword" String bdefined\?" context stay"/>
<keyword attribute
ttribute Definition" String
ttribute-definitions" context stay"/>
<keyword attribute
ccess Control" String
ccess-control" context stay"/>
<keyword attribute
efinition" String
efinitions" context stay" />
<keyword attribute seudo variable" String seudo-variables" context stay"/>
<keyword attribute
efault globals" String
efault-globals" context stay"/>
<keyword attribute ernel methods" String ernel-methods" context stay"/>
<RegExpr attribute ernel methods" String bautoload\?" context stay"/>
<RegExpr attribute ernel methods" String bblock_given\?" context stay"/>
<RegExpr attribute ernel methods" String biterator\?" context stay"/>
<!-- (global) vars starting with $
Match them before $_.
-->
<RegExpr attribute lobal Variable" String $[a-zA-Z_0-9]+" context stay"/>
<!-- special-character globals -->
<RegExpr attribute
efault globals" String $[\d_*`\!:?'/\\\-\&]" context stay"/>
<!-- Generally a module or class name like "File", "MyModule_1", .. -->
<RegExpr attribute
onstant" String b[A-Z]+_*[0-9]*[a-z][_a-zA-Z0-9]*\b" context stay"/>
<RegExpr attribute ex" String b\-?0[xX][_0-9a-fA-F]+" context stay"/>
<RegExpr attributein" String b\-?0[bB][_01]+" context stay"/>
<RegExpr attribute ctal" String b\-?0[1-7][_0-7]*" context stay"/>
<RegExpr attributeloat" String b\-?[0-9][0-9_]*\.[0-9][0-9_]*([eE]\-?[1-9][0-9]*(\.[0-9]*)?)?" context stay"/>
<RegExpr attribute
ec" String b\-?[1-9][0-9_]*\b" context stay"/>
<Int attribute
ec" context stay"/>
<HlCChar attribute
har" context stay"/>
<!-- Check for in before assignment operator. -->
<RegExpr attributelockcomment" String セgin\s*.*$" context 「 メ
「ッセ
シ。ュュ ネナメナ コ ョ
ヤ
ョ
テ ネナメナ シシ ョ
ュュセ
シメナ 「 モ ヲサヲサロ゜チュレンロ゜チュレーュケンェワェワゥソワェ、「 ネ ト「ッセ
シメナ 「 モ ヲサヲサワュロ゜チュレンロ゜チュレーュケンェワェワゥソワェ、「 ネ ト「ッセ
シトテ 「 「 「ッセ
シモト 「 モ サヲサ「 「 ALSE"/>
<StringDetect attribute perator" String |" context stay" insensitiveALSE"/>
<RegExpr attribute perator" String s\?\s" context stay"/>
<RegExpr attribute perator" String s\:\s" context stay"/>
<RegExpr attribute perator" String |&<>\^\+*~\- " context stay"/>
<!-- regexp hack -->
<RegExpr attribute perator" String s[\%/]\s" context stay"/>
<RegExpr attribute perator" String s!" context stay"/>
<StringDetect attribute perator" String context stay" insensitive "/>
<StringDetect attribute perator" String context stay" insensitive "/>
<RegExpr attribute ymbol" String [a-zA-Z_][a-zA-Z0-9_]*" context stay"/>
<DetectChar attribute tring" char quot;" context uoted String"/>
<RegExpr attribute eyword" String \|" context uoted String 1"/>
<RegExpr attribute eyword" String \{" context uoted String 2"/>
<RegExpr attribute eyword" String %Q\{" context uoted String 2"/>
<DetectChar attribute aw String" char " context
postrophed String"/>
<RegExpr attribute eyword" String %q\{" context
postrophed String 1"/>
<DetectChar attribute
ommand" char " context
ommand String"/>
<RegExpr attribute eyword" String %x\{" context
ommand String 2"/>
<StringDetect attribute ormal Text" String #" context stay"/>
<RegExpr attribute
omment" String #\s*BEGIN.*$" context stay" beginRegion arker"/>
<RegExpr attribute
omment" String #\s*END.*$" context stay" endRegion arker"/>
<RegExpr attribute
omment" String \s*#" context
omment Line"/>
<RegExpr attribute
omment" String s#" context eneral Comment"/>
<RegExpr attribute
elimiter" String \[\]]+" context stay"/>
<DetectChar attribute
elimiter" char " context stay" beginRegion
ef block"/>
<DetectChar attribute
elimiter" char " context stay" endRegion
ef block"/>
<RegExpr attribute lobal Constant" String b[A-Z_0-9]+\b" context stay"/>
<RegExpr attribute nstance Variable" String [a-zA-Z_0-9]+" context stay"/>
<RegExpr attribute
lass Variable" String @[a-zA-Z_0-9]+" context stay"/>
<DetectChar attribute egular Expression" char " context egEx 1"/>
<RegExpr attribute egular Expression" String %r\{" context egEx 2"/>
<RegExpr attribute egular Expression" String %r\<" context egEx 3"/>
<RegExpr attribute eyword" String %w\(" context ordlist 1"/>
<RegExpr attribute eyword" String %w\{" context ordlist 2"/>
<RegExpr attribute eyword" String %w\<" context ordlist 3"/>
<RegExpr attribute eyword" String %w\[" context ordlist 4"/>
<RegExpr attribute perator" String :" context ember Access"/>
</context>
<context name uoted String" attribute tring" lineEndContext stay">
<RegExpr attribute tring" String \\"" context stay"/>
<RegExpr attribute ubstitution" String @{1,2}" context hort Subst"/>
<Detect2Chars attribute ubstitution" char " char1 " context ubst"/>
<!--HlCChar attribute
har" context pop"/-->
<DetectChar char quot;" attribute tring" context pop"/>
</context>
<context name uoted String 1" attribute tring" lineEndContext stay">
<RegExpr attribute tring" String \\|" context stay"/>
<RegExpr attribute ubstitution" String @{1,2}" context hort Subst"/>
<Detect2Chars attribute ubstitution" char " char1 " context ubst"/>
<DetectChar attribute eyword" char " context pop"/>
</context>
<context name uoted String 2" attribute tring" lineEndContext stay">
<RegExpr attribute tring" String \\}" context stay"/>
<RegExpr attribute ubstitution" String @{1,2}" context hort Subst"/>
<Detect2Chars attribute ubstitution" char " char1 " context ubst"/>
<DetectChar attribute eyword" char " context pop"/>
</context>
<context name
postrophed String" attribute aw String" lineEndContext stay">
<!-- <HlCChar attribute
har" context pop"/> -->
<RegExpr attribute tring" String \\'" context stay"/>
<DetectChar char " attribute aw String" context pop"/>
</context>
<context name
postrophed String 1" attribute aw String" lineEndContext stay">
<RegExpr attribute tring" String \\}" context stay"/>
<DetectChar char " attribute eyword" context pop"/>
</context>
<context name
ommand String" attribute
ommand" lineEndContext pop">
<RegExpr attribute tring" String \\`" context stay"/>
<RegExpr attribute ubstitution" String @{1,2}" context hort Subst"/>
<Detect2Chars attribute ubstitution" char " char1 " context ubst"/>
<HlCChar attribute
har" context pop"/>
<DetectChar char " attribute
ommand" context pop"/>
</context>
<context name
ommand String 2" attribute
ommand" lineEndContext pop">
<RegExpr attribute tring" String \\}" context stay"/>
<RegExpr attribute ubstitution" String @{1,2}" context hort Subst"/>
<Detect2Chars attribute ubstitution" char " char1 " context ubst"/>
<HlCChar attribute
har" context pop"/>
<DetectChar char " attribute eyword" context pop"/>
</context>
<context name 「
「 ナテ 「セ
シメナ
「 モ 濺ワェ「 「 メ
「ッセ
シッセ
シ ナ ア「 ナ「 ナテ 「セ
シメナ ナ「 モ ワワッ「 「ッセ
シメナ ナ「 モ ゛ワワン、「 「ッセ
シメナ 「 モ タアャイ「 モ「ッセ
シトイテ 「 「 ア 「 「ッセ
シメナ ナ「 モ ロンェ「 「ッセ
シッセ
シ ナ イ「 ナ「 ナテ 「セ
シメナ ナ「 モ ワワ「 「ッセ
シメナ ナ「 モ ゛ワワン、「 「ッセ
シメナ 「 モ タアャイ「 モ「ッセ
シトイテ 「 「 ア 「 「ッセ
シメナ ナ「 モ ロンェ「 「ッセ
シッセ
シ ナ ウ「 ナ「 ナテ 「セ
シメナ ナ「 モ ワワヲサ「 「ッセ
シメナ ナ「 モ ゛ワワン、「 「ッセ
シメナ 「 モ タアャイ「 モ「ッセ
シトイテ 「 「 ア 「 「ッセ
シメナ ナ「 モ ヲサロンェ「 「ッセ
シッセ
シ lexible Literal 1" attribute tring" lineEndContext pop">
<RegExpr attribute tring" String \\}" context stay"/>
<RegExpr attribute ubstitution" String @{1,2}" context hort Subst"/>
<Detect2Chars attribute ubstitution" char " char1 " context ubst"/>
<RegExpr attribute tring" String }" context pop"/>
</context>
<context name ordlist 1" attribute tring" lineEndContext stay">
<RegExpr attribute tring" String \\)" context stay"/>
<DetectChar attribute eyword" char " context pop"/>
</context>
<context name ordlist 2" attribute tring" lineEndContext stay">
<RegExpr attribute tring" String \\}" context stay"/>
<DetectChar attribute eyword" char " context pop"/>
</context>
<context name ordlist 3" attribute tring" lineEndContext stay">
<RegExpr attribute tring" String \\>" context stay"/>
<DetectChar attribute eyword" char gt;" context pop"/>
</context>
<context name ordlist 4" attribute tring" lineEndContext stay">
<RegExpr attribute tring" String \\]" context stay"/>
<DetectChar attribute eyword" char " context pop"/>
</context>
<context name ubst" attribute ubstitution" lineEndContext pop">
<DetectChar attribute ubstitution" char " context pop"/>
</context>
<context name hort Subst" attribute ubstitution" lineEndContext pop">
<!-- Check for e.g.: "#@var#@@xy" -->
<RegExpr attribute ubstitution" String @{1,2}" context stay"/>
<RegExpr attribute ubstitution" String _a-zA-Z0-9](? _a-zA-Z0-9])" context pop"/>
</context>
<context name ember Access" attribute ember" lineEndContext pop">
<RegExpr attribute
onstant" String b[A-Z]+_*[0-9]*[a-z][_a-zA-Z0-9]+\b" context pop"/>
<RegExpr attribute
onstant Value" String _A-Z][_A-Z0-9]*" context stay"/>
<AnyChar attribute perator" String +-*/%|&[]{}~" context pop"/>
<DetectChar attribute
omment" char " context pop"/>
<AnyChar attribute ormal Text" String )\" context pop"/>
<RegExpr attribute ember" String ^_A-Z0-9]" context pop"/>
</context>
<context name
omment Line" attribute
omment" lineEndContext pop">
<RegExpr attribute
omment" String _a-zA-Z0-9]\:\:\s" context Doc Label"/>
<keyword attribute
ec" String
ttention" context stay"/>
</context>
<context name eneral Comment" attribute
omment" lineEndContext pop">
<keyword attribute
ec" String
ttention" context stay"/>
</context>
<context name Doc Label" attribute Doc Value" lineEndContext pop"/>
<context name imple Here Doc" attribute ormal Text" lineEndContext stay">
<RegExpr attribute ubstitution" String @{1,2}" context hort Subst"/>
<Detect2Chars attribute ubstitution" char " char1 " context ubst"/>
<RegExpr attribute eyword" String [_A-Z][_A-Z0-9]*$" context pop"/>
</context>
<context name ntend Here Doc" attribute ormal Text" lineEndContext stay">
<RegExpr attribute ubstitution" String @{1,2}" context hort Subst"/>
<Detect2Chars attribute ubstitution" char " char1 " context ubst"/>
<RegExpr attribute eyword" String s*^[_A-Z][_A-Z0-9]*$" context pop"/>
</context>
<context name
ATA" attribute
ata" lineEndContext stay"/>
</contexts>
<itemDatas>
<itemData name ormal Text" defStyleNum
sNormal"/>
<itemData name eyword" defStyleNum
sKeyword"/>
<itemData name
ttribute Definition" defStyleNum
sOthers"/>
<itemData name
ccess Control" defStyleNum
sKeyword" color 0000FF"/>
<itemData name
efinition" defStyleNum
sKeyword"/>
<itemData name seudo variable" defStyleNum
sDecVal"/>
<itemData name
ec" defStyleNum
sDecVal"/>
<itemData nameloat" defStyleNum
sFloat"/>
<itemData name
har" defStyleNum
sChar"/>
<itemData name ctal" defStyleNum
sBaseN"/>
<itemData name ex" defStyleNum
sBaseN"/>
<itemData namein" defStyleNum
sBaseN"/>
<itemData name ymbol" defStyleNum
sString" color D40000"/>
<itemData name tring" defStyleNum
sString"/>
<itemData name aw String" defStyleNum
sString" color DD4A4A" selColor DD4A4A"/>
<itemData name
ommand" defStyleNum
sString" color AA3000"/>
<itemData name essage" defStyleNum
sNormal" color 4000A7"/> <!-- #4A00C0 -->
<itemData name egular Expression" defStyleNum
sOthers" color 4A5704"/>
<itemData name ubstitution" defStyleNum
sOthers"/>
<itemData name
ata" defStyleNum
sNormal"/>
<itemData name
efault globals" defStyleNum
sDataType" color C00000" bold"/>
<itemData name lobal Variable" defStyleNum
sDataType" color C00000"/>
<itemData name lobal Constant" defStyleNum
sDataType" color bb1188" bold"/>
<itemData name
onstant" defStyleNum
sDataType"/>
<itemData name
onstant Value" defStyleNum
sDataType" color bb1188"/>
<itemData name ernel methods" defStyleNum
sNormal" color 000080" selColor ffffff"/> <!-- #CC0E86 -->
<itemData name ember" defStyleNum
sNormal"/>
<itemData name nstance Variable" defStyleNum
sOthers"/>
<itemData name
lass Variable" defStyleNum
sOthers"/>
<itemData name
omment" defStyleNum
sComment"/>
<itemData namelockcomment" defStyleNum
sComment"/>
<itemData name egion Marker" defStyleNum
sNormal" color 0000ff"/>
<itemData name Doc Value" defStyleNum
sOthers"/>
<itemData name
elimiter" defStyleNum
sChar"/>
<itemData name「 モホ
マ「ッセ
シト 「 モホ
テ「ッセ
シットセ
シッセ
シセ
シセ
シ フ「 「ッセ
シッセ
シ 「ッセ
シッセ
シッセ
ュュツューー
レツォリオレュュ
ュュツューー
レツォリオレュュ