summaryrefslogtreecommitdiffstats
path: root/kate/data/ocaml.xml
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-02 09:20:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-02 09:20:27 +0000
commitd7b9791584eda0f022813fd2b2df50f59eba29c5 (patch)
tree395d2d48909ce6f9e002106d1638610f7a7c8321 /kate/data/ocaml.xml
parent84bbc54a086fc6894b247488bf62bdff04dd55fa (diff)
downloadtdelibs-d7b9791584eda0f022813fd2b2df50f59eba29c5.tar.gz
tdelibs-d7b9791584eda0f022813fd2b2df50f59eba29c5.zip
Added remaining missing Kate xml files
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1068844 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/data/ocaml.xml')
-rw-r--r--kate/data/ocaml.xml113
1 files changed, 102 insertions, 11 deletions
diff --git a/kate/data/ocaml.xml b/kate/data/ocaml.xml
index 6d7a07d49..f86b2fac8 100644
--- a/kate/data/ocaml.xml
+++ b/kate/data/ocaml.xml
@@ -5,10 +5,11 @@
<!-- Regular expresion constants: -->
<!ENTITY LETTER "A-Za-z\0300-\0326\0330-\0366\0370-\0377"> <!-- Latin-1 letters. -->
<!ENTITY IDENT "[&LETTER;_][&LETTER;0-9_']*"> <!-- OCaml identifiers. -->
+<!ENTITY MIDENT "[A-Z][&LETTER;0-9_']*"> <!-- OCaml uppercase identifiers. -->
<!ENTITY ESC "(\\[ntbr'&quot;\\]|\\[0-9]{3}|\\x[0-9A-Fa-f]{2})"> <!-- OCaml character code escapes. -->
<!ENTITY DEC "[0-9][0-9_]*"> <!-- Decimal digits with underscores. -->
]>
-<language name="Objective Caml" version="1.04" kateversion="2.4" section="Sources" extensions="*.ml;*.mli" mimetype="" priority="10" author="Glyn Webster (glyn@wave.co.nz)" license="LGPL">
+<language name="Objective Caml" version="1.05" kateversion="2.4" section="Sources" extensions="*.ml;*.mli" mimetype="" priority="10" author="Glyn Webster (glyn@wave.co.nz)" license="LGPL">
<highlighting>
<!-- Revised Syntax keywords are highlighted as identifiers by default. -->
@@ -24,15 +25,15 @@
<item> as </item>
<item> assert </item>
<item> asr </item>
- <item> begin </item>
+<!-- <item> begin </item> -->
<item> class </item>
<item> closed </item>
<item> constraint </item>
- <item> do </item>
- <item> done </item>
+<!-- <item> do </item> -->
+<!-- <item> done </item> -->
<item> downto </item>
<item> else </item>
- <item> end </item>
+<!-- <item> end </item> -->
<item> exception </item>
<item> external </item>
<item> false </item>
@@ -42,8 +43,9 @@
<item> functor </item>
<item> if </item>
<item> in </item>
- <item> include </item>
+<!-- <item> include </item> -->
<item> inherit </item>
+ <item> initializer </item>
<item> land </item>
<item> lazy </item>
<item> let </item>
@@ -54,17 +56,18 @@
<item> match </item>
<item> method </item>
<item> mod </item>
- <item> module </item>
+<!-- <item> module </item> -->
<item> mutable </item>
<item> new </item>
+<!-- <item> object </item> -->
<item> of </item>
- <item> open </item>
+<!-- <item> open </item> -->
<item> or </item>
<item> parser </item>
<item> private </item>
<item> rec </item>
- <item> sig </item>
- <item> struct </item>
+<!-- <item> sig </item> -->
+<!-- <item> struct </item> -->
<item> then </item>
<item> to </item>
<item> true </item>
@@ -91,12 +94,64 @@
<item> list </item>
<item> option </item>
</list>
+ <list name="symbols">
+ <item> ? </item>
+ </list>
+ <list name="end">
+ <item> end </item>
+ </list>
+ <list name="sig">
+ <item> sig </item>
+ </list>
+ <list name="struct">
+ <item> struct </item>
+ </list>
+ <list name="object">
+ <item> object </item>
+ </list>
+ <list name="begin">
+ <item> begin </item>
+ </list>
+ <list name="do">
+ <item> do </item>
+ </list>
+ <list name="done">
+ <item> done </item>
+ </list>
+ <list name="module_environment">
+ <item> module </item>
+ <item> open </item>
+ <item> include </item>
+ </list>
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
<Detect2Chars attribute="Comment" context="Multiline Comment" char="(" char1="*" beginRegion="comment" />
+ <DetectChar attribute="Symbol" context="#stay" char="(" beginRegion="paren"/>
+ <DetectChar attribute="Symbol" context="#stay" char=")" endRegion="paren"/>
+
+ <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="record"/>
+ <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="record"/>
+
+ <Detect2Chars attribute="Symbol" context="#stay" char="[" char1="|" beginRegion="array"/>
+ <Detect2Chars attribute="Symbol" context="#stay" char="|" char1="]" endRegion="array"/>
+ <DetectChar attribute="Symbol" context="#stay" char="[" beginRegion="list"/>
+ <DetectChar attribute="Symbol" context="#stay" char="]" endRegion="list"/>
+
+ <keyword attribute="Keyword" context="#stay" String="do" beginRegion="loop"/>
+ <keyword attribute="Keyword" context="#stay" String="done" endRegion="loop"/>
+ <keyword attribute="Directive" context="ModuleEnv" String="module_environment"/>
+ <keyword attribute="Region Marker" context="Block" String="begin" beginRegion="block"/>
+ <keyword attribute="Region Marker" context="Object" String="object" beginRegion="object"/>
+ <keyword attribute="Region Marker" context="Sig" String="sig" beginRegion="sig"/>
+ <keyword attribute="Region Marker" context="Struct" String="struct" beginRegion="struct"/>
+
+ <RegExpr attribute="Constructor" context="#stay" String="`\s*&IDENT;"/>
+ <RegExpr attribute="Module" lookAhead="true" context="ModuleEnv2" String="&MIDENT;\s*\."/>
+ <RegExpr attribute="Constructor" context="#stay" String="&MIDENT;"/>
+
<!-- Interpreter directives. -->
<!-- (These are lines where the first symbol is a '#' followed by an identifier. -->
<!-- Such lines could also be part of a method call split over two lines but -->
@@ -122,7 +177,7 @@
<RegExpr attribute="Hexadecimal" context="#stay" String="-?0[xX][0-9A-Fa-f_]+" />
<RegExpr attribute="Octal" context="#stay" String="-?0[oO][0-7_]+" />
<RegExpr attribute="Binary" context="#stay" String="-?0[bB][01_]+" />
- <RegExpr attribute="Float" context="#stay" String="-?&DEC;(\.&DEC;([eE][-+]?&DEC;)?|[eE][-+]?&DEC;)" />
+ <RegExpr attribute="Float" context="#stay" String="-?&DEC;((\.(&DEC;)?([eE][-+]?&DEC;)?)|([eE][-+]?&DEC;))" />
<RegExpr attribute="Decimal" context="#stay" String="-?&DEC;" />
</context>
@@ -140,6 +195,38 @@
<RegExpr attribute="Escaped characters" context="#stay" String="\\$" />
</context>
+ <context attribute="Normal text" lineEndContext="#stay" name="Block">
+ <keyword attribute="Region Marker" context="#pop" String="end" endRegion="block"/>
+ <IncludeRules context="Normal"/>
+ </context>
+
+ <context attribute="Normal text" lineEndContext="#stay" name="Sig">
+ <keyword attribute="Region Marker" context="#pop" String="end" endRegion="sig"/>
+ <IncludeRules context="Normal"/>
+ </context>
+
+ <context attribute="Normal text" lineEndContext="#stay" name="Struct">
+ <keyword attribute="Region Marker" context="#pop" String="end" endRegion="struct"/>
+ <IncludeRules context="Normal"/>
+ </context>
+
+ <context attribute="Normal text" lineEndContext="#stay" name="Object">
+ <keyword attribute="Region Marker" context="#pop" String="end" endRegion="object"/>
+ <IncludeRules context="Normal"/>
+ </context>
+
+ <context attribute="Normal text" lineEndContext="#stay" name="ModuleEnv" fallthrough="true" fallthroughContext="#pop">
+ <DetectSpaces attribute="Normal text" context="#stay"/>
+ <RegExpr attribute="Module" lookAhead="true" context="ModuleEnv2" String="&MIDENT;\s*\."/>
+ <RegExpr attribute="Module" context="#pop" String="&MIDENT;"/>
+ </context>
+
+ <context attribute="Normal text" lineEndContext="#stay" name="ModuleEnv2">
+ <RegExpr attribute="Module" context="#stay" String="&MIDENT;"/>
+ <DetectSpaces attribute="Normal text" context="#stay"/>
+ <StringDetect attribute="Keyword" context="#pop" String="."/>
+ </context>
+
<!-- Camlp4 Quotations. These are source code literals used by the Campl4 preprocessor. -->
<!-- The only escapes allowed in a Camlp4 quotation are for the quotation start and stop symbols. -->
<context attribute="Camlp4 Quotation" lineEndContext="#stay" name="Camlp4 Quotation Constant">
@@ -154,6 +241,7 @@
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="Identifier" defStyleNum="dsNormal"/>
+ <itemData name="Symbol" defStyleNum="dsNormal"/>
<itemData name="Keyword" defStyleNum="dsKeyword"/>
<itemData name="Revised Syntax Keyword" defStyleNum="dsNormal"/>
<itemData name="Core Data Type" defStyleNum="dsDataType"/>
@@ -168,6 +256,9 @@
<itemData name="Comment" defStyleNum="dsComment"/>
<itemData name="Camlp4 Quotation" defStyleNum="dsString"/>
<itemData name="Directive" defStyleNum="dsOthers"/>
+ <itemData name="Constructor" defStyleNum="dsDataType"/>
+ <itemData name="Module" defStyleNum="dsNormal"/>
+ <itemData name="Region Marker" defStyleNum="dsKeyword"/>
</itemDatas>
</highlighting>