Permalink
Browse files

All works well

  • Loading branch information...
2 parents e4acb33 + 54568e7 commit d258898340026655f3282baaecf2d9421c545b75 @denisshepelin committed Nov 17, 2009
Showing with 442 additions and 0 deletions.
  1. +181 −0 ooc.lang~
  2. +225 −0 ooc.orig.lang
  3. +36 −0 ooc_curr.lang
View
181 ooc.lang~
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<language id="ooc" _name="Ooc" version="2.0" _section="Sources">
+ <metadata>
+ <property name="mimetypes">text/x-ooc</property>
+ <property name="globs">*.ooc;</property>
+ <property name="line-comment-start">//</property>
+ <property name="block-comment-start">/*</property>
+ <property name="block-comment-end">*/</property>
+ </metadata>
+ <styles>
+ <style id="comment" _name="Comment" map-to="def:comment"/>
+ <style id="escaped-character" _name="Escaped Character" map-to="def:special-char"/>
+ <style id="floating-point" _name="Floating Point number" map-to="def:floating-point"/>
+ <style id="decimal" _name="Decimal number" map-to="def:decimal"/>
+ <style id="hexadecimal" name="Hexadecimal number" map-to="def:decimal"/>
+ <style id="octal" name="Octal number" map-to="def:decimal"/>
+ <style id="string" _name="String" map-to="def:string"/>
+ <style id="keyword" _name="Keyword" map-to="def:keyword"/>
+ <style id="fun-keyword" _name="Builtin-function keyword" map-to="def:keyword"/>
+ <style id="type" _name="Data Type" map-to="def:type"/>
+ <style id="label" _name="Labeled argument" map-to="def:type"/>
+ <style id="type-var" _name="Type Variable" map-to="def:type"/>
+ <style id="module" _name="Module Path" map-to="def:type"/>
+ <style id="escaped-character" _name="Escaped Character" map-to="def:special-char"/>
+ <style id="null-value" _name="Null Value" map-to="def:special-constant"/>
+ <style id="boolean" _name="Boolean value" map-to="def:boolean"/>
+ </styles>
+
+ <definitions>
+ <define-regex id="cap-ident">\b[A-Z][A-Za-z0-9_']*</define-regex>
+ <define-regex id="low-ident">\b[a-z][A-Za-z0-9_']*</define-regex>
+ <define-regex id="char-esc">\\((\\|"|'|n|t|b|r)|[0-9]{3}|x[0-9a-fA-F]{2})</define-regex>
+ <define-regex id="preproc-start">^\s*#\s*</define-regex>
+
+ <define-regex id="escaped-character" extended="true">
+ \\( # leading backslash
+ [\\\"\'nrbtfav\?] | # escaped character
+ [0-7]{1,3} | # one, two, or three octal digits
+ x[0-9A-Fa-f]+ # 'x' followed by hex digits
+ )
+ </define-regex>
+
+
+
+ <context id="escape-seq" style-ref="escaped-character">
+ <match>\%{char-esc}</match>
+ </context>
+
+ <context id="line-comment" style-ref="comment" end-at-line-end="true">
+ <start>//</start>
+ <include>
+ <context ref="def:in-line-comment"/>
+ </include>
+ </context>
+
+ <context id="multiline-comment" style-ref="comment">
+ <start>/\*</start>
+ <end>\*/</end>
+ <include>
+ <context ref="def:in-comment"/>
+ </include>
+ </context>
+
+ <context id="modpath" style-ref="module">
+ <match>\%{cap-ident}(\.\%{cap-ident})*(?=\.)</match>
+ </context>
+
+ <context id="string" style-ref="string">
+ <start>"</start>
+ <end>"</end>
+ <include>
+ <context ref="escape-seq"/>
+ </include>
+ </context>
+
+ <context id="character-constant" style-ref="string">
+ <match>('\%{char-esc}')|('[^\\']')</match>
+ </context>
+
+ <context id="type-var" style-ref="type-var">
+ <match>'\%{low-ident}</match>
+ </context>
+
+ <context id="null-value" style-ref="null-value">
+ <keyword>null</keyword>
+ </context>
+
+ <context id="boolean" style-ref="boolean">
+ <keyword>false</keyword>
+ <keyword>true</keyword>
+ </context>
+
+ <context id="hexadecimal" style-ref="hexadecimal">
+ <match extended="true">
+ (\b([0-9]+|0[xX][0-9a-fA-F]+)[Ll]?\b|
+ \b(([0-9]+[Ee][-]?[0-9]+|
+ ([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFdD]?|
+ [0-9]+[FfDd]))
+ </match>
+</context>
+
+<context id="octal" style-ref="octal">
+ <match extended="true">
+ (?&lt;![\w\.])
+ 0[0-7]+[uUlL]*
+ (?![\w\.])
+ </match>
+</context>
+
+<context id="decimal" style-ref="decimal">
+ <match extended="true">
+ (?![\w\.])
+ [0-9]+[uUlL]*
+ (?![\w\.])
+ </match>
+</context>
+
+ <context id="keywords" style-ref="keyword">
+ <keyword>class</keyword>
+ <keyword>cover</keyword>
+ <keyword>interface</keyword>
+ <keyword>implement</keyword>
+ <keyword>func</keyword>
+ <keyword>abstract</keyword>
+ <keyword>extends</keyword>
+ <keyword>from</keyword>
+ <keyword>this</keyword>
+ <keyword>super</keyword>
+ <keyword>new</keyword>
+ <keyword>const</keyword>
+ <keyword>final</keyword>
+ <keyword>static</keyword>
+ <keyword>include</keyword>
+ <keyword>import</keyword>
+ <keyword>use</keyword>
+ <keyword>extern</keyword>
+ <keyword>inline</keyword>
+ <keyword>proto</keyword>
+ <keyword>break</keyword>
+ <keyword>continue</keyword>
+ <keyword>fallthrough</keyword>
+ <keyword>operator</keyword>
+ <keyword>if</keyword>
+ <keyword>else</keyword>
+ <keyword>for</keyword>
+ <keyword>while</keyword>
+ <keyword>do</keyword>
+ <keyword>switch</keyword>
+ <keyword>case</keyword>
+ <keyword>as</keyword>
+ <keyword>in</keyword>
+ <keyword>version</keyword>
+ <keyword>return</keyword>
+ <keyword>true</keyword>
+ <keyword>false</keyword>
+ <keyword>null</keyword>
+ <keyword>default</keyword>
+ </context>
+
+ <!-- main context -->
+ <context id="ooc">
+ <include>
+ <context ref="keywords"/>
+ <context ref="boolean-constant"/>
+
+ <context ref="character-constant"/>
+ <context ref="string"/>
+
+ <context ref="modpath"/>
+
+ <context ref="line-comment"/>
+ <context ref="multiline-comment"/>
+ <context ref="type-var"/>
+
+
+ </include>
+ </context>
+ <!-- main context -->
+ </definitions>
+</language>
Oops, something went wrong.

0 comments on commit d258898

Please sign in to comment.