Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OCaml Codeless Language Module for TextWrangler and BBEdit syntax highlighting
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BBEditDocumentType</key>
<string>CodelessLanguageModule</string>
<key>BBLMLanguageCode</key>
<string>OCml</string>
<key>BBLMLanguageDisplayName</key>
<string>OCaml</string>
<key>BBLMScansFunctions</key>
<true/>
<key>BBLMSuffixMap</key>
<array>
<dict>
<key>BBLMIsSourceKind</key>
<true/>
<key>BBLMLanguageSuffix</key>
<string>.ml</string>
</dict>
<dict>
<key>BBLMIsSourceKind</key>
<true/>
<key>BBLMLanguageSuffix</key>
<string>.ocaml</string>
</dict>
</array>
<key>BBLMColorsSyntax</key>
<true/>
<key>BBLMIsCaseSensitive</key>
<true/>
<key>BBLMKeywordList</key>
<array>
<!-- Identifiers -->
<string>and</string>
<string>as</string>
<string>assert</string>
<string>asr</string>
<string>begin</string>
<string>class</string>
<string>constraint</string>
<string>do</string>
<string>done</string>
<string>downto</string>
<string>else</string>
<string>end</string>
<string>exception</string>
<string>external</string>
<string>false</string>
<string>for</string>
<string>fun</string>
<string>function</string>
<string>functor</string>
<string>if</string>
<string>in</string>
<string>include</string>
<string>inherit</string>
<string>initializer</string>
<string>land</string>
<string>lazy</string>
<string>let</string>
<string>lor</string>
<string>lsl</string>
<string>lsr</string>
<string>lxor</string>
<string>match</string>
<string>method</string>
<string>mod</string>
<string>module</string>
<string>mutable</string>
<string>new</string>
<string>object</string>
<string>of</string>
<string>open</string>
<string>or</string>
<string>private</string>
<string>rec</string>
<string>sig</string>
<string>struct</string>
<string>then</string>
<string>to</string>
<string>true</string>
<string>try</string>
<string>type</string>
<string>val</string>
<string>virtual</string>
<string>when</string>
<string>while</string>
<string>with</string>
<!-- Character sequences -->
<string>!=</string>
<string>#</string>
<string>&amp;</string>
<string>&amp;&amp;</string>
<string>'</string>
<string>(</string>
<string>)</string>
<string>*</string>
<string>+</string>
<string>,</string>
<string>-</string>
<string>-.</string>
<string>-></string>
<string>.</string>
<string>..</string>
<string>:</string>
<string>::</string>
<string>:=</string>
<string>:></string>
<string>;</string>
<string>;;</string>
<string>&lt;</string>
<string>&lt;-</string>
<string>=</string>
<string>></string>
<string>>]</string>
<string>>}</string>
<string>?</string>
<string>??</string>
<string>[</string>
<string>[&lt;</string>
<string>[></string>
<string>[|</string>
<string>]</string>
<string>_</string>
<string>`</string>
<string>{</string>
<string>{&lt;</string>
<string>|</string>
<string>|]</string>
<string>}</string>
<string>~</string>
<!-- Camlp4 extensions -->
<string>parser</string>
<string>&lt;&lt;</string>
<string>&lt;:</string>
<string>>></string>
<string>$</string>
<string>$$</string>
<string>$:</string>
</array>
<key>Language Features</key>
<dict>
<key>Identifier and Keyword Characters</key>
<string>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_01234567890'</string><!-- !$%*+./:=>?@^∣~&lt;&amp;- -->
<!--key>Identifier and Keyword Character Class</key>
<string>A-Za-z0-9_'!$%&*+./:<=>?@^∣~-</string-->
<!--key>Open Line Comments</key>
<string/-->
<key>Open Block Comments</key>
<string>(*</string>
<key>Close Block Comments</key>
<string>*)</string>
<key>Open Statement Blocks</key>
<string>let</string>
<key>Close Statement Blocks</key>
<string>;;</string>
<key>Comment Pattern</key>
<string>\(\*[\S\s\r\n]*?\*\)</string>
<key>String Pattern</key>
<string>("[\S\s\r\n]*?"|'(?:.|\\[\\"'ntbr]+|\\[0-9]{1,3}|\\x[0-9A-Fa-f]{1,2})')</string>
<key>Open Strings 1</key>
<string>"</string>
<key>Close Strings 1</key>
<string>"</string>
<key>End-of-line Ends Strings 1</key>
<false />
<key>Open Strings 2</key>
<string>'</string>
<key>Close Strings 2</key>
<string>'</string>
<key>End-of-line Ends Strings 2</key>
<false />
<key>Function Pattern</key>
<string>let[\s\r\n]+(?:rec[\s\r\n]+)?(?P&lt;function_name>[A-Za-z0-9_']+)(?:[\s\r\n]+[\S\s\r\n]*?)?[\s\r\n]*=[\s\r\n]*(?P&lt;function>[\S\s\r\n]+?);;</string>
<key>Prefix for Functions</key>
<string>fun</string>
<key>Open Parameter Lists</key>
<string></string>
<key>Close Parameter Lists</key>
<string></string>
<key>Escape Char in Strings 1</key>
<string>\</string>
<key>Escape Char in Strings 2</key>
<string>\</string>
</dict>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.