summaryrefslogtreecommitdiffstats
path: root/kate/data/ocamllex.xml
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2015-10-25 20:12:45 +0800
committerMichele Calgaro <michele.calgaro@yahoo.it>2015-10-25 20:26:12 +0800
commit36e8000863322e5367dafa398b228a72502030a4 (patch)
tree130c6f67f85401148e1c2838b01fd9a4e8b74223 /kate/data/ocamllex.xml
parent48c3adf7bda38f19bd5c4a1a58348ae91bc82bf8 (diff)
downloadtdelibs-36e8000863322e5367dafa398b228a72502030a4.tar.gz
tdelibs-36e8000863322e5367dafa398b228a72502030a4.zip
Kate syntax highlighting files update - Oct 2015
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit dd1a8d0d1a40f43040555128913e55202f241270)
Diffstat (limited to 'kate/data/ocamllex.xml')
-rw-r--r--kate/data/ocamllex.xml81
1 files changed, 81 insertions, 0 deletions
diff --git a/kate/data/ocamllex.xml b/kate/data/ocamllex.xml
new file mode 100644
index 000000000..f3c32e70a
--- /dev/null
+++ b/kate/data/ocamllex.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Kate syntax highlighting for the Objective Caml 'Ocamlllex' -->
+<!DOCTYPE language SYSTEM "language.dtd"
+[
+<!-- Regular expresion constants: -->
+<!ENTITY LETTER "A-Za-z\300-\326\330-\366\370-\377"> <!-- Latin-1 letters. -->
+<!ENTITY IDENT "`?[&LETTER;_][&LETTER;0-9_']*"> <!-- OCaml identifiers. -->
+<!ENTITY ESC "(\\[ntbr'&quot;\\]|\\[0-9]{3}|\\x[0-9A-Fa-f]{2})"> <!-- OCaml character code escapes. -->
+]>
+<language name="Objective Caml Ocamllex"
+ section="Sources"
+ extensions="*.mll"
+ mimetype=""
+ version="2.02"
+ kateversion="2.4"
+ priority="10"
+ author="Glyn Webster (glynwebster@orcon.net.nz) and Vincent Hugot (vincent.hugot@gmail.com)"
+ license="LGPL" >
+
+ <highlighting>
+
+ <list name="keywords">
+ <item> and </item>
+ <item> as </item>
+ <item> eof </item>
+ <item> let </item>
+ <item> parse </item>
+ <item> rule </item>
+ <item> shortest </item>
+ </list>
+
+ <contexts>
+ <context name="Rules" lineEndContext="#stay" attribute="Normal">
+ <Detect2Chars char="(" char1="*" context="Comment" attribute="Comment" beginRegion="comment" />
+ <DetectChar char="{" context="Ocaml" attribute="Normal" beginRegion="code" />
+ <DetectChar char="&quot;" context="String" attribute="String" />
+ <RegExpr String="'(&ESC;|[^'])'" context="#stay" attribute="Character" />
+ <keyword String="keywords" context="#stay" attribute="Keyword" />
+ <RegExpr String="&IDENT;" context="#stay" attribute="Identifier" />
+ <DetectChar char="}" context="#stay" attribute="Mismatched Brackets" />
+ <Detect2Chars char="*" char1=")" context="#stay" attribute="Mismatched Brackets" />
+ </context>
+
+ <context name="Comment" lineEndContext="#stay" attribute="Comment">
+ <Detect2Chars char="*" char1=")" context="#pop" attribute="Comment" endRegion="comment" />
+ <Detect2Chars char="(" char1="*" context="Comment" attribute="Comment" beginRegion="comment" />
+ <DetectChar char="&quot;" context="String" attribute="String" />
+ </context>
+
+ <context name="Ocaml" lineEndContext="#stay" attribute="Normal">
+ <DetectChar char="}" context="#pop" attribute="Normal" endRegion="code" />
+ <IncludeRules context="##Objective Caml" includeAttrib="true" />
+ </context>
+
+ <context name="String" lineEndContext="#stay" attribute="String">
+ <DetectChar char="&quot;" context="#pop" attribute="String" />
+ <RegExpr String="&ESC;" context="#stay" attribute="Escaped Characters" />
+ <RegExpr String="\\$" context="#stay" attribute="Escaped Characters" />
+ </context>
+ </contexts>
+
+ <itemDatas>
+ <itemData name="Normal" defStyleNum="dsOthers" />
+ <itemData name="Identifier" defStyleNum="dsNormal" />
+ <itemData name="Keyword" defStyleNum="dsOthers" bold="true" />
+ <itemData name="Character" defStyleNum="dsChar" />
+ <itemData name="String" defStyleNum="dsString" />
+ <itemData name="Escaped Characters" defStyleNum="dsChar" />
+ <itemData name="Comment" defStyleNum="dsComment" />
+ <itemData name="Mismatched Brackets" defStyleNum="dsError" />
+ </itemDatas>
+ </highlighting>
+
+ <general>
+ <keywords casesensitive="true" />
+ <comments>
+ <comment name="multiLine" start="(*" end="*)" />
+ </comments>
+ </general>
+</language>
+<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->