Created
June 28, 2011 01:15
-
-
Save travishaynes/1050271 to your computer and use it in GitHub Desktop.
Yahoo! RTML syntax highlighting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Author: Travis Haynes <[email protected]> | |
Syntax highlighting for Yahoo! RTML | |
--> | |
<language id="rtml" _name="RTML" version="2.0" _section="Markup"> | |
<metadata> | |
<property name="mimetypes">x-rtml</property> | |
<property name="globs">*.rtml</property> | |
<property name="block-comment-start"><!--</property> | |
<property name="block-comment-end">--></property> | |
</metadata> | |
<styles> | |
<style id="base-n-integer" _name="Base-N integer" map-to="def:base-n-integer"/> | |
<style id="boolean" _name="Boolean value" map-to="def:boolean"/> | |
<style id="comment" _name="Comment" map-to="xml:comment"/> | |
<style id="constant" _name="Constant" map-to="def:type"/> | |
<style id="decimal" _name="Decimal number" map-to="def:decimal"/> | |
<style id="escape" _name="Escaped Character" map-to="def:special-char"/> | |
<style id="floating-point" _name="Floating point number" map-to="def:floating-point"/> | |
<style id="keyword" _name="Keyword" map-to="def:keyword"/> | |
<style id="nil-value" _name="Nil Constant" map-to="def:special-constant"/> | |
<style id="numeric-literal" _name="Numeric literal" map-to="def:base-n-integer"/> | |
<style id="string" _name="String" map-to="def:string"/> | |
<style id="special-variable" _name="Special Variable" map-to="def:special-constant"/> | |
<style id="symbol" _name="Symbol" map-to="def:string"/> | |
<style id="variable" _name="Variable" map-to="def:identifier"/> | |
<style id="type" _name="Data Type" map-to="def:type"/> | |
</styles> | |
<definitions> | |
<context id="rtml"> | |
<include> | |
<context id="html-comment" style-ref="comment" class="comment"> | |
<start><!--</start> | |
<end>--\s*></end> | |
<include> | |
<context ref="def:in-comment"/> | |
</include> | |
</context> | |
<context id="escape" style-ref="escape"> | |
<match>\\((0-7){3}|(x[a-fA-F0-9]{2})|(c\S)|([CM]-\S)|(M-C-\S)|.)</match> | |
</context> | |
<context id="nil-value" style-ref="nil-value"> | |
<keyword>nil</keyword> | |
</context> | |
<context id="boolean" style-ref="boolean"> | |
<keyword>t</keyword> | |
<keyword>yes</keyword> | |
</context> | |
<define-regex id="underscore_num">\d(_?\d)*</define-regex> | |
<define-regex id="float" extended="true"> | |
( (\%{underscore_num})?\.\%{underscore_num} | \%{underscore_num}\. ) | | |
( (\%{underscore_num}|(\%{underscore_num})?\.\%{underscore_num}|\%{underscore_num}\.)[eE][+-]?\%{underscore_num} ) | |
</define-regex> | |
<context id="float" style-ref="floating-point"> | |
<match>(?<![\w\.])\%{float}(?![\w\.])</match> | |
</context> | |
<context id="decimal" style-ref="decimal"> | |
<match>(?<![\w\.])([1-9](_?[0-9])*|0)(?![\w\.])</match> | |
</context> | |
<context id="numeric-literal" style-ref="numeric-literal"> | |
<match>(?<![\w\.])\?((\\[MC]-){1,2}|\\?)\S</match> | |
</context> | |
<context id="constant" style-ref="constant"> | |
<prefix>:</prefix> | |
<keyword>big</keyword> | |
<keyword>bottom</keyword> | |
<keyword>center</keyword> | |
<keyword>contents</keyword> | |
<keyword>download</keyword> | |
<keyword>email</keyword> | |
<keyword>empty</keyword> | |
<keyword>empty.</keyword> | |
<keyword>fixed</keyword> | |
<keyword>help</keyword> | |
<keyword>home</keyword> | |
<keyword>horizontal</keyword> | |
<keyword>icon</keyword> | |
<keyword>image</keyword> | |
<keyword>incised</keyword> | |
<keyword>index</keyword> | |
<keyword>info.</keyword> | |
<keyword>info</keyword> | |
<keyword>item.</keyword> | |
<keyword>left</keyword> | |
<keyword>link.</keyword> | |
<keyword>main.</keyword> | |
<keyword>mall</keyword> | |
<keyword>multi-line</keyword> | |
<keyword>next</keyword> | |
<keyword>no</keyword> | |
<keyword>norder.</keyword> | |
<keyword>normal</keyword> | |
<keyword>privacypolicy.</keyword> | |
<keyword>privacypolicy</keyword> | |
<keyword>quiet</keyword> | |
<keyword>raw-html.</keyword> | |
<keyword>register</keyword> | |
<keyword>request</keyword> | |
<keyword>right</keyword> | |
<keyword>section.</keyword> | |
<keyword>show-order</keyword> | |
<keyword>solid</keyword> | |
<keyword>search.</keyword> | |
<keyword>search</keyword> | |
<keyword>side-buttons</keyword> | |
<keyword>solid</keyword> | |
<keyword>text</keyword> | |
<keyword>top</keyword> | |
<keyword>top-buttons</keyword> | |
<keyword>two-line</keyword> | |
<keyword>up</keyword> | |
<keyword>variable</keyword> | |
<keyword>vertical</keyword> | |
</context> | |
<context id="special-variable" style-ref="special-variable"> | |
<match>id$</match> | |
</context> | |
<context id="special-types" style-ref="type"> | |
<keyword>type</keyword> | |
<keyword>value1</keyword> | |
<keyword>value2</keyword> | |
<keyword>test</keyword> | |
<keyword>then</keyword> | |
<keyword>else</keyword> | |
<keyword>variable</keyword> | |
<keyword>value</keyword> | |
<keyword>initial</keyword> | |
<keyword>update</keyword> | |
<keyword>sequence</keyword> | |
<keyword>last</keyword> | |
<keyword>result_var</keyword> | |
<keyword>iter_var</keyword> | |
<keyword>result_init</keyword> | |
<keyword>position</keyword> | |
<keyword>var</keyword> | |
<keyword>image</keyword> | |
<keyword>number</keyword> | |
<keyword>currency</keyword> | |
</context> | |
<context id="function" style-ref="keyword"> | |
<match>[a-zA-Z0-9._-]* \(.*\)</match> | |
</context> | |
<context id="symbols" style-ref="symbol"> | |
<match>(?<!:):[a-zA-Z0-9_\-]+</match> | |
</context> | |
<context id="local-variables" style-ref="variable"> | |
<match>@[a-zA-Z_][a-zA-Z0-9_\-]*</match> | |
</context> | |
<context id="double-quoted-string" style-ref="string"> | |
<start>"</start> | |
<end>"</end> | |
</context> | |
<context id="keywords" style-ref="keyword"> | |
<keyword>ACCUMULATE</keyword> | |
<keyword>ACTION</keyword> | |
<keyword>AND</keyword> | |
<keyword>APPEND</keyword> | |
<keyword>AS-LIST</keyword> | |
<keyword>AS-NUMBER</keyword> | |
<keyword>AS-STRING</keyword> | |
<keyword>AUCTIONURL</keyword> | |
<keyword>BASKET</keyword> | |
<keyword>BASKET-MODULE</keyword> | |
<keyword>BLUE</keyword> | |
<keyword>BODY</keyword> | |
<keyword>CALL</keyword> | |
<keyword>CAPS</keyword> | |
<keyword>CENTER</keyword> | |
<keyword>CMP</keyword> | |
<keyword>COLOGO</keyword> | |
<keyword>COLOR</keyword> | |
<keyword>COMMENT</keyword> | |
<keyword>CSS-WITH-LINK</keyword> | |
<keyword>DIV</keyword> | |
<keyword>ELEMENT</keyword> | |
<keyword>ELEMENTS</keyword> | |
<keyword>EQUALS</keyword> | |
<keyword>EVEN</keyword> | |
<keyword>FC-BAR</keyword> | |
<keyword>FC-LOADER</keyword> | |
<keyword>FIND-ALL</keyword> | |
<keyword>FIND-ONE</keyword> | |
<keyword>FONT</keyword> | |
<keyword>FONT-WIDTH</keyword> | |
<keyword>FOR-EACH-OBJECT</keyword> | |
<keyword>FOR-EACH-BUT</keyword> | |
<keyword>FOR-EACH</keyword> | |
<keyword>FOR</keyword> | |
<keyword>FORM</keyword> | |
<keyword>FROM-HEX</keyword> | |
<keyword>FUSE</keyword> | |
<keyword>GET-ALL-PATHS-TO</keyword> | |
<keyword>GET-PATH-TO</keyword> | |
<keyword>GRAB</keyword> | |
<keyword>GRAYSCALE</keyword> | |
<keyword>GREEN</keyword> | |
<keyword>HEAD</keyword> | |
<keyword>HEIGHT</keyword> | |
<keyword>HEX-ENCODE</keyword> | |
<keyword>HRULE</keyword> | |
<keyword>IF</keyword> | |
<keyword>IMAGE-REF</keyword> | |
<keyword>IMAGE</keyword> | |
<keyword>IMG</keyword> | |
<keyword>INDEXED-SORT</keyword> | |
<keyword>INPUT</keyword> | |
<keyword>INVENTORY-INFO</keyword> | |
<keyword>ITEM</keyword> | |
<keyword>ITEM-INVENTORY</keyword> | |
<keyword>LABEL</keyword> | |
<keyword>LENGTH</keyword> | |
<keyword>LINEBREAK</keyword> | |
<keyword>LINES</keyword> | |
<keyword>LINK</keyword> | |
<keyword>LOG</keyword> | |
<keyword>LOWERCASE</keyword> | |
<keyword>MAKE-LIST</keyword> | |
<keyword>MAXIMUM</keyword> | |
<keyword>MAXNUM</keyword> | |
<keyword>META</keyword> | |
<keyword>MINIMUM</keyword> | |
<keyword>MINNUM</keyword> | |
<keyword>MODULE</keyword> | |
<keyword>MULTI</keyword> | |
<keyword>NAMED-PROP</keyword> | |
<keyword>NOBREAK</keyword> | |
<keyword>NONEMPTY</keyword> | |
<keyword>NOSCRIPT</keyword> | |
<keyword>NOT</keyword> | |
<keyword>NUMBER</keyword> | |
<keyword>OBJID-FROM-STRING</keyword> | |
<keyword>ONCE</keyword> | |
<keyword>OR</keyword> | |
<keyword>ORDER</keyword> | |
<keyword>ORDER-FORM</keyword> | |
<keyword>PARAGRAPH</keyword> | |
<keyword>PARAGRAPHS</keyword> | |
<keyword>PAT-GREP</keyword> | |
<keyword>PAT-MATCH</keyword> | |
<keyword>PAT-SUBST</keyword> | |
<keyword>POSITION</keyword> | |
<keyword>PRICE</keyword> | |
<keyword>RED</keyword> | |
<keyword>RENDER</keyword> | |
<keyword>RETURN-WITH</keyword> | |
<keyword>REVERSE</keyword> | |
<keyword>SCRIPT</keyword> | |
<keyword>SEARCH-FORM</keyword> | |
<keyword>SEGMENTS</keyword> | |
<keyword>SELECT</keyword> | |
<keyword>SHIM</keyword> | |
<keyword>SHOPPING-BANNER</keyword> | |
<keyword>SOCIAL-SHARE</keyword> | |
<keyword>SORT</keyword> | |
<keyword>SPAN</keyword> | |
<keyword>STRCASECMP</keyword> | |
<keyword>STRCMP</keyword> | |
<keyword>STRING-APPEND</keyword> | |
<keyword>STRING-TRIM</keyword> | |
<keyword>STYLE</keyword> | |
<keyword>SUPER-BAR</keyword> | |
<keyword>SUPER-LOADER</keyword> | |
<keyword>SWITCH</keyword> | |
<keyword>TABLE</keyword> | |
<keyword>TABLE-CELL</keyword> | |
<keyword>TABLE-ROW</keyword> | |
<keyword>TAG</keyword> | |
<keyword>TAG-WHEN</keyword> | |
<keyword>TEXT-STYLE</keyword> | |
<keyword>TEXT</keyword> | |
<keyword>TEXTAREA</keyword> | |
<keyword>TITLE</keyword> | |
<keyword>TO-HEX</keyword> | |
<keyword>TO</keyword> | |
<keyword>TOKENS</keyword> | |
<keyword>VALUE</keyword> | |
<keyword>WHEN</keyword> | |
<keyword>WHOLE-CONTENTS</keyword> | |
<keyword>WIDTH</keyword> | |
<keyword>WITH-LINK</keyword> | |
<keyword>WITH-OBJECT</keyword> | |
<keyword>WITH</keyword> | |
<keyword>WORDBREAK</keyword> | |
<keyword>YANK</keyword> | |
<keyword>YFUNCTION</keyword> | |
</context> | |
<context id="variables" style-ref="variable"> | |
<match>\b[a-zA-Z_][a-zA-Z0-9_\-]*\b</match> | |
</context> | |
</include> | |
</context> | |
</definitions> | |
</language> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment