diff options
Diffstat (limited to 'kate/data/d.xml')
-rw-r--r-- | kate/data/d.xml | 348 |
1 files changed, 348 insertions, 0 deletions
diff --git a/kate/data/d.xml b/kate/data/d.xml new file mode 100644 index 000000000..e53a3174c --- /dev/null +++ b/kate/data/d.xml @@ -0,0 +1,348 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE language SYSTEM "language.dtd"> +<!-- + ======================================================================== + + D.XML supports syntax highlighting for the D programming language under Kate. + + Copyright (C) 2004 - Simon J Mackenzie <project.katedxml@smackoz.fastmail.fm> + This code is released under the LGPL as part of kdelibs/kate. + + ======================================================================== + + D is a next generation language written by Walter Bright of Digital Mars fame. + Digital Mars C, C++ and D Compilers can be obtained from http://www.digitalmars.com/ + + ======================================================================== + + Updates for D.XML can be obtained from http://kate.kde.org/hl/ + + UPDATE HISTORY:- + 2004.08.15 - D.XML 1.36 - D 0.98 - Current release of D. + - package, writef(strictly speaking writyef isn't a keyword) - keywords are now supported. + 2004.??.?? - D.XML 1.35 - D 0.?? - Not sure how this release got posted! + 2004.05.23 - D.XML 1.34 - D 0.90 - updated. + 2004.05.19 - D.XML 1.33 - D 0.89 - mixin - keyword is now supported. + 2004.05.19 - D.XML 1.32 - D 0.77 - pragma, typeof - keywords are now supported. + 2004.05.19 - D.XML 1.31 - D 0.76 - is - keyword is now supported. + 2003.09.06 - D.XML 1.30 - D 0.71 - foreach - keyword is now supported. + 2003.08.18 - D.XML 1.20 - D 0.69 - floats are now supported. + - embedded underscores in integer and float literals are now supported. + 2003.08.11 - D.XML 1.10 - updated. + 2003.07.18 - D.XML 1.00 - First released. + + TODO:- + - Kate string translation cannot handle \" as a literal within a D string. The " will be interpreted as an end of string marker + when it should be ignored because of the preceding back-slash. + + ======================================================================== +--> + +<language name="D" section="Sources" extensions="*.d;*.D" mimetype="text/x-dsrc" version="1.36" kateversion="2.2" casesensitive="true" author="Simon J Mackenzie (project.katedxml@smackoz.fastmail.fm)" license="LGPL"> + <highlighting> + <list name="keywords"> + <item> abstract </item> + <item> alias </item> + <item> align </item> + <item> asm </item> + <item> auto </item> + + <item> body </item> + <item> break </item> + + <item> case </item> + <item> cast </item> + <item> catch </item> + <item> class </item> + <item> const </item> + <item> continue </item> + + <item> default </item> + <item> delegate </item> + <item> delete </item> + <item> deprecated </item> + <item> do </item> + + <item> else </item> + <item> enum </item> + <item> export </item> + + <item> false </item> + <item> final </item> + <item> finally </item> + <item> for </item> + <item> foreach </item> + <item> function </item> + + <item> goto </item> + + <item> if </item> + <item> in </item> + <item> inout </item> + <item> interface </item> + <item> invariant </item> + <item> is </item> + + <item> mixin </item> + + <item> new </item> + <item> null </item> + + <item> out </item> + <item> override </item> + + <item> package </item> + <item> private </item> + <item> protected </item> + <item> public </item> + + <item> return </item> + + <item> static </item> + <item> struct </item> + <item> super </item> + <item> switch </item> + <item> synchronized </item> + + <item> template </item> + <item> this </item> + <item> throw </item> + <item> true </item> + <item> try </item> + <item> typedef </item> + <item> typeof </item> + + <item> union </item> + + <item> volatile </item> + + <item> while </item> + <item> with </item> + </list> + <list name="modules"> + <item> module </item> + <item> import </item> + </list> + <list name="types"> + <item> void </item> + <item> bit </item> + <item> byte </item> + <item> ubyte </item> + <item> short </item> + <item> ushort </item> + <item> int </item> + <item> uint </item> + <item> long </item> + <item> ulong </item> + <item> cent </item> + <item> ucent </item> + <item> float </item> + <item> double </item> + <item> real </item> + <item> ireal </item> + <item> ifloat </item> + <item> idouble </item> + <item> creal </item> + <item> cfloat </item> + <item> cdouble </item> + <item> char </item> + <item> wchar </item> + <item> dchar </item> + </list> + <list name="phobos"> + <item> printf </item> + <item> writef </item> + </list> + + <list name="linkage"> + <item> extern </item> + </list> + <list name="ltypes"> + <item> C </item> + <item> D </item> + <item> Windows </item> + <item> Pascal </item> + </list> + + <list name="debug"> + <item> debug </item> + </list> + <list name="assert"> + <item> assert </item> + </list> + + <list name="pragma"> + <item> pragma </item> + </list> + <list name="ptypes"> + <item> msg </item> + </list> + + <list name="version"> + <item> version </item> + </list> + <list name="vtypes"> + <item> DigitalMars </item> + <item> X86 </item> + <item> AMD64 </item> + <item> Windows </item> + <item> Win32 </item> + <item> Win64 </item> + <item> linux </item> + <item> LittleEndian </item> + <item> BigEndian </item> + <item> D_InlineAsm </item> + <item> none </item> + </list> + + <list name="unittest"> + <item> unittest </item> + </list> + + <contexts> + <context attribute="Normal Text" lineEndContext="#stay" name="normal"> + <keyword attribute="Keyword" context="#stay" String="keywords"/> + <keyword attribute="Module" context="ModuleName" String="modules"/> + <keyword attribute="Type" context="#stay" String="types"/> + <keyword attribute="Phobos Library" context="#stay" String="phobos"/> + <keyword attribute="Linkage" context="Linkage" String="linkage"/> + <keyword attribute="Debug" context="#stay" String="debug"/> + <keyword attribute="Assert" context="#stay" String="assert"/> + <keyword attribute="Pragma" context="Pragmas" String="pragma"/> + <keyword attribute="Version" context="Version" String="version"/> + <keyword attribute="Unit Test" context="#stay" String="unittest"/> + + <Detect2Chars attribute="Wysiwyg" context="Wysiwyg" char="r" char1="""/> + <Detect2Chars attribute="Hex" context="Hex" char="x" char1="""/> + + <RegExpr attribute="Normal Text" context="#pop" String="[_a-z][\w]*" insensitive="true"/> + + <RegExpr attribute="Pragma" context="#pop" String="\#[ ]*line"/> + + <RegExpr attribute="Escape String" context="#pop" String="\\[n|t|"]"/> + <RegExpr attribute="Escape String" context="#pop" String="(\\r\\n)"/> + <RegExpr attribute="Escape String" context="#pop" String="\\0[0-7]+"/> + <RegExpr attribute="Escape String" context="#pop" String="\\u[\d]+" insensitive="true"/> + <RegExpr attribute="Escape String" context="#pop" String="\\x[\da-fA-F]+"/> + + <RegExpr attribute="Binary" context="#pop" String="0b[01]+[_01]*[ ]*\.\.[ ]*0b[01]+[_01]*(UL|LU|U|L)?" insensitive="true"/> + <RegExpr attribute="Octal" context="#pop" String="0[0-7]+[_0-7]*[ ]*\.\.[ ]*0[0-7]+[_0-7]*(UL|LU|U|L)?" insensitive="true"/> + <RegExpr attribute="Hex" context="#pop" String="0x[\da-f]+[_\da-f]*[ ]*\.\.[ ]*0x[\da-f]+[_\da-f]*(UL|LU|U|L)?" insensitive="true"/> + <RegExpr attribute="Integer" context="#pop" String="[\d]+[_\d]*(UL|LU|U|L)?[ ]*\.\.[ ]*[\d]+[_\d]*(UL|LU|U|L)?" insensitive="true"/> + + <RegExpr attribute="Float" context="#pop" String="[\d]*[_\d]*\.[_\d]*(e-|e|e\+)?[\d]+[_\d]*(F|L|I|FI|LI|)?" insensitive="true"/> + <RegExpr attribute="Float" context="#pop" String="[\d]*[_\d]*\.?[_\d]*(e-|e|e\+)[\d]+[_\d]*(F|L|I|FI|LI|)?" insensitive="true"/> + <RegExpr attribute="Float" context="#pop" String="0x[\da-f]+[_\da-f]*\.[_\da-f]*(p-|p|p\+)?[\da-f]+[_\da-f]*(F|L|I|FI|LI)?" insensitive="true"/> + <RegExpr attribute="Float" context="#pop" String="0x[\da-f]+[_\da-f]*\.?[_\da-f]*(p-|p|p\+)[\da-f]+[_\da-f]*(F|L|I|FI|LI)?" insensitive="true"/> + + <RegExpr attribute="Binary" context="#pop" String="0B[01]+[_01]*(UL|LU|U|L)?" insensitive="true"/> + <RegExpr attribute="Octal" context="#pop" String="0[0-7]+[_0-7]*(UL|LU|U|L)?" insensitive="true"/> + <RegExpr attribute="Hex" context="#pop" String="0x[\da-f]+[_\da-f]*(UL|LU|U|L)?" insensitive="true"/> + <RegExpr attribute="Integer" context="#pop" String="[\d]+[_\d]*(UL|LU|U|L)?" insensitive="true"/> + + <DetectChar attribute="Char" context="Char" char="'"/> + <DetectChar attribute="String" context="String" char="""/> + <DetectChar attribute="Wysiwyg" context="Wysiwyg" char="`"/> + + <Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/> + <Detect2Chars attribute="Comment" context="CommentBlockA" char="/" char1="*" beginRegion="CommentA"/> + <Detect2Chars attribute="Comment" context="CommentBlockB" char="/" char1="+" beginRegion="CommentB"/> + + <DetectChar attribute="Normal Text" context="#stay" char="{" beginRegion="BraceA" /> + <DetectChar attribute="Normal Text" context="#stay" char="}" endRegion="BraceA" /> + </context> + + <context attribute="Module Name" lineEndContext="#stay" name="ModuleName"> + <DetectChar attribute="Normal Text" context="#stay" char=","/> + <DetectChar attribute="Normal Text" context="#pop" char=";"/> + <Detect2Chars attribute="Comment" context="CommentLine" char="/" char1="/"/> + <Detect2Chars attribute="Comment" context="CommentBlockA" char="/" char1="*" beginRegion="CommentA"/> + <Detect2Chars attribute="Comment" context="CommentBlockB" char="/" char1="+" beginRegion="CommentB"/> + </context> + + <context attribute="Linkage" lineEndContext="#pop" name="Linkage"> + <keyword attribute="Type" context="#pop" String="types"/> + <DetectChar attribute="Normal Text" context="#stay" char="("/> + <keyword attribute="Linkage Type" context="#stay" String="ltypes"/> + <DetectChar attribute="Normal Text" context="#pop" char=")"/> + <DetectChar attribute="Normal Text" context="#pop" char=";"/> + </context> + <context attribute="Version" lineEndContext="#pop" name="Version"> + <DetectChar attribute="Normal Text" context="#pop" char="="/> + <DetectChar attribute="Normal Text" context="#stay" char="("/> + <keyword attribute="Version Type" context="#stay" String="vtypes"/> + <RegExpr attribute="Normal Text" context="#pop" String="\w" insensitive="true"/> + <DetectChar attribute="Normal Text" context="#pop" char=")"/> + </context> + <context attribute="Pragma" lineEndContext="#pop" name="Pragmas"> + <DetectChar attribute="Normal Text" context="#stay" char="("/> + <keyword attribute="Version Type" context="#stay" String="ptypes"/> + <keyword attribute="Version Type" context="#stay" String="vtypes"/> + <RegExpr attribute="Keyword" context="#pop" String="[_a-z][\w]*" insensitive="true"/> + <DetectChar attribute="Normal Text" context="#pop" char=","/> + <DetectChar attribute="Normal Text" context="#pop" char=")"/> + </context> + + <context attribute="Wysiwyg" lineEndContext="#stay" name="Wysiwyg"> + <DetectChar attribute="Wysiwyg" context="#pop" char="""/> + <DetectChar attribute="Wysiwyg" context="#pop" char="`"/> + </context> + <context attribute="Hex" lineEndContext="#stay" name="Hex"> + <DetectChar attribute="Hex" context="#pop" char="""/> + </context> + <context attribute="Char" lineEndContext="#stay" name="Char"> + <Detect2Chars attribute="Char" context="#stay" char="\" char1="'"/> + <Detect2Chars attribute="Char" context="#stay" char="\" char1="\"/> + <DetectChar attribute="Char" context="#pop" char="'"/> + </context> + <context attribute="String" lineEndContext="#stay" name="String"> + <DetectChar attribute="String" context="#pop" char="""/> + </context> + + <context attribute="Comment" lineEndContext="#pop" name="CommentLine"> + </context> + <context attribute="Comment" lineEndContext="#stay" name="CommentBlockA"> + <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="CommentA"/> + </context> + <context attribute="Comment" lineEndContext="#stay" name="CommentBlockB"> + <Detect2Chars attribute="Comment" context="#pop" char="+" char1="/" endRegion="CommentB"/> + </context> + </contexts> + <itemDatas> + <itemData name="Normal Text" defStyleNum="dsNormal"/> + <itemData name="Keyword" defStyleNum="dsKeyword" color="#000000" selColor="#ffffff" bold="1" italic="0"/> + <itemData name="Module" defStyleNum="dsKeyword" color="#0000ff" selColor="#ffffff" bold="0" italic="0"/> + <itemData name="Module Name" defStyleNum="dsKeyword" color="#0000ff" selColor="#ffffff" bold="1" italic="1"/> + <itemData name="Type" defStyleNum="dsDataType"/> + <itemData name="Phobos Library" defStyleNum="dsKeyword" color="#000000" selColor="#ffffff" bold="1" italic="1"/> + <itemData name="Linkage" defStyleNum="dsKeyword" color="#ff0000" selColor="#ffffff" bold="0" italic="0"/> + <itemData name="Linkage Type" defStyleNum="dsDataType" color="#ff0000" selColor="#ffffff" bold="1" italic="1"/> + <itemData name="Debug" defStyleNum="dsKeyword" color="#ff00ff" selColor="#ffffff" bold="0" italic="0"/> + <itemData name="Assert" defStyleNum="dsKeyword" color="#0000ff" selColor="#ffffff" bold="0" italic="0"/> + <itemData name="Version" defStyleNum="dsKeyword" color="#ff0000" selColor="#ffffff" bold="0" italic="0"/> + <itemData name="Version Type" defStyleNum="dsDataType" color="#ff0000" selColor="#ffffff" bold="1" italic="1"/> + <itemData name="Unit Test" defStyleNum="dsKeyword" color="#ff00ff" selColor="#ffffff" bold="1" italic="0"/> + <itemData name="Pragma" defStyleNum="dsKeyword" color="#00aa00" selColor="#ffffff" bold="1" italic="0"/> + + <itemData name="Integer" defStyleNum="dsDecVal"/> + <itemData name="Binary" defStyleNum="dsBaseN" color="#00dddd" selColor="#00ffff" bold="0" italic="0"/> + <itemData name="Octal" defStyleNum="dsBaseN" color="#00aaaa" selColor="#00ffff" bold="0" italic="0"/> + <itemData name="Hex" defStyleNum="dsBaseN" color="#006666" selColor="#00ffff" bold="0" italic="0"/> + <itemData name="Float" defStyleNum="dsFloat"/> + + <itemData name="Escape String" defStyleNum="dsString" color="#00aa00" selColor="#ff0000" bold="0" italic="0"/> + <itemData name="String" defStyleNum="dsString" color="#00aa00" selColor="#ff0000" bold="0" italic="0"/> + <itemData name="Char" defStyleNum="dsChar" color="#ff00ff" selColor="#ff00ff" bold="0" italic="0"/> + <itemData name="Wysiwyg" defStyleNum="dsChar" color="#a100a1" selColor="#ff00ff" bold="0" italic="0"/> + + <itemData name="Comment" defStyleNum="dsComment"/> + </itemDatas> + </highlighting> + <general> + <comments> + <comment name="singleLine" start="//"/> + <comment name="multiLine" start="/+" end="+/"/> + </comments> + <keywords casesensitive="true"/> + </general> +</language> |