my blog lives here now
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

190 lines
9.1 KiB

2 years ago
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Kate syntax highlighting for Objective Caml version 4.02 in the standard and revised syntaxes, with Ocamldoc comments. -->
  3. <!DOCTYPE language SYSTEM "language.dtd"
  4. [
  5. <!-- Regular expresion constants: -->
  6. <!ENTITY LOWER "a-z\300-\326\330-\337"> <!-- Lowercase Latin-1 letters. -->
  7. <!ENTITY UPPER "A-Z\340-\366\370-\377"> <!-- Uppercase Latin-1 letters. -->
  8. <!ENTITY LETTER "&LOWER;&UPPER;"> <!-- All Latin-1 letters. -->
  9. <!ENTITY LIDENT "[&LOWER;_][&LETTER;0-9_']*"> <!-- Lowercase OCaml identifiers. -->
  10. <!ENTITY UIDENT "`?[&UPPER;][&LETTER;0-9_']*"> <!-- Uppercase OCaml identifiers. -->
  11. <!ENTITY IDENT "`?[&LETTER;][&LETTER;0-9_']*"> <!-- All OCaml identifiers. -->
  12. <!ENTITY ESC "(\\[ntbr'&quot;\\]|\\[0-9]{3}|\\x[0-9A-Fa-f]{2})"> <!-- OCaml character code escapes. -->
  13. <!ENTITY DEC "[0-9][0-9_]*"> <!-- Decimal digits with underscores. -->
  14. <!ENTITY INFIX "[:!#$%&amp;*+\\/<=>?@^|-~][:!#$%&amp;*+\\/<=>?@^|-~\.]*">
  15. ]>
  16. <language name="amc-prove"
  17. extensions="*.ml;*.mli"
  18. mimetype="text/x-amc-prove"
  19. section="Sources"
  20. version="6"
  21. priority="10"
  22. kateversion="2.4"
  23. author="Abigail Magalhães ([email protected])"
  24. license="LGPL" >
  25. <highlighting>
  26. <list name="Keywords">
  27. <item>forall</item>
  28. <item>fun</item>
  29. <item>function</item>
  30. <item>lazy</item>
  31. <item>match</item>
  32. <item>not</item>
  33. <item>yes</item>
  34. <item>probably</item>
  35. </list>
  36. <list name="Boolean Literals">
  37. <item>tt</item>
  38. <item>ff</item>
  39. </list>
  40. <list name="Pervasive Functions">
  41. </list>
  42. <list name="Pervasive Types">
  43. </list>
  44. <list name="Standard Library Modules">
  45. <item>Amc</item>
  46. </list>
  47. <contexts>
  48. <context name="Code" lineEndContext="#stay" attribute="Normal">
  49. <!-- ] and ]} close code samples in Ocamldoc, so -->
  50. <!-- nested [ ] and { } brackets have to be allowed for: -->
  51. <DetectChar char="[" context="Nested Code 1" attribute="Normal" />
  52. <DetectChar char="{" context="Nested Code 2" attribute="Normal" />
  53. <!-- Comments. -->
  54. <!-- A (** begins a special comment with Ocamldoc documentation markup. -->
  55. <Detect2Chars char="(" char1="*" context="Comment" attribute="Comment" beginRegion="comment" />
  56. <!-- Interpreter directives. -->
  57. <!-- (These are lines where the first symbol is a '#' followed by an identifier. -->
  58. <!-- Such lines could also be part of a method call split over two lines but -->
  59. <!-- it's unlikey anyone would code like that.) -->
  60. <!-- String, character and Camlp4 "quotation" constants. -->
  61. <!-- Note: If you must modify the pattern for characters be precise: -->
  62. <!-- single quotes have several meanings in Ocaml. -->
  63. <DetectChar char="&quot;" context="String" attribute="String" />
  64. <RegExpr String="'(&ESC;|[^'])'" context="#stay" attribute="Character" />
  65. <!-- Identifiers and keywords. -->
  66. <keyword String="Keywords" context="#stay" attribute="Keyword" />
  67. <keyword String="Pervasive Functions" context="#stay" attribute="Pervasive Functions" />
  68. <keyword String="Pervasive Types" context="#stay" attribute="Pervasive Types" />
  69. <keyword String="Standard Library Modules" context="#stay" attribute="Standard Library Modules" />
  70. <keyword String="Boolean Literals" context="#stay" attribute="Boolean Literals" />
  71. <RegExpr String="&LIDENT;" context="#stay" attribute="Lowercase Identifier" />
  72. <RegExpr String="&UIDENT;" context="#stay" attribute="Uppercase Identifier" />
  73. <RegExpr String="'&LIDENT;" context="#stay" attribute="Type Variable" />
  74. <RegExpr String="[\-!#\$%&amp;\*\+/&lt;=&gt;\?&#92;@\^\|~\.:]+"
  75. context="#stay" attribute="Infix Operator" />
  76. <!-- Numeric constants. -->
  77. <!-- Note that they may contain underscores. -->
  78. <RegExpr String="-?0[xX][0-9A-Fa-f_]+" context="#stay" attribute="Hexadecimal" />
  79. <RegExpr String="-?0[oO][0-7_]+" context="#stay" attribute="Octal" />
  80. <RegExpr String="-?0[bB][01_]+" context="#stay" attribute="Binary" />
  81. <RegExpr String="-?&DEC;(\.&DEC;([eE][-+]?&DEC;)?|[eE][-+]?&DEC;)" context="#stay" attribute="Float" />
  82. <RegExpr String="-?&DEC;" context="#stay" attribute="Decimal" />
  83. <IncludeRules context="Unmatched Closing Brackets" />
  84. </context>
  85. <context name="Nested Code 1" lineEndContext="#stay" attribute="Normal">
  86. <DetectChar char="]" context="#pop" attribute="Normal" />
  87. <IncludeRules context="Code" includeAttrib="true" />
  88. </context>
  89. <context name="Nested Code 2" lineEndContext="#stay" attribute="Normal">
  90. <DetectChar char="}" context="#pop" attribute="Normal" />
  91. <IncludeRules context="Code" includeAttrib="true" />
  92. </context>
  93. <context name="String" lineEndContext="#stay" attribute="String">
  94. <DetectChar char="&quot;" context="#pop" attribute="String" />
  95. <RegExpr String="&ESC;" context="#stay" attribute="Escaped Characters" />
  96. <!-- A backslash at the end of a line in a string indicates -->
  97. <!-- that the string will continue on the next line: -->
  98. <RegExpr String="\\$" context="#stay" attribute="Escaped Characters" />
  99. </context>
  100. <context name="Comment" lineEndContext="#stay" attribute="Comment">
  101. <Detect2Chars char="*" char1=")" context="#pop" attribute="Comment" endRegion="comment" />
  102. <!-- Support for nested comments: -->
  103. <Detect2Chars char="(" char1="*" context="Comment" attribute="Comment" beginRegion="comment" />
  104. <!-- Strings in Ocaml comments must be well-formed: -->
  105. <DetectChar char="&quot;" context="String in Comment" attribute="String in Comment" />
  106. </context>
  107. <context name="String in Comment" lineEndContext="#stay" attribute="String in Comment">
  108. <DetectChar char="&quot;" context="#pop" attribute="String in Comment" />
  109. <IncludeRules context="String" />
  110. </context>
  111. <!-- Unmatched closing brackets- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  112. <context name="Unmatched Closing Brackets" lineEndContext="#stay" attribute="Normal">
  113. <Detect2Chars char="*" char1=")" context="#pop" attribute="Mismatched Brackets" />
  114. <Detect2Chars char="v" char1="}" context="#stay" attribute="Mismatched Brackets" />
  115. <Detect2Chars char="]" char1="}" context="#stay" attribute="Mismatched Brackets" />
  116. <Detect2Chars char="%" char1="}" context="#stay" attribute="Mismatched Brackets" />
  117. <DetectChar char="]" context="#stay" attribute="Mismatched Brackets" />
  118. <DetectChar char="}" context="#stay" attribute="Mismatched Brackets" />
  119. </context>
  120. </contexts>
  121. <itemDatas>
  122. <itemData name="Keyword" defStyleNum="dsKeyword" />
  123. <itemData name="Normal" defStyleNum="dsNormal" />
  124. <itemData name="Infix Operator" defStyleNum="dsOperator" />
  125. <itemData name="Uppercase Identifier" defStyleNum="dsDataType" italic="true" />
  126. <itemData name="Lowercase Identifier" defStyleNum="dsVariable" />
  127. <!-- Lowercase pervasive identifiers: -->
  128. <itemData name="Pervasive Functions" defStyleNum="dsFunction" />
  129. <itemData name="Pervasive Types" defStyleNum="dsDataType" />
  130. <!-- Type variables -->
  131. <itemData name="Type Variable" defStyleNum="dsSpecialString" />
  132. <!-- Uppercase pervasive identifiers: -->
  133. <itemData name="Standard Library Modules" defStyleNum="dsDataType" italic="true" />
  134. <itemData name="Boolean Literals" defStyleNum="dsConstant" />
  135. <itemData name="Decimal" defStyleNum="dsDecVal" />
  136. <itemData name="Hexadecimal" defStyleNum="dsBaseN" />
  137. <itemData name="Octal" defStyleNum="dsBaseN" />
  138. <itemData name="Binary" defStyleNum="dsBaseN" />
  139. <itemData name="Float" defStyleNum="dsFloat" />
  140. <itemData name="Character" defStyleNum="dsChar" />
  141. <itemData name="String" defStyleNum="dsString" />
  142. <itemData name="Escaped Characters" defStyleNum="dsChar" />
  143. <itemData name="Comment" defStyleNum="dsComment" />
  144. <itemData name="String in Comment" defStyleNum="dsComment" bold="true" />
  145. <itemData name="Mismatched Brackets" defStyleNum="dsError" />
  146. </itemDatas>
  147. </highlighting>
  148. <general>
  149. <keywords casesensitive="true" />
  150. <comments>
  151. <comment name="multiLine" start="(*" end="*)" region ="comment" />
  152. </comments>
  153. </general>
  154. </language>
  155. <!-- kate: space-indent on; indent-width 2; replace-tabs on; -->