| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!-- Kate syntax highlighting for the Objective Caml 'Ocamlllex' --> |
| 3 |
<!DOCTYPE language |
| 4 |
[ |
| 5 |
<!-- Regular expresion constants: --> |
| 6 |
<!ENTITY LETTER "A-Za-z\300-\326\330-\366\370-\377"> <!-- Latin-1 letters. --> |
| 7 |
<!ENTITY IDENT "`?[&LETTER;_][&LETTER;0-9_']*"> <!-- OCaml identifiers. --> |
| 8 |
<!ENTITY ESC "(\\[ntbr'"\\]|\\[0-9]{3}|\\x[0-9A-Fa-f]{2})"> <!-- OCaml character code escapes. --> |
| 9 |
]> |
| 10 |
<language name="Objective Caml Ocamllex" |
| 11 |
section="Sources" |
| 12 |
extensions="*.mll" |
| 13 |
mimetype="" |
| 14 |
version="7" |
| 15 |
kateversion="5.79" |
| 16 |
priority="10" |
| 17 |
author="Glyn Webster ([email protected]) and Vincent Hugot ([email protected])" |
| 18 |
license="LGPL" > |
| 19 |
|
| 20 |
<highlighting> |
| 21 |
|
| 22 |
<list name="keywords"> |
| 23 |
<item>and</item> |
| 24 |
<item>as</item> |
| 25 |
<item>eof</item> |
| 26 |
<item>let</item> |
| 27 |
<item>parse</item> |
| 28 |
<item>rule</item> |
| 29 |
<item>shortest</item> |
| 30 |
</list> |
| 31 |
|
| 32 |
<contexts> |
| 33 |
<context name="Rules" lineEndContext="#stay" attribute="Normal"> |
| 34 |
<Detect2Chars char="(" char1="*" context="Comment" attribute="Comment" beginRegion="comment" /> |
| 35 |
<DetectChar char="{" context="Ocaml" attribute="Normal" beginRegion="code" /> |
| 36 |
<DetectChar char=""" context="String" attribute="String" /> |
| 37 |
<RegExpr String="'(&ESC;|[^'])'" context="#stay" attribute="Character" /> |
| 38 |
<keyword String="keywords" context="#stay" attribute="Keyword" /> |
| 39 |
<RegExpr String="&IDENT;" context="#stay" attribute="Identifier" /> |
| 40 |
<DetectChar char="}" context="#stay" attribute="Mismatched Brackets" /> |
| 41 |
<Detect2Chars char="*" char1=")" context="#stay" attribute="Mismatched Brackets" /> |
| 42 |
</context> |
| 43 |
|
| 44 |
<context name="Comment" lineEndContext="#stay" attribute="Comment"> |
| 45 |
<Detect2Chars char="*" char1=")" context="#pop" attribute="Comment" endRegion="comment" /> |
| 46 |
<Detect2Chars char="(" char1="*" context="Comment" attribute="Comment" beginRegion="comment" /> |
| 47 |
<DetectChar char=""" context="String" attribute="String" /> |
| 48 |
<DetectSpaces /> |
| 49 |
<IncludeRules context="##Comments" /> |
| 50 |
</context> |
| 51 |
|
| 52 |
<context name="Ocaml" lineEndContext="#stay" attribute="Normal"> |
| 53 |
<DetectChar char="}" context="#pop" attribute="Normal" endRegion="code" /> |
| 54 |
<IncludeRules context="##Objective Caml" includeAttrib="true" /> |
| 55 |
</context> |
| 56 |
|
| 57 |
<context name="String" lineEndContext="#stay" attribute="String"> |
| 58 |
<DetectChar char=""" context="#pop" attribute="String" /> |
| 59 |
<RegExpr String="&ESC;|\\$" context="#stay" attribute="Escaped Characters" /> |
| 60 |
</context> |
| 61 |
</contexts> |
| 62 |
|
| 63 |
<itemDatas> |
| 64 |
<itemData name="Normal" defStyleNum="dsOthers" /> |
| 65 |
<itemData name="Identifier" defStyleNum="dsNormal" /> |
| 66 |
<itemData name="Keyword" defStyleNum="dsOthers" bold="true" /> |
| 67 |
<itemData name="Character" defStyleNum="dsChar" /> |
| 68 |
<itemData name="String" defStyleNum="dsString" /> |
| 69 |
<itemData name="Escaped Characters" defStyleNum="dsChar" /> |
| 70 |
<itemData name="Comment" defStyleNum="dsComment" /> |
| 71 |
<itemData name="Mismatched Brackets" defStyleNum="dsError" /> |
| 72 |
</itemDatas> |
| 73 |
</highlighting> |
| 74 |
|
| 75 |
<general> |
| 76 |
<keywords casesensitive="true" /> |
| 77 |
<comments> |
| 78 |
<comment name="multiLine" start="(*" end="*)" region="comment" /> |
| 79 |
</comments> |
| 80 |
</general> |
| 81 |
</language> |
| 82 |
<!-- kate: space-indent on; indent-width 2; replace-tabs on; --> |