New installers: 2020-07-15

This commit is contained in:
Tom Schoonjans
2020-07-15 09:14:15 +01:00
parent d5e9dc5286
commit d401405d87
763 changed files with 112903 additions and 19 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Philip Withnall <philip@tecnocode.co.uk>
Copyright (C) 2016 Philip Withnall <philip@tecnocode.co.uk>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<!--
References:
https://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_form
https://tools.ietf.org/html/rfc5234
https://tools.ietf.org/html/rfc7405
-->
<language id="abnf" name="ABNF" version="2.0" _section="Source">
<metadata>
<property name="globs">*.abnf</property>
<property name="line-comment-start">;</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="rulename" name="Rule Name" map-to="def:type"/>
<style id="binary" name="Binary number" map-to="def:base-n-integer"/>
<style id="decimal" name="Decimal number" map-to="def:decimal"/>
<style id="hexadecimal" name="Hexadecimal number" map-to="def:base-n-integer"/>
<style id="string" name="String" map-to="def:string"/>
</styles>
<definitions>
<define-regex id="rulename">([a-zA-Z][a-zA-Z0-9-]*|&lt;[a-zA-Z][a-zA-Z0-9-]*&gt;)</define-regex>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>;</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="rulename">
<match>(\%{rulename})</match>
<include>
<context sub-pattern="1" style-ref="rulename"/>
</include>
</context>
<context id="terminal-binary" style-ref="binary">
<match>%b[0-1]+(\-[0-1]+|(\.[0-1]+)*)</match>
</context>
<context id="terminal-decimal" style-ref="decimal">
<match>%d[0-9]+(\-[0-9]+|(\.[0-9]+)*)</match>
</context>
<context id="terminal-hexadecimal" style-ref="hexadecimal">
<match>%x[0-9a-fA-F]+(\-[0-9a-fA-F]+|(\.[0-9a-fA-F]+)*)</match>
</context>
<context id="terminal-string" style-ref="string">
<match>"[ !#$%&amp;'\(\)\*\+,\-\./0-9:;&lt;=&gt;\?@A-Z\[\\\]\^_`a-z\{\|\}~]*"</match>
</context>
<context id="terminal">
<include>
<context ref="terminal-binary"/>
<context ref="terminal-decimal"/>
<context ref="terminal-hexadecimal"/>
<context ref="terminal-string"/>
</include>
</context>
<context id="element">
<include>
<context ref="rulename"/>
<context ref="terminal"/>
</include>
</context>
<context id="abnf">
<include>
<context ref="line-comment"/>
<context id="rule">
<start>^\s*(\%{rulename})\s*=/?</start>
<end>^(?!\s)</end>
<include>
<context sub-pattern="1" where="start" style-ref="rulename"/>
<context ref="element"/>
<context ref="line-comment"/>
</include>
</context>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,267 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Julien Castelain, Markus Johnsson
Copyright (C) 2008 Julien Castelain <jcastelain@gmail.com>
Copyright (C) 2008 Markus Johnsson <markus.johnsson.84@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="actionscript" name="ActionScript" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-actionscript</property>
<property name="globs">*.as</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="error" name="Error" map-to="def:error"/>
<style id="string" name="String" map-to="def:string"/>
<style id="external" name="External" map-to="def:preprocessor"/>
<style id="declaration" name="Declaration" map-to="def:type"/>
<style id="storage-class" name="Storage Class" map-to="def:type"/>
<style id="scope-declaration" name="Scope Declaration" map-to="def:type"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="null-value" name="Null Value" map-to="def:special-constant"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="number" name="Number" map-to="def:decimal"/>
<style id="reserved" name="Future Reserved Keywords" map-to="def:error"/>
<style id="type" name="Data Type" map-to="def:type"/>
</styles>
<definitions>
<context id="string" style-ref="string" end-at-line-end="true">
<start>"</start>
<end>"</end>
</context>
<context id="string-2" style-ref="string" end-at-line-end="true">
<start>'</start>
<end>'</end>
</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="block-comment" style-ref="comment">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<context id="externals" style-ref="external">
<keyword>import</keyword>
<keyword>include</keyword>
<keyword>package</keyword>
</context>
<context id="declarations" style-ref="declaration">
<keyword>class</keyword>
<keyword>extends</keyword>
<keyword>function</keyword>
<keyword>implements</keyword>
<keyword>instanceof</keyword>
<keyword>interface</keyword>
<keyword>is</keyword>
<keyword>namespace</keyword>
<keyword>throws</keyword>
<keyword>var</keyword>
<keyword>const</keyword>
</context>
<context id="primitive-types" style-ref="type">
<keyword>arguments</keyword>
<keyword>Array</keyword>
<keyword>Boolean</keyword>
<keyword>Class</keyword>
<keyword>Bitmap</keyword>
<keyword>BitmapData</keyword>
<keyword>BitmapDataChannel</keyword>
<keyword>ByteArray</keyword>
<keyword>Camera</keyword>
<keyword>Capabilities</keyword>
<keyword>CapsStyle</keyword>
<keyword>ColorTransform</keyword>
<keyword>ContextMenu</keyword>
<keyword>Dictionary</keyword>
<keyword>DisplayObject</keyword>
<keyword>DisplayObjectContainer</keyword>
<keyword>Endian</keyword>
<keyword>Error</keyword>
<keyword>Event</keyword>
<keyword>EventDispatcher</keyword>
<keyword>ExternalInterface</keyword>
<keyword>FileFilter</keyword>
<keyword>FileReference</keyword>
<keyword>FileReferenceList</keyword>
<keyword>Function</keyword>
<keyword>Graphics</keyword>
<keyword>int</keyword>
<keyword>IBitmapDrawable</keyword>
<keyword>IEventDispatcher</keyword>
<keyword>IOError</keyword>
<keyword>Keyboard</keyword>
<keyword>KeyboardEvent</keyword>
<keyword>KeyLocation</keyword>
<keyword>Loader</keyword>
<keyword>LocalConnection</keyword>
<keyword>Math</keyword>
<keyword>Matrix</keyword>
<keyword>Microphone</keyword>
<keyword>Mouse</keyword>
<keyword>MovieClip</keyword>
<keyword>Namespace</keyword>
<keyword>NetConnection</keyword>
<keyword>NetStream</keyword>
<keyword>Number</keyword>
<keyword>Object</keyword>
<keyword>Point</keyword>
<keyword>PrintJob</keyword>
<keyword>Proxy</keyword>
<keyword>QName</keyword>
<keyword>Rectangle</keyword>
<keyword>RegExp</keyword>
<keyword>Responder</keyword>
<keyword>Scene</keyword>
<keyword>Security</keyword>
<keyword>Shape</keyword>
<keyword>SharedObject</keyword>
<keyword>Socket</keyword>
<keyword>Sound</keyword>
<keyword>SoundChannel</keyword>
<keyword>SoundTransform</keyword>
<keyword>Sprite</keyword>
<keyword>Stage</keyword>
<keyword>String</keyword>
<keyword>StyleSheet</keyword>
<keyword>SWFVersion</keyword>
<keyword>System</keyword>
<keyword>TextField</keyword>
<keyword>TextFormat</keyword>
<keyword>Timer</keyword>
<keyword>uint</keyword>
<keyword>Video</keyword>
<keyword>XML</keyword>
<keyword>XMLDocument</keyword>
<keyword>XMLList</keyword>
<keyword>XMLNode</keyword>
<keyword>XMLNodeType</keyword>
<keyword>XMLSocket</keyword>
</context>
<context id="storage-class" style-ref="storage-class">
<keyword>dynamic</keyword>
<keyword>internal</keyword>
<keyword>final</keyword>
<keyword>static</keyword>
</context>
<context id="scope-declarations" style-ref="scope-declaration">
<keyword>flash_proxy</keyword>
<keyword>internal</keyword>
<keyword>override</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>set</keyword>
<keyword>get</keyword>
</context>
<context id="flow" style-ref="keyword">
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>is</keyword>
<keyword>return</keyword>
<keyword>throw</keyword>
<keyword>switch</keyword>
<keyword>try</keyword>
<keyword>while</keyword>
</context>
<context id="memory" style-ref="keyword">
<keyword>new</keyword>
<keyword>super</keyword>
<keyword>this</keyword>
<keyword>void</keyword>
</context>
<context id="future-reserved-words" style-ref="reserved">
<keyword>goto</keyword>
</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="numeric" style-ref="number">
<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="actionscript">
<include>
<context ref="string"/>
<context ref="string-2"/>
<context ref="line-comment"/>
<context ref="block-comment"/>
<context ref="close-comment-outside-comment"/>
<context ref="externals"/>
<context ref="declarations"/>
<context ref="primitive-types"/>
<context ref="storage-class"/>
<context ref="scope-declarations"/>
<context ref="flow"/>
<context ref="memory"/>
<context ref="future-reserved-words"/>
<context ref="null-value"/>
<context ref="boolean"/>
<context ref="numeric"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,220 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Gustavo Giráldez <gustavo.giraldez@gmx.net>
Copyright (C) 2003 Gustavo Giráldez <gustavo.giraldez@gmx.net>
Copyright (C) 2003 Michael Terry <mike@mterry.name>
Copyright (C) 2004 Benoît Dejean <tazforever@dlfp.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="ada" name="Ada" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-ada;text/x-adasrc</property>
<property name="globs">*.adb;*.ads</property>
<property name="line-comment-start">--</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="string" name="String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="decimal" name="Decimal number" map-to="def:decimal"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="storage-class" name="Storage Class" map-to="def:type"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="base-n-number" name="Arbitrary base number" map-to="def:base-n-integer"/>
<style id="real" name="Real number" map-to="def:floating-point"/>
<style id="escaped-character" name="Escaped Character" map-to="def:special-char"/>
</styles>
<default-regex-options case-sensitive="false"/>
<definitions>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>--</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<!-- no escapes possible except for "" = literal " -->
<include>
<context id="string-esc" style-ref="escaped-character" extend-parent="true">
<match>""</match>
</context>
</include>
</context>
<context id="character-constant" style-ref="string">
<match>'.'</match>
</context>
<context id="preprocessor-keyword" style-ref="preprocessor">
<keyword>package</keyword>
<keyword>pragma</keyword>
<keyword>use</keyword>
<keyword>with</keyword>
</context>
<context id="function" style-ref="keyword">
<keyword>function</keyword>
<keyword>procedure</keyword>
<keyword>return</keyword>
</context>
<context id="keyword" style-ref="keyword">
<keyword>abort</keyword>
<keyword>abs</keyword>
<keyword>accept</keyword>
<keyword>all</keyword>
<keyword>and</keyword>
<keyword>begin</keyword>
<keyword>body</keyword>
<keyword>case</keyword>
<keyword>declare</keyword>
<keyword>delay</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>elsif</keyword>
<keyword>end</keyword>
<keyword>entry</keyword>
<keyword>exception</keyword>
<keyword>exit</keyword>
<keyword>for</keyword>
<keyword>generic</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>is</keyword>
<keyword>loop</keyword>
<keyword>mod</keyword>
<keyword>new</keyword>
<keyword>not</keyword>
<keyword>null</keyword>
<keyword>or</keyword>
<keyword>others</keyword>
<keyword>out</keyword>
<keyword>protected</keyword>
<keyword>raise</keyword>
<keyword>record</keyword>
<keyword>rem</keyword>
<keyword>renames</keyword>
<keyword>requeue</keyword>
<keyword>reverse</keyword>
<keyword>select</keyword>
<keyword>separate</keyword>
<keyword>subtype</keyword>
<keyword>task</keyword>
<keyword>terminate</keyword>
<keyword>then</keyword>
<keyword>type</keyword>
<keyword>until</keyword>
<keyword>when</keyword>
<keyword>while</keyword>
<keyword>xor</keyword>
</context>
<context id="storage-class" style-ref="storage-class">
<keyword>abstract</keyword>
<keyword>access</keyword>
<keyword>aliased</keyword>
<keyword>array</keyword>
<keyword>at</keyword>
<keyword>constant</keyword>
<keyword>delta</keyword>
<keyword>digits</keyword>
<keyword>interface</keyword>
<keyword>limited</keyword>
<keyword>of</keyword>
<keyword>private</keyword>
<keyword>range</keyword>
<keyword>tagged</keyword>
<keyword>synchronized</keyword>
</context>
<context id="type" style-ref="type">
<keyword>boolean</keyword>
<keyword>character</keyword>
<keyword>count</keyword>
<keyword>duration</keyword>
<keyword>float</keyword>
<keyword>integer</keyword>
<keyword>long_float</keyword>
<keyword>long_integer</keyword>
<keyword>priority</keyword>
<keyword>short_float</keyword>
<keyword>short_integer</keyword>
<keyword>string</keyword>
</context>
<define-regex id="hexnum">[0-9a-f][0-9a-f_]*</define-regex>
<define-regex id="exponent">[Ee][+-]?[0-9][0-9_]*</define-regex>
<context id="based-numeral" style-ref="base-n-number">
<match extended="true">
(?&lt;![\w\.])
[0-9][0-9_]*\#\%{hexnum}(\.\%{hexnum})?\#\%{exponent}?
(?![\w\.])
</match>
</context>
<context id="real" style-ref="real">
<match extended="true">
(?&lt;![\w\.])
[0-9][0-9_]*\.[0-9][0-9_]*\%{exponent}?
(?![\w\.])
</match>
</context>
<context id="number" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
[0-9][0-9_]*(E[+]?[0-9][0-9_]*)?
(?![\w\.])
</match>
</context>
<context id="boolean" style-ref="boolean">
<keyword>true</keyword>
<keyword>false</keyword>
</context>
<context id="ada" class="no-spell-check">
<include>
<context ref="line-comment"/>
<context ref="string"/>
<context ref="character-constant"/>
<context ref="preprocessor-keyword"/>
<context ref="function"/>
<context ref="keyword"/>
<context ref="storage-class"/>
<context ref="type"/>
<context ref="based-numeral"/>
<context ref="real"/>
<context ref="number"/>
<context ref="boolean"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,728 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Mark Corbin <mark@dibsco.co.uk>
Copyright (C) 2014 Mark Corbin
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="ansforth94" name="ANS-Forth94" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-forth</property>
<property name="globs">*.4th;*.forth</property>
<property name="line-comment-start">\\</property>
<property name="block-comment-start">\(</property>
<property name="block-comment-end">\)</property>
</metadata>
<styles>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="obs-keyword" name="Obsolete Keyword" map-to="def:keyword"/>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="alert" name="Alert" map-to="def:note"/>
<style id="character" name="Character" map-to="def:character"/>
<style id="word" name="Word" map-to="def:function"/>
<style id="string" name="String" map-to="def:string"/>
<style id="constant" name="Constant" map-to="def:constant"/>
<style id="variable" name="Variable" map-to="def:type"/>
<style id="local-variable" name="Local Variable" map-to="def:type"/>
<style id="single-number" name="Single Number" map-to="def:base-n-integer"/>
<style id="double-number" name="Double Number" map-to="def:base-n-integer"/>
<style id="float" name="Float" map-to="def:floating-point"/>
</styles>
<default-regex-options case-sensitive="false"/>
<keyword-char-class>(\S)</keyword-char-class>
<definitions>
<context id="core-keywords" style-ref="keyword">
<keyword>!</keyword>
<keyword>#</keyword>
<keyword>#&gt;</keyword>
<keyword>#S</keyword>
<keyword>&apos;</keyword>
<keyword>\(</keyword>
<keyword>\*</keyword>
<keyword>\*/</keyword>
<keyword>\*/MOD</keyword>
<keyword>\+</keyword>
<keyword>\+!</keyword>
<keyword>\+LOOP</keyword>
<keyword>,</keyword>
<keyword>-</keyword>
<keyword>\.</keyword>
<keyword>\.&quot;</keyword>
<keyword>/</keyword>
<keyword>/MOD</keyword>
<keyword>0&lt;</keyword>
<keyword>0=</keyword>
<keyword>1\+</keyword>
<keyword>1-</keyword>
<keyword>2!</keyword>
<keyword>2\*</keyword>
<keyword>2/</keyword>
<keyword>2@</keyword>
<keyword>2DROP</keyword>
<keyword>2DUP</keyword>
<keyword>2OVER</keyword>
<keyword>2SWAP</keyword>
<keyword>:</keyword>
<keyword>;</keyword>
<keyword>&lt;</keyword>
<keyword>&lt;#</keyword>
<keyword>=</keyword>
<keyword>&gt;</keyword>
<keyword>&gt;BODY</keyword>
<keyword>&gt;IN</keyword>
<keyword>&gt;NUMBER</keyword>
<keyword>&gt;R</keyword>
<keyword>\?DUP</keyword>
<keyword>@</keyword>
<keyword>ABORT</keyword>
<keyword>ABORT&quot;</keyword>
<keyword>ABS</keyword>
<keyword>ACCEPT</keyword>
<keyword>ALIGN</keyword>
<keyword>ALIGNED</keyword>
<keyword>ALLOT</keyword>
<keyword>AND</keyword>
<keyword>BASE</keyword>
<keyword>BEGIN</keyword>
<keyword>BL</keyword>
<keyword>C!</keyword>
<keyword>C,</keyword>
<keyword>C@</keyword>
<keyword>CELL\+</keyword>
<keyword>CELLS</keyword>
<keyword>CHAR</keyword>
<keyword>CHAR\+</keyword>
<keyword>CHARS</keyword>
<keyword>CONSTANT</keyword>
<keyword>COUNT</keyword>
<keyword>CR</keyword>
<keyword>CREATE</keyword>
<keyword>DECIMAL</keyword>
<keyword>DEPTH</keyword>
<keyword>DO</keyword>
<keyword>DOES&gt;</keyword>
<keyword>DROP</keyword>
<keyword>DUP</keyword>
<keyword>ELSE</keyword>
<keyword>EMIT</keyword>
<keyword>ENVIRONMENT\?</keyword>
<keyword>EVALUATE</keyword>
<keyword>EXECUTE</keyword>
<keyword>EXIT</keyword>
<keyword>FILL</keyword>
<keyword>FIND</keyword>
<keyword>FM/MOD</keyword>
<keyword>HERE</keyword>
<keyword>HOLD</keyword>
<keyword>I</keyword>
<keyword>IF</keyword>
<keyword>IMMEDIATE</keyword>
<keyword>INVERT</keyword>
<keyword>J</keyword>
<keyword>KEY</keyword>
<keyword>LEAVE</keyword>
<keyword>LITERAL</keyword>
<keyword>LOOP</keyword>
<keyword>LSHIFT</keyword>
<keyword>M\*</keyword>
<keyword>MAX</keyword>
<keyword>MIN</keyword>
<keyword>MOD</keyword>
<keyword>MOVE</keyword>
<keyword>NEGATE</keyword>
<keyword>OR</keyword>
<keyword>OVER</keyword>
<keyword>POSTPONE</keyword>
<keyword>QUIT</keyword>
<keyword>R&gt;</keyword>
<keyword>R@</keyword>
<keyword>RECURSE</keyword>
<keyword>REPEAT</keyword>
<keyword>ROT</keyword>
<keyword>RSHIFT</keyword>
<keyword>S&quot;</keyword>
<keyword>S&gt;D</keyword>
<keyword>SIGN</keyword>
<keyword>SM/REM</keyword>
<keyword>SOURCE</keyword>
<keyword>SPACE</keyword>
<keyword>SPACES</keyword>
<keyword>STATE</keyword>
<keyword>SWAP</keyword>
<keyword>THEN</keyword>
<keyword>TYPE</keyword>
<keyword>U\.</keyword>
<keyword>U&lt;</keyword>
<keyword>UM\*</keyword>
<keyword>UM/MOD</keyword>
<keyword>UNLOOP</keyword>
<keyword>UNTIL</keyword>
<keyword>VARIABLE</keyword>
<keyword>WHILE</keyword>
<keyword>WORD</keyword>
<keyword>XOR</keyword>
<keyword>\[</keyword>
<keyword>\[&apos;\]</keyword>
<keyword>\[CHAR\]</keyword>
<keyword>\]</keyword>
</context>
<context id="core-ext-keywords" style-ref="keyword">
<keyword>\.\(</keyword>
<keyword>\.R</keyword>
<keyword>0&lt;&gt;</keyword>
<keyword>0&gt;</keyword>
<keyword>2&gt;R</keyword>
<keyword>2R&gt;</keyword>
<keyword>2R@</keyword>
<keyword>:NONAME</keyword>
<keyword>&lt;&gt;</keyword>
<keyword>\?DO</keyword>
<keyword>AGAIN</keyword>
<keyword>C&quot;</keyword>
<keyword>CASE</keyword>
<keyword>COMPILE,</keyword>
<keyword>ENDCASE</keyword>
<keyword>ENDOF</keyword>
<keyword>ERASE</keyword>
<keyword>FALSE</keyword>
<keyword>HEX</keyword>
<keyword>MARKER</keyword>
<keyword>NIP</keyword>
<keyword>OF</keyword>
<keyword>PAD</keyword>
<keyword>PARSE</keyword>
<keyword>PICK</keyword>
<keyword>REFILL</keyword>
<keyword>RESTORE-INPUT</keyword>
<keyword>ROLL</keyword>
<keyword>SAVE-INPUT</keyword>
<keyword>SOURCE-ID</keyword>
<keyword>TO</keyword>
<keyword>TRUE</keyword>
<keyword>TUCK</keyword>
<keyword>U\.R</keyword>
<keyword>U&gt;</keyword>
<keyword>UNUSED</keyword>
<keyword>VALUE</keyword>
<keyword>WITHIN</keyword>
<keyword>\[COMPILE\]</keyword>
<keyword>\\</keyword>
</context>
<context id="obsolete-core-ext-keywords" style-ref="obs-keyword">
<keyword>#TIB</keyword>
<keyword>CONVERT</keyword>
<keyword>EXPECT</keyword>
<keyword>QUERY</keyword>
<keyword>SPAN</keyword>
<keyword>TIB</keyword>
</context>
<context id="block-keywords" style-ref="keyword">
<keyword>BLK</keyword>
<keyword>BLOCK</keyword>
<keyword>BUFFER</keyword>
<keyword>EVALUATE</keyword>
<keyword>FLUSH</keyword>
<keyword>LOAD</keyword>
<keyword>SAVE-BUFFERS</keyword>
<keyword>UPDATE</keyword>
</context>
<context id="block-ext-keywords" style-ref="keyword">
<keyword>EMPTY-BUFFERS</keyword>
<keyword>LIST</keyword>
<keyword>REFILL</keyword>
<keyword>SCR</keyword>
<keyword>THRU</keyword>
<keyword>\\</keyword>
</context>
<context id="double-keywords" style-ref="keyword">
<keyword>2CONSTANT</keyword>
<keyword>2LITERAL</keyword>
<keyword>2VARIABLE</keyword>
<keyword>D\+</keyword>
<keyword>D-</keyword>
<keyword>D\.</keyword>
<keyword>D\.R</keyword>
<keyword>D0&lt;</keyword>
<keyword>D0=</keyword>
<keyword>D2\*</keyword>
<keyword>D2/</keyword>
<keyword>D&lt;</keyword>
<keyword>D=</keyword>
<keyword>D&gt;S</keyword>
<keyword>DABS</keyword>
<keyword>DMAX</keyword>
<keyword>DMIN</keyword>
<keyword>DNEGATE</keyword>
<keyword>M\*/</keyword>
<keyword>M\+</keyword>
</context>
<context id="double-ext-keywords" style-ref="keyword">
<keyword>2ROT</keyword>
<keyword>DU&lt;</keyword>
</context>
<context id="exception-keywords" style-ref="keyword">
<keyword>CATCH</keyword>
<keyword>THROW</keyword>
</context>
<context id="exception-ext-keywords" style-ref="keyword">
<keyword>ABORT</keyword>
<keyword>ABORT&quot;</keyword>
</context>
<context id="facility-keywords" style-ref="keyword">
<keyword>AT-XY</keyword>
<keyword>KEY\?</keyword>
<keyword>PAGE</keyword>
</context>
<context id="facility-ext-keywords" style-ref="keyword">
<keyword>EKEY</keyword>
<keyword>EKEY&gt;CHAR</keyword>
<keyword>EKEY\?</keyword>
<keyword>EMIT\?</keyword>
<keyword>MS</keyword>
<keyword>TIME&amp;DATE</keyword>
</context>
<context id="file-keywords" style-ref="keyword">
<keyword>\(</keyword>
<keyword>BIN</keyword>
<keyword>CLOSE-FILE</keyword>
<keyword>CREATE-FILE</keyword>
<keyword>DELETE-FILE</keyword>
<keyword>FILE-POSITION</keyword>
<keyword>FILE-SIZE</keyword>
<keyword>INCLUDE-FILE</keyword>
<keyword>INCLUDED</keyword>
<keyword>OPEN-FILE</keyword>
<keyword>R/O</keyword>
<keyword>R/W</keyword>
<keyword>READ-FILE</keyword>
<keyword>READ-LINE</keyword>
<keyword>REPOSITION-FILE</keyword>
<keyword>RESIZE-FILE</keyword>
<keyword>S&quot;</keyword>
<keyword>SOURCE-ID</keyword>
<keyword>W/O</keyword>
<keyword>WRITE-FILE</keyword>
<keyword>WRITE-LINE</keyword>
</context>
<context id="file-ext-keywords" style-ref="keyword">
<keyword>FILE-STATUS</keyword>
<keyword>FLUSH-FILE</keyword>
<keyword>REFILL</keyword>
<keyword>RENAME-FILE</keyword>
</context>
<context id="floating-keywords" style-ref="keyword">
<keyword>&gt;FLOAT</keyword>
<keyword>D&gt;F</keyword>
<keyword>F!</keyword>
<keyword>F\*</keyword>
<keyword>F\+</keyword>
<keyword>F-</keyword>
<keyword>F/</keyword>
<keyword>F0&lt;</keyword>
<keyword>F0=</keyword>
<keyword>F&lt;</keyword>
<keyword>F&gt;D</keyword>
<keyword>F@</keyword>
<keyword>FALIGN</keyword>
<keyword>FALIGNED</keyword>
<keyword>FCONSTANT</keyword>
<keyword>FDEPTH</keyword>
<keyword>FDROP</keyword>
<keyword>FDUP</keyword>
<keyword>FLITERAL</keyword>
<keyword>FLOAT\+</keyword>
<keyword>FLOATS</keyword>
<keyword>FLOOR</keyword>
<keyword>FMAX</keyword>
<keyword>FMIN</keyword>
<keyword>FNEGATE</keyword>
<keyword>FOVER</keyword>
<keyword>FROT</keyword>
<keyword>FROUND</keyword>
<keyword>FSWAP</keyword>
<keyword>FVARIABLE</keyword>
<keyword>REPRESENT</keyword>
</context>
<context id="floating-ext-keywords" style-ref="keyword">
<keyword>DF!</keyword>
<keyword>DF@</keyword>
<keyword>DFALIGN</keyword>
<keyword>DFALIGNED</keyword>
<keyword>DFLOAT\+</keyword>
<keyword>DFLOATS</keyword>
<keyword>F\*\*</keyword>
<keyword>F\.</keyword>
<keyword>FABS</keyword>
<keyword>FACOS</keyword>
<keyword>FACOSH</keyword>
<keyword>FALOG</keyword>
<keyword>FASIN</keyword>
<keyword>FASINH</keyword>
<keyword>FATAN</keyword>
<keyword>FATAN2</keyword>
<keyword>FATANH</keyword>
<keyword>FCOS</keyword>
<keyword>FCOSH</keyword>
<keyword>FE\.</keyword>
<keyword>FEXP</keyword>
<keyword>FEXPM1</keyword>
<keyword>FLN</keyword>
<keyword>FLNP1</keyword>
<keyword>FLOG</keyword>
<keyword>FS\.</keyword>
<keyword>FSIN</keyword>
<keyword>FSINCOS</keyword>
<keyword>FSINH</keyword>
<keyword>FSQRT</keyword>
<keyword>FTAN</keyword>
<keyword>FTANH</keyword>
<keyword>F~</keyword>
<keyword>PRECISION</keyword>
<keyword>SET-PRECISION</keyword>
<keyword>SF!</keyword>
<keyword>SF@</keyword>
<keyword>SFALIGN</keyword>
<keyword>SFALIGNED</keyword>
<keyword>SFLOAT\+</keyword>
<keyword>SFLOATS</keyword>
</context>
<context id="local-keywords" style-ref="keyword">
<keyword>\(LOCAL\)</keyword>
<keyword>TO</keyword>
</context>
<context id="local-ext-keywords" style-ref="keyword">
<keyword>LOCALS\|</keyword>
</context>
<context id="memory-keywords" style-ref="keyword">
<keyword>ALLOCATE</keyword>
<keyword>FREE</keyword>
<keyword>RESIZE</keyword>
</context>
<context id="tools-keywords" style-ref="keyword">
<keyword>\.S</keyword>
<keyword>\?</keyword>
<keyword>DUMP</keyword>
<keyword>SEE</keyword>
<keyword>WORDS</keyword>
</context>
<context id="tools-ext-keywords" style-ref="keyword">
<keyword>;CODE</keyword>
<keyword>AHEAD</keyword>
<keyword>ASSEMBLER</keyword>
<keyword>BYE</keyword>
<keyword>CODE</keyword>
<keyword>CS-PICK</keyword>
<keyword>CS-ROLL</keyword>
<keyword>EDITOR</keyword>
<keyword>STATE</keyword>
<keyword>\[ELSE\]</keyword>
<keyword>\[IF\]</keyword>
<keyword>\[THEN\]</keyword>
</context>
<context id="obsolete-tools-ext-keywords" style-ref="obs-keyword">
<keyword>FORGET</keyword>
</context>
<context id="search-keywords" style-ref="keyword">
<keyword>DEFINITIONS</keyword>
<keyword>FIND</keyword>
<keyword>FORTH-WORDLIST</keyword>
<keyword>GET-CURRENT</keyword>
<keyword>GET-ORDER</keyword>
<keyword>SEARCH-WORDLIST</keyword>
<keyword>SET-CURRENT</keyword>
<keyword>SET-ORDER</keyword>
<keyword>WORDLIST</keyword>
</context>
<context id="search-ext-keywords" style-ref="keyword">
<keyword>ALSO</keyword>
<keyword>FORTH</keyword>
<keyword>ONLY</keyword>
<keyword>ORDER</keyword>
<keyword>PREVIOUS</keyword>
</context>
<context id="string-keywords" style-ref="keyword">
<keyword>-TRAILING</keyword>
<keyword>/STRING</keyword>
<keyword>BLANK</keyword>
<keyword>CMOVE</keyword>
<keyword>CMOVE&gt;</keyword>
<keyword>COMPARE</keyword>
<keyword>SEARCH</keyword>
<keyword>SLITERAL</keyword>
</context>
<context id="comment-multiline" style-ref="comment" class-disabled="no-spell-check">
<start>\%[\(\%]</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context sub-pattern="0" where="end" style-ref="keyword"/>
<context ref="def:in-comment"/>
</include>
</context>
<context id="comment-single" style-ref="comment" end-at-line-end="true" class-disabled="no-spell-check">
<start>\%[\\\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context ref="def:in-comment"/>
</include>
</context>
<context id="character-single" style-ref="keyword">
<match>\%[(CHAR|\[CHAR\])\s+(.)\%]</match>
<include>
<context sub-pattern="4" style-ref="character"/>
</include>
</context>
<context id="word-core" style-ref="keyword">
<match>\%[(:|[']|CREATE|POSTPONE)\s+(\S*)\%]</match>
<include>
<context sub-pattern="4" style-ref="word"/>
</include>
</context>
<context id="string-core" style-ref="string">
<start>\%[([.]&quot;|ABORT&quot;|S&quot;)\%]</start>
<end>&quot;</end>
<include>
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context sub-pattern="0" where="end" style-ref="keyword"/>
</include>
</context>
<context id="parse-string-core" style-ref="keyword">
<match>\%[WORD\s+(\S*)\%]</match>
<include>
<context sub-pattern="3" style-ref="string"/>
</include>
</context>
<context id="constant-core" style-ref="keyword">
<match>\%[CONSTANT\s+(\S*)\%]</match>
<include>
<context sub-pattern="3" style-ref="constant"/>
</include>
</context>
<context id="variable-core" style-ref="keyword">
<match>\%[VARIABLE\s+(\S*)\%]</match>
<include>
<context sub-pattern="3" style-ref="variable"/>
</include>
</context>
<context id="word-core-ext" style-ref="keyword">
<match>\%[(MARKER|\[COMPILE\])\s+(\S*)\%]</match>
<include>
<context sub-pattern="4" style-ref="word"/>
</include>
</context>
<context id="string-core-ext" style-ref="string">
<start>\%[C&quot;\%]</start>
<end>&quot;</end>
<include>
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context sub-pattern="0" where="end" style-ref="keyword"/>
</include>
</context>
<context id="parse-string-core-ext" style-ref="keyword">
<match>\%[PARSE\s+(\S*)\%]</match>
<include>
<context sub-pattern="3" style-ref="string"/>
</include>
</context>
<context id="display-string-core-ext" style-ref="string">
<start>\%[[.]\(\%]</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context sub-pattern="0" where="end" style-ref="keyword"/>
</include>
</context>
<context id="variable-core-ext" style-ref="keyword">
<match>\%[(TO|VALUE)\s+(\S*)\%]</match>
<include>
<context sub-pattern="4" style-ref="variable"/>
</include>
</context>
<context id="constant-double" style-ref="keyword">
<match>\%[2CONSTANT\s+(\S*)\%]</match>
<include>
<context sub-pattern="3" style-ref="constant"/>
</include>
</context>
<context id="variable-double" style-ref="keyword">
<match>\%[2VARIABLE\s+(\S*)\%]</match>
<include>
<context sub-pattern="3" style-ref="variable"/>
</include>
</context>
<context id="constant-floating" style-ref="keyword">
<match>\%[FCONSTANT\s+(\S*)\%]</match>
<include>
<context sub-pattern="3" style-ref="constant"/>
</include>
</context>
<context id="variable-floating" style-ref="keyword">
<match>\%[FVARIABLE\s+(\S*)\%]</match>
<include>
<context sub-pattern="3" style-ref="variable"/>
</include>
</context>
<context id="variable-local-ext" style-ref="local-variable">
<start>\%[LOCALS\|\%]</start>
<end>\|</end>
<include>
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context sub-pattern="0" where="end" style-ref="keyword"/>
</include>
</context>
<context id="word-tools" style-ref="keyword">
<match>\%[SEE\s+(\S*)\%]</match>
<include>
<context sub-pattern="3" style-ref="word"/>
</include>
</context>
<context id="word-tools-ext" style-ref="keyword">
<match>\%[CODE\s+(\S*)\%]</match>
<include>
<context sub-pattern="3" style-ref="word"/>
</include>
</context>
<context id="word-obs-tools-ext" style-ref="obs-keyword">
<match>\%[FORGET\s+(\S*)\%]</match>
<include>
<context sub-pattern="3" style-ref="word"/>
</include>
</context>
<context id="number-single" style-ref="single-number">
<match>\%[[-]?[0-9]+\%]</match>
</context>
<context id="number-double" style-ref="double-number">
<match>\%[[-]?[0-9]+[.][0-9]*\%]</match>
</context>
<context id="number-float" style-ref="float">
<match>\%[([+]|[-])?([0-9]+[.]?[0-9]*)(E|e)([+]|[-])?([0-9]*)\%]</match>
</context>
<context id="ansforth94" class="no-spell-check">
<include>
<context ref="comment-multiline"/>
<context ref="comment-single"/>
<context ref="character-single"/>
<context ref="word-core"/>
<context ref="string-core"/>
<context ref="parse-string-core"/>
<context ref="constant-core"/>
<context ref="variable-core"/>
<context ref="comment-single"/>
<context ref="word-core-ext"/>
<context ref="string-core-ext"/>
<context ref="parse-string-core-ext"/>
<context ref="display-string-core-ext"/>
<context ref="variable-core-ext"/>
<context ref="constant-double"/>
<context ref="variable-double"/>
<context ref="constant-floating"/>
<context ref="variable-floating"/>
<context ref="variable-local-ext"/>
<context ref="word-tools"/>
<context ref="word-tools-ext"/>
<context ref="word-obs-tools-ext"/>
<context ref="core-keywords"/>
<context ref="core-ext-keywords"/>
<context ref="obsolete-core-ext-keywords"/>
<context ref="block-keywords"/>
<context ref="block-ext-keywords"/>
<context ref="double-keywords"/>
<context ref="double-ext-keywords"/>
<context ref="exception-keywords"/>
<context ref="exception-ext-keywords"/>
<context ref="facility-keywords"/>
<context ref="facility-ext-keywords"/>
<context ref="file-keywords"/>
<context ref="file-ext-keywords"/>
<context ref="floating-keywords"/>
<context ref="floating-ext-keywords"/>
<context ref="local-keywords"/>
<context ref="local-ext-keywords"/>
<context ref="memory-keywords"/>
<context ref="tools-keywords"/>
<context ref="tools-ext-keywords"/>
<context ref="obsolete-tools-ext-keywords"/>
<context ref="search-keywords"/>
<context ref="search-ext-keywords"/>
<context ref="string-keywords"/>
<context ref="number-single"/>
<context ref="number-double"/>
<context ref="number-float"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,519 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author (original): David Avsajanishvili <avsd05@gmail.com>
Collaborator: Eduardo Santana <eduardo.ufpb@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="asciidoc" name="AsciiDoc" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">text/asciidoc</property>
<property name="globs">*.asciidoc;*.adoc</property>
<property name="line-comment-start">//</property>
</metadata>
<styles>
<style id="passthrough" name="Passthrough Text" map-to="def:special-char"/>
<style id="attribute" name="Attribute" map-to="def:preprocessor"/>
<style id="markup-monospace" name="Monospaced Text" map-to="def:inline-code"/>
<style id="markup-emphasis" name="Emphasized Text" map-to="def:emphasis"/>
<style id="markup-strong" name="Strong Text" map-to="def:strong-emphasis"/>
<style id="markup-pass" name="Inline Passthrough" map-to="asciidoc:passthrough"/>
<style id="markup-replace" name="Replacement" map-to="def:special-char"/>
<style id="markup-linebreak" name="Line Break" map-to="def:special-char"/>
<style id="markup-admonition" name="Admonition" map-to="def:note"/>
<style id="markup-anchor" name="Anchor" map-to="asciidoc:attribute"/>
<style id="markup-crosslink" name="Link" map-to="def:link-text"/>
<style id="markup-url" name="URL" map-to="def:link-destination"/>
<style id="markup-link-text" name="Link Text" map-to="def:link-text"/>
<style id="markup-att-entry" name="Attribute Entry Invocation" map-to="asciidoc:attribute"/>
<style id="struct-title" name="Title" map-to="def:heading"/>
<style id="struct-blocktitle" name="Block Title" map-to="def:heading"/>
<style id="struct-style" name="Style" map-to="asciidoc:attribute"/>
<style id="struct-ruler-line" name="Ruler Line" map-to="def:thematic-break"/>
<style id="struct-page-break" name="Page Break" map-to="def:operator"/>
<style id="par-literal" name="Literal" map-to="def:preformatted-section"/>
<style id="block-listing" name="Listing" map-to="def:preformatted-section"/>
<style id="block-pass" name="Block Passthrough" map-to="asciidoc:passthrough"/>
<style id="block-comment" name="Comment" map-to="def:comment"/>
<style id="block-boundary" name="Block Boundary" map-to="def:identifier"/>
<style id="macro" name="Macro" map-to="def:keyword"/>
<style id="macro-arg" name="Macro Argument" map-to="def:string"/>
<style id="macro-att-list" name="Macro Attribute List" map-to="asciidoc:attribute"/>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="preprocessor-arg" name="Preprocessor Argument" map-to="def:string"/>
<style id="preprocessor-att-list" name="Preprocessor Attribute List" map-to="asciidoc:attribute"/>
<style id="list-identifier" name="List Identifier" map-to="def:list-marker"/>
</styles>
<definitions>
<context id="text_linebreak" style-ref="markup-linebreak" extend-parent="false">
<match>\+\s*$</match>
</context>
<define-regex id="admonition-names">(?:NOTE|TIP|CAUTION|IMPORTANT|WARNING)</define-regex>
<define-regex id="macro-names">(?:image|include|sys|sys2|eval)</define-regex>
<define-regex id="inline-macro-names">(?:pass|latexmath|asciimath|indexterm|indexterm2|footnote|footnoteref)</define-regex>
<define-regex id="preproc-names">(?:ifdef|ifndef|ifeval|endif|unfloat|template)</define-regex>
<!-- TITLES -->
<context id="title">
<include>
<context id="onelineTitle"><include>
<context id="title0" style-ref="struct-title"><match>^=\s+\S.*$</match></context>
<context id="title1" style-ref="struct-title"><match>^==\s+\S.*$</match></context>
<context id="title2" style-ref="struct-title"><match>^===\s+\S.*$</match></context>
<context id="title3" style-ref="struct-title"><match>^====\s+\S.*$</match></context>
<context id="title4" style-ref="struct-title"><match>^=====\s+\S.*$</match></context>
</include></context>
</include>
</context>
<!-- TABLES -->
<context id="theTable" extend-parent="false">
<start>^(\|====+)\s*$</start>
<end>^(\%{1@start})\s*$</end>
<include>
<context sub-pattern="1" where="start" style-ref="block-boundary" />
<context sub-pattern="1" where="end" style-ref="block-boundary" />
<context id="tableValue" extend-parent="false">
<start>(?&lt;!\\)\|</start>
<end>(?=\|)</end>
<include>
<context sub-pattern="0" where="start" style-ref="block-boundary" />
<context ref="def:escape" ignore-style="true" />
<context ref="markup" />
</include>
</context>
</include>
</context>
<!-- BLOCKS -->
<context id="theBlocks">
<include>
<context id="commentBlock" style-ref="block-comment" extend-parent="false">
<start>^(\/\/\/\/+)\s*$</start>
<end>^(\%{1@start})\s*$</end>
</context>
<context id="theComment" style-ref="block-comment" extend-parent="false">
<match>^\/\/.*$</match>
</context>
<context id="passthroughBlock" style-ref="block-pass" extend-parent="false">
<start>^(\+\+\+\++)\s*$</start>
<end>^(\%{1@start})\s*$</end>
</context>
<context id="listingBlock" style-ref="block-listing" extend-parent="false">
<start>^(----+)\s*$</start>
<end>^(\%{1@start})\s*$</end>
</context>
<context id="literalBlock" style-ref="par-literal" extend-parent="false">
<start>^(\.\.\.\.+)\s*$</start>
<end>^(\%{1@start})\s*$</end>
</context>
<context id="sidebarBlock" extend-parent="false">
<start>^(\*\*\*\*+)\s*$</start>
<end>^(\%{1@start})\s*$</end>
<include>
<context sub-pattern="1" where="start" style-ref="block-boundary" />
<context sub-pattern="1" where="end" style-ref="block-boundary" />
<context ref="def:escape" ignore-style="true" />
<context ref="blockMacro" />
<context ref="theLists" />
<context ref="parIndented" />
<context ref="paragraph" />
</include>
</context>
<context id="quoteBlock" extend-parent="false">
<start>^(____+)\s*$</start>
<end>^(\%{1@start})\s*$</end>
<include>
<context sub-pattern="1" where="start" style-ref="block-boundary" />
<context sub-pattern="1" where="end" style-ref="block-boundary" />
<context ref="def:escape" ignore-style="true" />
<context ref="blockMacro" />
<context ref="theLists" />
<context ref="parIndented" />
<context ref="paragraph" />
</include>
</context>
<context id="exampleBlock" extend-parent="false">
<start>^(====+)\s*$</start>
<end>^(\%{1@start})\s*$</end>
<include>
<context sub-pattern="1" where="start" style-ref="block-boundary" />
<context sub-pattern="1" where="end" style-ref="block-boundary" />
<context ref="def:escape" ignore-style="true" />
<context ref="blockMacro" />
<context ref="theLists" />
<context ref="parIndented" />
<context ref="paragraph" />
</include>
</context>
</include>
</context>
<context id="markup">
<include>
<!-- QUOTES -->
<context id="SingleQuote" extend-parent="false">
<match>\B`[^\s`'].*?[^\s`']'\B</match>
</context>
<context id="DoubleQuote" extend-parent="false">
<match>\B``[^\s`'].*?[^\s`']''\B</match>
</context>
<!-- CROSSLINKS and URLS -->
<context id="crosslink" style-ref="markup-crosslink" extend-parent="false">
<!-- This was previously implemented as a <match/> but I suspect
something was going awry with the combination of &lt;/&gt;
character entities + regexes. -->
<start>&lt;&lt;</start>
<end>&gt;&gt;</end>
</context>
<context id="crosslinkMacro" style-ref="markup-crosslink" extend-parent="false" style-inside="true">
<start>\b(xref:)([^\s\[\]]*)(\[)</start>
<end>\]</end>
<include>
<context sub-pattern="1" where="start" style-ref="macro" />
<context sub-pattern="2" where="start" style-ref="markup-crosslink" />
<context sub-pattern="3" where="start" style-ref="markup-crosslink" />
<context sub-pattern="0" where="end" style-ref="markup-crosslink" />
</include>
</context>
<context id="linkMacro" style-ref="markup-link-text" extend-parent="false" style-inside="true">
<start>\b(link:)([^\s\[\]]*)(\[)</start>
<end>\]</end>
<include>
<context sub-pattern="1" where="start" style-ref="macro" />
<context sub-pattern="2" where="start" style-ref="macro-arg" />
<context sub-pattern="3" where="start" style-ref="markup-link-text" />
<context sub-pattern="0" where="end" style-ref="markup-link-text" />
</include>
</context>
<!-- url with [] -->
<context id="url1" style-ref="markup-link-text" style-inside="true" extend-parent="false">
<start>((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[)</start>
<end>\]</end>
<include>
<context sub-pattern="1" where="start" style-ref="markup-url" />
<context sub-pattern="2" where="start" style-ref="markup-link-text" />
<context sub-pattern="0" where="end" style-ref="markup-link-text" />
</include>
</context>
<!-- url without [] -->
<context id="url2" style-ref="markup-url" extend-parent="false">
<match>(https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+</match>
</context>
<context id="email" style-ref="markup-url" extend-parent="false">
<match>\b[\w\.\/-]+@[\w\.\/-]+\b</match>
</context>
<!-- PASSTHROUGH -->
<context id="Pass" style-ref="markup-pass" extend-parent="false">
<match>\$\$.+?\$\$</match>
</context>
<context id="PassUnconstrained" style-ref="markup-pass" extend-parent="false">
<match>\+\+\+.+?\+\+\+</match>
</context>
<context id="Replacement" style-ref="markup-replace" extend-parent="false">
<match>\(C\)|\(TM\)|\(R\)|(?&lt;!-)--(?!-)|\.{3}|-&gt;|&lt;-|=&gt;|&lt;=</match>
</context>
<context id="Admonition" style-ref="markup-admonition" extend-parent="false">
<match>^\%{admonition-names}:(?=\s)</match>
</context>
<!-- MONOSPACED -->
<context id="MonospacePlus" style-ref="markup-monospace" extend-parent="false">
<start>(?&lt;=^|[ \t\(\[.,\-])\+(?![\)])</start>
<end>(\+(?=[ \t\(\)\],.?!;:\-]|$)|$(?=^$))</end>
</context>
<context id="MonospaceBtk" style-ref="markup-monospace" extend-parent="false">
<start>(?&lt;=^|[ \t\(\[.,\-])`(?![\)])</start>
<end>(`(?=[ \t\(\)\],.?!;:\-]|$)|$(?=^$))</end>
</context>
<context id="MonospaceUnconstrained" style-ref="markup-monospace" extend-parent="false">
<start>\+\+\S</start>
<end>(\+\+|^$)</end>
</context>
<!-- EMPHASIZED -->
<context id="EmphasisQuote" style-ref="markup-emphasis" extend-parent="false">
<start>(?&lt;=^|[ \t\(\[.,\-])'(?![\)])</start>
<end>('(?=[ \t\(\)\],.?!;:\-]|$)|$(?=^$))</end>
</context>
<context id="EmphasisUnderline" style-ref="markup-emphasis" extend-parent="false">
<start>(?&lt;=^|[ \t\(\[.,\-])_(?![\)])</start>
<end>(_(?=[ \t\(\)\],.?!;:\-]|$)|$(?=^$))</end>
</context>
<context id="EmphasisUnconstrained" style-ref="markup-emphasis" extend-parent="false">
<start>__\S</start>
<end>(__|^$)</end>
</context>
<!-- STRONG (BOLD) -->
<context id="Strong" style-ref="markup-strong" extend-parent="false">
<start>(?&lt;=^|[ \t\(\[.,\-])\*(?![\)])</start>
<end>(\*(?=[ \t\(\)\],.?!;:\-]|$)|$(?=^$))</end>
</context>
<context id="StrongUnconstrained" style-ref="markup-strong" extend-parent="false">
<start>\*\*\S</start>
<end>(\*\*|^$)</end>
</context>
<!-- INLINE MACROS -->
<context id="inlineMacro" style-ref="macro-att-list" style-inside="true" extend-parent="false">
<start>\b((?:\%{macro-names}|\%{inline-macro-names}):)([^\s\[\]]*)(\[)</start>
<end>\]</end>
<include>
<context sub-pattern="1" where="start" style-ref="macro" />
<context sub-pattern="2" where="start" style-ref="macro-arg" />
<context sub-pattern="3" where="start" style-ref="macro-att-list" />
<context sub-pattern="0" where="end" style-ref="macro-att-list" />
</include>
</context>
<!-- CALLOUTS -->
<context id="theCallout" style-ref="list-identifier" extend-parent="false">
<match>^&lt;\d+&gt;\s+</match>
</context>
<!-- Anchor -->
<context id="theAnchor" style-ref="markup-anchor" extend-parent="false">
<match>\[\[[^\]]+\]\]</match>
</context>
<context id="anchorMacro" style-ref="markup-anchor" extend-parent="false" style-inside="true">
<start>\b(anchor:)([^\s\[\]]*)(\[)</start>
<end>\]</end>
<include>
<context sub-pattern="1" where="start" style-ref="macro" />
<context sub-pattern="2" where="start" style-ref="markup-anchor" />
<context sub-pattern="3" where="start" style-ref="markup-anchor" />
<context sub-pattern="0" where="end" style-ref="markup-anchor" />
</include>
</context>
<!-- FIXME: Not exactly sure what the proper character set for an attribute entry is. -->
<context id="markup-att-entry" style-ref="markup-att-entry" extend-parent="false">
<match>\{[^\s{}:]+\}</match>
</context>
</include>
</context>
<!-- BLOCK MACROS / PREPROCESSOR -->
<context id="blockMacro" end-at-line-end="true" style-ref="macro-att-list" style-inside="true">
<start>^(\%{macro-names}::)([^\s\[\]]*)(\[)</start>
<end>\]$</end>
<include>
<context sub-pattern="1" where="start" style-ref="macro" />
<context sub-pattern="2" where="start" style-ref="macro-arg" />
<context sub-pattern="3" where="start" style-ref="macro-att-list" />
<context sub-pattern="0" where="end" style-ref="macro-att-list" />
</include>
</context>
<context id="blockPreproc" end-at-line-end="true" style-ref="preprocessor-att-list" style-inside="true">
<start>^(\%{preproc-names}::)([^\s\[\]]*)(\[)</start>
<end>\]$</end>
<include>
<context sub-pattern="1" where="start" style-ref="preprocessor" />
<context sub-pattern="2" where="start" style-ref="preprocessor-arg" />
<context sub-pattern="3" where="start" style-ref="preprocessor-att-list" />
<context sub-pattern="0" where="end" style-ref="preprocessor-att-list" />
</include>
</context>
<context id="setAttr" end-at-line-end="true" style-ref="preprocessor">
<start>^:[\w\s.-]+!?</start>
<end>:</end>
</context>
<!-- TITLES/STYLES/ANCHORS -->
<context id="blockTitle" style-ref="struct-blocktitle" end-at-line-end="true">
<start>^\.[^. \t].*[^\-~_]</start>
<end>$</end>
</context>
<context id="theStyle" style-ref="struct-style">
<start>^\[(?=[^\[\]]+\]$)</start>
<end>\]</end>
<include>
<context style-ref="markup-admonition">
<match>\b\%{admonition-names}\b</match>
</context>
</include>
</context>
<!-- Anchor -->
<context id="oneLineAnchor" style-ref="markup-anchor" extend-parent="false">
<match>^\[\[[^\]]+\]\]$</match>
</context>
<!-- RULER LINES -->
<context id="rulerLine" style-ref="struct-ruler-line" extend-parent="false">
<match>^'''+\s*$</match>
</context>
<!-- PAGE BREAKS -->
<context id="pageBreak" style-ref="struct-page-break" extend-parent="false">
<match>^&lt;&lt;&lt;+\s*$</match>
</context>
<!-- PARAGRAPHS -->
<context id="parIndented" extend-parent="false" style-ref="par-literal">
<start>^\s+(?!(\*+|\-+|\.+)\s)\S+.*$</start>
<end>^\s*$</end>
</context>
<context id="paragraph" extend-parent="false">
<start>^(?=\S)</start>
<end>^\s*$</end>
<include>
<context ref="def:escape" ignore-style="true" />
<!-- Underlines inside paragraphs FIXME! -->
<context id="titleline0" style-ref="struct-title" end-parent="true">
<match>^===+$</match>
</context>
<context id="titleline1" style-ref="struct-title" end-parent="true">
<match>^---+$</match>
</context>
<context id="titleline2" style-ref="struct-title" end-parent="true">
<match>^~~~+$</match>
</context>
<context id="titleline3" style-ref="struct-title" end-parent="true">
<match>^\^\^\^+$</match>
</context>
<context id="titleline4" style-ref="struct-title" end-parent="true">
<match>^\+\+\++$</match>
</context>
<context ref="text_linebreak" />
<context ref="markup" />
<context ref="blockPreproc" />
<context ref="setAttr" />
</include>
</context>
<!-- LISTS -->
<context id="theLists">
<include>
<context id="bulletedList" extend-parent="false">
<start>^\s*(-|\*{1,5})\s+(?=\S)</start>
<end>^\s*$</end>
<include>
<context sub-pattern="1" where="start" style-ref="list-identifier" />
<context ref="def:escape" ignore-style="true" />
<context ref="text_linebreak" />
<context ref="theLists" />
<context ref="markup" />
<context ref="blockPreproc" />
<context ref="setAttr" />
</include>
</context>
<context id="numberedListExplicit" extend-parent="false">
<start>^\s*([a-zA-Z1-9]+\.|[ixvIXV]+\))\s+(?=\S)</start>
<end>^\s*$</end>
<include>
<context sub-pattern="1" where="start" style-ref="list-identifier" />
<context ref="def:escape" ignore-style="true" />
<context ref="text_linebreak" />
<context ref="theLists" />
<context ref="markup" />
<context ref="blockPreproc" />
<context ref="setAttr" />
</include>
</context>
<context id="numberedListImplicit" extend-parent="false">
<start>^\s*(\.{1,5})\s+(?=\S)</start>
<end>^\s*$</end>
<include>
<context sub-pattern="1" where="start" style-ref="list-identifier" />
<context ref="def:escape" ignore-style="true" />
<context ref="text_linebreak" />
<context ref="theLists" />
<context ref="markup" />
<context ref="blockPreproc" />
<context ref="setAttr" />
</include>
</context>
<context id="labeledList" extend-parent="false" style-inside="false">
<start>^\s*(?!-\s|\*\s|\.{1,5}\s|[a-zA-Z1-9]+\.\s|[ixvIXV]+\)\s).*((?&lt;!:):{2,4}|(?&lt;!;);;)(\s|$)</start>
<end>^\s*$</end>
<include>
<context sub-pattern="0" where="start" style-ref="list-identifier" />
<context ref="def:escape" ignore-style="true" />
<context ref="theLists" />
<context ref="markup" />
<context ref="blockPreproc" />
<context ref="setAttr" />
</include>
</context>
<context id="listContinuator" end-parent="true" style-ref="list-identifier">
<match>^\+\s*$</match>
</context>
<context id="listBoundary" extend-parent="false">
<start>^--\s*$</start>
<end>^--\s*$</end>
<include>
<context sub-pattern="0" where="start" style-ref="list-identifier" />
<context sub-pattern="0" where="end" style-ref="list-identifier" />
<context ref="def:escape" ignore-style="true" />
<context ref="bulletedList" />
<context ref="numberedListExplicit" />
<context ref="numberedListImplicit" />
<context ref="labeledList" />
</include>
</context>
</include>
</context>
<!--
*******************************
* FINAL CONTEXT
*******************************
-->
<context id="asciidoc">
<include>
<context ref="def:escape" ignore-style="true" />
<context ref="blockMacro" />
<context ref="blockPreproc" />
<context ref="setAttr" />
<context ref="blockTitle" />
<context ref="theStyle" />
<context ref="oneLineAnchor" />
<context ref="theLists" />
<context ref="theBlocks" />
<context ref="title" />
<context ref="parIndented" />
<context ref="theTable" />
<context ref="rulerLine" />
<context ref="pageBreak" />
<context ref="paragraph" />
</include>
</context>
</definitions>
</language>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,329 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: P. F. Chimento <philip.chimento@gmail.com>
Copyright (C) 2011 P. F. Chimento <philip.chimento@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="automake" name="Automake" version="2.0" _section="Source">
<metadata>
<property name="globs">Makefile.am;GNUmakefile.am</property>
<property name="line-comment-start">#</property>
</metadata>
<!--
Early versions of this were based on Vim's Automake syntax highlighting
file. This language definition is for Automake's Makefile.am files. It is
based on the definition of Makefile, except it highlights Makefile variables
which are significant to Automake, as well as Autoconf-style @variable@
substitutions.
-->
<styles>
<style id="lhs" name="Automake Variable" map-to="def:identifier"/>
<style id="primary" name="Primary" map-to="def:type"/>
<style id="secondary" name="Secondary" map-to="def:statement"/>
<style id="prefix" name="Prefix" map-to="def:statement"/>
<style id="target" name="Optional Target" map-to="def:statement"/>
<style id="dirname" name="Built-in Target" map-to="def:statement"/>
<style id="keyword" name="Other Keyword" map-to="def:statement"/>
<style id="subst" name="Substitution" map-to="def:preprocessor"/>
</styles>
<definitions>
<!-- Allow substitutions on RHS of assignment -->
<replace id="makefile:assignment-rhs" ref="assignment-rhs"/>
<!-- Also allow substitutions in makefile's shell code -->
<replace id="makefile:command" ref="command"/>
<!-- Also allow substitutions in automake variable names, that's why the
@ is in here; as in libfoobar_@VERSION@_SOURCES -->
<define-regex id="variable">[A-Za-z0-9_@]+</define-regex>
<!-- What is allowed on a line before an Automake variable - no tabs! -->
<define-regex id="space">^ *</define-regex>
<!-- What must come after an Automake variable - one of the assignment
operators =, +=, ?=, := (Not sure what := does, but Webkit's GNUmakefile.am
uses it, for example -->
<define-regex id="operator">\s*[\+\?:]?=</define-regex>
<!-- Prefixes for primaries and secondaries -->
<define-regex id="prefix">(?:no)?dist|no(?:base|trans)</define-regex>
<!-- "Primaries", or the last component of Product List Variables -->
<define-regex id="primary" extended="true">
PROGRAMS|
(?:LT)?LIBRARIES|
LISP|
PYTHON|
JAVA|
SCRIPTS|
DATA|
HEADERS|
MANS|
TEXINFOS
</define-regex>
<!-- Non-directory installation targets -->
<define-regex id="target">noinst|check|EXTRA</define-regex>
<!-- The list of things that can go before "FLAGS" -->
<define-regex id="flags" extended="true">
C|
CCAS|
CPP|
CXX|
F|
GCJ|
JAVAC|
L|
LD|
LIBTOOL|
(?:[A-Z]+_)?LOG|
MAKEINFO(?:HTML)?|
OBJC|
R|
UPC|
VALA|
Y
</define-regex>
<!-- "Secondaries", or the last component of Product Source Variables -->
<define-regex id="secondary" extended="true">
AR|
DEPENDENCIES|
LDADD|
LIBADD|
LINK|
SHORTNAME|
SOURCES|
\%{flags}FLAGS
</define-regex>
<!-- Names of other Automake variables that aren't primaries, secondaries,
flags, or target directories -->
<define-regex id="keyword" extended="true">
ACLOCAL_AMFLAGS|
AM_DEFAULT_SOURCE_EXT|
AUTOMAKE_OPTIONS|
BUILT_SOURCES|
CC|
CLASSPATH_ENV|
(?:DIST|MAINTAINER|MOSTLY)?CLEANFILES|
COMPILE|
(?:CXX|FC|OBJC|UPC)(?:COMPILE|LINK)?|
DEFAULT_INCLUDES|
DEFS|
DISTCHECK_CONFIGURE_FLAGS|
DVIPS|
ETAGS_ARGS|
EXTRA_DIST|
F77(?:COMPILE)?|
FLINK|
INCLUDE|
JAVAC|
JAVAROOT|
LIBS|
LINK|
(?:[A-Z]+_)?LOG_COMPILER|
MAKEINFO(?:HTML)?|
(?:OMIT|TAGS)_DEPENDENCIES|
(?:DIST_)?SUBDIRS|
SUFFIXES|
(?:AM_)?TESTS_ENVIRONMENT|
TESTS|
TEXI2(?:DVI|PDF)|
TEXINFO_TEX|
VALAC
</define-regex>
<!-- Predefined directory targets -->
<define-regex id="dirname" extended="true">
s?bin|
(?:pkg)?lib(?:exec)?|
(?:pkg)?data|
(?:pkg|old)?include|
dataroot|
sysconf|
(?:shared|local)state|
doc|
info|
html|
dvi|
pdf|
ps|
lisp|
locale|
man[1-8]?(?:ext)?|
src|
(?:pkg)?python|
(?:pkg)?pyexec
</define-regex>
<!-- Substitutions from AC_SUBST -->
<context id="subst" style-ref="subst">
<match>@\%{variable}@</match>
</context>
<!-- Lines starting with ## are not copied into Makefile.in, and no
substitutions are performed -->
<context id="nosubcomment" end-at-line-end="true" class-disabled="no-spell-check">
<start>^##</start>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<!-- Copy of def:shell-like-comment, except it includes substitutions -->
<context id="comment" end-at-line-end="true" class-disabled="no-spell-check">
<start>#</start>
<include>
<context ref="subst"/>
<context ref="def:in-comment"/>
</include>
</context>
<!-- Assignment to a FLAGS variable -->
<context id="flags-assignment" end-at-line-end="true">
<start>\%{space}((?:AM_)?\%{flags}FLAGS)\%{operator}</start>
<include>
<context sub-pattern="1" where="start" style-ref="keyword"/>
<context ref="assignment-rhs"/>
</include>
</context>
<!-- Assignment to a non-primary, secondary, flags, or dir variable -->
<context id="keyword-assignment" end-at-line-end="true">
<start>\%{space}(\%{keyword})\%{operator}</start>
<include>
<context sub-pattern="1" where="start" style-ref="keyword"/>
<context ref="assignment-rhs"/>
</include>
</context>
<!-- Assignment to a primary. The subpatterns are named. Subpattern names
must not conflict subpattern names in other expressions, so some are
prefixed with a 'p' -->
<context id="primary-assignment" end-at-line-end="true">
<start extended="true">
\%{space} # beginning of line
(?P&lt;pprefix&gt;(?:\%{prefix}_)*) # any number of prefixes_
(?: # either...
(?P&lt;target&gt;\%{target})| # ...a nondir target (e.g. noinst),
(?P&lt;dirname&gt;\%{dirname})| # ...a dir target (e.g. bin)
(?P&lt;pvariable&gt;\%{variable}) # ...or a user-defined dir
)
(?P&lt;primary&gt;_\%{primary}) # and a _PRIMARY
\%{operator} # an assignment operator
</start>
<include>
<context sub-pattern="primary" where="start" style-ref="primary"/>
<context sub-pattern="pprefix" where="start" style-ref="prefix"/>
<context sub-pattern="target" where="start" style-ref="target"/>
<context sub-pattern="dirname" where="start" style-ref="dirname"/>
<context sub-pattern="pvariable" where="start" style-ref="lhs"/>
<context ref="assignment-rhs"/>
</include>
</context>
<!-- Assignment to a secondary. Again, some subpatterns have to be prefixed
with an 's' -->
<context id="secondary-assignment" end-at-line-end="true">
<start extended="true">
\%{space} # beginning of line
(?P&lt;sprefix&gt;
(?:(?:\%{prefix}|EXTRA)_)*) # any number of prefix_ or EXTRA_
(?P&lt;svariable&gt;\%{variable}) # the canonicalized_program_name
(?P&lt;secondary&gt;_\%{secondary}) # and a _SECONDARY
\%{operator} # an assignment operator
</start>
<include>
<context sub-pattern="sprefix" where="start" style-ref="prefix"/>
<context sub-pattern="svariable" where="start" style-ref="lhs"/>
<context sub-pattern="secondary" where="start" style-ref="secondary"/>
<context ref="assignment-rhs"/>
</include>
</context>
<!-- Assignment to a directory variable (e.g. foobardir) -->
<context id="dir-assignment" end-at-line-end="true">
<start>\%{space}(\%{variable})(dir)\%{operator}</start>
<include>
<context id="dir-lhs" sub-pattern="1" where="start" style-ref="lhs"/>
<context id="dir" sub-pattern="2" where="start" style-ref="keyword"/>
<context ref="assignment-rhs"/>
</include>
</context>
<!-- What is allowed on the right-hand side of an assignment -->
<context id="assignment-rhs" end-at-line-end="true">
<start></start>
<include>
<context ref="def:line-continue"/>
<context ref="def:shell-like-comment"/>
<context ref="makefile:variable"/>
<context ref="makefile:string"/>
<context ref="def:single-quoted-string"/>
<context ref="sh:backtick-subshell"/>
<context ref="subst"/>
</include>
</context>
<!-- Copy of makefile:command, except it includes substitutions -->
<context id="command" extend-parent="false" end-at-line-end="true">
<start></start>
<include>
<context ref="def:line-continue"/>
<context ref="subst"/>
<context ref="sh:sh" original="true"/>
</include>
</context>
<!-- All the contexts listed here represent an assignment to a variable
(Automake variable or otherwise), and they all contain the "assignment-rhs"
context -->
<context id="assignment">
<include>
<context ref="flags-assignment"/>
<context ref="keyword-assignment"/>
<context ref="primary-assignment"/>
<context ref="secondary-assignment"/>
<context ref="dir-assignment"/>
<context ref="makefile:assignment"/>
</include>
</context>
<!-- The main context -->
<context id="automake">
<include>
<context ref="makefile:directives" style-ref="def:keyword"/>
<context ref="makefile:functions" style-ref="def:function"/>
<context ref="subst" style-ref="subst"/>
<!-- Must come before 'comment' -->
<context ref="nosubcomment" style-ref="def:comment"/>
<context ref="comment" style-ref="def:comment"/>
<context ref="assignment"/>
<!-- Must come after 'comment', otherwise we can get rules starting
with #; must also come after 'assignment' because of := operator -->
<context ref="makefile:rule"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Paolo Borelli <pborelli@gnome.org>
Copyright (C) 2007 Paolo Borelli
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="awk" name="awk" version="2.0" _section="Script">
<metadata>
<property name="mimetypes">application/x-awk</property>
<property name="globs">*.awk</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="pattern" name="Pattern" map-to="def:preprocessor"/>
<style id="variable" name="Variable" map-to="def:identifier"/>
<style id="builtin-function" name="Builtin Function" map-to="def:builtin"/>
</styles>
<definitions>
<context id="keywords" style-ref="keyword">
<keyword>break</keyword>
<keyword>continue</keyword>
<keyword>do</keyword>
<keyword>delete</keyword>
<keyword>else</keyword>
<keyword>exit</keyword>
<keyword>for</keyword>
<keyword>function</keyword>
<keyword>getline</keyword>
<keyword>if</keyword>
<keyword>next</keyword>
<keyword>nextfile</keyword>
<keyword>print</keyword>
<keyword>printf</keyword>
<keyword>return</keyword>
<keyword>while</keyword>
</context>
<context id="patterns" style-ref="pattern">
<keyword>BEGIN</keyword>
<keyword>END</keyword>
</context>
<context id="variables" style-ref="variable">
<keyword>ARGC</keyword>
<keyword>ARGV</keyword>
<keyword>FILENAME</keyword>
<keyword>FNR</keyword>
<keyword>FS</keyword>
<keyword>NF</keyword>
<keyword>NR</keyword>
<keyword>OFMT</keyword>
<keyword>OFS</keyword>
<keyword>ORS</keyword>
<keyword>RLENGTH</keyword>
<keyword>RS</keyword>
<keyword>RSTART</keyword>
<keyword>SUBSEP</keyword>
<keyword>ARGIND</keyword>
<keyword>BINMODE</keyword>
<keyword>CONVFMT</keyword>
<keyword>ENVIRON</keyword>
<keyword>ERRNO</keyword>
<keyword>FIELDWIDTHS</keyword>
<keyword>IGNORECASE</keyword>
<keyword>LINT</keyword>
<keyword>PROCINFO</keyword>
<keyword>RT</keyword>
<keyword>RLENGTH</keyword>
<keyword>TEXTDOMAIN</keyword>
</context>
<context id="built-in-functions" style-ref="builtin-function">
<keyword>gsub</keyword>
<keyword>index</keyword>
<keyword>length</keyword>
<keyword>match</keyword>
<keyword>split</keyword>
<keyword>sprintf</keyword>
<keyword>sub</keyword>
<keyword>substr</keyword>
<keyword>tolower</keyword>
<keyword>toupper</keyword>
</context>
<context id="arithmetic-functions" style-ref="builtin-function">
<keyword>atan2</keyword>
<keyword>cos</keyword>
<keyword>exp</keyword>
<keyword>int</keyword>
<keyword>log</keyword>
<keyword>rand</keyword>
<keyword>sin</keyword>
<keyword>sqrt</keyword>
<keyword>srand</keyword>
</context>
<context id="field-variable" style-ref="variable">
<match>\$\d+</match>
</context>
<context id="awk">
<include>
<context ref="def:shebang"/>
<context ref="def:shell-like-comment"/>
<context ref="def:string"/>
<context ref="keywords"/>
<context ref="patterns"/>
<context ref="variables"/>
<context ref="field-variable"/>
<context ref="built-in-functions"/>
<context ref="arithmetic-functions"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,266 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Authors: Oscar Torrent Artero, Joseba García Etxebarria
Copyright (C) 2009 Oscar Torrent Artero <q2dg@yahoo.es>
Copyright (C) 2010 Joseba García Etxebarria <joseba.gar@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="bennugd" name="BennuGD" version="2.0" _section="Source">
<metadata>
<property name="globs">*.prg</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="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="identifier" name="Identifier" map-to="def:identifier"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="keywords" name="Keyword" map-to="def:keyword"/>
<style id="types" name="Data Type" map-to="def:type"/>
<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:base-n-integer"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
</styles>
<default-regex-options case-sensitive="false" />
<definitions>
<!--regexs-->
<define-regex id="symbolchar">[-!+\\|=:&amp;&gt;&lt;]</define-regex>
<define-regex id="preproc-start">^\s*#\s*</define-regex>
<!--Preprocessor -->
<context id="preprocessor" style-ref="preprocessor" end-at-line-end="true">
<start extended="true">
\%{preproc-start}
(define|if(n?def)?|else|elsif|endif)
\b
</start>
<include>
<context ref="def:line-continue" ignore-style="true"/>
<context ref="c:string" ignore-style="true"/>
<context ref="def:c-like-comment"/>
<context ref="def:c-like-comment-multiline"/>
</include>
</context>
<context id="boolean" style-ref="boolean">
<keyword>false</keyword>
<keyword>true</keyword>
</context>
<context id="float" style-ref="floating-point">
<match extended="true">
(?&lt;![\w\.])
([0-9]+[Ee][+-]?[0-9]+ |
([0-9]*\.[0-9]+ | [0-9]+\.[0-9]*)([Ee][+-]?[0-9]+)?)
(?![\w\.])
</match>
</context>
<context id="decimal-number" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
[+-]?([1-9][0-9]*|0)
(?![\w\.])
</match>
</context>
<context id="hexadecimal-number" style-ref="hexadecimal">
<match extended="true">
(?&lt;![\w\.])
[+-]?0x[0-9a-fA-F]+
(?![\w\.])
</match>
</context>
<!--Keywords -->
<context id="keywords" style-ref="keywords">
<keyword>begin</keyword>
<keyword>break</keyword>
<keyword>call</keyword>
<keyword>case</keyword>
<keyword>clone</keyword>
<keyword>const</keyword>
<keyword>continue</keyword>
<keyword>debug</keyword>
<keyword>declare</keyword>
<keyword>default</keyword>
<keyword>dup</keyword>
<keyword>elif</keyword>
<keyword>else</keyword>
<keyword>elseif</keyword>
<keyword>elsif</keyword>
<keyword>end</keyword>
<keyword>error</keyword>
<keyword>exit</keyword>
<keyword>for</keyword>
<keyword>frame</keyword>
<keyword>from</keyword>
<keyword>function</keyword>
<keyword>global</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>import</keyword>
<keyword>include</keyword>
<keyword>jmp</keyword>
<keyword>local</keyword>
<keyword>loop</keyword>
<keyword>mod</keyword>
<keyword>mouse</keyword>
<keyword>next</keyword>
<keyword>offset</keyword>
<keyword>on</keyword>
<keyword>onerror</keyword>
<keyword>onexit</keyword>
<keyword>private</keyword>
<keyword>process</keyword>
<keyword>program</keyword>
<keyword>public</keyword>
<keyword>repeat</keyword>
<keyword>resume</keyword>
<keyword>return</keyword>
<keyword>sizeof</keyword>
<keyword>step</keyword>
<keyword>switch</keyword>
<keyword>to</keyword>
<keyword>until</keyword>
<keyword>while</keyword>
</context>
<context id="globals" style-ref="keywords">
<keyword>argc</keyword>
<keyword>argv</keyword>
<keyword>os_id</keyword>
</context>
<context id="locals" style-ref="keywords">
<keyword>bigbro</keyword>
<keyword>father</keyword>
<keyword>frame_percent</keyword>
<keyword>id</keyword>
<keyword>process_type</keyword>
<keyword>reserved</keyword>
<keyword>reserved.frame_percent</keyword>
<keyword>reserved.process_type</keyword>
<keyword>reserved.saved_priority</keyword>
<keyword>reserved.saved_status</keyword>
<keyword>reserved.status</keyword>
<keyword>saved_priority</keyword>
<keyword>saved_status</keyword>
<keyword>smallbro</keyword>
<keyword>status</keyword>
<keyword>son</keyword>
</context>
<context id="operators" style-ref="operator" extend-parent="false">
<prefix>(?&lt;!\%{symbolchar})</prefix>
<suffix>(?!\%{symbolchar})</suffix>
<keyword>==</keyword>
<keyword>!=</keyword>
<keyword>!</keyword>
<keyword>&lt;</keyword>
<keyword>&gt;</keyword>
<keyword>&lt;=</keyword>
<keyword>&gt;=</keyword>
<keyword>&amp;&amp;</keyword>
<keyword>&amp;</keyword>
<keyword>=</keyword>
<keyword>||</keyword>
<keyword>|</keyword>
<keyword>^^</keyword>
<keyword>^</keyword>
</context>
<context id="types" style-ref="types">
<keyword>byte</keyword>
<keyword>char</keyword>
<keyword>dword</keyword>
<keyword>float</keyword>
<keyword>int</keyword>
<keyword>pointer</keyword>
<keyword>short</keyword>
<keyword>signed</keyword>
<keyword>string</keyword>
<keyword>struct</keyword>
<keyword>type</keyword>
<keyword>unsigned</keyword>
<keyword>word</keyword>
</context>
<context id="commonmacros" style-ref="preprocessor">
<keyword>COMPILER_VERSION</keyword>
<keyword>__DATE__</keyword>
<keyword>__FILE__</keyword>
<keyword>__LINE__</keyword>
<keyword>max_byte</keyword>
<keyword>max_dword</keyword>
<keyword>max_int</keyword>
<keyword>max_sbyte</keyword>
<keyword>max_short</keyword>
<keyword>max_word</keyword>
<keyword>min_byte</keyword>
<keyword>min_dword</keyword>
<keyword>min_int</keyword>
<keyword>min_sbyte</keyword>
<keyword>min_short</keyword>
<keyword>min_word</keyword>
<keyword>null</keyword>
<keyword>os_beos</keyword>
<keyword>os_bsd</keyword>
<keyword>os_dc</keyword>
<keyword>os_gp32</keyword>
<keyword>os_linux</keyword>
<keyword>os_macos</keyword>
<keyword>os_win32</keyword>
<keyword>status_dead</keyword>
<keyword>status_frozen</keyword>
<keyword>status_killed</keyword>
<keyword>status_running</keyword>
<keyword>status_sleeping</keyword>
<keyword>status_waiting</keyword>
<keyword>__TIME__ </keyword>
<keyword>__VERSION__</keyword>
</context>
<context id="bennugd" class="no-spell-check">
<include>
<context ref="def:c-like-comment"/>
<context ref="def:c-like-comment-multiline"/>
<context ref="def:c-like-close-comment-outside-comment"/>
<context ref="preprocessor"/>
<context ref="c:string"/>
<context ref="c:char"/>
<context ref="boolean"/>
<context ref="float"/>
<context ref="decimal-number"/>
<context ref="hexadecimal-number"/>
<context ref="keywords"/>
<context ref="globals"/>
<context ref="locals"/>
<context ref="operators"/>
<context ref="types"/>
<context ref="commonmacros"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,120 @@
<?xml version="1.0"?>
<!--
This file is part of GtkSourceView
Author: Søren Hauberg <hauberg@gmail.com>
Copyright (C) 2009 Søren Hauberg <hauberg@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="bibtex" name="BibTeX" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">text/x-bibtex</property>
<property name="globs">*.bib</property>
<property name="line-comment-start">%</property>
</metadata>
<styles>
<style id="entry-type" name="Entries" map-to="def:keyword"/>
<style id="field" name="Field" map-to="def:identifier"/>
<style id="string" name="String" map-to="def:string"/>
</styles>
<default-regex-options case-sensitive="false"/>
<definitions>
<context id="entry-type" style-ref="entry-type" class="no-spell-check">
<prefix>@</prefix>
<keyword>article</keyword>
<keyword>book</keyword>
<keyword>booklet</keyword>
<keyword>conference</keyword>
<keyword>inbook</keyword>
<keyword>incollection</keyword>
<keyword>inproceedings</keyword>
<keyword>lambda</keyword>
<keyword>manual</keyword>
<keyword>mastersthesis</keyword>
<keyword>misc</keyword>
<keyword>online</keyword>
<keyword>phdthesis</keyword>
<keyword>proceedings</keyword>
<keyword>report</keyword>
<keyword>techreport</keyword>
<keyword>unpublished</keyword>
</context>
<context id="field" style-ref="field" class="no-spell-check">
<keyword>address</keyword>
<keyword>author</keyword>
<keyword>booktitle</keyword>
<keyword>chapter</keyword>
<keyword>crossref</keyword>
<keyword>doi</keyword>
<keyword>edition</keyword>
<keyword>editor</keyword>
<keyword>eprint</keyword>
<keyword>eprinttype</keyword>
<keyword>howpublished</keyword>
<keyword>institution</keyword>
<keyword>isbn</keyword>
<keyword>issn</keyword>
<keyword>journal</keyword>
<keyword>key</keyword>
<keyword>keywords</keyword>
<keyword>language</keyword>
<keyword>location</keyword>
<keyword>month</keyword>
<keyword>note</keyword>
<keyword>number</keyword>
<keyword>numpages</keyword>
<keyword>organization</keyword>
<keyword>pages</keyword>
<keyword>publisher</keyword>
<keyword>school</keyword>
<keyword>series</keyword>
<keyword>subtitle</keyword>
<keyword>title</keyword>
<keyword>type</keyword>
<keyword>url</keyword>
<keyword>urldate</keyword>
<keyword>volume</keyword>
<keyword>year</keyword>
</context>
<context id="string" class-disabled="no-spell-check">
<match extended="true">
=\s*(\{.*?\})|(".*?")
</match>
<include>
<context sub-pattern="1" style-ref="string" class="string"/>
<context sub-pattern="2" style-ref="string" class="string"/>
</include>
</context>
<context id="bibtex">
<include>
<context ref="latex:latex"/>
<context ref="entry-type"/>
<context ref="field"/>
<context ref="string"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,187 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Author: Philip Withnall
Copyright (C) 2012 Philip Withnall
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="bluespec" name="Bluespec SystemVerilog" version="2.0" _section="Source">
<metadata>
<property name="globs">*.bsv</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<style id="system-task" name="System Task" map-to="def:keyword"/>
<style id="annotation" name="Annotation" map-to="def:function"/>
<style id="attribute" name="Attribute" map-to="def:type"/>
<style id="import-bvi" name="Import BVI" map-to="def:keyword"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="type" name="Type" map-to="def:type"/>
</styles>
<definitions>
<context id="system-task" style-ref="system-task">
<prefix>\$</prefix>
<keyword>display</keyword>
<keyword>dumpoff</keyword>
<keyword>dumpon</keyword>
<keyword>dumpvars</keyword>
<keyword>fclose</keyword>
<keyword>fdisplay</keyword>
<keyword>fflush</keyword>
<keyword>fgetc</keyword>
<keyword>finish</keyword>
<keyword>fopen</keyword>
<keyword>fwrite</keyword>
<keyword>stime</keyword>
<keyword>stop</keyword>
<keyword>test\$plusargs</keyword>
<keyword>time</keyword>
<keyword>ungetc</keyword>
<keyword>write</keyword>
</context>
<define-regex id="attributes-names" extended="true">
always_enabled|
always_ready|
CLK|
descending_urgency|
doc|
enable|
fire_when_enabled|
no_implicit_conditions|
noinline|
port|
preempts|
prefix|
ready|
result|
RST_N|
synthesize
</define-regex>
<context id="annotation" style-ref="annotation">
<start>\(\*\s*(\%{attributes-names})</start>
<end>\*\)</end>
<include>
<context sub-pattern="1" where="start" style-ref="attribute"/>
<context ref="verilog:string"/>
</include>
</context>
<context id="import-bvi" style-ref="import-bvi">
<keyword>ancestor</keyword>
<keyword>clocked_by</keyword>
<keyword>default_clock</keyword>
<keyword>default_reset</keyword>
<keyword>enable</keyword>
<keyword>input_clock</keyword>
<keyword>input_reset</keyword>
<keyword>method</keyword>
<keyword>no_reset</keyword>
<keyword>output_clock</keyword>
<keyword>output_reset</keyword>
<keyword>parameter</keyword>
<keyword>path</keyword>
<keyword>port</keyword>
<keyword>ready</keyword>
<keyword>reset_by</keyword>
<keyword>same_family</keyword>
<keyword>schedule</keyword>
</context>
<context id="keyword" style-ref="keyword">
<keyword>action</keyword>
<keyword>clocked_by</keyword>
<keyword>deriving</keyword>
<keyword>endaction</keyword>
<keyword>endfunction</keyword>
<keyword>endinterface</keyword>
<keyword>endmethod</keyword>
<keyword>endmodule</keyword>
<keyword>endpackage</keyword>
<keyword>endrule</keyword>
<keyword>endrules</keyword>
<keyword>enum</keyword>
<keyword>function</keyword>
<keyword>if</keyword>
<keyword>import</keyword>
<keyword>interface</keyword>
<keyword>let</keyword>
<keyword>match</keyword>
<keyword>method</keyword>
<keyword>module</keyword>
<keyword>numeric</keyword>
<keyword>package</keyword>
<keyword>provisos</keyword>
<keyword>reset_by</keyword>
<keyword>rule</keyword>
<keyword>rules</keyword>
<keyword>struct</keyword>
<keyword>tagged</keyword>
<keyword>type</keyword>
<keyword>typedef</keyword>
<keyword>union</keyword>
</context>
<context id="type" style-ref="type">
<keyword>Action</keyword>
<keyword>ActionValue</keyword>
<keyword>Bit</keyword>
<keyword>Bool</keyword>
<keyword>int</keyword>
<keyword>Int</keyword>
<keyword>Integer</keyword>
<keyword>Maybe</keyword>
<keyword>Nat</keyword>
<keyword>Rules</keyword>
<keyword>String</keyword>
<keyword>Tuple[2-7]</keyword>
<keyword>UInt</keyword>
</context>
<context id="standard-interface" style-ref="type">
<keyword>Client</keyword>
<keyword>ClientServer</keyword>
<keyword>Connectable</keyword>
<keyword>FIFO</keyword>
<keyword>FIFOF</keyword>
<keyword>Get</keyword>
<keyword>GetPut</keyword>
<keyword>PulseWire</keyword>
<keyword>Put</keyword>
<keyword>Reg</keyword>
<keyword>Server</keyword>
<keyword>Wire</keyword>
</context>
<context id="bluespec" class="no-spell-check">
<include>
<context ref="system-task"/>
<context ref="annotation"/>
<context ref="import-bvi"/>
<context ref="keyword"/>
<context ref="type"/>
<context ref="standard-interface"/>
<!-- Bluespec includes Verilog as a subset -->
<context ref="verilog:verilog"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,256 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Sebastian Dröge <slomo@circular-chaos.org>
Copyright (C) 2006 Sebastian Dröge <slomo@circular-chaos.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="boo" name="Boo" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-boo</property>
<property name="globs">*.boo</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="multiline-string" name="Multiline string" map-to="def:string"/>
<style id="string" name="String" map-to="def:string"/>
<style id="regex" name="Regular Expression" map-to="def:string"/>
<style id="namespace" name="Namespace" map-to="def:preprocessor"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="definition" name="Definition" map-to="def:keyword"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="special-variable" name="Special Variable" map-to="def:identifier"/>
<style id="null-value" name="Null Value" map-to="def:special-constant"/>
<style id="boolean" name="Boolean" map-to="def:boolean"/>
<style id="number" name="Number" map-to="def:number"/>
<style id="builtin" name="Builtin Function" map-to="def:builtin"/>
</styles>
<definitions>
<context id="c-style-line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>//</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="block-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="multiline-string" style-ref="multiline-string" class="string" class-disabled="no-spell-check">
<start>"""</start>
<end>"""</end>
<include>
<context ref="def:escape"/>
</include>
</context>
<context id="double-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="single-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="regex" style-ref="regex" end-at-line-end="true">
<start>/(?!/)</start>
<end>/</end>
</context>
<context id="namespace" style-ref="namespace">
<keyword>as</keyword>
<keyword>from</keyword>
<keyword>import</keyword>
<keyword>namespace</keyword>
</context>
<context id="primitives" style-ref="type">
<keyword>bool</keyword>
<keyword>byte</keyword>
<keyword>char</keyword>
<keyword>date</keyword>
<keyword>decimal</keyword>
<keyword>double</keyword>
<keyword>duck</keyword>
<keyword>float</keyword>
<keyword>int</keyword>
<keyword>long</keyword>
<keyword>object</keyword>
<keyword>operator</keyword>
<keyword>regex</keyword>
<keyword>sbyte</keyword>
<keyword>short</keyword>
<keyword>single</keyword>
<keyword>string</keyword>
<keyword>timespan</keyword>
<keyword>uint</keyword>
<keyword>ulong</keyword>
<keyword>ushort</keyword>
</context>
<context id="definitions" style-ref="definition">
<keyword>abstract</keyword>
<keyword>callable</keyword>
<keyword>class</keyword>
<keyword>constructor</keyword>
<keyword>def</keyword>
<keyword>destructor</keyword>
<keyword>do</keyword>
<keyword>enum</keyword>
<keyword>event</keyword>
<keyword>final</keyword>
<keyword>get</keyword>
<keyword>interface</keyword>
<keyword>internal</keyword>
<keyword>of</keyword>
<keyword>override</keyword>
<keyword>partial</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>return</keyword>
<keyword>set</keyword>
<keyword>static</keyword>
<keyword>struct</keyword>
<keyword>transient</keyword>
<keyword>virtual</keyword>
<keyword>yield</keyword>
</context>
<context id="keywords" style-ref="keyword">
<keyword>and</keyword>
<keyword>break</keyword>
<keyword>cast</keyword>
<keyword>continue</keyword>
<keyword>elif</keyword>
<keyword>else</keyword>
<keyword>ensure</keyword>
<keyword>except</keyword>
<keyword>for</keyword>
<keyword>given</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>isa</keyword>
<keyword>is</keyword>
<keyword>not</keyword>
<keyword>or</keyword>
<keyword>otherwise</keyword>
<keyword>pass</keyword>
<keyword>raise</keyword>
<keyword>ref</keyword>
<keyword>try</keyword>
<keyword>unless</keyword>
<keyword>when</keyword>
<keyword>while</keyword>
</context>
<context id="special-variables" style-ref="special-variable">
<keyword>self</keyword>
<keyword>super</keyword>
</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="numbers" style-ref="number">
<match extended="true">
(?&lt;![\w\.])
[0-9][0-9\.]*(m|ms|d|h|s|f|F|l|L)?
(?![\w\.])
</match>
</context>
<context id="builtins" style-ref="builtin">
<keyword>array</keyword>
<keyword>assert</keyword>
<keyword>checked</keyword>
<keyword>enumerate</keyword>
<keyword>__eval__</keyword>
<keyword>filter</keyword>
<keyword>getter</keyword>
<keyword>len</keyword>
<keyword>lock</keyword>
<keyword>map</keyword>
<keyword>matrix</keyword>
<keyword>max</keyword>
<keyword>min</keyword>
<keyword>normalArrayIndexing</keyword>
<keyword>print</keyword>
<keyword>property</keyword>
<keyword>range</keyword>
<keyword>rawArrayIndexing</keyword>
<keyword>required</keyword>
<keyword>__switch__</keyword>
<keyword>typeof</keyword>
<keyword>unchecked</keyword>
<keyword>using</keyword>
<keyword>yieldAll</keyword>
<keyword>zip</keyword>
</context>
<context id="boo" class="no-spell-check">
<include>
<context ref="def:shell-like-comment"/>
<context ref="c-style-line-comment"/>
<context ref="block-comment"/>
<context ref="multiline-string"/>
<context ref="double-quoted-string"/>
<context ref="single-quoted-string"/>
<context ref="regex"/>
<context ref="namespace"/>
<context ref="primitives"/>
<context ref="definitions"/>
<context ref="keywords"/>
<context ref="special-variables"/>
<context ref="null-value"/>
<context ref="boolean"/>
<context ref="numbers"/>
<context ref="builtins"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,343 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Marco Barisione, Emanuele Aina
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="c" name="C" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-c;text/x-csrc;image/x-xpixmap</property>
<property name="globs">*.c</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="string" name="String" map-to="def:string"/>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="common-defines" name="Common Defines" map-to="def:special-constant"/>
<style id="included-file" name="Included File" map-to="def:string"/>
<style id="char" name="Character" map-to="def:character"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="storage-class" name="Storage Class" map-to="def:type"/>
<style id="printf" name="printf Conversion" map-to="def:special-char"/>
<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="octal" name="Octal number" map-to="def:base-n-integer"/>
<style id="hexadecimal" name="Hexadecimal number" map-to="def:base-n-integer"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="standard-stream" name="Standard stream" map-to="def:constant"/>
<style id="signal-name" name="Signal name" map-to="def:constant"/>
<style id="error" name="Error" map-to="def:error"/>
</styles>
<definitions>
<!--regexs-->
<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>
<!--contexts NOT used on the main context-->
<!-- TODO: what about scanf ? -->
<!-- man 3 printf -->
<context id="printf" style-ref="printf" extend-parent="false">
<match extended="true">
\%\%|\%
(?:[1-9][0-9]*\$)? # argument
[#0\-\ \+\'I]* # flags
(?:[1-9][0-9]*|\*)? # width
(?:\.\-?(?:[0-9]+|\*))? # precision
(?:hh|ll|[hlLqjzt])? # length modifier
[diouxXeEfFgGaAcsCSpnm] # conversion specifier
</match>
</context>
<!--contexts used on the main context-->
<!-- Preprocessor -->
<context id="if0-comment" style-ref="comment">
<start>\%{preproc-start}if\b\s*0\b</start>
<end>\%{preproc-start}(endif|else|elif)\b</end>
<include>
<context id="if-in-if0">
<start>\%{preproc-start}if(n?def)?\b</start>
<end>\%{preproc-start}endif\b</end>
<include>
<context ref="if-in-if0"/>
<context ref="def:in-comment"/>
</include>
</context>
<context ref="def:in-comment"/>
</include>
</context>
<context id="include" style-ref="preprocessor">
<match extended="true">
\%{preproc-start}
(include|import)\s*
(".*?"|&lt;.*&gt;)
</match>
<include>
<context id="included-file" sub-pattern="2" style-ref="included-file" class="path"/>
</include>
</context>
<context id="preprocessor" style-ref="preprocessor" end-at-line-end="true">
<start extended="true">
\%{preproc-start}
(define|undef|error|pragma|ident|if(n?def)?|else|elif|endif|line|warning)
\b
</start>
<include>
<context ref="def:line-continue" ignore-style="true"/>
<context ref="string" ignore-style="true"/>
<context ref="def:c-like-comment"/>
<context ref="def:c-like-comment-multiline"/>
</include>
</context>
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>L?"</start>
<end>"</end>
<include>
<context ref="printf"/>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
<context ref="def:line-continue"/>
</include>
</context>
<context id="char" style-ref="char" class="string">
<match>L?'(\%{escaped-character}|.)'</match>
</context>
<!-- http://www.lysator.liu.se/c/ANSI-C-grammar-l.html -->
<context id="float" style-ref="floating-point">
<match extended="true">
(?&lt;![\w\.])
((\.[0-9]+ | [0-9]+\.[0-9]*) ([Ee][+-]?[0-9]*)? |
([0-9]+[Ee][+-]?[0-9]*))
[fFlL]?
(?![\w\.])
</match>
</context>
<context id="hexadecimal" style-ref="hexadecimal">
<match extended="true">
(?&lt;![\w\.])
0[xX][a-fA-F0-9]+[uUlL]*
(?![\w\.])
</match>
</context>
<context id="invalid-hexadecimal" style-ref="error">
<match extended="true">
(?&lt;![\w\.])
0[xX][a-fA-F0-9]*[g-zG-Z][a-zA-Z0-9]*[uUlL]*
(?![\w\.])
</match>
</context>
<context id="octal" style-ref="octal">
<match extended="true">
(?&lt;![\w\.])
0[0-7]+[uUlL]*
(?![\w\.])
</match>
</context>
<context id="invalid-octal" style-ref="error">
<match extended="true">
(?&lt;![\w\.])
0[0-7]*[89][0-9]*[uUlL]*
(?![\w\.])
</match>
</context>
<context id="decimal" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
(0|[1-9][0-9]*)[uUlL]*
(?![\w\.])
</match>
</context>
<context id="keywords" style-ref="keyword">
<keyword>asm</keyword>
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>enum</keyword>
<keyword>for</keyword>
<keyword>fortran</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>return</keyword>
<keyword>struct</keyword>
<keyword>switch</keyword>
<keyword>typedef</keyword>
<keyword>union</keyword>
<keyword>while</keyword>
</context>
<context id="operators" style-ref="operator">
<keyword>(_A|a)lignof</keyword>
<keyword>_Generic</keyword>
<keyword>offsetof</keyword>
<keyword>(_S|s)tatic_assert</keyword>
<keyword>sizeof</keyword>
<keyword>typeof</keyword>
</context>
<context id="types" style-ref="type">
<keyword>_Bool</keyword>
<keyword>_Complex</keyword>
<keyword>_Imaginary</keyword>
<keyword>bool</keyword>
<keyword>char</keyword>
<keyword>char(16|32)_t</keyword>
<keyword>double(_t)?</keyword>
<keyword>float(_t)?</keyword>
<keyword>int</keyword>
<keyword>(u)?int(_least|_fast)?(8|16|32|64)_t</keyword>
<keyword>(u)?intmax_t</keyword>
<keyword>(u)?intptr_t</keyword>
<keyword>long</keyword>
<keyword>ptrdiff_t</keyword>
<keyword>off(64)?_t</keyword>
<keyword>short</keyword>
<keyword>signed</keyword>
<keyword>size_t</keyword>
<keyword>ssize_t</keyword>
<keyword>unsigned</keyword>
<keyword>void</keyword>
<keyword>wchar_t</keyword>
<keyword>wint_t</keyword>
</context>
<context id="storage-class" style-ref="storage-class">
<keyword>(_A|a)lignas</keyword>
<keyword>_Atomic</keyword>
<keyword>(_N|n)oreturn</keyword>
<keyword>(_T|t)hread_local</keyword>
<keyword>auto</keyword>
<keyword>const</keyword>
<keyword>extern</keyword>
<keyword>inline</keyword>
<keyword>register</keyword>
<keyword>restrict</keyword>
<keyword>static</keyword>
<keyword>volatile</keyword>
</context>
<!-- C99 booleans -->
<context id="boolean" style-ref="boolean">
<keyword>true</keyword>
<keyword>false</keyword>
</context>
<context id="common-defines" style-ref="common-defines">
<keyword>NULL</keyword>
<keyword>MAX</keyword>
<keyword>MIN</keyword>
<keyword>TRUE</keyword>
<keyword>FALSE</keyword>
<keyword>__LINE__</keyword>
<keyword>__DATA__</keyword>
<keyword>__FILE__</keyword>
<keyword>__func__</keyword>
<keyword>__TIME__</keyword>
<keyword>__STDC__</keyword>
</context>
<context id="standard-streams" style-ref="standard-stream">
<keyword>stdin</keyword>
<keyword>stdout</keyword>
<keyword>stderr</keyword>
</context>
<context id="signals" style-ref="signal-name">
<keyword>SIGABRT</keyword>
<keyword>SIGALRM</keyword>
<keyword>SIGCHLD</keyword>
<keyword>SIGCONT</keyword>
<keyword>SIGFPE</keyword>
<keyword>SIGHUP</keyword>
<keyword>SIGILL</keyword>
<keyword>SIGINT</keyword>
<keyword>SIGKILL</keyword>
<keyword>SIGPIPE</keyword>
<keyword>SIGQUIT</keyword>
<keyword>SIGSEGV</keyword>
<keyword>SIGSTOP</keyword>
<keyword>SIGTERM</keyword>
<keyword>SIGTRAP</keyword>
<keyword>SIGTSTP</keyword>
<keyword>SIGTTIN</keyword>
<keyword>SIGTTOU</keyword>
<keyword>SIGUSR1</keyword>
<keyword>SIGUSR2</keyword>
</context>
<!--Main context-->
<context id="c" class="no-spell-check">
<include>
<context ref="gtk-doc:inline-docs-section"/>
<context ref="def:c-like-comment" style-ref="comment"/>
<context ref="def:c-like-comment-multiline" style-ref="comment"/>
<context ref="def:c-like-close-comment-outside-comment" style-ref="comment"/>
<context ref="if0-comment"/>
<context ref="include"/>
<context ref="preprocessor"/>
<context ref="string"/>
<context ref="char"/>
<context ref="float"/>
<context ref="hexadecimal"/>
<context ref="invalid-hexadecimal"/>
<context ref="octal"/>
<context ref="invalid-octal"/>
<context ref="decimal"/>
<context ref="keywords"/>
<context ref="operators"/>
<context ref="types"/>
<context ref="storage-class"/>
<context ref="boolean"/>
<context ref="common-defines"/>
<context ref="standard-streams"/>
<context ref="signals"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,231 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Jesse van den Kieboom <jessevdk@gnome.org>
Copyright (C) 2010 Jesse van den Kieboom <jessevdk@gnome.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="cg" _name="CG Shader Language" version="2.0" _section="Source">
<metadata>
<property name="globs">*.cg</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="error" name="Error" map-to="def:error"/>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="bindings" name="Bindings" map-to="def:special-constant"/>
<style id="included-file" name="Included File" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="storage-class" name="Storage Class" map-to="def:builtin"/>
<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="octal" name="Octal number" map-to="def:base-n-integer"/>
<style id="hexadecimal" name="Hexadecimal number" map-to="def:base-n-integer"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="swizzle" name="Swizzle operator" map-to="def:operator"/>
<style id="function" name="Function" map-to="def:function"/>
<style id="builtin" name="Builtin" map-to="def:preprocessor"/>
</styles>
<definitions>
<!-- http://en.wikipedia.org/wiki/C_syntax#Strings -->
<define-regex id="escaped-character" extended="true">
\\( # leading backslash
[\\\"\'nrtfav\?e] | # escaped character
[0-7]{1,3} | # one, two, or three octal digits
x[0-9A-Fa-f]{0,2} # 'x' followed by zero, one, or two hex digits
)
</define-regex>
<context id="cg" class="no-spell-check">
<include>
<!-- Comments -->
<context id="comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>//</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="comment-multiline" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<!-- Preprocessor -->
<define-regex id="preproc-start">^\s*#\s*</define-regex>
<context id="include" style-ref="preprocessor">
<match extended="true">
\%{preproc-start}
(include|import)\s*
(".*?"|&lt;.*&gt;)
</match>
<include>
<context id="included-file" sub-pattern="2" style-ref="included-file"/>
</include>
</context>
<!-- http://www.lysator.liu.se/c/ANSI-C-grammar-l.html -->
<context id="float" style-ref="floating-point">
<match extended="true">
(?&lt;![\w\.])
((\.[0-9]+ | [0-9]+\.[0-9]*) ([Ee][+-]?[0-9]*)? |
([0-9]+[Ee][+-]?[0-9]*))
[fFlL]?
(?![\w\.])
</match>
</context>
<context id="hexadecimal" style-ref="hexadecimal">
<match extended="true">
(?&lt;![\w\.])
0[xX][a-fA-F0-9]+[uUlL]*
(?![\w\.])
</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">
(?&lt;![\w\.])
[0-9]+[uUlL]*
(?![\w\.])
</match>
</context>
<!-- Keywords -->
<context id="keywords" style-ref="keyword">
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>else</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>return</keyword>
<keyword>struct</keyword>
<keyword>switch</keyword>
<keyword>while</keyword>
</context>
<context id="types" style-ref="type">
<keyword>bool</keyword>
<keyword>float</keyword>
<keyword>float2</keyword>
<keyword>float3</keyword>
<keyword>float4</keyword>
<keyword>float2x2</keyword>
<keyword>float3x3</keyword>
<keyword>float4x4</keyword>
<keyword>int</keyword>
<keyword>half</keyword>
<keyword>fixed</keyword>
<keyword>void</keyword>
<keyword>sampler1D</keyword>
<keyword>sampler2D</keyword>
<keyword>sampler3D</keyword>
<keyword>samplerRECT</keyword>
<keyword>samplerCUBE</keyword>
</context>
<context id="storage-class" style-ref="storage-class">
<keyword>uniform</keyword>
<keyword>out</keyword>
<keyword>inout</keyword>
<keyword>in</keyword>
<keyword>varying</keyword>
</context>
<context id="bindings" style-ref="bindings">
<keyword>POSITION</keyword>
<keyword>NORMAL</keyword>
</context>
<context id="color-bindings" style-ref="bindings">
<match extended="true">COLOR[0-3]?</match>
</context>
<context id="texunit-bindings" style-ref="bindings">
<match extended="true">TEXUNIT([0-9]|1[0-5])?</match>
</context>
<context id="texcoord-bindings" style-ref="bindings">
<match extended="true">TEXCOORD[0-7]?</match>
</context>
<context id="swizzle">
<match extended="true">\.([xyzw]+|[rgba]+)</match>
<include>
<context id="swizzle-operator" sub-pattern="1" style-ref="swizzle"/>
</include>
</context>
<!-- C99 booleans -->
<context id="boolean" style-ref="boolean">
<keyword>true</keyword>
<keyword>false</keyword>
</context>
<context id="builtin">
<match extended="true">
(mul|lit|lerp|saturate|abs|cos|acos|sin|asin|tan|atan|all|any|ceil|clamp|
cosh|cross|degress|determinant|dot|exp|exp2|floor|fmod|frac|frexp|isfinite|
isinf|isnan|ldexp|log|log2|log10|max|min|modf|noise|pow|radians|round|
rsqrt|sign|sincos|sinh|smoothstep|step|sqrt|tanh|transpose|distance|
faceforward|length|normalize|reflect|refract|tex1D|tex2D|tex3D|
tex1Dproj|tex2Dproj|tex3Dproj|texRECT|texRECTproj|texCUBE|texCUBEproj|
ddx|ddy|debug)\s*\(
</match>
<include>
<context id="builtin-name" sub-pattern="1" style-ref="builtin"/>
</include>
</context>
<context id="function">
<match extended="true">
([a-zA-Z_][a-zA-Z_0-9]*)\s*\(
</match>
<include>
<context id="function-name" sub-pattern="1" style-ref="function"/>
</include>
</context>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Jacob Ilsø Christensen, Paolo Borelli
Copyright (C) 2005 Jacob Ilsø Christensen <jacobilsoe@gmail.com>
Copyright (C) 2005 Paolo Borelli <pborelli@katamail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="changelog" name="ChangeLog" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">text/x-changelog</property>
<property name="globs">ChangeLog*</property>
</metadata>
<styles>
<style id="date" name="Date" map-to="def:number"/>
<style id="name" name="Name" map-to="def:statement"/>
<style id="email" name="E-mail address" map-to="def:identifier"/>
<style id="file" name="File" map-to="def:comment"/>
<style id="bullet" name="Bullet" map-to="def:type"/>
<style id="function" name="Function" map-to="def:function"/>
<style id="release" name="Release" map-to="def:statement"/>
</styles>
<definitions>
<define-regex id="identifier">[A-Za-z_][A-Za-z0-9_]*</define-regex>
<define-regex id="weekday">Mon|Tue|Wed|Thu|Fri|Sat|Sun</define-regex>
<define-regex id="month">Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec</define-regex>
<define-regex id="date" extended="true">
\%{weekday}\s+\%{month}\s+\d{1,2}\s+(\d{1,2}:\d{1,2}:\d{1,2}\s+)?([aApP][mM]\s+)?(\w{3}\s+)?\d{4} | # Wed Jun 27 13:27:21 2007
\d{4}-\d{2}-\d{2} # 2007-06-28
</define-regex>
<context id="changelog">
<include>
<context id="date-and-stuff" class="no-spell-check">
<!-- FIXME: how to match date here? The date and name line is
something like (DATE) (NAME) <EMAIL>, where DATE and NAME may
be quite arbitrary. -->
<match extended="true">
^(?P&lt;date&gt;\%{date})\s+
(?P&lt;name&gt;.*)\s*
(?P&lt;email&gt;\&lt;[^\&lt;]+\&gt;)\s*$
</match>
<include>
<context sub-pattern="date" style-ref="date"/>
<context sub-pattern="name" style-ref="name"/>
<context sub-pattern="email" style-ref="email"/>
</include>
</context>
<context id="release" style-ref="release" class="no-spell-check">
<match>^\s*\=.*\=\s*$</match>
</context>
<context id="file" style-ref="file" class="no-spell-check">
<start>^\s+(\*)</start>
<!-- end at blank lines if there's no colon -->
<end>\:|^(?!\S)</end>
<include>
<context sub-pattern="1" where="start" style-ref="bullet"/>
</include>
</context>
<context id="function" style-ref="function" class="no-spell-check">
<match>\(\s*\%{identifier}\s*\)</match>
</context>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Marco Barisione, Emanuele Aina
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="chdr" _name="C/ObjC Header" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-chdr</property>
<property name="globs">*.h</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<!--
We include C++ and ObjC contexts since the .h extension
is also used for those languages. If you use .hh
or similar, we will use cpphdr.lang which is
basically the same thing, but having a separate lang file
allows a program to apply a language specific behavior,
for instance a different style for C++ headers.
-->
<definitions>
<context id="chdr">
<include>
<context ref="objc:objc-header"/>
<context ref="cpp:cpp-proper"/>
<context ref="c:c"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,820 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Yevgen Muntyan <muntyan@tamu.edu>
Copyright (C) 2008 Yevgen Muntyan
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="cmake" name="CMake" version="2.0" _section="Other">
<metadata>
<property name="globs">CMakeLists.txt;*.cmake;*.cmake.in;*.ctest;*.ctest.in</property>
<property name="line-comment-start">#</property>
<property name="block-comment-start">#[[</property>
<property name="block-comment-end">]]</property>
</metadata>
<styles>
<style id="builtin-command" name="Builtin Command" map-to="def:function"/>
<style id="deprecated-builtin-command" name="Deprecated Builtin Command" map-to="def:warning"/>
<style id="builtin-variable" name="Builtin Variable" map-to="def:builtin"/>
<style id="constant" name="Constant" map-to="def:constant"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="control" name="Control Keyword" map-to="def:keyword"/>
<style id="variable" name="Variable" map-to="makefile:variable"/>
<style id="quoted-argument" name="Quoted Argument" map-to="def:string"/>
<style id="bracket-argument" name="Bracket Argument" map-to="def:string"/>
<style id="legacy-syntax" name="Legacy Syntax" map-to="def:warning"/>
</styles>
<definitions>
<context id="builtin-command" style-ref="builtin-command">
<prefix>(?i)\b</prefix> <!-- case insensitive -->
<keyword>ADD_COMPILE_OPTIONS</keyword>
<keyword>ADD_CUSTOM_COMMAND</keyword>
<keyword>ADD_CUSTOM_TARGET</keyword>
<keyword>ADD_DEFINITIONS</keyword>
<keyword>ADD_DEPENDENCIES</keyword>
<keyword>ADD_EXECUTABLE</keyword>
<keyword>ADD_LIBRARY</keyword>
<keyword>ADD_LINK_OPTIONS</keyword>
<keyword>ADD_SUBDIRECTORY</keyword>
<keyword>ADD_TEST</keyword>
<keyword>AUX_SOURCE_DIRECTORY</keyword>
<keyword>BUILD_COMMAND</keyword>
<keyword>CMAKE_HOST_SYSTEM_INFORMATION</keyword>
<keyword>CMAKE_MINIMUM_REQUIRED</keyword>
<keyword>CMAKE_PARSE_ARGUMENTS</keyword>
<keyword>CMAKE_POLICY</keyword>
<keyword>CONFIGURE_FILE</keyword>
<keyword>CREATE_TEST_SOURCELIST</keyword>
<keyword>CTEST_BUILD</keyword>
<keyword>CTEST_CONFIGURE</keyword>
<keyword>CTEST_COVERAGE</keyword>
<keyword>CTEST_EMPTY_BINARY_DIRECTORY</keyword>
<keyword>CTEST_MEMCHECK</keyword>
<keyword>CTEST_READ_CUSTOM_FILES</keyword>
<keyword>CTEST_RUN_SCRIPT</keyword>
<keyword>CTEST_SLEEP</keyword>
<keyword>CTEST_START</keyword>
<keyword>CTEST_SUBMIT</keyword>
<keyword>CTEST_TEST</keyword>
<keyword>CTEST_UPDATE</keyword>
<keyword>CTEST_UPLOAD</keyword>
<keyword>DEFINE_PROPERTY</keyword>
<keyword>ENABLE_LANGUAGE</keyword>
<keyword>ENABLE_TESTING</keyword>
<keyword>EXECUTE_PROCESS</keyword>
<keyword>EXPORT</keyword>
<keyword>FILE</keyword>
<keyword>FIND_FILE</keyword>
<keyword>FIND_LIBRARY</keyword>
<keyword>FIND_PACKAGE</keyword>
<keyword>FIND_PATH</keyword>
<keyword>FIND_PROGRAM</keyword>
<keyword>FLTK_WRAP_UI</keyword>
<keyword>GET_CMAKE_PROPERTY</keyword>
<keyword>GET_DIRECTORY_PROPERTY</keyword>
<keyword>GET_FILENAME_COMPONENT</keyword>
<keyword>GET_PROPERTY</keyword>
<keyword>GET_SOURCE_FILE_PROPERTY</keyword>
<keyword>GET_TARGET_PROPERTY</keyword>
<keyword>GET_TEST_PROPERTY</keyword>
<keyword>INCLUDE</keyword>
<keyword>INCLUDE_DIRECTORIES</keyword>
<keyword>INCLUDE_EXTERNAL_MSPROJECT</keyword>
<keyword>INCLUDE_GUARD</keyword>
<keyword>INCLUDE_REGULAR_EXPRESSION</keyword>
<keyword>INSTALL</keyword>
<keyword>LINK_DIRECTORIES</keyword>
<keyword>LINK_LIBRARIES</keyword>
<keyword>LIST</keyword>
<keyword>LOAD_CACHE</keyword>
<keyword>MARK_AS_ADVANCED</keyword>
<keyword>MATH</keyword>
<keyword>MESSAGE</keyword>
<keyword>OPTION</keyword>
<keyword>PROJECT</keyword>
<keyword>QT_WRAP_CPP</keyword>
<keyword>QT_WRAP_UI</keyword>
<keyword>REMOVE_DEFINITIONS</keyword>
<keyword>SEPARATE_ARGUMENTS</keyword>
<keyword>SET</keyword>
<keyword>SET_DIRECTORY_PROPERTIES</keyword>
<keyword>SET_PROPERTY</keyword>
<keyword>SET_SOURCE_FILES_PROPERTIES</keyword>
<keyword>SET_TARGET_PROPERTIES</keyword>
<keyword>SET_TESTS_PROPERTIES</keyword>
<keyword>SITE_NAME</keyword>
<keyword>SOURCE_GROUP</keyword>
<keyword>STRING</keyword>
<keyword>TARGET_COMPILE_DEFINITIONS</keyword>
<keyword>TARGET_COMPILE_FEATURES</keyword>
<keyword>TARGET_COMPILE_OPTIONS</keyword>
<keyword>TARGET_INCLUDE_DIRECTORIES</keyword>
<keyword>TARGET_LINK_DIRECTORIES</keyword>
<keyword>TARGET_LINK_LIBRARIES</keyword>
<keyword>TARGET_LINK_OPTIONS</keyword>
<keyword>TARGET_SOURCES</keyword>
<keyword>TRY_COMPILE</keyword>
<keyword>TRY_RUN</keyword>
<keyword>UNSET</keyword>
<keyword>VARIABLE_WATCH</keyword>
</context>
<context id="deprecated-builtin-command" style-ref="deprecated-builtin-command">
<prefix>(?i)\b</prefix> <!-- case insensitive -->
<keyword>BUILD_NAME</keyword>
<keyword>EXEC_PROGRAM</keyword>
<keyword>EXPORT_LIBRARY_DEPENDENCIES</keyword>
<keyword>INSTALL_FILES</keyword>
<keyword>INSTALL_PROGRAMS</keyword>
<keyword>INSTALL_TARGETS</keyword>
<keyword>LOAD_COMMAND</keyword>
<keyword>MAKE_DIRECTORY</keyword>
<keyword>OUTPUT_REQUIRED_FILES</keyword>
<keyword>REMOVE</keyword>
<keyword>SUBDIR_DEPENDS</keyword>
<keyword>SUBDIRS</keyword>
<keyword>USE_MANGLED_MESA</keyword>
<keyword>UTILITY_SOURCE</keyword>
<keyword>VARIABLE_REQUIRES</keyword>
<keyword>WRITE_FILE</keyword>
</context>
<context id="constant" style-ref="constant">
<prefix>(?i)\b</prefix> <!-- case insensitive -->
<keyword>FALSE</keyword>
<keyword>IGNORE</keyword>
<keyword>N</keyword>
<keyword>NO</keyword>
<keyword>(\w+-)?NOTFOUND</keyword>
<keyword>OFF</keyword>
<keyword>ON</keyword>
<keyword>TRUE</keyword>
<keyword>Y</keyword>
<keyword>YES</keyword>
</context>
<context id="builtin-variable" style-ref="builtin-variable">
<keyword>\w+_BINARY_DIR</keyword>
<keyword>\w+_SOURCE_DIR</keyword>
<keyword>\w+_VERSION</keyword>
<keyword>\w+_VERSION_MAJOR</keyword>
<keyword>\w+_VERSION_MINOR</keyword>
<keyword>\w+_VERSION_PATCH</keyword>
<keyword>\w+_VERSION_TWEAK</keyword>
<keyword>ANDROID</keyword>
<keyword>APPLE</keyword>
<keyword>BORLAND</keyword>
<keyword>BUILD_SHARED_LIBS</keyword>
<keyword>CMAKE_\w+_POSTFIX</keyword>
<keyword>CMAKE_\w+_ANDROID_TOOLCHAIN_MACHINE</keyword>
<keyword>CMAKE_\w+_ANDROID_TOOLCHAIN_PREFIX</keyword>
<keyword>CMAKE_\w+_ANDROID_TOOLCHAIN_SUFFIX</keyword>
<keyword>CMAKE_\w+_ARCHIVE_APPEND</keyword>
<keyword>CMAKE_\w+_ARCHIVE_CREATE</keyword>
<keyword>CMAKE_\w+_ARCHIVE_FINISH</keyword>
<keyword>CMAKE_\w+_CLANG_TIDY</keyword>
<keyword>CMAKE_\w+_COMPILER</keyword>
<keyword>CMAKE_\w+_COMPILER_ABI</keyword>
<keyword>CMAKE_\w+_COMPILER_AR</keyword>
<keyword>CMAKE_\w+_COMPILER_ARCHITECTURE_ID</keyword>
<keyword>CMAKE_\w+_COMPILER_EXTERNAL_TOOLCHAIN</keyword>
<keyword>CMAKE_\w+_COMPILER_ID</keyword>
<keyword>CMAKE_\w+_COMPILER_LAUNCHER</keyword>
<keyword>CMAKE_\w+_COMPILER_LOADED</keyword>
<keyword>CMAKE_\w+_COMPILER_PREDEFINES_COMMAND</keyword>
<keyword>CMAKE_\w+_COMPILER_RANLIB</keyword>
<keyword>CMAKE_\w+_COMPILER_TARGET</keyword>
<keyword>CMAKE_\w+_COMPILER_VERSION</keyword>
<keyword>CMAKE_\w+_COMPILER_VERSION_INTERNAL</keyword>
<keyword>CMAKE_\w+_COMPILE_OBJECT</keyword>
<keyword>CMAKE_\w+_CPPCHECK</keyword>
<keyword>CMAKE_\w+_CPPLINT</keyword>
<keyword>CMAKE_\w+_CREATE_SHARED_LIBRARY</keyword>
<keyword>CMAKE_\w+_CREATE_SHARED_MODULE</keyword>
<keyword>CMAKE_\w+_CREATE_STATIC_LIBRARY</keyword>
<keyword>CMAKE_\w+_FLAGS</keyword>
<keyword>CMAKE_\w+_FLAGS_DEBUG</keyword>
<keyword>CMAKE_\w+_FLAGS_DEBUG_INIT</keyword>
<keyword>CMAKE_\w+_FLAGS_INIT</keyword>
<keyword>CMAKE_\w+_FLAGS_MINSIZEREL</keyword>
<keyword>CMAKE_\w+_FLAGS_MINSIZEREL_INIT</keyword>
<keyword>CMAKE_\w+_FLAGS_RELEASE</keyword>
<keyword>CMAKE_\w+_FLAGS_RELEASE_INIT</keyword>
<keyword>CMAKE_\w+_FLAGS_RELWITHDEBINFO</keyword>
<keyword>CMAKE_\w+_FLAGS_RELWITHDEBINFO_INIT</keyword>
<keyword>CMAKE_\w+_GHS_KERNEL_FLAGS_DEBUG</keyword>
<keyword>CMAKE_\w+_GHS_KERNEL_FLAGS_MINSIZEREL</keyword>
<keyword>CMAKE_\w+_GHS_KERNEL_FLAGS_RELEASE</keyword>
<keyword>CMAKE_\w+_GHS_KERNEL_FLAGS_RELWITHDEBINFO</keyword>
<keyword>CMAKE_\w+_IGNORE_EXTENSIONS</keyword>
<keyword>CMAKE_\w+_IMPLICIT_INCLUDE_DIRECTORIES</keyword>
<keyword>CMAKE_\w+_IMPLICIT_LINK_DIRECTORIES</keyword>
<keyword>CMAKE_\w+_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES</keyword>
<keyword>CMAKE_\w+_IMPLICIT_LINK_LIBRARIES</keyword>
<keyword>CMAKE_\w+_INCLUDE_WHAT_YOU_USE</keyword>
<keyword>CMAKE_\w+_LIBRARY_ARCHITECTURE</keyword>
<keyword>CMAKE_\w+_LINKER_PREFERENCE</keyword>
<keyword>CMAKE_\w+_LINKER_PREFERENCE_PROPAGATES</keyword>
<keyword>CMAKE_\w+_LINK_EXECUTABLE</keyword>
<keyword>CMAKE_\w+_OUTPUT_EXTENSION</keyword>
<keyword>CMAKE_\w+_PLATFORM_ID</keyword>
<keyword>CMAKE_\w+_SIMULATE_ID</keyword>
<keyword>CMAKE_\w+_SIMULATE_VERSION</keyword>
<keyword>CMAKE_\w+_SIZEOF_DATA_PTR</keyword>
<keyword>CMAKE_\w+_SOURCE_FILE_EXTENSIONS</keyword>
<keyword>CMAKE_\w+_STANDARD_INCLUDE_DIRECTORIES</keyword>
<keyword>CMAKE_\w+_STANDARD_LIBRARIES</keyword>
<keyword>CMAKE_\w+_VISIBILITY_PRESET</keyword>
<keyword>CMAKE_ABSOLUTE_DESTINATION_FILES</keyword>
<keyword>CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS</keyword>
<keyword>CMAKE_ANDROID_API</keyword>
<keyword>CMAKE_ANDROID_API_MIN</keyword>
<keyword>CMAKE_ANDROID_ARCH</keyword>
<keyword>CMAKE_ANDROID_ARCH_ABI</keyword>
<keyword>CMAKE_ANDROID_ARM_MODE</keyword>
<keyword>CMAKE_ANDROID_ARM_NEON</keyword>
<keyword>CMAKE_ANDROID_ASSETS_DIRECTORIES</keyword>
<keyword>CMAKE_ANDROID_GUI</keyword>
<keyword>CMAKE_ANDROID_JAR_DEPENDENCIES</keyword>
<keyword>CMAKE_ANDROID_JAR_DIRECTORIES</keyword>
<keyword>CMAKE_ANDROID_JAVA_SOURCE_DIR</keyword>
<keyword>CMAKE_ANDROID_NATIVE_LIB_DEPENDENCIES</keyword>
<keyword>CMAKE_ANDROID_NATIVE_LIB_DIRECTORIES</keyword>
<keyword>CMAKE_ANDROID_NDK</keyword>
<keyword>CMAKE_ANDROID_NDK_DEPRECATED_HEADERS</keyword>
<keyword>CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG</keyword>
<keyword>CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION</keyword>
<keyword>CMAKE_ANDROID_PROCESS_MAX</keyword>
<keyword>CMAKE_ANDROID_PROGUARD</keyword>
<keyword>CMAKE_ANDROID_PROGUARD_CONFIG_PATH</keyword>
<keyword>CMAKE_ANDROID_SECURE_PROPS_PATH</keyword>
<keyword>CMAKE_ANDROID_SKIP_ANT_STEP</keyword>
<keyword>CMAKE_ANDROID_STANDALONE_TOOLCHAIN</keyword>
<keyword>CMAKE_ANDROID_STL_TYPE</keyword>
<keyword>CMAKE_APPBUNDLE_PATH</keyword>
<keyword>CMAKE_AR</keyword>
<keyword>CMAKE_ARCHIVE_OUTPUT_DIRECTORY</keyword>
<keyword>CMAKE_ARCHIVE_OUTPUT_DIRECTORY_\w+</keyword>
<keyword>CMAKE_ARGC</keyword>
<keyword>CMAKE_ARGV0</keyword>
<keyword>CMAKE_AUTOMOC</keyword>
<keyword>CMAKE_AUTOMOC_COMPILER_PREDEFINES</keyword>
<keyword>CMAKE_AUTOMOC_DEPEND_FILTERS</keyword>
<keyword>CMAKE_AUTOMOC_MACRO_NAMES</keyword>
<keyword>CMAKE_AUTOMOC_MOC_OPTIONS</keyword>
<keyword>CMAKE_AUTOMOC_RELAXED_MODE</keyword>
<keyword>CMAKE_AUTORCC</keyword>
<keyword>CMAKE_AUTORCC_OPTIONS</keyword>
<keyword>CMAKE_AUTOUIC</keyword>
<keyword>CMAKE_AUTOUIC_OPTIONS</keyword>
<keyword>CMAKE_AUTOUIC_SEARCH_PATHS</keyword>
<keyword>CMAKE_BACKWARDS_COMPATIBILITY</keyword>
<keyword>CMAKE_BINARY_DIR</keyword>
<keyword>CMAKE_BUILD_RPATH</keyword>
<keyword>CMAKE_BUILD_TOOL</keyword>
<keyword>CMAKE_BUILD_TYPE</keyword>
<keyword>CMAKE_BUILD_WITH_INSTALL_NAME_DIR</keyword>
<keyword>CMAKE_BUILD_WITH_INSTALL_RPATH</keyword>
<keyword>CMAKE_CACHEFILE_DIR</keyword>
<keyword>CMAKE_CACHE_MAJOR_VERSION</keyword>
<keyword>CMAKE_CACHE_MINOR_VERSION</keyword>
<keyword>CMAKE_CACHE_PATCH_VERSION</keyword>
<keyword>CMAKE_CFG_INTDIR</keyword>
<keyword>CMAKE_CL_64</keyword>
<keyword>CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES</keyword>
<keyword>CMAKE_CODELITE_USE_TARGETS</keyword>
<keyword>CMAKE_COLOR_MAKEFILE</keyword>
<keyword>CMAKE_COMMAND</keyword>
<keyword>CMAKE_COMPILER_2005</keyword>
<keyword>CMAKE_COMPILER_IS_GNUCC</keyword>
<keyword>CMAKE_COMPILER_IS_GNUCXX</keyword>
<keyword>CMAKE_COMPILER_IS_GNUG77</keyword>
<keyword>CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY</keyword>
<keyword>CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_\w+</keyword>
<keyword>CMAKE_CONFIGURATION_TYPES</keyword>
<keyword>CMAKE_CROSSCOMPILING</keyword>
<keyword>CMAKE_CROSSCOMPILING_EMULATOR</keyword>
<keyword>CMAKE_CTEST_COMMAND</keyword>
<keyword>CMAKE_CUDA_EXTENSIONS</keyword>
<keyword>CMAKE_CUDA_HOST_COMPILER</keyword>
<keyword>CMAKE_CUDA_STANDARD</keyword>
<keyword>CMAKE_CUDA_STANDARD_REQUIRED</keyword>
<keyword>CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES</keyword>
<keyword>CMAKE_CURRENT_BINARY_DIR</keyword>
<keyword>CMAKE_CURRENT_LIST_DIR</keyword>
<keyword>CMAKE_CURRENT_LIST_FILE</keyword>
<keyword>CMAKE_CURRENT_LIST_LINE</keyword>
<keyword>CMAKE_CURRENT_SOURCE_DIR</keyword>
<keyword>CMAKE_CXX_COMPILE_FEATURES</keyword>
<keyword>CMAKE_CXX_EXTENSIONS</keyword>
<keyword>CMAKE_CXX_STANDARD</keyword>
<keyword>CMAKE_CXX_STANDARD_REQUIRED</keyword>
<keyword>CMAKE_C_COMPILE_FEATURES</keyword>
<keyword>CMAKE_C_EXTENSIONS</keyword>
<keyword>CMAKE_C_STANDARD</keyword>
<keyword>CMAKE_C_STANDARD_REQUIRED</keyword>
<keyword>CMAKE_DEBUG_POSTFIX</keyword>
<keyword>CMAKE_DEBUG_TARGET_PROPERTIES</keyword>
<keyword>CMAKE_DEPENDS_IN_PROJECT_ONLY</keyword>
<keyword>CMAKE_DIRECTORY_LABELS</keyword>
<keyword>CMAKE_DISABLE_FIND_PACKAGE_\w+</keyword>
<keyword>CMAKE_DL_LIBS</keyword>
<keyword>CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES</keyword>
<keyword>CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT</keyword>
<keyword>CMAKE_ECLIPSE_MAKE_ARGUMENTS</keyword>
<keyword>CMAKE_ECLIPSE_VERSION</keyword>
<keyword>CMAKE_EDIT_COMMAND</keyword>
<keyword>CMAKE_ENABLE_EXPORTS</keyword>
<keyword>CMAKE_ERROR_DEPRECATED</keyword>
<keyword>CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION</keyword>
<keyword>CMAKE_EXECUTABLE_SUFFIX</keyword>
<keyword>CMAKE_EXE_LINKER_FLAGS</keyword>
<keyword>CMAKE_EXE_LINKER_FLAGS_\w+</keyword>
<keyword>CMAKE_EXE_LINKER_FLAGS_\w+_INIT</keyword>
<keyword>CMAKE_EXE_LINKER_FLAGS_INIT</keyword>
<keyword>CMAKE_EXPORT_COMPILE_COMMANDS</keyword>
<keyword>CMAKE_EXPORT_NO_PACKAGE_REGISTRY</keyword>
<keyword>CMAKE_EXTRA_GENERATOR</keyword>
<keyword>CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES</keyword>
<keyword>CMAKE_FIND_APPBUNDLE</keyword>
<keyword>CMAKE_FIND_FRAMEWORK</keyword>
<keyword>CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX</keyword>
<keyword>CMAKE_FIND_LIBRARY_PREFIXES</keyword>
<keyword>CMAKE_FIND_LIBRARY_SUFFIXES</keyword>
<keyword>CMAKE_FIND_NO_INSTALL_PREFIX</keyword>
<keyword>CMAKE_FIND_PACKAGE_NAME</keyword>
<keyword>CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY</keyword>
<keyword>CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY</keyword>
<keyword>CMAKE_FIND_PACKAGE_SORT_DIRECTION</keyword>
<keyword>CMAKE_FIND_PACKAGE_SORT_ORDER</keyword>
<keyword>CMAKE_FIND_PACKAGE_WARN_NO_MODULE</keyword>
<keyword>CMAKE_FIND_ROOT_PATH</keyword>
<keyword>CMAKE_FIND_ROOT_PATH_MODE_INCLUDE</keyword>
<keyword>CMAKE_FIND_ROOT_PATH_MODE_LIBRARY</keyword>
<keyword>CMAKE_FIND_ROOT_PATH_MODE_PACKAGE</keyword>
<keyword>CMAKE_FIND_ROOT_PATH_MODE_PROGRAM</keyword>
<keyword>CMAKE_FRAMEWORK_PATH</keyword>
<keyword>CMAKE_Fortran_FORMAT</keyword>
<keyword>CMAKE_Fortran_MODDIR_DEFAULT</keyword>
<keyword>CMAKE_Fortran_MODDIR_FLAG</keyword>
<keyword>CMAKE_Fortran_MODOUT_FLAG</keyword>
<keyword>CMAKE_Fortran_MODULE_DIRECTORY</keyword>
<keyword>CMAKE_GENERATOR</keyword>
<keyword>CMAKE_GENERATOR_PLATFORM</keyword>
<keyword>CMAKE_GENERATOR_TOOLSET</keyword>
<keyword>CMAKE_GNUtoMS</keyword>
<keyword>CMAKE_HOME_DIRECTORY</keyword>
<keyword>CMAKE_HOST_APPLE</keyword>
<keyword>CMAKE_HOST_SOLARIS</keyword>
<keyword>CMAKE_HOST_SYSTEM</keyword>
<keyword>CMAKE_HOST_SYSTEM_NAME</keyword>
<keyword>CMAKE_HOST_SYSTEM_PROCESSOR</keyword>
<keyword>CMAKE_HOST_SYSTEM_VERSION</keyword>
<keyword>CMAKE_HOST_UNIX</keyword>
<keyword>CMAKE_HOST_WIN32</keyword>
<keyword>CMAKE_IGNORE_PATH</keyword>
<keyword>CMAKE_IMPORT_LIBRARY_PREFIX</keyword>
<keyword>CMAKE_IMPORT_LIBRARY_SUFFIX</keyword>
<keyword>CMAKE_INCLUDE_CURRENT_DIR</keyword>
<keyword>CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE</keyword>
<keyword>CMAKE_INCLUDE_DIRECTORIES_BEFORE</keyword>
<keyword>CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE</keyword>
<keyword>CMAKE_INCLUDE_PATH</keyword>
<keyword>CMAKE_INSTALL_DEFAULT_COMPONENT_NAME</keyword>
<keyword>CMAKE_INSTALL_MESSAGE</keyword>
<keyword>CMAKE_INSTALL_NAME_DIR</keyword>
<keyword>CMAKE_INSTALL_PREFIX</keyword>
<keyword>CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT</keyword>
<keyword>CMAKE_INSTALL_RPATH</keyword>
<keyword>CMAKE_INSTALL_RPATH_USE_LINK_PATH</keyword>
<keyword>CMAKE_INTERNAL_PLATFORM_ABI</keyword>
<keyword>CMAKE_INTERPROCEDURAL_OPTIMIZATION</keyword>
<keyword>CMAKE_INTERPROCEDURAL_OPTIMIZATION_\w+</keyword>
<keyword>CMAKE_IOS_INSTALL_COMBINED</keyword>
<keyword>CMAKE_JOB_POOL_COMPILE</keyword>
<keyword>CMAKE_JOB_POOL_LINK</keyword>
<keyword>CMAKE_LIBRARY_ARCHITECTURE</keyword>
<keyword>CMAKE_LIBRARY_ARCHITECTURE_REGEX</keyword>
<keyword>CMAKE_LIBRARY_OUTPUT_DIRECTORY</keyword>
<keyword>CMAKE_LIBRARY_OUTPUT_DIRECTORY_\w+</keyword>
<keyword>CMAKE_LIBRARY_PATH</keyword>
<keyword>CMAKE_LIBRARY_PATH_FLAG</keyword>
<keyword>CMAKE_LINK_DEF_FILE_FLAG</keyword>
<keyword>CMAKE_LINK_DEPENDS_NO_SHARED</keyword>
<keyword>CMAKE_LINK_INTERFACE_LIBRARIES</keyword>
<keyword>CMAKE_LINK_LIBRARY_FILE_FLAG</keyword>
<keyword>CMAKE_LINK_LIBRARY_FLAG</keyword>
<keyword>CMAKE_LINK_LIBRARY_SUFFIX</keyword>
<keyword>CMAKE_LINK_SEARCH_END_STATIC</keyword>
<keyword>CMAKE_LINK_SEARCH_START_STATIC</keyword>
<keyword>CMAKE_LINK_WHAT_YOU_USE</keyword>
<keyword>CMAKE_MACOSX_BUNDLE</keyword>
<keyword>CMAKE_MACOSX_RPATH</keyword>
<keyword>CMAKE_MAJOR_VERSION</keyword>
<keyword>CMAKE_MAKE_PROGRAM</keyword>
<keyword>CMAKE_MAP_IMPORTED_CONFIG_\w+</keyword>
<keyword>CMAKE_MATCH_\d+</keyword>
<keyword>CMAKE_MATCH_COUNT</keyword>
<keyword>CMAKE_MFC_FLAG</keyword>
<keyword>CMAKE_MINIMUM_REQUIRED_VERSION</keyword>
<keyword>CMAKE_MINOR_VERSION</keyword>
<keyword>CMAKE_MODULE_LINKER_FLAGS</keyword>
<keyword>CMAKE_MODULE_LINKER_FLAGS_\w+</keyword>
<keyword>CMAKE_MODULE_LINKER_FLAGS_\w+_INIT</keyword>
<keyword>CMAKE_MODULE_LINKER_FLAGS_INIT</keyword>
<keyword>CMAKE_MODULE_PATH</keyword>
<keyword>CMAKE_MSVCIDE_RUN_PATH</keyword>
<keyword>CMAKE_NINJA_OUTPUT_PATH_PREFIX</keyword>
<keyword>CMAKE_NOT_USING_CONFIG_FLAGS</keyword>
<keyword>CMAKE_NO_BUILTIN_CHRPATH</keyword>
<keyword>CMAKE_NO_SYSTEM_FROM_IMPORTED</keyword>
<keyword>CMAKE_OBJECT_PATH_MAX</keyword>
<keyword>CMAKE_OSX_ARCHITECTURES</keyword>
<keyword>CMAKE_OSX_DEPLOYMENT_TARGET</keyword>
<keyword>CMAKE_OSX_SYSROOT</keyword>
<keyword>CMAKE_PARENT_LIST_FILE</keyword>
<keyword>CMAKE_PATCH_VERSION</keyword>
<keyword>CMAKE_PDB_OUTPUT_DIRECTORY</keyword>
<keyword>CMAKE_PDB_OUTPUT_DIRECTORY_\w+</keyword>
<keyword>CMAKE_POLICY_DEFAULT_CMP\d{4}</keyword>
<keyword>CMAKE_POLICY_WARNING_CMP\d{4}</keyword>
<keyword>CMAKE_POSITION_INDEPENDENT_CODE</keyword>
<keyword>CMAKE_PREFIX_PATH</keyword>
<keyword>CMAKE_PROGRAM_PATH</keyword>
<keyword>CMAKE_PROJECT_\w+_INCLUDE</keyword>
<keyword>CMAKE_PROJECT_DESCRIPTION</keyword>
<keyword>CMAKE_PROJECT_NAME</keyword>
<keyword>CMAKE_RANLIB</keyword>
<keyword>CMAKE_ROOT</keyword>
<keyword>CMAKE_RUNTIME_OUTPUT_DIRECTORY</keyword>
<keyword>CMAKE_RUNTIME_OUTPUT_DIRECTORY_\w+</keyword>
<keyword>CMAKE_SCRIPT_MODE_FILE</keyword>
<keyword>CMAKE_SHARED_LIBRARY_PREFIX</keyword>
<keyword>CMAKE_SHARED_LIBRARY_SUFFIX</keyword>
<keyword>CMAKE_SHARED_LINKER_FLAGS</keyword>
<keyword>CMAKE_SHARED_LINKER_FLAGS_\w+</keyword>
<keyword>CMAKE_SHARED_LINKER_FLAGS_\w+_INIT</keyword>
<keyword>CMAKE_SHARED_LINKER_FLAGS_INIT</keyword>
<keyword>CMAKE_SHARED_MODULE_PREFIX</keyword>
<keyword>CMAKE_SHARED_MODULE_SUFFIX</keyword>
<keyword>CMAKE_SIZEOF_VOID_P</keyword>
<keyword>CMAKE_SKIP_BUILD_RPATH</keyword>
<keyword>CMAKE_SKIP_INSTALL_ALL_DEPENDENCY</keyword>
<keyword>CMAKE_SKIP_INSTALL_RPATH</keyword>
<keyword>CMAKE_SKIP_INSTALL_RULES</keyword>
<keyword>CMAKE_SKIP_RPATH</keyword>
<keyword>CMAKE_SOURCE_DIR</keyword>
<keyword>CMAKE_STAGING_PREFIX</keyword>
<keyword>CMAKE_STATIC_LIBRARY_PREFIX</keyword>
<keyword>CMAKE_STATIC_LIBRARY_SUFFIX</keyword>
<keyword>CMAKE_STATIC_LINKER_FLAGS</keyword>
<keyword>CMAKE_STATIC_LINKER_FLAGS_\w+</keyword>
<keyword>CMAKE_STATIC_LINKER_FLAGS_\w+_INIT</keyword>
<keyword>CMAKE_STATIC_LINKER_FLAGS_INIT</keyword>
<keyword>CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS</keyword>
<keyword>CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE</keyword>
<keyword>CMAKE_SYSROOT</keyword>
<keyword>CMAKE_SYSROOT_COMPILE</keyword>
<keyword>CMAKE_SYSROOT_LINK</keyword>
<keyword>CMAKE_SYSTEM</keyword>
<keyword>CMAKE_SYSTEM_APPBUNDLE_PATH</keyword>
<keyword>CMAKE_SYSTEM_FRAMEWORK_PATH</keyword>
<keyword>CMAKE_SYSTEM_IGNORE_PATH</keyword>
<keyword>CMAKE_SYSTEM_INCLUDE_PATH</keyword>
<keyword>CMAKE_SYSTEM_LIBRARY_PATH</keyword>
<keyword>CMAKE_SYSTEM_NAME</keyword>
<keyword>CMAKE_SYSTEM_PREFIX_PATH</keyword>
<keyword>CMAKE_SYSTEM_PROCESSOR</keyword>
<keyword>CMAKE_SYSTEM_PROGRAM_PATH</keyword>
<keyword>CMAKE_SYSTEM_VERSION</keyword>
<keyword>CMAKE_Swift_LANGUAGE_VERSION</keyword>
<keyword>CMAKE_TOOLCHAIN_FILE</keyword>
<keyword>CMAKE_TRY_COMPILE_CONFIGURATION</keyword>
<keyword>CMAKE_TRY_COMPILE_PLATFORM_VARIABLES</keyword>
<keyword>CMAKE_TRY_COMPILE_TARGET_TYPE</keyword>
<keyword>CMAKE_TWEAK_VERSION</keyword>
<keyword>CMAKE_USER_MAKE_RULES_OVERRIDE</keyword>
<keyword>CMAKE_USER_MAKE_RULES_OVERRIDE_\w+</keyword>
<keyword>CMAKE_USE_RELATIVE_PATHS</keyword>
<keyword>CMAKE_VERBOSE_MAKEFILE</keyword>
<keyword>CMAKE_VERSION</keyword>
<keyword>CMAKE_VISIBILITY_INLINES_HIDDEN</keyword>
<keyword>CMAKE_VS_DEVENV_COMMAND</keyword>
<keyword>CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD</keyword>
<keyword>CMAKE_VS_INCLUDE_PACKAGE_TO_DEFAULT_BUILD</keyword>
<keyword>CMAKE_VS_INTEL_Fortran_PROJECT_VERSION</keyword>
<keyword>CMAKE_VS_MSBUILD_COMMAND</keyword>
<keyword>CMAKE_VS_NsightTegra_VERSION</keyword>
<keyword>CMAKE_VS_PLATFORM_NAME</keyword>
<keyword>CMAKE_VS_PLATFORM_TOOLSET</keyword>
<keyword>CMAKE_VS_PLATFORM_TOOLSET_CUDA</keyword>
<keyword>CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE</keyword>
<keyword>CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION</keyword>
<keyword>CMAKE_WARN_DEPRECATED</keyword>
<keyword>CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION</keyword>
<keyword>CMAKE_WIN32_EXECUTABLE</keyword>
<keyword>CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS</keyword>
<keyword>CMAKE_XCODE_ATTRIBUTE_\w+</keyword>
<keyword>CMAKE_XCODE_GENERATE_SCHEME</keyword>
<keyword>CMAKE_XCODE_PLATFORM_TOOLSET</keyword>
<keyword>CPACK_ABSOLUTE_DESTINATION_FILES</keyword>
<keyword>CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY</keyword>
<keyword>CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION</keyword>
<keyword>CPACK_INCLUDE_TOPLEVEL_DIRECTORY</keyword>
<keyword>CPACK_INSTALL_SCRIPT</keyword>
<keyword>CPACK_PACKAGING_INSTALL_PREFIX</keyword>
<keyword>CPACK_SET_DESTDIR</keyword>
<keyword>CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION</keyword>
<keyword>CTEST_BINARY_DIRECTORY</keyword>
<keyword>CTEST_BUILD_COMMAND</keyword>
<keyword>CTEST_BUILD_NAME</keyword>
<keyword>CTEST_BZR_COMMAND</keyword>
<keyword>CTEST_BZR_UPDATE_OPTIONS</keyword>
<keyword>CTEST_CHANGE_ID</keyword>
<keyword>CTEST_CHECKOUT_COMMAND</keyword>
<keyword>CTEST_CONFIGURATION_TYPE</keyword>
<keyword>CTEST_CONFIGURE_COMMAND</keyword>
<keyword>CTEST_COVERAGE_COMMAND</keyword>
<keyword>CTEST_COVERAGE_EXTRA_FLAGS</keyword>
<keyword>CTEST_CURL_OPTIONS</keyword>
<keyword>CTEST_CUSTOM_COVERAGE_EXCLUDE</keyword>
<keyword>CTEST_CUSTOM_ERROR_EXCEPTION</keyword>
<keyword>CTEST_CUSTOM_ERROR_MATCH</keyword>
<keyword>CTEST_CUSTOM_ERROR_POST_CONTEXT</keyword>
<keyword>CTEST_CUSTOM_ERROR_PRE_CONTEXT</keyword>
<keyword>CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE</keyword>
<keyword>CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS</keyword>
<keyword>CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS</keyword>
<keyword>CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE</keyword>
<keyword>CTEST_CUSTOM_MEMCHECK_IGNORE</keyword>
<keyword>CTEST_CUSTOM_POST_MEMCHECK</keyword>
<keyword>CTEST_CUSTOM_POST_TEST</keyword>
<keyword>CTEST_CUSTOM_PRE_MEMCHECK</keyword>
<keyword>CTEST_CUSTOM_PRE_TEST</keyword>
<keyword>CTEST_CUSTOM_TEST_IGNORE</keyword>
<keyword>CTEST_CUSTOM_WARNING_EXCEPTION</keyword>
<keyword>CTEST_CUSTOM_WARNING_MATCH</keyword>
<keyword>CTEST_CVS_CHECKOUT</keyword>
<keyword>CTEST_CVS_COMMAND</keyword>
<keyword>CTEST_CVS_UPDATE_OPTIONS</keyword>
<keyword>CTEST_DROP_LOCATION</keyword>
<keyword>CTEST_DROP_METHOD</keyword>
<keyword>CTEST_DROP_SITE</keyword>
<keyword>CTEST_DROP_SITE_CDASH</keyword>
<keyword>CTEST_DROP_SITE_PASSWORD</keyword>
<keyword>CTEST_DROP_SITE_USER</keyword>
<keyword>CTEST_EXTRA_COVERAGE_GLOB</keyword>
<keyword>CTEST_GIT_COMMAND</keyword>
<keyword>CTEST_GIT_INIT_SUBMODULES</keyword>
<keyword>CTEST_GIT_UPDATE_CUSTOM</keyword>
<keyword>CTEST_GIT_UPDATE_OPTIONS</keyword>
<keyword>CTEST_HG_COMMAND</keyword>
<keyword>CTEST_HG_UPDATE_OPTIONS</keyword>
<keyword>CTEST_LABELS_FOR_SUBPROJECTS</keyword>
<keyword>CTEST_MEMORYCHECK_COMMAND</keyword>
<keyword>CTEST_MEMORYCHECK_COMMAND_OPTIONS</keyword>
<keyword>CTEST_MEMORYCHECK_SANITIZER_OPTIONS</keyword>
<keyword>CTEST_MEMORYCHECK_SUPPRESSIONS_FILE</keyword>
<keyword>CTEST_MEMORYCHECK_TYPE</keyword>
<keyword>CTEST_NIGHTLY_START_TIME</keyword>
<keyword>CTEST_P4_CLIENT</keyword>
<keyword>CTEST_P4_COMMAND</keyword>
<keyword>CTEST_P4_OPTIONS</keyword>
<keyword>CTEST_P4_UPDATE_OPTIONS</keyword>
<keyword>CTEST_SCP_COMMAND</keyword>
<keyword>CTEST_SITE</keyword>
<keyword>CTEST_SOURCE_DIRECTORY</keyword>
<keyword>CTEST_SVN_COMMAND</keyword>
<keyword>CTEST_SVN_OPTIONS</keyword>
<keyword>CTEST_SVN_UPDATE_OPTIONS</keyword>
<keyword>CTEST_TEST_LOAD</keyword>
<keyword>CTEST_TEST_TIMEOUT</keyword>
<keyword>CTEST_TRIGGER_SITE</keyword>
<keyword>CTEST_UPDATE_COMMAND</keyword>
<keyword>CTEST_UPDATE_OPTIONS</keyword>
<keyword>CTEST_UPDATE_VERSION_ONLY</keyword>
<keyword>CTEST_USE_LAUNCHERS</keyword>
<keyword>CYGWIN</keyword>
<keyword>EXECUTABLE_OUTPUT_PATH</keyword>
<keyword>GHS-MULTI</keyword>
<keyword>LIBRARY_OUTPUT_PATH</keyword>
<keyword>MINGW</keyword>
<keyword>MSVC</keyword>
<keyword>MSVC10</keyword>
<keyword>MSVC11</keyword>
<keyword>MSVC12</keyword>
<keyword>MSVC14</keyword>
<keyword>MSVC60</keyword>
<keyword>MSVC70</keyword>
<keyword>MSVC71</keyword>
<keyword>MSVC80</keyword>
<keyword>MSVC90</keyword>
<keyword>MSVC_IDE</keyword>
<keyword>MSVC_VERSION</keyword>
<keyword>PROJECT_BINARY_DIR</keyword>
<keyword>PROJECT_DESCRIPTION</keyword>
<keyword>PROJECT_NAME</keyword>
<keyword>PROJECT_SOURCE_DIR</keyword>
<keyword>PROJECT_VERSION</keyword>
<keyword>PROJECT_VERSION_MAJOR</keyword>
<keyword>PROJECT_VERSION_MINOR</keyword>
<keyword>PROJECT_VERSION_PATCH</keyword>
<keyword>PROJECT_VERSION_TWEAK</keyword>
<keyword>UNIX</keyword>
<keyword>WIN32</keyword>
<keyword>WINCE</keyword>
<keyword>WINDOWS_PHONE</keyword>
<keyword>WINDOWS_STORE</keyword>
<keyword>XCODE</keyword>
<keyword>XCODE_VERSION</keyword>
</context>
<context id="operator" style-ref="operator">
<keyword>AND</keyword>
<keyword>BOOL</keyword>
<keyword>CACHE</keyword>
<keyword>COMMAND</keyword>
<keyword>DEFINED</keyword>
<keyword>DOC</keyword>
<keyword>EQUAL</keyword>
<keyword>EXISTS</keyword>
<keyword>GREATER</keyword>
<keyword>INTERNAL</keyword>
<keyword>LESS</keyword>
<keyword>MATCHES</keyword>
<keyword>NAME</keyword>
<keyword>NAMES</keyword>
<keyword>NAME_WE</keyword>
<keyword>NOT</keyword>
<keyword>OR</keyword>
<keyword>PATH</keyword>
<keyword>PATHS</keyword>
<keyword>PROGRAM</keyword>
<keyword>STREQUAL</keyword>
<keyword>STRGREATER</keyword>
<keyword>STRING</keyword>
<keyword>STRLESS</keyword>
</context>
<context id="control" style-ref="control">
<prefix>(?i)\b</prefix> <!-- case insensitive -->
<keyword>BREAK</keyword>
<keyword>CONTINUE</keyword>
<keyword>ELSE</keyword>
<keyword>ELSEIF</keyword>
<keyword>ENDFOREACH</keyword>
<keyword>ENDFUNCTION</keyword>
<keyword>ENDIF</keyword>
<keyword>ENDMACRO</keyword>
<keyword>ENDWHILE</keyword>
<keyword>FOREACH</keyword>
<keyword>FUNCTION</keyword>
<keyword>IF</keyword>
<keyword>MACRO</keyword>
<keyword>RETURN</keyword>
<keyword>WHILE</keyword>
</context>
<context id="escape-sequence">
<match>(\\([trn;]|[^A-Za-z0-9;]))|(\\(.|$))</match>
<include>
<context sub-pattern="1" style-ref="def:special-char"/>
<context sub-pattern="3" style-ref="def:error"/>
</include>
</context>
<context id="disallowed-variable-reference-char" style-ref="def:error" extend-parent="false">
<match>[^A-Za-z0-9_./+-]</match>
</context>
<context id="variable-reference" style-ref="variable"
style-inside="true" end-at-line-end="true"
>
<start>\$\{</start>
<end>\}</end>
<include>
<context sub-pattern="0" where="start" style-ref="def:special-char"/>
<context sub-pattern="0" where="end" style-ref="def:special-char"/>
<context ref="builtin-variable"/>
<context ref="variable-reference"/>
<context ref="env-variable-reference"/>
<context ref="escape-sequence"/>
<context ref="disallowed-variable-reference-char"/>
</include>
</context>
<context id="env-variable-reference" style-ref="variable"
style-inside="true" end-at-line-end="true">
<start>\$ENV\{</start>
<end>\}</end>
<include>
<context sub-pattern="0" where="start" style-ref="def:special-char"/>
<context sub-pattern="0" where="end" style-ref="def:special-char"/>
<context ref="variable-reference"/>
<context ref="env-variable-reference"/>
<context ref="escape-sequence"/>
<context ref="disallowed-variable-reference-char"/>
</include>
</context>
<context id="quoted-argument" style-ref="quoted-argument">
<start>(?&lt;=[()"]|\s|^)"</start>
<end>"</end>
<include>
<context ref="variable-reference"/>
<context ref="env-variable-reference"/>
<context style-ref="def:special-char">
<match>\\$</match> <!-- quoted_continuation from the grammar -->
</context>
<context ref="escape-sequence"/>
</include>
</context>
<context id="bracket-argument" style-ref="bracket-argument">
<start>\[(=*)\[</start>
<end>\]\%{1@start}\]</end>
</context>
<context id="bracket-comment" style-ref="def:comment" class="comment" class-disabled="no-spell-check">
<start>#\[(=*)\[</start>
<end>\]\%{1@start}\]</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="in-unquoted-argument">
<include>
<context ref="constant"/>
<context ref="variable-reference"/>
<context ref="env-variable-reference"/>
<context ref="escape-sequence"/>
<context style-ref="legacy-syntax" end-at-line-end="true">
<start>"</start>
<end>"</end>
<include>
<context ref="escape-sequence"/>
</include>
</context>
<context style-ref="legacy-syntax">
<match>\$\(\w+\)</match>
</context>
</include>
</context>
<context id="arguments">
<start>\(</start>
<end>\)</end>
<include>
<context ref="quoted-argument"/>
<context ref="bracket-argument"/>
<context ref="in-unquoted-argument"/>
<context ref="operator"/>
<context ref="arguments"/>
<context ref="bracket-comment"/>
<context ref="def:shell-like-comment"/>
</include>
</context>
<context id="variable-assignment">
<start>\b((?i)SET|UNSET)\b\s*\(\s*([\w_][\w\d_]*)</start>
<end>\)</end>
<include>
<context sub-pattern="1" where="start" style-ref="builtin-command"/>
<context sub-pattern="2" where="start" style-ref="variable"/>
<context ref="arguments:*"/>
</include>
</context>
<context id="cmake">
<include>
<context ref="variable-assignment"/>
<context ref="builtin-command"/>
<context ref="deprecated-builtin-command"/>
<context ref="control"/>
<context ref="arguments"/>
<context ref="bracket-comment"/>
<context ref="def:shell-like-comment"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,646 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2010 - Fernando Brito <email@fernandobrito.com>
Copyright (C) 2011 - Daniel Bader <bugs.bader@googlemail.com>
Credits:
Based on prolog.lang by Ignacio Casal Quinteiro <icq@gnome.org>
Cobol keywords taken from cobol.vim by Tim Pope <vimNOSPAM@tpope.info>
and the COBOL2000 (BS2000) V1.2 compiler description by Fujitsu Siemens.
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="cobol" name="COBOL" version="2.0" _section="Source">
<metadata>
<property name="mimetype">text/x-cobol</property>
<property name="globs">*.cbl;*.cob;*.cbd;*.cdb;*.cdc</property>
<property name="line-comment-start">*</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="statement" name="Statement" map-to="def:statement"/>
<style id="variable" name="Variable" map-to="def:type"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="constant" name="Constant" map-to="def:constant"/>
<style id="string" name="String" map-to="def:string"/>
<style id="number" name="Number" map-to="def:decimal"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="error" name="Error" map-to="def:error"/>
</styles>
<default-regex-options case-sensitive="false"/>
<definitions>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>^\s{0,6}\*</start>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<!-- everything must start at the 8th column, except the line comment, that is indicated ONLY by a * in the 7th -->
<context id="bad-ident" style-ref="error" end-at-line-end="true" class="error" class-disabled="no-spell-check">
<start>^\s{0,6}\w</start>
</context>
<!-- http://docs.hp.com/en/65/books/lrintr.htm -->
<context id="bad-long-line" style-ref="error">
<match>.{74,}</match>
</context>
<!-- Credits: http://stackoverflow.com/questions/632475/regex-to-pick-commas-outside-of-quotes -->
<context id="bad-comment-line" style-ref="error" end-at-line-end="true" class="error" class-disabled="no-spell-check">
<start>(\*)(?=(?:[^"']|["|'][^"']*")*$)</start>
</context>
<context id="variable" style-ref="variable">
<match>\b([A-Za-z0-9_]*)\b</match>
</context>
<context id="string-double-quote" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
</context>
<context id="string-single-quote" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
</context>
<context id="number" style-ref="number">
<match extended="true">
\b[0-9]+(\.[0-9]+)?\b
</match>
</context>
<context id="constant" style-ref="constant">
<keyword>space</keyword>
<keyword>spaces</keyword>
<keyword>null</keyword>
<keyword>zero</keyword>
<keyword>zeroes</keyword>
<keyword>zeros</keyword>
<keyword>low-values</keyword>
<keyword>low-value</keyword>
<keyword>high-values</keyword>
<keyword>high-value</keyword>
<keyword>quotes</keyword>
<keyword>quote</keyword>
</context>
<context id="keyword" style-ref="keyword">
<keyword>accept</keyword>
<keyword>access</keyword>
<keyword>active-class</keyword>
<keyword>add</keyword>
<keyword>address</keyword>
<keyword>advancing</keyword>
<keyword>after</keyword>
<keyword>all</keyword>
<keyword>allocate</keyword>
<keyword>alphabet</keyword>
<keyword>alphabetic-lower</keyword>
<keyword>alphabetic-upper</keyword>
<keyword>alphabetic</keyword>
<keyword>alphanumeric-edited</keyword>
<keyword>alphanumeric</keyword>
<keyword>also</keyword>
<keyword>alter</keyword>
<keyword>alternate</keyword>
<keyword>and</keyword>
<keyword>any</keyword>
<keyword>anycase</keyword>
<keyword>are</keyword>
<keyword>area</keyword>
<keyword>areas</keyword>
<keyword>as</keyword>
<keyword>ascending</keyword>
<keyword>assign</keyword>
<keyword>at</keyword>
<keyword>author</keyword>
<keyword>b-and</keyword>
<keyword>b-not</keyword>
<keyword>b-or</keyword>
<keyword>b-xor</keyword>
<keyword>based</keyword>
<keyword>before</keyword>
<keyword>beginning</keyword>
<keyword>binary-char</keyword>
<keyword>binary-double</keyword>
<keyword>binary-long</keyword>
<keyword>binary-short</keyword>
<keyword>binary</keyword>
<keyword>bit</keyword>
<keyword>blank</keyword>
<keyword>block</keyword>
<keyword>boolean</keyword>
<keyword>bottom</keyword>
<keyword>by</keyword>
<keyword>case</keyword>
<keyword>cbl-ctr</keyword>
<keyword>cf</keyword>
<keyword>ch</keyword>
<keyword>character</keyword>
<keyword>characters</keyword>
<keyword>checking</keyword>
<keyword>class-id</keyword>
<keyword>class-units</keyword>
<keyword>class</keyword>
<keyword>close</keyword>
<keyword>code</keyword>
<keyword>code-set</keyword>
<keyword>col</keyword>
<keyword>collating</keyword>
<keyword>cols</keyword>
<keyword>column</keyword>
<keyword>columns</keyword>
<keyword>comma</keyword>
<keyword>commit</keyword>
<keyword>common</keyword>
<keyword>communication</keyword>
<keyword>comp-1</keyword>
<keyword>comp-2</keyword>
<keyword>comp-3</keyword>
<keyword>comp-5</keyword>
<keyword>comp</keyword>
<keyword>computational-1</keyword>
<keyword>computational-2</keyword>
<keyword>computational-3</keyword>
<keyword>computational-5</keyword>
<keyword>computational</keyword>
<keyword>compute</keyword>
<keyword>condition</keyword>
<keyword>connect</keyword>
<keyword>console</keyword>
<keyword>constant</keyword>
<keyword>contains</keyword>
<keyword>content</keyword>
<keyword>continue</keyword>
<keyword>control</keyword>
<keyword>controls</keyword>
<keyword>converting</keyword>
<keyword>copy</keyword>
<keyword>corr</keyword>
<keyword>corresponding</keyword>
<keyword>count</keyword>
<keyword>creating</keyword>
<keyword>crt</keyword>
<keyword>currency</keyword>
<keyword>current</keyword>
<keyword>cursor</keyword>
<keyword>data-pointer</keyword>
<keyword>database-exception</keyword>
<keyword>database-key-long</keyword>
<keyword>database-key</keyword>
<keyword>date-compiled</keyword>
<keyword>date-written</keyword>
<keyword>date</keyword>
<keyword>day</keyword>
<keyword>day-of-week</keyword>
<keyword>db</keyword>
<keyword>de</keyword>
<keyword>debug-contents</keyword>
<keyword>debug-item</keyword>
<keyword>debug-line</keyword>
<keyword>debug-name</keyword>
<keyword>debug-sub-1</keyword>
<keyword>debug-sub-2</keyword>
<keyword>debug-sub-3</keyword>
<keyword>debugging</keyword>
<keyword>decimal-point</keyword>
<keyword>declaratives</keyword>
<keyword>default</keyword>
<keyword>delete</keyword>
<keyword>delimited</keyword>
<keyword>delimiter</keyword>
<keyword>depending</keyword>
<keyword>descending</keyword>
<keyword>detail</keyword>
<keyword>disable</keyword>
<keyword>disc</keyword>
<keyword>disconnect</keyword>
<keyword>display</keyword>
<keyword>divide</keyword>
<keyword>division</keyword>
<keyword>down</keyword>
<keyword>duplicate</keyword>
<keyword>duplicates</keyword>
<keyword>dynamic</keyword>
<keyword>ebcdic</keyword>
<keyword>ec</keyword>
<keyword>else</keyword>
<keyword>empty</keyword>
<keyword>enable</keyword>
<keyword>end-accept</keyword>
<keyword>end-add</keyword>
<keyword>end-compute</keyword>
<keyword>end-delete</keyword>
<keyword>end-display</keyword>
<keyword>end-divide</keyword>
<keyword>end-evaluate</keyword>
<keyword>end-invoke</keyword>
<keyword>end-multiply</keyword>
<keyword>end-of-page</keyword>
<keyword>end-read</keyword>
<keyword>end-receive</keyword>
<keyword>end-return</keyword>
<keyword>end-rewrite</keyword>
<keyword>end-search</keyword>
<keyword>end-start</keyword>
<keyword>end-string</keyword>
<keyword>end-subtract</keyword>
<keyword>end-unstring</keyword>
<keyword>end-write</keyword>
<keyword>end</keyword>
<keyword>ending</keyword>
<keyword>entry</keyword>
<keyword>eo</keyword>
<keyword>eop</keyword>
<keyword>equal</keyword>
<keyword>equals</keyword>
<keyword>erase</keyword>
<keyword>error</keyword>
<keyword>escape</keyword>
<keyword>evaluate</keyword>
<keyword>every</keyword>
<keyword>exception-object</keyword>
<keyword>exception</keyword>
<keyword>exclusive</keyword>
<keyword>exit</keyword>
<keyword>extend</keyword>
<keyword>extended</keyword>
<keyword>external</keyword>
<keyword>factory</keyword>
<keyword>false</keyword>
<keyword>fd</keyword>
<keyword>fetch</keyword>
<keyword>file-control</keyword>
<keyword>filler</keyword>
<keyword>final</keyword>
<keyword>find</keyword>
<keyword>finish</keyword>
<keyword>first</keyword>
<keyword>float-extended</keyword>
<keyword>float-long</keyword>
<keyword>float-short</keyword>
<keyword>footing</keyword>
<keyword>for</keyword>
<keyword>format</keyword>
<keyword>free</keyword>
<keyword>from</keyword>
<keyword>function-id</keyword>
<keyword>function</keyword>
<keyword>generate</keyword>
<keyword>get</keyword>
<keyword>giving</keyword>
<keyword>global</keyword>
<keyword>go</keyword>
<keyword>greater</keyword>
<keyword>group-usage</keyword>
<keyword>group</keyword>
<keyword>heading</keyword>
<keyword>i-o-control</keyword>
<keyword>i-o</keyword>
<keyword>id</keyword>
<keyword>ignoring</keyword>
<keyword>in</keyword>
<keyword>including</keyword>
<keyword>index</keyword>
<keyword>indexed</keyword>
<keyword>indicate</keyword>
<keyword>inherits</keyword>
<keyword>initial</keyword>
<keyword>initialize</keyword>
<keyword>initiate</keyword>
<keyword>input</keyword>
<keyword>inspect</keyword>
<keyword>installation</keyword>
<keyword>interface</keyword>
<keyword>interface-id</keyword>
<keyword>into</keyword>
<keyword>invalid</keyword>
<keyword>is</keyword>
<keyword>just</keyword>
<keyword>justified</keyword>
<keyword>keep</keyword>
<keyword>key</keyword>
<keyword>label</keyword>
<keyword>last</keyword>
<keyword>leading</keyword>
<keyword>left</keyword>
<keyword>length</keyword>
<keyword>less</keyword>
<keyword>limit</keyword>
<keyword>limited</keyword>
<keyword>limits</keyword>
<keyword>linage</keyword>
<keyword>line</keyword>
<keyword>line-counter</keyword>
<keyword>lines</keyword>
<keyword>locale</keyword>
<keyword>lock</keyword>
<keyword>mask</keyword>
<keyword>matching</keyword>
<keyword>member</keyword>
<keyword>members</keyword>
<keyword>membership</keyword>
<keyword>memory</keyword>
<keyword>merge</keyword>
<keyword>message</keyword>
<keyword>method</keyword>
<keyword>method-id</keyword>
<keyword>minus</keyword>
<keyword>mode</keyword>
<keyword>modify</keyword>
<keyword>modules</keyword>
<keyword>more-labels</keyword>
<keyword>move</keyword>
<keyword>multiple</keyword>
<keyword>multiply</keyword>
<keyword>national-edited</keyword>
<keyword>national</keyword>
<keyword>native</keyword>
<keyword>negative</keyword>
<keyword>nested</keyword>
<keyword>next</keyword>
<keyword>no</keyword>
<keyword>not</keyword>
<keyword>number</keyword>
<keyword>numeric-edited</keyword>
<keyword>numeric</keyword>
<keyword>object-computer</keyword>
<keyword>object-reference</keyword>
<keyword>object</keyword>
<keyword>occurence</keyword>
<keyword>occurs</keyword>
<keyword>of</keyword>
<keyword>off</keyword>
<keyword>omitted</keyword>
<keyword>on</keyword>
<keyword>open</keyword>
<keyword>optional</keyword>
<keyword>options</keyword>
<keyword>or</keyword>
<keyword>order</keyword>
<keyword>organization</keyword>
<keyword>other</keyword>
<keyword>output</keyword>
<keyword>overflow</keyword>
<keyword>override</keyword>
<keyword>owner</keyword>
<keyword>packed-decimal</keyword>
<keyword>padding</keyword>
<keyword>page-counter</keyword>
<keyword>page</keyword>
<keyword>permanent</keyword>
<keyword>pf</keyword>
<keyword>ph</keyword>
<keyword>pic</keyword>
<keyword>picture</keyword>
<keyword>plus</keyword>
<keyword>pointer</keyword>
<keyword>position</keyword>
<keyword>positive</keyword>
<keyword>present</keyword>
<keyword>print-switch</keyword>
<keyword>printing</keyword>
<keyword>prior</keyword>
<keyword>proceed</keyword>
<keyword>program-begin</keyword>
<keyword>program-done</keyword>
<keyword>program-id</keyword>
<keyword>program-pointer</keyword>
<keyword>program</keyword>
<keyword>property</keyword>
<keyword>protected</keyword>
<keyword>prototype</keyword>
<keyword>purge</keyword>
<keyword>raise</keyword>
<keyword>raising</keyword>
<keyword>random</keyword>
<keyword>rd</keyword>
<keyword>read</keyword>
<keyword>ready</keyword>
<keyword>realm-name</keyword>
<keyword>realm</keyword>
<keyword>receive</keyword>
<keyword>record</keyword>
<keyword>recording</keyword>
<keyword>records</keyword>
<keyword>redefines</keyword>
<keyword>reel</keyword>
<keyword>reference</keyword>
<keyword>relative</keyword>
<keyword>release</keyword>
<keyword>remainder</keyword>
<keyword>removal</keyword>
<keyword>renames</keyword>
<keyword>repeated</keyword>
<keyword>replace</keyword>
<keyword>replacing</keyword>
<keyword>report</keyword>
<keyword>reporting</keyword>
<keyword>reports</keyword>
<keyword>repository</keyword>
<keyword>rerun</keyword>
<keyword>reserve</keyword>
<keyword>reset</keyword>
<keyword>result</keyword>
<keyword>resume</keyword>
<keyword>retaining</keyword>
<keyword>retrieval</keyword>
<keyword>retry</keyword>
<keyword>return</keyword>
<keyword>returning</keyword>
<keyword>reversed</keyword>
<keyword>rewind</keyword>
<keyword>rewrite</keyword>
<keyword>rf</keyword>
<keyword>rh</keyword>
<keyword>right</keyword>
<keyword>rollback</keyword>
<keyword>rounded</keyword>
<keyword>run</keyword>
<keyword>same</keyword>
<keyword>screen</keyword>
<keyword>sd</keyword>
<keyword>search</keyword>
<keyword>section</keyword>
<keyword>security</keyword>
<keyword>segment-limit</keyword>
<keyword>select</keyword>
<keyword>selective</keyword>
<keyword>self</keyword>
<keyword>send</keyword>
<keyword>sentence</keyword>
<keyword>separate</keyword>
<keyword>sequence</keyword>
<keyword>sequential</keyword>
<keyword>set-selection</keyword>
<keyword>set</keyword>
<keyword>sets</keyword>
<keyword>sharing</keyword>
<keyword>sign</keyword>
<keyword>size</keyword>
<keyword>sort-merge</keyword>
<keyword>sort-tape</keyword>
<keyword>sort-tapes</keyword>
<keyword>sort</keyword>
<keyword>sorted</keyword>
<keyword>source-computer</keyword>
<keyword>source</keyword>
<keyword>sources</keyword>
<keyword>special-names</keyword>
<keyword>standard-1</keyword>
<keyword>standard-2</keyword>
<keyword>standard</keyword>
<keyword>start</keyword>
<keyword>status</keyword>
<keyword>stop</keyword>
<keyword>store</keyword>
<keyword>string</keyword>
<keyword>sub-schema</keyword>
<keyword>subtract</keyword>
<keyword>sum</keyword>
<keyword>super</keyword>
<keyword>suppress</keyword>
<keyword>suppressing</keyword>
<keyword>symbolic</keyword>
<keyword>sync</keyword>
<keyword>synchronized</keyword>
<keyword>system-default</keyword>
<keyword>system</keyword>
<keyword>table</keyword>
<keyword>tally</keyword>
<keyword>tallying</keyword>
<keyword>tape</keyword>
<keyword>tapes</keyword>
<keyword>tenant</keyword>
<keyword>terminal</keyword>
<keyword>terminate</keyword>
<keyword>test</keyword>
<keyword>than</keyword>
<keyword>then</keyword>
<keyword>through</keyword>
<keyword>thru</keyword>
<keyword>time</keyword>
<keyword>times</keyword>
<keyword>to</keyword>
<keyword>top</keyword>
<keyword>trailing</keyword>
<keyword>true</keyword>
<keyword>try</keyword>
<keyword>type</keyword>
<keyword>typedef</keyword>
<keyword>unit</keyword>
<keyword>units</keyword>
<keyword>universal</keyword>
<keyword>unlock</keyword>
<keyword>unstring</keyword>
<keyword>until</keyword>
<keyword>up</keyword>
<keyword>update</keyword>
<keyword>upon</keyword>
<keyword>usage-mode</keyword>
<keyword>usage</keyword>
<keyword>use</keyword>
<keyword>user-default</keyword>
<keyword>using</keyword>
<keyword>val-status</keyword>
<keyword>valid</keyword>
<keyword>validate-status</keyword>
<keyword>validate</keyword>
<keyword>value</keyword>
<keyword>values</keyword>
<keyword>varying</keyword>
<keyword>via</keyword>
<keyword>when</keyword>
<keyword>with</keyword>
<keyword>within</keyword>
<keyword>words</keyword>
<keyword>write</keyword>
</context>
<context id="section-name" style-ref="keyword">
<keyword>configuration</keyword>
<keyword>input-output</keyword>
<keyword>file</keyword>
<keyword>working-storage</keyword>
<keyword>local-storage</keyword>
<keyword>linkage</keyword>
</context>
<context id="division-name" style-ref="keyword">
<keyword>identification</keyword>
<keyword>environment</keyword>
<keyword>data</keyword>
<keyword>procedure</keyword>
</context>
<context id="call" style-ref="statement">
<keyword>end-call</keyword>
<keyword>call</keyword>
<keyword>cancel</keyword>
<keyword>goback</keyword>
<keyword>end-perform</keyword>
<keyword>perform</keyword>
<keyword>invoke</keyword>
<keyword>end-if</keyword>
<keyword>if</keyword>
</context>
<context id="cobol" class="no-spell-check">
<include>
<context ref="constant"/>
<context ref="keyword"/>
<context ref="call"/>
<context ref="division-name"/>
<context ref="section-name"/>
<context ref="line-comment"/>
<context ref="bad-ident"/>
<context ref="bad-comment-line"/>
<context ref="bad-long-line"/>
<context ref="string-double-quote"/>
<context ref="string-single-quote"/>
<context ref="number"/>
<context ref="variable"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,548 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Tarn W. Burton
Copyright (C) 2020 Tarn W. Burton <twburton@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="commonlisp" name="Common Lisp" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-common-lisp</property>
<property name="globs">*.asd;*.lisp</property>
<property name="line-comment-start">;</property>
<property name="block-comment-start">#\|</property>
<property name="block-comment-end">\|#</property>
</metadata>
<styles>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="builtin" name="Builtin Symbols" map-to="def:keyword"/>
<style id="character" name="Character" map-to="def:character"/>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="constant" name="Constant" map-to="def:constant"/>
<style id="error" name="Error" map-to="def:error"/>
<style id="format-directive" name="Format Directive" map-to="def:special-char"/>
<style id="keyword" name="Keyword" map-to="def:type"/>
<style id="lambda-list-keyword" name="Lambda List Keyword" map-to="def:type"/>
<style id="number" name="Number" map-to="def:number"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="special" name="Special" map-to="def:type"/>
<style id="string" name="String" map-to="def:string"/>
<style id="symbol" name="Symbol" map-to="def:identifier"/>
</styles>
<default-regex-options case-sensitive="false"/>
<keyword-char-class>([^()"`,#\s])</keyword-char-class>
<definitions>
<!--
Token Patterns
References: http://www.lispworks.com/documentation/HyperSpec/Body/02_ad.htm
http://www.lispworks.com/documentation/HyperSpec/Body/02_c.htm
-->
<define-regex id="token-start" extended="true">
((?&lt;=[()'"`,@#\s])|^)
</define-regex>
<define-regex id="token" extended="true">
(([^()'"`,#\s\\|]|\\\S|\|[^|]*\|)+)
</define-regex>
<define-regex id="package" extended="true">
(([^()'"`,:#\s\\|]|\\\S|\|[^|]*\|)+)
</define-regex>
<define-regex id="token-end" extended="true">
(?=([()';"`,#]|$|\s))
</define-regex>
<!--
Basic Numbers
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_ca.htm
The following patterns assume that the input radix is base 10.
-->
<context id="decimal-rational" style-ref="number">
<match extended="true">
\%{token-start}
([+-]?[0-9]+([.]|/[0-9]+)?)
\%{token-end}
</match>
</context>
<context id="float" style-ref="number">
<match extended="true">
\%{token-start}
([+-]?([0-9]*[.][0-9]+|[0-9]+([.][0-9]*)?)([defls][+-]?[0-9]+)?)
\%{token-end}
</match>
</context>
<!--
Binary Rationals
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dhg.htm
-->
<context id="binary-rational" style-ref="number">
<match extended="true">
\%{token-start}
(\#b[+-]?[01]+([.]|/[01]+)?)
\%{token-end}
</match>
</context>
<!--
Octal Rationals
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dhh.htm
-->
<context id="octal-rational" style-ref="number">
<match extended="true">
\%{token-start}
(\#o[+-]?[0-7]+([.]|/[0-7]+)?)
\%{token-end}
</match>
</context>
<!--
Hexadecimal Rationals
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dhi.htm
-->
<context id="hexadecimal-rational" style-ref="number">
<match extended="true">
\%{token-start}
(\#x[+-]?[0-9a-f]+([.]|/[0-9a-f]+)?)
\%{token-end}
</match>
</context>
<!--
Arbitrary Radix Rationals
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dhj.htm
-->
<context id="radix-rational" style-ref="number">
<match extended="true">
\%{token-start}
(\#[0-9]+r[+-]?[0-9a-z]+([.]|/[0-9a-z]+)?)
\%{token-end}
</match>
</context>
<!--
Semicolon Comments
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dd.htm
-->
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>;</start>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<!--
Single Quote
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dc.htm
-->
<context id="single-quote" style-ref="operator">
<match extended="true">
(')
</match>
</context>
<!--
Format Directives
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/22_c.htm
-->
<context id="format-directive" style-ref="format-directive" extend-parent="false">
<match extended="true">
~(?:/[^/]+/|$|(?:[-+]?[0-9]+|'.|[#V,])*:?@?[[\]{}()~%&amp;$_&lt;&gt;*?;\^|ABCDEFGIOPRSTWX])
</match>
</context>
<!--
Strings
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_de.htm
-->
<context id="string" style-ref="string" class="string">
<start>"</start>
<end>"</end>
<include>
<context ref="format-directive"/>
<context ref="def:escape"/>
</include>
</context>
<!--
Template Operators (backquote and comma)
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_df.htm
-->
<context id="template-operators" style-ref="operator">
<match extended="true">
(`|,@?)
</match>
</context>
<!--
Sharpsign Dispatching Macro
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dh.htm
-->
<!--
Sharpsign Backlash (characters)
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dha.htm
-->
<context id="character" style-ref="character" class="string">
<match extended="true">
\%{token-start}
(\#\\\S(\%{token})?)
\%{token-end}
</match>
</context>
<!--
Sharpsign Asterisk (bit vector)
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dhd.htm
-->
<context id="sharpsign-asterisk" style-ref="constant">
<match extended="true">
(\#[0-9]*\*[01]*)
</match>
</context>
<!--
Sharpsign Colon (uninterned symbol)
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dhe.htm
-->
<context id="sharpsign-colon" style-ref="symbol">
<match extended="true">
(\#:\%{token})
\%{token-end}
</match>
</context>
<!--
Sharpsign Vertical-Bar (block comment)
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dhs.htm
-->
<context id="block-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>#\|</start>
<end>\|#</end>
<include>
<context ref="block-comment"/>
<context ref="def:in-comment"/>
</include>
</context>
<!--
Sharpsign Other
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dh.htm
Undefined sharpsigns or ones that precede a Lisp expression and therefore
act a bit like an operator.
-->
<context id="sharpsign-other" style-ref="operator">
<match extended="true">
(\#[0-9]*[!"#$%&amp;'(,;=&gt;?@[\]^_`~{}+\-./ac-npqs-wyz])
</match>
</context>
<!--
Sharpsign Invalid
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/02_dh.htm
-->
<context id="sharpsign-invalid" style-ref="error">
<match extended="true">
(\#[0-9]*[\s)&lt;])
</match>
</context>
<!--
Keyword Like Builtins
The following identifiers are symbols in the Common Lisp package that
deal with variable assignment, symbol manipulation, flow control,
compilation, or declarations.
-->
<context id="builtin" style-ref="builtin">
<keyword>abort</keyword>
<keyword>add-method</keyword>
<keyword>apply</keyword>
<keyword>assert</keyword>
<keyword>block</keyword>
<keyword>break</keyword>
<keyword>call-method</keyword>
<keyword>call-next-method</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
<keyword>ccase</keyword>
<keyword>cerror</keyword>
<keyword>compile-file</keyword>
<keyword>compile</keyword>
<keyword>cond</keyword>
<keyword>continue</keyword>
<keyword>ctypecase</keyword>
<keyword>debug</keyword>
<keyword>decf</keyword>
<keyword>declaim</keyword>
<keyword>declaration</keyword>
<keyword>declare</keyword>
<keyword>defclass</keyword>
<keyword>defconstant</keyword>
<keyword>defgeneric</keyword>
<keyword>define-compiler-macro</keyword>
<keyword>define-condition</keyword>
<keyword>define-method-combination</keyword>
<keyword>define-modify-macro</keyword>
<keyword>define-setf-expander</keyword>
<keyword>define-symbol-macro</keyword>
<keyword>defmacro</keyword>
<keyword>defmethod</keyword>
<keyword>defpackage</keyword>
<keyword>defparameter</keyword>
<keyword>defsetf</keyword>
<keyword>defstruct</keyword>
<keyword>deftype</keyword>
<keyword>defun</keyword>
<keyword>defvar</keyword>
<keyword>delete-package</keyword>
<keyword>destructuring-bind</keyword>
<keyword>disassemble</keyword>
<keyword>do-all-symbols</keyword>
<keyword>do-external-symbols</keyword>
<keyword>do</keyword>
<keyword>do\*</keyword>
<keyword>dolist</keyword>
<keyword>do-symbols</keyword>
<keyword>dotimes</keyword>
<keyword>dynamic-extent</keyword>
<keyword>ecase</keyword>
<keyword>ed</keyword>
<keyword>error</keyword>
<keyword>etypecase</keyword>
<keyword>eval</keyword>
<keyword>eval-when</keyword>
<keyword>export</keyword>
<keyword>fdefinition</keyword>
<keyword>find-method</keyword>
<keyword>find-package</keyword>
<keyword>find-restart</keyword>
<keyword>find-symbol</keyword>
<keyword>flet</keyword>
<keyword>ftype</keyword>
<keyword>funcall</keyword>
<keyword>getf</keyword>
<keyword>get</keyword>
<keyword>get-macro-character</keyword>
<keyword>get-properties</keyword>
<keyword>get-setf-expansion</keyword>
<keyword>go</keyword>
<keyword>handler-bind</keyword>
<keyword>handler-case</keyword>
<keyword>if</keyword>
<keyword>ignorable</keyword>
<keyword>ignore-errors</keyword>
<keyword>ignore</keyword>
<keyword>import</keyword>
<keyword>incf</keyword>
<keyword>inline</keyword>
<keyword>in-package</keyword>
<keyword>inspect</keyword>
<keyword>intern</keyword>
<keyword>invoke-debugger</keyword>
<keyword>invoke-restart-interactively</keyword>
<keyword>invoke-restart</keyword>
<keyword>labels</keyword>
<keyword>lambda</keyword>
<keyword>let</keyword>
<keyword>let\*</keyword>
<keyword>list</keyword>
<keyword>list\*</keyword>
<keyword>load</keyword>
<keyword>locally</keyword>
<keyword>loop-finish</keyword>
<keyword>loop</keyword>
<keyword>macroexpand-1</keyword>
<keyword>macroexpand</keyword>
<keyword>macrolet</keyword>
<keyword>muffle-warning</keyword>
<keyword>multiple-value-bind</keyword>
<keyword>multiple-value-call</keyword>
<keyword>multiple-value-list</keyword>
<keyword>multiple-value-prog1</keyword>
<keyword>multiple-value-setq</keyword>
<keyword>no-next-method</keyword>
<keyword>notinline</keyword>
<keyword>optimize</keyword>
<keyword>otherwise</keyword>
<keyword>pop</keyword>
<keyword>prog1</keyword>
<keyword>prog2</keyword>
<keyword>prog</keyword>
<keyword>prog\*</keyword>
<keyword>progn</keyword>
<keyword>progv</keyword>
<keyword>psetf</keyword>
<keyword>psetq</keyword>
<keyword>push</keyword>
<keyword>pushnew</keyword>
<keyword>quote</keyword>
<keyword>remf</keyword>
<keyword>remove-method</keyword>
<keyword>require</keyword>
<keyword>restart-bind</keyword>
<keyword>restart-case</keyword>
<keyword>restart</keyword>
<keyword>return-from</keyword>
<keyword>return</keyword>
<keyword>rotatef</keyword>
<keyword>safety</keyword>
<keyword>setf</keyword>
<keyword>set</keyword>
<keyword>set-macro-character</keyword>
<keyword>setq</keyword>
<keyword>shadowing-import</keyword>
<keyword>shiftf</keyword>
<keyword>signal</keyword>
<keyword>special</keyword>
<keyword>speed</keyword>
<keyword>step</keyword>
<keyword>store-value</keyword>
<keyword>tagbody</keyword>
<keyword>throw</keyword>
<keyword>trace</keyword>
<keyword>typecase</keyword>
<keyword>type</keyword>
<keyword>unexport</keyword>
<keyword>unintern</keyword>
<keyword>unless</keyword>
<keyword>untrace</keyword>
<keyword>unuse-package</keyword>
<keyword>unwind-protect</keyword>
<keyword>use-package</keyword>
<keyword>use-value</keyword>
<keyword>warning</keyword>
<keyword>warn</keyword>
<keyword>when</keyword>
<keyword>with-accessors</keyword>
<keyword>with-compilation-unit</keyword>
<keyword>with-condition-restarts</keyword>
<keyword>with-hash-table-iterator</keyword>
<keyword>with-input-from-string</keyword>
<keyword>with-open-file</keyword>
<keyword>with-open-stream</keyword>
<keyword>with-output-to-string</keyword>
<keyword>with-package-iterator</keyword>
<keyword>with-simple-restart</keyword>
<keyword>with-slots</keyword>
<keyword>with-standard-io-syntax</keyword>
</context>
<context id="boolean" style-ref="boolean">
<keyword>nil</keyword>
<keyword>t</keyword>
</context>
<context id="special-variable" style-ref="special">
<match extended="true">
\%{token-start}
((\%{package}::?)?\*(\%{token})*?\*)
\%{token-end}
</match>
</context>
<context id="constant-variable" style-ref="constant">
<match extended="true">
\%{token-start}
((\%{package}::?)?\+(\%{token})*?\+)
\%{token-end}
</match>
</context>
<!--
Keyword Symbols
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/11_abc.htm
-->
<context id="keyword" style-ref="keyword">
<match extended="true">
\%{token-start}
(:\%{token})
\%{token-end}
</match>
</context>
<!--
Lambda List Keywords
Reference: http://www.lispworks.com/documentation/HyperSpec/Body/03_da.htm
Instead of listing the specific keywords in the specification allow for
implementation specific ones like `sb-int:&more`.
-->
<context id="lambda-list-keyword" style-ref="lambda-list-keyword">
<match extended="true">
\%{token-start}
((\%{package}::?)?&amp;\%{token})
\%{token-end}
</match>
</context>
<context id="commonlisp" class="no-spell-check">
<include>
<context ref="binary-rational"/>
<context ref="block-comment"/>
<context ref="boolean"/>
<context ref="builtin"/>
<context ref="character"/>
<context ref="constant-variable"/>
<context ref="decimal-rational"/>
<context ref="float"/>
<context ref="hexadecimal-rational"/>
<context ref="keyword"/>
<context ref="lambda-list-keyword"/>
<context ref="line-comment"/>
<context ref="octal-rational"/>
<context ref="radix-rational"/>
<context ref="sharpsign-asterisk"/>
<context ref="sharpsign-colon"/>
<context ref="sharpsign-invalid"/>
<context ref="sharpsign-other"/>
<context ref="single-quote"/>
<context ref="special-variable"/>
<context ref="string"/>
<context ref="template-operators"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,134 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Marco Barisione, Emanuele Aina, Ole Christian Eidheim
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
Copyright (C) 2018 Ole Christian Eidheim <eidheim@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="cpp" name="C++" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-c++;text/x-cpp;text/x-c++src</property>
<property name="globs">*.cpp;*.cxx;*.cc;*.C;*.c++;*.tpp</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<style id="raw-string" name="Raw String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="c:keyword"/>
<style id="type" name="Data Type" map-to="c:type"/>
<style id="common-defines" name="Common Defines" map-to="c:common-defines"/>
</styles>
<definitions>
<!-- C++-specific stuff (i.e. stuff which is not C) -->
<context id="cpp-proper">
<include>
<context id="raw-string" style-ref="raw-string" class="string" class-disabled="no-spell-check">
<start>R"([^\(\)\\ ]*)\(</start>
<end>\)\%{1@start}"</end>
</context>
<context id="keywords" style-ref="keyword">
<keyword>alignas</keyword>
<keyword>alignof</keyword>
<keyword>and</keyword>
<keyword>and_eq</keyword>
<keyword>bitand</keyword>
<keyword>bitor</keyword>
<keyword>catch</keyword>
<keyword>compl</keyword>
<keyword>concept</keyword>
<keyword>consteval</keyword>
<keyword>constexpr</keyword>
<keyword>const_cast</keyword>
<keyword>co_await</keyword>
<keyword>co_return</keyword>
<keyword>co_yield</keyword>
<keyword>decltype</keyword>
<keyword>delete</keyword>
<keyword>dynamic_cast</keyword>
<keyword>export</keyword>
<keyword>false</keyword>
<keyword>final</keyword>
<keyword>friend</keyword>
<keyword>import</keyword>
<keyword>module</keyword>
<keyword>new</keyword>
<keyword>noexcept</keyword>
<keyword>not</keyword>
<keyword>not_eq</keyword>
<keyword>nullptr</keyword>
<keyword>operator</keyword>
<keyword>or</keyword>
<keyword>or_eq</keyword>
<keyword>override</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>reinterpret_cast</keyword>
<keyword>requires</keyword>
<keyword>static_assert</keyword>
<keyword>static_cast</keyword>
<keyword>this</keyword>
<keyword>thread_local</keyword>
<keyword>throw</keyword>
<keyword>true</keyword>
<keyword>try</keyword>
<keyword>typeid</keyword>
<keyword>using</keyword>
<keyword>xor</keyword>
<keyword>xor_eq</keyword>
<keyword>class</keyword>
<keyword>namespace</keyword>
<keyword>typename</keyword>
<keyword>template</keyword>
<keyword>virtual</keyword>
</context>
<context id="types" style-ref="type">
<keyword>bool</keyword>
<keyword>char16_t</keyword>
<keyword>char32_t</keyword>
<keyword>explicit</keyword>
<keyword>inline</keyword>
<keyword>mutable</keyword>
<keyword>nullptr_t</keyword>
<keyword>wchar_t</keyword>
</context>
<context id="common-defines" style-ref="common-defines">
<keyword>__STDC__</keyword>
<keyword>__cplusplus</keyword>
</context>
</include>
</context>
<!-- actual language definition: C++-specific stuff plus everything from C -->
<context id="cpp" class="no-spell-check">
<include>
<context ref="cpp-proper"/>
<context ref="c:c"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Marco Barisione, Emanuele Aina
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="cpphdr" _name="C++ Header" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-c++hdr</property>
<property name="globs">*.hh;*.hp;*.hpp;*.h++</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<definitions>
<context id="cpphdr">
<include>
<context ref="cpp:cpp-proper"/>
<context ref="c:c"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,285 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: John Luke <jluke@cfl.rr.com>
Copyright (C) 2003 John Luke <jluke@cfl.rr.com>
Copyright (C) 2004 Jeroen Zwartepoorte <jeroen@xs4all.nl>
Copyright (C) 2004 Alessio Frusciante <algol@firenze.linux.it>
Copyright (C) 2005 Brion Vibber <brion@pobox.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="c-sharp" name="C#" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-csharpsrc;text/x-csharp</property>
<property name="globs">*.cs</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="error" name="Error" map-to="def:error"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="string" name="String" map-to="def:string"/>
<style id="char" name="Character" map-to="def:character"/>
<style id="escaped-character" name="Escaped Character" map-to="def:special-char"/>
<style id="format" name="String Format" map-to="def:special-char"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="null-value" name="Null Value" map-to="def:special-constant"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="decimal" name="Decimal number" map-to="def:decimal"/>
<style id="hexadecimal" name="Hexadecimal number" map-to="def:base-n-integer"/>
<style id="real" name="Real number" map-to="def:floating-point"/>
</styles>
<definitions>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>//</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="multiline-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<define-regex id="preproc-start">^\s*#\s*</define-regex>
<context id="if-false-comment" style-ref="comment">
<start>\%{preproc-start}if\s*false\b</start>
<end>\%{preproc-start}(endif|else|elif)\b</end>
<include>
<context id="if-in-if-false">
<start>\%{preproc-start}if(n?def)?\b</start>
<end>\%{preproc-start}endif\b</end>
<include>
<context ref="if-in-if-false"/>
<context ref="def:in-comment"/>
</include>
</context>
<context ref="def:in-comment"/>
</include>
</context>
<context id="preprocessor" style-ref="preprocessor" end-at-line-end="true">
<start extended="true">
\%{preproc-start}
(define|undef|if(n?def)?|else|elif|endif|line|error|warning|region|endregion)
\b
</start>
<include>
<context ref="line-comment"/>
<context ref="multiline-comment"/>
</include>
</context>
<context id="multiline-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>@"</start>
<end>"</end>
</context>
<context id="keywords" style-ref="keyword">
<keyword>async</keyword>
<keyword>await</keyword>
<keyword>class</keyword>
<keyword>delegate</keyword>
<keyword>enum</keyword>
<keyword>event</keyword>
<keyword>interface</keyword>
<keyword>namespace</keyword>
<keyword>struct</keyword>
<keyword>using</keyword>
<keyword>abstract</keyword>
<keyword>const</keyword>
<keyword>explicit</keyword>
<keyword>extern</keyword>
<keyword>fixed</keyword>
<keyword>implicit</keyword>
<keyword>internal</keyword>
<keyword>lock</keyword>
<keyword>out</keyword>
<keyword>override</keyword>
<keyword>params</keyword>
<keyword>partial</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>ref</keyword>
<keyword>sealed</keyword>
<keyword>static</keyword>
<keyword>readonly</keyword>
<keyword>unsafe</keyword>
<keyword>virtual</keyword>
<keyword>volatile</keyword>
<keyword>add</keyword>
<keyword>as</keyword>
<keyword>assembly</keyword>
<keyword>base</keyword>
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
<keyword>checked</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>finally</keyword>
<keyword>for</keyword>
<keyword>foreach</keyword>
<keyword>get</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>is</keyword>
<keyword>nameof</keyword>
<keyword>new</keyword>
<keyword>remove</keyword>
<keyword>return</keyword>
<keyword>set</keyword>
<keyword>sizeof</keyword>
<keyword>stackalloc</keyword>
<keyword>super</keyword>
<keyword>switch</keyword>
<keyword>this</keyword>
<keyword>throw</keyword>
<keyword>try</keyword>
<keyword>typeof</keyword>
<keyword>unchecked</keyword>
<keyword>value</keyword>
<keyword>var</keyword>
<keyword>void</keyword>
<keyword>while</keyword>
<keyword>yield</keyword>
</context>
<context id="primitives" style-ref="type">
<keyword>bool</keyword>
<keyword>byte</keyword>
<keyword>char</keyword>
<keyword>decimal</keyword>
<keyword>double</keyword>
<keyword>dynamic</keyword>
<keyword>float</keyword>
<keyword>int</keyword>
<keyword>long</keyword>
<keyword>object</keyword>
<keyword>operator</keyword>
<keyword>sbyte</keyword>
<keyword>short</keyword>
<keyword>string</keyword>
<keyword>uint</keyword>
<keyword>ulong</keyword>
<keyword>ushort</keyword>
</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="decimal" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
[0-9]+[uUlL]*
(?![\w\.])
</match>
</context>
<context id="hexadecimal" style-ref="hexadecimal">
<match extended="true">
(?&lt;![\w\.])
0[xX][a-fA-F0-9]+[uUlL]*
(?![\w\.])
</match>
</context>
<context id="real" style-ref="real">
<match extended="true">
(?&lt;![\w\.])
((\.[0-9]+|[0-9]+\.[0-9]*)([Ee][+-]?[0-9]*)?[FfDdMm]?|
([0-9]+[Ee][+-]?[0-9]*)[FfDdMm]? |
([0-9]+)[FfDdMm])
(?![\w\.])
</match>
</context>
<!-- FIXME Taken from C, is it right? -->
<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="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context id="csharp-format" style-ref="format">
<match>{[0-9][0-9:\#\%,./cdefgnrxtsuDTFGMY]*}</match>
</context>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
<context ref="def:line-continue"/>
</include>
</context>
<context id="char" style-ref="char">
<!-- FIXME I don't know C# syntax -->
<match>'(\%{escaped-character}|.)'</match>
</context>
<context id="c-sharp" class="no-spell-check">
<include>
<context ref="multiline-string"/>
<context ref="string"/>
<context ref="char"/>
<context ref="line-comment"/>
<context ref="multiline-comment"/>
<context ref="close-comment-outside-comment"/>
<context ref="if-false-comment"/>
<context ref="preprocessor"/>
<context ref="keywords"/>
<context ref="primitives"/>
<context ref="null-value"/>
<context ref="boolean"/>
<context ref="decimal"/>
<context ref="hexadecimal"/>
<context ref="real"/>
</include>
</context>
</definitions>
</language>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Martin Blanchard <tchaik@gmx.com>
Copyright (C) 2015 Martin Blanchard <tchaik@gmx.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="csv" name="CSV" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">text/csv</property>
<property name="globs">*.csv</property>
</metadata>
<styles>
<style id="decimal" name="Decimal number" map-to="def:decimal"/>
<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="string" name="String" map-to="def:string"/>
</styles>
<definitions>
<context id="decimal" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
[0-9]+
(?![\w\.])
</match>
</context>
<context id="floating-point" style-ref="floating-point">
<match extended="true">
(?&lt;![\w\.])
((\.[0-9]+ | [0-9]+\.[0-9]*) ([Ee][+-]?[0-9]*)? | ([0-9]+[Ee][+-]?[0-9]*))
(?![\w\.])
</match>
</context>
<context id="string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context id="escaped-character" style-ref="escaped-character">
<match extended="true">
\"\" # escaped double-quote
</match>
</context>
</include>
</context>
<context id="csv" class="no-spell-check">
<include>
<context ref="decimal"/>
<context ref="floating-point"/>
<context ref="string"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,281 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Hüseyin Temucin <htemucin@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="cuda" name="CUDA" version="2.0" _section="Source">
<metadata>
<property name="globs">*.cu;*.cuh</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="data-type" name="Data Type" map-to="def:type"/>
<style id="cuda-global" name="Global Functions" map-to="def:function"/>
<style id="cuda-device" name="Device Functions" map-to="def:function"/>
<style id="global-var" name="Global Variables" map-to="def:identifier"/>
</styles>
<definitions>
<context id="cuda-keywords" style-ref="keyword">
<keyword>__global__</keyword>
<keyword>__host__</keyword>
<keyword>__device__</keyword>
<keyword>__constant__</keyword>
<keyword>__shared__</keyword>
</context>
<context id="cuda-types" style-ref="data-type">
<keyword>uint</keyword>
<keyword>int1 </keyword>
<keyword>uint1</keyword>
<keyword>int2</keyword>
<keyword>uint2</keyword>
<keyword>int3</keyword>
<keyword>uint3</keyword>
<keyword>int4</keyword>
<keyword>uint4</keyword>
<keyword>float1</keyword>
<keyword>float2</keyword>
<keyword>float3</keyword>
<keyword>float4</keyword>
<keyword>char1</keyword>
<keyword>char2</keyword>
<keyword>char3</keyword>
<keyword>char4</keyword>
<keyword>uchar1</keyword>
<keyword>uchar2</keyword>
<keyword>uchar3</keyword>
<keyword>uchar4</keyword>
<keyword>short1</keyword>
<keyword>short2</keyword>
<keyword>short3</keyword>
<keyword>short4</keyword>
<keyword>dim1</keyword>
<keyword>dim2</keyword>
<keyword>dim3</keyword>
<keyword>dim4</keyword>
</context>
<context id="cudaglobal" style-ref="global-var">
<keyword>gridDim</keyword>
<keyword>blockIdx</keyword>
<keyword>blockDim</keyword>
<keyword>threadIdx</keyword>
</context>
<context id="kernel-call" style-ref="latex:display-math">
<start>&lt;&lt;&lt;</start>
<end>&gt;&gt;&gt;</end>
</context>
<context id="cudaatom" style-ref="cuda-device">
<keyword>atomicAdd</keyword>
<keyword>atomicAnd</keyword>
<keyword>atomicCAS</keyword>
<keyword>atomicDec</keyword>
<keyword>atomicExch</keyword>
<keyword>atomicInc</keyword>
<keyword>atomicMax</keyword>
<keyword>atomicMin</keyword>
<keyword>atomicOr</keyword>
<keyword>atomicSub</keyword>
<keyword>atomicXor</keyword>
</context>
<context id="cudadev" style-ref="cuda-device">
<keyword>tex1D</keyword>
<keyword>tex1Dfetch</keyword>
<keyword>tex2D</keyword>
<keyword>__float_as_int</keyword>
<keyword>__int_as_float</keyword>
<keyword>__float2int_rn</keyword>
<keyword>__float2int_rz</keyword>
<keyword>__float2int_ru</keyword>
<keyword>__float2int_rd</keyword>
<keyword>__float2uint_rn</keyword>
<keyword>__float2uint_rz</keyword>
<keyword>__float2uint_ru</keyword>
<keyword>__float2uint_rd</keyword>
<keyword>__int2float_rn</keyword>
<keyword>__int2float_rz</keyword>
<keyword>__int2float_ru</keyword>
<keyword>__int2float_rd</keyword>
<keyword>__uint2float_rn</keyword>
<keyword>__uint2float_rz</keyword>
<keyword>__uint2float_ru</keyword>
<keyword>__uint2float_rd</keyword>
<keyword>__fadd_rz</keyword>
<keyword>__fmul_rz</keyword>
<keyword>__fdividef</keyword>
<keyword>__mul24</keyword>
<keyword>__umul24</keyword>
<keyword>__mulhi</keyword>
<keyword>__umulhi</keyword>
<keyword>__mul64hi</keyword>
<keyword>__umul64hi</keyword>
<keyword>min</keyword>
<keyword>umin</keyword>
<keyword>fminf</keyword>
<keyword>fmin</keyword>
<keyword>max</keyword>
<keyword>umax</keyword>
<keyword>fmaxf</keyword>
<keyword>fmax</keyword>
<keyword>abs</keyword>
<keyword>fabsf</keyword>
<keyword>fabs</keyword>
<keyword>sqrtf</keyword>
<keyword>sqrt</keyword>
<keyword>sinf</keyword>
<keyword>__sinf</keyword>
<keyword>sin</keyword>
<keyword>cosf</keyword>
<keyword>__cosf</keyword>
<keyword>cos</keyword>
<keyword>sincosf</keyword>
<keyword>__sincosf</keyword>
<keyword>expf</keyword>
<keyword>__expf</keyword>
<keyword>exp</keyword>
<keyword>logf</keyword>
<keyword>__logf</keyword>
<keyword>log</keyword>
</context>
<context id="cuda-runtime" style-ref="cuda-global">
<keyword>cudaBindTexture</keyword>
<keyword>cudaBindTextureToArray</keyword>
<keyword>cudaChooseDevice</keyword>
<keyword>cudaConfigureCall</keyword>
<keyword>cudaCreateChannelDesc</keyword>
<keyword>cudaD3D10GetDevice</keyword>
<keyword>cudaD3D10MapResources</keyword>
<keyword>cudaD3D10RegisterResource</keyword>
<keyword>cudaD3D10ResourceGetMappedArray</keyword>
<keyword>cudaD3D10ResourceGetMappedPitch</keyword>
<keyword>cudaD3D10ResourceGetMappedPointer</keyword>
<keyword>cudaD3D10ResourceGetMappedSize</keyword>
<keyword>cudaD3D10ResourceGetSurfaceDimensions</keyword>
<keyword>cudaD3D10ResourceSetMapFlags</keyword>
<keyword>cudaD3D10SetDirect3DDevice</keyword>
<keyword>cudaD3D10UnmapResources</keyword>
<keyword>cudaD3D10UnregisterResource</keyword>
<keyword>cudaD3D9GetDevice</keyword>
<keyword>cudaD3D9GetDirect3DDevice</keyword>
<keyword>cudaD3D9MapResources</keyword>
<keyword>cudaD3D9RegisterResource</keyword>
<keyword>cudaD3D9ResourceGetMappedArray</keyword>
<keyword>cudaD3D9ResourceGetMappedPitch</keyword>
<keyword>cudaD3D9ResourceGetMappedPointer</keyword>
<keyword>cudaD3D9ResourceGetMappedSize</keyword>
<keyword>cudaD3D9ResourceGetSurfaceDimensions</keyword>
<keyword>cudaD3D9ResourceSetMapFlags</keyword>
<keyword>cudaD3D9SetDirect3DDevice</keyword>
<keyword>cudaD3D9UnmapResources</keyword>
<keyword>cudaD3D9UnregisterResource</keyword>
<keyword>cudaEventCreate</keyword>
<keyword>cudaEventDestroy</keyword>
<keyword>cudaEventElapsedTime</keyword>
<keyword>cudaEventQuery</keyword>
<keyword>cudaEventRecord</keyword>
<keyword>cudaEventSynchronize</keyword>
<keyword>cudaFree</keyword>
<keyword>cudaFreeArray</keyword>
<keyword>cudaFreeHost </keyword>
<keyword>cudaGetChannelDesc</keyword>
<keyword>cudaGetDevice</keyword>
<keyword>cudaGetDeviceCount</keyword>
<keyword>cudaGetDeviceProperties</keyword>
<keyword>cudaGetErrorString</keyword>
<keyword>cudaGetLastError</keyword>
<keyword>cudaGetSymbolAddress</keyword>
<keyword>cudaGetSymbolSize</keyword>
<keyword>cudaGetTextureAlignmentOffset</keyword>
<keyword>cudaGetTextureReference</keyword>
<keyword>cudaGLMapBufferObject</keyword>
<keyword>cudaGLRegisterBufferObject</keyword>
<keyword>cudaGLSetGLDevice</keyword>
<keyword>cudaGLUnmapBufferObject</keyword>
<keyword>cudaGLUnregisterBufferObject</keyword>
<keyword>cudaLaunch</keyword>
<keyword>cudaMalloc</keyword>
<keyword>cudaMalloc3D</keyword>
<keyword>cudaMalloc3DArray</keyword>
<keyword>cudaMallocArray</keyword>
<keyword>cudaMallocHost</keyword>
<keyword>cudaMallocPitch</keyword>
<keyword>cudaMemcpy</keyword>
<keyword>cudaMemcpy2D</keyword>
<keyword>cudaMemcpy2DArrayToArray</keyword>
<keyword>cudaMemcpy2DFromArray</keyword>
<keyword>cudaMemcpy2DToArray</keyword>
<keyword>cudaMemcpy3D</keyword>
<keyword>cudaMemcpyArrayToArray</keyword>
<keyword>cudaMemcpyFromArray</keyword>
<keyword>cudaMemcpyFromSymbol</keyword>
<keyword>cudaMemcpyToArray</keyword>
<keyword>cudaMemcpyToSymbol</keyword>
<keyword>cudaMemset</keyword>
<keyword>cudaMemset2D</keyword>
<keyword>cudaMemset3D</keyword>
<keyword>cudaSetDevice</keyword>
<keyword>cudaSetupArgument</keyword>
<keyword>cudaStreamCreate</keyword>
<keyword>cudaStreamDestroy</keyword>
<keyword>cudaStreamQuery</keyword>
<keyword>cudaStreamSynchronize</keyword>
<keyword>cudaThreadExit</keyword>
<keyword>cudaThreadSynchronize</keyword>
<keyword>cudaUnbindTexture</keyword>
</context>
<context id="cuda">
<include>
<context ref="def:c-like-comment"/>
<context ref="c:string"/>
<context ref="c:escaped-character"/>
<context ref="c:storage-class"/>
<context ref="def:c-like-comment-multiline"/>
<context ref="def:c-like-close-comment-outside-comment"/>
<context ref="c:char"/>
<context ref="def:decimal"/>
<context ref="def:float"/>
<context ref="c:hexadecimal"/>
<context ref="c:octal"/>
<context ref="c:keywords"/>
<context ref="cuda-keywords"/>
<context ref="c:types"/>
<context ref="cuda-types"/>
<context ref="cudaglobal"/>
<context ref="kernel-call"/>
<context ref="cudaatom"/>
<context ref="cudadev"/>
<context ref="cuda-runtime"/>
<context ref="c:preprocessor"/>
<context ref="c:include"/>
<context ref="c:if0-comment"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,317 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Martin Szulecki <compiz@sukimashita.com>
Copyright (C) 2006 Martin Szulecki <compiz@sukimashita.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<!--
D Language specification
Reference:
http://dlang.org/type.html
-->
<language id="d" name="D" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-dsrc</property>
<property name="globs">*.d</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="error" name="Error" map-to="def:error"/>
<style id="string" name="String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="special-token" name="Special Token" map-to="def:preprocessor"/>
<style id="null-value" name="Null Value" map-to="def:special-constant"/>
<style id="boolean" name="Boolean" map-to="def:boolean"/>
<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="binary" name="Binary number" map-to="def:base-n-integer"/>
<style id="octal" name="Octal number" map-to="def:base-n-integer"/>
<style id="hexadecimal" name="Hexadecimal number" map-to="def:base-n-integer"/>
</styles>
<definitions>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>//</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="block-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<context id="nesting-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>/\+</start>
<end>\+/</end>
<include>
<context ref="nesting-comment"/>
<context ref="def:in-comment"/>
</include>
</context>
<context id="double-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="single-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="backtick-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>`</start>
<end>`</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="keywords" style-ref="keyword">
<keyword>abstract</keyword>
<keyword>align</keyword>
<keyword>asm</keyword>
<keyword>assert</keyword>
<keyword>body</keyword>
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>cast</keyword>
<keyword>catch</keyword>
<keyword>continue</keyword>
<keyword>debug</keyword>
<keyword>default</keyword>
<keyword>delegate</keyword>
<keyword>delete</keyword>
<keyword>deprecated</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>final</keyword>
<keyword>finally</keyword>
<keyword>for</keyword>
<keyword>foreach</keyword>
<keyword>function</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>import</keyword>
<keyword>in</keyword>
<keyword>inout</keyword>
<keyword>is</keyword>
<keyword>mixin</keyword>
<keyword>new</keyword>
<keyword>out</keyword>
<keyword>override</keyword>
<keyword>pragma</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>ref</keyword>
<keyword>return</keyword>
<keyword>scope</keyword>
<keyword>super</keyword>
<keyword>switch</keyword>
<keyword>synchronized</keyword>
<keyword>this</keyword>
<keyword>throw</keyword>
<keyword>try</keyword>
<keyword>typeid</keyword>
<keyword>typeof</keyword>
<keyword>unittest</keyword>
<keyword>version</keyword>
<keyword>while</keyword>
<keyword>with</keyword>
<!-- added in D2 -->
<keyword>lazy</keyword>
<keyword>pure</keyword>
<keyword>nothrow</keyword>
</context>
<context id="types" style-ref="type">
<keyword>alias</keyword>
<keyword>bool</keyword>
<keyword>byte</keyword>
<keyword>cdouble</keyword>
<keyword>cent</keyword>
<keyword>cfloat</keyword>
<keyword>char</keyword>
<keyword>class</keyword>
<keyword>creal</keyword>
<keyword>dchar</keyword>
<keyword>double</keyword>
<keyword>enum</keyword>
<keyword>export</keyword>
<keyword>float</keyword>
<keyword>idouble</keyword>
<keyword>ifloat</keyword>
<keyword>int</keyword>
<keyword>interface</keyword>
<keyword>invariant</keyword>
<keyword>ireal</keyword>
<keyword>long</keyword>
<keyword>module</keyword>
<keyword>package</keyword>
<keyword>ptrdiff_t</keyword>
<keyword>real</keyword>
<keyword>short</keyword>
<keyword>size_t</keyword>
<keyword>struct</keyword>
<keyword>template</keyword>
<keyword>typedef</keyword>
<keyword>ubyte</keyword>
<keyword>ucent</keyword>
<keyword>uint</keyword>
<keyword>ulong</keyword>
<keyword>union</keyword>
<keyword>ushort</keyword>
<keyword>void</keyword>
<keyword>wchar</keyword>
<!-- split these ones? -->
<keyword>auto</keyword>
<keyword>const</keyword>
<keyword>extern</keyword>
<keyword>static</keyword>
<keyword>volatile</keyword>
<!-- added in D2 -->
<keyword>__gshared</keyword>
<keyword>__traits</keyword>
<keyword>__vector</keyword>
<keyword>__parameters</keyword>
<keyword>shared</keyword>
<keyword>string</keyword>
<keyword>dstring</keyword>
<keyword>wstring</keyword>
<keyword>immutable</keyword>
</context>
<context id="special-tokens" style-ref="special-token">
<keyword>#line</keyword>
<keyword>__DATE__</keyword>
<keyword>__FILE__</keyword>
<keyword>__FUNCTION__</keyword>
<keyword>__LINE__</keyword>
<keyword>__MODULE__</keyword>
<keyword>__PRETTY_FUNCTION__</keyword>
<keyword>__TIME__</keyword>
<keyword>__TIMESTAMP__</keyword>
<keyword>__VENDOR__</keyword>
<keyword>__VERSION__</keyword>
</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="float" style-ref="floating-point">
<match extended="true">
(?&lt;![\w\.])
([0-9_]+[Ee][-]?[0-9_]+|([0-9_]*\.[0-9_]+|[0-9_]+\.)([Ee][-]?[0-9_]+)?)[fFLi]?
(?![\w\.])
</match>
</context>
<context id="decimal" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
([1-9][0-9_]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
(?![\w\.])
</match>
</context>
<context id="binary" style-ref="binary">
<match extended="true">
(?&lt;![\w\.])
0[bB][01_]*
(?![\w\.])
</match>
</context>
<context id="octal" style-ref="octal">
<match extended="true">
(?&lt;![\w\.])
0[0-7_]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
(?![\w\.])
</match>
</context>
<context id="hexadecimal" style-ref="hexadecimal">
<match extended="true">
(?&lt;![\w\.])
0[xX][0-9a-fA-F_]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
(?![\w\.])
</match>
</context>
<context id="d" class="no-spell-check">
<include>
<context ref="def:shebang"/>
<context ref="line-comment"/>
<context ref="block-comment"/>
<context ref="close-comment-outside-comment"/>
<context ref="nesting-comment"/>
<context ref="double-quoted-string"/>
<context ref="single-quoted-string"/>
<context ref="backtick-quoted-string"/>
<context ref="keywords"/>
<context ref="types"/>
<context ref="special-tokens"/>
<context ref="null-value"/>
<context ref="boolean"/>
<context ref="float"/>
<context ref="binary"/>
<context ref="octal"/>
<context ref="decimal"/>
<context ref="hexadecimal"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,311 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2019 Olzhas Suleimen
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="dart" name="Dart" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">application/dart;application/x-dart;text/x-dart;text/dart</property>
<property name="globs">*.dart</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="error" name="Error" map-to="def:error"/>
<style id="escaped" name="Escaped" map-to="def:special-char"/>
<style id="string" name="String" map-to="def:string" />
<style id="null-value" name="Null" map-to="def:special-constant"/>
<style id="bool" name="Boolean" map-to="def:boolean"/>
<style id="num" name="Numeric" map-to="def:decimal"/>
<style id="external" name="Externals" map-to="def:preprocessor"/>
<style id="keyword" name="Keywords" map-to="def:keyword"/>
<style id="type" name="Data Types" map-to="def:type"/>
</styles>
<definitions>
<context id="data" style-ref="string">
<start>`</start>
<end>`</end>
</context>
<context id="field" style-ref="type">
<start>\[</start>
<end>\]</end>
</context>
<context id="line-doc-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>///</start>
<include>
<context ref="data"/>
<context ref="field"/>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>//</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="block-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="data"/>
<context ref="field"/>
<context ref="def:in-comment"/>
</include>
</context>
<context id="close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<context id="escaped" style-ref="escaped">
<match>\\([\\\"\'nrbtf]|[0-9]{1,3}|u[a-fA-f0-9]{1,4}|u{?[a-fA-f0-9]{1,6}}?)</match>
</context>
<context id="expression-identifier" style-ref="escaped">
<match>\$_?\w+</match>
</context>
<context id="expression" style-ref="escaped">
<start>\$\{</start>
<end>\}</end>
</context>
<context id="single-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
<include>
<context ref="escaped" />
<context ref="expression-identifier" />
<context ref="expression" />
<context ref="def:line-continue"/>
</include>
</context>
<context id="double-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="escaped" />
<context ref="expression-identifier" />
<context ref="expression" />
<context ref="def:line-continue"/>
</include>
</context>
<context id="raw-single-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>r'</start>
<end>'</end>
<include>
<context ref="def:line-continue"/>
</include>
</context>
<context id="raw-double-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>r"</start>
<end>"</end>
<include>
<context ref="def:line-continue"/>
</include>
</context>
<context id="multiline-single-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>'''</start>
<end>'''</end>
<include>
<context ref="escaped" />
<context ref="expression-identifier" />
<context ref="expression" />
<context ref="def:line-continue"/>
</include>
</context>
<context id="multiline-double-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>"""</start>
<end>"""</end>
<include>
<context ref="escaped" />
<context ref="expression-identifier" />
<context ref="expression" />
<context ref="def:line-continue"/>
</include>
</context>
<context id="raw-multiline-single-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>r'''</start>
<end>'''</end>
<include>
<context ref="def:line-continue"/>
</include>
</context>
<context id="raw-multiline-double-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>r"""</start>
<end>"""</end>
<include>
<context ref="def:line-continue"/>
</include>
</context>
<context id="null-value" style-ref="null-value">
<keyword>null</keyword>
</context>
<context id="bool" style-ref="bool">
<keyword>true</keyword>
<keyword>false</keyword>
</context>
<context id="numeric" style-ref="num">
<match extended="true">(\b([0-9]+|0[xX][0-9a-fA-F]+)\b|\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?))</match>
</context>
<context id="external" style-ref="external">
<keyword>import</keyword>
<keyword>export</keyword>
<keyword>library</keyword>
<keyword>part of</keyword>
<keyword>part</keyword>
<keyword>hide</keyword>
<keyword>show</keyword>
<keyword>deferred</keyword>
</context>
<context id="keyword" style-ref="keyword">
<keyword>abstract</keyword>
<keyword>mixin</keyword>
<keyword>extends</keyword>
<keyword>class</keyword>
<keyword>enum</keyword>
<keyword>factory</keyword>
<keyword>implements</keyword>
<keyword>interface</keyword>
<keyword>with</keyword>
<keyword>async</keyword>
<keyword>await</keyword>
<keyword>yield</keyword>
<keyword>sync</keyword>
<keyword>covariant</keyword>
<keyword>if</keyword>
<keyword>else</keyword>
<keyword>continue</keyword>
<keyword>break</keyword>
<keyword>for</keyword>
<keyword>while</keyword>
<keyword>do</keyword>
<keyword>case</keyword>
<keyword>switch</keyword>
<keyword>default</keyword>
<keyword>try</keyword>
<keyword>catch</keyword>
<keyword>throw</keyword>
<keyword>rethrow</keyword>
<keyword>finally</keyword>
<keyword>this</keyword>
<keyword>super</keyword>
<keyword>get</keyword>
<keyword>set</keyword>
<keyword>operator</keyword>
<keyword>as</keyword>
<keyword>is</keyword>
<keyword>in</keyword>
<keyword>on</keyword>
<keyword>return</keyword>
<keyword>assert</keyword>
<keyword>print</keyword>
</context>
<context id="annotation" style-ref="keyword">
<match extended="true">
@_?\w+\b
</match>
</context>
<context id="type" style-ref="type">
<keyword>void</keyword>
<keyword>dynamic</keyword>
<keyword>bool</keyword>
<keyword>int</keyword>
<keyword>double</keyword>
<keyword>num</keyword>
<keyword>var</keyword>
<keyword>final</keyword>
<keyword>static</keyword>
<keyword>new</keyword>
<keyword>const</keyword>
<keyword>typedef</keyword>
</context>
<context id="type-class" style-ref="type">
<match extended="true">
\b_?[A-Z]\w*\b
</match>
</context>
<context id="dart" class="no-spell-check">
<include>
<context ref="line-doc-comment"/>
<context ref="line-comment"/>
<context ref="block-comment"/>
<context ref="close-comment-outside-comment"/>
<context ref="raw-multiline-single-quoted-string"/>
<context ref="raw-multiline-double-quoted-string"/>
<context ref="multiline-single-quoted-string"/>
<context ref="multiline-double-quoted-string"/>
<context ref="raw-single-quoted-string"/>
<context ref="raw-double-quoted-string"/>
<context ref="single-quoted-string"/>
<context ref="double-quoted-string"/>
<context ref="null-value"/>
<context ref="bool"/>
<context ref="numeric"/>
<context ref="external"/>
<context ref="keyword"/>
<context ref="annotation"/>
<context ref="type"/>
<context ref="type-class"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,300 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Marco Barisione, Emanuele Aina
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="def" name="Defaults" hidden="true" version="2.0">
<styles>
<!-- styles defined here are all the styles that
a language can use as default for its styles.
The styles are defined in logical groups.
A style scheme has to at least define the style
for the first item of each group and if desired
define the style for the other items to achieve a
more finegrained control on the apperance.
Finally a style scheme may also define language
specific styles. -->
<!-- Comment group -->
<!-- Any comment -->
<style id="comment" name="Comment"/>
<!-- A shebang: #!/bin/sh -->
<style id="shebang" name="Shebang" map-to="def:comment"/>
<!-- A special comment containing documentation like in javadoc or
gtk-doc -->
<style id="doc-comment" name="Documentation comment" map-to="def:comment"/>
<!-- A element inside a documentation comment: @author -->
<!-- This style doesn't map to anything since it must be used as an additional
style for text which is already styled as a "doc-comment" -->
<style id="doc-comment-element" name="Documentation comment element" />
<!-- Constant group -->
<!-- Any constant -->
<style id="constant" name="Constant"/>
<!-- A character constant: 'c' -->
<style id="character" name="Character" map-to="def:constant"/>
<!-- A string constant: "this is a string" -->
<style id="string" name="String" map-to="def:constant"/>
<!-- Special character in a string constant: "%s", "\t" -->
<!-- This style doesn't map to anything since it must be used as an additional
style for text which is already styled as a "string" -->
<style id="special-char" name="Special character (inside a string)" />
<!-- A generic number constant -->
<style id="number" name="Number" map-to="def:constant"/>
<!-- A floating point constant: 2.3e10 -->
<style id="floating-point" name="Floating point number" map-to="def:number"/>
<!-- A decimal number: 1234 -->
<style id="decimal" name="Decimal number" map-to="def:number"/>
<!-- A base-N number: 0xFFFF -->
<style id="base-n-integer" name="Base-N number" map-to="def:number"/>
<!-- A complex number -->
<style id="complex" name="Complex number" map-to="def:number"/>
<!-- A special constant like NULL in C or null in Java -->
<style id="special-constant" name="Special constant" map-to="def:constant"/>
<!-- A boolean constant: TRUE, false -->
<style id="boolean" name="Boolean value" map-to="def:special-constant"/>
<!-- Identifier group -->
<!-- Any variable name -->
<style id="identifier" name="Identifier" />
<!-- A function name (also: methods for classes) -->
<style id="function" name="Function" map-to="def:identifier"/>
<!-- A builtin name: like __import__, abs in Python
(see http://docs.python.org/lib/built-in-funcs.html) -->
<style id="builtin" name="Built-in identifier" map-to="def:identifier"/>
<!-- Statement group -->
<!-- Any statement -->
<style id="statement" name="Statement"/>
<!-- Operators: "+", "*", etc. -->
<style id="operator" name="Operator" map-to="def:statement" />
<!-- keywords: "if", "for", "while", etc. -->
<style id="keyword" name="Keyword" map-to="def:statement" />
<!-- Type group -->
<!--A primitive data type: int, long, char, etc. -->
<style id="type" name="Data type"/>
<!-- Markup group -->
<!-- Emphasis, usually rendered with italics -->
<style id="emphasis" name="Emphasis"/>
<!-- Strong emphasis, usually rendered as bold -->
<style id="strong-emphasis" name="Strong emphasis"/>
<!-- Inline code, usually rendered with a monospace font -->
<style id="inline-code" name="Inline code"/>
<!-- Insertion, usually rendered with an underline -->
<style id="insertion" name="Insertion"/>
<!-- Deletion, usually rendered with a strikethrough -->
<style id="deletion" name="Deletion"/>
<!-- Link text, usually rendered with an underline -->
<style id="link-text" name="Link text"/>
<!-- Link symbol, a part of the markup syntax for links -->
<style id="link-symbol" name="Link symbol"/>
<!-- Link destination, not usually visible -->
<style id="link-destination" name="Link destination"/>
<!-- Heading, usually rendered in a larger font (using h1, h2, etc. tags) -->
<style id="heading" name="Heading"/>
<!-- Thematic break, usually rendered as a horizontal rule (line) -->
<style id="thematic-break" name="Thematic break"/>
<!-- Preformatted section, usually rendered with a monospace font -->
<style id="preformatted-section" name="Preformatted section"/>
<!-- List marker, usually rendered as a bullet or number -->
<style id="list-marker" name="List marker"/>
<!-- Others -->
<!-- This one is for '#include <foo.h>' and "#pragma blah", or 'use foobar', etc.. -->
<style id="preprocessor" name="Preprocessor directive"/>
<!-- Any erroneous construct -->
<style id="error" name="Error"/>
<!-- to mark possibily errors or unrecommended syntax -->
<style id="warning" name="Warning"/>
<!--Reserved keywords: like "const" and "goto" in Java -->
<style id="reserved" name="Reserved keyword" map-to="def:error" />
<!-- Anything that needs extra attention; mostly the keywords TODO, FIXME and XXX -->
<style id="note" name="Note (FIXME, TODO, XXX, etc.)"/>
<!-- Internet address: URLs, email addresses, etc. -->
<style id="net-address" name="Net address (URL, email address, etc.)"/>
<!-- Deprecated: will be removed in a future version -->
<style id="underlined" name="Underlined (DEPRECATED)" map-to="def:net-address"/>
<!-- Text that acts as some kind of heading, such as h1, h2, ... in html. -->
<style id="heading0" name="Heading 0"/>
<style id="heading1" name="Heading 1"/>
<style id="heading2" name="Heading 2"/>
<style id="heading3" name="Heading 3"/>
<style id="heading4" name="Heading 4"/>
<style id="heading5" name="Heading 5"/>
<style id="heading6" name="Heading 6"/>
</styles>
<definitions>
<!-- An empty string always matches. -->
<define-regex id="always-match"></define-regex>
<!-- $^ never matches. -->
<define-regex id="never-match">$^</define-regex>
<!-- Unicode ID_Start and ID_Continue characters
Descriptions from https://www.unicode.org/reports/tr31/#Table_Lexical_Classes_for_Identifiers
Other_ID_Start and Other_ID_Continue code points from https://www.unicode.org/Public/12.1.0/ucd/PropList.txt
-->
<define-regex id="unicode-id-start" extended="true">
[\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}]
</define-regex>
<define-regex id="unicode-id-continue" extended="true">
[\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{00B7}\x{0387}\x{1369}-\x{1371}\x{19DA}]
</define-regex>
<define-regex id="decimal" extended="true">
(?&lt;![\w\.]) ([1-9][0-9]* | 0) (?![\w\.])
</define-regex>
<define-regex id="octal" extended="true">
(?&lt;![\w\.]) 0 [0-7]+ (?![\w\.])
</define-regex>
<define-regex id="hexadecimal" extended="true">
(?&lt;![\w\.]) 0 [xX] [0-9a-fA-F]+ (?![\w\.])
</define-regex>
<define-regex id="float" extended="true" case-sensitive="false">
\b
([0-9]+ e [-+]? [0-9]+ |
([0-9]* \. [0-9]+ | [0-9]+ \.)
(e [-+]? [0-9]+)?) [fl]?
\b
</define-regex>
<context id="decimal" style-ref="decimal">
<match>\%{decimal}</match>
</context>
<context id="octal" style-ref="base-n-integer">
<match>\%{octal}</match>
</context>
<context id="hexadecimal" style-ref="base-n-integer">
<match>\%{hexadecimal}</match>
</context>
<context id="float" style-ref="floating-point">
<match>\%{float}</match>
</context>
<!-- FIXME is it working at line end? -->
<define-regex id="net-address" extended="true" case-sensitive="false">
\%[ # separator
(https?|ftp|nntp|news|javascript|about): # protocol
[^\ \\]* [^\ \\.:;,?&gt;&lt;)] # address
(?![a-z0-9_.-]) # separator
</define-regex>
<define-regex id="email-address" extended="true" case-sensitive="false">
\%[ # separator
(mailto:)? # optional "mailto:"
[a-z0-9_.+-]+ # user name
@ # at
[a-z0-9_.+-]+ # domain
\%] # separator
</define-regex>
<context id="in-comment" class-disabled="no-spell-check">
<include>
<context id="net-address" extend-parent="false" style-ref="net-address" class="no-spell-check">
<match>\%{net-address}</match>
</context>
<context id="email-address" extend-parent="false" style-ref="net-address" class="no-spell-check">
<match>\%{email-address}</match>
</context>
<context id="comment-note" extend-parent="false" style-ref="note" class="no-spell-check comment-note">
<match>\b(FIXME|TODO|XXX)\b</match>
</context>
</include>
</context>
<!-- A line comment starting with # -->
<context id="shell-like-comment" style-ref="comment" end-at-line-end="true" class-disabled="no-spell-check" class="comment">
<start>#</start>
<include>
<context ref="in-comment"/>
</include>
</context>
<!-- C style comments -->
<context id="c-like-comment" style-ref="comment" end-at-line-end="true" class-disabled="no-spell-check" class="comment" >
<start>//</start>
<include>
<context ref="in-line-comment"/>
</include>
</context>
<context id="c-like-comment-multiline" style-ref="comment" class-disabled="no-spell-check" class="comment" >
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="in-comment"/>
</include>
</context>
<context id="c-like-close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<context id="line-continue" style-ref="preprocessor">
<start>\\$</start>
<end>^</end>
</context>
<!-- this is intended to be used from line comments
that can continue on a different line after "\" -->
<context id="in-line-comment" class-disabled="no-spell-check" class="comment">
<include>
<context ref="line-continue" ignore-style="true"/>
<context ref="in-comment"/>
</include>
</context>
<context id="shebang" style-ref="shebang" first-line-only="true" class="no-spell-check">
<start>^#!</start>
<end>$</end>
</context>
<context id="escape" style-ref="special-char">
<match>\\.</match>
</context>
<!-- usual quoted string, ends at line end, \ is an escape char -->
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="escape"/>
<context ref="line-continue"/>
</include>
</context>
<!-- same thing but with single quote marks -->
<context id="single-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
<include>
<context ref="escape"/>
<context ref="line-continue"/>
</include>
</context>
<!-- Dummy context, needed to load the style mappings when parsing v1 files -->
<context id="def"/>
</definitions>
</language>

View File

@ -0,0 +1,297 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Paolo Maggi <paolo.maggi@polito.it>
Copyright (C) 2003 Paolo Maggi <paolo.maggi@polito.it>
Copyright (C) 2006 Luca Cavalli <lcavalli@cvs.gnome.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="desktop" name=".desktop" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">application/x-gnome-app-info;application/x-desktop</property>
<property name="globs">*.desktop;*.kdelnk</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="group" name="Group" map-to="def:keyword"/>
<style id="key" name="Key" map-to="def:type"/>
<style id="language" name="Translation" map-to="def:decimal"/>
<style id="number" name="Number" map-to="def:floating-point"/>
<style id="boolean" name="Boolean" map-to="def:floating-point"/>
<style id="exec-parameter" name="Exec parameter" map-to="def:floating-point"/>
<style id="encoding" name="Encoding" map-to="def:floating-point"/>
<style id="category-main" name="Main Category" map-to="def:reserved"/>
<style id="category-additional" name="Additional Category" map-to="def:identifier"/>
<style id="category-reserved" name="Reserved Category" map-to="def:note"/>
</styles>
<definitions>
<define-regex id="language">\[[a-zA-Z_]+@?[a-zA-Z_]*\]</define-regex>
<define-regex id="key-suffix">(?=(\%{language})?\s*=\s*)</define-regex>
<context id="group" style-ref="group">
<start>^\[</start>
<end>\]$</end>
</context>
<context id="boolean" style-ref="boolean">
<keyword>true</keyword>
<keyword>false</keyword>
</context>
<context id="exec-parameter" style-ref="exec-parameter">
<match>%[fFuUdDnNimckv%]</match>
</context>
<context id="encoding" style-ref="encoding">
<keyword>UTF\-8</keyword>
<keyword>Legacy\-Mixed</keyword>
</context>
<context id="number" style-ref="number">
<match>(.\b[0-9]+([Ll]?|[Ff]?)\b)|(b[0-9]*\.\W)</match>
</context>
<context id="standard-key" style-ref="key">
<prefix>^_?</prefix>
<suffix>\%{key-suffix}</suffix>
<keyword>Actions</keyword>
<keyword>BinaryPattern</keyword>
<keyword>Categories</keyword>
<keyword>Comment</keyword>
<keyword>DBusActivatable</keyword>
<keyword>DefaultApp</keyword>
<keyword>Dev</keyword>
<keyword>Encoding</keyword>
<keyword>Exec</keyword>
<keyword>Extensions</keyword>
<keyword>FilePattern</keyword>
<keyword>FSType</keyword>
<keyword>GenericName</keyword>
<keyword>Hidden</keyword>
<keyword>Icon</keyword>
<keyword>Implements</keyword>
<keyword>Keywords</keyword>
<keyword>MapNotify</keyword>
<keyword>MimeType</keyword>
<keyword>MiniIcon</keyword>
<keyword>MountPoint</keyword>
<keyword>Name</keyword>
<keyword>NoDisplay</keyword>
<keyword>NotShowIn</keyword>
<keyword>OnlyShowIn</keyword>
<keyword>Path</keyword>
<keyword>Patterns</keyword>
<keyword>Protocols</keyword>
<keyword>ReadOnly</keyword>
<keyword>SortOrder</keyword>
<keyword>StartupNotify</keyword>
<keyword>StartupWMClass</keyword>
<keyword>SwallowExec</keyword>
<keyword>SwallowTitle</keyword>
<keyword>Terminal</keyword>
<keyword>TerminalOptions</keyword>
<keyword>TryExec</keyword>
<keyword>Type</keyword>
<keyword>UnmountIcon</keyword>
<keyword>URL</keyword>
<keyword>Version</keyword>
</context>
<context id="non-standard-key" style-ref="key">
<match>^_?X\-[a-zA-Z\-]+\%{key-suffix}</match>
</context>
<context id="key-categories" end-at-line-end="true">
<start>^(_?Categories)\%{key-suffix}</start>
<include>
<context sub-pattern="1" where="start" style-ref="key"/>
<context style-ref="category-main">
<keyword>AudioVideo</keyword>
<keyword>Audio</keyword>
<keyword>Video</keyword>
<keyword>Shell</keyword>
<keyword>Development</keyword>
<keyword>Education</keyword>
<keyword>Game</keyword>
<keyword>Graphics</keyword>
<keyword>Network</keyword>
<keyword>Office</keyword>
<keyword>Settings</keyword>
<keyword>System</keyword>
<keyword>Utility</keyword>
</context>
<context style-ref="category-additional">
<keyword>2DGraphics</keyword>
<keyword>3DGraphics</keyword>
<keyword>Accessibility</keyword>
<keyword>ActionGame</keyword>
<keyword>AdventureGame</keyword>
<keyword>Amusement</keyword>
<keyword>ArcadeGame</keyword>
<keyword>Archiving</keyword>
<keyword>ArtificialIntelligence</keyword>
<keyword>Art</keyword>
<keyword>Astronomy</keyword>
<keyword>AudioVideoEditing</keyword>
<keyword>Biology</keyword>
<keyword>BlocksGame</keyword>
<keyword>BoardGame</keyword>
<keyword>Building</keyword>
<keyword>Calculator</keyword>
<keyword>Calendar</keyword>
<keyword>CardGame</keyword>
<keyword>Chart</keyword>
<keyword>Chat</keyword>
<keyword>Chemistry</keyword>
<keyword>Clock</keyword>
<keyword>Compression</keyword>
<keyword>ComputerScience</keyword>
<keyword>ConsoleOnly</keyword>
<keyword>Construction</keyword>
<keyword>ContactManagement</keyword>
<keyword>Core</keyword>
<keyword>Database</keyword>
<keyword>DataVisualization</keyword>
<keyword>Debugger</keyword>
<keyword>DesktopSettings</keyword>
<keyword>Dialup</keyword>
<keyword>Dictionary</keyword>
<keyword>DiscBurning</keyword>
<keyword>Documentation</keyword>
<keyword>Economy</keyword>
<keyword>Electricity</keyword>
<keyword>Electronics</keyword>
<keyword>Email</keyword>
<keyword>Emulator</keyword>
<keyword>Engineering</keyword>
<keyword>FileManager</keyword>
<keyword>Filesystem</keyword>
<keyword>FileTools</keyword>
<keyword>FileTransfer</keyword>
<keyword>Finance</keyword>
<keyword>FlowChart</keyword>
<keyword>Geography</keyword>
<keyword>Geology</keyword>
<keyword>Geoscience</keyword>
<keyword>GNOME</keyword>
<keyword>GTK</keyword>
<keyword>GUIDesigner</keyword>
<keyword>HamRadio</keyword>
<keyword>HardwareSettings</keyword>
<keyword>History</keyword>
<keyword>IDE</keyword>
<keyword>ImageProcessing</keyword>
<keyword>InstantMessaging</keyword>
<keyword>IRCClient</keyword>
<keyword>Java</keyword>
<keyword>KDE</keyword>
<keyword>KidsGame</keyword>
<keyword>Languages</keyword>
<keyword>Literature</keyword>
<keyword>LogicGame</keyword>
<keyword>Math</keyword>
<keyword>MedicalSoftware</keyword>
<keyword>Midi</keyword>
<keyword>Mixer</keyword>
<keyword>Monitor</keyword>
<keyword>Motif</keyword>
<keyword>Music</keyword>
<keyword>News</keyword>
<keyword>NumericalAnalysis</keyword>
<keyword>OCR</keyword>
<keyword>P2P</keyword>
<keyword>PackageManager</keyword>
<keyword>ParallelComputing</keyword>
<keyword>PDA</keyword>
<keyword>Photography</keyword>
<keyword>Physics</keyword>
<keyword>Player</keyword>
<keyword>Presentation</keyword>
<keyword>Printing</keyword>
<keyword>Profiling</keyword>
<keyword>ProjectManagement</keyword>
<keyword>Publishing</keyword>
<keyword>Qt</keyword>
<keyword>RasterGraphics</keyword>
<keyword>Recorder</keyword>
<keyword>RemoteAccess</keyword>
<keyword>RevisionControl</keyword>
<keyword>Robotics</keyword>
<keyword>RolePlaying</keyword>
<keyword>Scanning</keyword>
<keyword>Science</keyword>
<keyword>Security</keyword>
<keyword>Sequencer</keyword>
<keyword>Simulation</keyword>
<keyword>SportsGame</keyword>
<keyword>Sports</keyword>
<keyword>Spreadsheet</keyword>
<keyword>StrategyGame</keyword>
<keyword>Telephony</keyword>
<keyword>TelephonyTools</keyword>
<keyword>TerminalEmulator</keyword>
<keyword>TextEditor</keyword>
<keyword>TextTools</keyword>
<keyword>Translation</keyword>
<keyword>Tuner</keyword>
<keyword>TV</keyword>
<keyword>VectorGraphics</keyword>
<keyword>VideoConference</keyword>
<keyword>Viewer</keyword>
<keyword>WebBrowser</keyword>
<keyword>WebDevelopment</keyword>
<keyword>WordProcessor</keyword>
</context>
<context style-ref="category-reserved">
<keyword>Screensaver</keyword>
<keyword>TrayIcon</keyword>
<keyword>Applet</keyword>
<keyword>Shell</keyword>
</context>
</include>
</context>
<context id="key">
<include>
<context ref="key-categories"/>
<context ref="standard-key"/>
<context ref="non-standard-key"/>
</include>
</context>
<context id="desktop">
<include>
<context ref="def:shell-like-comment"/>
<context ref="group"/>
<context ref="key"/>
<context id="lang-and-value" end-at-line-end="true">
<start>(\%{language})?\s*=\s*</start>
<include>
<context sub-pattern="1" where="start" style-ref="language"/>
<context ref="boolean"/>
<context ref="exec-parameter"/>
<context ref="encoding"/>
<context ref="number"/>
</include>
</context>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Paolo Maggi <paolo.maggi@polito.it>
Copyright (C) 2003 Paolo Maggi <paolo.maggi@polito.it>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="diff" name="Diff" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">text/x-diff;text/x-patch;text/x-reject</property>
<property name="globs">*.diff;*.patch;*.rej</property>
</metadata>
<styles>
<style id="added-line" name="Added line"/> <!--Others 2-->
<style id="removed-line" name="Removed line"/> <!--Others 3-->
<style id="changed-line" name="Changed line"/> <!--Preprocessor-->
<style id="special-case" name="Special case"/> <!--String-->
<style id="location" name="Location"/> <!--Keyword-->
<style id="ignore" name="Ignore" map-to="def:comment"/>
<style id="diff-file" name=""/> <!--Data Type-->
</styles>
<definitions>
<define-regex id="diff-file">^(diff |\+\+\+ |Index: |==== |\*\*\* |--- )</define-regex>
<context id="diff">
<include>
<context id="diff-file" style-ref="diff-file" end-at-line-end="true">
<start>\%{diff-file}</start>
</context>
<context id="removed-line" style-ref="removed-line">
<match>^(&lt;|-).*$</match>
</context>
<context id="added-line" style-ref="added-line">
<match>^(\+|&gt;).*$</match>
</context>
<context id="changed-line" style-ref="changed-line">
<match>^\! .*$</match>
</context>
<context id="location" style-ref="location" end-at-line-end="true">
<start>^((@@)|[0-9]|\*\*\*\*)</start>
<include>
<context ref="def:escape"/>
</include>
</context>
<context id="special-case" style-ref="special-case">
<prefix>^</prefix>
<suffix>\b</suffix>
<keyword>Only in .*</keyword>
<keyword>Files .* and .* are identical$</keyword>
<keyword>Files .* and .* differ$</keyword>
<keyword>Binary files .* and .* differ$</keyword>
<keyword>File .* is a .* while file .* is a .*</keyword>
<keyword>No newline at end of file .*</keyword>
</context>
<context style-ref="ignore" end-at-line-end="true">
<start>^\S</start>
</context>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,475 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Joachim Noreiko <jnoreiko@yahoo.com>
Copyright (C) 2006, 2007 Joachim Noreiko <jnoreiko@yahoo.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="docbook" name="DocBook" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">application/docbook+xml</property>
<property name="globs">*.docbook</property>
<property name="block-comment-start">&lt;!--</property>
<property name="block-comment-end">--&gt;</property>
</metadata>
<styles>
<style id="header-elements" name="Header Elements" map-to="def:keyword"/>
<style id="formatting-elements" name="Formatting Elements" map-to="def:keyword"/>
<style id="gui-elements" name="GUI Elements" map-to="def:keyword"/>
<style id="structural-elements" name="Structural Elements" map-to="def:keyword"/>
</styles>
<definitions>
<context id="header-elements" once-only="true" style-ref="header-elements">
<suffix>\b(?!\s*=)</suffix>
<keyword>abstract</keyword>
<keyword>articleinfo</keyword>
<keyword>article</keyword>
<keyword>bookinfo</keyword>
<keyword>authorgroup</keyword>
<keyword>author</keyword>
<keyword>affiliation</keyword>
<keyword>copyright</keyword>
<keyword>date</keyword>
<keyword>email</keyword>
<keyword>firstname</keyword>
<keyword>orgname</keyword>
<keyword>publishername</keyword>
<keyword>publisher</keyword>
<keyword>pubdate</keyword>
<keyword>pubsnumber</keyword>
<keyword>releaseinfo</keyword>
<keyword>surname</keyword>
<keyword>revdescription</keyword>
<keyword>revhistory</keyword>
<keyword>revision</keyword>
<keyword>revnumber</keyword>
</context>
<context id="formatting-elements" once-only="true" style-ref="formatting-elements">
<suffix>\b(?!\s*=)</suffix>
<keyword>caution</keyword>
<keyword>command</keyword>
<keyword>computeroutput</keyword>
<keyword>filename</keyword>
<keyword>firstterm</keyword>
<keyword>link</keyword>
<keyword>note</keyword>
<keyword>option</keyword>
<keyword>para</keyword>
<keyword>remark</keyword>
<keyword>replaceable</keyword>
<keyword>tip</keyword>
<keyword>ulink</keyword>
<keyword>variablelist</keyword>
<keyword>varlistentry</keyword>
<keyword>warning</keyword>
<keyword>xref</keyword>
</context>
<context id="gui-elements" once-only="true" style-ref="gui-elements">
<suffix>\b(?!\s*=)</suffix>
<keyword>accel</keyword>
<keyword>application</keyword>
<keyword>guibutton</keyword>
<keyword>guiicon</keyword>
<keyword>guilabel</keyword>
<keyword>guimenuitem</keyword>
<keyword>guimenu</keyword>
<keyword>guisubmenu</keyword>
<keyword>interface</keyword>
<keyword>keycap</keyword>
<keyword>keycombo</keyword>
<keyword>keysym</keyword>
<keyword>menuchoice</keyword>
</context>
<context id="structural-elements" once-only="true" style-ref="structural-elements">
<suffix>\b(?!\s*=)</suffix>
<keyword>appendix</keyword>
<keyword>book</keyword>
<keyword>chapter</keyword>
<keyword>anchor</keyword>
<keyword>citetitle</keyword>
<keyword>colspec</keyword>
<keyword>emphasis</keyword>
<keyword>entry</keyword>
<keyword>figure</keyword>
<keyword>glossary</keyword>
<keyword>glossdef</keyword>
<keyword>glossentry</keyword>
<keyword>glossterm</keyword>
<keyword>sect1</keyword>
<keyword>sect2</keyword>
<keyword>sect3</keyword>
<keyword>sect4</keyword>
<keyword>section</keyword>
<keyword>highlights</keyword>
<keyword>holder</keyword>
<keyword>imagedata</keyword>
<keyword>imageobject</keyword>
<keyword>indexterm</keyword>
<keyword>informaltable</keyword>
<keyword>inlinemediaobject</keyword>
<keyword>itemizedlist</keyword>
<keyword>literal</keyword>
<keyword>legalnotice</keyword>
<keyword>listitem</keyword>
<keyword>mediaobject</keyword>
<keyword>orderedlist</keyword>
<keyword>phrase</keyword>
<keyword>primary</keyword>
<keyword>programlisting</keyword>
<keyword>row</keyword>
<keyword>screen</keyword>
<keyword>screenshot</keyword>
<keyword>secondary</keyword>
<keyword>see</keyword>
<keyword>shortcut</keyword>
<keyword>table</keyword>
<keyword>tbody</keyword>
<keyword>term</keyword>
<keyword>tertiary</keyword>
<keyword>textobject</keyword>
<keyword>tgroup</keyword>
<keyword>thead</keyword>
<keyword>titleabbrev</keyword>
<keyword>title</keyword>
<keyword>uri</keyword>
<keyword>userinput</keyword>
<keyword>year</keyword>
<keyword>ackno</keyword>
<keyword>acronym</keyword>
<keyword>action</keyword>
<keyword>address</keyword>
<keyword>answer</keyword>
<keyword>appendixinfo</keyword>
<keyword>areaset</keyword>
<keyword>areaspec</keyword>
<keyword>area</keyword>
<keyword>arg</keyword>
<keyword>artpagenums</keyword>
<keyword>attribution</keyword>
<keyword>audiodata</keyword>
<keyword>audioobject</keyword>
<keyword>authorblurb</keyword>
<keyword>authorinitials</keyword>
<keyword>beginpage</keyword>
<keyword>bibliocoverage</keyword>
<keyword>bibliodiv</keyword>
<keyword>biblioentry</keyword>
<keyword>bibliography</keyword>
<keyword>bibliographyinfo</keyword>
<keyword>biblioid</keyword>
<keyword>bibliomisc</keyword>
<keyword>bibliomixed</keyword>
<keyword>bibliomset</keyword>
<keyword>bibliorelation</keyword>
<keyword>biblioset</keyword>
<keyword>bibliosource</keyword>
<keyword>blockinfo</keyword>
<keyword>blockquote</keyword>
<keyword>bridgehead</keyword>
<keyword>calloutlist</keyword>
<keyword>callout</keyword>
<keyword>caption</keyword>
<keyword>chapterinfo</keyword>
<keyword>citation</keyword>
<keyword>citebiblioid</keyword>
<keyword>citerefentry</keyword>
<keyword>city</keyword>
<keyword>classname</keyword>
<keyword>classsynopsis</keyword>
<keyword>classsynopsisinfo</keyword>
<keyword>cmdsynopsis</keyword>
<keyword>code</keyword>
<keyword>colgroup</keyword>
<keyword>collabname</keyword>
<keyword>collab</keyword>
<keyword>colophon</keyword>
<keyword>confdates</keyword>
<keyword>confgroup</keyword>
<keyword>confnum</keyword>
<keyword>confsponsor</keyword>
<keyword>conftitle</keyword>
<keyword>constant</keyword>
<keyword>constraintdef</keyword>
<keyword>constraint</keyword>
<keyword>constructorsynopsis</keyword>
<keyword>contractnum</keyword>
<keyword>contractsponsor</keyword>
<keyword>contrib</keyword>
<keyword>coref</keyword>
<keyword>corpauthor</keyword>
<keyword>corpcredit</keyword>
<keyword>corpname</keyword>
<keyword>country</keyword>
<keyword>database</keyword>
<keyword>dedication</keyword>
<keyword>destructorsynopsis</keyword>
<keyword>edition</keyword>
<keyword>editor</keyword>
<keyword>entrytbl</keyword>
<keyword>envar</keyword>
<keyword>epigraph</keyword>
<keyword>equation</keyword>
<keyword>errorcode</keyword>
<keyword>errorname</keyword>
<keyword>errortext</keyword>
<keyword>errortype</keyword>
<keyword>example</keyword>
<keyword>exceptionname</keyword>
<keyword>fax</keyword>
<keyword>fieldsynopsis</keyword>
<keyword>footnoteref</keyword>
<keyword>footnote</keyword>
<keyword>foreignphrase</keyword>
<keyword>formalpara</keyword>
<keyword>funcdef</keyword>
<keyword>funcparams</keyword>
<keyword>funcprototype</keyword>
<keyword>funcsynopsis</keyword>
<keyword>funcsynopsisinfo</keyword>
<keyword>function</keyword>
<keyword>glossaryinfo</keyword>
<keyword>glossdiv</keyword>
<keyword>glosslist</keyword>
<keyword>glosssee</keyword>
<keyword>glossseealso</keyword>
<keyword>graphicco</keyword>
<keyword>graphic</keyword>
<keyword>hardware</keyword>
<keyword>honorific</keyword>
<keyword>imageobjectco</keyword>
<keyword>important</keyword>
<keyword>indexdiv</keyword>
<keyword>indexentry</keyword>
<keyword>indexinfo</keyword>
<keyword>informalequation</keyword>
<keyword>informalexample</keyword>
<keyword>informalfigure</keyword>
<keyword>initializer</keyword>
<keyword>inlineequation</keyword>
<keyword>inlinegraphic</keyword>
<keyword>interfacename</keyword>
<keyword>invpartnumber</keyword>
<keyword>isbn</keyword>
<keyword>issn</keyword>
<keyword>issuenum</keyword>
<keyword>itermset</keyword>
<keyword>jobtitle</keyword>
<keyword>keycode</keyword>
<keyword>keywordset</keyword>
<keyword>keyword</keyword>
<keyword>lhs</keyword>
<keyword>lineage</keyword>
<keyword>lineannotation</keyword>
<keyword>literallayout</keyword>
<keyword>lot</keyword>
<keyword>lotentry</keyword>
<keyword>manvolnum</keyword>
<keyword>markup</keyword>
<keyword>medialabel</keyword>
<keyword>mediaobjectco</keyword>
<keyword>member</keyword>
<keyword>methodname</keyword>
<keyword>methodparam</keyword>
<keyword>methodsynopsis</keyword>
<keyword>modespec</keyword>
<keyword>modifier</keyword>
<keyword>mousebutton</keyword>
<keyword>msgaud</keyword>
<keyword>msgentry</keyword>
<keyword>msgexplan</keyword>
<keyword>msginfo</keyword>
<keyword>msglevel</keyword>
<keyword>msgmain</keyword>
<keyword>msgorig</keyword>
<keyword>msgrel</keyword>
<keyword>msgset</keyword>
<keyword>msgsub</keyword>
<keyword>msgtext</keyword>
<keyword>msg</keyword>
<keyword>nonterminal</keyword>
<keyword>objectinfo</keyword>
<keyword>olink</keyword>
<keyword>ooclass</keyword>
<keyword>ooexception</keyword>
<keyword>oointerface</keyword>
<keyword>optional</keyword>
<keyword>orgdiv</keyword>
<keyword>otheraddr</keyword>
<keyword>othercredit</keyword>
<keyword>othername</keyword>
<keyword>pagenums</keyword>
<keyword>paramdef</keyword>
<keyword>parameter</keyword>
<keyword>partinfo</keyword>
<keyword>partintro</keyword>
<keyword>part</keyword>
<keyword>personblurb</keyword>
<keyword>personname</keyword>
<keyword>phone</keyword>
<keyword>pob</keyword>
<keyword>postcode</keyword>
<keyword>prefaceinfo</keyword>
<keyword>preface</keyword>
<keyword>primaryie</keyword>
<keyword>printhistory</keyword>
<keyword>procedure</keyword>
<keyword>productionrecap</keyword>
<keyword>productionset</keyword>
<keyword>production</keyword>
<keyword>productname</keyword>
<keyword>productnumber</keyword>
<keyword>programlistingco</keyword>
<keyword>prompt</keyword>
<keyword>property</keyword>
<keyword>qandadiv</keyword>
<keyword>qandaentry</keyword>
<keyword>qandaset</keyword>
<keyword>question</keyword>
<keyword>quote</keyword>
<keyword>refclass</keyword>
<keyword>refdescriptor</keyword>
<keyword>refentryinfo</keyword>
<keyword>refentrytitle</keyword>
<keyword>refentry</keyword>
<keyword>referenceinfo</keyword>
<keyword>reference</keyword>
<keyword>refmeta</keyword>
<keyword>refmiscinfo</keyword>
<keyword>refname</keyword>
<keyword>refnamediv</keyword>
<keyword>refpurpose</keyword>
<keyword>refsect1</keyword>
<keyword>refsect1info</keyword>
<keyword>refsect2</keyword>
<keyword>refsect2info</keyword>
<keyword>refsect3</keyword>
<keyword>refsect3info</keyword>
<keyword>refsection</keyword>
<keyword>refsectioninfo</keyword>
<keyword>refsynopsisdivinfo</keyword>
<keyword>refsynopsisdiv</keyword>
<keyword>returnvalue</keyword>
<keyword>revremark</keyword>
<keyword>rhs</keyword>
<keyword>sbr</keyword>
<keyword>screenco</keyword>
<keyword>screeninfo</keyword>
<keyword>secondaryie</keyword>
<keyword>sect1info</keyword>
<keyword>sect2info</keyword>
<keyword>sect3info</keyword>
<keyword>sect4info</keyword>
<keyword>sect5info</keyword>
<keyword>sect5</keyword>
<keyword>sectioninfo</keyword>
<keyword>seealsoie</keyword>
<keyword>seealso</keyword>
<keyword>seeie</keyword>
<keyword>seglistitem</keyword>
<keyword>segmentedlist</keyword>
<keyword>segtitle</keyword>
<keyword>seg</keyword>
<keyword>seriesvolnums</keyword>
<keyword>setindexinfo</keyword>
<keyword>setindex</keyword>
<keyword>setinfo</keyword>
<keyword>set</keyword>
<keyword>sgmltag</keyword>
<keyword>shortaffil</keyword>
<keyword>sidebar</keyword>
<keyword>sidebarinfo</keyword>
<keyword>simpara</keyword>
<keyword>simplelist</keyword>
<keyword>simplemsgentry</keyword>
<keyword>simplesect</keyword>
<keyword>spanspec</keyword>
<keyword>state</keyword>
<keyword>stepalternatives</keyword>
<keyword>step</keyword>
<keyword>street</keyword>
<keyword>structfield</keyword>
<keyword>structname</keyword>
<keyword>subject</keyword>
<keyword>subjectset</keyword>
<keyword>subjectterm</keyword>
<keyword>subscript</keyword>
<keyword>substeps</keyword>
<keyword>subtitle</keyword>
<keyword>superscript</keyword>
<keyword>symbol</keyword>
<keyword>synopfragment</keyword>
<keyword>synopfragmentref</keyword>
<keyword>synopsis</keyword>
<keyword>systemitem</keyword>
<keyword>taskprerequisites</keyword>
<keyword>taskrelated</keyword>
<keyword>tasksummary</keyword>
<keyword>task</keyword>
<keyword>td</keyword>
<keyword>tertiaryie</keyword>
<keyword>textdata</keyword>
<keyword>tfoot</keyword>
<keyword>tocback</keyword>
<keyword>tocchap</keyword>
<keyword>tocentry</keyword>
<keyword>tocfront</keyword>
<keyword>toclevel</keyword>
<keyword>tocpart</keyword>
<keyword>toc</keyword>
<keyword>token</keyword>
<keyword>trademark</keyword>
<keyword>type</keyword>
<keyword>varargs</keyword>
<keyword>varname</keyword>
<keyword>videodata</keyword>
<keyword>videoobject</keyword>
<keyword>void</keyword>
<keyword>volumenum</keyword>
<keyword>wordasword</keyword>
</context>
<context id="docbook-tags">
<include>
<context ref="header-elements"/>
<context ref="formatting-elements"/>
<context ref="gui-elements"/>
<context ref="structural-elements"/>
<context ref="xml:element-name" original="true"/>
</include>
</context>
<replace id="xml:element-name" ref="docbook-tags"/>
<context id="docbook">
<include>
<context ref="xml:xml"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Authors: David Perez Cabrera <dperezcabrera@gmail.com>
Copyright (C) 2019 David Perez Cabrera <dperezcabrera@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="docker" name="Dockerfile" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">application/docker;text/docker</property>
<property name="globs">Dockerfile</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="string" name="String" map-to="def:string"/>
<style id="variable" name="Variable" map-to="def:special-char"/>
<style id="variable-definition" name="Variable Definition" map-to="docker:variable"/>
<style id="user" name="User" map-to="def:identifier"/>
<style id="alias-definition" name="Alias definition" map-to="def:identifier"/>
<style id="number" name="Number" map-to="def:number"/>
</styles>
<definitions>
<context id="operator">
<match>(\s*)(&amp;&amp;|\|\|)(\s*)</match>
<include>
<context sub-pattern="2" style-ref="operator"/>
</include>
</context>
<context id="short-parameter-expansion" style-ref="variable">
<match>\$([!@?*#\$0-9]|[a-zA-Z0-9_]+)</match>
</context>
<context id="parameter-expansion" style-ref="variable">
<start>\$\{</start>
<end>\}</end>
<include>
<context ref="single-quoted-string"/>
<context ref="double-quoted-string"/>
<context ref="variable"/>
</include>
</context>
<context id="variable">
<include>
<context ref="short-parameter-expansion"/>
<context ref="parameter-expansion"/>
</include>
</context>
<context id="user">
<match>^\s*(USER)\s+([a-zA-Z_][a-zA-Z0-9_]*)</match>
<include>
<context sub-pattern="2" style-ref="user"/>
<context sub-pattern="1" style-ref="keyword"/>
</include>
</context>
<context id="alias-definition">
<match>\s+(AS)\s+([a-zA-Z][a-zA-Z0-9_]*)</match>
<include>
<context sub-pattern="2" style-ref="user"/>
<context sub-pattern="1" style-ref="keyword"/>
</include>
</context>
<context id="alias-usage">
<match>^\s*(COPY\s+\-\-from)\=([a-zA-Z][a-zA-Z0-9_]*)</match>
<include>
<context sub-pattern="2" style-ref="user"/>
<context sub-pattern="1" style-ref="keyword"/>
</include>
</context>
<context id="from-image">
<match>^\s*(FROM)\s+([a-zA-Z][a-zA-Z0-9_/\:\-\.]*)</match>
<include>
<context sub-pattern="2" style-ref="user"/>
<context sub-pattern="1" style-ref="keyword"/>
</include>
</context>
<context id="variable-definition">
<match>^\s*(ARG|ENV)\s+([a-zA-Z_][a-zA-Z0-9_]*)(\=|\s+)</match>
<include>
<context sub-pattern="2" style-ref="variable-definition"/>
<context sub-pattern="1" style-ref="keyword"/>
</include>
</context>
<context id="comment" end-at-line-end="true" style-ref="comment" class-disabled="no-spell-check">
<start>#</start>
</context>
<context id="single-quoted-string" style-ref="string">
<start>'</start>
<end>'</end>
</context>
<context id="double-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
</context>
<context id="numeric" style-ref="number">
<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="keywords" style-ref="keyword">
<keyword>AS</keyword>
<keyword>ADD</keyword>
<keyword>ARG</keyword>
<keyword>CMD</keyword>
<keyword>COPY</keyword>
<keyword>ENTRYPOINT</keyword>
<keyword>ENV</keyword>
<keyword>EXPOSE</keyword>
<keyword>FROM</keyword>
<keyword>HEALTHCHECK</keyword>
<keyword>LABEL</keyword>
<keyword>MAINTAINER</keyword>
<keyword>ONBUILD</keyword>
<keyword>RUN</keyword>
<keyword>SHELL</keyword>
<keyword>STOPSIGNAL</keyword>
<keyword>USER</keyword>
<keyword>VOLUME</keyword>
<keyword>WORKDIR</keyword>
</context>
<context id="docker" class="no-spell-check">
<include>
<context ref="comment"/>
<context ref="single-quoted-string"/>
<context ref="double-quoted-string"/>
<context ref="numeric"/>
<context ref="variable"/>
<context ref="variable-definition"/>
<context ref="user"/>
<context ref="alias-definition"/>
<context ref="alias-usage"/>
<context ref="from-image"/>
<context ref="operator"/>
<context ref="keywords"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Paolo Borelli <pborelli@gnome.org>
Copyright (C) 2009 Paolo Borelli
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="dosbatch" _name="DOS Batch" version="2.0" _section="Script">
<metadata>
<property name="globs">*.bat;*.cmd;*.sys</property>
<property name="line-comment-start">rem</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="string" name="String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="commands" name="Command" map-to="def:keyword"/>
</styles>
<default-regex-options case-sensitive="false"/>
<definitions>
<context id="comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>^\s*(rem\b|:\s*:)</start>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
</context>
<context id="keywords" style-ref="keyword">
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>exist</keyword>
<keyword>exit</keyword>
<keyword>for</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>not</keyword>
<keyword>return</keyword>
<keyword>say</keyword>
<keyword>select</keyword>
<keyword>then</keyword>
<keyword>when</keyword>
</context>
<context id="commands" style-ref="keyword">
<keyword>ansi</keyword>
<keyword>append</keyword>
<keyword>assign</keyword>
<keyword>assoc</keyword>
<keyword>attrib</keyword>
<keyword>at</keyword>
<keyword>autofail</keyword>
<keyword>backup</keyword>
<keyword>basedev</keyword>
<keyword>boot</keyword>
<keyword>break</keyword>
<keyword>buffers</keyword>
<keyword>cache</keyword>
<keyword>call</keyword>
<keyword>cacls</keyword>
<keyword>cd</keyword>
<keyword>chcp</keyword>
<keyword>chdir</keyword>
<keyword>chkdsk</keyword>
<keyword>chkntfs</keyword>
<keyword>cls</keyword>
<keyword>cmd</keyword>
<keyword>codepage</keyword>
<keyword>color</keyword>
<keyword>command</keyword>
<keyword>compact</keyword>
<keyword>comp</keyword>
<keyword>convert</keyword>
<keyword>copy</keyword>
<keyword>date</keyword>
<keyword>del</keyword>
<keyword>dir</keyword>
<keyword>diskcomp</keyword>
<keyword>diskcopy</keyword>
<keyword>doskey</keyword>
<keyword>echo</keyword>
<keyword>endlocal</keyword>
<keyword>erase</keyword>
<keyword>fc</keyword>
<keyword>find</keyword>
<keyword>findstr</keyword>
<keyword>format</keyword>
<keyword>ftype</keyword>
<keyword>graftabl</keyword>
<keyword>help</keyword>
<keyword>keyb</keyword>
<keyword>label</keyword>
<keyword>md</keyword>
<keyword>mkdir</keyword>
<keyword>mode</keyword>
<keyword>more</keyword>
<keyword>move</keyword>
<keyword>path</keyword>
<keyword>pause</keyword>
<keyword>popd</keyword>
<keyword>print</keyword>
<keyword>prompt</keyword>
<keyword>pushd</keyword>
<keyword>rd</keyword>
<keyword>recover</keyword>
<keyword>rename</keyword>
<keyword>ren</keyword>
<keyword>replace</keyword>
<keyword>restore</keyword>
<keyword>rmdir</keyword>
<keyword>run</keyword>
<keyword>set</keyword>
<keyword>setboot</keyword>
<keyword>setlocal</keyword>
<keyword>shift</keyword>
<keyword>sort</keyword>
<keyword>start</keyword>
<keyword>subst</keyword>
<keyword>time</keyword>
<keyword>title</keyword>
<keyword>trapdump</keyword>
<keyword>tree</keyword>
<keyword>type</keyword>
<keyword>undelete</keyword>
<keyword>unpack</keyword>
<keyword>use</keyword>
<keyword>verify</keyword>
<keyword>ver</keyword>
<keyword>vol</keyword>
<keyword>xcopy</keyword>
</context>
<context id="dosbatch" class="no-spell-check">
<include>
<context ref="comment"/>
<context ref="string"/>
<context ref="keywords"/>
<context ref="commands"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Paolo Borelli <pborelli@gnome.org>
Copyright (C) 2008 Paolo Borelli
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="dot" name="Graphviz Dot" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">text/vnd.graphviz</property>
<property name="globs">*.dot;*.gv</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="error" name="Error" map-to="def:error"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="attribute" name="Attribute name" map-to="def:type"/>
</styles>
<definitions>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>//</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="block-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<context id="keywords" style-ref="keyword">
<keyword>digraph</keyword>
<keyword>edge</keyword>
<keyword>node</keyword>
<keyword>subgraph</keyword>
</context>
<context id="attributes" style-ref="attribute">
<keyword>arrowhead</keyword>
<keyword>arrowsize</keyword>
<keyword>arrowtail</keyword>
<keyword>bgcolor</keyword>
<keyword>center</keyword>
<keyword>color</keyword>
<keyword>constraint</keyword>
<keyword>decorateP</keyword>
<keyword>dir</keyword>
<keyword>distortion</keyword>
<keyword>fillcolor</keyword>
<keyword>fontcolor</keyword>
<keyword>fontname</keyword>
<keyword>fontsize</keyword>
<keyword>headclip</keyword>
<keyword>headlabel</keyword>
<keyword>height</keyword>
<keyword>labelangle</keyword>
<keyword>labeldistance</keyword>
<keyword>labelfontcolor</keyword>
<keyword>labelfontname</keyword>
<keyword>labelfontsize</keyword>
<keyword>label</keyword>
<keyword>layers</keyword>
<keyword>layer</keyword>
<keyword>margin</keyword>
<keyword>mclimit</keyword>
<keyword>minlen</keyword>
<keyword>name</keyword>
<keyword>nodesep</keyword>
<keyword>nslimit</keyword>
<keyword>ordering</keyword>
<keyword>orientation</keyword>
<keyword>pagedir</keyword>
<keyword>page</keyword>
<keyword>peripheries</keyword>
<keyword>port_label_distance</keyword>
<keyword>rankdir</keyword>
<keyword>ranksep</keyword>
<keyword>rank</keyword>
<keyword>ratio</keyword>
<keyword>regular</keyword>
<keyword>rotate</keyword>
<keyword>samehead</keyword>
<keyword>sametail</keyword>
<keyword>shapefile</keyword>
<keyword>shape</keyword>
<keyword>sides</keyword>
<keyword>size</keyword>
<keyword>skew</keyword>
<keyword>style</keyword>
<keyword>tailclip</keyword>
<keyword>taillabel</keyword>
<keyword>URL</keyword>
<keyword>weight</keyword>
<keyword>width</keyword>
</context>
<context id="dot" class="no-spell-check">
<include>
<context ref="line-comment"/>
<context ref="block-comment"/>
<context ref="close-comment-outside-comment"/>
<context ref="keywords"/>
<context ref="attributes"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Yevgen Muntyan <muntyan@tamu.edu>
Copyright (C) 2006-2007 Yevgen Muntyan <muntyan@tamu.edu>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="dpatch" name="DPatch" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">text/x-dpatch</property>
<property name="globs">*.dpatch</property>
</metadata>
<styles>
<style id="patch-start" name="Patch Start" map-to="def:keyword"/>
</styles>
<definitions>
<context id="dpatch">
<include>
<context ref="sh:sh"/>
<context id="patch">
<start>^(\@DPATCH\@).*</start>
<include>
<context sub-pattern="1" where="start" style-ref="patch-start"/>
<context ref="diff:diff"/>
</include>
</context>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Yevgen Muntyan <muntyan@tamu.edu>
Copyright (C) 2006-2007 Yevgen Muntyan <muntyan@tamu.edu>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="dtd" name="DTD" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">text/x-dtd</property>
<property name="globs">*.dtd</property>
<property name="block-comment-start">&lt;!--</property>
<property name="block-comment-end">--&gt;</property>
</metadata>
<styles>
<style id="entity" name="entity" map-to="xml:entity"/>
<style id="decl" name="decl" map-to="xml:doctype"/>
<style id="error" name="error" map-to="xml:error"/>
<style id="quoted-value" name="Quoted Value" map-to="xml:attribute-value"/>
</styles>
<definitions>
<define-regex id="prefix">[a-zA-Z_][a-zA-Z0-9._-]*</define-regex>
<define-regex id="name">[a-zA-Z_][a-zA-Z0-9.:_-]*</define-regex>
<context id="entity" style-ref="entity">
<match>%\%{name};</match>
</context>
<context id="decl-element">
<start>&lt;!ELEMENT\b</start>
<end>&gt;</end>
<include>
<context sub-pattern="0" where="start" style-ref="decl"/>
<context sub-pattern="0" where="end" style-ref="decl"/>
<context ref="entity"/>
<context ref="quoted-value"/>
</include>
</context>
<context id="quoted-value" style-ref="quoted-value">
<start>"</start>
<end>"</end>
<include>
<context style-ref="entity">
<match>[%&amp;]\%{name};</match>
</context>
<context style-ref="error" extend-parent="false">
<match>[%&amp;]\S*</match>
</context>
</include>
</context>
<context id="NDATA" extend-parent="false">
<start>\bNDATA\b</start>
<include>
<context sub-pattern="0" where="start" style-ref="decl"/>
<context>
<match>\%{name}</match>
</context>
<context ref="error"/>
</include>
</context>
<context id="decl-entity">
<start>&lt;!ENTITY\s+(%\s+)?\%{name}\b</start>
<end>&gt;</end>
<include>
<context sub-pattern="0" where="start" style-ref="decl"/>
<context sub-pattern="0" where="end" style-ref="decl"/>
<context ref="quoted-value"/>
<context extend-parent="false">
<start>(SYSTEM|PUBLIC)(?=\s|$)</start>
<include>
<context sub-pattern="0" where="start" style-ref="decl"/>
<context ref="quoted-value"/>
<context ref="NDATA"/>
<context ref="error"/>
</include>
</context>
<context ref="error"/>
</include>
</context>
<context id="decl-attlist">
<start>&lt;!ATTLIST\b</start>
<end>&gt;</end>
<include>
<context sub-pattern="0" where="start" style-ref="decl"/>
<context sub-pattern="0" where="end" style-ref="decl"/>
<context ref="entity"/>
<context ref="quoted-value"/>
</include>
</context>
<context id="decl-notation">
<start>&lt;!NOTATION\b</start>
<end>&gt;</end>
<include>
<context sub-pattern="0" where="start" style-ref="decl"/>
<context sub-pattern="0" where="end" style-ref="decl"/>
<context ref="entity"/>
<context ref="quoted-value"/>
</include>
</context>
<context id="error" style-ref="error" extend-parent="false">
<match>\S+</match>
</context>
<context id="dtd">
<include>
<context ref="xml:comment"/>
<context ref="decl-element"/>
<context ref="decl-entity"/>
<context ref="decl-attlist"/>
<context ref="decl-notation"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,297 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2008 Emmanuel Vaïsse <evaisse@gmail.com>
Copyright (C) 2010 Patryk Zawadzki <patrys@pld-linux.org
Copyright (C) 2015 Tobias Schönberg <tobias47n9e@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<language id="dtl" _name="Django Template" version="2.0" _section="Markup">
<metadata>
<property name="globs">*.dtl</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="error" name="Error" map-to="def:error"/>
<style id="escape" name="Escaped Character" map-to="def:special-char"/>
<style id="string" name="String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="filters" name="Null Value" map-to="def:function"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<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="octal" name="Octal number" map-to="def:base-n-integer"/>
<style id="hexadecimal" name="Hexadecimal number" map-to="def:base-n-integer"/>
</styles>
<definitions>
<context id="comment" style-ref="comment">
<start>&lt;!--</start>
<end>--\s*&gt;</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<context id="double-quoted-string" style-ref="string">
<start>"</start>
<end>"</end>
<include>
<context ref="def:line-continue"/>
</include>
</context>
<context id="single-quoted-string" style-ref="string">
<start>'</start>
<end>'</end>
<include>
<context style-ref="def:special-char">
<match>\\['\\]</match>
</context>
<context ref="def:line-continue"/>
</include>
</context>
<context id="keywords" style-ref="keyword">
<prefix>\s</prefix>
<suffix>\b</suffix>
<keyword>and</keyword>
<keyword>as</keyword>
<keyword>autoescape</keyword>
<keyword>block</keyword>
<keyword>blocktrans</keyword>
<keyword>closeblock</keyword>
<keyword>closebrace</keyword>
<keyword>closecomment</keyword>
<keyword>closevariable</keyword>
<keyword>comment</keyword>
<keyword>csrf_token</keyword>
<keyword>cycle</keyword>
<keyword>debug</keyword>
<keyword>elif</keyword>
<keyword>else</keyword>
<keyword>empty</keyword>
<keyword>endautoescape</keyword>
<keyword>endblock</keyword>
<keyword>endblocktrans</keyword>
<keyword>endcomment</keyword>
<keyword>endfilter</keyword>
<keyword>endfor</keyword>
<keyword>endif</keyword>
<keyword>endifchanged</keyword>
<keyword>endifequal</keyword>
<keyword>endifnotequal</keyword>
<keyword>endspaceless</keyword>
<keyword>endverbatim</keyword>
<keyword>endwith</keyword>
<keyword>extends</keyword>
<keyword>filter</keyword>
<keyword>firstof</keyword>
<keyword>for</keyword>
<keyword>from</keyword>
<keyword>get_media_prefix</keyword>
<keyword>get_static_prefix</keyword>
<keyword>if</keyword>
<keyword>ifchanged</keyword>
<keyword>ifequal</keyword>
<keyword>ifnotequal</keyword>
<keyword>in</keyword>
<keyword>include</keyword>
<keyword>load</keyword>
<keyword>lorem</keyword>
<keyword>not</keyword>
<keyword>now</keyword>
<keyword>on</keyword>
<keyword>off</keyword>
<keyword>openblock</keyword>
<keyword>openbrace</keyword>
<keyword>opencomment</keyword>
<keyword>openvariable</keyword>
<keyword>or</keyword>
<keyword>regroup</keyword>
<keyword>spaceless</keyword>
<keyword>ssi</keyword>
<keyword>static</keyword>
<keyword>staticfiles</keyword>
<keyword>templatetag</keyword>
<keyword>trans</keyword>
<keyword>url</keyword>
<keyword>verbatim</keyword>
<keyword>widthratio</keyword>
<keyword>with</keyword>
</context>
<context id="filters" style-ref="filters">
<prefix>\|</prefix>
<keyword>add</keyword>
<keyword>addslashes</keyword>
<keyword>apnumber</keyword>
<keyword>capfirst</keyword>
<keyword>center</keyword>
<keyword>cut</keyword>
<keyword>date</keyword>
<keyword>default</keyword>
<keyword>default_if_none</keyword>
<keyword>dictsort</keyword>
<keyword>dictsortreversed</keyword>
<keyword>divisibleby</keyword>
<keyword>escape</keyword>
<keyword>escapejs</keyword>
<keyword>filesizeformat</keyword>
<keyword>first</keyword>
<keyword>fix_ampersands</keyword>
<keyword>floatformat</keyword>
<keyword>force_escape</keyword>
<keyword>get_digit</keyword>
<keyword>intcomma</keyword>
<keyword>intword</keyword>
<keyword>iriencode</keyword>
<keyword>join</keyword>
<keyword>last</keyword>
<keyword>length</keyword>
<keyword>length_is</keyword>
<keyword>linebreaks</keyword>
<keyword>linebreaksbr</keyword>
<keyword>linenumbers</keyword>
<keyword>ljust</keyword>
<keyword>lower</keyword>
<keyword>make_list</keyword>
<keyword>markdown</keyword>
<keyword>naturalday</keyword>
<keyword>ordinal</keyword>
<keyword>phone2numeric</keyword>
<keyword>pluralize</keyword>
<keyword>pprint</keyword>
<keyword>random</keyword>
<keyword>removetags</keyword>
<keyword>restructuredtext</keyword>
<keyword>rjust</keyword>
<keyword>safe</keyword>
<keyword>safeseq</keyword>
<keyword>slice</keyword>
<keyword>slugify</keyword>
<keyword>stringformat</keyword>
<keyword>striptags</keyword>
<keyword>textile</keyword>
<keyword>time</keyword>
<keyword>timesince</keyword>
<keyword>timeuntil</keyword>
<keyword>title</keyword>
<keyword>truncatechars</keyword>
<keyword>truncatechars_html</keyword>
<keyword>truncatewords</keyword>
<keyword>truncatewords_html</keyword>
<keyword>unordered_list</keyword>
<keyword>upper</keyword>
<keyword>urlencode</keyword>
<keyword>urlize</keyword>
<keyword>urlizetrunc</keyword>
<keyword>wordcount</keyword>
<keyword>wordwrap</keyword>
<keyword>yesno</keyword>
</context>
<context id="boolean" style-ref="boolean">
<prefix>\b</prefix>
<suffix>\b</suffix>
<keyword>False</keyword>
<keyword>True</keyword>
</context>
<context id="float" style-ref="floating-point">
<match extended="true">
(?&lt;![\w\.])
([0-9]+[Ee][+-]?[0-9]+ |
([0-9]*\.[0-9]+ | [0-9]+\.[0-9]*)([Ee][+-]?[0-9]+)?)
(?![\w\.])
</match>
</context>
<context id="decimal-number" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
[+-]?([1-9][0-9]*|0)
(?![\w\.])
</match>
</context>
<context id="octal-number" style-ref="octal">
<match extended="true">
(?&lt;![\w\.])
[+-]?0[0-7]+
(?![\w\.])
</match>
</context>
<context id="hexadecimal-number" style-ref="hexadecimal">
<match extended="true">
(?&lt;![\w\.])
[+-]?0x[0-9a-fA-F]+
(?![\w\.])
</match>
</context>
<context id="dtl-block" end-at-line-end="true">
<start>&#123;(&#123;|&#37;)(/?)</start>
<end>(&#125;|&#37;)&#125;</end>
<include>
<context sub-pattern="0" where="start" style-ref="boolean"/>
<context sub-pattern="0" where="end" style-ref="boolean"/>
<context ref="double-quoted-string"/>
<context ref="single-quoted-string"/>
<context ref="keywords"/>
<context ref="filters"/>
<context ref="boolean"/>
<context ref="float"/>
<context ref="decimal-number"/>
<context ref="octal-number"/>
<context ref="hexadecimal-number"/>
</include>
</context>
<context id="dtl-comment-block" style-ref="comment" end-at-line-end="true">
<start>&#123;(&#35;)(/?)</start>
<end>(&#35;)&#125;</end>
<include>
<context sub-pattern="0" where="start" style-ref="comment"/>
<context sub-pattern="0" where="end" style-ref="comment"/>
</include>
</context>
<replace id="html:embedded-lang-hook" ref="dtl-block"/>
<context id="dtl">
<include>
<context ref="dtl-comment-block"/>
<context ref="dtl-block"/>
<context ref="html:html"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,238 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Hasan Karahan <hasan.karahan81@gmail.com>, updated by Remi Meier
Copyright (C) 2008 Hasan Karahan <hasan.karahan81@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="eiffel" name="Eiffel" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-eiffel</property>
<property name="globs">*.e;*.eif</property>
<property name="line-comment-start">--</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="string" name="String" map-to="def:string"/>
<style id="debug" name="Debug" map-to="def:preprocessor"/>
<style id="assertion" name="Assertion" map-to="def:preprocessor"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="design-by-contract" name="Design by Contract" map-to="def:keyword"/>
<style id="exception-handling" name="Exception Handling" map-to="def:keyword"/>
<style id="predefined-variable" name="Predefined Variable" map-to="def:builtin"/>
<style id="escaped-character" name="Escaped Character" map-to="def:special-char"/>
<style id="void" name="Void Value" map-to="def:special-constant"/>
<style id="boolean" name="Boolean Value" map-to="def:boolean"/>
<style id="decimal" name="Decimal number" map-to="def:decimal"/>
<style id="hexadecimal" name="Hexadecimal number" map-to="def:base-n-integer"/>
</styles>
<default-regex-options case-sensitive="true"/>
<definitions>
<context id="single-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
</context>
<context id="multi-line-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>"\[</start>
<end>\]"</end>
</context>
<context id="double-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context id="escaped-character" style-ref="escaped-character">
<match extended="true">
(\%\"|\%N|\%\%)
</match>
</context>
</include>
</context>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>--</start>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="debug" style-ref="debug">
<start>(^|\s)debug(\s|$)</start>
<end>(^|\s)end(\s|$)</end>
</context>
<context id="assertion" style-ref="assertion">
<start>(^|\s)check(\s|$)</start>
<end>(^|\s)end(\s|$)</end>
</context>
<context id="keywords" style-ref="keyword">
<!-- class declaration -->
<keyword>indexing</keyword>
<keyword>deferred</keyword>
<keyword>expanded</keyword>
<keyword>class</keyword>
<keyword>obsolete</keyword>
<keyword>inherit</keyword>
<keyword>insert</keyword>
<!-- parent list -->
<keyword>rename</keyword>
<keyword>as</keyword>
<keyword>export</keyword>
<keyword>all</keyword>
<keyword>undefine</keyword>
<keyword>redefine</keyword>
<keyword>select</keyword>
<keyword>end</keyword>
<keyword>(create|creation)</keyword>
<keyword>feature</keyword>
<!-- feature declaration -->
<keyword>frozen</keyword>
<keyword>prefix</keyword>
<keyword>infix</keyword>
<keyword>is</keyword>
<!-- routine -->
<keyword>obsolete</keyword>
<keyword>require\s*(else)?</keyword>
<keyword>local</keyword>
<!-- routine body -->
<keyword>deferred</keyword>
<keyword>do</keyword>
<keyword>once</keyword>
<keyword>external</keyword>
<keyword>alias</keyword>
<keyword>ensure\s*(then)?</keyword>
<keyword>rescue</keyword>
<keyword>end</keyword>
<keyword>unique</keyword>
<keyword>invariant</keyword>
<keyword>end</keyword>
<!-- binary -->
<keyword>and\s*(then)?</keyword>
<keyword>or\s*(else)?</keyword>
<keyword>xor</keyword>
<keyword>implies</keyword>
<!-- unary -->
<keyword>not</keyword>
<!-- instruction -->
<keyword>retry</keyword>
<keyword>if</keyword>
<keyword>then</keyword>
<keyword>elseif</keyword>
<keyword>else</keyword>
<keyword>end</keyword>
<keyword>inspect</keyword>
<keyword>when</keyword>
<keyword>end</keyword>
<!-- loop -->
<keyword>from</keyword>
<keyword>invariant</keyword>
<keyword>variant</keyword>
<keyword>until</keyword>
<keyword>loop</keyword>
<keyword>do</keyword>
<keyword>end</keyword>
<!-- expression -->
<keyword>strip</keyword>
<keyword>old</keyword>
<!-- type -->
<keyword>separate</keyword>
<keyword>expanded</keyword>
<keyword>like</keyword>
</context>
<context id="predefined-variables" style-ref="predefined-variable">
<keyword>Current</keyword>
<keyword>Precursor</keyword>
<keyword>Result</keyword>
</context>
<context id="void-value" style-ref="void">
<keyword>Void</keyword>
</context>
<context id="boolean" style-ref="boolean">
<keyword>False</keyword>
<keyword>True</keyword>
</context>
<context id="class-types" style-ref="type">
<match extended="true">
[A-Z_][A-Z0-9_]+
</match>
</context>
<context id="number" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
(([0-9]+)|([0-9]+\.[0-9]+([Ee][-]?[0-9]+)?))
(?![\w\.])
</match>
</context>
<context id="hexadecimal" style-ref="hexadecimal">
<match extended="true">
(?&lt;![\w\.])
\$[0-9a-fA-F]*
(?![\w\.])
</match>
</context>
<context id="eiffel" class="no-spell-check">
<include>
<context ref="single-quoted-string"/>
<context ref="multi-line-string"/>
<context ref="double-quoted-string"/>
<context ref="line-comment"/>
<context ref="debug"/>
<context ref="assertion"/>
<context ref="keywords"/>
<context ref="predefined-variables"/>
<context ref="class-types"/>
<context ref="void-value"/>
<context ref="boolean"/>
<context ref="number"/>
<context ref="hexadecimal"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,262 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Paolo Borelli <pborelli@gnome.org>
Copyright (C) 2007 Paolo Borelli
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="erlang" name="Erlang" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-erlang</property>
<property name="globs">*.erl;*.hrl</property>
<property name="line-comment-start">%</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="atom" name="Atom" map-to="def:type"/>
<style id="string" name="String" map-to="def:string"/>
<style id="character" name="Character" map-to="def:character"/>
<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="base-n-integer" name="Base-N Integer" map-to="def:base-n-integer"/>
<style id="builtin" name="Builtin" map-to="def:builtin"/>
<style id="compiler-directive" name="Compiler Directive" map-to="def:preprocessor"/>
</styles>
<definitions>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>%</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="keywords" style-ref="keyword">
<keyword>after</keyword>
<keyword>begin</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
<keyword>cond</keyword>
<keyword>end</keyword>
<keyword>fun</keyword>
<keyword>if</keyword>
<keyword>let</keyword>
<keyword>of</keyword>
<keyword>query</keyword>
<keyword>receive</keyword>
<keyword>when</keyword>
</context>
<context id="operators" style-ref="operator">
<keyword>and</keyword>
<keyword>band</keyword>
<keyword>bnot</keyword>
<keyword>bor</keyword>
<keyword>bsl</keyword>
<keyword>bsr</keyword>
<keyword>bxor</keyword>
<keyword>div</keyword>
<keyword>not</keyword>
<keyword>or</keyword>
<keyword>rem</keyword>
<keyword>xor</keyword>
</context>
<context id="atom" style-ref="atom">
<start>'</start>
<end>'</end>
<include>
<context ref="def:escape"/>
</include>
</context>
<context id="string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="def:escape"/>
</include>
</context>
<context id="character" style-ref="character" class="character" class-disabled="no-spell-check">
<match>\$(?:(\\.)|.)</match>
<include>
<context sub-pattern="1" style-ref="def:special-char"/>
</include>
</context>
<context id="float" style-ref="floating-point">
<match extended="true">
(?&lt;![\w\.])
[0-9]+\.[0-9]+([Ee][+-]?[0-9]+)?
(?![\w\.])
</match>
</context>
<context id="base-n-number" style-ref="base-n-integer">
<match extended="true">
(?&lt;![\w\.])
[1-9]([0-9])?#[0-9a-fA-F]+
(?![\w\.])
</match>
</context>
<context id="decimal-number" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
[0-9]+
(?![\w\.])
</match>
</context>
<context id="builtins" style-ref="builtin">
<keyword>abs</keyword>
<keyword>alive</keyword>
<keyword>apply</keyword>
<keyword>atom_to_list</keyword>
<keyword>atom</keyword>
<keyword>binary_to_list</keyword>
<keyword>binary_to_ter</keyword>
<keyword>binary</keyword>
<keyword>check_process_code</keyword>
<keyword>concat_binary</keyword>
<keyword>constant</keyword>
<keyword>date</keyword>
<keyword>delete_module</keyword>
<keyword>disconnect_node</keyword>
<keyword>element</keyword>
<keyword>erase</keyword>
<keyword>exit</keyword>
<keyword>float</keyword>
<keyword>float_to_list</keyword>
<keyword>function</keyword>
<keyword>get_cookie</keyword>
<keyword>get_keys</keyword>
<keyword>get</keyword>
<keyword>group_leader</keyword>
<keyword>halt</keyword>
<keyword>hash</keyword>
<keyword>hd</keyword>
<keyword>integer_to_list</keyword>
<keyword>integer</keyword>
<keyword>is_alive</keyword>
<keyword>length</keyword>
<keyword>link</keyword>
<keyword>list_to_atom</keyword>
<keyword>list_to_binary</keyword>
<keyword>list_to_float</keyword>
<keyword>list_to_integer</keyword>
<keyword>list_to_pid</keyword>
<keyword>list_to_tuple</keyword>
<keyword>list</keyword>
<keyword>load_module</keyword>
<keyword>make_ref</keyword>
<keyword>math</keyword>
<keyword>module_loaded</keyword>
<keyword>monitor_node</keyword>
<keyword>node</keyword>
<keyword>nodes</keyword>
<keyword>now</keyword>
<keyword>number</keyword>
<keyword>open_port</keyword>
<keyword>pid_to_list</keyword>
<keyword>pid</keyword>
<keyword>ports</keyword>
<keyword>port_close</keyword>
<keyword>port_info</keyword>
<keyword>preloaded</keyword>
<keyword>processes</keyword>
<keyword>process_flag</keyword>
<keyword>process_info</keyword>
<keyword>process</keyword>
<keyword>purge_module</keyword>
<keyword>put</keyword>
<keyword>record</keyword>
<keyword>reference</keyword>
<keyword>registered</keyword>
<keyword>register</keyword>
<keyword>round</keyword>
<keyword>self</keyword>
<keyword>setelement</keyword>
<keyword>set_cookie</keyword>
<keyword>set_node</keyword>
<keyword>size</keyword>
<keyword>spawn_link</keyword>
<keyword>spawn</keyword>
<keyword>split_binary</keyword>
<keyword>statistics</keyword>
<keyword>term_to_binary</keyword>
<keyword>throw</keyword>
<keyword>time</keyword>
<keyword>tl</keyword>
<keyword>trunc</keyword>
<keyword>tuple_to_list</keyword>
<keyword>unlink</keyword>
<keyword>unregister</keyword>
<keyword>whereis</keyword>
</context>
<context id="compiler-directives" style-ref="compiler-directive">
<prefix>-</prefix>
<keyword>author</keyword>
<keyword>behaviour</keyword>
<keyword>compile</keyword>
<keyword>copyright</keyword>
<keyword>define</keyword>
<keyword>doc</keyword>
<keyword>else</keyword>
<keyword>endif</keyword>
<keyword>error</keyword>
<keyword>export</keyword>
<keyword>file</keyword>
<keyword>ifdef</keyword>
<keyword>ifndef</keyword>
<keyword>import</keyword>
<keyword>include_lib</keyword>
<keyword>include</keyword>
<keyword>module</keyword>
<keyword>on_load</keyword>
<keyword>record</keyword>
<keyword>undef</keyword>
<keyword>vsn</keyword>
<keyword>warning</keyword>
</context>
<context id="erlang" class="no-spell-check">
<include>
<context ref="line-comment"/>
<context ref="keywords"/>
<context ref="operators"/>
<context ref="atom"/>
<context ref="string"/>
<context ref="character"/>
<context ref="float"/>
<context ref="base-n-number"/>
<context ref="decimal-number"/>
<context ref="builtins"/>
<context ref="compiler-directives"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Søren Hauberg
Copyright (C) 2009 Søren Hauberg <soren@hauberg.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="fcl" name="FCL" version="2.0" _section="Scientific">
<metadata>
<property name="globs">*.fcl</property>
<property name="line-comment-start">//</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="floating-point" name="Floating Point" map-to="def:floating-point"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="block" name="Block" map-to="def:function"/>
<style id="decimal" name="Decimal" map-to="def:decimal"/>
<style id="reserved-constant" name="Reserved Constant" map-to="def:special-constant"/>
</styles>
<definitions>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>//</start>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="keyword" style-ref="keyword">
<keyword>ACCU</keyword>
<keyword>ACT</keyword>
<keyword>AND</keyword>
<keyword>ASUM</keyword>
<keyword>BDIF</keyword>
<keyword>BSUM</keyword>
<keyword>COA</keyword>
<keyword>COG</keyword>
<keyword>COGS</keyword>
<keyword>DEFAULT</keyword>
<keyword>IF</keyword>
<keyword>IS</keyword>
<keyword>LM</keyword>
<keyword>MAX</keyword>
<keyword>METHOD</keyword>
<keyword>MIN</keyword>
<keyword>NC</keyword>
<keyword>NOT</keyword>
<keyword>NSUM</keyword>
<keyword>OR</keyword>
<keyword>PROD</keyword>
<keyword>RANGE</keyword>
<keyword>RM</keyword>
<keyword>RULE</keyword>
<keyword>TERM</keyword>
<keyword>THEN</keyword>
<keyword>WITH</keyword>
</context>
<context id="block" style-ref="block">
<keyword>DEFUZZIFY</keyword>
<keyword>END_DEFUZZIFY</keyword>
<keyword>END_FUNCTION_BLOCK</keyword>
<keyword>END_FUZZIFY</keyword>
<keyword>END_OPTIONS</keyword>
<keyword>END_RULEBLOCK</keyword>
<keyword>END_VAR</keyword>
<keyword>FUNCTION_BLOCK</keyword>
<keyword>FUZZIFY</keyword>
<keyword>OPTIONS</keyword>
<keyword>RULEBLOCK</keyword>
<keyword>VAR</keyword>
<keyword>VAR_INPUT</keyword>
<keyword>VAR_OUTPUT</keyword>
</context>
<context id="decimal" style-ref="decimal">
<match>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</match>
</context>
<context id="floating-point-number" style-ref="floating-point">
<match>\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?</match>
</context>
<context id="fcl" class="no-spell-check">
<include>
<context ref="line-comment"/>
<context ref="keyword"/>
<context ref="block"/>
<context ref="decimal"/>
<context ref="floating-point-number"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,486 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
File based about the file "sh.lang" present in GtkSourceView
Author: Nicola Jelmorini <jelmorini@protonmail.ch>
Copyright (C) 2014 Nicola Jelmorini <jelmorini@protonmail.ch>
This file is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
You should have received a copy of the GNU Lesser General Public
License along with this file; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
or visit this link <http://www.gnu.org/licenses/>.
-->
<language id="fish" name="Fish" version="2.0" _section="Script">
<metadata>
<property name="mimetypes">text/x-fish</property>
<property name="globs">*.fish</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="function" name="Function" map-to="def:function"/>
<style id="string" name="String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="variable" name="Variable" map-to="def:type"/>
<style id="variable-definition" name="Variable Definition" map-to="sh:variable"/>
<style id="variable-definition" name="Variable Definition" map-to="fish:variable"/>
<style id="others" name="Others" map-to="def:keyword"/>
<style id="common-command" name="Common Commands" map-to="def:keyword"/>
<style id="here-doc-bound" name="Heredoc Bound" map-to="def:keyword"/>
<style id="subshell" name="Subshell" map-to="def:preprocessor"/>
</styles>
<definitions>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>(?&lt;!\S)#</start>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="double-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<!-- highlight escaped chars -->
<context style-ref="def:special-char">
<match>\\[$`"\\]</match>
</context>
<!-- skip backslash where it's not an escaping char -->
<context>
<match>\\</match>
</context>
<context ref="def:line-continue"/>
<context ref="variable"/>
</include>
</context>
<context id="single-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
</context>
<context id="subshell">
<start>\(</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context sub-pattern="0" where="end" style-ref="keyword"/>
<context ref="fish"/>
</include>
</context>
<context id="punctuator" style-ref="others">
<match>[;\|&amp;/]</match>
</context>
<context id="function" style-ref="function">
<!-- <match>function[ \t]\b[a-zA-Z_][a-zA-Z0-9_]*</match> function and name coloured -->
<match>function\b[a-zA-Z_][a-zA-Z0-9_]*</match>
</context>
<context id="redirection" style-ref="others">
<keyword>&gt;&amp;+[0-9]</keyword>
<keyword>\b[0-9]+&gt;&amp;</keyword>
<keyword>\b[0-9]+&gt;&amp;+[0-9]</keyword>
<keyword>\b[0-9]+&gt;</keyword>
<keyword>&gt;&gt;</keyword>
<keyword>\b[0-9]+&gt;&gt;</keyword>
<keyword>&lt;&amp;[0-9]</keyword>
<keyword>\b[0-9]+&lt;&amp;</keyword>
<keyword>\b[0-9]+&lt;&amp;[0-9]</keyword>
<keyword>\b[0-9]+&lt;</keyword>
<keyword>&lt;&lt;+[0-9]</keyword>
<keyword>\b[0-9]+&lt;&lt;</keyword>
</context>
<context id="here-doc">
<start extended="true" dupnames="true">
# (?&lt;!&lt;) and [^\s&lt;] are for not matching
# here-word (&lt;&lt;&lt;)
(?&lt;!&lt;)
&lt;&lt;-?\s*\\?(
\"(?P&lt;HDB&gt;[^\s&lt;]+)\" | # "EOF"
\'(?P&lt;HDB&gt;[^\s&lt;]+)\' | # 'EOF'
(?P&lt;HDB&gt;[^\s&lt;]+) # EOF
)$
</start>
<end>^\t*\%{HDB@start}$</end>
<include>
<context sub-pattern="0" where="start" style-ref="here-doc-bound"/>
<context sub-pattern="0" where="end" style-ref="here-doc-bound"/>
</include>
</context>
<context id="operator" style-ref="function">
<keyword>\-a\b</keyword>
<keyword>\-b\b</keyword>
<keyword>\-c\b</keyword>
<keyword>\-d\b</keyword>
<keyword>\-e\b</keyword>
<keyword>\-f\b</keyword>
<keyword>\-g\b</keyword>
<keyword>\-h\b</keyword>
<keyword>\-k\b</keyword>
<keyword>\-p\b</keyword>
<keyword>\-r\b</keyword>
<keyword>\-s\b</keyword>
<keyword>\-t\b</keyword>
<keyword>\-u\b</keyword>
<keyword>\-w\b</keyword>
<keyword>\-x\b</keyword>
<keyword>\-O\b</keyword>
<keyword>\-G\b</keyword>
<keyword>\-L\b</keyword>
<keyword>\-S\b</keyword>
<keyword>\-N\b</keyword>
<keyword>\-nt\b</keyword>
<keyword>\-ot\b</keyword>
<keyword>\-ef\b</keyword>
<keyword>\-o\b</keyword>
<keyword>\-z\b</keyword>
<keyword>\-n\b</keyword>
<keyword>&lt;</keyword>
<keyword>&gt;</keyword>
<keyword>\!=</keyword>
<keyword>\-eq\b</keyword>
<keyword>\-ne\b</keyword>
<keyword>\-lt\b</keyword>
<keyword>\-le\b</keyword>
<keyword>\-gt\b</keyword>
<keyword>\-ge\b</keyword>
</context>
<context id="variable" style-ref="variable">
<match>\$+[!@?*#\${a-zA-Z0-9_][}a-zA-Z0-9_]*</match>
</context>
<context id="variable-definition">
<match>(^\s*|(?&lt;=else)\s+)([a-zA-Z_][a-zA-Z0-9_]*)\=</match>
<include>
<context sub-pattern="2" style-ref="variable-definition"/>
</include>
</context>
<context id="built-in-command-1" style-ref="keyword">
<prefix></prefix>
<suffix></suffix>
<keyword>\!</keyword>
<keyword>\{</keyword>
<keyword>\}</keyword>
<keyword>\:</keyword>
<keyword>(?&lt;=\s)\.(?=\s)</keyword>
</context>
<context id="for-command">
<start>\bfor\b</start>
<end>\b(in)\b</end>
<include>
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context sub-pattern="0" where="end" style-ref="keyword"/>
<context style-ref="variable-definition" once-only="true">
<match>\w+</match>
</context>
</include>
</context>
<context id="built-in-command-2" style-ref="keyword">
<prefix>(?&lt;![^\s;\(\)\`])</prefix>
<suffix>(?![^\s;\(\)\`])</suffix>
<keyword>alias</keyword>
<keyword>and</keyword>
<keyword>begin</keyword>
<keyword>bg</keyword>
<keyword>bind</keyword>
<keyword>block</keyword>
<keyword>break</keyword>
<keyword>breakpoint</keyword>
<keyword>builtin</keyword>
<keyword>case</keyword>
<keyword>cd</keyword>
<keyword>command</keyword>
<keyword>commandline</keyword>
<keyword>complete</keyword>
<keyword>contains</keyword>
<keyword>continue</keyword>
<keyword>count</keyword>
<keyword>dirh</keyword>
<keyword>dirs</keyword>
<keyword>echo</keyword>
<keyword>else</keyword>
<keyword>emit</keyword>
<keyword>end</keyword>
<keyword>eval</keyword>
<keyword>exec</keyword>
<keyword>exit</keyword>
<keyword>fg</keyword>
<keyword>fish</keyword>
<keyword>fish_config</keyword>
<keyword>fish_indent</keyword>
<keyword>fish_pager</keyword>
<keyword>fish_prompt</keyword>
<keyword>fish_right_prompt</keyword>
<keyword>fish_update_completions</keyword>
<keyword>fishd</keyword>
<keyword>for</keyword>
<keyword>funced</keyword>
<keyword>funcsave</keyword>
<keyword>function</keyword>
<keyword>functions</keyword>
<keyword>help</keyword>
<keyword>history</keyword>
<keyword>if</keyword>
<keyword>isatty</keyword>
<keyword>jobs</keyword>
<keyword>math</keyword>
<keyword>mimedb</keyword>
<keyword>nextd</keyword>
<keyword>not</keyword>
<keyword>open</keyword>
<keyword>or</keyword>
<keyword>popd</keyword>
<keyword>prevd</keyword>
<keyword>psub</keyword>
<keyword>pushd</keyword>
<keyword>pwd</keyword>
<keyword>random</keyword>
<keyword>read</keyword>
<keyword>return</keyword>
<keyword>set</keyword>
<keyword>set_color</keyword>
<keyword>source</keyword>
<keyword>status</keyword>
<keyword>switch</keyword>
<keyword>test</keyword>
<keyword>trap</keyword>
<keyword>type</keyword>
<keyword>ulimit</keyword>
<keyword>umask</keyword>
<keyword>vared</keyword>
<keyword>while</keyword>
</context>
<context id="built-in-command">
<include>
<context ref="built-in-command-1"/>
<context ref="for-command"/>
<context ref="built-in-command-2"/>
</include>
</context>
<context id="common-command" style-ref="common-command">
<prefix>(?&lt;![\w\-\.])</prefix>
<suffix>(?![\w\-\.])</suffix>
<keyword>ar</keyword>
<keyword>awk</keyword>
<keyword>basename</keyword>
<keyword>bash</keyword>
<keyword>beep</keyword>
<keyword>bunzip2</keyword>
<keyword>bzcat</keyword>
<keyword>bzcmp</keyword>
<keyword>bzdiff</keyword>
<keyword>bzegrep</keyword>
<keyword>bzfgrep</keyword>
<keyword>bzgrep</keyword>
<keyword>bzip2recover</keyword>
<keyword>bzip2</keyword>
<keyword>bzless</keyword>
<keyword>bzmore</keyword>
<keyword>cc</keyword>
<keyword>cat</keyword>
<keyword>chattr</keyword>
<keyword>chgrp</keyword>
<keyword>chmod</keyword>
<keyword>chown</keyword>
<keyword>chroot</keyword>
<keyword>clear</keyword>
<keyword>cmp</keyword>
<keyword>cpp</keyword>
<keyword>cp</keyword>
<keyword>cut</keyword>
<keyword>date</keyword>
<keyword>dd</keyword>
<keyword>df</keyword>
<keyword>dialog</keyword>
<keyword>diff3</keyword>
<keyword>diff</keyword>
<keyword>dirname</keyword>
<keyword>dir</keyword>
<keyword>du</keyword>
<keyword>egrep</keyword>
<keyword>eject</keyword>
<keyword>env</keyword>
<keyword>expr</keyword>
<keyword>false</keyword>
<keyword>fgrep</keyword>
<keyword>file</keyword>
<keyword>find</keyword>
<keyword>fish</keyword>
<keyword>fmt</keyword>
<keyword>free</keyword>
<keyword>ftp</keyword>
<keyword>funzip</keyword>
<keyword>fuser</keyword>
<keyword>gawk</keyword>
<keyword>gcc</keyword>
<keyword>getent</keyword>
<keyword>getopt</keyword>
<keyword>grep</keyword>
<keyword>groups</keyword>
<keyword>gunzip</keyword>
<keyword>gzip</keyword>
<keyword>head</keyword>
<keyword>hostname</keyword>
<keyword>id</keyword>
<keyword>ifconfig</keyword>
<keyword>info</keyword>
<keyword>insmod</keyword>
<keyword>install</keyword>
<keyword>join</keyword>
<keyword>killall</keyword>
<keyword>kill</keyword>
<keyword>lastb</keyword>
<keyword>last</keyword>
<keyword>ld</keyword>
<keyword>less</keyword>
<keyword>ln</keyword>
<keyword>locate</keyword>
<keyword>lockfile</keyword>
<keyword>login</keyword>
<keyword>logname</keyword>
<keyword>lp</keyword>
<keyword>lpr</keyword>
<keyword>lsattr</keyword>
<keyword>ls</keyword>
<keyword>lsmod</keyword>
<keyword>make</keyword>
<keyword>man</keyword>
<keyword>mkdir</keyword>
<keyword>mkfifo</keyword>
<keyword>mknod</keyword>
<keyword>mktemp</keyword>
<keyword>modprobe</keyword>
<keyword>more</keyword>
<keyword>mount</keyword>
<keyword>mv</keyword>
<keyword>namei</keyword>
<keyword>nawk</keyword>
<keyword>nice</keyword>
<keyword>nl</keyword>
<keyword>pass</keyword>
<keyword>passwd</keyword>
<keyword>patch</keyword>
<keyword>perl</keyword>
<keyword>pgawk</keyword>
<keyword>pidof</keyword>
<keyword>ping</keyword>
<keyword>pkg-config</keyword>
<keyword>pr</keyword>
<keyword>ps</keyword>
<keyword>pwd</keyword>
<keyword>readlink</keyword>
<keyword>renice</keyword>
<keyword>rmdir</keyword>
<keyword>rm</keyword>
<keyword>scp</keyword>
<keyword>sed</keyword>
<keyword>seq</keyword>
<keyword>sh</keyword>
<keyword>sleep</keyword>
<keyword>sort</keyword>
<keyword>split</keyword>
<keyword>ssh-add</keyword>
<keyword>ssh-agent</keyword>
<keyword>ssh-keygen</keyword>
<keyword>ssh-keyscan</keyword>
<keyword>ssh</keyword>
<keyword>stat</keyword>
<keyword>sudo</keyword>
<keyword>sum</keyword>
<keyword>su</keyword>
<keyword>sync</keyword>
<keyword>tac</keyword>
<keyword>tail</keyword>
<keyword>tar</keyword>
<keyword>tee</keyword>
<keyword>tempfile</keyword>
<keyword>touch</keyword>
<keyword>true</keyword>
<keyword>tr</keyword>
<keyword>umount</keyword>
<keyword>uname</keyword>
<keyword>uniq</keyword>
<keyword>unlink</keyword>
<keyword>unzip</keyword>
<keyword>uptime</keyword>
<keyword>wall</keyword>
<keyword>wc</keyword>
<keyword>wget</keyword>
<keyword>whereis</keyword>
<keyword>which</keyword>
<keyword>whoami</keyword>
<keyword>who</keyword>
<keyword>write</keyword>
<keyword>w</keyword>
<keyword>xargs</keyword>
<keyword>xdialog</keyword>
<keyword>zcat</keyword>
<keyword>zcmp</keyword>
<keyword>zdiff</keyword>
<keyword>zegrep</keyword>
<keyword>zenity</keyword>
<keyword>zfgrep</keyword>
<keyword>zforce</keyword>
<keyword>zgrep</keyword>
<keyword>zip</keyword>
<keyword>zless</keyword>
<keyword>zmore</keyword>
<keyword>znew</keyword>
</context>
<context id="case">
<start>\bcase\b</start>
<end>\bend\b</end>
<include>
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context sub-pattern="0" where="end" style-ref="keyword"/>
<context ref="double-quoted-string"/>
<context ref="single-quoted-string"/>
<context style-ref="others">
<match>[^\)\s]+\s*\)|;;</match>
</context>
<context ref="fish"/>
</include>
</context>
<context id="fish" class="no-spell-check">
<include>
<context ref="def:shebang"/>
<context ref="line-comment"/>
<context ref="def:escape"/>
<context ref="single-quoted-string"/>
<context ref="double-quoted-string"/>
<context ref="subshell"/>
<context ref="case"/>
<context ref="punctuator"/>
<context ref="function"/>
<context ref="here-doc"/>
<context ref="redirection"/>
<context ref="operator"/>
<context ref="variable"/>
<context ref="variable-definition"/>
<context ref="built-in-command"/>
<context ref="common-command"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,234 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Jens-Hanno Schwalm <hanno@schwalm-bremen.de>
Copyright (C) 2007 Jens-Hanno Schwalm; <hanno@schwalm-bremen.de>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="forth" name="Forth" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-forth</property>
<property name="globs">*.frt;*.fs</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="string" name="String" map-to="def:string"/>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="keyword" name="Keyword" map-to="def:statement"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="number" name="Number" map-to="def:decimal"/>
<style id="debugs" name="Debug Code" map-to="def:comment"/>
<style id="error" name="Error Text" map-to="def:error"/>
<style id="compiler" name="Compiler Directive" map-to="def:identifier"/>
</styles>
<default-regex-options case-sensitive="false"/>
<definitions>
<context id="forth" class="no-spell-check">
<include>
<!-- single line comments \ \G -->
<context id="comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>(?&lt;![^\s])(\\|--|\\G)(?![^\s])</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<!-- multiline comments ending with ")" ( (S (F -->
<context id="comment-multiline" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>(?&lt;![^\s])(\(|\(S|\(F)(?![^\s])</start>
<end>\)</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<!-- multiline comment (* ....*) -->
<context id="comment-multiline2" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>(?&lt;![^\s])\(\*(?![^\s])</start>
<end>\*\)(?![^\s])</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<!-- multiline comment DOC ... ENDDOC -->
<context id="comment-multiline3" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>(?&lt;![^\s])DOC(?![^\s])</start>
<end>(?&lt;![^\s])ENDDOC(?![^\s])</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<!-- preprocessor instructions followed by a string -->
<context id="preproc1" style-ref="preprocessor">
<match extended="true">
(?&lt;![^\s])
(NEEDS|INCLUDE|IN|MARKER)\s+[^\s]*
(?![^\s])
</match>
</context>
<!-- REVISION instruction is followed by a filename plus a string between "..." -->
<context id="preproc2" style-ref="preprocessor">
<match extended="true">
(?&lt;![^\s])
(REVISION)\s+[^\s]*\s*".*"
(?![^\s])
</match>
</context>
<!-- preprocessor instructions -->
<context id="preproc3" style-ref="preprocessor">
<match extended="true">
(?&lt;![^\s])
(INCLUDED|INCLUDE-FILE)
(?![^\s])
</match>
</context>
<!-- all defining or compiler extension words are followed by another whitespace delinited word -->
<context id="definers" style-ref="type">
<match extended="true">
(?&lt;![^\s])
(POSTPONE|\[COMPILE\]|\[CHAR\]|\['\]|COMPILE|CHAR|[DFT]?VALUE|[2FT]?VARIABLE|[DS]?FVARIABLE|[T]?USER|[T]?CODE|[DZFT]?LOCAL|
[2FT]?CONSTANT|TCONSTANT-|TSUB|=\:|==\:|DEFER|HC\:|[VHTM]?\:)\s+[^\s]+
(?![^\s])
</match>
</context>
<!-- the grouped local words like LOCALS| read words until a last | -->
<context id="locals" style-ref="type">
<match extended="true">
(?&lt;![^\s])
([DFZ]?LOCALS)\|\s+[^\|]+[\|]
(?![^\s])
</match>
</context>
<!-- strings ended by a " S" ." EVAL" C" Z" -->
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>(?&lt;![^\s])(S|[.]|EVAL|C|Z|,)"\s</start>
<end>"</end>
</context>
<!-- strings ended by a ~ character when " is inside a string: .~ -->
<context id="string2" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>(?&lt;![^\s])(.~)\s</start>
<end>~</end>
</context>
<!-- comment string .( ..) -->
<context id="string3" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>(?&lt;![^\s])[.]\(\s</start>
<end>\)</end>
</context>
<!-- error strings ending with " ABORT" ?ERROR" -->
<context id="errorstring" style-ref="error" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>(?&lt;![^\s])(ABORT|\?ERROR)"\s</start>
<end>"</end>
</context>
<!-- represent numbers including the hex, decimal and binary prefixes, also short characters -->
<context id="number" style-ref="number">
<match extended="true">
(?&lt;![^\s])
([$][-+]?[A-F0-9.]+ |
[#][-+]?[0-9.]+ |
[%][-+]?[0-1.]+ |
[-+]?[0-9.]+ |
[-+]?[0-9]+[.]?[0-9]*[eE][0-9]* |
'[^\s]' |
[\^][A-Za-z] |
TRUE |
FALSE)
(?![^\s])
</match>
</context>
<!-- Control flow Keywords -->
<context id="keywords" style-ref="keyword">
<match extended="true">
(?&lt;![^\s])
(\[IF\]|\[ELSE\]|\[THEN\]|\[DEFINED\]|\[UNDEFINED\]|\?DEF|\?UNDEF|THROW|CASE|ENDCASE|OF|ENDOF|FOR|NEXT|
IF[,]?|ELSE[,]?|THEN[,]?|ENDIF[,]?|BEGIN[,]?|WHILE[,]?|REPEAT[,]?|UNTIL[,]?|AGAIN[,]?|DO|LOOP|\?DO|\+LOOP|LEAVE|\?LEAVE|UNLOOP|EXIT|\?EXIT|
PAR|ENDPAR|STARTP|ENDP)
(?![^\s])
</match>
</context>
<!-- Compiler modifications -->
<context id="keywords2" style-ref="compiler">
<match extended="true">
(?&lt;![^\s])
(PRIVATE|PRIVATES|DEPRIVE|FORGET|IMMEDIATE|ALSO|ONLY|FORTH|DEFINITIONS|HEADERLESS)
(?![^\s])
</match>
</context>
<!-- Defining keywords without displaying the following word -->
<context id="keywords3" style-ref="type">
<match extended="true">
(?&lt;![^\s])
(\:ABOUT|DOES>|FORGET>|CREATE|\:NONAME)
(?![^\s])
</match>
</context>
<!-- <<DEBUG ..... DEBUG>> -->
<context id="comment-debug" extend-parent="false" style-ref="debugs">
<start>(?&lt;![^\s])(&lt;&lt;DEBUG)(?![^\s])</start>
<end>(?&lt;![^\s])(DEBUG>>)(?![^\s])</end>
<include>
<context ref="keywords"/>
<context ref="keywords2"/>
<context ref="keywords3"/>
<context ref="number"/>
<context ref="comment"/>
<context ref="string" />
<context ref="string2" />
<context ref="string3" />
<context ref="errorstring" />
<context ref="locals" />
<context ref="definers" />
<context ref="comment-multiline"/>
</include>
</context>
<!-- [ ... ] is displayed as a preprocessor structure -->
<context id="preproc4" extend-parent="true" style-ref="preprocessor">
<start>(?&lt;![^\s])(\[)(?![^\s])</start>
<end>(?&lt;![^\s])(\])(?![^\s])</end>
<include>
<context ref="keywords"/>
<context ref="number"/>
<context ref="comment"/>
<context ref="comment-multiline"/>
</include>
</context>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,710 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: John Spray <jcspray@icculus.org>
Copyright (C) 2004, 2005, 2006 John Spray <jcs116@york.ac.uk>
Copyright (C) 2005 Jerry DeLisle <jvdelisle@verizon.net>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="fortran" name="Fortran 95" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-fortran</property>
<property name="globs">*.f;*.f90;*.f95;*.for;*.F;*.F90</property>
<property name="line-comment-start">!</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="string" name="String" map-to="def:string"/>
<style id="floating-point" name="Floating Point" map-to="def:floating-point"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="intrinsic" name="Intrinsic function" map-to="def:builtin"/>
<style id="boz-literal" name="BOZ Literal" map-to="def:base-n-integer"/>
<style id="decimal" name="Decimal" map-to="def:decimal"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="openmp-directives" name="OpenMP directives" map-to="def:preprocessor"/>
<style id="included-file" name="Included File" map-to="def:string"/>
<style id="escaped-character" name="Escaped Character" map-to="def:special-char"/>
</styles>
<default-regex-options case-sensitive="false"/>
<definitions>
<!-- regexs -->
<define-regex id="preproc-start">^#</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>
<!-- Preprocessor -->
<context id="if0-comment" style-ref="comment">
<start>\%{preproc-start}if\b\s*0\b</start>
<end>\%{preproc-start}(endif|else|elif)\b</end>
<include>
<context id="if-in-if0">
<start>\%{preproc-start}if(n?def)?\b</start>
<end>\%{preproc-start}endif\b</end>
<include>
<context ref="if-in-if0"/>
<context ref="def:in-comment"/>
</include>
</context>
<context ref="def:in-comment"/>
</include>
</context>
<context id="include" style-ref="preprocessor">
<match extended="true">
\%{preproc-start}
(include|import)\s*
(".*?"|&lt;.*&gt;)
</match>
<include>
<context id="included-file" sub-pattern="2" style-ref="included-file" class="path"/>
</include>
</context>
<context id="preprocessor" style-ref="preprocessor" end-at-line-end="true">
<start extended="true">
\%{preproc-start}
(define|undef|error|pragma|ident|if(n?def)?|else|elif|endif|line|warning)
\b
</start>
</context>
<context id="openmp-directives" style-ref="openmp-directives" end-at-line-end="true">
<start extended="true">
((^[Cc])|^\s*!)\$
</start>
</context>
<!--
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<match>(L?'[^']*')|(L?"[^"]*")</match>
</context>
-->
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>L?"</start>
<end>"</end>
<include>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
<context ref="def:line-continue"/>
</include>
</context>
<!-- Note: contains an hack to avoid considering ^COMMON or ^CHARACTER a comment -->
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>(![^$])|(^[Cc](\s|[^$OoAaYyHh]))|(^[Cc]$)</start>
<include>
<context ref="def:escape"/>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="operators" style-ref="keyword">
<prefix>\.</prefix>
<suffix>\.</suffix>
<keyword>true</keyword>
<keyword>false</keyword>
<keyword>not</keyword>
<keyword>and</keyword>
<keyword>or</keyword>
<keyword>xor</keyword>
<keyword>eqv</keyword>
<keyword>neqv</keyword>
<keyword>eq</keyword>
<keyword>ne</keyword>
<keyword>gt</keyword>
<keyword>ge</keyword>
<keyword>lt</keyword>
<keyword>le</keyword>
</context>
<context id="keywords" style-ref="keyword">
<keyword>abstract</keyword>
<keyword>allocate</keyword>
<keyword>assign</keyword>
<keyword>assignment</keyword>
<keyword>associate</keyword>
<keyword>bind</keyword>
<keyword>block</keyword>
<keyword>call</keyword>
<keyword>case</keyword>
<keyword>class</keyword>
<keyword>common</keyword>
<keyword>contains</keyword>
<keyword>continue</keyword>
<keyword>critical</keyword>
<keyword>cycle</keyword>
<keyword>data</keyword>
<keyword>deallocate</keyword>
<keyword>default</keyword>
<keyword>do concurrent</keyword>
<keyword>do</keyword>
<keyword>elemental</keyword>
<keyword>elseif</keyword>
<keyword>else</keyword>
<keyword>elsewhere</keyword>
<keyword>endassociate</keyword>
<keyword>endblock</keyword>
<keyword>endcritical</keyword>
<keyword>enddo</keyword>
<keyword>endenum</keyword>
<keyword>endfunction</keyword>
<keyword>endif</keyword>
<keyword>endinterface</keyword>
<keyword>endmodule</keyword>
<keyword>endprocedure</keyword>
<keyword>endprogram</keyword>
<keyword>endselect</keyword>
<keyword>endsubmodule</keyword>
<keyword>endsubroutine</keyword>
<keyword>end</keyword>
<keyword>enum</keyword>
<keyword>entry</keyword>
<keyword>equivalence</keyword>
<keyword>error stop</keyword>
<keyword>exit</keyword>
<keyword>extends</keyword>
<keyword>external</keyword>
<keyword>final</keyword>
<keyword>forall</keyword>
<keyword>function</keyword>
<keyword>generic</keyword>
<keyword>go to</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>implicit none</keyword>
<keyword>implicit</keyword>
<keyword>import</keyword>
<keyword>impure</keyword>
<keyword>in</keyword>
<keyword>[^#]include</keyword>
<keyword>inout</keyword>
<keyword>interface</keyword>
<keyword>intrinsic</keyword>
<keyword>kind</keyword>
<keyword>len</keyword>
<keyword>lock</keyword>
<keyword>module</keyword>
<keyword>namelist</keyword>
<keyword>nullify</keyword>
<keyword>only</keyword>
<keyword>operator</keyword>
<keyword>out</keyword>
<keyword>pause</keyword>
<keyword>private</keyword>
<keyword>program</keyword>
<keyword>public</keyword>
<keyword>pure</keyword>
<keyword>recursive</keyword>
<keyword>result</keyword>
<keyword>return</keyword>
<keyword>save</keyword>
<keyword>select</keyword>
<keyword>stop</keyword>
<keyword>submodule</keyword>
<keyword>subroutine</keyword>
<keyword>sync all</keyword>
<keyword>sync images</keyword>
<keyword>sync memory</keyword>
<keyword>then</keyword>
<keyword>type</keyword>
<keyword>unlock</keyword>
<keyword>use</keyword>
<keyword>where</keyword>
<keyword>while</keyword>
</context>
<context id="read-write" style-ref="keyword">
<keyword>backspace</keyword>
<keyword>close</keyword>
<keyword>endfile</keyword>
<keyword>format</keyword>
<keyword>inquire</keyword>
<keyword>open</keyword>
<keyword>print</keyword>
<keyword>read</keyword>
<keyword>rewind</keyword>
<keyword>wait</keyword>
<keyword>write</keyword>
</context>
<context id="input-output" style-ref="keyword">
<keyword>access</keyword>
<keyword>action</keyword>
<keyword>advance</keyword>
<keyword>blank</keyword>
<keyword>delim</keyword>
<keyword>direct</keyword>
<keyword>end</keyword>
<keyword>eor</keyword>
<keyword>err</keyword>
<keyword>exist</keyword>
<keyword>file</keyword>
<keyword>fmt</keyword>
<keyword>form</keyword>
<keyword>formatted</keyword>
<keyword>iolength</keyword>
<keyword>iostat</keyword>
<keyword>name</keyword>
<keyword>named</keyword>
<keyword>newunit</keyword>
<keyword>nextrec</keyword>
<keyword>nml</keyword>
<keyword>number</keyword>
<keyword>opened</keyword>
<keyword>pad</keyword>
<keyword>position</keyword>
<keyword>readwrite</keyword>
<keyword>rec</keyword>
<keyword>recl</keyword>
<keyword>sequential</keyword>
<keyword>status</keyword>
<keyword>unformatted</keyword>
<keyword>unit</keyword>
<keyword>write</keyword>
</context>
<context id="intrinsics" style-ref="intrinsic">
<keyword>abs</keyword>
<keyword>achar</keyword>
<keyword>acosh</keyword>
<keyword>acos</keyword>
<keyword>adjustl</keyword>
<keyword>adjustr</keyword>
<keyword>aimag</keyword>
<keyword>aint</keyword>
<keyword>algama</keyword>
<keyword>allocated</keyword>
<keyword>all</keyword>
<keyword>alog10</keyword>
<keyword>alog</keyword>
<keyword>amax0</keyword>
<keyword>amax1</keyword>
<keyword>amin0</keyword>
<keyword>amin1</keyword>
<keyword>amod</keyword>
<keyword>anint</keyword>
<keyword>any</keyword>
<keyword>asinh</keyword>
<keyword>asin</keyword>
<keyword>associated</keyword>
<keyword>atan2</keyword>
<keyword>atanh</keyword>
<keyword>atan</keyword>
<keyword>atomic_define</keyword>
<keyword>atomic_ref</keyword>
<keyword>bessel_j0</keyword>
<keyword>bessel_j1</keyword>
<keyword>bessel_jn</keyword>
<keyword>bessel_y0</keyword>
<keyword>bessel_y1</keyword>
<keyword>bessel_yn</keyword>
<keyword>bge</keyword>
<keyword>bgt</keyword>
<keyword>ble</keyword>
<keyword>blt</keyword>
<keyword>bit_size</keyword>
<keyword>btest</keyword>
<keyword>c_associated</keyword>
<keyword>c_loc</keyword>
<keyword>c_funloc</keyword>
<keyword>c_f_pointer</keyword>
<keyword>c_f_procpointer</keyword>
<keyword>cabs</keyword>
<keyword>ccos</keyword>
<keyword>cdabs</keyword>
<keyword>cdcos</keyword>
<keyword>cdexp</keyword>
<keyword>cdlog</keyword>
<keyword>cdsin</keyword>
<keyword>cdsqrt</keyword>
<keyword>ceiling</keyword>
<keyword>cexp</keyword>
<keyword>char</keyword>
<keyword>clog</keyword>
<keyword>cmplx</keyword>
<keyword>command_argument_count</keyword>
<keyword>compiler_options</keyword>
<keyword>compiler_version</keyword>
<keyword>conjg</keyword>
<keyword>cosh</keyword>
<keyword>cos</keyword>
<keyword>count</keyword>
<keyword>cpu_time</keyword>
<keyword>cqabs</keyword>
<keyword>cqcos</keyword>
<keyword>cqexp</keyword>
<keyword>cqlog</keyword>
<keyword>cqsin</keyword>
<keyword>cqsqrt</keyword>
<keyword>cshift</keyword>
<keyword>csin</keyword>
<keyword>csqrt</keyword>
<keyword>dabs</keyword>
<keyword>dacos</keyword>
<keyword>dasin</keyword>
<keyword>datan2</keyword>
<keyword>datan</keyword>
<keyword>date_and_time</keyword>
<keyword>dble</keyword>
<keyword>dcmplx</keyword>
<keyword>dconjg</keyword>
<keyword>dcosh</keyword>
<keyword>dcos</keyword>
<keyword>ddim</keyword>
<keyword>derf</keyword>
<keyword>derfc</keyword>
<keyword>dexp</keyword>
<keyword>dfloat</keyword>
<keyword>dgamma</keyword>
<keyword>digits</keyword>
<keyword>dim</keyword>
<keyword>dimag</keyword>
<keyword>dint</keyword>
<keyword>dlgama</keyword>
<keyword>dlog10</keyword>
<keyword>dlog</keyword>
<keyword>dmax1</keyword>
<keyword>dmin1</keyword>
<keyword>dmod</keyword>
<keyword>dnint</keyword>
<keyword>dot_product</keyword>
<keyword>dprod</keyword>
<keyword>dshiftl</keyword>
<keyword>dshiftr</keyword>
<keyword>dsign</keyword>
<keyword>dsinh</keyword>
<keyword>dsin</keyword>
<keyword>dsqrt</keyword>
<keyword>dtanh</keyword>
<keyword>dtan</keyword>
<keyword>eoshift</keyword>
<keyword>epsilon</keyword>
<keyword>erfc_scaled</keyword>
<keyword>erfc</keyword>
<keyword>erf</keyword>
<keyword>execute_command_line</keyword>
<keyword>exp</keyword>
<keyword>exponent</keyword>
<keyword>findloc</keyword>
<keyword>float</keyword>
<keyword>floor</keyword>
<keyword>flush</keyword>
<keyword>fraction</keyword>
<keyword>gamma</keyword>
<keyword>getarg</keyword>
<keyword>get_command</keyword>
<keyword>get_command_argument</keyword>
<keyword>get_environment_variable</keyword>
<keyword>huge</keyword>
<keyword>hypot</keyword>
<keyword>iabs</keyword>
<keyword>iachar</keyword>
<keyword>iall</keyword>
<keyword>iand</keyword>
<keyword>iany</keyword>
<keyword>iargc</keyword>
<keyword>ibclr</keyword>
<keyword>ibits</keyword>
<keyword>ibset</keyword>
<keyword>ichar</keyword>
<keyword>idim</keyword>
<keyword>idint</keyword>
<keyword>idnint</keyword>
<keyword>ieee_class</keyword>
<keyword>ieee_copy_sign</keyword>
<keyword>ieee_get_flag</keyword>
<keyword>ieee_get_halting_mode</keyword>
<keyword>ieee_get_rounding_mode</keyword>
<keyword>ieee_get_status</keyword>
<keyword>ieee_is_finite</keyword>
<keyword>ieee_is_nan</keyword>
<keyword>ieee_is_negative</keyword>
<keyword>ieee_is_normal</keyword>
<keyword>ieee_logb</keyword>
<keyword>ieee_next_after</keyword>
<keyword>ieee_rem</keyword>
<keyword>ieee_rint</keyword>
<keyword>ieee_scalb</keyword>
<keyword>ieee_selected_real_kind</keyword>
<keyword>ieee_set_flag</keyword>
<keyword>ieee_set_halting_mode</keyword>
<keyword>ieee_set_rounding_mode</keyword>
<keyword>ieee_set_status</keyword>
<keyword>ieee_support_datatype</keyword>
<keyword>ieee_support_denormal</keyword>
<keyword>ieee_support_divide</keyword>
<keyword>ieee_support_flag</keyword>
<keyword>ieee_support_halting</keyword>
<keyword>ieee_support_inf</keyword>
<keyword>ieee_support_nan</keyword>
<keyword>ieee_support_rounding</keyword>
<keyword>ieee_support_sqrt</keyword>
<keyword>ieee_support_standard</keyword>
<keyword>ieee_unordered</keyword>
<keyword>ieee_value</keyword>
<keyword>ieor</keyword>
<keyword>ifix</keyword>
<keyword>image_index</keyword>
<keyword>index</keyword>
<keyword>int</keyword>
<keyword>ior</keyword>
<keyword>iparity</keyword>
<keyword>iqint</keyword>
<keyword>is_contiguous</keyword>
<keyword>is_iostat_end</keyword>
<keyword>is_iostat_eor</keyword>
<keyword>ishftc</keyword>
<keyword>ishft</keyword>
<keyword>isign</keyword>
<keyword>kind</keyword>
<keyword>lbound</keyword>
<keyword>lcobound</keyword>
<keyword>leadz</keyword>
<keyword>len_trim</keyword>
<keyword>len</keyword>
<keyword>lge</keyword>
<keyword>lgt</keyword>
<keyword>lle</keyword>
<keyword>llt</keyword>
<keyword>loc</keyword>
<keyword>log_gamma</keyword>
<keyword>log10</keyword>
<keyword>log</keyword>
<keyword>logical</keyword>
<keyword>maskl</keyword>
<keyword>maskr</keyword>
<keyword>matmul</keyword>
<keyword>max0</keyword>
<keyword>max1</keyword>
<keyword>maxexponent</keyword>
<keyword>maxloc</keyword>
<keyword>maxval</keyword>
<keyword>max</keyword>
<keyword>merge_bits</keyword>
<keyword>merge</keyword>
<keyword>min0</keyword>
<keyword>min1</keyword>
<keyword>minexponent</keyword>
<keyword>minloc</keyword>
<keyword>minval</keyword>
<keyword>min</keyword>
<keyword>mod</keyword>
<keyword>modulo</keyword>
<keyword>move_alloc</keyword>
<keyword>mvbits</keyword>
<keyword>nearest</keyword>
<keyword>new_line</keyword>
<keyword>nint</keyword>
<keyword>norm2</keyword>
<keyword>not</keyword>
<keyword>null</keyword>
<keyword>num_images</keyword>
<keyword>or</keyword>
<keyword>pack</keyword>
<keyword>parity</keyword>
<keyword>popcnt</keyword>
<keyword>poppar</keyword>
<keyword>precision</keyword>
<keyword>present</keyword>
<keyword>product</keyword>
<keyword>qabs</keyword>
<keyword>qacos</keyword>
<keyword>qasin</keyword>
<keyword>qatan2</keyword>
<keyword>qatan</keyword>
<keyword>qcmplx</keyword>
<keyword>qconjg</keyword>
<keyword>qcosh</keyword>
<keyword>qcos</keyword>
<keyword>qdim</keyword>
<keyword>qerf</keyword>
<keyword>qerfc</keyword>
<keyword>qexp</keyword>
<keyword>qgamma</keyword>
<keyword>qimag</keyword>
<keyword>qlgama</keyword>
<keyword>qlog10</keyword>
<keyword>qlog</keyword>
<keyword>qmax1</keyword>
<keyword>qmin1</keyword>
<keyword>qmod</keyword>
<keyword>qnint</keyword>
<keyword>qsign</keyword>
<keyword>qsinh</keyword>
<keyword>qsin</keyword>
<keyword>qsqrt</keyword>
<keyword>qtanh</keyword>
<keyword>qtan</keyword>
<keyword>radix</keyword>
<keyword>random_number</keyword>
<keyword>random_seed</keyword>
<keyword>range</keyword>
<keyword>real</keyword>
<keyword>repeat</keyword>
<keyword>reshape</keyword>
<keyword>rrspacing</keyword>
<keyword>scale</keyword>
<keyword>scan</keyword>
<keyword>selected_char_kind</keyword>
<keyword>selected_int_kind</keyword>
<keyword>selected_real_kind</keyword>
<keyword>set_exponent</keyword>
<keyword>shape</keyword>
<keyword>shifta</keyword>
<keyword>shiftl</keyword>
<keyword>shiftr</keyword>
<keyword>sign</keyword>
<keyword>sinh</keyword>
<keyword>sin</keyword>
<keyword>size</keyword>
<keyword>sngl</keyword>
<keyword>spacing</keyword>
<keyword>spread</keyword>
<keyword>sqrt</keyword>
<keyword>storage_size</keyword>
<keyword>sum</keyword>
<keyword>system_clock</keyword>
<keyword>tanh</keyword>
<keyword>tan</keyword>
<keyword>this_image</keyword>
<keyword>tiny</keyword>
<keyword>trailz</keyword>
<keyword>transfer</keyword>
<keyword>transpose</keyword>
<keyword>trim</keyword>
<keyword>ubound</keyword>
<keyword>ucobound</keyword>
<keyword>unpack</keyword>
<keyword>verify</keyword>
<keyword>zabs</keyword>
<keyword>zcos</keyword>
<keyword>zexp</keyword>
<keyword>zlog</keyword>
<keyword>zsin</keyword>
<keyword>zsqrt</keyword>
</context>
<context id="types" style-ref="type">
<keyword>byte</keyword>
<keyword>character</keyword>
<keyword>complex</keyword>
<keyword>double complex</keyword>
<keyword>double precision</keyword>
<keyword>enumerator</keyword>
<keyword>integer</keyword>
<keyword>logical</keyword>
<keyword>procedure</keyword>
<keyword>real</keyword>
</context>
<context id="type-attributes" style-ref="type">
<keyword>allocatable</keyword>
<keyword>asynchronous</keyword>
<keyword>codimension</keyword>
<keyword>contiguous</keyword>
<keyword>deferred</keyword>
<keyword>dimension</keyword>
<keyword>external</keyword>
<keyword>intent</keyword>
<keyword>intrinsic</keyword>
<keyword>non_overridable</keyword>
<keyword>nopass</keyword>
<keyword>optional</keyword>
<keyword>parameter</keyword>
<keyword>pass</keyword>
<keyword>pointer</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>save</keyword>
<keyword>synchronous</keyword>
<keyword>target</keyword>
<keyword>value</keyword>
<keyword>volatile</keyword>
</context>
<context id="attributes">
<start>,\s*\%[</start>
<end>\%[</end>
<include>
<context ref="type-attributes"/>
</include>
</context>
<context id="floating-point-number" style-ref="floating-point">
<match extended="true">
(?&lt;![\w\.])
[+-]?
((\.[0-9]+ | [0-9]+\.[0-9]*) ([ed][+-]?[0-9]*)? |
([0-9]+[ed][+-]?[0-9]*))
([_]([0-9]+|[a-z][\w_]*))?
(?![\w\.])
</match>
</context>
<context id="decimal" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
[+-]? ([1-9][0-9]*|0)
([_]([0-9]+|[a-z][\w_]*))?
(?![\w\.])
</match>
</context>
<context id="boz-literal" style-ref="boz-literal">
<match extended="true">
\bb'[01]+'|\bb"[01]+"|
\bo'[0-7]+'|\bo"[0-7]+"|
\bz'[0-9a-f]+'|\bz"[0-9a-f]+"
</match>
</context>
<context id="fortran" class="no-spell-check">
<include>
<context ref="floating-point-number"/>
<context ref="decimal"/>
<context ref="boz-literal"/>
<context ref="def:string"/>
<context ref="def:single-quoted-string"/>
<context ref="line-comment"/>
<context ref="types"/>
<context ref="attributes"/>
<context ref="operators"/>
<context ref="keywords"/>
<context ref="read-write"/>
<context ref="input-output"/>
<context ref="intrinsics"/>
<context ref="if0-comment"/>
<context ref="include"/>
<context ref="preprocessor"/>
<context ref="openmp-directives"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,324 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is part of GtkSourceView
Author: Alexander Kuleshov <kuleshovmail@gmail.com>
Copyright (C) 2009-2010 Alexander Kuleshov <kuleshovmail@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="fsharp" name="F#" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-fsharp</property>
<property name="globs">*.fs;</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="base-n-integer" name="Base-N Integer" map-to="def:base-n-integer"/>
<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="string" name="String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="meta-keyword" name="Type, module or object 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="poly-variant" name="Polymorphic Variant" map-to="def:type"/>
<style id="variant" name="Variant Constructor" 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="escape" name="Escaped Character" map-to="def:special-char"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="null-value" name="Null Value" map-to="def:special-constant"/>
</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="symbolchar">[!#$%&amp;*+./&gt;=&lt;?@:\\^|~-]</define-regex>
<context id="escape-seq" style-ref="escape">
<match>\%{char-esc}</match>
</context>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>//</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="multiline-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>\(\*</start>
<end>\*\)</end>
<include>
<context ref="string"/>
<context ref="def:in-comment:*"/>
</include>
</context>
<context id="if0-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>\%{preproc-start}if\b\s*0\b</start>
<end>\%{preproc-start}(endif|else|elif)\b</end>
<include>
<context id="if-in-if0">
<start>\%{preproc-start}if(n?def)?\b</start>
<end>\%{preproc-start}endif\b</end>
<include>
<context ref="if-in-if0"/>
<context ref="def:in-comment"/>
</include>
</context>
<context ref="def:in-comment"/>
</include>
</context>
<context id="preprocessor" style-ref="preprocessor" end-at-line-end="true">
<start extended="true">
\%{preproc-start}
(if(n?def)?|else|endif|light|region|endregion)\b
</start>
<include>
<context ref="def:line-continue" ignore-style="true"/>
<context ref="string" ignore-style="true"/>
<context ref="line-comment"/>
<context ref="multiline-comment"/>
</include>
</context>
<context id="hex-number" style-ref="base-n-integer">
<match>[-]?0[xX][0-9A-Fa-f][0-9A-Fa-f_]*[lL]?</match>
</context>
<context id="octal-number" style-ref="base-n-integer">
<match>[-]?0[oO][0-7][0-7_]*[lL]?</match>
</context>
<context id="binary-number" style-ref="base-n-integer">
<match>[-]?0[bB][01][01_]*[lL]?</match>
</context>
<context id="label" style-ref="label">
<match>[~?]\%{low-ident}</match>
</context>
<context id="if-false-comment" style-ref="comment">
<start>\%{preproc-start}if\s*false\b</start>
<end>\%{preproc-start}(endif|else|elif)\b</end>
<include>
<context id="if-in-if-false">
<start>\%{preproc-start}if(n?def)?\b</start>
<end>\%{preproc-start}endif\b</end>
<include>
<context ref="if-in-if-false"/>
<context ref="def:in-comment"/>
</include>
</context>
<context ref="def:in-comment"/>
</include>
</context>
<context id="poly-variant" style-ref="poly-variant">
<match>`\%{cap-ident}</match>
</context>
<context id="modpath" style-ref="module">
<match>\%{cap-ident}(\.\%{cap-ident})*(?=\.)</match>
</context>
<context id="variant" style-ref="variant">
<match>\%{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="arraylit">
<start>\[\|</start>
<end>\|\]</end>
</context>
<context id="decimal" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
[0-9]+[uUlL]*
(?![\w\.])
</match>
</context>
<context id="boolean-constant" style-ref="boolean">
<keyword>true</keyword>
<keyword>false</keyword>
</context>
<context id="keysymbol" style-ref="keyword">
<prefix>(?&lt;!\%{symbolchar})</prefix>
<suffix>(?!\%{symbolchar})</suffix>
<keyword>\.\.</keyword>
<keyword>::</keyword>
<keyword>=</keyword>
<keyword>@</keyword>
<keyword>~</keyword>
<keyword>-></keyword>
<keyword>|</keyword>
<keyword>:?</keyword>
<keyword>:?></keyword>
<keyword>^</keyword>
<keyword>&lt;-</keyword>
<keyword>&amp;&amp;</keyword>
<keyword>&amp;</keyword>
</context>
<context id="keywords" style-ref="keyword">
<keyword>abstract</keyword>
<keyword>and</keyword>
<keyword>as</keyword>
<keyword>assert</keyword>
<keyword>asr</keyword>
<keyword>begin</keyword>
<keyword>class</keyword>
<keyword>default</keyword>
<keyword>delegate</keyword>
<keyword>do</keyword>
<keyword>done</keyword>
<keyword>downcast</keyword>
<keyword>downto</keyword>
<keyword>else</keyword>
<keyword>end</keyword>
<keyword>enum</keyword>
<keyword>exception</keyword>
<keyword>false</keyword>
<keyword>finaly</keyword>
<keyword>for</keyword>
<keyword>fun</keyword>
<keyword>function</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>iherit</keyword>
<keyword>interface</keyword>
<keyword>land</keyword>
<keyword>lazy</keyword>
<keyword>let</keyword>
<keyword>lor</keyword>
<keyword>lsl</keyword>
<keyword>lsr</keyword>
<keyword>lxor</keyword>
<keyword>match</keyword>
<keyword>member</keyword>
<keyword>mod</keyword>
<keyword>module</keyword>
<keyword>mutable</keyword>
<keyword>namespace</keyword>
<keyword>new</keyword>
<keyword>null</keyword>
<keyword>of</keyword>
<keyword>open</keyword>
<keyword>or</keyword>
<keyword>override</keyword>
<keyword>sig</keyword>
<keyword>static</keyword>
<keyword>struct</keyword>
<keyword>then</keyword>
<keyword>to</keyword>
<keyword>true</keyword>
<keyword>try</keyword>
<keyword>type</keyword>
<keyword>val</keyword>
<keyword>when</keyword>
<keyword>inline</keyword>
<keyword>upcast</keyword>
<keyword>while</keyword>
<keyword>with</keyword>
<keyword>async</keyword>
<keyword>atomic</keyword>
<keyword>break</keyword>
<keyword>checked</keyword>
<keyword>component</keyword>
<keyword>const</keyword>
<keyword>constructor</keyword>
<keyword>continue</keyword>
<keyword>eager</keyword>
<keyword>event</keyword>
<keyword>external</keyword>
<keyword>fixed</keyword>
<keyword>functor</keyword>
<keyword>include</keyword>
<keyword>method</keyword>
<keyword>mixin</keyword>
<keyword>process</keyword>
<keyword>property</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>pure</keyword>
<keyword>readonly</keyword>
<keyword>return</keyword>
<keyword>sealed</keyword>
<keyword>switch</keyword>
<keyword>virtual</keyword>
<keyword>void</keyword>
<keyword>volatile</keyword>
<keyword>yield</keyword>
<keyword>where</keyword>
</context>
<!-- main context -->
<context id="fsharp" class="no-spell-check">
<include>
<context ref="keywords"/>
<context ref="keysymbol"/>
<context ref="boolean-constant"/>
<context ref="arraylit"/>
<context ref="character-constant"/>
<context ref="string"/>
<context ref="variant"/>
<context ref="modpath"/>
<context ref="poly-variant"/>
<context ref="label"/>
<context ref="binary-number"/>
<context ref="octal-number"/>
<context ref="hex-number"/>
<context ref="line-comment"/>
<context ref="multiline-comment"/>
<context ref="type-var"/>
<context ref="if-false-comment"/>
<context ref="preprocessor"/>
<context ref="if0-comment"/>
<context ref="decimal"/>
</include>
</context>
<!-- main context -->
</definitions>
</language>

View File

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Tobias Schönberg <tobias47n9e@gmail.com>
Copyright (C) 2019 Tobias Schönberg <tobias47n9e@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="ftl" name="Fluent" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">text/x-fluent</property>
<property name="globs">*.ftl</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="quoted-text" name="Text in quotes" map-to="def:string"/>
<style id="term" name="Term" map-to="def:keyword"/>
<style id="variable" name="Variable" map-to="def:identifier"/>
<style id="attribute" name="Attribute" map-to="def:operator"/>
<style id="variant-key" name="Variant key" map-to="def:identifier"/>
<style id="function" name="Function" map-to="def:function"/>
</styles>
<definitions>
<context id="quoted-text" style-ref="quoted-text" class="string">
<start>"</start>
<end>"</end>
</context>
<context id="term" style-ref="term" extend-parent="false">
<match>(?&lt;!\w)-[\w-]*\b</match>
</context>
<context id="variable" style-ref="variable" extend-parent="false">
<match>\$[a-zA-Z][a-zA-Z0-9_-]*\b</match>
</context>
<context id="attribute" style-ref="attribute" extend-parent="false">
<match>(?&lt;= )\.[a-zA-Z-]*\b</match>
</context>
<context id="variant-key" style-ref="variant-key" class="string">
<start>\*?\[</start>
<end>\]</end>
</context>
<context id="function" style-ref="function">
<keyword>DATETIME</keyword>
<keyword>NUMBER</keyword>
</context>
<context id="placeable" class="string">
<start>\{</start>
<end>\}</end>
<include>
<context ref="variant-key"/>
<context ref="variable"/>
<context ref="term"/>
<context ref="function"/>
<context ref="quoted-text"/>
<context ref="placeable"/>
</include>
</context>
<context id="value" class="string" class-disabled="no-spell-check">
<start>(?&lt;==)</start>
<end>^(?! )</end>
<include>
<context ref="placeable"/>
<context ref="attribute"/>
</include>
</context>
<context id="ftl" class="no-spell-check">
<include>
<context ref="value"/>
<context ref="term"/>
<context ref="def:shell-like-comment"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Yevgen Muntyan <muntyan@tamu.edu>
Copyright (C) 2006-2007 Yevgen Muntyan <muntyan@tamu.edu>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="gap" name="GAP" version="2.0" _section="Scientific">
<metadata>
<property name="mimetypes">text/x-gap</property>
<property name="globs">*.g;*.gi;*.gap</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="character" name="Character" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="function" name="Function" map-to="def:function"/>
<style id="decimal" name="Decimal" map-to="def:decimal"/>
</styles>
<definitions>
<context id="character" style-ref="character">
<match>\'(\\[trnb\\\'\"]|[^\\])\'</match>
</context>
<context id="keyword" style-ref="keyword">
<keyword>and</keyword>
<keyword>break</keyword>
<keyword>continue</keyword>
<keyword>do</keyword>
<keyword>elif</keyword>
<keyword>else</keyword>
<keyword>end</keyword>
<keyword>fail</keyword>
<keyword>false</keyword>
<keyword>fi</keyword>
<keyword>for</keyword>
<keyword>function</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>infinity</keyword>
<keyword>local</keyword>
<keyword>not</keyword>
<keyword>od</keyword>
<keyword>or</keyword>
<keyword>rec</keyword>
<keyword>repeat</keyword>
<keyword>return</keyword>
<keyword>then</keyword>
<keyword>true</keyword>
<keyword>until</keyword>
<keyword>while</keyword>
</context>
<context id="decimal" style-ref="decimal">
<match>\b[0-9]+\b</match>
</context>
<context id="gap">
<include>
<context ref="def:shell-like-comment"/>
<context ref="def:string"/>
<context ref="character"/>
<context ref="keyword"/>
<context ref="decimal"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2010 Philip Withnall <philip@tecnocode.co.uk>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="gdb-log" _name="GDB Log" version="2.0" _section="Other">
<metadata>
<property name="globs">*.gdb</property>
</metadata>
<styles>
<style id="thread-action" name="Thread Action" map-to="def:comment"/>
<style id="thread-header" name="Thread Header" map-to="def:statement"/>
<style id="frame-number" name="Frame Number" map-to="def:keyword"/>
<style id="address" name="Address" map-to="def:number"/>
<style id="function" name="Function" map-to="def:function"/>
<style id="string" name="String" map-to="def:string"/>
<style id="filename" name="Filename" map-to="def:statement"/>
<style id="optimized-out" name="Optimized Out" map-to="def:special-constant"/>
<style id="incomplete-sequence" name="Incomplete Sequence" map-to="def:special-constant"/>
<style id="prompt" name="Prompt" map-to="def:comment"/>
</styles>
<definitions>
<define-regex id="identifier">[A-Za-z_][A-Za-z0-9_]*(?:@@[A-Za-z0-9_\.]+)?</define-regex>
<define-regex id="filename">.+?</define-regex>
<!-- Either a decimal number (single to multi-digit, signed or unsigned) or a standard hexadecimal number -->
<define-regex id="thread-number">(?:-?[1-9][0-9]*|\%{def:hexadecimal})</define-regex>
<!-- Allow reuse of the frame regexes so we can use them in frame and crash-frame -->
<define-regex id="frame-start">((?P&lt;address&gt;\%{def:hexadecimal})\s+in\s+)?(?:(?P&lt;function&gt;\*?\%{identifier})|(?P&lt;badfunction&gt;\?\?))\s+\(</define-regex>
<define-regex id="frame-end">(?:(?:at|from)\s+(?P&lt;filename&gt;\%{filename})(?P&lt;linenumber&gt;\:[0-9]+)?|\))$</define-regex>
<context id="optimized-out" style-ref="optimized-out">
<keyword>value optimized out</keyword>
</context>
<context id="incomplete-sequence" style-ref="incomplete-sequence">
<keyword>incomplete sequence</keyword>
</context>
<context id="prompt" style-ref="prompt" end-at-line-end="true">
<start>\(gdb\)|---|Kill|Using|Program|Starting|No symbol</start>
<end>---$</end>
</context>
<context id="thread-action" style-ref="thread-action">
<!--[New Thread 0xb73ffb70 (LWP 26323)]
[Thread 0xb73ffb70 (LWP 26323) exited]
[Switching to Thread 0xb7fe6b70 (LWP 26322)]
[New LWP 1 ]-->
<match>^\[(?:New |Switching to )?(?:Thread|LWP)\s+(\%{thread-number})?.*\]$</match>
<include>
<context sub-pattern="1" style-ref="address"/>
</include>
</context>
<context id="thread-header" style-ref="thread-header">
<!--Thread 4 (Thread 0xb7fe6b70 (LWP 26322)):
Thread 10 (LWP 40 ):-->
<match>^Thread \d+ \((?:Thread|LWP)\s+(\%{thread-number}).*\):$</match>
<include>
<context sub-pattern="1" style-ref="address"/>
</include>
</context>
<context id="signal-handler-frame">
<!--#3 <signal handler called>-->
<match>^#(\d+)\s+&lt;(signal handler called)&gt;$</match>
<include>
<context sub-pattern="1" style-ref="frame-number"/>
<context sub-pattern="2" style-ref="def:special-constant"/>
</include>
</context>
<context id="crash-frame" end-at-line-end="false" once-only="true">
<!--This occurs once only, at the top of the file:
0x00110402 in __kernel_vsyscall ()-->
<start>^\%{frame-start}</start>
<end>\%{frame-end}</end>
<include>
<context where="start" sub-pattern="address" style-ref="address"/>
<context where="start" sub-pattern="function" style-ref="function"/>
<context where="start" sub-pattern="badfunction" style-ref="def:error"/>
<context where="end" sub-pattern="filename" style-ref="filename"/>
<context where="end" sub-pattern="linenumber" style-ref="def:number"/>
<context ref="optimized-out"/>
<context ref="incomplete-sequence"/>
<context ref="prompt"/>
</include>
</context>
<context id="frame" end-at-line-end="false">
<!--#0 0x0054d422 in __kernel_vsyscall ()
#1 0x005002d2 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:179
#2 0x0043e9f4 in __pthread_cond_timedwait (cond=0xb6401678, mutex=0x88e5e58,
abstime=0xb63ff1e8) at forward.c:152
#-1 0xfc59f649 in __lwp_park () from /lib/libc.so.1-->
<start>^#(?P&lt;framenumber&gt;-?\d+)\s+\%{frame-start}</start>
<end>\%{frame-end}</end>
<include>
<context where="start" sub-pattern="framenumber" style-ref="frame-number"/>
<context where="start" sub-pattern="address" style-ref="address"/>
<context where="start" sub-pattern="function" style-ref="function"/>
<context where="start" sub-pattern="badfunction" style-ref="def:error"/>
<context where="end" sub-pattern="filename" style-ref="filename"/>
<context where="end" sub-pattern="linenumber" style-ref="def:number"/>
<context ref="optimized-out"/>
<context ref="incomplete-sequence"/>
<context ref="prompt"/>
</include>
</context>
<!-- Necessary because some frames put their filename on the next line, after their closing bracket, and since we want to match
frames which have no filename (i.e. just a closing bracket) as well as normal frames, we have to deal with this odd case. -->
<context id="frame-ending">
<!-- at ../nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:179-->
<match>^\s+(?:at|from)\s+(?P&lt;filename&gt;\%{filename})(?P&lt;linenumber&gt;\:[0-9]+)?$</match>
<include>
<context sub-pattern="filename" style-ref="filename"/>
<context sub-pattern="linenumber" style-ref="def:number"/>
</include>
</context>
<context id="gdb-log">
<include>
<context ref="prompt"/>
<context ref="thread-action"/>
<context ref="thread-header"/>
<context ref="signal-handler-frame"/>
<context ref="crash-frame"/>
<context ref="frame"/>
<context ref="frame-ending"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,268 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2018 Jack R Linhart <iatenine@gmail.com>
Copyright (C) 2014 Matthias F. Brandstetter <pub@mabra.me>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-->
<language id="gdscript" name="GDScript" version="2.0" _section="Script">
<metadata>
<property name="mimetypes">text/x-gdscript</property>
<property name="globs">*.gd</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="module-handler" name="Module Handler" map-to="def:preprocessor"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="multiline-string" name="Multiline string" map-to="def:string"/>
<style id="string" name="String" map-to="def:string"/>
<style id="escaped-char" name="Escaped Character" map-to="def:special-char"/>
<style id="format" name="Format" map-to="def:character"/>
<style id="string-conversion" name="string-conversion"/>
<style id="special-variable" name="Special Variable" map-to="def:identifier"/>
<style id="boolean" name="Boolean" map-to="def:boolean"/>
<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="base-n-integer" name="Base-N number" map-to="def:base-n-integer"/>
<style id="complex" name="Complex number" map-to="def:complex"/>
<style id="builtin-constant" name="Builtin Constant" map-to="def:special-constant"/>
<style id="builtin-object" name="Builtin Object" map-to="def:type"/>
<style id="builtin-function" name="Builtin Function" map-to="def:builtin"/>
</styles>
<definitions>
<define-regex id="identifier">[_a-zA-Z][_a-zA-Z0-9]*</define-regex>
<define-regex id="number">[1-9][0-9]*</define-regex>
<context id="format" style-ref="format" extend-parent="false">
<match extended="true">
% # leading % sign
\(\%{identifier}\)? # mapping key
[#0\-\ \+]* # conversion flags
(\-?\%{number}|\*)? # minimum field width
(\.(\-?\%{number}|\*))? # precision
(hlL)? # lentgh modifier
[diouxXeEfFgGcrs%] # conversion type
</match>
</context>
<!-- http://docs.python.org/ref/strings.html -->
<context id="escaped-char" style-ref="escaped-char" extend-parent="true">
<match 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
)
</match>
</context>
<context id="double-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="format"/>
<context ref="escaped-char"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="single-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
<include>
<context ref="format"/>
<context ref="escaped-char"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="gdscript" class="no-spell-check">
<include>
<context ref="def:shebang"/>
<context ref="def:shell-like-comment"/>
<context ref="double-quoted-string"/>
<context ref="single-quoted-string"/>
<context id="special-variables" style-ref="special-variable">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>_init</keyword>
<keyword>_ready</keyword>
</context>
<context id="boolean" style-ref="boolean">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>false</keyword>
<keyword>true</keyword>
</context>
<define-regex id="float" extended="true">
( (\d+)?\.\d+ | \d+\. ) |
( (\d+|(\d+)?\.\d+|\d+\.)[eE][+-]?\d+ )
</define-regex>
<context id="complex" style-ref="complex">
<match>(?&lt;![\w\.])(\%{float}|\d+)[jJ]\b</match>
</context>
<context id="float" style-ref="floating-point">
<match>(?&lt;![\w\.])\%{float}(?![\w\.])</match>
</context>
<context id="decimal" style-ref="decimal">
<match>(?&lt;![\w\.])([1-9][0-9]*|0)[lL]?(?![\w\.])</match>
</context>
<context id="octal" style-ref="base-n-integer">
<match>(?&lt;![\w\.])0[0-7]+[lL]?(?![\w\.])</match>
</context>
<context id="hex" style-ref="base-n-integer">
<match>(?&lt;![\w\.])0[xX][0-9A-Fa-f]+[lL]?(?![\w\.])</match>
</context>
<context id="module-handler" style-ref="module-handler">
<keyword>extends</keyword>
<keyword>preload</keyword>
</context>
<context id="builtin-constants" style-ref="builtin-constant">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>null</keyword>
</context>
<context id="keyword" style-ref="keyword">
<keyword>and</keyword>
<keyword>assert</keyword>
<keyword>break</keyword>
<keyword>breakpoint</keyword>
<keyword>class</keyword>
<keyword>const</keyword>
<keyword>continue</keyword>
<keyword>elif</keyword>
<keyword>else</keyword>
<keyword>enum</keyword>
<keyword>export</keyword>
<keyword>extends</keyword>
<keyword>false</keyword>
<keyword>float</keyword>
<keyword>for</keyword>
<keyword>func</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>int</keyword>
<keyword>not</keyword>
<keyword>null</keyword>
<keyword>onready</keyword>
<keyword>or</keyword>
<keyword>pass</keyword>
<keyword>return</keyword>
<keyword>self</keyword>
<keyword>setget</keyword>
<keyword>signal</keyword>
<keyword>static</keyword>
<keyword>tool</keyword>
<keyword>true</keyword>
<keyword>var</keyword>
<keyword>while</keyword>
<keyword>yield</keyword>
</context>
<context id="builtin-objects" style-ref="builtin-object">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>Vector2</keyword>
<keyword>Size2</keyword>
<keyword>Rect2</keyword>
<keyword>Vector3</keyword>
<keyword>Matrix32</keyword>
<keyword>Plane</keyword>
<keyword>Quat</keyword>
<keyword>AABB</keyword>
<keyword>Box3</keyword>
<keyword>Matrix3</keyword>
<keyword>Transform</keyword>
<keyword>Color</keyword>
<keyword>Image</keyword>
<keyword>NodePath</keyword>
<keyword>RID</keyword>
<keyword>Object</keyword>
<keyword>InputEvent</keyword>
</context>
<context id="builtin-function" style-ref="builtin-function">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>print</keyword>
<keyword>sin</keyword>
<keyword>cos</keyword>
<keyword>tan</keyword>
<keyword>sinh</keyword>
<keyword>cosh</keyword>
<keyword>tanh</keyword>
<keyword>asin</keyword>
<keyword>acos</keyword>
<keyword>atan</keyword>
<keyword>atan2</keyword>
<keyword>sqrt</keyword>
<keyword>fmod</keyword>
<keyword>fposmod</keyword>
<keyword>floor</keyword>
<keyword>ceil</keyword>
<keyword>round</keyword>
<keyword>abs</keyword>
<keyword>sign</keyword>
<keyword>pow</keyword>
<keyword>log</keyword>
<keyword>exp</keyword>
<keyword>isnan</keyword>
<keyword>isinf</keyword>
<keyword>ease</keyword>
<keyword>decimals</keyword>
<keyword>stepify</keyword>
<keyword>lerp</keyword>
<keyword>dectime</keyword>
<keyword>randomize</keyword>
<keyword>rand</keyword>
<keyword>randi</keyword>
<keyword>randf</keyword>
<keyword>rand_range</keyword>
<keyword>rand_seed</keyword>
<keyword>deg2rad</keyword>
<keyword>rad2deg</keyword>
<keyword>linear2db</keyword>
<keyword>db2linear</keyword>
<keyword>max</keyword>
<keyword>min</keyword>
<keyword>clamp</keyword>
<keyword>nearest_po2</keyword>
<keyword>weakref</keyword>
<keyword>convert</keyword>
<keyword>str</keyword>
<keyword>print</keyword>
<keyword>printt</keyword>
<keyword>printerr</keyword>
<keyword>printraw</keyword>
<keyword>range</keyword>
<keyword>load</keyword>
<keyword>inst2dict</keyword>
<keyword>dict2inst</keyword>
</context>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,237 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Jamie McCracken jamiemcc gnome org
Copyright (C) 2008 Jamie McCracken jamiemcc gnome org
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="genie" name="Genie" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-genie</property>
<property name="globs">*.gs</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="multiline-string" name="Multiline string" map-to="def:string"/>
<style id="string" name="String" map-to="def:string"/>
<style id="regex" name="Regular Expression" map-to="def:string"/>
<style id="namespace" name="Namespace" map-to="def:preprocessor"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="definition" name="Definition" map-to="def:keyword"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="special-variable" name="Special Variable" map-to="def:identifier"/>
<style id="null-value" name="Null Value" map-to="def:special-constant"/>
<style id="boolean" name="Boolean" map-to="def:boolean"/>
<style id="number" name="Number" map-to="def:number"/>
<style id="builtin" name="Builtin Function" map-to="def:builtin"/>
<style id="printf" name="printf Conversion" map-to="def:special-char"/>
</styles>
<definitions>
<context id="multiline-string" style-ref="multiline-string" class-disabled="no-spell-check">
<start>"""</start>
<end>"""</end>
<include>
<context ref="def:escape"/>
</include>
</context>
<context id="double-quoted-string" style-ref="string" end-at-line-end="true" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="c:printf"/>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="single-quoted-string" style-ref="string" end-at-line-end="true" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="regex" style-ref="regex" end-at-line-end="true">
<start>/(?!/)</start>
<end>/</end>
</context>
<context id="namespace" style-ref="namespace">
<keyword>uses</keyword>
<keyword>namespace</keyword>
</context>
<context id="primitives" style-ref="type">
<keyword>bool</keyword>
<keyword>byte</keyword>
<keyword>char</keyword>
<keyword>date</keyword>
<keyword>datetime</keyword>
<keyword>decimal</keyword>
<keyword>double</keyword>
<keyword>float</keyword>
<keyword>int</keyword>
<keyword>long</keyword>
<keyword>object</keyword>
<keyword>sbyte</keyword>
<keyword>short</keyword>
<keyword>single</keyword>
<keyword>string</keyword>
<keyword>ulong</keyword>
<keyword>ushort</keyword>
</context>
<context id="definitions" style-ref="definition">
<keyword>const</keyword>
<keyword>class</keyword>
<keyword>construct</keyword>
<keyword>def</keyword>
<keyword>delegate</keyword>
<keyword>enum</keyword>
<keyword>exception</keyword>
<keyword>extern</keyword>
<keyword>event</keyword>
<keyword>final</keyword>
<keyword>get</keyword>
<keyword>init</keyword>
<keyword>inline</keyword>
<keyword>interface</keyword>
<keyword>override</keyword>
<keyword>prop</keyword>
<keyword>return</keyword>
<keyword>set</keyword>
<keyword>static</keyword>
<keyword>struct</keyword>
<keyword>var</keyword>
<keyword>virtual</keyword>
<keyword>weak</keyword>
</context>
<context id="keywords" style-ref="keyword">
<keyword>abstract</keyword>
<keyword>as</keyword>
<keyword>and</keyword>
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>cast</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>delete</keyword>
<keyword>div</keyword>
<keyword>do</keyword>
<keyword>downto</keyword>
<keyword>dynamic</keyword>
<keyword>else</keyword>
<keyword>ensures</keyword>
<keyword>except</keyword>
<keyword>extern</keyword>
<keyword>finally</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>implements</keyword>
<keyword>in</keyword>
<keyword>isa</keyword>
<keyword>is</keyword>
<keyword>lock</keyword>
<keyword>new</keyword>
<keyword>not</keyword>
<keyword>of</keyword>
<keyword>out</keyword>
<keyword>or</keyword>
<keyword>otherwise</keyword>
<keyword>pass</keyword>
<keyword>private</keyword>
<keyword>raise</keyword>
<keyword>raises</keyword>
<keyword>readonly</keyword>
<keyword>ref</keyword>
<keyword>requires</keyword>
<keyword>to</keyword>
<keyword>try</keyword>
<keyword>unless</keyword>
<keyword>when</keyword>
<keyword>while</keyword>
</context>
<context id="special-variables" style-ref="special-variable">
<keyword>self</keyword>
<keyword>super</keyword>
</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="numbers" style-ref="number">
<match extended="true">
(?&lt;![\w\.])
[0-9][0-9\.]*(m|ms|d|h|s|f|F|l|L)?
(?![\w\.])
</match>
</context>
<context id="builtins" style-ref="builtin">
<keyword>array</keyword>
<keyword>assert</keyword>
<keyword>dict</keyword>
<keyword>list</keyword>
<keyword>max</keyword>
<keyword>min</keyword>
<keyword>print</keyword>
<keyword>prop</keyword>
<keyword>sizeof</keyword>
<keyword>typeof</keyword>
</context>
<context id="genie" class="no-spell-check">
<include>
<context ref="def:shell-like-comment" style-ref="comment"/>
<context ref="def:c-like-comment" style-ref="comment"/>
<context ref="def:c-like-comment-multiline" style-ref="comment"/>
<context ref="multiline-string"/>
<context ref="double-quoted-string"/>
<context ref="single-quoted-string"/>
<context ref="regex"/>
<context ref="namespace"/>
<context ref="primitives"/>
<context ref="definitions"/>
<context ref="keywords"/>
<context ref="special-variables"/>
<context ref="null-value"/>
<context ref="boolean"/>
<context ref="numbers"/>
<context ref="builtins"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,482 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Chong Kai Xiong, Simon Wenner
Copyright (C) 2005-2006 Chong Kai Xiong <descender@phreaker.net>
Copyright (C) 2009-2010 Simon Wenner <simon@wenner.ch>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<!--
Defines all symbols of the OpenGL Shading Language (GLSL) version 4.0.
Specification (February 12, 2010):
http://www.opengl.org/registry/doc/GLSLangSpec.4.00.7.pdf
-->
<language id="glsl" _name="OpenGL Shading Language" version="2.0" _section="Source">
<metadata>
<property name="globs">*.glslv;*.glslf;*.glsl</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="builtin-function" name="Builtin Function" map-to="def:builtin"/>
<style id="builtin-constant" name="Builtin Constant" map-to="def:constant"/>
<style id="builtin-variable" name="Builtin Variable" map-to="def:identifier"/>
<style id="future-use" name="Reserved Keywords"/>
</styles>
<definitions>
<context id="preprocessor" style-ref="preprocessor">
<prefix>^[ \t]*#[ \t]*</prefix>
<keyword>define</keyword>
<keyword>undef</keyword>
<keyword>(if|elif)([ \t]+defined)?</keyword>
<keyword>ifdef</keyword>
<keyword>ifndef</keyword>
<keyword>else</keyword>
<keyword>endif</keyword>
<keyword>error</keyword>
<keyword>pragma</keyword>
<keyword>extension</keyword>
<keyword>version</keyword>
<keyword>line</keyword>
</context>
<context id="common-macros" style-ref="preprocessor">
<keyword>__VERSION__</keyword>
<keyword>__LINE__</keyword>
<keyword>__FILE__</keyword>
</context>
<context id="keywords" style-ref="keyword">
<keyword>break</keyword>
<keyword>continue</keyword>
<keyword>discard</keyword>
<keyword>do</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>else</keyword>
<keyword>return</keyword>
<keyword>while</keyword>
<keyword>switch</keyword>
<keyword>case</keyword>
<keyword>default</keyword>
<!-- qualifiers -->
<keyword>attribute</keyword>
<keyword>const</keyword>
<keyword>in</keyword>
<keyword>inout</keyword>
<keyword>out</keyword>
<keyword>uniform</keyword>
<keyword>varying</keyword>
<keyword>invariant</keyword>
<keyword>centroid</keyword>
<keyword>flat</keyword>
<keyword>smooth</keyword>
<keyword>noperspective</keyword>
<keyword>layout</keyword>
<keyword>patch</keyword>
<keyword>sample</keyword>
<keyword>subroutine</keyword>
<!-- precision -->
<keyword>lowp</keyword>
<keyword>mediump</keyword>
<keyword>highp</keyword>
<keyword>precision</keyword>
</context>
<context id="primitives" style-ref="type">
<keyword>bool</keyword>
<keyword>float</keyword>
<keyword>double</keyword>
<keyword>int</keyword>
<keyword>uint</keyword>
<keyword>struct</keyword>
<keyword>void</keyword>
<keyword>[bdiu]?vec[2-4]</keyword>
<keyword>[d]?mat[2-4]</keyword>
<keyword>[d]?mat[2-4]x[2-4]</keyword>
<keyword>[iu]?sampler[1-3]D</keyword>
<keyword>sampler[1-2]DShadow</keyword>
<keyword>[iu]?sampler[1-2]DArray</keyword>
<keyword>sampler[1-2]DArrayShadow</keyword>
<keyword>[iu]?samplerCube</keyword>
<keyword>samplerCubeShadow</keyword>
<keyword>[iu]?sampler2DRect</keyword>
<keyword>sampler2DRectShadow</keyword>
<keyword>[iu]?samplerBuffer</keyword>
<keyword>[iu]?sampler2DMS</keyword>
<keyword>[iu]?sampler2DMSArray</keyword>
<keyword>[iu]?sampler2DMSCubeArray</keyword>
<keyword>samplerCubeArrayShadow</keyword>
</context>
<context id="reserved-keywords-for-future-use" style-ref="future-use">
<keyword>common</keyword>
<keyword>partition</keyword>
<keyword>active</keyword>
<keyword>asm</keyword>
<keyword>class</keyword>
<keyword>union</keyword>
<keyword>enum</keyword>
<keyword>typedef</keyword>
<keyword>template</keyword>
<keyword>this</keyword>
<keyword>packed</keyword>
<keyword>goto</keyword>
<keyword>inline</keyword>
<keyword>noinline</keyword>
<keyword>volatile</keyword>
<keyword>public</keyword>
<keyword>static</keyword>
<keyword>extern</keyword>
<keyword>external</keyword>
<keyword>interface</keyword>
<keyword>long</keyword>
<keyword>short</keyword>
<keyword>half</keyword>
<keyword>fixed</keyword>
<keyword>unsigned</keyword>
<keyword>input</keyword>
<keyword>output</keyword>
<keyword>[hf]vec[2-4]</keyword>
<keyword>sampler3DRect</keyword>
<keyword>filter</keyword>
<keyword>sizeof</keyword>
<keyword>cast</keyword>
<keyword>namespace</keyword>
<keyword>using</keyword>
<keyword>row_major</keyword>
</context>
<context id="builtin-functions" style-ref="builtin-function">
<!-- Section 8.1 -->
<keyword>radians</keyword>
<keyword>degrees</keyword>
<keyword>sin</keyword>
<keyword>cos</keyword>
<keyword>tan</keyword>
<keyword>asin</keyword>
<keyword>acos</keyword>
<keyword>atan</keyword>
<keyword>sinh</keyword>
<keyword>cosh</keyword>
<keyword>tanh</keyword>
<keyword>asinh</keyword>
<keyword>acosh</keyword>
<keyword>atanh</keyword>
<!-- Section 8.2 -->
<keyword>pow</keyword>
<keyword>exp</keyword>
<keyword>log</keyword>
<keyword>exp2</keyword>
<keyword>log2</keyword>
<keyword>sqrt</keyword>
<keyword>inversesqrt</keyword>
<!-- Section 8.3 -->
<keyword>abs</keyword>
<keyword>sign</keyword>
<keyword>floor</keyword>
<keyword>trunc</keyword>
<keyword>round</keyword>
<keyword>roundEven</keyword>
<keyword>ceil</keyword>
<keyword>fract</keyword>
<keyword>mod</keyword>
<keyword>modf</keyword>
<keyword>min</keyword>
<keyword>max</keyword>
<keyword>clamp</keyword>
<keyword>mix</keyword>
<keyword>step</keyword>
<keyword>smoothstep</keyword>
<keyword>isnan</keyword>
<keyword>isinf</keyword>
<keyword>floatBitsToInt</keyword>
<keyword>floatBitsToUint</keyword>
<keyword>intBitsToFloat</keyword>
<keyword>uintBitsToFloat</keyword>
<keyword>fma</keyword>
<keyword>frexp</keyword>
<keyword>ldexp</keyword>
<!-- Section 8.4 -->
<keyword>packUnorm2x16</keyword>
<keyword>packUnorm4x8</keyword>
<keyword>packSnorm4x8</keyword>
<keyword>unpackUnorm2x16</keyword>
<keyword>unpackUnorm4x8</keyword>
<keyword>unpackSnorm4x8</keyword>
<keyword>packDouble2x32</keyword>
<keyword>unpackDouble2x32</keyword>
<!-- Section 8.5 -->
<keyword>length</keyword>
<keyword>distance</keyword>
<keyword>dot</keyword>
<keyword>cross</keyword>
<keyword>normalize</keyword>
<keyword>ftransform</keyword>
<keyword>faceforward</keyword>
<keyword>reflect</keyword>
<keyword>refract</keyword>
<!-- Section 8.6 -->
<keyword>matrixCompMult</keyword>
<keyword>outerProduct</keyword>
<keyword>transpose</keyword>
<keyword>determinant</keyword>
<keyword>inverse</keyword>
<!-- Section 8.7 -->
<keyword>lessThan</keyword>
<keyword>lessThanEqual</keyword>
<keyword>greaterThan</keyword>
<keyword>greaterThanEqual</keyword>
<keyword>equal</keyword>
<keyword>notEqual</keyword>
<keyword>any</keyword>
<keyword>all</keyword>
<keyword>not</keyword>
<!-- Section 8.8 -->
<keyword>uaddCarry</keyword>
<keyword>usubBorrow</keyword>
<keyword>umulExtended</keyword>
<keyword>imulExtended</keyword>
<keyword>bitfieldExtract</keyword>
<keyword>bitfildInsert</keyword>
<keyword>bitfieldReverse</keyword>
<keyword>bitCount</keyword>
<keyword>findLSB</keyword>
<keyword>findMSB</keyword>
<!-- Section 8.9 -->
<keyword>textureSize</keyword>
<keyword>textureQueryLOD</keyword>
<keyword>texture</keyword>
<keyword>textureProj</keyword>
<keyword>textureLod</keyword>
<keyword>textureOffset</keyword>
<keyword>texelFetch</keyword>
<keyword>texelFetchOffset</keyword>
<keyword>textureProjOffset</keyword>
<keyword>textureLodOffset</keyword>
<keyword>textureProjLod</keyword>
<keyword>textureProjLodOffset</keyword>
<keyword>textureGrad</keyword>
<keyword>textureGradOffset</keyword>
<keyword>textureProjGrad</keyword>
<keyword>textureProjGradOffset</keyword>
<keyword>textureGather</keyword>
<keyword>textureGatherOffset</keyword>
<keyword>texture[1-3]D</keyword>
<keyword>texture[1-3]DProj</keyword>
<keyword>texture[1-3]DLod</keyword>
<keyword>texture[1-3]DProjLod</keyword>
<keyword>textureCube</keyword>
<keyword>textureCubeLod</keyword>
<keyword>shadow[1-2]D</keyword>
<keyword>shadow[1-2]DProj</keyword>
<keyword>shadow[1-2]DLod</keyword>
<keyword>shadow[1-2]DProjLod</keyword>
<!-- Section 8.10 -->
<keyword>dFdx</keyword>
<keyword>dFdy</keyword>
<keyword>fwidth</keyword>
<keyword>interpolateAtCentroid</keyword>
<keyword>interpolateAtSample</keyword>
<keyword>interpolateAtOffset</keyword>
<!-- Section 8.11 -->
<keyword>noise[1-4]</keyword>
<!-- Section 8.12 -->
<keyword>EmitStreamVertex</keyword>
<keyword>EndStreamPrimitive</keyword>
<keyword>EmitVertex</keyword>
<keyword>EndPrimitive</keyword>
<!-- Section 8.13 -->
<keyword>barrier</keyword>
</context>
<context id="builtin-variables" style-ref="builtin-variable">
<!-- Section 7.1 (vertex language) -->
<keyword>gl_VertexID</keyword>
<keyword>gl_InstanceID</keyword>
<keyword>gl_Position</keyword>
<keyword>gl_PointSize</keyword>
<keyword>gl_ClipDistance</keyword>
<!-- Section 7.1 (geometry language) -->
<keyword>gl_PrimitiveIDIn</keyword>
<keyword>gl_InvocationID</keyword>
<keyword>gl_PrimitiveID</keyword>
<keyword>gl_Layer</keyword>
<!-- Section 7.1 (tessellation control language) -->
<keyword>gl_PatchVerticesIn</keyword>
<keyword>gl_TessLevelOuter</keyword>
<keyword>gl_TessLevelInner</keyword>
<!-- Section 7.1 (tessellation evaluation language) -->
<keyword>gl_TessCoord</keyword>
<!-- Section 7.1 (fragment language) -->
<keyword>gl_FragCoord</keyword>
<keyword>gl_FrontFacing</keyword>
<keyword>gl_PointCoord</keyword>
<keyword>gl_SampleID</keyword>
<keyword>gl_SamplePosition</keyword>
<keyword>gl_FragColor</keyword>
<keyword>gl_FragData</keyword>
<keyword>gl_FragDepth</keyword>
<keyword>gl_SampleMask</keyword>
<!-- Section 7.1.1 (compatibility profile) -->
<keyword>gl_ClipVertex</keyword>
<keyword>gl_FrontColor</keyword>
<keyword>gl_BackColor</keyword>
<keyword>gl_FrontSecondaryColor</keyword>
<keyword>gl_BackSecondaryColor</keyword>
<keyword>gl_TexCoord</keyword>
<keyword>gl_FogFragCoord</keyword>
<!-- Section 7.2 (compatibility profile vertex attributes) -->
<keyword>gl_Color</keyword>
<keyword>gl_SecondaryColor</keyword>
<keyword>gl_Normal</keyword>
<keyword>gl_Vertex</keyword>
<keyword>gl_MultiTexCoord[0-7]</keyword>
<keyword>gl_FogCoord</keyword>
</context>
<context id="builtin-constants" style-ref="builtin-constant">
<!-- Section 7.3 -->
<keyword>gl_MaxVertexAttribs</keyword>
<keyword>gl_MaxVertexUniformComponents</keyword>
<keyword>gl_MaxVaryingFloats</keyword>
<keyword>gl_MaxVaryingComponents</keyword>
<keyword>gl_MaxVertexOutputComponents</keyword>
<keyword>gl_MaxGeometryInputComponents</keyword>
<keyword>gl_MaxGeometryOutputComponents</keyword>
<keyword>gl_MaxFragmentInputComponents</keyword>
<keyword>gl_MaxVertexTextureImageUnits</keyword>
<keyword>gl_MaxCombinedTextureImageUnits</keyword>
<keyword>gl_MaxTextureImageUnits</keyword>
<keyword>gl_MaxFragmentUniformComponents</keyword>
<keyword>gl_MaxDrawBuffers</keyword>
<keyword>gl_MaxClipDistances</keyword>
<keyword>gl_MaxGeometryTextureImageUnits</keyword>
<keyword>gl_MaxGeometryOutputVertices</keyword>
<keyword>gl_MaxGeometryTotalOutputComponents</keyword>
<keyword>gl_MaxGeometryUniformComponents</keyword>
<keyword>gl_MaxGeometryVaryingComponents</keyword>
<keyword>gl_MaxTessControlInputComponents</keyword>
<keyword>gl_MaxTessControlOutputComponents</keyword>
<keyword>gl_MaxTessControlTextureImageUnits</keyword>
<keyword>gl_MaxTessControlUniformComponents</keyword>
<keyword>gl_MaxTessControlTotalOutputComponents</keyword>
<keyword>gl_MaxTessEvaluationInputComponents</keyword>
<keyword>gl_MaxTessEvaluationOutputComponents</keyword>
<keyword>gl_MaxTessEvaluationTextureImageUnits</keyword>
<keyword>gl_MaxTessEvaluationUniformComponents</keyword>
<keyword>gl_MaxTessPatchComponents</keyword>
<keyword>gl_MaxPatchVertices</keyword>
<keyword>gl_MaxTessGenLevel</keyword>
<!-- Section 7.3.1 (compatibility profile) -->
<keyword>gl_MaxTextureUnits</keyword>
<keyword>gl_MaxTextureCoords</keyword>
<keyword>gl_MaxClipPlanes</keyword>
</context>
<context id="builtin-uniform-states" style-ref="builtin-constant">
<!-- Section 7.4 -->
<keyword>gl_DepthRange</keyword>
<keyword>gl_ModelViewMatrix</keyword>
<keyword>gl_ProjectionMatrix</keyword>
<keyword>gl_ModelViewProjectionMatrix</keyword>
<keyword>gl_TextureMatrix</keyword>
<keyword>gl_NormalMatrix</keyword>
<keyword>gl_ModelViewMatrixInverse</keyword>
<keyword>gl_ProjectionMatrixInverse</keyword>
<keyword>gl_ModelViewProjectionMatrixInverse</keyword>
<keyword>gl_TextureMatrixInverse</keyword>
<keyword>gl_ModelViewMatrixTranspose</keyword>
<keyword>gl_ProjectionMatrixTranspose</keyword>
<keyword>gl_ModelViewProjectionMatrixTranspose</keyword>
<keyword>gl_TextureMatrixTranspose</keyword>
<keyword>gl_ModelViewMatrixInverseTranspose</keyword>
<keyword>gl_ProjectionMatrixInverseTranspose</keyword>
<keyword>gl_ModelViewProjectionMatrixInverseTranspose</keyword>
<keyword>gl_TextureMatrixInverseTranspose</keyword>
<keyword>gl_NormalScale</keyword>
<keyword>gl_ClipPlane</keyword>
<keyword>gl_Point</keyword>
<keyword>gl_FrontMaterial</keyword>
<keyword>gl_BackMaterial</keyword>
<keyword>gl_LightSource</keyword>
<keyword>gl_LightModel</keyword>
<keyword>gl_FrontLightModelProduct</keyword>
<keyword>gl_BackLightModelProduct</keyword>
<keyword>gl_FrontLightProduct</keyword>
<keyword>gl_BackLightProduct</keyword>
<keyword>gl_TextureEnvColor</keyword>
<keyword>gl_EyePlaneS</keyword>
<keyword>gl_EyePlaneT</keyword>
<keyword>gl_EyePlaneR</keyword>
<keyword>gl_EyePlaneQ</keyword>
<keyword>gl_ObjectPlaneS</keyword>
<keyword>gl_ObjectPlaneT</keyword>
<keyword>gl_ObjectPlaneR</keyword>
<keyword>gl_ObjectPlaneQ</keyword>
<keyword>gl_Fog</keyword>
</context>
<context id="glsl">
<include>
<context ref="def:c-like-comment"/>
<context ref="def:c-like-comment-multiline"/>
<context ref="def:c-like-close-comment-outside-comment"/>
<context ref="c:if0-comment"/>
<context ref="preprocessor"/>
<context ref="common-macros"/>
<context ref="keywords"/>
<context ref="primitives"/>
<context ref="c:boolean"/>
<context ref="c:decimal"/>
<context ref="c:octal"/>
<context ref="c:hexadecimal"/>
<context ref="c:float"/>
<context ref="builtin-functions"/>
<context ref="builtin-variables"/>
<context ref="builtin-constants"/>
<context ref="builtin-uniform-states"/>
<context ref="reserved-keywords-for-future-use"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,310 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Authors: Jim Teeuwen
Copyright (C) 2009-2010 Jim Teeuwen <jimteeuwen@gmail.com>
Copyright (C) 2010 Kenny Meyer <knny.myer@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
See: http://code.google.com/p/go/source/browse/misc/vim/syntax/go.vim
-->
<language id="go" name="Go" version="2.0" _section="Source">
<metadata>
<property name="mimetype">text/x-go</property>
<property name="globs">*.go</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="error" name="Error" map-to="def:error"/>
<style id="string" name="String" map-to="def:string"/>
<style id="char" name="Character" map-to="def:character"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="external" name="External" map-to="def:preprocessor"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="printf" name="printf Conversion" map-to="def:special-char"/>
<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="imaginary" name="Imaginary number" map-to="def:number"/>
<style id="binary" name="Binary number" map-to="def:base-n-integer"/>
<style id="decimal" name="Decimal number" map-to="def:decimal"/>
<style id="octal" name="Octal number" map-to="def:base-n-integer"/>
<style id="hexadecimal" name="Hexadecimal number" map-to="def:base-n-integer"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="builtin-constant" name="Builtin Constant" map-to="def:special-constant"/>
<style id="builtin-function" name="Builtin Function" map-to="def:builtin"/>
</styles>
<definitions>
<define-regex id="escaped-character" extended="true">
\\( # leading backslash
[\\\"\'nrbtfav\?] | # escaped character
[0-7]{3} | # three octal digits
x[0-9A-Fa-f]{2} | # 'x' followed by two hex digits
u[0-9A-Fa-f]{4} | # Little Unicode escape, 'u' followed by four hex digits
U[0-9A-Fa-f]{8} # Big Unicode escape, 'U' followed by eight hex digits
)
</define-regex>
<define-regex id="oct" extended="true">
0[Oo]?(_?[0-7])+
</define-regex>
<define-regex id="dec" extended="true">
(0|[1-9](_?[0-9])*)
</define-regex>
<define-regex id="bin" extended="true">
0[Bb](_?[01])+
</define-regex>
<define-regex id="hex" extended="true">
0[Xx](_?[0-9A-Fa-f])+
</define-regex>
<!--contexts NOT used on the main context-->
<context id="printf" style-ref="printf" extend-parent="false">
<match extended="true">
\%\%|\%
[#0\-\ \+]* # flags
(?:[1-9][0-9]*|\[[1-9][0-9]*\]\*)? # width
(?:\.(?:[0-9]+|\[[1-9][0-9]*\]\*))? # precision
(\[[1-9][0-9]*\])?[vTtbcdoOqxXUeEfFgGsp] # conversion specifier
</match>
</context>
<!--contexts used on the main context-->
<context id="comment" style-ref="comment" end-at-line-end="true" class-disabled="no-spell-check">
<start>//</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="comment-multiline" style-ref="comment" class-disabled="no-spell-check">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<context id="quoted-string" style-ref="string" end-at-line-end="true" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="printf"/>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
<context ref="def:line-continue"/>
</include>
</context>
<context id="backquote-string" style-ref="string" end-at-line-end="false" class-disabled="no-spell-check">
<start>`</start>
<end>`</end>
<include>
<context ref="printf"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="char" style-ref="char">
<match>'(\%{escaped-character}|.)'</match>
</context>
<define-regex id="float" extended="true">
((\.[0-9](_?[0-9])* | [0-9](_?[0-9])*\.[0-9]?(_?[0-9])*) ([Ee][+-]?[0-9](_?[0-9])*)? |
([0-9](_?[0-9])*[Ee][+-]?[0-9](_?[0-9])*) |
0[Xx]_?(\.[0-9A-Fa-f](_?[0-9A-Fa-f])* | [0-9A-Fa-f](_?[0-9A-Fa-f])*\.?([0-9A-Fa-f](_?[0-9A-Fa-f])*)?)[Pp][+-]?[0-9](_?[0-9])*
)
</define-regex>
<context id="imaginary" style-ref="imaginary">
<match>(?&lt;![\w\.])(\%{float}|\%{oct}|\%{bin}|\%{hex}|\[0-9]+)[i]\b</match>
</context>
<context id="float" style-ref="floating-point">
<match>(?&lt;![\w\.])\%{float}(?![\w\.])</match>
</context>
<context id="hexadecimal" style-ref="hexadecimal">
<match extended="true">
(?&lt;![\w\.])
\%{hex}
(?![\w\.])
</match>
</context>
<context id="binary" style-ref="binary">
<match extended="true">
(?&lt;![\w\.])
\%{bin}
(?![\w\.])
</match>
</context>
<context id="invalid-hexadecimal" style-ref="error">
<match extended="true">
(?&lt;![\w\.])
0[xX][a-fA-F0-9]*[ghj-zGHJ-Z][a-zA-Z0-9]*
(?![\w\.])
</match>
</context>
<context id="octal" style-ref="octal">
<match extended="true">
(?&lt;![\w\.])
\%{oct}
(?![\w\.])
</match>
</context>
<context id="invalid-octal" style-ref="error">
<match extended="true">
(?&lt;![\w\.])
0[Oo]?[0-7]*[89][0-9]*
(?![\w\.])
</match>
</context>
<context id="decimal" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
\%{dec}
(?![\w\.])
</match>
</context>
<context id="boolean" style-ref="boolean">
<match extended="true">
(?&lt;![\w\.])
(true|false)
(?![\w\.])
</match>
</context>
<context id="externals" style-ref="external">
<keyword>import</keyword>
<keyword>package</keyword>
</context>
<context id="keywords" style-ref="keyword">
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>const</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>defer</keyword>
<keyword>else</keyword>
<keyword>fallthrough</keyword>
<keyword>for</keyword>
<keyword>func</keyword>
<keyword>go</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>interface</keyword>
<keyword>range</keyword>
<keyword>return</keyword>
<keyword>select</keyword>
<keyword>struct</keyword>
<keyword>switch</keyword>
<keyword>type</keyword>
<keyword>var</keyword>
</context>
<context id="types" style-ref="type">
<keyword>bool</keyword>
<keyword>byte</keyword>
<keyword>chan</keyword>
<keyword>complex64</keyword>
<keyword>complex128</keyword>
<keyword>error</keyword>
<keyword>float32</keyword>
<keyword>float64</keyword>
<keyword>func</keyword>
<keyword>int</keyword>
<keyword>int8</keyword>
<keyword>int16</keyword>
<keyword>int32</keyword>
<keyword>int64</keyword>
<keyword>map</keyword>
<keyword>rune</keyword>
<keyword>string</keyword>
<keyword>uint</keyword>
<keyword>uint8</keyword>
<keyword>uint16</keyword>
<keyword>uint32</keyword>
<keyword>uint64</keyword>
<keyword>uintptr</keyword>
</context>
<context id="builtin-constant" style-ref="builtin-constant">
<keyword>iota</keyword>
<keyword>nil</keyword>
</context>
<context id="builtin-function" style-ref="builtin-function">
<keyword>append</keyword>
<keyword>cap</keyword>
<keyword>close</keyword>
<keyword>complex</keyword>
<keyword>copy</keyword>
<keyword>delete</keyword>
<keyword>imag</keyword>
<keyword>len</keyword>
<keyword>make</keyword>
<keyword>new</keyword>
<keyword>panic</keyword>
<keyword>real</keyword>
<keyword>recover</keyword>
</context>
<context id="go" class="no-spell-check">
<include>
<context ref="comment"/>
<context ref="comment-multiline"/>
<context ref="close-comment-outside-comment"/>
<context ref="quoted-string"/>
<context ref="backquote-string"/>
<context ref="char"/>
<context ref="binary"/>
<context ref="float"/>
<context ref="hexadecimal"/>
<context ref="imaginary"/>
<context ref="invalid-hexadecimal"/>
<context ref="octal"/>
<context ref="invalid-octal"/>
<context ref="decimal"/>
<context ref="boolean"/>
<context ref="keywords"/>
<context ref="externals"/>
<context ref="types"/>
<context ref="builtin-constant"/>
<context ref="builtin-function"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
gradle.lang basic syntax highlighting of gradle config files for GtkSourceView
Copyright (C) 2018 Alberto Fanjul <albfan@gnome.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="gradle" name="Gradle" version="2.0" _section="Source">
<metadata>
<property name="globs">*.gradle</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<style id="declaration" name="Declaration" map-to="def:type"/>
</styles>
<definitions>
<context id="declarations" style-ref="declaration">
<keyword>apply</keyword>
<keyword>plugin</keyword>
<keyword>compile</keyword>
<keyword>testCompile</keyword>
<keyword>dependencies</keyword>
<keyword>repositories</keyword>
</context>
<context id="gradle" class="no-spell-check">
<include>
<context ref="groovy:groovy"/>
<context ref="declarations"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,343 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2003 Gustavo Giráldez <gustavo.giraldez@gmx.net>
Copyright (C) 2006 Jeff Walden <jwalden@mit.edu>
Copyright (C) 2017 Roman Donchenko
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="groovy" name="Groovy" version="2.0" _section="Source">
<metadata>
<property name="globs">*.groovy</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="interpolation" name="Interpolation Syntax" map-to="def:special-char"/>
<style id="interpolated" name="Interpolated Expression" map-to="def:identifier"/>
<style id="string" name="String" map-to="def:string"/>
<style id="external" name="External" map-to="def:preprocessor"/>
<style id="declaration" name="Declaration" map-to="def:type"/>
<style id="storage-class" name="Storage Class" map-to="def:type"/>
<style id="scope-declaration" name="Scope Declaration" map-to="def:type"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="null-value" name="Null Value" map-to="def:special-constant"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="number" name="Number" map-to="def:number"/>
<style id="type" name="Data Type" map-to="def:type"/>
</styles>
<definitions>
<define-regex id="escaped-character" extended="true">
\\(
# character escape
[nrtbf"'\\$] |
# unicode escape
u[0-9A-Fa-f]{4} |
# octal escape
[0-3] ([0-7] [0-7]?)? | [4-7] [0-7]?
)
</define-regex>
<define-regex id="letter" extended="true">
[a-zA-Z\x{c0}-\x{d6}\x{d8}-\x{f6}\x{f8}-\x{ff}\x{100}-\x{fffe}_]
</define-regex>
<context id="escaped-character">
<include>
<context style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
<context ref="def:line-continue"/>
<context style-ref="def:error">
<!-- backslashes not part of a valid escape sequence are erroneous -->
<match>\\</match>
</context>
</include>
</context>
<context id="placeholder">
<include>
<context style-ref="interpolated">
<match extended="true">
(\$)
# one or more dollarless identifiers separated by dots
\%{letter} (\%{letter} | \d)*
(\. \%{letter} (\%{letter} | \d)*)*
</match>
<include>
<context sub-pattern="1" style-ref="interpolation"/>
</include>
</context>
<context style-ref="interpolated">
<start>\$\{</start>
<end>\}</end>
<include>
<context sub-pattern="0" where="start" style-ref="interpolation"/>
<context sub-pattern="0" where="end" style-ref="interpolation"/>
<context ref="groovy"/>
</include>
</context>
</include>
</context>
<!-- a dollar that isn't part of a placeholder is erroneous in some instances -->
<context id="bad-placeholder" style-ref="def:error">
<match>\$</match>
</context>
<context id="triple-single-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>'''</start>
<end>'''</end>
<include>
<context ref="escaped-character"/>
</include>
</context>
<context id="single-quoted-string" end-at-line-end="true" style-ref="string" class="string" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
<include>
<context ref="escaped-character"/>
</include>
</context>
<context id="triple-double-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>"""</start>
<end>"""</end>
<include>
<context ref="escaped-character"/>
<context ref="placeholder"/>
<context ref="bad-placeholder"/>
</include>
</context>
<context id="double-quoted-string" end-at-line-end="true" style-ref="string" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="escaped-character"/>
<context ref="placeholder"/>
<context ref="bad-placeholder"/>
</include>
</context>
<context id="slashy-string" style-ref="string" class="string">
<start extended="true">
# The initial slash must not be preceded by a token that can end an expression.
# Otherwise, it's interpreted as a division operator, not the start of a slashy string.
# It'd be complicated to verify whole tokens with a regex, but the last non-space
# character is a good indicator by itself. We can use a negative lookbehind assertion
# to verify that it's not a character that an expression-ending token can end with.
# Trouble is, a lookbehind assertion has to consist of fixed-length alternatives, so
# we can't have it match an arbitrary amount of whitespace. Thus, we do an approximate
# check, only trying zero and one spaces.
(?&lt;! \+\+ | -- | [])}'"\$\d] | \%{letter} |
\+\+\s | --\s | [])}'"\$\d]\s | \%{letter}\s )
/
</start>
<end>/</end>
<include>
<context style-ref="escaped-character">
<match>\\/</match>
</context>
<context ref="def:line-continue"/>
<context ref="placeholder"/>
<!-- standalone dollars and backslashes are interpreted literally -->
</include>
</context>
<context id="dollar-slashy-string" style-ref="string" class="string">
<start extended="true">
\$/
# Dollar slashy strings can't be empty (a would-be empty one is parsed
# as a dollar followed by a single-line comment instead).
(?! /\$)
</start>
<end>/\$</end>
<include>
<context style-ref="escaped-character">
<match>\$[$/]</match>
</context>
<context ref="def:line-continue"/>
<context ref="placeholder"/>
</include>
</context>
<context id="numeric" style-ref="number">
<match extended="true">
\b (
# floating-point
\d ([\d_]* \d)? (
\. \d ([\d_]* \d)? ([eE] [+-]? [\d_]* \d)? [dDfFgG]? |
[eE] [+-]? [\d_]* \d [dDfFgG]? |
[dDfF]
) |
# integer
(
0 | # decimal zero
0[bB] [01] ([01_]* [01])? | # binary
0 [0-7] ([0-7_]* [0-7])? | # octal
[1-9] ([\d_]* \d)? | # decimal
0[xX] [\da-fA-F] ([\da-fA-F_]* [\da-fA-F])? # hexadecimal
) [iIlLgG]?
) \b
</match>
</context>
<!--
Some of the Java keywords are reserved in Groovy. We don't mark them
with a special style, though, because in some instances keywords can
be used as identifiers (e.g. when used as a member name), and even
reserved keywords are valid when used like that.
-->
<context id="externals" style-ref="external">
<keyword>import</keyword>
<keyword>package</keyword>
</context>
<context id="declarations" style-ref="declaration">
<keyword>class</keyword>
<keyword>enum</keyword>
<keyword>extends</keyword>
<keyword>implements</keyword>
<keyword>interface</keyword>
<keyword>native</keyword>
<keyword>throws</keyword>
<keyword>trait</keyword>
</context>
<context id="primitive-types" style-ref="type">
<keyword>boolean</keyword>
<keyword>byte</keyword>
<keyword>char</keyword>
<keyword>def</keyword>
<keyword>double</keyword>
<keyword>float</keyword>
<keyword>int</keyword>
<keyword>long</keyword>
<keyword>short</keyword>
<keyword>void</keyword>
</context>
<context id="storage-class" style-ref="storage-class">
<keyword>abstract</keyword>
<keyword>const</keyword>
<keyword>final</keyword>
<keyword>static</keyword>
<keyword>strictfp</keyword>
<keyword>synchronized</keyword>
<keyword>transient</keyword>
<keyword>volatile</keyword>
</context>
<context id="scope-declarations" style-ref="scope-declaration">
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
</context>
<context id="flow" style-ref="keyword">
<keyword>assert</keyword>
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>finally</keyword>
<keyword>for</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>return</keyword>
<keyword>throw</keyword>
<keyword>switch</keyword>
<keyword>try</keyword>
<keyword>while</keyword>
</context>
<context id="operator" style-ref="operator">
<keyword>as</keyword>
<keyword>in</keyword>
<keyword>instanceof</keyword>
<keyword>new</keyword>
<keyword>super</keyword>
<keyword>this</keyword>
</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="groovy" class="no-spell-check">
<include>
<context ref="def:shebang" style-ref="comment"/>
<context ref="def:c-like-comment" style-ref="comment"/>
<context ref="def:c-like-comment-multiline" style-ref="comment"/>
<context ref="def:line-continue"/>
<context ref="triple-single-quoted-string"/>
<context ref="single-quoted-string"/>
<context ref="triple-double-quoted-string"/>
<context ref="double-quoted-string"/>
<context ref="slashy-string"/>
<context ref="dollar-slashy-string"/>
<context ref="numeric"/>
<context ref="externals"/>
<context ref="declarations"/>
<context ref="primitive-types"/>
<context ref="storage-class"/>
<context ref="scope-declarations"/>
<context ref="flow"/>
<context ref="operator"/>
<context ref="null-value"/>
<context ref="boolean"/>
<!--
To be able to tell apart closing braces that end a ${} placeholder
and ones that end a block inside such a placeholder,
treat braced blocks as nested contexts.
-->
<context>
<start>\{</start>
<end>\}</end>
<include>
<context ref="groovy"/>
</include>
</context>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Yevgen Muntyan <muntyan@tamu.edu>
Copyright (C) 2006-2007 Yevgen Muntyan <muntyan@tamu.edu>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<!-- Copyright (C) 2006-2007 - Yevgen Muntyan <muntyan@tamu.edu> -->
<language id="gtk-doc" name="gtk-doc" version="2.0" _section="Markup" hidden="true">
<styles>
<style id="inline-docs-section" name="Inline Documentation Section" map-to="def:doc-comment"/>
<style id="function-name" name="Function Name" map-to="def:doc-comment-element"/>
<style id="signal-name" name="Signal Name" map-to="def:doc-comment-element"/>
<style id="property-name" name="Property Name" map-to="def:doc-comment-element"/>
<style id="parameter" name="Parameter" map-to="def:doc-comment-element"/>
<style id="constant" name="Constant" map-to="def:doc-comment-element"/>
<style id="type" name="Type" map-to="def:doc-comment-element"/>
<style id="function" name="Function" map-to="def:doc-comment-element"/>
<style id="return" name="Return" map-to="def:doc-comment-element"/>
<style id="since" name="Since" map-to="def:doc-comment-element"/>
<style id="deprecated" name="Deprecated" map-to="def:doc-comment-element"/>
</styles>
<definitions>
<context id="skip-asterisk">
<match>^\s*\*(?!/)\s*</match>
</context>
<context id="inline-docs-body">
<include>
<context ref="skip-asterisk"/>
<context ref="def:in-comment"/>
<context style-ref="parameter">
<match>\@[\w_]+</match>
</context>
<context style-ref="constant">
<match>%[\w_]+</match>
</context>
<context style-ref="type">
<match>\#[\w_]+</match>
</context>
<context style-ref="function">
<match>[\w_]+\(\s*\)</match>
</context>
<context style-ref="return">
<match>(Returns|Return value)\:</match>
</context>
<context style-ref="since">
<match>Since\:</match>
</context>
<context style-ref="deprecated">
<match>Deprecated\:</match>
</context>
</include>
</context>
<context id="inline-docs-section" style-ref="inline-docs-section" class="comment" class-disabled="no-spell-check">
<start>/\*\*(?!\S)</start>
<end>\*/</end>
<include>
<context ref="skip-asterisk"/>
<context extend-parent="false">
<start>(([\w_]+\:\:[\w_-]+)|([\w_]+\:[\w_-]+)|([\w_]+))\:\s*$</start>
<include>
<context sub-pattern="2" where="start" style-ref="function-name"/>
<context sub-pattern="3" where="start" style-ref="signal-name"/>
<context sub-pattern="4" where="start" style-ref="property-name"/>
<context ref="inline-docs-body"/>
</include>
</context>
<context ref="inline-docs-body"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Link M Dupont, Andrew Johnson
Copyright (C) 2005 Link M Dupont <link@subpop.net>
Copyright (C) 2005 Andrew Johnson <acjgenius@earthlink.net>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="gtkrc" name="GtkRC" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">text/x-gtkrc</property>
<property name="globs">gtkrc;.gtkrc;gtkrc-*;.gtkrc-*</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="string" name="String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="decimal" name="Decimal" map-to="def:decimal"/>
<style id="variable" name="Data Type" map-to="def:type"/>
<style id="state" name="Widget State" map-to="def:special-constant"/>
<style id="include-directive" name="Include directive" map-to="def:preprocessor"/>
<style id="boolean-value" name="Boolean value" map-to="def:boolean"/>
</styles>
<definitions>
<context id="double-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="single-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>#</start>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="keysymbol" style-ref="keyword">
<match>::|=</match>
</context>
<context id="number" style-ref="decimal">
<match>\b[0-9][0-9\.]*\b</match>
</context>
<context id="keyword" style-ref="keyword">
<keyword>style</keyword>
<keyword>engine</keyword>
<keyword>widget_class</keyword>
<keyword>class</keyword>
<keyword>widget</keyword>
</context>
<context id="variable" style-ref="variable">
<keyword>fg</keyword>
<keyword>bg</keyword>
<keyword>bg_pixmap</keyword>
<keyword>base</keyword>
<keyword>text</keyword>
</context>
<context id="state" style-ref="state">
<keyword>ACTIVE</keyword>
<keyword>SELECTED</keyword>
<keyword>NORMAL</keyword>
<keyword>PRELIGHT</keyword>
<keyword>INSENSITIVE</keyword>
</context>
<context id="include-directive" style-ref="include-directive">
<keyword>include</keyword>
</context>
<context id="boolean-value" style-ref="boolean-value">
<keyword>TRUE</keyword>
<keyword>FALSE</keyword>
</context>
<context id="gtkrc" class="no-spell-check">
<include>
<context ref="double-quoted-string"/>
<context ref="single-quoted-string"/>
<context ref="line-comment"/>
<context ref="keysymbol"/>
<context ref="number"/>
<context ref="keyword"/>
<context ref="variable"/>
<context ref="state"/>
<context ref="include-directive"/>
<context ref="boolean-value"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Duncan Coutts
Copyright (C) 2007 Duncan Coutts <duncan@haskell.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="haddock" name="Haddock" version="2.0" _section="Markup" hidden="true">
<styles>
<style id="markup" name="Inline Haddock Section" map-to="def:doc-comment"/>
<style id="directive" name="Haddock Directive" map-to="def:doc-comment-element"/>
<style id="identifier" name="Hyperlinked Identifier" map-to="def:doc-comment-element"/>
<style id="module" name="Hyperlinked Module Name" map-to="def:doc-comment-element"/>
<style id="escape" name="Escape" map-to="def:special-char"/>
<style id="emphasis" name="Emphasis" map-to="def:doc-comment-element"/>
<style id="monospace" name="Monospace" />
<style id="codeblock" name="Code Block" />
<style id="property" name="Header Property" map-to="def:doc-comment-element"/>
<style id="itemized" name="Itemized list" map-to="def:doc-comment-element"/>
<style id="enumerated" name="Enumerated list" map-to="def:doc-comment-element"/>
<style id="definition" name="Definition list" map-to="def:doc-comment-element"/>
<style id="url" name="URL" map-to="def:net-address"/>
<style id="anchor" name="Anchor" map-to="def:doc-comment-element"/>
</styles>
<definitions>
<context id="haddock">
<include>
<!-- Spec: http://haskell.org/haddock/haddock-html-0.8/markup.html -->
<context id="escape" style-ref="escape" extend-parent="true">
<match>\\[/'`"@#&lt;*-]</match>
</context>
<context id="character-reference" style-ref="escape">
<match>&amp;#([0-9]+|x[a-fA-F0-9]+);</match>
</context>
<context id="identifier" style-ref="identifier" extend-parent="false">
<match>'[a-zA-Z_][0-9a-zA-Z._'#]*'</match>
</context>
<context id="module" style-ref="module" extend-parent="false">
<match>"[A-Z][0-9a-zA-Z._']*"</match>
</context>
<context id="emphasis" style-ref="emphasis" extend-parent="false">
<start>/</start>
<end>/</end>
<include>
<context ref="escape"/>
<context ref="character-reference"/>
</include>
</context>
<context id="monospace" style-ref="monospace" extend-parent="false">
<start>@</start>
<end>@</end>
<include>
<context ref="escape"/>
<context ref="character-reference"/>
</include>
</context>
<context id="codeblock" style-ref="codeblock">
<match>^\s*--+\s+&gt;.*$</match>
</context>
<context id="property" extend-parent="false">
<match>^\s*--+\s+([A-Z][a-zA-Z0-9'_]*)\s*:.*$</match>
<include>
<context sub-pattern="1" style-ref="property"/>
</include>
</context>
<context id="list-item" extend-parent="false">
<match extended="true">
^(\s*--+)?\s+ # line start possibly with line comment
( \*(?=\s) | -(?=\s) # bulleted item
| \([0-9]\) | [0-9]\. # enumerated item
| \[@[a-zA-Z0-9._'\#]*@\] # definition list item
)
</match>
<include>
<context sub-pattern="2" style-ref="itemized" />
</include>
</context>
<context id="url" style-ref="url" extend-parent="false">
<match>&lt;.*&gt;</match>
</context>
<context id="anchor" style-ref="anchor" extend-parent="false">
<match>#[a-z][0-9a-zA-Z_']*#|[A-Z][0-9a-zA-Z._']*#[a-z][0-9a-zA-Z_']*+</match>
</context>
<!-- haddock markup inside Haskell line comments -->
<context id="line-paragraph" style-ref="markup" extend-parent="true" end-parent="true">
<start>\s+([|^*$]+)</start>
<end>^(?!\s*--+)</end>
<include>
<context ref="escape"/>
<context ref="character-reference"/>
<context ref="identifier"/>
<context ref="module"/>
<context ref="emphasis"/>
<context ref="monospace"/>
<context ref="codeblock"/>
<context ref="property"/>
<context ref="list-item"/>
<context ref="url"/>
<context ref="anchor"/>
</include>
</context>
<!-- haddock markup inside Haskell block comment -->
<context id="block-paragraph" style-ref="markup" extend-parent="false">
<start>(?&lt;={-)\s?[|^*$]</start>
<include>
<context ref="escape"/>
<context ref="character-reference"/>
<context ref="identifier"/>
<context ref="module"/>
<context ref="emphasis"/>
<context ref="monospace"/>
<context ref="codeblock"/>
<context ref="property"/>
<context ref="list-item"/>
<context ref="url"/>
<context ref="anchor"/>
</include>
</context>
<context id="directive" style-ref="directive">
<prefix>#</prefix>
<keyword>hide</keyword>
<keyword>prune</keyword>
<keyword>ignore-exports</keyword>
</context>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Duncan Coutts
Copyright (C) 2007 Duncan Coutts <duncan@haskell.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="haskell-literate" name="Literate Haskell" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-literate-haskell</property>
<property name="globs">*.lhs</property>
</metadata>
<definitions>
<context id="haskell-literate">
<include>
<context ref="def:shebang"/>
<context ref="c:if0-comment"/>
<context ref="c:include"/>
<context ref="c:preprocessor"/>
<context ref="def:in-comment"/>
<context id="line-code" end-at-line-end="true">
<start>^&gt;</start>
<include>
<context ref="haskell:body"/>
</include>
</context>
<context id="block-code">
<start>^\\begin\{code\}</start>
<end>^\\end\{code\}</end>
<include>
<context ref="haskell:body" />
</include>
</context>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,239 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Duncan Coutts, Anders Carlsson
Copyright (C) 2004, 2007 Duncan Coutts <duncan@haskell.org>
Copyright (C) 2004 Anders Carlsson <andersca@gnome.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="haskell" name="Haskell" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-haskell</property>
<property name="globs">*.hs</property>
<property name="line-comment-start">--</property>
</metadata>
<styles>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="variable" name="Variable" />
<style id="symbol" name="Symbol" />
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="string" name="String" map-to="def:string"/>
<style id="character" name="Character" map-to="def:character"/>
<style id="char-escape" name="Escaped Character" map-to="def:special-char"/>
<style id="float" name="Float" map-to="def:floating-point"/>
<style id="decimal" name="Decimal" map-to="def:decimal"/>
<style id="octal" name="Octal" map-to="def:base-n-integer"/>
<style id="hexadecimal" name="Hex" map-to="def:base-n-integer"/>
</styles>
<definitions>
<!-- Spec: http://haskell.org/onlinereport/lexemes.html -->
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>(?&lt;!\p{S})--+(?!\p{S})</start>
<include>
<context ref="def:in-comment"/>
<context ref="haddock:line-paragraph"/>
<context ref="haddock:directive"/>
</include>
</context>
<context id="block-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>\{-</start>
<end>-\}</end>
<include>
<context ref="def:in-comment"/>
<context ref="haddock:block-paragraph"/>
<context ref="haddock:directive"/>
<context ref="block-comment"/>
</include>
</context>
<context id="pragma" style-ref="preprocessor">
<start>\{-#</start>
<end>#-\}</end>
</context>
<context id="infix-keyword" style-ref="keyword">
<prefix>(?&lt;!\p{S})</prefix>
<suffix>(?!\p{S})</suffix>
<keyword>\.\.</keyword>
<keyword>::</keyword>
<keyword>=</keyword>
<keyword>\|</keyword>
<keyword>\</keyword>
<keyword>-&gt;</keyword>
<keyword>&lt;-</keyword>
<keyword>-&lt;</keyword>
<keyword>@</keyword>
<keyword>~</keyword>
<keyword>=&gt;</keyword>
</context>
<context id="prefix-keyword" style-ref="keyword">
<keyword>case</keyword>
<keyword>class</keyword>
<keyword>data</keyword>
<keyword>default</keyword>
<keyword>deriving</keyword>
<keyword>do</keyword>
<keyword>mdo</keyword>
<keyword>else</keyword>
<keyword>forall</keyword>
<keyword>foreign</keyword>
<keyword>hiding</keyword>
<keyword>if</keyword>
<keyword>import</keyword>
<keyword>in</keyword>
<keyword>infix</keyword>
<keyword>infixl</keyword>
<keyword>infixr</keyword>
<keyword>instance</keyword>
<keyword>let</keyword>
<keyword>module</keyword>
<keyword>newtype</keyword>
<keyword>of</keyword>
<keyword>proc</keyword>
<keyword>qualified</keyword>
<keyword>then</keyword>
<keyword>where</keyword>
<keyword>type</keyword>
</context>
<context id="label" style-ref="string">
<match>(?&lt;!\P{Z})#[\p{Ll}_][\p{N}\p{L}_']*</match>
</context>
<define-regex id="qualified">(?&lt;![\w.])(?:\p{Lu}[\p{N}\p{L}_'#]*\.)*</define-regex>
<context id="infix-constructor" style-ref="type">
<match>'?\%{qualified}(?&lt;!\p{S}):\p{S}+</match>
</context>
<!-- Must not extend parent context, or we end up matching
"\end{code}" as part of the Haskell context, but when in
literate haskell mode it should be terminating a code block. -->
<context id="infix-variable" style-ref="variable" extend-parent="false">
<match>\%{qualified}\p{S}+</match>
</context>
<context id="prefix-constructor" style-ref="type">
<match>(?:'(?=\p{Lu}[^']))?\%{qualified}\p{Lu}[\p{N}\p{L}_'#]*</match>
</context>
<context id="prefix-variable" style-ref="variable">
<match>\%{qualified}[\p{Ll}_][\p{N}\p{L}_'#]*</match>
</context>
<define-regex id="escaped-character" extended="true">
\\( # leading backslash
[abfnrtv\\"\'&amp;] | # escaped character
[0-9]+ | # decimal digits
o[0-7]+ | # 'o' followed by octal digits
x[0-9A-Fa-f]+ | # 'x' followed by hex digits
\^[A-Z@\[\\\]^_] | # control character codes
NUL | SOH | STX | ETX | EOT | ENQ | ACK |
BEL | BS | HT | LF | VT | FF | CR | SO |
SI | DLE | DC1 | DC2 | DC3 | DC4 | NAK |
SYN | ETB | CAN | EM | SUB | ESC | FS | GS |
RS | US | SP | DEL # control char names
)
</define-regex>
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="def:line-continue"/>
<context style-ref="char-escape">
<match>\%{escaped-character}</match>
</context>
</include>
</context>
<context id="char" style-ref="character" end-at-line-end="true">
<start>'</start>
<end>'</end>
<include>
<context style-ref="char-escape" once-only="true">
<match>\%{escaped-character}</match>
</context>
<context once-only="true" extend-parent="false">
<match>.</match>
</context>
<context style-ref="def:error" extend-parent="false">
<match>.</match>
</context>
</include>
</context>
<context id="float" style-ref="float">
<match extended="true">
[0-9]+ \. [0-9]+ ([eE][+-]?[0-9]+)?
| [0-9]+ [eE][+-]?[0-9]+
</match>
</context>
<context id="hexadecimal" style-ref="hexadecimal">
<match>0[xX][0-9a-fA-F]+</match>
</context>
<context id="octal" style-ref="octal">
<match>0[oO][0-7]+</match>
</context>
<context id="decimal" style-ref="decimal">
<match>[0-9]+</match>
</context>
<context id="body">
<include>
<context ref="line-comment"/>
<context ref="pragma"/>
<context ref="block-comment"/>
<context ref="infix-keyword"/>
<context ref="prefix-keyword"/>
<context ref="label"/>
<context ref="infix-constructor"/>
<context ref="infix-variable"/>
<context ref="prefix-variable"/>
<context ref="prefix-constructor"/>
<context ref="string"/>
<context ref="char"/>
<context ref="float"/>
<context ref="hexadecimal"/>
<context ref="octal"/>
<context ref="decimal"/>
</include>
</context>
<context id="haskell" class="no-spell-check">
<include>
<context ref="def:shebang"/>
<context ref="c:if0-comment"/>
<context ref="c:include"/>
<context ref="c:preprocessor"/>
<context ref="body"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,237 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Ian Liu Rodrigues <ian.liu88@gmail.com> (modified from java.lang)
Copyright (C) 2003 Gustavo Giráldez <gustavo.giraldez@gmx.net>
Copyright (C) 2006 Jeff Walden <jwalden@mit.edu>
Copyright (C) 2012 Sapphire Becker <guess@logicplace.com>
Copyright (C) 2016 Wolfang Torres <wolfang.torres@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<!--
References:
https://en.wikipedia.org/wiki/Haxe
https://haxe.org/documentation/
https://haxe.org/manual/expression.html
-->
<language id="haxe" name="Haxe" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-haxe</property>
<property name="globs">*.hx</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="external" name="External" map-to="def:preprocessor" />
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor" />
<style id="declaration" name="Declaration" map-to="def:type" />
<style id="storage-class" name="Storage Class" map-to="def:type" />
<style id="scope" name="Scope" map-to="def:type" />
<style id="keyword" name="Keyword" map-to="def:keyword" />
<style id="string" name="String" map-to="def:string" />
<style id="number" name="Number" map-to="def:decimal" />
<style id="boolean" name="Boolean value" map-to="def:boolean" />
<style id="null-value" name="Null Value" map-to="def:special-constant" />
<style id="type" name="Data Type" map-to="def:identifier" />
<style id="metadata" name="Metadata" map-to="def:constant" />
<style id="macro" name="Macro" map-to="def:preprocessor" />
<style id="error" name="Error" map-to="def:error" />
<style id="escaped-char" name="Escaped Character" map-to="def:special-char" />
<style id="identifier-prefix" name="Identifier Prefix" map-to="def:warning" />
</styles>
<definitions>
<define-regex id="escaped-char" extended="true">\\(x?\d+|[\\\?\"\'nt])</define-regex>
<define-regex id="escaped-char-error" extended="true">\\[^\\\?\"\'ntx\d]</define-regex>
<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="block-comment" style-ref="comment">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment" />
</include>
</context>
<context id="close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<context id="escaped-char" style-ref="escaped-char">
<match>\%{escaped-char}</match>
</context>
<context id="escaped-char-error" style-ref="error">
<match>\%{escaped-char-error}</match>
</context>
<context id="externals" style-ref="external">
<keyword>import</keyword>
<keyword>package</keyword>
<keyword>extern</keyword>
<keyword>using</keyword>
</context>
<context id="preo-proc" style-ref="preprocessor">
<prefix>^\s*#\s*</prefix>
<keyword>if</keyword>
<keyword>else</keyword>
<keyword>elseif</keyword>
<keyword>end</keyword>
</context>
<context id="declarations" style-ref="declaration">
<keyword>class</keyword>
<keyword>enum</keyword>
<keyword>extends</keyword>
<keyword>function</keyword>
<keyword>implements</keyword>
<keyword>interface</keyword>
<keyword>typedef</keyword>
<keyword>var</keyword>
<keyword>macro</keyword>
</context>
<context id="primitive-types" style-ref="type">
<match>[A-Z][a-zA-Z0-9]*</match>
</context>
<context id="storage-class" style-ref="storage-class">
<keyword>static</keyword>
<keyword>inline</keyword>
<keyword>abstract</keyword>
</context>
<context id="scope" style-ref="scope">
<keyword>private</keyword>
<keyword>public</keyword>
<keyword>dynamic</keyword>
<keyword>override</keyword>
</context>
<context id="flow" style-ref="keyword">
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>cast</keyword>
<keyword>catch</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>return</keyword>
<keyword>switch</keyword>
<keyword>throw</keyword>
<keyword>try</keyword>
<keyword>untyped</keyword>
<keyword>while</keyword>
</context>
<context id="memory" style-ref="keyword">
<keyword>new</keyword>
<keyword>super</keyword>
<keyword>this</keyword>
</context>
<context id="string" style-ref="string">
<start>"</start>
<end>"</end>
<include>
<context ref="escaped-char" />
<context ref="escaped-char-error" />
</include>
</context>
<context id="string-2" style-ref="string">
<start>'</start>
<end>'</end>
<include>
<context ref="escaped-char" />
<context ref="escaped-char-error" />
</include>
</context>
<context id="numeric" style-ref="number">
<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="boolean" style-ref="boolean">
<keyword>false</keyword>
<keyword>true</keyword>
</context>
<context id="null-value" style-ref="null-value">
<keyword>null</keyword>
</context>
<context id="metadata" style-ref="metadata">
<match>@\w+</match>
</context>
<context id="macro" style-ref="macro">
<match>@:\w+</match>
</context>
<context id="identifier-prefix" style-ref="identifier-prefix">
<match>_hx_\w+</match>
</context>
<context id="haxe">
<include>
<context ref="line-comment" />
<context ref="block-comment" />
<context ref="close-comment-outside-comment" />
<context ref="externals" />
<context ref="preo-proc" />
<context ref="declarations" />
<context ref="primitive-types" />
<context ref="storage-class" />
<context ref="scope" />
<context ref="flow" />
<context ref="memory" />
<context ref="string" />
<context ref="string-2" />
<context ref="numeric" />
<context ref="boolean" />
<context ref="null-value" />
<context ref="metadata" />
<context ref="macro" />
<context ref="identifier-prefix" />
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,409 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2005-2007 - Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 - Emanuele Aina
Copyright (C) 2014 - Sébastien Wilmet <swilmet@gnome.org>
Copyright (C) 2018 - Jeffery To <jeffery.to@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="html" name="HTML" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">text/html</property>
<property name="globs">*.html;*.htm</property>
<property name="block-comment-start">&lt;!--</property>
<property name="block-comment-end">--&gt;</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="xml:comment"/>
<style id="tag" name="Tag" map-to="xml:element-name"/>
<style id="attrib-name" name="Attribute Name" map-to="xml:attribute-name"/>
<style id="attrib-value" name="Attribute Value" map-to="xml:attribute-value"/>
<style id="dtd" name="DTD" map-to="xml:doctype"/>
<style id="error" name="Error" map-to="xml:error"/>
<style id="title" name="Page title" map-to="def:heading0"/>
<style id="h1" name="Heading level 1" map-to="def:heading1"/>
<style id="h2" name="Heading level 2" map-to="def:heading2"/>
<style id="h3" name="Heading level 3" map-to="def:heading3"/>
<style id="h4" name="Heading level 4" map-to="def:heading4"/>
<style id="h5" name="Heading level 5" map-to="def:heading5"/>
<style id="h6" name="Heading level 6" map-to="def:heading6"/>
</styles>
<default-regex-options case-sensitive="false"/>
<definitions>
<!-- Html comments are more permissive than xml comments -->
<context id="comment" style-ref="comment" class="comment">
<start>&lt;!--</start>
<end>--&gt;</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="dtd" style-ref="dtd" class="no-spell-check">
<start>&lt;!</start>
<end>&gt;</end>
</context>
<!-- This is a placeholder context intended to be <replace>d
in languages like PHP that need to embed contexts inside
HTML tags and attributes.
-->
<context id="embedded-lang-hook">
<start>\%{def:never-match}</start>
<end></end>
</context>
<!-- Certain HTML tags (e.g. h1) require container contexts that
exclude highlighting from embedding languages. Languages can
replace this context when they need to highlight all content,
but not inside HTML tags and attributes.
-->
<context id="embedded-lang-hook-content">
<start>\%{def:never-match}</start>
<end></end>
</context>
<context id="heading-tag" once-only="true">
<start>\%{def:always-match}</start>
<end>&gt;</end>
<include>
<context sub-pattern="0" where="end" style-ref="tag"/>
<context ref="generic-tag"/>
</include>
</context>
<define-regex id="h1-close">&lt;/h1\s*&gt;</define-regex>
<define-regex id="h2-close">&lt;/h2\s*&gt;</define-regex>
<define-regex id="h3-close">&lt;/h3\s*&gt;</define-regex>
<define-regex id="h4-close">&lt;/h4\s*&gt;</define-regex>
<define-regex id="h5-close">&lt;/h5\s*&gt;</define-regex>
<define-regex id="h6-close">&lt;/h6\s*&gt;</define-regex>
<context id="headings">
<include>
<context id="title" class="no-spell-check">
<start>&lt;title\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context ref="generic-tag"/>
<context style-inside="true" style-ref="title" end-parent="true" class-disabled="no-spell-check">
<start>&gt;</start>
<end>&lt;/title\s*&gt;</end>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
<context ref="embedded-lang-hook"/>
<context ref="embedded-lang-hook-content"/>
</include>
</context>
</include>
</context>
<context id="h1" class="no-spell-check">
<start>&lt;h1\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context ref="heading-tag"/>
<context style-ref="h1" class-disabled="no-spell-check">
<start>(?!\%{h1-close})</start>
<include>
<context end-parent="true">
<match>(?=\%{h1-close})</match>
</context>
<context ref="embedded-lang-hook"/>
<context ref="embedded-lang-hook-content"/>
<context ref="tag"/>
</include>
</context>
<context style-ref="tag" end-parent="true">
<match>\%{h1-close}</match>
</context>
</include>
</context>
<context id="h2" class="no-spell-check">
<start>&lt;h2\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context ref="heading-tag"/>
<context style-ref="h2" class-disabled="no-spell-check">
<start>(?!\%{h2-close})</start>
<include>
<context end-parent="true">
<match>(?=\%{h2-close})</match>
</context>
<context ref="embedded-lang-hook"/>
<context ref="embedded-lang-hook-content"/>
<context ref="tag"/>
</include>
</context>
<context style-ref="tag" end-parent="true">
<match>\%{h2-close}</match>
</context>
</include>
</context>
<context id="h3" class="no-spell-check">
<start>&lt;h3\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context ref="heading-tag"/>
<context style-ref="h3" class-disabled="no-spell-check">
<start>(?!\%{h3-close})</start>
<include>
<context end-parent="true">
<match>(?=\%{h3-close})</match>
</context>
<context ref="embedded-lang-hook"/>
<context ref="embedded-lang-hook-content"/>
<context ref="tag"/>
</include>
</context>
<context style-ref="tag" end-parent="true">
<match>\%{h3-close}</match>
</context>
</include>
</context>
<context id="h4" class="no-spell-check">
<start>&lt;h4\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context ref="heading-tag"/>
<context style-ref="h4" class-disabled="no-spell-check">
<start>(?!\%{h4-close})</start>
<include>
<context end-parent="true">
<match>(?=\%{h4-close})</match>
</context>
<context ref="embedded-lang-hook"/>
<context ref="embedded-lang-hook-content"/>
<context ref="tag"/>
</include>
</context>
<context style-ref="tag" end-parent="true">
<match>\%{h4-close}</match>
</context>
</include>
</context>
<context id="h5" class="no-spell-check">
<start>&lt;h5\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context ref="heading-tag"/>
<context style-ref="h5" class-disabled="no-spell-check">
<start>(?!\%{h5-close})</start>
<include>
<context end-parent="true">
<match>(?=\%{h5-close})</match>
</context>
<context ref="embedded-lang-hook"/>
<context ref="embedded-lang-hook-content"/>
<context ref="tag"/>
</include>
</context>
<context style-ref="tag" end-parent="true">
<match>\%{h5-close}</match>
</context>
</include>
</context>
<context id="h6" class="no-spell-check">
<start>&lt;h6\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context ref="heading-tag"/>
<context style-ref="h6" class-disabled="no-spell-check">
<start>(?!\%{h6-close})</start>
<include>
<context end-parent="true">
<match>(?=\%{h6-close})</match>
</context>
<context ref="embedded-lang-hook"/>
<context ref="embedded-lang-hook-content"/>
<context ref="tag"/>
</include>
</context>
<context style-ref="tag" end-parent="true">
<match>\%{h6-close}</match>
</context>
</include>
</context>
</include>
</context>
<!-- See https://gitlab.gnome.org/GNOME/gtksourceview/commit/5385eb27720875bc144d54ccbd00d1613c41f7e0 -->
<define-regex id="attribute-name">[^\x00\t\n\f\r "'/&lt;=&gt;\x{007F}-\x{009F}\x{FDD0}-\x{FDEF}\x{FFFE}\x{FFFF}\x{1FFFE}\x{1FFFF}\x{2FFFE}\x{2FFFF}\x{3FFFE}\x{3FFFF}\x{4FFFE}\x{4FFFF}\x{5FFFE}\x{5FFFF}\x{6FFFE}\x{6FFFF}\x{7FFFE}\x{7FFFF}\x{8FFFE}\x{8FFFF}\x{9FFFE}\x{9FFFF}\x{AFFFE}\x{AFFFF}\x{BFFFE}\x{BFFFF}\x{CFFFE}\x{CFFFF}\x{DFFFE}\x{DFFFF}\x{EFFFE}\x{EFFFF}\x{FFFFE}\x{FFFFF}\x{10FFFE}\x{10FFFF}]+</define-regex>
<context id="generic-tag">
<include>
<!-- Attribute in the form: name="value" -->
<context id="attrib-quoted" class="no-spell-check">
<start>(\%{attribute-name}\s*=\s*)(\")</start>
<include>
<context sub-pattern="1" where="start" style-ref="attrib-name"/>
<context sub-pattern="2" where="start" style-ref="attrib-value"/>
<context id="string" end-parent="true" end-at-line-end="true" style-ref="attrib-value" class="string" class-disabled="no-spell-check">
<start>\%{def:always-match}</start>
<end>\"</end>
<include>
<context ref="xml:entity"/>
<context ref="xml:character-reference"/>
<context ref="embedded-lang-hook"/>
</include>
</context>
</include>
</context>
<!-- Attribute in the form: name=value -->
<context id="attrib-unquoted" style-ref="attrib-value" class="no-spell-check">
<start>\%{attribute-name}\s*=\s*</start>
<end>(?=&gt;|\s)</end>
<include>
<context sub-pattern="0" where="start" style-ref="attrib-name"/>
<context ref="xml:entity"/>
<context ref="xml:character-reference"/>
<context ref="embedded-lang-hook"/>
</include>
</context>
<!-- Attribute in the form: name -->
<context id="attrib-no-value" style-ref="attrib-name" class="no-spell-check">
<match>\%{attribute-name}</match>
</context>
<context ref="embedded-lang-hook"/>
</include>
</context>
<context id="style" class="no-spell-check">
<start>&lt;style\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context ref="generic-tag"/>
<context end-parent="true" style-ref="tag">
<match>/&gt;</match>
</context>
<context id="style-code" end-parent="true">
<start>&gt;</start>
<end>&lt;/style\s*&gt;</end>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
<context ref="css:css"/>
</include>
</context>
</include>
</context>
<context id="css-embedded-lang-hook">
<include>
<context end-parent="true">
<start>(?=&lt;/style(?:&gt;|\s|$))</start>
<end>\%{def:always-match}</end>
</context>
<context ref="embedded-lang-hook"/>
<context ref="css:embedded-lang-hook" original="true"/>
</include>
</context>
<replace id="css:embedded-lang-hook" ref="css-embedded-lang-hook"/>
<context id="script" class="no-spell-check">
<start>&lt;script\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context ref="generic-tag"/>
<context end-parent="true" style-ref="tag">
<match>/&gt;</match>
</context>
<context id="js-code" end-parent="true">
<start>&gt;</start>
<end>&lt;/script\s*&gt;</end>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
<context ref="js:js"/>
</include>
</context>
</include>
</context>
<context id="js-embedded-lang-hooks">
<include>
<context end-parent="true">
<start>(?=&lt;/script(?:&gt;|\s|$))</start>
<end>\%{def:always-match}</end>
</context>
<context ref="embedded-lang-hook"/>
<context ref="js:embedded-lang-hooks" original="true"/>
</include>
</context>
<replace id="js:embedded-lang-hooks" ref="js-embedded-lang-hooks"/>
<context id="tag" class="no-spell-check">
<!-- See https://gitlab.gnome.org/GNOME/gtksourceview/commit/5385eb27720875bc144d54ccbd00d1613c41f7e0 -->
<start>&lt;/?[a-z][^\x00\t\n\f\r /&gt;\x{007F}-\x{009F}\x{FDD0}-\x{FDEF}\x{FFFE}\x{FFFF}\x{1FFFE}\x{1FFFF}\x{2FFFE}\x{2FFFF}\x{3FFFE}\x{3FFFF}\x{4FFFE}\x{4FFFF}\x{5FFFE}\x{5FFFF}\x{6FFFE}\x{6FFFF}\x{7FFFE}\x{7FFFF}\x{8FFFE}\x{8FFFF}\x{9FFFE}\x{9FFFF}\x{AFFFE}\x{AFFFF}\x{BFFFE}\x{BFFFF}\x{CFFFE}\x{CFFFF}\x{DFFFE}\x{DFFFF}\x{EFFFE}\x{EFFFF}\x{FFFFE}\x{FFFFF}\x{10FFFE}\x{10FFFF}]*</start>
<end>/?&gt;</end>
<include>
<context sub-pattern="0" where="start" style-ref="tag"/>
<context sub-pattern="0" where="end" style-ref="tag"/>
<context ref="generic-tag"/>
</include>
</context>
<context id="html">
<include>
<context ref="xml:doctype"/>
<context ref="xml:entity"/>
<context ref="xml:character-reference"/>
<context ref="xml:cdata"/>
<context ref="comment"/>
<context ref="dtd"/>
<context ref="headings"/>
<context ref="style"/>
<context ref="script"/>
<context ref="tag"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,619 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Authors: Antoine Lucas 09-2009 <lucas@ipgp.fr>
Timothy Arceri 12-2012
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="idl-exelis" name="IDL/PV-WAVE/GDL" version="2.0" _section="Scientific">
<metadata>
<property name="globs">*.pro</property>
<property name="line-comment-start">;</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="string" name="String" map-to="def:string"/>
<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="function" name="Function" map-to="def:function"/>
</styles>
<default-regex-options case-sensitive="false"/>
<definitions>
<context id="line-comment" style-ref="comment" end-at-line-end="true">
<start>;</start>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="string-doublequote" style-ref="string" end-at-line-end="true">
<start>"</start>
<end>"</end>
<include>
<context ref="def:line-continue"/>
</include>
</context>
<context id="string-singlequote" style-ref="string" end-at-line-end="true">
<start>'</start>
<end>'</end>
<include>
<context ref="def:line-continue"/>
</include>
</context>
<context id="sectional" style-ref="preprocessor">
<start>%\(</start>
<end>%\)</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="operators" style-ref="keyword">
<keyword>NOT</keyword>
<keyword>AND</keyword>
<keyword>OR</keyword>
<keyword>XOR</keyword>
<keyword>EQV</keyword>
<keyword>NEQV</keyword>
<keyword>EQ</keyword>
<keyword>NE</keyword>
<keyword>GT</keyword>
<keyword>GE</keyword>
<keyword>LT</keyword>
<keyword>LE</keyword>
</context>
<context id="keyword" style-ref="keyword">
<keyword>begin</keyword>
<keyword>case</keyword>
<keyword>common</keyword>
<keyword>compile_opt</keyword>
<keyword>cycle</keyword>
<keyword>do</keyword>
<keyword>elseif</keyword>
<keyword>else</keyword>
<keyword>elsewhere</keyword>
<keyword>enddo</keyword>
<keyword>endif</keyword>
<keyword>end</keyword>
<keyword>endelse</keyword>
<keyword>endfor</keyword>
<keyword>endforeach</keyword>
<keyword>endcase</keyword>
<keyword>external</keyword>
<keyword>for</keyword>
<keyword>foreach</keyword>
<keyword>function</keyword>
<keyword>if</keyword>
<keyword>pro</keyword>
<keyword>return</keyword>
<keyword>SELECT</keyword>
<keyword>stop</keyword>
<keyword>then</keyword>
<keyword>type</keyword>
<keyword>use</keyword>
<keyword>while</keyword>
</context>
<context id="functions" style-ref="function">
<keyword>a_correlate</keyword>
<keyword>adapt_hist_equal</keyword>
<keyword>amoeba</keyword>
<keyword>annotate</keyword>
<keyword>array_indices</keyword>
<keyword>arrow</keyword>
<keyword>ascii_template</keyword>
<keyword>bar_plot</keyword>
<keyword>beta</keyword>
<keyword>bilinear</keyword>
<keyword>binary_template</keyword>
<keyword>bin_date</keyword>
<keyword>binomial</keyword>
<keyword>bisect_pdf</keyword>
<keyword>blk_con</keyword>
<keyword>box_cursor</keyword>
<keyword>butterworth</keyword>
<keyword>caldat</keyword>
<keyword>calendar</keyword>
<keyword>canny</keyword>
<keyword>c_correlate</keyword>
<keyword>cdf_exists</keyword>
<keyword>chebyshev</keyword>
<keyword>chisqr_cvf</keyword>
<keyword>chisqr_pdf</keyword>
<keyword>cir_3pnt</keyword>
<keyword>close</keyword>
<keyword>cluster</keyword>
<keyword>cluster_tree</keyword>
<keyword>clust_wts</keyword>
<keyword>cmyk_convert</keyword>
<keyword>color_exchange</keyword>
<keyword>colorize_sample</keyword>
<keyword>colormap_applicable</keyword>
<keyword>colormap_gradient</keyword>
<keyword>colormap_rotation</keyword>
<keyword>color_range_map</keyword>
<keyword>comfit</keyword>
<keyword>complexround</keyword>
<keyword>cond</keyword>
<keyword>congrid</keyword>
<keyword>coord2to3</keyword>
<keyword>correlate</keyword>
<keyword>cramer</keyword>
<keyword>create_view</keyword>
<keyword>crossp</keyword>
<keyword>crvlength</keyword>
<keyword>cti_test</keyword>
<keyword>ct_luminance</keyword>
<keyword>curvefit</keyword>
<keyword>cv_coord</keyword>
<keyword>cvttobm</keyword>
<keyword>cw_animate</keyword>
<keyword>cw_arcball</keyword>
<keyword>cw_bgroup</keyword>
<keyword>cw_clr_index</keyword>
<keyword>cw_colorsel</keyword>
<keyword>cw_defroi</keyword>
<keyword>cw_dice</keyword>
<keyword>cw_field</keyword>
<keyword>cw_filesel</keyword>
<keyword>cw_form</keyword>
<keyword>cw_fslider</keyword>
<keyword>cw_light_editor</keyword>
<keyword>cw_orient</keyword>
<keyword>cw_palette_editor</keyword>
<keyword>cw_pdmenu</keyword>
<keyword>cw_rgbslider</keyword>
<keyword>cw_tmpl</keyword>
<keyword>cw_treestructure</keyword>
<keyword>cw_zoom</keyword>
<keyword>define_msgblk_from_file</keyword>
<keyword>defroi</keyword>
<keyword>dendrogram</keyword>
<keyword>dendro_plot</keyword>
<keyword>deriv</keyword>
<keyword>derivsig</keyword>
<keyword>determ</keyword>
<keyword>device</keyword>
<keyword>dialog_message</keyword>
<keyword>dialog_read_image</keyword>
<keyword>dialog_write_image</keyword>
<keyword>digital_filter</keyword>
<keyword>dissolve</keyword>
<keyword>distance_measure</keyword>
<keyword>dist</keyword>
<keyword>dl_dos</keyword>
<keyword>dl_unix</keyword>
<keyword>doc_library</keyword>
<keyword>edge_dog</keyword>
<keyword>efont</keyword>
<keyword>eigenql</keyword>
<keyword>eigenvec</keyword>
<keyword>emboss</keyword>
<keyword>eos_exists</keyword>
<keyword>eos_gd_query</keyword>
<keyword>eos_pt_query</keyword>
<keyword>eos_query</keyword>
<keyword>eos_sw_query</keyword>
<keyword>erase</keyword>
<keyword>errplot</keyword>
<keyword>expand</keyword>
<keyword>extrac</keyword>
<keyword>extract_slice</keyword>
<keyword>factorial</keyword>
<keyword>f_cvf</keyword>
<keyword>filepath</keyword>
<keyword>file_basename</keyword>
<keyword>file_copy</keyword>
<keyword>file_lines</keyword>
<keyword>file_search</keyword>
<keyword>file_test</keyword>
<keyword>file_which</keyword>
<keyword>flick</keyword>
<keyword>flow3</keyword>
<keyword>free_lun</keyword>
<keyword>f_pdf</keyword>
<keyword>funct</keyword>
<keyword>fv_test</keyword>
<keyword>fx_root</keyword>
<keyword>gamma_ct</keyword>
<keyword>gamma</keyword>
<keyword>gauss2dfit</keyword>
<keyword>gauss_cvf</keyword>
<keyword>gaussfit</keyword>
<keyword>gauss_pdf</keyword>
<keyword>get_screen_size</keyword>
<keyword>goto</keyword>
<keyword>graphics_times2</keyword>
<keyword>graphics_times3</keyword>
<keyword>graphics_times</keyword>
<keyword>gs_iter</keyword>
<keyword>h5_browser</keyword>
<keyword>h5_create</keyword>
<keyword>h5_parse</keyword>
<keyword>h5t_enum_get_data</keyword>
<keyword>h5t_enum_set_data</keyword>
<keyword>h5t_enum_values_to_names</keyword>
<keyword>h5t_str_to_vlen</keyword>
<keyword>h5t_vlen_to_str</keyword>
<keyword>hanning</keyword>
<keyword>hdf_exists</keyword>
<keyword>h_eq_ct</keyword>
<keyword>h_eq_int</keyword>
<keyword>hilbert</keyword>
<keyword>hist_2d</keyword>
<keyword>hist_equal</keyword>
<keyword>hls</keyword>
<keyword>hsv</keyword>
<keyword>ibeta</keyword>
<keyword>identity</keyword>
<keyword>idl_crank</keyword>
<keyword>idlfflangcat__define</keyword>
<keyword>idlgrarc__define</keyword>
<keyword>idlgrcolorbar__define</keyword>
<keyword>idlgrlegend__define</keyword>
<keyword>idlgrshaderbytscl__define</keyword>
<keyword>idlgrshaderconvol3__define</keyword>
<keyword>idlgrtextedit__define</keyword>
<keyword>igamma</keyword>
<keyword>image_cont</keyword>
<keyword>import_ascii</keyword>
<keyword>import_binary</keyword>
<keyword>import_create_varname</keyword>
<keyword>import_hdf</keyword>
<keyword>import_image</keyword>
<keyword>insget</keyword>
<keyword>insput</keyword>
<keyword>insvis</keyword>
<keyword>int_2d</keyword>
<keyword>int_3d</keyword>
<keyword>interpol</keyword>
<keyword>int_tabulated_2d</keyword>
<keyword>int_tabulated</keyword>
<keyword>ir_filter</keyword>
<keyword>julday</keyword>
<keyword>krig2d</keyword>
<keyword>kurtosis</keyword>
<keyword>kw_test</keyword>
<keyword>label_date</keyword>
<keyword>la_determ</keyword>
<keyword>ladfit</keyword>
<keyword>laguerre</keyword>
<keyword>la_linear_equation</keyword>
<keyword>laplacian</keyword>
<keyword>leefilt</keyword>
<keyword>linfit</keyword>
<keyword>ll_arc_distance</keyword>
<keyword>lmfit</keyword>
<keyword>lmfunct</keyword>
<keyword>loadct</keyword>
<keyword>lu_complex</keyword>
<keyword>map_2points</keyword>
<keyword>map_continents</keyword>
<keyword>map_grid</keyword>
<keyword>map_horizon</keyword>
<keyword>map_image</keyword>
<keyword>map_patch</keyword>
<keyword>map_point_valid</keyword>
<keyword>map_proj_image</keyword>
<keyword>map_proj_info</keyword>
<keyword>map_proj_init_commonblock</keyword>
<keyword>map_proj_init_common</keyword>
<keyword>map_proj_init</keyword>
<keyword>map_satellite_limit</keyword>
<keyword>map_set</keyword>
<keyword>map_struct_append</keyword>
<keyword>matrix_power</keyword>
<keyword>m_correlate</keyword>
<keyword>md_test</keyword>
<keyword>meanabsdev</keyword>
<keyword>mean</keyword>
<keyword>mesh_obj</keyword>
<keyword>min_curve_surf</keyword>
<keyword>mk_html_help</keyword>
<keyword>modifyct</keyword>
<keyword>moment</keyword>
<keyword>morph_close</keyword>
<keyword>morph_gradient</keyword>
<keyword>morph_hitormiss</keyword>
<keyword>morph_open</keyword>
<keyword>morph_thin</keyword>
<keyword>morph_tophat</keyword>
<keyword>mpeg_close</keyword>
<keyword>mpeg_open</keyword>
<keyword>mpeg_put</keyword>
<keyword>mpeg_save</keyword>
<keyword>multi</keyword>
<keyword>ncdf_exists</keyword>
<keyword>noise_hurl</keyword>
<keyword>noise_pick</keyword>
<keyword>noise_scatter</keyword>
<keyword>noise_slur</keyword>
<keyword>norm</keyword>
<keyword>obj_new</keyword>
<keyword>online_help_pdf_index</keyword>
<keyword>online_help_pdf_nd2file</keyword>
<keyword>openr</keyword>
<keyword>openw</keyword>
<keyword>oploterr</keyword>
<keyword>parse_url</keyword>
<keyword>path_sep</keyword>
<keyword>pcomp</keyword>
<keyword>p_correlate</keyword>
<keyword>plot_3dbox</keyword>
<keyword>ploterr</keyword>
<keyword>plot_field</keyword>
<keyword>pm</keyword>
<keyword>pnt_line</keyword>
<keyword>polar_contour</keyword>
<keyword>polar_surface</keyword>
<keyword>poly_area</keyword>
<keyword>poly_fit</keyword>
<keyword>poly</keyword>
<keyword>polywarp</keyword>
<keyword>popd</keyword>
<keyword>pref_migrate</keyword>
<keyword>primes</keyword>
<keyword>print</keyword>
<keyword>printd</keyword>
<keyword>printf</keyword>
<keyword>profile</keyword>
<keyword>profiles</keyword>
<keyword>project_vol</keyword>
<keyword>psafm</keyword>
<keyword>pseudo</keyword>
<keyword>ps_show_fonts</keyword>
<keyword>ptr_free</keyword>
<keyword>ptr_new</keyword>
<keyword>ptr_valid</keyword>
<keyword>pushd</keyword>
<keyword>query_ascii</keyword>
<keyword>query_bmp</keyword>
<keyword>query_dicom</keyword>
<keyword>query_gif</keyword>
<keyword>query_image</keyword>
<keyword>query_jpeg2000</keyword>
<keyword>query_pict</keyword>
<keyword>query_ppm</keyword>
<keyword>query_srf</keyword>
<keyword>query_wav</keyword>
<keyword>ranks</keyword>
<keyword>rb_routines</keyword>
<keyword>r_correlate</keyword>
<keyword>rdpix</keyword>
<keyword>read_ascii</keyword>
<keyword>read_binary</keyword>
<keyword>read_bmp</keyword>
<keyword>read_dicom</keyword>
<keyword>readf</keyword>
<keyword>read_gif</keyword>
<keyword>read_image</keyword>
<keyword>read_interfile</keyword>
<keyword>read_jpeg2000</keyword>
<keyword>read_pict_item</keyword>
<keyword>read_pict</keyword>
<keyword>read_ppm_next_line</keyword>
<keyword>read_ppm_next_token</keyword>
<keyword>read_ppm</keyword>
<keyword>read_spr</keyword>
<keyword>read_srf</keyword>
<keyword>read_sylk</keyword>
<keyword>read_wave</keyword>
<keyword>read_wav</keyword>
<keyword>read_x11_bitmap</keyword>
<keyword>read_xwd</keyword>
<keyword>real_part</keyword>
<keyword>recon3</keyword>
<keyword>reduce_colors</keyword>
<keyword>region_grow</keyword>
<keyword>regress</keyword>
<keyword>replicate</keyword>
<keyword>resolve_all</keyword>
<keyword>restore</keyword>
<keyword>reverse</keyword>
<keyword>rm</keyword>
<keyword>round</keyword>
<keyword>rot</keyword>
<keyword>rs_test</keyword>
<keyword>r_test</keyword>
<keyword>save</keyword>
<keyword>savgol</keyword>
<keyword>scale3d</keyword>
<keyword>scale3</keyword>
<keyword>search2d</keyword>
<keyword>search3d</keyword>
<keyword>sfit</keyword>
<keyword>shade_surf_irr</keyword>
<keyword>shift_diff</keyword>
<keyword>show3</keyword>
<keyword>showfont</keyword>
<keyword>showinfo</keyword>
<keyword>skewness</keyword>
<keyword>slicer3</keyword>
<keyword>slide_image</keyword>
<keyword>sort</keyword>
<keyword>sph_4pnt</keyword>
<keyword>spher_harm</keyword>
<keyword>sph_scat</keyword>
<keyword>spline_p</keyword>
<keyword>spline</keyword>
<keyword>standardize</keyword>
<keyword>stddev</keyword>
<keyword>s_test</keyword>
<keyword>strarr</keyword>
<keyword>strcompress</keyword>
<keyword>streamline</keyword>
<keyword>stretch</keyword>
<keyword>string</keyword>
<keyword>strjoin</keyword>
<keyword>strlen</keyword>
<keyword>strlowcase</keyword>
<keyword>strmatch</keyword>
<keyword>strmid</keyword>
<keyword>strpos</keyword>
<keyword>strsplit</keyword>
<keyword>strtrim</keyword>
<keyword>strupcase</keyword>
<keyword>surfr</keyword>
<keyword>svdfit</keyword>
<keyword>svdfunct</keyword>
<keyword>svdleg</keyword>
<keyword>swap_endian_inplace</keyword>
<keyword>swap_endian</keyword>
<keyword>systime</keyword>
<keyword>t3d</keyword>
<keyword>t_cvf</keyword>
<keyword>tek_color</keyword>
<keyword>testdemo</keyword>
<keyword>test_hp</keyword>
<keyword>test_lj</keyword>
<keyword>test_pcl</keyword>
<keyword>test_true</keyword>
<keyword>threed</keyword>
<keyword>timegen</keyword>
<keyword>time_test2</keyword>
<keyword>time_test3</keyword>
<keyword>time_test</keyword>
<keyword>time_thread</keyword>
<keyword>tm_test</keyword>
<keyword>t_pdf</keyword>
<keyword>trace</keyword>
<keyword>trackball__define</keyword>
<keyword>transpose</keyword>
<keyword>tri_surf</keyword>
<keyword>ts_coef</keyword>
<keyword>ts_diff</keyword>
<keyword>ts_fcast</keyword>
<keyword>ts_smooth</keyword>
<keyword>tvlct</keyword>
<keyword>tvrd</keyword>
<keyword>uniq</keyword>
<keyword>unsharp_mask</keyword>
<keyword>variance</keyword>
<keyword>vector_field</keyword>
<keyword>velovect</keyword>
<keyword>vel</keyword>
<keyword>vert_t3d</keyword>
<keyword>voronoi</keyword>
<keyword>warp_tri</keyword>
<keyword>wdelete</keyword>
<keyword>wf_draw</keyword>
<keyword>where</keyword>
<keyword>widget_base</keyword>
<keyword>widget_button</keyword>
<keyword>widget_control</keyword>
<keyword>widget_info</keyword>
<keyword>widget_text</keyword>
<keyword>widget_tree_move</keyword>
<keyword>window</keyword>
<keyword>write_bmp</keyword>
<keyword>write_gif</keyword>
<keyword>write_image</keyword>
<keyword>write_jpeg2000</keyword>
<keyword>write_nrif</keyword>
<keyword>write_pict</keyword>
<keyword>write_ppm</keyword>
<keyword>write_spr</keyword>
<keyword>write_srf</keyword>
<keyword>write_sylk</keyword>
<keyword>write_wave</keyword>
<keyword>write_wav</keyword>
<keyword>xmanager</keyword>
<keyword>xmng_tmpl</keyword>
<keyword>xregistered</keyword>
<keyword>xsq_test</keyword>
<keyword>xyouts</keyword>
<keyword>zoom_24</keyword>
<keyword>zoom</keyword>
</context>
<context id="include-pragma" style-ref="preprocessor" end-at-line-end="true">
<start>^#[ \t]*(include|pragma)</start>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="function" style-ref="function">
<keyword>add</keyword>
<keyword>draw</keyword>
<keyword>interpolate</keyword>
<keyword>min</keyword>
<keyword>max</keyword>
<keyword>mean</keyword>
<keyword>n_elements</keyword>
<keyword>obj_destroy</keyword>
<keyword>reform</keyword>
<keyword>rotate</keyword>
<keyword>size</keyword>
<keyword>Xobjview</keyword>
</context>
<context id="types" style-ref="type">
<keyword>float</keyword>
<keyword>fltarr</keyword>
<keyword>UINT</keyword>
<keyword>long</keyword>
<keyword>fix</keyword>
<keyword>lonarr</keyword>
</context>
<context id="float" style-ref="floating-point">
<match extended="true">
(?&lt;![\w\.])
([0-9_]+[Ee][-]?[0-9_]+|([0-9_]*\.[0-9_]+|[0-9_]+\.)([Ee][-]?[0-9_]+)?)[fFLi]?
(?![\w\.])
</match>
</context>
<context id="decimal" style-ref="decimal">
<match extended="true">
(?&lt;![\w\.])
([1-9][0-9_]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
(?![\w\.])
</match>
</context>
<context id="idl-exelis">
<include>
<context ref="operators"/>
<context ref="line-comment"/>
<context ref="sectional"/>
<context ref="string-singlequote"/>
<context ref="string-doublequote"/>
<context ref="include-pragma"/>
<context ref="keyword"/>
<context ref="types"/>
<context ref="float"/>
<context ref="functions"/>
<context ref="function"/>
<context ref="decimal"/>
<context ref="types"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Paolo Maggi <paolo@gnome.org>
Copyright (C) 2005 Paolo Maggi <paolo@gnome.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="idl" name="IDL" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-idl</property>
<property name="globs">*.idl</property>
<property name="line-comment-start">//</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="string" name="String" map-to="def:string"/>
</styles>
<definitions>
<context id="block-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>//</start>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="sectional" style-ref="preprocessor">
<start>%\{</start>
<end>%\}</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="include-pragma" style-ref="preprocessor" end-at-line-end="true">
<start>^#[ \t]*(include|pragma)</start>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="keywords" style-ref="keyword">
<keyword>abstract</keyword>
<keyword>attribute</keyword>
<keyword>case</keyword>
<keyword>const</keyword>
<keyword>context</keyword>
<keyword>custom</keyword>
<keyword>default</keyword>
<keyword>exception</keyword>
<keyword>enum</keyword>
<keyword>factory</keyword>
<keyword>FALSE</keyword>
<keyword>in</keyword>
<keyword>inout</keyword>
<keyword>interface</keyword>
<keyword>local</keyword>
<keyword>module</keyword>
<keyword>native</keyword>
<keyword>oneway</keyword>
<keyword>out</keyword>
<keyword>private</keyword>
<keyword>public</keyword>
<keyword>raises</keyword>
<keyword>readonly</keyword>
<keyword>struct</keyword>
<keyword>support</keyword>
<keyword>switch</keyword>
<keyword>TRUE</keyword>
<keyword>truncatable</keyword>
<keyword>typedef</keyword>
<keyword>union</keyword>
<keyword>valuetype</keyword>
</context>
<context id="types" style-ref="type">
<keyword>any</keyword>
<keyword>boolean</keyword>
<keyword>char</keyword>
<keyword>double</keyword>
<keyword>fixed</keyword>
<keyword>float</keyword>
<keyword>long</keyword>
<keyword>Object</keyword>
<keyword>octet</keyword>
<keyword>sequence</keyword>
<keyword>short</keyword>
<keyword>string</keyword>
<keyword>unsigned</keyword>
<keyword>ValueBase</keyword>
<keyword>void</keyword>
<keyword>wchar</keyword>
<keyword>wstring</keyword>
</context>
<context id="preprocessor-definitions" style-ref="preprocessor">
<prefix>^[ \t]*#[ \t]*</prefix>
<keyword>if</keyword>
<keyword>ifdef</keyword>
<keyword>ifndef</keyword>
<keyword>else</keyword>
<keyword>elif</keyword>
<keyword>define</keyword>
<keyword>endif</keyword>
<keyword>undef</keyword>
</context>
<context id="idl" class="no-spell-check">
<include>
<context ref="block-comment"/>
<context ref="line-comment"/>
<context ref="sectional"/>
<context ref="string"/>
<context ref="include-pragma"/>
<context ref="keywords"/>
<context ref="types"/>
<context ref="preprocessor-definitions"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,783 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Carnë Draug
Copyright (C) 2011 Carnë Draug <carandraug+dev@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="imagej" name="ImageJ" version="2.0" _section="Scientific">
<metadata>
<property name="globs">*.ijm</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<style id="builtin" name="Builtin" map-to="def:builtin"/>
<style id="boolean" name="Boolean" map-to="def:boolean"/>
<style id="command" name="Commands" map-to="def:function"/>
<style id="storage-type" name="Storage Type" map-to="def:type"/>
<style id="escape" name="Escaped Character" map-to="def:special-char"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="string" name="String" map-to="def:string"/>
</styles>
<definitions>
<!--There is no printf and no line continue, hence the reason not to use the
string rules in the defaults
-->
<context id="double-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="c:escaped-character"/>
<context ref="command"/>
</include>
</context>
<context id="single-quoted-string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>'</start>
<end>'</end>
<include>
<context ref="c:escaped-character"/>
<context ref="command"/>
</include>
</context>
<context id="operator" style-ref="operator">
<match extended="true">
\+{1,2}?(?!\+) | # arithmetic operators
\-{1,2}?(?!\-) | # already counting
\*(?!\*) | # with auto increment,
\/(?!\/) | #
\%(?!\%) | # remainder
\^(?!\^) | # and exp
&lt;=? | &gt;=? | != | == | &lt;&gt; | # comparison operators
&amp;{1,2}?(?!&amp;) | \|{1,2}?(?!\|) | ! | ~ | # boolean operators
= | # assignment operator
</match>
</context>
<context id="storage-type" style-ref="storage-type">
<keyword>var</keyword>
</context>
<context id="boolean" style-ref="boolean">
<keyword>false</keyword>
<keyword>true</keyword>
</context>
<!--
TODO Think about keyboard shortcuts, just one character, between square
brackets, at the end of the macro name string. Can be two characters for
fX and nX for f keys and numeric pad
-->
<context id="keyword" style-ref="keyword">
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>for</keyword>
<keyword>function</keyword>
<keyword>if</keyword>
<keyword>macro</keyword>
<keyword>return</keyword>
<keyword>while</keyword>
</context>
<!--
TODO Get prefix to allow spaces. run(\s)*\((\s)*" doesn't work because
look-behind operator doesn't support variable length
-->
<context id="command" style-ref="command">
<prefix>(?&lt;=run\(("|'))</prefix>
<suffix>(?="|')</suffix>
<keyword>16-bit</keyword>
<keyword>3-3-2 RGB</keyword>
<keyword>32-bit</keyword>
<keyword>3D Project\.\.\.</keyword>
<keyword>8-bit</keyword>
<keyword>8-bit Color</keyword>
<keyword>AND\.\.\.</keyword>
<keyword>AVI\.\.\.</keyword>
<keyword>AVI\.\.\. </keyword>
<keyword>About ImageJ\.\.\.</keyword>
<keyword>About This Submenu\.\.\.</keyword>
<keyword>Abs</keyword>
<keyword>Add Image\.\.\.</keyword>
<keyword>Add Noise</keyword>
<keyword>Add Selection\.\.\.</keyword>
<keyword>Add Slice</keyword>
<keyword>Add Specified Noise\.\.\.</keyword>
<keyword>Add to Manager </keyword>
<keyword>Add\.\.\.</keyword>
<keyword>Analyze Line Graph</keyword>
<keyword>Analyze Particles\.\.\.</keyword>
<keyword>Animation Options\.\.\.</keyword>
<keyword>Appearance\.\.\.</keyword>
<keyword>Apply LUT</keyword>
<keyword>Arrow Tool\.\.\.</keyword>
<keyword>AuPbSn 40 \(56K\)</keyword>
<keyword>BMP\.\.\.</keyword>
<keyword>Bandpass Filter\.\.\.</keyword>
<keyword>Bat Cochlea Renderings \(449K\)</keyword>
<keyword>Bat Cochlea Volume \(19K\)</keyword>
<keyword>Benchmark</keyword>
<keyword>Blobs \(25K\)</keyword>
<keyword>Blue</keyword>
<keyword>Boats \(356K\)</keyword>
<keyword>Bridge \(174K\)</keyword>
<keyword>Brightness/Contrast\.\.\.</keyword>
<keyword>CT \(420K, 16-bit DICOM\)</keyword>
<keyword>Calibrate\.\.\.</keyword>
<keyword>Calibration Bar\.\.\.</keyword>
<keyword>Canvas Size\.\.\.</keyword>
<keyword>Capture Image</keyword>
<keyword>Capture Screen </keyword>
<keyword>Cardio \(768K, RGB DICOM\)</keyword>
<keyword>Cascade</keyword>
<keyword>Cell Colony \(31K\)</keyword>
<keyword>Channels Tool\.\.\.</keyword>
<keyword>Channels Tool\.\.\. </keyword>
<keyword>Clear</keyword>
<keyword>Clear Outside</keyword>
<keyword>Clear Results</keyword>
<keyword>Close</keyword>
<keyword>Close All</keyword>
<keyword>Close-</keyword>
<keyword>Clown \(14K\)</keyword>
<keyword>Color Balance\.\.\.</keyword>
<keyword>Color Picker\.\.\.</keyword>
<keyword>Color Threshold\.\.\.</keyword>
<keyword>Colors\.\.\.</keyword>
<keyword>Combine\.\.\.</keyword>
<keyword>Compile and Run\.\.\.</keyword>
<keyword>Compiler\.\.\.</keyword>
<keyword>Concatenate\.\.\.</keyword>
<keyword>Confocal Series \(2\.2MB\)</keyword>
<keyword>Control Panel\.\.\.</keyword>
<keyword>Conversions\.\.\.</keyword>
<keyword>Convert to Mask</keyword>
<keyword>Convert\.\.\.</keyword>
<keyword>Convex Hull</keyword>
<keyword>Convolve\.\.\.</keyword>
<keyword>Copy</keyword>
<keyword>Copy to System</keyword>
<keyword>Create Mask</keyword>
<keyword>Create Selection</keyword>
<keyword>Create Shortcut\.\.\. </keyword>
<keyword>Crop</keyword>
<keyword>Curve Fitting\.\.\.</keyword>
<keyword>Custom Filter\.\.\.</keyword>
<keyword>Cut</keyword>
<keyword>Cyan</keyword>
<keyword>DICOM\.\.\.</keyword>
<keyword>Delete Slice</keyword>
<keyword>Despeckle</keyword>
<keyword>Dev\. Resources\.\.\.</keyword>
<keyword>Dilate</keyword>
<keyword>Distance Map</keyword>
<keyword>Distribution\.\.\.</keyword>
<keyword>Divide\.\.\.</keyword>
<keyword>Documentation\.\.\.</keyword>
<keyword>Dot Blot \(7K\)</keyword>
<keyword>Draw</keyword>
<keyword>Duplicate\.\.\.</keyword>
<keyword>East</keyword>
<keyword>Edit LUT\.\.\.</keyword>
<keyword>Edit\.\.\.</keyword>
<keyword>Embryos \(42K\)</keyword>
<keyword>Enhance Contrast</keyword>
<keyword>Enlarge\.\.\.</keyword>
<keyword>Erode</keyword>
<keyword>Exp</keyword>
<keyword>FD Math\.\.\.</keyword>
<keyword>FFT</keyword>
<keyword>FFT Options\.\.\.</keyword>
<keyword>FITS\.\.\.</keyword>
<keyword>Fill</keyword>
<keyword>Fill Holes</keyword>
<keyword>Find Commands\.\.\. </keyword>
<keyword>Find Edges</keyword>
<keyword>Find Maxima\.\.\.</keyword>
<keyword>Fire</keyword>
<keyword>Fit Ellipse</keyword>
<keyword>Fit Spline</keyword>
<keyword>Flatten</keyword>
<keyword>Flip Horizontally</keyword>
<keyword>Flip Vertically</keyword>
<keyword>Flip Z</keyword>
<keyword>Flood Fill Tool Options\.\.\.</keyword>
<keyword>Fluorescent Cells \(400K\)</keyword>
<keyword>Fly Brain \(1MB\)</keyword>
<keyword>Fonts\.\.\.</keyword>
<keyword>Fractal Box Count\.\.\.</keyword>
<keyword>From ROI Manager</keyword>
<keyword>Gamma\.\.\.</keyword>
<keyword>Gaussian Blur\.\.\.</keyword>
<keyword>Gel \(105K\)</keyword>
<keyword>Gel Analyzer Options\.\.\.</keyword>
<keyword>Gif\.\.\.</keyword>
<keyword>Grays</keyword>
<keyword>Green</keyword>
<keyword>HSB Stack</keyword>
<keyword>HeLa Cells \(1\.3M, 48-bit RGB\)</keyword>
<keyword>Hide Overlay</keyword>
<keyword>Histogram</keyword>
<keyword>Hyperstack to Stack</keyword>
<keyword>Hyperstack\.\.\.</keyword>
<keyword>Ice</keyword>
<keyword>Image Calculator\.\.\.</keyword>
<keyword>Image Sequence\.\.\.</keyword>
<keyword>Image Sequence\.\.\. </keyword>
<keyword>Image\.\.\.</keyword>
<keyword>ImageJ News\.\.\.</keyword>
<keyword>ImageJ Properties\.\.\.</keyword>
<keyword>ImageJ Website\.\.\.</keyword>
<keyword>Images to Stack</keyword>
<keyword>In</keyword>
<keyword>Input/Output\.\.\.</keyword>
<keyword>Insert\.\.\.</keyword>
<keyword>Install Plugin\.\.\.</keyword>
<keyword>Install\.\.\.</keyword>
<keyword>Installation\.\.\.</keyword>
<keyword>Internal Clipboard</keyword>
<keyword>Inverse FFT</keyword>
<keyword>Invert</keyword>
<keyword>Invert LUT</keyword>
<keyword>JavaScript</keyword>
<keyword>Jpeg\.\.\.</keyword>
<keyword>LUT\.\.\.</keyword>
<keyword>LUT\.\.\. </keyword>
<keyword>Label</keyword>
<keyword>Label Peaks</keyword>
<keyword>Label\.\.\.</keyword>
<keyword>Leaf \(36K\)</keyword>
<keyword>Lena \(68K\)</keyword>
<keyword>Line Graph \(21K\)</keyword>
<keyword>Line Width\.\.\.</keyword>
<keyword>Line Width\.\.\. </keyword>
<keyword>List Archives\.\.\.</keyword>
<keyword>List Shortcuts\.\.\.</keyword>
<keyword>Log</keyword>
<keyword>M51 Galaxy \(177K, 16-bits\)</keyword>
<keyword>MRI Stack \(528K\)</keyword>
<keyword>Macro</keyword>
<keyword>Macro Functions\.\.\.</keyword>
<keyword>Macro\.\.\.</keyword>
<keyword>Macro\.\.\. </keyword>
<keyword>Macros\.\.\.</keyword>
<keyword>Magenta</keyword>
<keyword>Make Band\.\.\.</keyword>
<keyword>Make Binary</keyword>
<keyword>Make Composite</keyword>
<keyword>Make Inverse</keyword>
<keyword>Make Montage\.\.\.</keyword>
<keyword>Max\.\.\.</keyword>
<keyword>Maximum\.\.\.</keyword>
<keyword>Mean\.\.\.</keyword>
<keyword>Measure</keyword>
<keyword>Measure\.\.\.</keyword>
<keyword>Median\.\.\.</keyword>
<keyword>Memory &amp; Threads\.\.\.</keyword>
<keyword>Merge Channels\.\.\.</keyword>
<keyword>Min\.\.\.</keyword>
<keyword>Minimum\.\.\.</keyword>
<keyword>Misc\.\.\.</keyword>
<keyword>Mitosis \(26MB, 5D stack\)</keyword>
<keyword>Monitor Memory\.\.\.</keyword>
<keyword>Montage to Stack\.\.\.</keyword>
<keyword>Multiply\.\.\.</keyword>
<keyword>NaN Background</keyword>
<keyword>Neuron \(1\.6M, 5 channels\)</keyword>
<keyword>New Hyperstack\.\.\.</keyword>
<keyword>Next Slice \[&gt;\]</keyword>
<keyword>Nile Bend \(1\.9M\)</keyword>
<keyword>North</keyword>
<keyword>Northeast</keyword>
<keyword>Northwest</keyword>
<keyword>OR\.\.\.</keyword>
<keyword>Open</keyword>
<keyword>Open Next</keyword>
<keyword>Open\.\.\.</keyword>
<keyword>Options\.\.\.</keyword>
<keyword>Organ of Corti \(2\.8M, 4D stack\)</keyword>
<keyword>Original Scale</keyword>
<keyword>Orthogonal Views</keyword>
<keyword>Out</keyword>
<keyword>Outline</keyword>
<keyword>PGM\.\.\.</keyword>
<keyword>PNG\.\.\.</keyword>
<keyword>Page Setup\.\.\.</keyword>
<keyword>Paintbrush Tool Options\.\.\.</keyword>
<keyword>Particles \(75K\)</keyword>
<keyword>Paste</keyword>
<keyword>Paste Control\.\.\.</keyword>
<keyword>Pencil Tool Options\.\.\.</keyword>
<keyword>Plot Lanes</keyword>
<keyword>Plot Profile</keyword>
<keyword>Plot Z-axis Profile</keyword>
<keyword>Plugin</keyword>
<keyword>Plugin Filter</keyword>
<keyword>Plugin Frame</keyword>
<keyword>Plugins\.\.\.</keyword>
<keyword>Point Tool\.\.\.</keyword>
<keyword>Previous Slice \[&lt;\]</keyword>
<keyword>Print\.\.\.</keyword>
<keyword>Profile Plot Options\.\.\.</keyword>
<keyword>Properties\.\.\.</keyword>
<keyword>Properties\.\.\. </keyword>
<keyword>Proxy Settings\.\.\.</keyword>
<keyword>Put Behind \[tab]</keyword>
<keyword>Quit</keyword>
<keyword>RGB Color</keyword>
<keyword>RGB Stack</keyword>
<keyword>ROI Manager\.\.\.</keyword>
<keyword>Raw Data\.\.\.</keyword>
<keyword>Raw\.\.\.</keyword>
<keyword>Re-plot Lanes</keyword>
<keyword>Reciprocal</keyword>
<keyword>Record\.\.\.</keyword>
<keyword>Red</keyword>
<keyword>Red/Green</keyword>
<keyword>Redisplay Power Spectrum</keyword>
<keyword>Reduce Dimensionality\.\.\.</keyword>
<keyword>Reduce\.\.\.</keyword>
<keyword>Refresh Menus</keyword>
<keyword>Remove Outliers\.\.\.</keyword>
<keyword>Remove Overlay</keyword>
<keyword>Remove\.\.\.</keyword>
<keyword>Rename\.\.\.</keyword>
<keyword>Repeat Command</keyword>
<keyword>Reset</keyword>
<keyword>Reset\.\.\.</keyword>
<keyword>Reslice \[/\]\.\.\.</keyword>
<keyword>Restore Selection</keyword>
<keyword>Results\.\.\.</keyword>
<keyword>Results\.\.\. </keyword>
<keyword>Reverse</keyword>
<keyword>Revert</keyword>
<keyword>Rotate 90 Degrees Left</keyword>
<keyword>Rotate 90 Degrees Right</keyword>
<keyword>Rotate\.\.\.</keyword>
<keyword>Rotate\.\.\. </keyword>
<keyword>Run\.\.\.</keyword>
<keyword>Salt and Pepper</keyword>
<keyword>Save</keyword>
<keyword>Save XY Coordinates\.\.\.</keyword>
<keyword>Scale Bar\.\.\.</keyword>
<keyword>Scale\.\.\.</keyword>
<keyword>Search Website\.\.\.</keyword>
<keyword>Search\.\.\.</keyword>
<keyword>Select All</keyword>
<keyword>Select First Lane</keyword>
<keyword>Select Next Lane</keyword>
<keyword>Select None</keyword>
<keyword>Selection\.\.\.</keyword>
<keyword>Set Measurements\.\.\.</keyword>
<keyword>Set Scale\.\.\.</keyword>
<keyword>Set Slice\.\.\.</keyword>
<keyword>Set\.\.\.</keyword>
<keyword>Set\.\.\. </keyword>
<keyword>Shadows Demo</keyword>
<keyword>Sharpen</keyword>
<keyword>Show All</keyword>
<keyword>Show Circular Masks\.\.\.</keyword>
<keyword>Show Info\.\.\.</keyword>
<keyword>Show LUT</keyword>
<keyword>Show Overlay</keyword>
<keyword>Size\.\.\.</keyword>
<keyword>Skeletonize</keyword>
<keyword>Smooth</keyword>
<keyword>South</keyword>
<keyword>Southeast</keyword>
<keyword>Southwest</keyword>
<keyword>Specify\.\.\.</keyword>
<keyword>Spectrum</keyword>
<keyword>Split Channels</keyword>
<keyword>Square</keyword>
<keyword>Square Root</keyword>
<keyword>Stack From List\.\.\.</keyword>
<keyword>Stack to Hyperstack\.\.\.</keyword>
<keyword>Stack to Images</keyword>
<keyword>Stack to RGB</keyword>
<keyword>Start Animation \[\\\]</keyword>
<keyword>Startup Macros\.\.\.</keyword>
<keyword>Stop Animation</keyword>
<keyword>Straighten\.\.\.</keyword>
<keyword>Subtract Background\.\.\.</keyword>
<keyword>Subtract\.\.\.</keyword>
<keyword>Summarize</keyword>
<keyword>Surface Plot\.\.\.</keyword>
<keyword>Swap Quadrants</keyword>
<keyword>System Clipboard</keyword>
<keyword>T1 Head \(2\.4M, 16-bits\)</keyword>
<keyword>T1 Head Renderings \(736K\)</keyword>
<keyword>TEM Filter \(112K\)</keyword>
<keyword>TIFF Virtual Stack\.\.\.</keyword>
<keyword>Table\.\.\.</keyword>
<keyword>Text File\.\.\. </keyword>
<keyword>Text Image\.\.\.</keyword>
<keyword>Text Image\.\.\. </keyword>
<keyword>Text Window</keyword>
<keyword>Text Window\.\.\.</keyword>
<keyword>Text\.\.\.</keyword>
<keyword>Threads\.\.\.</keyword>
<keyword>Threshold\.\.\.</keyword>
<keyword>Tiff\.\.\.</keyword>
<keyword>Tile</keyword>
<keyword>To ROI Manager</keyword>
<keyword>To Selection</keyword>
<keyword>Translate\.\.\.</keyword>
<keyword>Tree Rings \(48K\)</keyword>
<keyword>URL\.\.\.</keyword>
<keyword>Ultimate Points</keyword>
<keyword>Undo</keyword>
<keyword>Unsharp Mask\.\.\.</keyword>
<keyword>Update ImageJ\.\.\.</keyword>
<keyword>Variance\.\.\.</keyword>
<keyword>View 100%</keyword>
<keyword>Virtual Stack\.\.\.</keyword>
<keyword>Voronoi</keyword>
<keyword>Wand Tool\.\.\.</keyword>
<keyword>Watershed</keyword>
<keyword>West</keyword>
<keyword>Window/Level\.\.\.</keyword>
<keyword>XOR\.\.\.</keyword>
<keyword>XY Coordinates\.\.\.</keyword>
<keyword>Yellow</keyword>
<keyword>Z Project\.\.\.</keyword>
<keyword>ZIP\.\.\.</keyword>
</context>
<context id="builtin" style-ref="builtin">
<keyword>Array\.copy</keyword>
<keyword>Array\.fill</keyword>
<keyword>Array\.getStatistics</keyword>
<keyword>Array\.invert</keyword>
<keyword>Array\.sort</keyword>
<keyword>Array\.trim</keyword>
<keyword>Dialog\.addCheckbox</keyword>
<keyword>Dialog\.addCheckboxGroup</keyword>
<keyword>Dialog\.addChoice</keyword>
<keyword>Dialog\.addHelp</keyword>
<keyword>Dialog\.addMessage</keyword>
<keyword>Dialog\.addNumber</keyword>
<keyword>Dialog\.addString</keyword>
<keyword>Dialog\.create</keyword>
<keyword>Dialog\.getCheckbox</keyword>
<keyword>Dialog\.getChoice</keyword>
<keyword>Dialog\.getNumber</keyword>
<keyword>Dialog\.getString</keyword>
<keyword>Dialog\.show</keyword>
<keyword>Ext\.(?=[a-zA-Z0-9])</keyword>
<keyword>File\.append</keyword>
<keyword>File\.close</keyword>
<keyword>File\.dateLastModified</keyword>
<keyword>File\.delete</keyword>
<keyword>File\.directory</keyword>
<keyword>File\.exists</keyword>
<keyword>File\.getName</keyword>
<keyword>File\.getParent</keyword>
<keyword>File\.isDirectory</keyword>
<keyword>File\.lastModified</keyword>
<keyword>File\.length</keyword>
<keyword>File\.makeDirectory</keyword>
<keyword>File\.name</keyword>
<keyword>File\.nameWithoutExtension</keyword>
<keyword>File\.open</keyword>
<keyword>File\.openAsRawString</keyword>
<keyword>File\.openAsString</keyword>
<keyword>File\.openDialog</keyword>
<keyword>File\.openUrlAsString</keyword>
<keyword>File\.rename</keyword>
<keyword>File\.saveString</keyword>
<keyword>File\.separator</keyword>
<keyword>Fit\.doFit</keyword>
<keyword>Fit\.f</keyword>
<keyword>Fit\.getEquation</keyword>
<keyword>Fit\.logResults</keyword>
<keyword>Fit\.nEquations</keyword>
<keyword>Fit\.nParams</keyword>
<keyword>Fit\.p</keyword>
<keyword>Fit\.plot</keyword>
<keyword>Fit\.rSquared</keyword>
<keyword>Fit\.showDialog</keyword>
<keyword>IJ\.currentMemory</keyword>
<keyword>IJ\.deleteRows</keyword>
<keyword>IJ\.freeMemory</keyword>
<keyword>IJ\.getToolName</keyword>
<keyword>IJ\.maxMemory</keyword>
<keyword>IJ\.redirectErrorMessages</keyword>
<keyword>List\.clear</keyword>
<keyword>List\.get</keyword>
<keyword>List\.getList</keyword>
<keyword>List\.getValue</keyword>
<keyword>List\.set</keyword>
<keyword>List\.setCommands</keyword>
<keyword>List\.setList</keyword>
<keyword>List\.size</keyword>
<keyword>Overlay\.add</keyword>
<keyword>Overlay\.drawEllipse</keyword>
<keyword>Overlay\.drawLine</keyword>
<keyword>Overlay\.drawRect</keyword>
<keyword>Overlay\.drawString</keyword>
<keyword>Overlay\.hide</keyword>
<keyword>Overlay\.lineTo</keyword>
<keyword>Overlay\.moveTo</keyword>
<keyword>Overlay\.remove</keyword>
<keyword>Overlay\.removeSelection</keyword>
<keyword>Overlay\.show</keyword>
<keyword>Overlay\.size</keyword>
<keyword>PI</keyword>
<keyword>Plot\.add</keyword>
<keyword>Plot\.addText</keyword>
<keyword>Plot\.create</keyword>
<keyword>Plot\.drawLine</keyword>
<keyword>Plot\.getValues</keyword>
<keyword>Plot\.setColor</keyword>
<keyword>Plot\.setJustification</keyword>
<keyword>Plot\.setLimits</keyword>
<keyword>Plot\.setLineWidth</keyword>
<keyword>Plot\.show</keyword>
<keyword>Plot\.update</keyword>
<keyword>Stack\.getActiveChannels</keyword>
<keyword>Stack\.getDimensions</keyword>
<keyword>Stack\.getDisplayMode</keyword>
<keyword>Stack\.getFrameRate</keyword>
<keyword>Stack\.getPosition</keyword>
<keyword>Stack\.getStatistics</keyword>
<keyword>Stack\.isHyperstack</keyword>
<keyword>Stack\.setActiveChannels</keyword>
<keyword>Stack\.setChannel</keyword>
<keyword>Stack\.setDimensions</keyword>
<keyword>Stack\.setDisplayMode</keyword>
<keyword>Stack\.setFrame</keyword>
<keyword>Stack\.setFrameRate</keyword>
<keyword>Stack\.setPosition</keyword>
<keyword>Stack\.setSlice</keyword>
<keyword>Stack\.setTUnit</keyword>
<keyword>Stack\.setZUnit</keyword>
<keyword>Stack\.swap</keyword>
<keyword>String\.append</keyword>
<keyword>String\.buffer</keyword>
<keyword>String\.copy</keyword>
<keyword>String\.copyResults</keyword>
<keyword>String\.paste</keyword>
<keyword>String\.resetBuffer</keyword>
<keyword>abs</keyword>
<keyword>acos</keyword>
<keyword>asin</keyword>
<keyword>atan</keyword>
<keyword>atan2</keyword>
<keyword>autoUpdate</keyword>
<keyword>beep</keyword>
<keyword>bitDepth</keyword>
<keyword>calibrate</keyword>
<keyword>call</keyword>
<keyword>changeValues</keyword>
<keyword>charCodeAt</keyword>
<keyword>close</keyword>
<keyword>cos</keyword>
<keyword>d2s</keyword>
<keyword>doCommand</keyword>
<keyword>doWand</keyword>
<keyword>drawLine</keyword>
<keyword>drawOval</keyword>
<keyword>drawRect</keyword>
<keyword>drawString</keyword>
<keyword>dump</keyword>
<keyword>endsWith</keyword>
<keyword>eval</keyword>
<keyword>exec</keyword>
<keyword>exit</keyword>
<keyword>exp</keyword>
<keyword>fill</keyword>
<keyword>fillOval</keyword>
<keyword>fillRect</keyword>
<keyword>floodFill</keyword>
<keyword>floor</keyword>
<keyword>fromCharCode</keyword>
<keyword>getArgument</keyword>
<keyword>getBoolean</keyword>
<keyword>getBoundingRect</keyword>
<keyword>getCursorLoc</keyword>
<keyword>getDateAndTime</keyword>
<keyword>getDimensions</keyword>
<keyword>getDirectory</keyword>
<keyword>getFileList</keyword>
<keyword>getHeight</keyword>
<keyword>getHistogram</keyword>
<keyword>getImageID</keyword>
<keyword>getImageInfo</keyword>
<keyword>getInfo</keyword>
<keyword>getLine</keyword>
<keyword>getList</keyword>
<keyword>getLocationAndSize</keyword>
<keyword>getLut</keyword>
<keyword>getMetadata</keyword>
<keyword>getMinAndMax</keyword>
<keyword>getNumber</keyword>
<keyword>getPixel</keyword>
<keyword>getPixelSize</keyword>
<keyword>getProfile</keyword>
<keyword>getRawStatistics</keyword>
<keyword>getResult</keyword>
<keyword>getResultLabel</keyword>
<keyword>getSelectionBounds</keyword>
<keyword>getSelectionCoordinates</keyword>
<keyword>getSliceNumber</keyword>
<keyword>getStatistics</keyword>
<keyword>getString</keyword>
<keyword>getStringWidth</keyword>
<keyword>getThreshold</keyword>
<keyword>getTime</keyword>
<keyword>getTitle</keyword>
<keyword>getValue</keyword>
<keyword>getVersion</keyword>
<keyword>getVoxelSize</keyword>
<keyword>getWidth</keyword>
<keyword>getZoom</keyword>
<keyword>imageCalculator</keyword>
<keyword>indexOf</keyword>
<keyword>is</keyword>
<keyword>isActive</keyword>
<keyword>isKeyDown</keyword>
<keyword>isNaN</keyword>
<keyword>isOpen</keyword>
<keyword>lastIndexOf</keyword>
<keyword>lengthOf</keyword>
<keyword>lineTo</keyword>
<keyword>log</keyword>
<keyword>makeLine</keyword>
<keyword>makeOval</keyword>
<keyword>makePoint</keyword>
<keyword>makePolygon</keyword>
<keyword>makeRectangle</keyword>
<keyword>makeSelection</keyword>
<keyword>makeText</keyword>
<keyword>matches</keyword>
<keyword>maxOf</keyword>
<keyword>minOf</keyword>
<keyword>moveTo</keyword>
<keyword>nImages</keyword>
<keyword>nResults</keyword>
<keyword>nSlices</keyword>
<keyword>newArray</keyword>
<keyword>newImage</keyword>
<keyword>newMenu</keyword>
<keyword>open</keyword>
<keyword>parseFloat</keyword>
<keyword>parseInt</keyword>
<keyword>pow</keyword>
<keyword>print</keyword>
<keyword>random</keyword>
<keyword>rename</keyword>
<keyword>replace</keyword>
<keyword>requires</keyword>
<keyword>reset</keyword>
<keyword>resetMinAndMax</keyword>
<keyword>resetThreshold</keyword>
<keyword>restorePreviousTool</keyword>
<keyword>restoreSettings</keyword>
<keyword>roiManager</keyword>
<keyword>round</keyword>
<keyword>run</keyword>
<keyword>runMacro</keyword>
<keyword>save</keyword>
<keyword>saveAs</keyword>
<keyword>saveSettings</keyword>
<keyword>screenHeight</keyword>
<keyword>screenWidth</keyword>
<keyword>selectImage</keyword>
<keyword>selectWindow</keyword>
<keyword>selectionContains</keyword>
<keyword>selectionName</keyword>
<keyword>selectionType</keyword>
<keyword>setAutoThreshold</keyword>
<keyword>setBackgroundColor</keyword>
<keyword>setBatchMode</keyword>
<keyword>setColor</keyword>
<keyword>setFont</keyword>
<keyword>setForegroundColor</keyword>
<keyword>setJustification</keyword>
<keyword>setKeyDown</keyword>
<keyword>setLineWidth</keyword>
<keyword>setLocation</keyword>
<keyword>setLut</keyword>
<keyword>setMetadata</keyword>
<keyword>setMinAndMax</keyword>
<keyword>setOption</keyword>
<keyword>setPasteMode</keyword>
<keyword>setPixel</keyword>
<keyword>setRGBWeights</keyword>
<keyword>setResult</keyword>
<keyword>setSelectionLocation</keyword>
<keyword>setSelectionName</keyword>
<keyword>setSlice</keyword>
<keyword>setThreshold</keyword>
<keyword>setTool</keyword>
<keyword>setVoxelSize</keyword>
<keyword>setZCoordinate</keyword>
<keyword>setupUndo</keyword>
<keyword>showMessage</keyword>
<keyword>showMessageWithCancel</keyword>
<keyword>showProgress</keyword>
<keyword>showStatus</keyword>
<keyword>sin</keyword>
<keyword>snapshot</keyword>
<keyword>split</keyword>
<keyword>sqrt</keyword>
<keyword>startsWith</keyword>
<keyword>substring</keyword>
<keyword>tan</keyword>
<keyword>toBinary</keyword>
<keyword>toHex</keyword>
<keyword>toLowerCase</keyword>
<keyword>toString</keyword>
<keyword>toUpperCase</keyword>
<keyword>toolID</keyword>
<keyword>updateDisplay</keyword>
<keyword>updateResults</keyword>
<keyword>wait</keyword>
<keyword>waitForUser</keyword>
</context>
<context id="imagej" class="no-spell-check">
<include>
<context ref="def:c-like-comment"/>
<context ref="def:c-like-comment-multiline"/>
<context ref="def:c-like-close-comment-outside-comment"/>
<context ref="double-quoted-string"/>
<context ref="single-quoted-string"/>
<context ref="operator"/>
<context ref="storage-type"/>
<context ref="boolean"/>
<context ref="keyword"/>
<context ref="command"/>
<context ref="builtin"/>
<context ref="def:float"/>
<context ref="def:decimal"/>
<context ref="def:octal"/>
<context ref="def:hexadecimal"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Antonio Ognio <gnrfan@gnrfan.org>
Copyright (C) 2005 Antonio Ognio <gnrfan@gnrfan.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="ini" name=".ini" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">text/x-ini-file;application/x-ini-file;text/x-systemd-unit;text/x-dbus-service</property>
<property name="globs">*.ini</property>
<property name="line-comment-start">;</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="floating-point" name="Floating Point" map-to="def:floating-point"/>
<style id="string" name="String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="decimal" name="Decimal" map-to="def:decimal"/>
<style id="variable" name="Variable" map-to="def:type"/>
<style id="non-standard-key" name="Data Type" map-to="def:type"/>
<style id="boolean-value" name="Boolean value" map-to="def:boolean"/>
</styles>
<definitions>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>;|#</start>
</context>
<context id="group" style-ref="keyword">
<start>^\[</start>
<end>\]$</end>
</context>
<context id="non-standard-key" style-ref="non-standard-key">
<match>^_?X\-[a-zA-Z\-]+</match>
</context>
<context id="language" style-ref="decimal">
<match>\[[a-zA-Z_]+\]</match>
</context>
<context id="variable" style-ref="variable">
<match>^[a-zA-Z_][a-zA-Z0-9_.-]*</match>
</context>
<context id="boolean-value" style-ref="boolean-value">
<keyword>true</keyword>
<keyword>false</keyword>
<keyword>on</keyword>
<keyword>off</keyword>
<keyword>yes</keyword>
<keyword>no</keyword>
</context>
<context id="single-quoted-string" style-ref="string">
<start>'</start>
<end>'</end>
</context>
<context id="double-quoted-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
</context>
<context id="integer" style-ref="decimal">
<match>\b[0-9]+\b</match>
</context>
<context id="decimal-number" style-ref="floating-point">
<match>(\b[0-9]+(\.[0-9]+)?|\.[0-9]+)([Ee][\+-]?[0-9]+)?\b</match>
</context>
<context id="ini" class="no-spell-check">
<include>
<context ref="line-comment"/>
<context ref="group"/>
<context ref="non-standard-key"/>
<context ref="language"/>
<context ref="variable"/>
<context ref="boolean-value"/>
<context ref="single-quoted-string"/>
<context ref="double-quoted-string"/>
<context ref="decimal-number"/>
<context ref="integer"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,239 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Jsoftware, Ric Sherlock
Copyright (C) 2011 Ric Sherlock <tikkanz@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="j" name="J" version="2.0" _section="Source">
<metadata>
<property name="globs">*.ijs</property>
<property name="line-comment-start">NB\.</property>
</metadata>
<styles>
<style id="adverb" name="Adverb" map-to="def:identifier" />
<style id="comment" name="Comment" map-to="def:comment" />
<style id="conjunction" name="Conjunction" map-to="def:identifier" />
<style id="control" name="Control" map-to="def:keyword" />
<style id="error" name="Error" map-to="def:error" />
<style id="exparg" name="Explicit Argument" map-to="def:special-char" />
<style id="global" name="Global" map-to="def:type" />
<style id="labtext" name="Lab Text" map-to="def:preprocessor" />
<style id="local" name="Local" map-to="def:type" />
<style id="noun" name="Noun" map-to="def:special-constant" />
<style id="noundef" name="Explicit Noun Definition" map-to="def:string" />
<style id="number" name="Number" map-to="def:decimal" />
<style id="parens" name="Parens" map-to="def:statement" />
<style id="primitive" name="Primitive" map-to="def:identifier" />
<style id="string" name="String" map-to="def:string" />
<style id="verb" name="Verb" map-to="def:identifier" />
</styles>
<definitions>
<!-- Problems/shortcomings
* How to target parens inside expdef
* Matched vs unmatched parens coloring but how to do () and not {} and []
-->
<!-- NB. (Comments) -->
<context id="comment" style-ref="comment" end-at-line-end="true">
<start>\%[NB\.</start>
</context>
<!-- 'abcde' (Strings) -->
<context id="string" style-ref="string" end-at-line-end="true">
<start>L?'</start><end>'</end>
</context>
<!-- Unbalanced single quotes -->
<context id="error" style-ref="error">
<match>'[^']*?$</match>
</context>
<!-- 2.34 (Numbers) -->
<context id="number" style-ref="number">
<match extended="true">\%[[_0-9][_0-9\.a-zA-Z]*\%]</match>
</context>
<!-- Nouns -->
<context id="noun" style-ref="noun">
<match extended="true">
\%[(_\.|a\.|a:)(?![\.\:])
</match>
</context>
<!-- Verbs -->
<context id="verb" style-ref="verb">
<match extended="true">
((_?[0-9]:)|
(\%[p\.\.)|
(\%[[AcCeEiIjLopr]\.)|
(\%[[ipqsux]:)|
({::)|
([&lt;&gt;\+\*\-\%\^\$\~\|\,\#\{\}&quot;\?]\.)|
([&lt;&gt;\_\+\*\-\%\$\~\|\,\;\#\/\\\[\{\}&quot;]:)|
([&lt;&gt;\=\+\*\-\%\^\$\|\,\;\#\!\[\]\{\?]))
(?![\.\:])
</match>
</context>
<!-- Adverbs -->
<context id="adverb" style-ref="adverb">
<match extended="true">
(([\/\\]\.)|
(\%[[bfMt]\.)|
(\%[t:)|
([\~\/\\\}]))
(?![\.\:])
</match>
</context>
<!-- Conjunctions -->
<context id="conjunction" style-ref="conjunction">
<match extended="true">
((\%[[dDHT]\.)|
(\%[[DLS]:)|
(&amp;\.:)|
([\;\!\@&amp;]\.)|
([\^\!\`\@&amp;]:)|
([\"\`\@&amp;])|
(\s[\.\:][\.\:])|
(\s[\.\:]))
(?![\.\:])
</match>
</context>
<!-- () (Parentheses) -->
<context id="parens" style-ref="parens">
<match>[\(\)]</match>
</context>
<!-- Explicit arguments -->
<context id="exparg" style-ref="exparg">
<match extended="true">\%[[nmuvxy](?![\w\.\:])</match>
</context>
<define-regex id="valid-name">[a-zA-Z][a-zA-Z0-9_]*</define-regex>
<define-regex id="close-expdef">^\s*\)\s*$</define-regex>
<!-- if. do. end. (Control words) -->
<context id="control" style-ref="control">
<prefix>\%[</prefix>
<suffix>(?![\.\:])</suffix>
<keyword>assert\.</keyword>
<keyword>break\.</keyword>
<keyword>continue\.</keyword>
<keyword>return\.</keyword>
<keyword>do\.</keyword>
<keyword>if\.</keyword>
<keyword>else\.</keyword>
<keyword>elseif\.</keyword>
<keyword>end\.</keyword>
<keyword>for\.</keyword>
<keyword>select\.</keyword>
<keyword>case\.</keyword>
<keyword>fcase\.</keyword>
<keyword>throw\.</keyword>
<keyword>try\.</keyword>
<keyword>catch\.</keyword>
<keyword>catchd\.</keyword>
<keyword>catcht\.</keyword>
<keyword>while\.</keyword>
<keyword>whilst\.</keyword>
<keyword>for_\%{valid-name}?\.</keyword>
<keyword>goto_\%{valid-name}?\.</keyword>
<keyword>label_\%{valid-name}?\.</keyword>
</context>
<!-- Explicit definition -->
<context id="expdef" style-inside="true">
<start>\%[(([1-4]|13)\s+:\s*0)|((adverb|conjunction|verb|monad|dyad)\s+define)\%]</start>
<end>\%{close-expdef}</end>
<include>
<context ref="comment"/>
<context ref="error"/>
<context ref="exparg"/>
<context ref="global"/>
<context ref="local"/>
<context ref="noun"/>
<context ref="verb"/>
<context ref="adverb"/>
<context ref="conjunction"/>
<context ref="string"/>
<context ref="number"/>
<context ref="control"/>
</include>
</context>
<!-- Explicit noun definition -->
<context id="noundef" style-ref="noundef" style-inside="true">
<start>\%[(0\s+:\s*0|noun\s+define)\%].*$</start>
<end>\%{close-expdef}</end>
</context>
<!-- Lab text definition -->
<context id="labtext" style-ref="labtext">
<start>^\s*[\x{2500}|-]{2,}</start>
<end>\%{close-expdef}</end>
</context>
<!-- Note (Multiline comment) -->
<context id="notes" style-ref="comment" style-inside="true">
<start>^\s*\%[Note\%](?!\s*\=[:.])\s*['\d].*$</start>
<end>\%{close-expdef}</end>
</context>
<!-- Note (to end-of-line comment) -->
<context id="note" style-ref="comment" end-at-line-end="true">
<start>\%[Note\%](?!\s*\=[:.])\s*['\d].*$</start>
</context>
<!-- =: (Global assignment) -->
<context id="global" style-ref="global">
<match>=:</match>
</context>
<!-- =. (Local assignment) -->
<context id="local" style-ref="local">
<match>=\.</match>
</context>
<context id="j">
<include>
<context ref="comment"/>
<context ref="error"/>
<context ref="string"/>
<context ref="global"/>
<context ref="local"/>
<context ref="noun"/>
<context ref="verb"/>
<context ref="adverb"/>
<context ref="conjunction"/>
<context ref="expdef"/>
<context ref="noundef"/>
<context ref="labtext"/>
<context ref="notes"/>
<context ref="note"/>
<context ref="parens"/>
<context ref="number"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,248 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Remy Loubradou <remy.loubradou@gmail.com>
Copyright (C) 2011 Remy Loubradou <remy.loubradou@gmail.com>
Copyright (C) 2015 Seán de Búrca <leftmostcat@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="jade" name="Jade" version="2.0" _section="Markup">
<metadata>
<property name="globs">*.jade;*.pug</property>
<property name="line-comment-start">//</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="doctype" name="DOCTYPE" map-to="def:preprocessor"/>
<style id="processing-instruction" name="Processing instruction" map-to="def:preprocessor"/>
<style id="element-name" name="Element name" map-to="def:identifier"/>
<style id="attribute-name" name="Attribute name" map-to="def:type"/>
<style id="attribute-value" name="Attribute value" map-to="def:string"/>
<style id="tags" name="Tags" map-to="def:keyword"/>
<style id="entity" name="Entity" map-to="def:preprocessor"/>
<style id="error" name="Error" map-to="def:error"/>
</styles>
<definitions>
<define-regex id="name">[a-zA-Z0-9_-]+</define-regex>
<context id="doctype" style-ref="doctype">
<match>^(!!!)\s*([a-zA-Z0-9-_]+)</match>
</context>
<context id="attribute-name" class="no-spell-check">
<match>(\b\%{name}\s*) *=</match>
<include>
<context sub-pattern="1" style-ref="attribute-name"/>
</include>
</context>
<context id="entity" style-ref="entity" class="no-spell-check">
<match>&amp;\%{name};</match>
</context>
<context id="character-reference" style-ref="entity">
<match>&amp;#([0-9]+|x[a-fA-F0-9]+);</match>
</context>
<context id="unallowed-chars" style-ref="error" extend-parent="false">
<match>[&amp;&lt;]</match>
</context>
<context id="attribute-value" style-ref="attribute-value" class="string" class-disabled="no-spell-check">
<start>["']</start>
<end>\%{0@start}</end>
<include>
<context ref="entity"/>
<context ref="character-reference"/>
<context ref="unallowed-chars"/>
</include>
</context>
<context id="attributes">
<start>\(</start>
<end>\)</end>
<include>
<context style-ref="error" extend-parent="false">
<match>"[^"]+" *[a-zA-Z0-9_-]+</match>
</context>
<context ref="attribute-name"/>
<context ref="attribute-value"/>
</include>
</context>
<context id="tags">
<match extended="true">
^\s*\b
(
a|
abbr|
acronym|
address|
area|
article|
aside|
audio|
b|
base|
big|
blockquote|
body|
br|
button|
canvas|
caption|
cite|
code|
col|
colgroup|
dd|
del|
details|
dfn|
div|
dl|
dt|
em|
fieldset|
figcaption|
figure|
footer|
form|
frame|
frameset|
h1|
h2|
h3|
h4|
h5|
h6|
head|
header|
hgroup|
hr|
html|
i|
iframe|
img|
input|
ins|
kbd|
label|
legend|
li|
link|
map|
mark|
menu|
meta|
nav|
noframes|
noscript|
object|
ol|
optgroup|
option|
p|
param|
pre|
q|
samp|
script|
section|
select|
small|
span|
strike|
strong|
style|
sub|
summary|
sup|
table|
tbody|
td|
textarea|
tfoot|
th|
thead|
time|
title|
tr|
tt|
ul|
var|
var_keys|
video
)
\s*\b[\?!:]{0,1}
</match>
<include>
<context sub-pattern="1" style-ref="tags"/>
</include>
</context>
<context id="attribute-id" style-ref="attribute-name">
<match>#[a-zA-Z0-9_-]+</match>
</context>
<context id="attribute-class" style-ref="attribute-name">
<match>\.[a-zA-Z0-9_-]+</match>
</context>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>//</start>
<include>
<context ref="def:in-line-comment"/>
</include>
</context>
<context id="jade-executable">
<start>^\s*(-)</start>
<end>$</end>
</context>
<context id="interpolated">
<start>[^\\](#\{)</start>
<end>[^\}]+\}</end>
<include>
<context sub-pattern="1" where="start" style-ref="processing-instruction"/>
<context sub-pattern="0" where="end" style-ref="processing-instruction"/>
</include>
</context>
<context id="jade-filter" style-ref="processing-instruction">
<match>^\s*\:[^$]+$</match>
</context>
<context id="jade" class="no-spell-check">
<include>
<context ref="doctype"/>
<context ref="attributes"/>
<context ref="attribute-id"/>
<context ref="attribute-class"/>
<context ref="tags"/>
<context ref="line-comment"/>
<context ref="jade-executable"/>
<context ref="interpolated" />
<context ref="jade-filter"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,188 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Gustavo Giráldez <gustavo.giraldez@gmx.net>
Copyright (C) 2003 Gustavo Giráldez <gustavo.giraldez@gmx.net>
Copyright (C) 2006 Jeff Walden <jwalden@mit.edu>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="java" name="Java" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-java</property>
<property name="globs">*.java</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="string" name="String" map-to="def:string"/>
<style id="char" name="Character" map-to="def:character"/>
<style id="external" name="External" map-to="def:preprocessor"/>
<style id="declaration" name="Declaration" map-to="def:type"/>
<style id="storage-class" name="Storage Class" map-to="def:type"/>
<style id="scope-declaration" name="Scope Declaration" map-to="def:type"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="null-value" name="Null Value" map-to="def:special-constant"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="number" name="Number" map-to="def:decimal"/>
<style id="reserved" name="Future Reserved Keywords" map-to="def:reserved"/>
<style id="type" name="Data Type" map-to="def:type"/>
</styles>
<definitions>
<define-regex id="escaped-character" extended="true">
\\( # leading backslash
[\\\"\'nrbtf] | # escaped character
[0-9]{1,3} | # latin encoded char
u[0-9]{1,4} # unicode char
)
</define-regex>
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
</include>
</context>
<context id="char" style-ref="char">
<match>'(\%{escaped-character}|.)'</match>
</context>
<context id="externals" style-ref="external">
<keyword>import</keyword>
<keyword>package</keyword>
</context>
<context id="declarations" style-ref="declaration">
<keyword>class</keyword>
<keyword>enum</keyword>
<keyword>extends</keyword>
<keyword>implements</keyword>
<keyword>instanceof</keyword>
<keyword>interface</keyword>
<keyword>native</keyword>
<keyword>throws</keyword>
</context>
<context id="primitive-types" style-ref="type">
<keyword>boolean</keyword>
<keyword>byte</keyword>
<keyword>char</keyword>
<keyword>double</keyword>
<keyword>float</keyword>
<keyword>int</keyword>
<keyword>long</keyword>
<keyword>short</keyword>
<keyword>void</keyword>
</context>
<context id="storage-class" style-ref="storage-class">
<keyword>abstract</keyword>
<keyword>final</keyword>
<keyword>static</keyword>
<keyword>strictfp</keyword>
<keyword>synchronized</keyword>
<keyword>transient</keyword>
<keyword>volatile</keyword>
</context>
<context id="scope-declarations" style-ref="scope-declaration">
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
</context>
<context id="flow" style-ref="keyword">
<keyword>assert</keyword>
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>finally</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>return</keyword>
<keyword>throw</keyword>
<keyword>switch</keyword>
<keyword>try</keyword>
<keyword>while</keyword>
</context>
<context id="memory" style-ref="keyword">
<keyword>new</keyword>
<keyword>super</keyword>
<keyword>this</keyword>
</context>
<context id="future-reserved-words" style-ref="reserved">
<keyword>const</keyword>
<keyword>goto</keyword>
</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="numeric" style-ref="number">
<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="java" class="no-spell-check">
<include>
<context ref="def:c-like-comment" style-ref="comment"/>
<context ref="def:c-like-comment-multiline" style-ref="comment"/>
<context ref="def:c-like-close-comment-outside-comment"/>
<context ref="string"/>
<context ref="char"/>
<context ref="externals"/>
<context ref="declarations"/>
<context ref="primitive-types"/>
<context ref="storage-class"/>
<context ref="scope-declarations"/>
<context ref="flow"/>
<context ref="memory"/>
<context ref="future-reserved-words"/>
<context ref="null-value"/>
<context ref="boolean"/>
<context ref="numeric"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,775 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Scott Martin <scott@coffeeblack.org>
Copyright (C) 2004 Scott Martin <scott@coffeeblack.org>
Copyright (C) 2005 Stef Walter (formerly Nate Nielsen) <stef@memberwebs.com>
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
Copyright (C) 2019 Jeffery To <jeffery.to@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="js-expr" name="JavaScript Expressions" version="2.0" _section="Script" hidden="true">
<!-- from js:identifier-char -->
<keyword-char-class>[\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{00B7}\x{0387}\x{1369}-\x{1371}\x{19DA}$\x{200C}\x{200D}]</keyword-char-class>
<definitions>
<!--
See javascript.lang for general notes, naming conventions, etc.
-->
<!--
Expression / context structure:
left-hand side (lhs) expression: new Array ()
=== ===== ==
/ | \
pre-primary primary post-primary
expression expression expression
expression: - obj.count + 1
= ========= ===
/ | \
pre-lhs lhs post-lhs
expression expression expression
-->
<!-- # Pre-primary expression -->
<context id="_pre-primary-expression">
<include>
<context ref="js:embedded-lang-hooks"/>
<!-- ES2017, cannot be followed by line terminator -->
<context id="_async-pre-primary-expression-keyword" style-ref="js:keyword">
<match extended="true">
\%[ async \%]
(?= # preceeds arrow function
\%{js:optional-whitespace-or-comments}
(?:
\%{js:identifier}
\%{js:optional-whitespace-or-comments}
=&gt; |
\( # can this be better?
)
)
(?! # does not preceed "function" (leave to function expression)
\%{js:optional-whitespace-or-comments}
\%[ function \%]
)
</match>
</context> <!-- /_async-pre-primary-expression-keyword -->
<context id="_new-pre-primary-expression-keyword" style-ref="js:keyword">
<match extended="true">
\%[ new \%] (?! \%{js:new-target-object-keyword-suffix} )
</match>
</context> <!-- /_new-pre-primary-expression-keyword -->
</include>
</context> <!-- /_pre-primary-expression -->
<context id="_ordered-pre-primary-expression" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_pre-primary-expression"/>
</include>
</context> <!-- /_ordered-pre-primary-expression -->
<!-- # Grouping / arrow function parameters
(2 + 3) * 4
(x, y) => x + y
(x, ...rest) => { return rest; }
-->
<!-- doing it this way, instead of using expression-with-comma,
will make later augmentation easier -->
<context id="_grouping-item-content">
<include>
<context ref="js:ordered-rest-syntax"/>
<context ref="expression-without-comma"/>
</include>
</context> <!-- /_grouping-item-content -->
<!-- <CoverParenthesizedExpressionAndArrowParameterList> -->
<context id="_choice-grouping" style-ref="js:grouping" end-parent="true">
<start>\(</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:grouping-operator"/>
<context sub-pattern="0" where="end" style-ref="js:grouping-operator"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_grouping-content">
<include>
<context id="_grouping-first-item" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_grouping-item-content"/>
</include>
</context> <!-- /_grouping-first-item -->
<context id="_grouping-items">
<start>,</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_grouping-item-content"/>
</include>
</context> <!-- /_grouping-items -->
</include>
</context> <!-- /_grouping-content -->
</include>
</context> <!-- /_choice-grouping -->
<!-- # Primary expression
this
Array
'string'
100
( ... )
[ 1, 2, 3 ]
function () { ... }
/regex/
`template`
-->
<!-- <PrimaryExpression> -->
<context id="_primary-expression" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_primary-expression-content">
<include>
<context ref="js-lit:choice-array-literal"/>
<context ref="js-lit:choice-object-literal"/>
<context ref="js-lit:choice-regular-expression-literal"/>
<context ref="js-lit:choice-template-literal"/>
<context ref="js-fn:choice-function-expression"/>
<context ref="js-fn:choice-class-expression"/>
<context ref="_choice-grouping"/>
<context ref="js-lit:choice-number"/>
<context ref="js-lit:choice-string"/>
<context id="_choice-primary-expression-identifier" end-parent="true">
<start>(?=\%{js:identifier-start})</start>
<end>\%{def:always-match}</end>
<include>
<!-- no embedded-lang-hooks here -->
<!-- no comments here -->
<!-- do not extend the context by matching comments or
embedded-lang-hooks, which may lead to multiple identifiers -->
<context id="_primary-expression-identifier-content">
<include>
<!-- technically these would be choices, but it would be very
difficult to turn large keyword contexts into container
contexts with end-parent="true" -->
<context ref="js-lit:null-value"/>
<context ref="js-lit:boolean"/>
<context ref="js-val:global-values"/>
<context ref="js:identifier"/>
</include>
</context> <!-- /_primary-expression-identifier-content -->
</include>
</context> <!-- /_choice-primary-expression-identifier -->
</include>
</context> <!-- /_primary-expression-content -->
</include>
</context> <!-- /_primary-expression -->
<context id="_ordered-primary-expression" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_primary-expression"/>
</include>
</context> <!-- /_ordered-primary-expression -->
<!-- # Function call
(in an expression, function arguments list after primary
value)
fn()
fn(a, b, ...list)
-->
<context id="_function-arguments-content">
<include>
<context ref="js:ordered-spread-syntax"/>
<context ref="expression-without-comma"/>
</include>
</context> <!-- /_function-arguments-content -->
<!-- <Arguments> -->
<context id="_function-arguments-lists">
<start>\(</start>
<end>\)</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_function-arguments-list-content">
<include>
<context id="_function-first-argument" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_function-arguments-content"/>
</include>
</context> <!-- /_function-first-argument -->
<context id="_function-arguments">
<start>,</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_function-arguments-content"/>
</include>
</context> <!-- /_function-arguments -->
</include>
</context> <!-- /_function-arguments-list-content -->
</include>
</context> <!-- /_function-arguments-lists -->
<!-- # Post-primary expression
obj.property
obj['property']
fn()
tag`template`
obj?.property
obj?.[expr]
func?.()
-->
<context id="_post-primary-expression">
<include>
<context ref="js:embedded-lang-hooks"/>
<!-- <MemberExpression> (part of) -->
<context id="_dot-property-accessors">
<start>\.(?!\.)</start> <!-- avoid matching rest/spread syntax -->
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_dot-property-accessor-content">
<include>
<context ref="js-val:properties-methods"/>
<context ref="js:identifier-name"/>
</include>
</context> <!-- /_dot-property-accessor-content -->
</include>
</context> <!-- /_dot-property-accessors -->
<!-- <MemberExpression> (part of) -->
<context id="_bracket-property-accessors">
<start>\[</start>
<end>]</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_bracket-property-accessor-content">
<include>
<context ref="expression-with-comma"/>
</include>
</context> <!-- /_bracket-property-accessor-content -->
</include>
</context> <!-- /_bracket-property-accessors -->
<!-- ES2020 -->
<!-- <OptionalChain> (part of) -->
<context id="_optional-chain">
<start>\?\.(?![0-9])</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_optional-chain-content">
<include>
<!-- only match dot-property accessor content here
this context will end early for other cases
-->
<context ref="js-val:properties-methods"/>
<context ref="js:identifier-name"/>
</include>
</context> <!-- /_optional-chain-content -->
</include>
</context> <!-- /_optional-chain -->
<context ref="_function-arguments-lists"/>
<context ref="js-lit:template-literals"/>
</include>
</context> <!-- /_post-primary-expression -->
<context id="_ordered-post-primary-expression" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_post-primary-expression"/>
</include>
</context> <!-- /_ordered-post-primary-expression -->
<!-- # Increment / decrement operators -->
<!-- shared between pre- and post-lhs expressions -->
<context id="_increment-decrement-operators" style-ref="js:increment-decrement-operator">
<match>(\+\+|--)</match>
</context> <!-- /_increment-decrement-operators -->
<!-- # Pre-LHS expression -->
<context id="_pre-lhs-expression">
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="_increment-decrement-operators"/>
<context id="_keyword-unary-operators" style-ref="js:keyword">
<keyword>await</keyword> <!-- ES2017 -->
<keyword>delete</keyword>
<keyword>typeof</keyword>
<keyword>void</keyword>
<keyword>yield</keyword>
</context> <!-- /_keyword-unary-operators -->
<context ref="js:generator-modifier"/> <!-- for yield* -->
<context id="_unary-operators" style-ref="js:unary-operator">
<match extended="true">
(
\+ | # unary plus
- | # unary negation
~ | # bitwise not
! # logical not
)
</match>
</context> <!-- /_unary-operators -->
</include>
</context> <!-- /_pre-lhs-expression -->
<context id="_ordered-pre-lhs-expression" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_pre-lhs-expression"/>
</include>
</context> <!-- /_ordered-pre-lhs-expression -->
<!-- # Left-hand side expression
this
new Array
'string'.length
fn.apply()
list[1]
tag`template`
-->
<define-regex id="_expression-start" extended="true">
(?= \%{js:not-whitespace} )
(?= [^:;\])}] )
(?! /[/*] )
</define-regex> <!-- /_expression-start -->
<!-- <LeftHandSideExpression> -->
<context id="lhs-expression" style-ref="js:expression" once-only="true">
<start>\%{_expression-start}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_lhs-expression-content">
<include>
<context ref="_ordered-pre-primary-expression"/>
<context ref="_ordered-primary-expression"/>
<context ref="_ordered-post-primary-expression"/>
</include>
</context> <!-- /_lhs-expression-content -->
</include>
</context> <!-- /lhs-expression -->
<!-- # Ternary operator -->
<context id="_choice-ternary-operator-missing-true-expression" end-parent="true">
<start>(?=:)</start>
<end>\%{def:always-match}</end>
</context> <!-- /_choice-ternary-operator-missing-true-expression -->
<!-- ## Without comma -->
<context id="_ternary-operator-without-comma-false-clause" once-only="true">
<start>:</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:ternary-operator"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_ternary-operator-without-comma-false-clause-content">
<include>
<context ref="expression-without-comma"/>
</include>
</context> <!-- /_ternary-operator-without-comma-false-clause-content -->
</include>
</context> <!-- /_ternary-operator-without-comma-false-clause -->
<context id="_choice-ternary-operator-without-comma-true-expression" end-parent="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_ternary-operator-without-comma-true-expression-content">
<include>
<context ref="expression-without-comma"/>
<context ref="_ternary-operator-without-comma-false-clause"/>
</include>
</context> <!-- /_ternary-operator-without-comma-true-expression-content -->
</include>
</context> <!-- /_choice-ternary-operator-without-comma-true-expression -->
<context id="_ternary-operators-without-comma">
<start>\?</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:ternary-operator"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_ternary-operator-without-comma-content">
<include>
<context ref="_choice-ternary-operator-missing-true-expression"/>
<context ref="_choice-ternary-operator-without-comma-true-expression"/>
</include>
</context> <!-- /_ternary-operator-without-comma-content -->
</include>
</context> <!-- /_ternary-operators-without-comma -->
<!-- ## With comma -->
<context id="_ternary-operator-with-comma-false-clause" once-only="true">
<start>:</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:ternary-operator"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_ternary-operator-with-comma-false-clause-content">
<include>
<context ref="expression-with-comma"/>
</include>
</context> <!-- /_ternary-operator-with-comma-false-clause-content -->
</include>
</context> <!-- /_ternary-operator-with-comma-false-clause -->
<context id="_choice-ternary-operator-with-comma-true-expression" end-parent="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_ternary-operator-with-comma-true-expression-content">
<include>
<context ref="expression-with-comma"/>
<context ref="_ternary-operator-with-comma-false-clause"/>
</include>
</context> <!-- /_ternary-operator-with-comma-true-expression-content -->
</include>
</context> <!-- /_choice-ternary-operator-with-comma-true-expression -->
<context id="_ternary-operators-with-comma">
<start>\?</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:ternary-operator"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_ternary-operator-with-comma-content">
<include>
<context ref="_choice-ternary-operator-missing-true-expression"/>
<context ref="_choice-ternary-operator-with-comma-true-expression"/>
</include>
</context> <!-- /_ternary-operator-with-comma-content -->
</include>
</context> <!-- /_ternary-operators-with-comma -->
<!-- # Binary operators -->
<define-regex id="_keyword-binary-operator" extended="true">
(?: \%[ (?: instanceof | in ) \%] )
</define-regex> <!-- /_keyword-binary-operator -->
<!-- excluding comma operator -->
<define-regex id="_binary-operator" extended="true">
(?:
\*\* =? | # exponentiation (assignment) (ES2016)
[+/*%-] =? | # arithmetic (assignment)
[!=]==? | # equality
&amp;&amp; | \|\| | # logical
\?\? | # nullish coalescing (ES2020)
[&amp;|^] =? | # bitwise logical (assignment)
(?: &lt;&lt; | &gt;&gt;&gt;? ) =? | # bitwise shift (assignment)
[&lt;&gt;]=? | # relational
= # assignment
)
</define-regex> <!-- /_binary-operator -->
<!-- ## Without comma -->
<context id="_keyword-binary-operators-without-comma">
<start>\%{_keyword-binary-operator}</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_keyword-binary-operator-without-comma-content">
<include>
<context ref="expression-without-comma"/>
</include>
</context> <!-- /_keyword-binary-operator-without-comma-content -->
</include>
</context> <!-- /_keyword-binary-operators-without-comma -->
<context id="_binary-operators-without-comma">
<start>\%{_binary-operator}</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:binary-operator"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_binary-operator-without-comma-content">
<include>
<context ref="expression-without-comma"/>
</include>
</context> <!-- /_binary-operator-without-comma-content -->
</include>
</context> <!-- /_binary-operators-without-comma -->
<!-- ## With comma -->
<context id="_keyword-binary-operators-with-comma">
<start>\%{_keyword-binary-operator}</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_keyword-binary-operator-with-comma-content">
<include>
<context ref="expression-with-comma"/>
</include>
</context> <!-- /_keyword-binary-operator-with-comma-content -->
</include>
</context> <!-- /_keyword-binary-operators-with-comma -->
<context id="_binary-operators-with-comma">
<start>(\%{_binary-operator}|,)</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:binary-operator"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_binary-operator-with-comma-content">
<include>
<context ref="expression-with-comma"/>
</include>
</context> <!-- /_binary-operator-with-comma-content -->
</include>
</context> <!-- /_binary-operators-with-comma -->
<!-- # Post-LHS expression -->
<!-- ## Without comma -->
<context id="_post-lhs-expression-without-comma">
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="_increment-decrement-operators"/>
<context ref="js-fn:arrow-functions"/>
<context ref="_keyword-binary-operators-without-comma"/>
<context ref="_binary-operators-without-comma"/>
<context ref="_ternary-operators-without-comma"/>
</include>
</context> <!-- /_post-lhs-expression-without-comma -->
<context id="_ordered-post-lhs-expression-without-comma" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_post-lhs-expression-without-comma"/>
</include>
</context> <!-- /_ordered-post-lhs-expression-without-comma -->
<!-- ## With comma -->
<context id="_post-lhs-expression-with-comma">
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="_increment-decrement-operators"/>
<context ref="js-fn:arrow-functions"/>
<context ref="_keyword-binary-operators-with-comma"/>
<context ref="_binary-operators-with-comma"/>
<context ref="_ternary-operators-with-comma"/>
</include>
</context> <!-- /_post-lhs-expression-with-comma -->
<context id="_ordered-post-lhs-expression-with-comma" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_post-lhs-expression-with-comma"/>
</include>
</context> <!-- /_ordered-post-lhs-expression-with-comma -->
<!-- # Expression
2 + 3 - 1
true ? doThis() : doThat()
-->
<!-- ## Without comma -->
<context id="_expression-without-comma-content">
<include>
<context ref="_ordered-pre-lhs-expression"/>
<context ref="_lhs-expression-content"/>
<context ref="_ordered-post-lhs-expression-without-comma"/>
</include>
</context> <!-- /_expression-without-comma-content -->
<!-- <AssignmentExpression> -->
<context id="expression-without-comma" style-ref="js:expression" once-only="true">
<start>\%{_expression-start}(?!,)</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_expression-without-comma-content"/>
</include>
</context> <!-- /expression-without-comma -->
<!-- <AssignmentExpression> -->
<context id="choice-expression-without-comma" style-ref="js:expression" end-parent="true">
<start>\%{_expression-start}(?!,)</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_expression-without-comma-content"/>
</include>
</context> <!-- /choice-expression-without-comma -->
<!-- ## With comma -->
<context id="_expression-with-comma-content">
<include>
<context ref="_ordered-pre-lhs-expression"/>
<context ref="_lhs-expression-content"/>
<context ref="_ordered-post-lhs-expression-with-comma"/>
</include>
</context> <!-- /_expression-with-comma-content -->
<!-- <Expression> -->
<context id="expression-with-comma" style-ref="js:expression" once-only="true">
<start>\%{_expression-start}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_expression-with-comma-content"/>
</include>
</context> <!-- /expression-with-comma -->
<!-- <Expression> -->
<context id="choice-expression-with-comma" style-ref="js:expression" end-parent="true">
<start>\%{_expression-start}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_expression-with-comma-content"/>
</include>
</context> <!-- /choice-expression-with-comma -->
</definitions>
</language>

View File

@ -0,0 +1,485 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Scott Martin <scott@coffeeblack.org>
Copyright (C) 2004 Scott Martin <scott@coffeeblack.org>
Copyright (C) 2005 Stef Walter (formerly Nate Nielsen) <stef@memberwebs.com>
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
Copyright (C) 2019 Jeffery To <jeffery.to@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="js-fn" name="JavaScript Functions and Classes" version="2.0" _section="Script" hidden="true">
<!-- from js:identifier-char -->
<keyword-char-class>[\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{00B7}\x{0387}\x{1369}-\x{1371}\x{19DA}$\x{200C}\x{200D}]</keyword-char-class>
<definitions>
<!--
See javascript.lang for general notes, naming conventions, etc.
-->
<!-- # Function expression
function () { return; }
function fn([x, y], z = 3, ...rest) { return x + y + z; }
-->
<!-- ## Function expression keyword -->
<context id="_function-expression-async-keyword" style-ref="js:keyword">
<keyword>async</keyword>
</context> <!-- /_function-expression-async-keyword -->
<context id="_ordered-function-expression-async-keyword" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_function-expression-async-keyword"/>
</include>
</context> <!-- /_ordered-function-expression-async-keyword -->
<context id="_function-expression-function-keyword" style-ref="js:keyword">
<keyword>function</keyword>
</context> <!-- /_function-expression-function-keyword -->
<context id="_ordered-function-expression-function-keyword" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_function-expression-function-keyword"/>
</include>
</context> <!-- /_ordered-function-expression-function-keyword -->
<!-- ## Function parameters list -->
<context id="_function-parameters-content">
<include>
<context ref="js:ordered-rest-syntax"/>
<context ref="js:ordered-assignment-target"/>
<context ref="js:ordered-default-value-assignment"/>
</include>
</context> <!-- /_function-parameters-content -->
<context id="_function-parameters-list" once-only="true">
<start>\(</start>
<end>\)</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_function-parameters-list-content">
<include>
<context id="_function-first-parameter" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_function-parameters-content"/>
</include>
</context> <!-- /_function-first-parameter -->
<context id="_function-parameters">
<start>,</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_function-parameters-content"/>
</include>
</context> <!-- /_function-parameters -->
</include>
</context> <!-- /_function-parameters-list-content -->
</include>
</context> <!-- /_function-parameters-list -->
<context id="_ordered-function-parameters-list" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_function-parameters-list"/>
</include>
</context> <!-- /_ordered-function-parameters-list -->
<!-- ## Function body -->
<!-- <FunctionBody> -->
<context id="_choice-function-body" end-parent="true">
<start>{</start>
<end>}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_function-body-content">
<include>
<context ref="js-st:directives"/>
<context ref="js-st:statements"/>
</include>
</context> <!-- /_function-body-content -->
</include>
</context> <!-- /_choice-function-body -->
<context id="_last-function-body" end-parent="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_choice-function-body"/>
</include>
</context> <!-- /_last-function-body -->
<!-- ## Function expression -->
<!-- <FunctionExpression> / <FunctionDeclaration> -->
<context id="choice-function-expression" style-ref="js:function-expression" end-parent="true">
<start>(?=\%{js:function-expression-keyword})</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_function-expression-content">
<include>
<context ref="_ordered-function-expression-async-keyword"/>
<context ref="_ordered-function-expression-function-keyword"/>
<context ref="js:ordered-generator-modifier"/>
<context ref="js:ordered-identifier"/>
<context ref="_ordered-function-parameters-list"/>
<context ref="_last-function-body"/>
</include>
</context> <!-- /_function-expression-content -->
</include>
</context> <!-- /choice-function-expression -->
<!-- # Arrow function
x => -x;
(x, y) => x + y
({ a: x, b: y = 2}) => { return x + y; }
-->
<context id="_arrow-function-body" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_arrow-function-body-content">
<include>
<context ref="_choice-function-body"/>
<context ref="js-expr:choice-expression-without-comma"/>
</include>
</context> <!-- /_arrow-function-body-content -->
</include>
</context> <!-- /_arrow-function-body -->
<!-- <ArrowFunction> -->
<!-- parenthesized arrow function parameters matched by grouping
context -->
<context id="arrow-functions" style-ref="js:function-expression">
<start>=&gt;</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_arrow-function-content">
<include>
<context ref="_arrow-function-body"/>
</include>
</context> <!-- /_arrow-function-content -->
</include>
</context> <!-- /arrow-functions -->
<!-- # Method definition
{
method() { ... },
get prop() { return this._prop; },
set prop(v) { this._prop = v; }
}
-->
<context id="_method-definition-modifier" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_method-definition-modifier-content">
<include>
<context id="_choice-method-definition-modifier-keyword" style-ref="js:keyword" end-parent="true">
<keyword>get</keyword>
<keyword>set</keyword>
</context> <!-- /_choice-method-definition-modifier-keyword -->
<!-- ES2017, cannot be followed by line terminator -->
<context id="_choice-async-method-definition-modifier-keyword" style-ref="js:keyword" end-parent="true">
<match extended="true">
\%[ async \%]
(?=
\%{js:optional-whitespace-or-comments}
(?:
\%{js:identifier-start} |
\%{js:generator-modifier}
)
)
</match>
</context> <!-- /_choice-async-method-definition-modifier-keyword -->
</include>
</context> <!-- /_method-definition-modifier-content -->
</include>
</context> <!-- /_method-definition-modifier -->
<context id="_ordered-method-definition-modifier" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_method-definition-modifier"/>
</include>
</context> <!-- /_ordered-method-definition-modifier -->
<!-- <MethodDefinition> -->
<context id="_method-definition" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_method-definition-content">
<include>
<context ref="_ordered-method-definition-modifier"/>
<context ref="js:ordered-generator-modifier"/>
<context ref="js-lit:ordered-property-name"/>
<context ref="_ordered-function-parameters-list" style-ref="js:function-expression"/>
<context ref="_last-function-body" style-ref="js:function-expression"/>
</include>
</context> <!-- /_method-definition-content -->
</include>
</context> <!-- /_method-definition -->
<context id="ordered-method-definition" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_method-definition"/>
</include>
</context> <!-- /ordered-method-definition -->
<!-- # Class expression
class Foo extends Bar {
constructor() { ... }
methodA() { ... }
static methodB() { ... }
}
-->
<!-- ## Class optional name -->
<context id="_class-optional-name" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_class-optional-name-content">
<include>
<context id="_choice-class-optional-name-ignore-extends" end-parent="true">
<start>(?=\%[extends\%])</start>
<end>\%{def:always-match}</end>
</context> <!-- /_choice-class-optional-name-ignore-extends -->
<context ref="js:choice-identifier"/>
</include>
</context> <!-- /_class-optional-name-content -->
</include>
</context> <!-- /_class-optional-name -->
<context id="_ordered-class-optional-name" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_class-optional-name"/>
</include>
</context> <!-- /_ordered-class-optional-name -->
<!-- ## Class extends clause -->
<context id="_class-extends-clause" once-only="true">
<start>\%[extends\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_class-extends-clause-content">
<include>
<context ref="js-expr:lhs-expression"/>
</include>
</context> <!-- /_class-extends-clause-content -->
</include>
</context> <!-- /_class-extends-clause -->
<context id="_ordered-class-extends-clause" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_class-extends-clause"/>
</include>
</context> <!-- /_ordered-class-extends-clause -->
<!-- ## Class body -->
<context id="_class-body-member-modifier" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_class-body-member-modifier-content">
<include>
<context id="_choice-class-body-member-modifier-keyword" style-ref="js:keyword" end-parent="true">
<keyword>static</keyword>
</context> <!-- /_choice-class-body-member-modifier-keyword -->
</include>
</context> <!-- /_class-body-member-modifier-content -->
</include>
</context> <!-- /_class-body-member-modifier -->
<context id="_ordered-class-body-member-modifier" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_class-body-member-modifier"/>
</include>
</context> <!-- /_ordered-class-body-member-modifier -->
<context id="_class-body-members">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_class-body-member-content">
<include>
<context ref="_ordered-class-body-member-modifier"/>
<context ref="ordered-method-definition"/>
</include>
</context> <!-- /_class-body-member-content -->
</include>
</context> <!-- /_class-body-members -->
<context id="_class-body" once-only="true">
<start>{</start>
<end>}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_class-body-content">
<include>
<context ref="_class-body-members"/>
</include>
</context> <!-- /_class-body-content -->
</include>
</context> <!-- /_class-body -->
<context id="_last-class-body" end-parent="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_class-body"/>
</include>
</context> <!-- /_last-class-body -->
<!-- ## Class expression -->
<!-- <ClassExpression> / <ClassDeclaration> -->
<context id="choice-class-expression" style-ref="js:class-expression" end-parent="true">
<start>\%{js:class-expression-keyword}</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_class-expression-content">
<include>
<context ref="_ordered-class-optional-name"/>
<context ref="_ordered-class-extends-clause"/>
<context ref="_last-class-body"/>
</include>
</context> <!-- /_class-expression-content -->
</include>
</context> <!-- /choice-class-expression -->
<!-- <ClassExpression> / <ClassDeclaration> -->
<context id="choice-class-expression-required-name" style-ref="js:class-expression" end-parent="true">
<start>\%{js:class-expression-keyword}</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_class-expression-required-name-content">
<include>
<context ref="js:ordered-identifier"/>
<context ref="_ordered-class-extends-clause"/>
<context ref="_last-class-body"/>
</include>
</context> <!-- /_class-expression-required-name-content -->
</include>
</context> <!-- /choice-class-expression-required-name -->
</definitions>
</language>

View File

@ -0,0 +1,604 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Scott Martin <scott@coffeeblack.org>
Copyright (C) 2004 Scott Martin <scott@coffeeblack.org>
Copyright (C) 2005 Stef Walter (formerly Nate Nielsen) <stef@memberwebs.com>
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
Copyright (C) 2019 Jeffery To <jeffery.to@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="js-lit" name="JavaScript Literals" version="2.0" _section="Script" hidden="true">
<!-- from js:identifier-char -->
<keyword-char-class>[\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{00B7}\x{0387}\x{1369}-\x{1371}\x{19DA}$\x{200C}\x{200D}]</keyword-char-class>
<definitions>
<!--
See javascript.lang for general notes, naming conventions, etc.
-->
<!-- # Keyword values -->
<!-- <NullLiteral> -->
<context id="null-value" style-ref="js:null-value">
<keyword>null</keyword>
</context> <!-- /null-value -->
<!-- <BooleanLiteral> -->
<context id="boolean" style-ref="js:boolean">
<keyword>false</keyword>
<keyword>true</keyword>
</context> <!-- /boolean -->
<!-- # Number -->
<!-- <NumericLiteral> -->
<context id="choice-number">
<include>
<define-regex id="_decimal" extended="true">
(?&gt;
(?: [1-9][0-9]* | 0 ) (?: \. [0-9]* )? |
\. [0-9]+
)
(?&gt; [eE] [+-]? [0-9]+ )?
</define-regex> <!-- /_decimal -->
<!-- <DecimalLiteral> -->
<context id="_choice-decimal" style-ref="js:decimal" end-parent="true">
<start extended="true">
(?&lt;! \%{js:identifier-char} | \. )
(?=
\%{_decimal}
(?! \%{js:identifier-part} | \. )
)
</start>
<end>\%{_decimal}</end>
</context> <!-- /_choice-decimal -->
<define-regex id="_decimal-integer" extended="true">
(?&gt;
(?: [1-9][0-9]* | 0 )
)
</define-regex> <!-- /_decimal-integer -->
<!-- ES2020 -->
<!-- <DecimalBigIntegerLiteral> -->
<context id="_choice-decimal-big-integer" style-ref="js:decimal" end-parent="true">
<start extended="true">
(?&lt;! \%{js:identifier-char} | \. )
(?=
\%{_decimal-integer} n
(?! \%{js:identifier-part} | \. )
)
</start>
<end>\%{_decimal-integer}n</end>
</context> <!-- /_choice-decimal-big-integer -->
<define-regex id="_binary-integer" extended="true">
(?&gt; 0 [bB] [01]+ )
</define-regex> <!-- /_binary-integer -->
<!-- <BinaryIntegerLiteral> -->
<context id="_choice-binary-integer" style-ref="js:binary-integer" end-parent="true">
<start extended="true">
(?&lt;! \%{js:identifier-char} | \. )
(?=
\%{_binary-integer} n?
(?! \%{js:identifier-part} | \. )
)
</start>
<end>\%{_binary-integer}n?</end>
</context> <!-- /_choice-binary-integer -->
<define-regex id="_octal-integer" extended="true">
(?&gt; 0 [oO] [0-7]+ )
</define-regex> <!-- /_octal-integer -->
<!-- <OctalIntegerLiteral> -->
<context id="_choice-octal-integer" style-ref="js:octal-integer" end-parent="true">
<start extended="true">
(?&lt;! \%{js:identifier-char} | \. )
(?=
\%{_octal-integer} n?
(?! \%{js:identifier-part} | \. )
)
</start>
<end>\%{_octal-integer}n?</end>
</context> <!-- /_choice-octal-integer -->
<!-- <HexIntegerLiteral> -->
<define-regex id="_hex-integer" extended="true">
(?&gt; 0 [xX] [0-9a-fA-F]+ )
</define-regex> <!-- /_hex-integer -->
<context id="_choice-hex-integer" style-ref="js:hex-integer" end-parent="true">
<start extended="true">
(?&lt;! \%{js:identifier-char} | \. )
(?=
\%{_hex-integer} n?
(?! \%{js:identifier-part} | \. )
)
</start>
<end>\%{_hex-integer}n?</end>
</context> <!-- /_choice-hex-integer -->
<define-regex id="_legacy-octal-integer" extended="true">
(?&gt; 0 [0-7]+ )
</define-regex> <!-- /_legacy-octal-integer -->
<!-- Annex B: <LegacyOctalIntegerLiteral> -->
<context id="_choice-legacy-octal-integer" style-ref="js:error" end-parent="true">
<start extended="true">
(?&lt;! \%{js:identifier-char} | \. )
(?=
\%{_legacy-octal-integer}
(?! \%{js:identifier-part} | \. )
)
</start>
<end>\%{_legacy-octal-integer}</end>
</context> <!-- /_choice-legacy-octal-integer -->
</include>
</context> <!-- /choice-number -->
<!-- # Escape sequences -->
<context id="_escapes">
<include>
<!-- Annex B: <LegacyOctalEscapeSequence> (preceeded by
backslash) -->
<context id="_legacy-octal-escape-sequences" style-ref="js:escape">
<match extended="true">
\\
(
0 [0-7]{1,2} | # 0-padded number, not \0 (null character)
[1-3] [0-7]{0,2} | # max \377
[4-7] [0-7]{0,1}
)
</match>
</context> <!-- /_legacy-octal-escape-sequences -->
<!-- <EscapeSequence> (preceeded by backslash) -->
<context id="_escape-sequences" style-ref="js:escape">
<match extended="true">
(
\%{js:unicode-escape} |
\\
(
x[0-9a-fA-F]{2} | # hexadecimal escape
[^1-9xu] # single character escape
)
)
</match>
</context> <!-- /_escape-sequences -->
</include>
</context> <!-- /_escapes -->
<!-- # String -->
<context id="_string-content">
<include>
<context ref="_escapes"/>
<context ref="def:line-continue"/>
</include>
</context> <!-- /_string-content -->
<!-- <StringLiteral> -->
<context id="choice-string" style-ref="js:string" end-at-line-end="true" end-parent="true" class="string" class-disabled="no-spell-check">
<start>["']</start>
<end>\%{0@start}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<!-- no comments here -->
<context ref="_string-content"/>
</include>
</context> <!-- /choice-string -->
<!-- <StringLiteral> -->
<context id="choice-string-path" style-ref="js:included-file" end-at-line-end="true" end-parent="true" class="path">
<start>["']</start>
<end>\%{0@start}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<!-- no comments here -->
<context ref="_string-content"/>
</include>
</context> <!-- /choice-string-path -->
<!-- # Array literal
[ 1, 2, 3, ...anotherArray ]
-->
<context id="_array-literal-element-content">
<include>
<context ref="js:ordered-spread-syntax"/>
<context ref="js-expr:expression-without-comma"/>
</include>
</context> <!-- /_array-literal-element-content -->
<!-- <ArrayLiteral> -->
<context id="choice-array-literal" style-ref="js:array-literal" end-parent="true">
<start>\[</start>
<end>]</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_array-literal-content">
<include>
<context id="_array-literal-first-element" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_array-literal-element-content"/>
</include>
</context> <!-- /_array-literal-first-element -->
<context id="_array-literal-elements">
<start>,</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_array-literal-element-content"/>
</include>
</context> <!-- /_array-literal-elements -->
</include>
</context> <!-- /_array-literal-content -->
</include>
</context> <!-- /choice-array-literal -->
<!-- # Property name -->
<!-- <PropertyName> -->
<context id="_property-name" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_property-name-content">
<include>
<!-- <ComputedPropertyName> -->
<context id="_choice-computed-property-name" end-parent="true">
<start>\[</start>
<end>]</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_computed-property-name-content">
<include>
<context ref="js-expr:expression-without-comma"/>
</include>
</context> <!-- /_computed-property-name-content -->
</include>
</context> <!-- /_choice-computed-property-name -->
<context ref="choice-number"/>
<context ref="choice-string"/>
<define-regex id="_special-property-names" extended="true">
(?: \%[ constructor \%] )
</define-regex> <!-- /_special-property-names -->
<context id="_choice-special-property-name" style-ref="js:built-in-method" end-parent="true">
<start>(?=\%{_special-property-names})</start>
<end>\%{_special-property-names}</end>
</context> <!-- /_choice-special-property-name -->
<context ref="js:choice-identifier-name"/>
</include>
</context> <!-- /_property-name-content -->
</include>
</context> <!-- /_property-name -->
<context id="ordered-property-name" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_property-name"/>
</include>
</context> <!-- /ordered-property-name -->
<!-- # Object literal
{
propertyA: 'a',
propertyB: getB(),
[ computedName() ]: 2 + 3,
method() { ... },
get prop() { return this._prop; },
set prop(v) { this._prop = v; },
...objectToCopy
}
-->
<context id="_object-literal-property-content">
<include>
<context id="_object-literal-property-name" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_object-literal-property-name-content">
<include>
<context ref="js:ordered-spread-syntax"/> <!-- ES2018 -->
<context ref="js-fn:ordered-method-definition"/> <!-- includes property-name -->
</include>
</context> <!-- /_object-literal-property-name-content -->
</include>
</context> <!-- /_object-literal-property-name -->
<context id="_object-literal-property-value" once-only="true">
<start>:</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_object-literal-property-value-content">
<include>
<context ref="js-expr:expression-without-comma"/>
</include>
</context> <!-- /_object-literal-property-value-content -->
</include>
</context> <!-- /_object-literal-property-value -->
</include>
</context> <!-- /_object-literal-property-content -->
<!-- <ObjectLiteral> -->
<context id="choice-object-literal" style-ref="js:object-literal" end-parent="true">
<start>{</start>
<end>}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_object-literal-content">
<include>
<context id="_object-literal-first-property" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_object-literal-property-content"/>
</include>
</context> <!-- /_object-literal-first-property -->
<context id="_object-literal-properties">
<start>,</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_object-literal-property-content"/>
</include>
</context> <!-- /_object-literal-properties -->
</include>
</context> <!-- /_object-literal-content -->
</include>
</context> <!-- /choice-object-literal -->
<!-- # Regular expression literal
/(foo|bar)+/u
-->
<!-- only valid in regular expressions -->
<context id="_control-escapes" style-ref="js:escape">
<match>\\c[a-zA-Z]</match>
</context> <!-- /_control-escapes -->
<!-- ES2018 -->
<context id="_unicode-property-escapes" style-ref="js:escape">
<match extended="true">
\\ [pP] \{ ( [a-zA-Z_]+ = )? [a-zA-Z0-9_]+ \}
</match>
</context> <!-- /_unicode-property-escapes -->
<!-- ES2018 -->
<context id="_named-capture-groups">
<match extended="true">
\(\? &lt; ( \%{js:identifier} ) &gt;
</match>
<include>
<context sub-pattern="1" style-ref="js:regex-group"/>
</include>
</context> <!-- /_named-capture-groups -->
<!-- ES2018 -->
<context id="_named-capture-group-backreferences" style-ref="js:escape">
<match extended="true">
\\k &lt; ( \%{js:identifier} ) &gt;
</match>
<include>
<context sub-pattern="1" style-ref="js:regex-group"/>
</include>
</context> <!-- /_named-capture-group-backreferences -->
<context id="_regular-expression-character-classes" style-ref="js:regex-class" style-inside="true">
<start>\[</start>
<end>]</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<!-- no comments here -->
<context id="_regular-expression-character-class-content">
<include>
<context ref="_control-escapes"/>
<context ref="_unicode-property-escapes"/>
<context ref="_escapes"/>
</include>
</context> <!-- /_regular-expression-character-class-content -->
</include>
</context> <!-- /_regular-expression-character-classes -->
<!-- <RegularExpressionLiteral> -->
<!-- technically, line terminators are not allowed inside -->
<context id="choice-regular-expression-literal" style-ref="js:regex" end-parent="true">
<start>/</start>
<end>/([gimsuy]*)</end> <!-- s (dotAll): ES2018 -->
<include>
<context sub-pattern="1" where="end" style-ref="js:regex-flag"/>
<context ref="js:embedded-lang-hooks"/>
<!-- no comments here -->
<context id="_regular-expression-literal-content">
<include>
<context ref="_control-escapes"/>
<context ref="_unicode-property-escapes"/>
<context ref="_named-capture-group-backreferences"/>
<context ref="_escapes"/>
<context ref="_named-capture-groups"/>
<context ref="_regular-expression-character-classes"/>
</include>
</context> <!-- /_regular-expression-literal-content -->
</include>
</context> <!-- /choice-regular-expression-literal -->
<!-- # Template literal (template string)
`this is a ${adjective} template`
the contexts are structured this way so that the
template-literal and template-placeholder styles (and any
styles inside the placeholder) do not overlap
-->
<context id="_template-content">
<include>
<context ref="_escapes"/>
<context ref="def:line-continue"/>
</include>
</context> <!-- /_template-content -->
<context id="_template-literal-content">
<include>
<context id="_template-head" style-ref="js:template-literal" once-only="true">
<start>(?&lt;=`)</start>
<end>(?=`|\$\{)</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<!-- no comments here -->
<context ref="_template-content"/>
</include>
</context> <!-- /_template-head -->
<context ref="js:embedded-lang-hooks"/>
<context id="_template-substitution-tails" style-ref="js:template-literal">
<start>(?&lt;=})</start>
<end>(?=`|\$\{)</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<!-- no comments here -->
<context ref="_template-content"/>
</include>
</context> <!-- /_template-substitution-tails -->
<context id="_template-placeholders">
<start>\$\{</start>
<end>}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:template-placeholder"/>
<context sub-pattern="0" where="end" style-ref="js:template-placeholder"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_template-placeholder-content">
<include>
<context ref="js-expr:expression-with-comma"/>
</include>
</context> <!-- /_template-placeholder-content -->
</include>
</context> <!-- /_template-placeholders -->
</include>
</context> <!-- /_template-literal-content -->
<!-- <Template> / <TemplateLiteral> -->
<context id="template-literals">
<start>`</start>
<end>`</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:template-literal"/>
<context sub-pattern="0" where="end" style-ref="js:template-literal"/>
<!-- no embedded-lang-hooks here -->
<!-- no comments here -->
<!-- do not match comments or embedded-lang-hooks here, because
template-head must match immediately -->
<context ref="_template-literal-content"/>
</include>
</context> <!-- /template-literals -->
<!-- <Template> / <TemplateLiteral> -->
<context id="choice-template-literal" end-parent="true">
<start>`</start>
<end>`</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:template-literal"/>
<context sub-pattern="0" where="end" style-ref="js:template-literal"/>
<!-- no embedded-lang-hooks here -->
<!-- no comments here -->
<!-- do not match comments or embedded-lang-hooks here, because
template-head must match immediately -->
<context ref="_template-literal-content"/>
</include>
</context> <!-- /choice-template-literal -->
</definitions>
</language>

View File

@ -0,0 +1,418 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Scott Martin <scott@coffeeblack.org>
Copyright (C) 2004 Scott Martin <scott@coffeeblack.org>
Copyright (C) 2005 Stef Walter (formerly Nate Nielsen) <stef@memberwebs.com>
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
Copyright (C) 2019 Jeffery To <jeffery.to@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="js-mod" name="JavaScript Modules" version="2.0" _section="Script" hidden="true">
<!-- from js:identifier-char -->
<keyword-char-class>[\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{00B7}\x{0387}\x{1369}-\x{1371}\x{19DA}$\x{200C}\x{200D}]</keyword-char-class>
<definitions>
<!--
See javascript.lang for general notes, naming conventions, etc.
-->
<!-- # Shared between export and import declarations -->
<!-- ## (Import) From module
from 'module'
-->
<context id="_from-module" once-only="true">
<start>\%[from\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_from-module-content">
<include>
<context ref="js-lit:choice-string-path"/>
</include>
</context> <!-- /_from-module-content -->
</include>
</context> <!-- /_from-module -->
<context id="_ordered-from-module" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_from-module"/>
</include>
</context> <!-- /_ordered-from-module -->
<!-- ## (Import) all / as namespace
* from 'module';
* as ns from 'module';
-->
<context id="_as-namespace" once-only="true">
<start>\%[as\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_as-namespace-content">
<include>
<context ref="js:identifier"/>
</include>
</context> <!-- /_as-namespace-content -->
</include>
</context> <!-- /_as-namespace -->
<context id="_ordered-as-namespace" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_as-namespace"/>
</include>
</context> <!-- /_ordered-as-namespace -->
<context id="_choice-all-as-namespace" end-parent="true">
<start>\*</start>
<end>\%{js:statement-end}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_import-as-namespace-content">
<include>
<context ref="_ordered-as-namespace"/>
<context ref="_ordered-from-module"/>
</include>
</context> <!-- /_import-as-namespace-content -->
</include>
</context> <!-- /_choice-all-as-namespace -->
<!-- ## Export / import name group
{ x, y as b }
{ x as default }
{ default }
{ default as y }
-->
<context id="_name-group-identifier" once-only="true">
<start>(?=\%{js:identifier-start})</start>
<end>\%{def:always-match}</end>
<include>
<!-- no embedded-lang-hooks here -->
<!-- no comments here -->
<!-- do not extend the context by matching comments or
embedded-lang-hooks, which may lead to multiple identifiers -->
<context id="_name-group-identifier-content">
<include>
<context id="_name-group-keywords" style-ref="js:keyword">
<keyword>default</keyword>
</context> <!-- /_name-group-keywords -->
<context ref="js:identifier"/>
</include>
</context> <!-- /_name-group-identifier-content -->
</include>
</context> <!-- /_name-group-identifier -->
<context id="_name-group-as-identifier" once-only="true">
<start>\%[as\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_name-group-as-identifier-content">
<include>
<context ref="_name-group-identifier"/>
</include>
</context> <!-- /_name-group-as-identifier-content -->
</include>
</context> <!-- /_name-group-as-identifier -->
<context id="_name-group-name-content">
<include>
<context ref="_name-group-identifier"/>
<context ref="_name-group-as-identifier"/>
</include>
</context> <!-- /_name-group-name-content -->
<!-- <ExportClause> / <NamedImports> -->
<context id="_name-group" once-only="true">
<start>{</start>
<end>}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_name-group-content">
<include>
<context id="_name-group-first-name" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_name-group-name-content"/>
</include>
</context> <!-- /_name-group-first-name -->
<context id="_name-group-names">
<start>,</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_name-group-name-content"/>
</include>
</context> <!-- /_name-group-names -->
</include>
</context> <!-- /_name-group-content -->
</include>
</context> <!-- /_name-group -->
<context id="_ordered-name-group" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_name-group"/>
</include>
</context> <!-- /_ordered-name-group -->
<!-- # Export declaration -->
<!-- ## Export named
export { x, y as b };
export { x as default };
export { default } from 'module';
-->
<context id="_choice-export-named" end-parent="true">
<start>(?=\{)</start>
<end>\%{js:statement-end}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_choice-export-named-content">
<include>
<context ref="_ordered-name-group"/>
<context ref="_ordered-from-module"/>
</include>
</context> <!-- /_choice-export-named-content -->
</include>
</context> <!-- /_choice-export-named -->
<!-- ## Export default
export default function () { ... }
export default class { ... }
export default expr;
-->
<context id="_choice-export-default" end-parent="true">
<start>\%[default\%]</start>
<end>\%{js:statement-end}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_export-default-content">
<include>
<context ref="js-fn:choice-class-expression"/>
<context ref="js-fn:choice-function-expression"/>
<context ref="js-expr:choice-expression-without-comma"/>
</include>
</context> <!-- /_export-default-content -->
</include>
</context> <!-- /_choice-export-default -->
<!-- ## Export declaration
export { foo, bar as barry };
export const a = 1;
export default function () { ... }
export * from 'module';
export * as ns from 'module';
-->
<!-- <ExportDeclaration> -->
<context id="export-declarations" style-ref="js:export-import-declaration">
<start>\%[export\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_export-declaration-content">
<include>
<context ref="_choice-export-named"/>
<context ref="_choice-export-default"/>
<context ref="_choice-all-as-namespace"/>
<context ref="js-fn:choice-class-expression-required-name"/>
<context ref="js-fn:choice-function-expression"/>
<context ref="js-st:choice-variable-declaration"/>
</include>
</context> <!-- /_export-declaration-content -->
</include>
</context> <!-- /export-declarations -->
<!-- # Import declaration -->
<!-- ## Import named
import { default as y } from 'module';
-->
<context id="_choice-import-named" end-parent="true">
<start>(?=\{)</start>
<end>\%{js:statement-end}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_choice-import-named-content">
<include>
<context ref="_ordered-name-group"/>
<context ref="_ordered-from-module"/>
</include>
</context> <!-- /_choice-import-named-content -->
</include>
</context> <!-- /_choice-import-named -->
<!-- ## Import default
import def from 'module';
import def, { a, b } from 'module';
import def, * as ns from 'module';
-->
<context id="_choice-import-default-additional" end-parent="true">
<start>,</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_import-default-additional-content">
<include>
<context ref="_choice-import-named"/>
<context ref="_choice-all-as-namespace"/>
</include>
</context> <!-- /_import-default-additional-content -->
</include>
</context> <!-- /_choice-import-default-additional -->
<context id="_choice-import-default-only" end-parent="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:statement-end}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_import-default-only-content">
<include>
<context ref="_ordered-from-module"/>
</include>
</context> <!-- /_import-default-only-content -->
</include>
</context> <!-- /_choice-import-default-only -->
<context id="_choice-import-default" end-parent="true">
<start>(?=\%{js:identifier-start})</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_import-default-content">
<include>
<context ref="js:ordered-identifier"/>
<context ref="_choice-import-default-additional"/>
<context ref="_choice-import-default-only"/>
</include>
</context> <!-- /_import-default-content -->
</include>
</context> <!-- /_choice-import-default -->
<!-- ## Import declaration
import { foo as food, bar } from 'module';
import defaultFn, * as Mod from 'module';
import * as ns from 'module';
import 'module';
-->
<!-- <ImportDeclaration> -->
<context id="import-declarations" style-ref="js:export-import-declaration">
<start extended="true">
\%[ import \%] (?! \%{js:import-function-keyword-suffix} )
</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_import-declaration-content">
<include>
<context ref="_choice-import-named"/>
<context ref="_choice-all-as-namespace"/>
<context ref="_choice-import-default"/>
<context ref="js-lit:choice-string-path"/>
</include>
</context> <!-- /_import-declaration-content -->
</include>
</context> <!-- /import-declarations -->
</definitions>
</language>

View File

@ -0,0 +1,924 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Scott Martin <scott@coffeeblack.org>
Copyright (C) 2004 Scott Martin <scott@coffeeblack.org>
Copyright (C) 2005 Stef Walter (formerly Nate Nielsen) <stef@memberwebs.com>
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
Copyright (C) 2019 Jeffery To <jeffery.to@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="js-st" name="JavaScript Statements" version="2.0" _section="Script" hidden="true">
<!-- from js:identifier-char -->
<keyword-char-class>[\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{00B7}\x{0387}\x{1369}-\x{1371}\x{19DA}$\x{200C}\x{200D}]</keyword-char-class>
<definitions>
<!--
See javascript.lang for general notes, naming conventions, etc.
-->
<!-- # Use strict directive -->
<!-- apparently, back references are not supported -->
<context id="_use-strict-directives" style-ref="js:directive">
<start extended="true">
(?:
" use [ ] strict " |
' use [ ] strict '
)
</start>
<end>\%{js:statement-end}</end>
</context> <!-- /_use-strict-directives -->
<!-- # Directives -->
<!-- directives are valid at the start of scripts, modules, and
function bodies (but not block statements)
-->
<context id="directives">
<include>
<context ref="_use-strict-directives"/>
</include>
</context> <!-- /directives -->
<!-- # Test condition for if / switch / while / etc. -->
<context id="_condition" once-only="true">
<start>\(</start>
<end>\)</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments" />
<context id="_condition-content">
<include>
<context ref="js-expr:expression-with-comma"/>
</include>
</context> <!-- /_condition-content -->
</include>
</context> <!-- /_condition -->
<context id="_ordered-condition" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_condition"/>
</include>
</context> <!-- /_ordered-condition -->
<!-- # Block statement
{
...
}
-->
<!-- <BlockStatement> -->
<context id="_block-statements" style-ref="js:block-statement">
<start>{</start>
<end>}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_block-statement-content">
<include>
<context ref="statements"/>
</include>
</context> <!-- /_block-statement-content -->
</include>
</context> <!-- /_block-statements -->
<!-- # Break statement
break;
break outerLoop;
-->
<!-- <BreakStatement> -->
<context id="_break-statements" style-ref="js:break-statement">
<start>\%[break\%]</start>
<end>\%{js:statement-end-or-end-of-line}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments-no-extend-parent"/>
<context id="_break-statement-content">
<include>
<context ref="js:ordered-identifier"/>
</include>
</context> <!-- /_break-statement-content -->
</include>
</context> <!-- /_break-statements -->
<!-- # Class declaration
class Foo extends Bar { ... }
-->
<!-- <ClassExpression> / <ClassDeclaration> -->
<context id="_class-declarations">
<start>(?=\%{js:class-expression-keyword})</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_class-declaration-content">
<include>
<context ref="js-fn:choice-class-expression-required-name"/>
</include>
</context> <!-- /_class-declaration-content -->
</include>
</context> <!-- /_class-declarations -->
<!-- # Continue statement
continue;
continue outerLoop;
-->
<!-- <ContinueStatement> -->
<context id="_continue-statements" style-ref="js:continue-statement">
<start>\%[continue\%]</start>
<end>\%{js:statement-end-or-end-of-line}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments-no-extend-parent"/>
<context id="_continue-statement-content">
<include>
<context ref="js:ordered-identifier"/>
</include>
</context> <!-- /_continue-statement-content -->
</include>
</context> <!-- /_continue-statements -->
<!-- # Debugger statement
debugger;
-->
<!-- <DebuggerStatement> -->
<context id="_debugger-statements" style-ref="js:debugger-statement">
<start>\%[debugger\%]</start>
<end>\%{js:statement-end}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_debugger-statement-content"/>
</include>
</context> <!-- /_debugger-statements -->
<!-- # Expression statement
a = 1;
main();
i++;
-->
<!-- <ExpressionStatement> -->
<context id="_expression-statements" style-ref="js:expression-statement">
<start>\%{js:before-next-token}</start>
<end>\%{js:statement-end}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_expression-statement-content">
<include>
<context ref="js-expr:expression-with-comma"/>
</include>
</context> <!-- /_expression-statement-content -->
</include>
</context> <!-- /_expression-statements -->
<!-- # For statement
for (var i = 0; i < length; i++) loop();
for (prop in obj) { ... }
for (value of iterator) { ... }
-->
<context id="_for-statement-modifier" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_for-statement-modifier-content">
<include>
<context id="_choice-for-statement-modifier-keyword" style-ref="js:keyword" end-parent="true">
<keyword>await</keyword> <!-- ES2018 -->
</context> <!-- /_choice-for-statement-modifier-keyword -->
</include>
</context> <!-- /_for-statement-modifier-content -->
</include>
</context> <!-- /_for-statement-modifier -->
<context id="_ordered-for-statement-modifier" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_for-statement-modifier"/>
</include>
</context> <!-- /_ordered-for-statement-modifier -->
<context id="_for-statement-test">
<include>
<context id="_for-statement-test-initial-expression" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_for-statement-test-initial-expression-content">
<include>
<context ref="_choice-variable-declaration-without-semicolon"/>
<context ref="js-expr:choice-expression-with-comma"/>
</include>
</context> <!-- /_for-statement-test-initial-expression-content -->
</include>
</context> <!-- /_for-statement-test-initial-expression -->
<context id="_for-statement-test-condition" once-only="true">
<start>;</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_for-statement-test-condition-content">
<include>
<context ref="js-expr:expression-with-comma"/>
</include>
</context> <!-- /_for-statement-test-condition-content -->
</include>
</context> <!-- /_for-statement-test-condition -->
<context id="_for-statement-test-increment-expression" once-only="true">
<start>;</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_for-statement-test-increment-expression-content">
<include>
<context ref="js-expr:expression-with-comma"/>
</include>
</context> <!-- /_for-statement-test-increment-expression-content -->
</include>
</context> <!-- /_for-statement-test-increment-expression -->
</include>
</context> <!-- /_for-statement-test -->
<context id="_for-statement-in" once-only="true">
<start>\%[in\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_for-statement-in-content">
<include>
<context ref="js-expr:expression-with-comma"/>
</include>
</context> <!-- /_for-statement-in-content -->
</include>
</context> <!-- /_for-statement-in -->
<context id="_for-statement-of" once-only="true">
<start>\%[of\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_for-statement-of-content">
<include>
<context ref="js-expr:expression-without-comma"/>
</include>
</context> <!-- /_for-statement-of-content -->
</include>
</context> <!-- /_for-statement-of -->
<context id="_for-statement-condition" once-only="true">
<start>\(</start>
<end>\)</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_for-statement-condition-content">
<include>
<context ref="_for-statement-test"/>
<context ref="_for-statement-in"/>
<context ref="_for-statement-of"/>
</include>
</context> <!-- /_for-statement-condition-content -->
</include>
</context> <!-- /_for-statement-condition -->
<context id="_ordered-for-statement-condition" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_for-statement-condition"/>
</include>
</context> <!-- /_ordered-for-statement-condition -->
<!-- <IterationStatement> (part of) -->
<context id="_for-statements" style-ref="js:for-statement">
<start>\%[for\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_for-statement-content">
<include>
<context ref="_ordered-for-statement-modifier"/>
<context ref="_ordered-for-statement-condition"/>
</include>
</context> <!-- /_for-statement-content -->
</include>
</context> <!-- /_for-statements -->
<!-- # Function declaration
function fn() { ... }
-->
<!-- <FunctionExpression> / <FunctionDeclaration> -->
<context id="_function-declarations">
<start>(?=\%{js:function-expression-keyword})</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_function-declaration-content">
<include>
<context ref="js-fn:choice-function-expression"/>
</include>
</context> <!-- /_function-declaration-content -->
</include>
</context> <!-- /_function-declarations -->
<!-- # If...else statement
if (done) return;
if (i > 0) { ... } else if (i < 0) { ... } else { ... }
-->
<!-- <IfStatement> (part of) -->
<context id="_if-statements" style-ref="js:if-statement">
<start>\%[if\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_if-statement-content">
<include>
<context ref="_ordered-condition"/>
</include>
</context> <!-- /_if-statement-content -->
</include>
</context> <!-- /_if-statements -->
<!-- <IfStatement> (part of) -->
<context id="_else-statements" style-ref="js:else-statement">
<start>\%[else\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_else-statement-content"/>
</include>
</context> <!-- /_else-statements -->
<!-- # Label statement
loop: for (...) {...}
-->
<!-- <LabelledStatement> -->
<!-- technically, only statements (and function declarations in
non-strict mode) are allowed to follow a label identifier, but
let's just end the label statement after the colon
-->
<context id="_label-statements" style-ref="js:label-statement">
<start extended="true">
(?=
\%{js:identifier}
\%{js:optional-whitespace-or-comments}
:
)
</start>
<end>:</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_label-statement-content">
<include>
<!-- technically, yield and await are valid label identifiers
in non-strict mode and non-module code, respectively
but let's not allow it (and have them highlighted as
reserved words)
-->
<context ref="js:ordered-identifier"/>
</include>
</context> <!-- /_label-statement-content -->
</include>
</context> <!-- /_label-statements -->
<!-- # Return statement
return;
return value;
-->
<!-- <ReturnStatement> -->
<context id="_return-statements" style-ref="js:return-statement">
<start>\%[return\%]</start>
<end>\%{js:statement-end-or-end-of-line}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments-no-extend-parent"/>
<context id="_return-statement-content">
<include>
<context ref="js-expr:expression-with-comma"/>
</include>
</context> <!-- /_return-statement-content -->
</include>
</context> <!-- /_return-statements -->
<!-- # Switch statement
switch (a) {
case 1: ... ; break;
case 2: ... ; break;
default: ...
}
-->
<context id="_case-clauses">
<start>\%[case\%]</start>
<end>:</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_case-clause-content">
<include>
<context ref="js-expr:expression-with-comma"/>
</include>
</context> <!-- /_case-clause-content -->
</include>
</context> <!-- /_case-clauses -->
<context id="_default-clauses">
<start>\%[default\%]</start>
<end>:</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_default-clause-content"/>
</include>
</context> <!-- /_default-clauses -->
<context id="_switch-body" once-only="true">
<start>{</start>
<end>}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_switch-body-content">
<include>
<context ref="_case-clauses"/>
<context ref="_default-clauses"/>
<context ref="statements"/>
</include>
</context> <!-- /_switch-body-content -->
</include>
</context> <!-- /_switch-body -->
<context id="_last-switch-body" end-parent="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_switch-body"/>
</include>
</context> <!-- /_last-switch-body -->
<!-- <SwitchStatement> -->
<context id="_switch-statements" style-ref="js:switch-statement">
<start>\%[switch\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_switch-statement-content">
<include>
<context ref="_ordered-condition"/>
<context ref="_last-switch-body"/>
</include>
</context> <!-- /_switch-statement-content -->
</include>
</context> <!-- /_switch-statements -->
<!-- # Throw statement
throw new Error();
-->
<!-- <ThrowStatement> -->
<context id="_throw-statements" style-ref="js:throw-statement">
<start>\%[throw\%]</start>
<end>\%{js:statement-end-or-end-of-line}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments-no-extend-parent"/>
<context id="_throw-statement-content">
<include>
<context ref="js-expr:expression-with-comma"/>
</include>
</context> <!-- /_throw-statement-content -->
</include>
</context> <!-- /_throw-statements -->
<!-- # Try...catch statement
try { ... } catch (e) { ... } finally { ... }
-->
<context id="_try-body" once-only="true">
<start>{</start>
<end>}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_try-body-content">
<include>
<context ref="statements"/>
</include>
</context> <!-- /_try-body-content -->
</include>
</context> <!-- /_try-body -->
<context id="_last-try-body" end-parent="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_try-body"/>
</include>
</context> <!-- /_last-try-body -->
<!-- <TryStatement> -->
<context id="_try-statements" style-ref="js:try-catch-statement">
<start>\%[try\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_try-statement-content">
<include>
<context ref="_last-try-body"/>
</include>
</context> <!-- /_try-statement-content -->
</include>
</context> <!-- /_try-statements -->
<context id="_catch-statement-exception" once-only="true">
<start>\(</start>
<end>\)</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_catch-statement-exception-content">
<include>
<context ref="js:identifier"/>
</include>
</context> <!-- /_catch-statement-exception-content -->
</include>
</context> <!-- /_catch-statement-exception -->
<context id="_ordered-catch-statement-exception" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_catch-statement-exception"/>
</include>
</context> <!-- /_ordered-catch-statement-exception -->
<!-- <Catch> -->
<context id="_catch-statements" style-ref="js:try-catch-statement">
<start>\%[catch\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_catch-statement-content">
<include>
<context ref="_ordered-catch-statement-exception"/>
<context ref="_last-try-body"/>
</include>
</context> <!-- /_catch-statement-content -->
</include>
</context> <!-- /_catch-statements -->
<!-- <Finally> -->
<context id="_finally-statements" style-ref="js:try-catch-statement">
<start>\%[finally\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_finally-statement-content">
<include>
<context ref="_last-try-body"/>
</include>
</context> <!-- /_finally-statement-content -->
</include>
</context> <!-- /_finally-statements -->
<!-- # Variable declaration
var a, b = 2;
let [a, b] = [1, 2];
const { a, y: b = 4, c = 5 } = { a: 1, y: 2 };
-->
<define-regex id="_variable-declaration-keyword" extended="true">
(?: \%[ (?: const | let | var ) \%] )
</define-regex> <!-- /_variable-declaration-keyword -->
<context id="_variable-declaration-item-content">
<include>
<context ref="js:ordered-assignment-target"/>
<context ref="js:ordered-default-value-assignment"/>
</include>
</context> <!-- /_variable-declaration-item-content -->
<context id="_variable-declaration-content">
<include>
<context id="_variable-declaration-first-item" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_variable-declaration-item-content"/>
</include>
</context> <!-- /_variable-declaration-first-item -->
<context id="_variable-declaration-items">
<start>,</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_variable-declaration-item-content"/>
</include>
</context> <!-- /_variable-declaration-items -->
</include>
</context> <!-- /_variable-declaration-content -->
<!-- <VariableStatement> / <LexicalDeclaration> -->
<context id="_variable-declarations" style-ref="js:variable-declaration">
<start>\%{_variable-declaration-keyword}</start>
<end>\%{js:statement-end}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_variable-declaration-content"/>
</include>
</context> <!-- /_variable-declarations -->
<!-- <VariableStatement> / <LexicalDeclaration> -->
<context id="choice-variable-declaration" style-ref="js:variable-declaration" end-parent="true">
<start>\%{_variable-declaration-keyword}</start>
<end>\%{js:statement-end}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_variable-declaration-content"/>
</include>
</context> <!-- /choice-variable-declaration -->
<!-- <VariableStatement> / <LexicalDeclaration> -->
<context id="_choice-variable-declaration-without-semicolon" style-ref="js:variable-declaration" end-parent="true">
<start>\%{_variable-declaration-keyword}</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context ref="_variable-declaration-content"/>
</include>
</context> <!-- /_choice-variable-declaration-without-semicolon -->
<!-- # While / do...while statement
while (true) loop();
do { ... } while (a > 0);
-->
<!-- <IterationStatement> (part of) -->
<context id="_while-statements" style-ref="js:while-statement">
<start>\%[while\%]</start>
<end>\%{js:statement-end}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_while-statement-content">
<include>
<context ref="_ordered-condition"/>
</include>
</context> <!-- /_while-statement-content -->
</include>
</context> <!-- /_while-statements -->
<!-- <IterationStatement> (part of) -->
<context id="_do-statements" style-ref="js:while-statement">
<start>\%[do\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_do-statement-content"/>
</include>
</context> <!-- /_do-statements -->
<!-- # With statement
with (o) doIt();
with (obj) { ... }
-->
<!-- <WithStatement> -->
<context id="_with-statements" style-ref="js:with-statement">
<start>\%[with\%]</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context ref="js:embedded-lang-hooks"/>
<context ref="js:comments"/>
<context id="_with-statement-content">
<include>
<context ref="_ordered-condition"/>
</include>
</context> <!-- /_with-statement-content -->
</include>
</context> <!-- /_with-statements -->
<!-- # Statements -->
<!-- <StatementList> -->
<!-- statements and declarations that are valid in "scripts" (as
opposed to modules) and in block statements -->
<context id="statements">
<include>
<context ref="_block-statements"/>
<context ref="_break-statements"/>
<context ref="_class-declarations"/>
<context ref="_continue-statements"/>
<context ref="_debugger-statements"/>
<context ref="_for-statements"/>
<context ref="_function-declarations"/>
<context ref="_if-statements"/>
<context ref="_else-statements"/>
<context ref="_label-statements"/>
<context ref="_return-statements"/>
<context ref="_switch-statements"/>
<context ref="_throw-statements"/>
<context ref="_try-statements"/>
<context ref="_catch-statements"/>
<context ref="_finally-statements"/>
<context ref="_variable-declarations"/>
<context ref="_while-statements"/>
<context ref="_do-statements"/>
<context ref="_with-statements"/>
<context ref="_expression-statements"/> <!-- catch-all -->
</include>
</context> <!-- /statements -->
</definitions>
</language>

View File

@ -0,0 +1,698 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Scott Martin <scott@coffeeblack.org>
Copyright (C) 2004 Scott Martin <scott@coffeeblack.org>
Copyright (C) 2005 Stef Walter (formerly Nate Nielsen) <stef@memberwebs.com>
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
Copyright (C) 2019 Jeffery To <jeffery.to@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="js-val" name="JavaScript Built-in Values" version="2.0" _section="Script" hidden="true">
<!-- from js:identifier-char -->
<keyword-char-class>[\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{00B7}\x{0387}\x{1369}-\x{1371}\x{19DA}$\x{200C}\x{200D}]</keyword-char-class>
<definitions>
<!--
See javascript.lang for general notes, naming conventions, etc.
-->
<!-- # Global values -->
<context id="global-values">
<include>
<!--
There was a long discussion on ##javascript on freenode between
'katspaugh', 'joo' and 'prog_' on whether 'undefined' should be
highlighted on not, specialy as a constant. The conclusion was "It can't
be highlighted as a constant literal value, because it can be an
identifier (of a variable value) but leave it be as it is. Let tradition
and convention obscure the details."
-->
<!-- 18.1 Value Properties of the Global Object -->
<context id="_values" style-ref="js:built-in-value">
<keyword>Infinity</keyword>
<keyword>NaN</keyword>
<keyword>undefined</keyword>
</context> <!-- /_values -->
<!-- 18.2 Function Properties of the Global Object -->
<context id="_functions" style-ref="js:built-in-function">
<keyword>decodeURIComponent</keyword>
<keyword>decodeURI</keyword>
<keyword>encodeURIComponent</keyword>
<keyword>encodeURI</keyword>
<keyword>eval</keyword>
<keyword>isFinite</keyword>
<keyword>isNaN</keyword>
<keyword>parseFloat</keyword>
<keyword>parseInt</keyword>
</context> <!-- /_functions -->
<context id="_constructors" style-ref="js:built-in-constructor">
<keyword>ArrayBuffer</keyword>
<keyword>Array</keyword>
<keyword>BigInt</keyword> <!-- ES2020 -->
<keyword>Boolean</keyword>
<keyword>Date</keyword>
<keyword>Error</keyword>
<keyword>EvalError</keyword>
<keyword>Float32Array</keyword>
<keyword>Float64Array</keyword>
<keyword>Function</keyword>
<keyword>Int16Array</keyword>
<keyword>Int32Array</keyword>
<keyword>Int8Array</keyword>
<keyword>Map</keyword>
<keyword>Number</keyword>
<keyword>Object</keyword>
<keyword>Promise</keyword>
<keyword>Proxy</keyword>
<keyword>RangeError</keyword>
<keyword>ReferenceError</keyword>
<keyword>Reflect</keyword>
<keyword>RegExp</keyword>
<keyword>Set</keyword>
<keyword>String</keyword>
<keyword>Symbol</keyword>
<keyword>SyntaxError</keyword>
<keyword>TypeError</keyword>
<keyword>Uint16Array</keyword>
<keyword>Uint32Array</keyword>
<keyword>Uint8Array</keyword>
<keyword>Uint8ClampedArray</keyword>
<keyword>URIError</keyword>
<keyword>WeakMap</keyword>
<keyword>WeakSet</keyword>
</context> <!-- /_constructors -->
<context id="_objects" style-ref="js:built-in-object">
<keyword>Intl</keyword>
<keyword>JSON</keyword>
<keyword>Math</keyword>
<keyword>WebAssembly</keyword>
</context> <!-- /_objects -->
<context id="_object-keywords" style-ref="js:keyword">
<keyword>arguments</keyword>
<keyword>globalThis</keyword> <!-- ES2020 -->
<keyword>super</keyword>
<keyword>this</keyword>
</context> <!-- /_object-keywords -->
<context id="_import-function-keyword">
<start extended="true">
\%[ import \%] (?= \%{js:import-function-keyword-suffix} )
</start>
<end>(?=\()</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<!-- no embedded-lang-hooks here -->
<context ref="js:comments"/>
</include>
</context> <!-- /_import-function-keyword -->
<context id="_new-target-object-keyword">
<start extended="true">
\%[ new \%] (?= \%{js:new-target-object-keyword-suffix} )
</start>
<end>\%[target\%]</end>
<include>
<context sub-pattern="0" where="start" style-ref="js:keyword"/>
<context sub-pattern="0" where="end" style-ref="js:keyword"/>
<!-- no embedded-lang-hooks here -->
<context ref="js:comments"/>
<context id="_new-target-object-keyword-content">
<include>
<context ref="js:ordered-keyword-dot"/>
</include>
</context> <!-- /_new-target-object-keyword-content -->
</include>
</context> <!-- /_new-target-object-keyword -->
</include>
</context> <!-- /global-values -->
<!-- # Properties / methods -->
<context id="properties-methods">
<include>
<context id="_intl-constructors" style-ref="js:built-in-constructor">
<keyword>Collator</keyword>
<keyword>DateTimeFormat</keyword>
<keyword>NumberFormat</keyword>
<keyword>PluralRules</keyword>
</context> <!-- /_intl-constructors -->
<context id="_webassembly-constructors" style-ref="js:built-in-constructor">
<keyword>CompileError</keyword>
<keyword>Global</keyword>
<keyword>Instance</keyword>
<keyword>LinkError</keyword>
<keyword>Memory</keyword>
<keyword>Module</keyword>
<keyword>RuntimeError</keyword>
<keyword>Table</keyword>
</context> <!-- /_webassembly-constructors -->
<context id="_array-properties" style-ref="js:built-in-property">
<keyword>length</keyword>
</context> <!-- /_array-properties -->
<context id="_array-methods" style-ref="js:built-in-method">
<keyword>concat</keyword>
<keyword>copyWithin</keyword>
<keyword>entries</keyword>
<keyword>every</keyword>
<keyword>fill</keyword>
<keyword>filter</keyword>
<keyword>findIndex</keyword>
<keyword>find</keyword>
<keyword>flatMap</keyword> <!-- ES2019 -->
<keyword>flat</keyword> <!-- ES2019 -->
<keyword>forEach</keyword>
<keyword>from</keyword>
<keyword>includes</keyword> <!-- ES2016 -->
<keyword>indexOf</keyword>
<keyword>isArray</keyword>
<keyword>join</keyword>
<keyword>keys</keyword>
<keyword>lastIndexOf</keyword>
<keyword>map</keyword>
<keyword>of</keyword>
<keyword>pop</keyword>
<keyword>push</keyword>
<keyword>reduceRight</keyword>
<keyword>reduce</keyword>
<keyword>reverse</keyword>
<keyword>shift</keyword>
<keyword>slice</keyword>
<keyword>some</keyword>
<keyword>sort</keyword>
<keyword>unshift</keyword>
<keyword>values</keyword>
</context> <!-- /_array-methods -->
<context id="_arraybuffer-properties" style-ref="js:built-in-property">
<keyword>byteLength</keyword>
</context> <!-- /_arraybuffer-properties -->
<context id="_arraybuffer-methods" style-ref="js:built-in-method">
<keyword>isView</keyword>
<keyword>slice</keyword>
</context> <!-- /_arraybuffer-methods -->
<!-- ES2020 -->
<context id="_bigint-methods" style-ref="js:built-in-method">
<keyword>asIntN</keyword>
<keyword>asUintN</keyword>
</context> <!-- /_bigint-methods -->
<context id="_dataview-properties" style-ref="js:built-in-property">
<keyword>buffer</keyword>
<keyword>byteLength</keyword>
<keyword>byteOffset</keyword>
</context> <!-- /_dataview-properties -->
<context id="_dataview-methods" style-ref="js:built-in-method">
<keyword>getFloat32</keyword>
<keyword>getFloat64</keyword>
<keyword>getInt16</keyword>
<keyword>getInt32</keyword>
<keyword>getInt8</keyword>
<keyword>getUint16</keyword>
<keyword>getUint32</keyword>
<keyword>getUint8</keyword>
<keyword>setFloat32</keyword>
<keyword>setFloat64</keyword>
<keyword>setInt16</keyword>
<keyword>setInt32</keyword>
<keyword>setInt8</keyword>
<keyword>setUint16</keyword>
<keyword>setUint32</keyword>
<keyword>setUint8</keyword>
</context> <!-- /_dataview-methods -->
<context id="_date-methods" style-ref="js:built-in-method">
<keyword>getDate</keyword>
<keyword>getDay</keyword>
<keyword>getFullYear</keyword>
<keyword>getHours</keyword>
<keyword>getMilliseconds</keyword>
<keyword>getMinutes</keyword>
<keyword>getMonth</keyword>
<keyword>getSeconds</keyword>
<keyword>getTime</keyword>
<keyword>getTimezoneOffset</keyword>
<keyword>getUTCDate</keyword>
<keyword>getUTCDay</keyword>
<keyword>getUTCFullYear</keyword>
<keyword>getUTCHours</keyword>
<keyword>getUTCMilliseconds</keyword>
<keyword>getUTCMinutes</keyword>
<keyword>getUTCMonth</keyword>
<keyword>getUTCSeconds</keyword>
<keyword>now</keyword>
<keyword>parse</keyword>
<keyword>setDate</keyword>
<keyword>setFullYear</keyword>
<keyword>setHours</keyword>
<keyword>setMilliseconds</keyword>
<keyword>setMinutes</keyword>
<keyword>setMonth</keyword>
<keyword>setSeconds</keyword>
<keyword>setTime</keyword>
<keyword>setUTCDate</keyword>
<keyword>setUTCFullYear</keyword>
<keyword>setUTCHours</keyword>
<keyword>setUTCMilliseconds</keyword>
<keyword>setUTCMinutes</keyword>
<keyword>setUTCMonth</keyword>
<keyword>setUTCSeconds</keyword>
<keyword>toDateString</keyword>
<keyword>toISOString</keyword>
<keyword>toJSON</keyword>
<keyword>toLocaleDateString</keyword>
<keyword>toLocaleTimeString</keyword>
<keyword>toTimeString</keyword>
<keyword>toUTCString</keyword>
<keyword>UTC</keyword>
</context> <!-- /_date-methods -->
<context id="_error-properties" style-ref="js:built-in-property">
<keyword>message</keyword>
<keyword>name</keyword>
</context> <!-- /_error-properties -->
<context id="_function-properties" style-ref="js:built-in-property">
<keyword>length</keyword>
<keyword>name</keyword>
</context> <!-- /_function-properties -->
<context id="_function-methods" style-ref="js:built-in-method">
<keyword>apply</keyword>
<keyword>bind</keyword>
<keyword>call</keyword>
</context> <!-- /_function-methods -->
<context id="_generator-methods" style-ref="js:built-in-method">
<keyword>next</keyword>
<keyword>return</keyword>
<keyword>throw</keyword>
</context> <!-- /_generator-methods -->
<context id="_intl-methods" style-ref="js:built-in-method">
<keyword>formatToParts</keyword> <!-- common to intl format object instances -->
<keyword>format</keyword> <!-- common to intl format object instances -->
<keyword>getCanonicalLocales</keyword>
<keyword>resolvedOptions</keyword> <!-- common to intl object instances -->
<keyword>supportedLocalesOf</keyword> <!-- common to intl objects -->
</context> <!-- /_intl-methods -->
<context id="_intl-collator-methods" style-ref="js:built-in-method">
<keyword>compare</keyword>
</context> <!-- /_intl-collator-methods -->
<context id="_intl-pluralrules-methods" style-ref="js:built-in-method">
<keyword>select</keyword>
</context> <!-- /_intl-pluralrules-methods -->
<context id="_json-methods" style-ref="js:built-in-method">
<keyword>parse</keyword>
<keyword>stringify</keyword>
</context> <!-- /_json-methods -->
<context id="_map-properties" style-ref="js:built-in-property">
<keyword>size</keyword>
</context> <!-- /_map-properties -->
<context id="_map-methods" style-ref="js:built-in-method">
<keyword>clear</keyword>
<keyword>delete</keyword>
<keyword>entries</keyword>
<keyword>forEach</keyword>
<keyword>get</keyword>
<keyword>has</keyword>
<keyword>keys</keyword>
<keyword>set</keyword>
<keyword>values</keyword>
</context> <!-- /_map-methods -->
<context id="_math-properties" style-ref="js:built-in-property">
<keyword>E</keyword>
<keyword>LN10</keyword>
<keyword>LN2</keyword>
<keyword>LOG10E</keyword>
<keyword>LOG2E</keyword>
<keyword>PI</keyword>
<keyword>SQRT1_2</keyword>
<keyword>SQRT2</keyword>
</context> <!-- /_math-properties -->
<context id="_math-methods" style-ref="js:built-in-method">
<keyword>abs</keyword>
<keyword>acosh</keyword>
<keyword>acos</keyword>
<keyword>asinh</keyword>
<keyword>asin</keyword>
<keyword>atan2</keyword>
<keyword>atanh</keyword>
<keyword>atan</keyword>
<keyword>cbrt</keyword>
<keyword>ceil</keyword>
<keyword>clz32</keyword>
<keyword>cosh</keyword>
<keyword>cos</keyword>
<keyword>expm1</keyword>
<keyword>exp</keyword>
<keyword>floor</keyword>
<keyword>fround</keyword>
<keyword>hypot</keyword>
<keyword>imul</keyword>
<keyword>log10</keyword>
<keyword>log1p</keyword>
<keyword>log2</keyword>
<keyword>log</keyword>
<keyword>max</keyword>
<keyword>min</keyword>
<keyword>pow</keyword>
<keyword>random</keyword>
<keyword>round</keyword>
<keyword>sign</keyword>
<keyword>sinh</keyword>
<keyword>sin</keyword>
<keyword>sqrt</keyword>
<keyword>tanh</keyword>
<keyword>tan</keyword>
<keyword>trunc</keyword>
</context> <!-- /_math-methods -->
<context id="_number-properties" style-ref="js:built-in-property">
<keyword>EPSILON</keyword>
<keyword>MAX_SAFE_INTEGER</keyword>
<keyword>MAX_VALUE</keyword>
<keyword>MIN_SAFE_INTEGER</keyword>
<keyword>MIN_VALUE</keyword>
<keyword>NaN</keyword>
<keyword>NEGATIVE_INFINITY</keyword>
<keyword>POSITIVE_INFINITY</keyword>
</context> <!-- /_number-properties -->
<context id="_number-methods" style-ref="js:built-in-method">
<keyword>isFinite</keyword>
<keyword>isInteger</keyword>
<keyword>isNaN</keyword>
<keyword>isSafeInteger</keyword>
<keyword>parseFloat</keyword>
<keyword>parseInt</keyword>
<keyword>toExponential</keyword>
<keyword>toFixed</keyword>
<keyword>toPrecision</keyword>
</context> <!-- /_number-methods -->
<context id="_object-properties" style-ref="js:built-in-property">
<keyword>constructor</keyword>
<keyword>prototype</keyword>
</context> <!-- /_object-properties -->
<context id="_object-methods" style-ref="js:built-in-method">
<keyword>assign</keyword>
<keyword>create</keyword>
<keyword>defineProperties</keyword>
<keyword>defineProperty</keyword>
<keyword>entries</keyword> <!-- ES2017 -->
<keyword>freeze</keyword>
<keyword>fromEntries</keyword> <!-- ES2019 -->
<keyword>getOwnPropertyDescriptors</keyword> <!-- ES2017 -->
<keyword>getOwnPropertyDescriptor</keyword>
<keyword>getOwnPropertyNames</keyword>
<keyword>getOwnPropertySymbols</keyword>
<keyword>getPrototypeOf</keyword>
<keyword>hasOwnProperty</keyword>
<keyword>isExtensible</keyword>
<keyword>isFrozen</keyword>
<keyword>isPrototypeOf</keyword>
<keyword>isSealed</keyword>
<keyword>is</keyword>
<keyword>keys</keyword>
<keyword>preventExtensions</keyword>
<keyword>propertyIsEnumerable</keyword>
<keyword>seal</keyword>
<keyword>setPrototypeOf</keyword>
<keyword>toLocaleString</keyword>
<keyword>toString</keyword>
<keyword>valueOf</keyword>
<keyword>values</keyword> <!-- ES2017 -->
</context> <!-- /_object-methods -->
<context id="_promise-methods" style-ref="js:built-in-method">
<keyword>allSettled</keyword> <!-- ES2020 -->
<keyword>all</keyword>
<keyword>catch</keyword>
<keyword>finally</keyword> <!-- ES2018 -->
<keyword>race</keyword>
<keyword>reject</keyword>
<keyword>resolve</keyword>
<keyword>then</keyword>
</context> <!-- /_promise-methods -->
<context id="_proxy-methods" style-ref="js:built-in-method">
<keyword>revocable</keyword>
</context> <!-- /_proxy-methods -->
<context id="_reflect-methods" style-ref="js:built-in-method">
<keyword>apply</keyword>
<keyword>construct</keyword>
<keyword>defineProperty</keyword>
<keyword>deleteProperty</keyword>
<keyword>getOwnPropertyDescriptor</keyword>
<keyword>getPrototypeOf</keyword>
<keyword>get</keyword>
<keyword>has</keyword>
<keyword>isExtensible</keyword>
<keyword>ownKeys</keyword>
<keyword>preventExtensions</keyword>
<keyword>setPrototypeOf</keyword>
<keyword>set</keyword>
</context> <!-- /_reflect-methods -->
<context id="_regexp-properties" style-ref="js:built-in-property">
<keyword>flags</keyword>
<keyword>global</keyword>
<keyword>ignoreCase</keyword>
<keyword>lastIndex</keyword>
<keyword>multiline</keyword>
<keyword>source</keyword>
<keyword>sticky</keyword>
<keyword>unicode</keyword>
</context> <!-- /_regexp-properties -->
<context id="_regexp-methods" style-ref="js:built-in-method">
<keyword>exec</keyword>
<keyword>test</keyword>
</context> <!-- /_regexp-methods -->
<context id="_set-properties" style-ref="js:built-in-property">
<keyword>size</keyword>
</context> <!-- /_set-properties -->
<context id="_set-methods" style-ref="js:built-in-method">
<keyword>add</keyword>
<keyword>clear</keyword>
<keyword>delete</keyword>
<keyword>entries</keyword>
<keyword>forEach</keyword>
<keyword>has</keyword>
<keyword>keys</keyword>
<keyword>values</keyword>
</context> <!-- /_set-methods -->
<context id="_string-properties" style-ref="js:built-in-property">
<keyword>length</keyword>
</context> <!-- /_string-properties -->
<context id="_string-methods" style-ref="js:built-in-method">
<keyword>charAt</keyword>
<keyword>charCodeAt</keyword>
<keyword>codePointAt</keyword>
<keyword>concat</keyword>
<keyword>endsWith</keyword>
<keyword>fromCharCode</keyword>
<keyword>fromCodePoint</keyword>
<keyword>includes</keyword>
<keyword>indexOf</keyword>
<keyword>lastIndexOf</keyword>
<keyword>localeCompare</keyword>
<keyword>matchAll</keyword> <!-- ES2020 -->
<keyword>match</keyword>
<keyword>normalize</keyword>
<keyword>padEnd</keyword> <!-- ES2017 -->
<keyword>padStart</keyword> <!-- ES2017 -->
<keyword>raw</keyword>
<keyword>repeat</keyword>
<keyword>replace</keyword>
<keyword>search</keyword>
<keyword>slice</keyword>
<keyword>split</keyword>
<keyword>startsWith</keyword>
<keyword>substring</keyword>
<keyword>toLocaleLowerCase</keyword>
<keyword>toLocaleUpperCase</keyword>
<keyword>toLowerCase</keyword>
<keyword>toUpperCase</keyword>
<keyword>trimEnd</keyword> <!-- ES2019 -->
<keyword>trimStart</keyword> <!-- ES2019 -->
<keyword>trim</keyword>
</context> <!-- /_string-methods -->
<context id="_symbol-properties" style-ref="js:built-in-property">
<keyword>asyncIterator</keyword> <!-- ES2018 -->
<keyword>description</keyword> <!-- ES2019 -->
<keyword>hasInstance</keyword>
<keyword>isConcatSpreadable</keyword>
<keyword>iterator</keyword>
<keyword>matchAll</keyword>
<keyword>match</keyword>
<keyword>replace</keyword>
<keyword>search</keyword>
<keyword>species</keyword>
<keyword>split</keyword>
<keyword>toPrimitive</keyword>
<keyword>toStringTag</keyword>
<keyword>unscopables</keyword>
</context> <!-- /_symbol-properties -->
<context id="_symbol-methods" style-ref="js:built-in-method">
<keyword>for</keyword>
<keyword>keyFor</keyword>
</context> <!-- /_symbol-methods -->
<!-- TypedArray is one of these objects:
* Float32Array
* Float64Array
* Int16Array
* Int32Array
* Int8Array
* Uint16Array
* Uint32Array
* Uint8Array
* Uint8ClampedArray
-->
<context id="_typedarray-properties" style-ref="js:built-in-property">
<keyword>buffer</keyword>
<keyword>byteLength</keyword>
<keyword>byteOffset</keyword>
<keyword>BYTES_PER_ELEMENT</keyword>
<keyword>length</keyword>
<keyword>name</keyword>
</context> <!-- /_typedarray-properties -->
<context id="_typedarray-methods" style-ref="js:built-in-method">
<keyword>copyWithin</keyword>
<keyword>entries</keyword>
<keyword>every</keyword>
<keyword>fill</keyword>
<keyword>filter</keyword>
<keyword>findIndex</keyword>
<keyword>find</keyword>
<keyword>forEach</keyword>
<keyword>from</keyword>
<keyword>indexOf</keyword>
<keyword>join</keyword>
<keyword>keys</keyword>
<keyword>lastIndexOf</keyword>
<keyword>map</keyword>
<keyword>of</keyword>
<keyword>reduceRight</keyword>
<keyword>reduce</keyword>
<keyword>reverse</keyword>
<keyword>set</keyword>
<keyword>slice</keyword>
<keyword>some</keyword>
<keyword>sort</keyword>
<keyword>subarray</keyword>
<keyword>values</keyword>
</context> <!-- /_typedarray-methods -->
<context id="_weakmap-methods" style-ref="js:built-in-method">
<keyword>delete</keyword>
<keyword>get</keyword>
<keyword>has</keyword>
<keyword>set</keyword>
</context> <!-- /_weakmap-methods -->
<context id="_weakset-methods" style-ref="js:built-in-method">
<keyword>add</keyword>
<keyword>delete</keyword>
<keyword>has</keyword>
</context> <!-- /_weakset-methods -->
<context id="_webassembly-methods" style-ref="js:built-in-method">
<keyword>compileStreaming</keyword>
<keyword>compile</keyword>
<keyword>instantiateStreaming</keyword>
<keyword>instantiate</keyword>
<keyword>validate</keyword>
</context> <!-- /_webassembly-methods -->
<context id="_webassembly-instance-properties" style-ref="js:built-in-property">
<keyword>exports</keyword>
</context> <!-- /_webassembly-instance-properties -->
<context id="_webassembly-global-properties" style-ref="js:built-in-property">
<keyword>value</keyword>
</context> <!-- /_webassembly-global-properties -->
<context id="_webassembly-module-methods" style-ref="js:built-in-method">
<keyword>customSections</keyword>
<keyword>exports</keyword>
<keyword>imports</keyword>
</context> <!-- /_webassembly-module-methods -->
<context id="_webassembly-memory-properties" style-ref="js:built-in-property">
<keyword>buffer</keyword>
</context> <!-- /_webassembly-memory-properties -->
<context id="_webassembly-memory-methods" style-ref="js:built-in-method">
<keyword>grow</keyword>
</context> <!-- /_webassembly-memory-methods -->
<context id="_webassembly-table-properties" style-ref="js:built-in-property">
<keyword>length</keyword>
</context> <!-- /_webassembly-table-properties -->
<context id="_webassembly-table-methods" style-ref="js:built-in-method">
<keyword>get</keyword>
<keyword>grow</keyword>
<keyword>set</keyword>
</context> <!-- /_webassembly-table-methods -->
</include>
</context> <!-- /properties-methods -->
</definitions>
</language>

View File

@ -0,0 +1,829 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Scott Martin <scott@coffeeblack.org>
Copyright (C) 2004 Scott Martin <scott@coffeeblack.org>
Copyright (C) 2005 Stef Walter (formerly Nate Nielsen) <stef@memberwebs.com>
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
Copyright (C) 2019 Jeffery To <jeffery.to@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="js" name="JavaScript" version="2.0" _section="Script">
<metadata>
<property name="mimetypes">application/javascript;application/x-javascript;text/x-javascript;text/javascript;text/x-js</property>
<property name="globs">*.js</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<!-- General -->
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="doc-comment" name="Documentation comment" map-to="def:doc-comment"/>
<style id="error" name="Error" map-to="def:error"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="reserved-word" name="Reserved word" map-to="def:reserved"/>
<style id="directive" name="Directive" map-to="def:preprocessor"/>
<!-- Literals -->
<style id="null-value" name="Null value" map-to="def:special-constant"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="decimal" name="Decimal number" map-to="def:decimal"/>
<style id="base-n-integer" name="Base-n integer" map-to="def:base-n-integer"/>
<style id="binary-integer" name="Binary integer" map-to="js:base-n-integer"/>
<style id="octal-integer" name="Octal integer" map-to="js:base-n-integer"/>
<style id="hex-integer" name="Hexadecimal integer" map-to="js:base-n-integer"/>
<style id="escape" name="Escaped character" map-to="def:special-char"/>
<style id="string" name="String" map-to="def:string"/>
<style id="included-file" name="Included file" map-to="js:string"/>
<style id="regex" name="Regular expression" map-to="def:string"/>
<style id="regex-class" name="RE character class" map-to="def:special-char"/>
<style id="regex-group" name="RE group name" map-to="def:identifier"/>
<style id="regex-flag" name="RE flag" map-to="def:special-constant"/>
<style id="template-literal" name="Template literal" map-to="js:string"/>
<style id="template-placeholder" name="Template placeholder" map-to="def:preprocessor"/>
<!-- Built-in values -->
<style id="built-in-value" name="Built-in value" map-to="def:special-constant"/>
<style id="built-in-function" name="Built-in function" map-to="def:builtin"/>
<style id="built-in-constructor" name="Built-in constructor" map-to="def:type"/>
<style id="built-in-object" name="Built-in object" map-to="def:builtin"/>
<style id="built-in-property" name="Built-in property" map-to="def:statement"/>
<style id="built-in-method" name="Built-in method" map-to="js:built-in-function"/>
<!-- The following are for debugging use -->
<!-- General -->
<style id="identifier" name="Identifier"/>
<style id="rest-syntax" name="Rest syntax"/>
<style id="spread-syntax" name="Spread syntax"/>
<style id="array-destructuring" name="Array destructuring"/>
<style id="object-destructuring" name="Object destructuring"/>
<!-- Literals -->
<style id="array-literal" name="Array literal"/>
<style id="object-literal" name="Object literal"/>
<!-- Functions and classes -->
<style id="function-expression" name="Function expression"/>
<style id="class-expression" name="Class expression"/>
<!-- Expressions -->
<style id="grouping" name="Grouping"/>
<style id="grouping-operator" name="Grouping operator"/>
<style id="increment-decrement-operator" name="Increment decrement operator"/>
<style id="unary-operator" name="Unary operator"/>
<style id="binary-operator" name="Binary operator"/>
<style id="comma-operator" name="Comma operator"/>
<style id="ternary-operator" name="Ternary operator"/>
<style id="expression" name="Expression"/>
<!-- Statements -->
<style id="block-statement" name="Block statement"/>
<style id="break-statement" name="Break statement"/>
<style id="continue-statement" name="Continue statement"/>
<style id="debugger-statement" name="Debugger statement"/>
<style id="expression-statement" name="Expression statement"/>
<style id="for-statement" name="For statement"/>
<style id="if-statement" name="If statement"/>
<style id="else-statement" name="Else statement"/>
<style id="label-statement" name="Label statement"/>
<style id="return-statement" name="Return statement"/>
<style id="switch-statement" name="Switch statement"/>
<style id="throw-statement" name="Throw statement"/>
<style id="try-catch-statement" name="Try catch statement"/>
<style id="variable-declaration" name="Variable declaration"/>
<style id="while-statement" name="While statement"/>
<style id="with-statement" name="With statement"/>
<!-- Modules -->
<style id="export-import-declaration" name="Export import declaration"/>
</styles>
<!-- from identifier-char -->
<keyword-char-class>[\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{00B7}\x{0387}\x{1369}-\x{1371}\x{19DA}$\x{200C}\x{200D}]</keyword-char-class>
<definitions>
<!--
"Tags" (e.g. <Script>) or section numbers (e.g. 13.2 Block)
inside comments refer to relevant productions or sections from
the ECMAScript Language Specification, respectively.
Current draft: https://tc39.es/ecma262/
Supported level: ES2020
Supported ES2021 proposals:
* (none yet)
Features from Annex B of the spec are not highlighted to
discourage their use, except:
* Legacy octal number literals: Highlighted as errors to
reduce accidental usage
* Legacy octal escape sequences: Highlighted as normal escapes
as they are inside strings; the string and error styles may
conflict with each other
Not supported yet:
* SharedArrayBuffer and Atomics (ES2017): Browser support is
minimal / disabled to mitigate speculative side-channel
attacks (Meltdown / Spectre)
* RegExp lookbehind assertions (ES2018): Lookahead assertions
are not highlighted either
Also supported:
* ECMAScript Internationalization API
Current draft: https://tc39.es/ecma402/
Supported level: 2018
* WebAssembly JavaScript Interface
Editor's draft: https://webassembly.github.io/spec/js-api/
Supported level: Candidate Recommendation, 18 July 2019
* WebAssembly Web API
Editor's draft: https://webassembly.github.io/spec/web-api/
Supported level: Candidate Recommendation, 18 July 2019
Naming convention for contexts:
* Prefixes:
* "_" (underscore): "Private" to one or more "public"
contexts (can still be overriden by child languages)
* "ordered-": Wrapper for another context so that it can only
match in a referenced position (has once-only="true")
* "last-": An "ordered-" wrapper with end-parent="true",
which will end the parent under all circumstances
* "choice-": One option in a group where only one can be
selected (has end-parent="true")
* Suffixes:
* Plural: Can match multiple times
* Singular: Has once-only="true"
* "-end-parent": Has end-parent="true"
* "-no-extend-parent": Has extend-parent="false"
* "-content": Holds children of container contexts
End-parent contexts are container contexts to avoid the
end-parent bug:
https://gitlab.gnome.org/GNOME/gtksourceview/issues/14
-->
<!-- # General -->
<!-- <UnicodeEscapeSequence> -->
<define-regex id="unicode-escape" extended="true">
(?: \\u (?: [0-9a-fA-F]{4} | \{ [0-9a-fA-F]{1,} \} ) )
</define-regex> <!-- /unicode-escape -->
<!-- <IdentifierStart> -->
<define-regex id="identifier-start" extended="true">
(?: \%{def:unicode-id-start} | [$_] | \%{unicode-escape} )
</define-regex> <!-- /identifier-start -->
<!-- for lookbehinds
U+200C Zero-width non-joiner <ZWNJ>
U+200D Zero-width joiner <ZWJ>
-->
<define-regex id="identifier-char" extended="true">
(?: \%{def:unicode-id-continue} | [$\x{200C}\x{200D}] )
</define-regex> <!-- /identifier-char -->
<!-- <IdentifierPart> -->
<define-regex id="identifier-part" extended="true">
(?: \%{identifier-char} | \%{unicode-escape} )
</define-regex> <!-- /identifier-part -->
<!-- <IdentifierName> -->
<define-regex id="identifier" extended="true">
(?: \%{identifier-start} \%{identifier-part}* )
</define-regex> <!-- /identifier-->
<!-- <WhiteSpace> -->
<!-- does not include characters from <LineTerminator>,
to only allow space separators when we want match a
"whitespace" character
U+0009 Character tabulation <TAB>
U+000B Line tabulation <VT>
U+000C Form feed <FF>
U+0020 Space <SP>
U+00A0 No-break space <NBSP>
U+FEFF Zero width no-break space <ZWNBSP>
Zs Space_Separator category <USP>
-->
<define-regex id="whitespace" extended="true">
[\t\x{000B}\f \x{00A0}\x{FEFF}\p{Zs}]
</define-regex> <!-- /whitespace -->
<!-- includes characters from <LineTerminator>,
to ignore line terminators when we want to match a "not
whitespace" character
U+000A Line feed <LF>
U+000D Carriage return <CR>
U+2028 Line separator <LS>
U+2029 Paragraph separator <PS>
-->
<define-regex id="not-whitespace" extended="true">
[^\t\x{000B}\f \x{00A0}\x{FEFF}\p{Zs}\n\r\x{2028}\x{2029}]
</define-regex> <!-- /not-whitespace -->
<define-regex id="before-next-token" extended="true">
(?= \%{not-whitespace} )
</define-regex> <!-- /before-next-token -->
<define-regex id="statement-end" extended="true">
(?: ; | \%{before-next-token} )
</define-regex> <!-- /statement-end -->
<define-regex id="statement-end-or-end-of-line" extended="true">
(?: \%{statement-end} | $ )
</define-regex> <!-- /statement-end-or-end-of-line -->
<!-- wherever this is used, the highlighting will be more brittle,
because comments can span multiple lines -->
<define-regex id="optional-whitespace-or-comments" extended="true">
(?&gt; (?: \%{whitespace}+ | /\*.*?\*/ )* )
</define-regex> <!-- /optional-whitespace-or-comments -->
<define-regex id="generator-modifier">\*</define-regex>
<!-- "unknown id" errors can occur when using a regex defined in one
component file in another component file
https://gitlab.gnome.org/GNOME/gtksourceview/issues/67
so we move the definitions of these regexes here
-->
<define-regex id="import-function-keyword-suffix" extended="true">
(?:
\%{optional-whitespace-or-comments}
\(
)
</define-regex> <!-- /import-function-keyword-suffix -->
<define-regex id="new-target-object-keyword-suffix" extended="true">
(?:
\%{optional-whitespace-or-comments}
\.
\%{optional-whitespace-or-comments}
target \%]
)
</define-regex> <!-- /new-target-object-keyword-suffix -->
<!-- async function (ES2017)
no line terminator allowed between "async" and "function" -->
<define-regex id="function-expression-keyword" extended="true">
(?:
(?:
\%[ async \%]
\%{optional-whitespace-or-comments}
)?
\%[ function \%]
)
</define-regex> <!-- /function-expression-keyword -->
<define-regex id="class-expression-keyword" extended="true">
(?: \%[ class \%] )
</define-regex> <!-- /class-expression-keyword -->
<!-- ## Embedded lang hooks
a placeholder context where an embedding language (e.g. html)
can <replace>
-->
<context id="embedded-lang-hooks"/>
<!-- ## Comments -->
<context id="_comment-content" class-disabled="no-spell-check">
<include>
<context ref="embedded-lang-hooks"/>
<context ref="def:in-comment"/>
</include>
</context> <!-- /_comment-content -->
<!-- line continuations are not allowed inside single-line comments -->
<context id="_single-line-comments" style-ref="comment" end-at-line-end="true" class-disabled="no-spell-check" class="comment">
<start>//</start>
<include>
<context ref="_comment-content"/>
</include>
</context> <!-- /_single-line-comments -->
<context id="_multiline-comments" style-ref="comment" class-disabled="no-spell-check" class="comment">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="_comment-content"/>
</include>
</context> <!-- /_multiline-comments -->
<context id="_single-line-comments-no-extend-parent" style-ref="comment" end-at-line-end="true" class-disabled="no-spell-check" class="comment" extend-parent="false">
<start>//</start>
<include>
<context ref="_comment-content"/>
</include>
</context> <!-- /_single-line-comments-no-extend-parent -->
<context id="_multiline-comments-no-extend-parent" style-ref="comment" class-disabled="no-spell-check" class="comment" extend-parent="false">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="_comment-content"/>
</include>
</context> <!-- /_multiline-comments-no-extend-parent -->
<context id="_jsdoc-embedded-lang-hooks">
<include>
<context ref="embedded-lang-hooks"/>
<context end-parent="true">
<start>(?=\*/)</start>
<end>\%{def:always-match}</end>
</context>
<context ref="jsdoc:embedded-lang-hooks" original="true"/>
</include>
</context> <!-- /_jsdoc-embedded-lang-hooks -->
<replace id="jsdoc:embedded-lang-hooks" ref="_jsdoc-embedded-lang-hooks"/>
<context id="_doc-comment-content">
<include>
<context ref="_comment-content"/>
<context ref="jsdoc:jsdoc"/>
</include>
</context> <!-- /_doc-comment-content -->
<context id="_doc-comments" style-ref="doc-comment" class-disabled="no-spell-check" class="comment">
<start>/\*\*(?![\*/])</start>
<end>\*/</end>
<include>
<context ref="_doc-comment-content"/>
</include>
</context> <!-- /_doc-comments -->
<context id="_doc-comments-no-extend-parent" style-ref="doc-comment" class-disabled="no-spell-check" class="comment" extend-parent="false">
<start>/\*\*(?![\*/])</start>
<end>\*/</end>
<include>
<context ref="_doc-comment-content"/>
</include>
</context> <!-- /_doc-comments-no-extend-parent -->
<context id="comments">
<include>
<context ref="_single-line-comments"/>
<context ref="_doc-comments"/>
<context ref="_multiline-comments"/>
<context ref="def:c-like-close-comment-outside-comment" style-ref="error"/>
</include>
</context> <!-- /comments -->
<!-- for statements that cannot contain line terminators -->
<context id="comments-no-extend-parent">
<include>
<context ref="_single-line-comments-no-extend-parent"/>
<context ref="_doc-comments-no-extend-parent"/>
<context ref="_multiline-comments-no-extend-parent"/>
<context ref="def:c-like-close-comment-outside-comment" style-ref="error"/>
</include>
</context> <!-- /comments-no-extend-parent -->
<!-- ## Identifiers -->
<!-- <ReservedWord> -->
<context id="_reserved-words">
<include>
<!-- <Keyword> -->
<context id="_keywords" style-ref="reserved-word">
<keyword>await</keyword> <!-- ES2017 -->
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
<keyword>class</keyword>
<keyword>const</keyword>
<keyword>continue</keyword>
<keyword>debugger</keyword>
<keyword>default</keyword>
<keyword>delete</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>export</keyword>
<keyword>extends</keyword>
<keyword>finally</keyword>
<keyword>for</keyword>
<keyword>function</keyword>
<keyword>if</keyword>
<keyword>import</keyword>
<keyword>instanceof</keyword>
<keyword>in</keyword>
<keyword>new</keyword>
<keyword>return</keyword>
<keyword>super</keyword>
<keyword>switch</keyword>
<keyword>this</keyword>
<keyword>throw</keyword>
<keyword>try</keyword>
<keyword>typeof</keyword>
<keyword>var</keyword>
<keyword>void</keyword>
<keyword>while</keyword>
<keyword>with</keyword>
<keyword>yield</keyword> <!-- allowed as a variable name in non-strict mode -->
</context> <!-- /_keywords -->
<!-- "treated as reserved words through static semantic
restrictions"
https://tc39.github.io/ecma262/#sec-keywords -->
<context id="_strict-mode-keywords" style-ref="reserved-word">
<keyword>let</keyword>
<keyword>static</keyword>
</context> <!-- /_strict-mode-keywords -->
<!-- <FutureReservedWord> -->
<context id="_future-reserved-words" style-ref="reserved-word">
<keyword>enum</keyword>
</context> <!-- /_future-reserved-words -->
<!-- usage in strict mode "restricted using static semantic
restrictions"
https://tc39.github.io/ecma262/#sec-future-reserved-words -->
<context id="_strict-mode-future-reserved-words" style-ref="reserved-word">
<keyword>implements</keyword>
<keyword>interface</keyword>
<keyword>package</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
</context> <!-- /_strict-mode-future-reserved-words -->
<context ref="js-lit:null-value" style-ref="reserved-word"/>
<context ref="js-lit:boolean" style-ref="reserved-word"/>
</include>
</context> <!-- /_reserved-words -->
<context id="_identifier-names" style-ref="identifier">
<match>\%{identifier}</match>
</context> <!-- /_identifier-names -->
<context id="_identifier-name-content">
<include>
<context ref="_identifier-names"/>
</include>
</context> <!-- /_identifier-name-content -->
<context id="identifier-name" once-only="true">
<start>(?=\%{identifier-start})</start>
<end>\%{def:always-match}</end>
<include>
<!-- no embedded-lang-hooks here -->
<!-- no comments here -->
<!-- do not extend the context by matching comments or
embedded-lang-hooks, which may lead to multiple identifiers -->
<context ref="_identifier-name-content"/>
</include>
</context> <!-- /choice-identifier-name -->
<context id="choice-identifier-name" end-parent="true">
<start>(?=\%{identifier-start})</start>
<end>\%{def:always-match}</end>
<include>
<!-- no embedded-lang-hooks here -->
<!-- no comments here -->
<!-- do not extend the context by matching comments or
embedded-lang-hooks, which may lead to multiple identifiers -->
<context ref="_identifier-name-content"/>
</include>
</context> <!-- /choice-identifier-name -->
<context id="_identifier-content">
<include>
<context ref="_reserved-words"/>
<context ref="_identifier-names"/>
</include>
</context> <!-- /_identifier-content -->
<context id="identifier" once-only="true">
<start>(?=\%{identifier-start})</start>
<end>\%{def:always-match}</end>
<include>
<!-- no embedded-lang-hooks here -->
<!-- no comments here -->
<!-- do not extend the context by matching comments or
embedded-lang-hooks, which may lead to multiple identifiers -->
<context ref="_identifier-content"/>
</include>
</context> <!-- /identifier -->
<context id="choice-identifier" end-parent="true">
<start>(?=\%{identifier-start})</start>
<end>\%{def:always-match}</end>
<include>
<!-- no embedded-lang-hooks here -->
<!-- no comments here -->
<!-- do not extend the context by matching comments or
embedded-lang-hooks, which may lead to multiple identifiers -->
<context ref="_identifier-content"/>
</include>
</context> <!-- /choice-identifier -->
<context id="ordered-identifier" once-only="true">
<start>\%{before-next-token}</start>
<end>\%{before-next-token}</end>
<include>
<context ref="identifier"/>
</include>
</context> <!-- /ordered-identifier -->
<!-- ## Default value assignment -->
<!-- <Initializer> -->
<context id="_default-value-assignment" once-only="true">
<start>=</start>
<end>\%{before-next-token}</end>
<include>
<context ref="embedded-lang-hooks"/>
<context ref="comments"/>
<context id="_default-value-assignment-content">
<include>
<context ref="js-expr:expression-without-comma"/>
</include>
</context> <!-- /_default-value-assignment-content -->
</include>
</context> <!-- /_default-value-assignment -->
<context id="ordered-default-value-assignment" once-only="true">
<start>\%{before-next-token}</start>
<end>\%{before-next-token}</end>
<include>
<context ref="_default-value-assignment"/>
</include>
</context> <!-- /ordered-default-value-assignment -->
<!-- ## Misc syntax -->
<context id="_keyword-dot" style-ref="keyword" once-only="true">
<match>\.</match>
</context> <!-- /_keyword-dot -->
<context id="ordered-keyword-dot" once-only="true">
<start>\%{before-next-token}</start>
<end>\%{before-next-token}</end>
<include>
<context ref="_keyword-dot"/>
</include>
</context> <!-- /ordered-keyword-dot -->
<context id="_rest-syntax" style-ref="rest-syntax" once-only="true">
<match>\.\.\.</match>
</context> <!-- /_rest-syntax -->
<context id="ordered-rest-syntax" once-only="true">
<start>\%{before-next-token}</start>
<end>\%{before-next-token}</end>
<include>
<context ref="_rest-syntax"/>
</include>
</context> <!-- /ordered-rest-syntax -->
<context id="_spread-syntax" style-ref="spread-syntax" once-only="true">
<match>\.\.\.</match>
</context> <!-- /_spread-syntax -->
<context id="ordered-spread-syntax" once-only="true">
<start>\%{before-next-token}</start>
<end>\%{before-next-token}</end>
<include>
<context ref="_spread-syntax"/>
</include>
</context> <!-- /ordered-spread-syntax -->
<context id="generator-modifier" once-only="true">
<match>\%{generator-modifier}</match>
</context> <!-- /generator-modifier -->
<context id="ordered-generator-modifier" once-only="true">
<start>\%{before-next-token}</start>
<end>\%{before-next-token}</end>
<include>
<context ref="generator-modifier"/>
</include>
</context> <!-- /ordered-generator-modifier -->
<!-- # Assignment target -->
<!-- ## Array destructuring
[ a, b, ...rest ] = [ 1, 2, 3, 4 ]
[ a = 1, b = 2, c = 3 ] = [ 11, 12 ]
-->
<context id="_array-destructuring-element-content">
<include>
<context ref="ordered-rest-syntax"/>
<context ref="ordered-assignment-target"/>
<context ref="ordered-default-value-assignment"/>
</include>
</context> <!-- /_array-destructuring-element-content -->
<!-- <ArrayBindingPattern> -->
<context id="_choice-array-destructuring" style-ref="array-destructuring" end-parent="true">
<start>\[</start>
<end>]</end>
<include>
<context ref="embedded-lang-hooks"/>
<context ref="comments"/>
<context id="_array-destructuring-content">
<include>
<context id="_array-destructuring-first-element" once-only="true">
<start>\%{before-next-token}</start>
<end>\%{before-next-token}</end>
<include>
<context ref="embedded-lang-hooks"/>
<context ref="comments"/>
<context ref="_array-destructuring-element-content"/>
</include>
</context> <!-- /_array-destructuring-first-element -->
<context id="_array-destructuring-elements">
<start>,</start>
<end>\%{before-next-token}</end>
<include>
<context ref="embedded-lang-hooks"/>
<context ref="comments"/>
<context ref="_array-destructuring-element-content"/>
</include>
</context> <!-- /_array-destructuring-elements -->
</include>
</context> <!-- /_array-destructuring-content -->
</include>
</context> <!-- /_choice-array-destructuring -->
<!-- ## Object destructuring
{ a, y: b, ...rest } = { a: 1, y: 2, i: 3, y: 4 }
{ a = 1, y: b = 2, c = 3 } = { a: 11, y: 12 }
-->
<context id="_object-destructuring-assignment-target" once-only="true">
<start>:</start>
<end>\%{before-next-token}</end>
<include>
<context ref="embedded-lang-hooks"/>
<context ref="comments"/>
<context id="_object-destructuring-assignment-target-content">
<include>
<context ref="ordered-assignment-target"/>
</include>
</context> <!-- /_object-destructuring-assignment-target-content -->
</include>
</context> <!-- /_object-destructuring-assignment-target -->
<context id="_ordered-object-destructuring-assignment-target" once-only="true">
<start>\%{before-next-token}</start>
<end>\%{before-next-token}</end>
<include>
<context ref="_object-destructuring-assignment-target"/>
</include>
</context> <!-- /_ordered-object-destructuring-assignment-target -->
<context id="_object-destructuring-property-content">
<include>
<context ref="ordered-rest-syntax"/> <!-- ES2018 -->
<context ref="js-lit:ordered-property-name"/>
<context ref="_ordered-object-destructuring-assignment-target"/>
<context ref="ordered-default-value-assignment"/>
</include>
</context> <!-- /_object-destructuring-property-content -->
<!-- <ObjectBindingPattern> -->
<context id="_choice-object-destructuring" style-ref="object-destructuring" end-parent="true">
<start>{</start>
<end>}</end>
<include>
<context ref="embedded-lang-hooks"/>
<context ref="comments"/>
<context id="_object-destructuring-content">
<include>
<context id="_object-destructuring-first-property" once-only="true">
<start>\%{before-next-token}</start>
<end>\%{before-next-token}</end>
<include>
<context ref="embedded-lang-hooks"/>
<context ref="comments"/>
<context ref="_object-destructuring-property-content"/>
</include>
</context> <!-- /_object-destructuring-properties -->
<context id="_object-destructuring-properties">
<start>,</start>
<end>\%{before-next-token}</end>
<include>
<context ref="embedded-lang-hooks"/>
<context ref="comments"/>
<context ref="_object-destructuring-property-content"/>
</include>
</context> <!-- /_object-destructuring-properties -->
</include>
</context> <!-- /_object-destructuring-content -->
</include>
</context> <!-- /_choice-object-destructuring -->
<!-- ## Assignment target
Things that can appear on the left side of an equals sign
(identifier or array/object destructuring assignment), in all
places (function parameters, variable declaration) *except* in
assignment expressions (array/object literals will match for
array/object destructuring)
-->
<!-- <VariableDeclaration> / <LexicalBinding> -->
<context id="_assignment-target" once-only="true">
<start>\%{before-next-token}</start>
<end>\%{before-next-token}</end>
<include>
<context ref="embedded-lang-hooks"/>
<context ref="comments"/>
<context id="_assignment-target-content">
<include>
<context ref="_choice-array-destructuring"/>
<context ref="_choice-object-destructuring"/>
<context ref="choice-identifier"/>
</include>
</context> <!-- /_assignment-target-content -->
</include>
</context> <!-- /_assignment-target -->
<context id="ordered-assignment-target" once-only="true">
<start>\%{before-next-token}</start>
<end>\%{before-next-token}</end>
<include>
<context ref="_assignment-target"/>
</include>
</context> <!-- /ordered-assignment-target -->
<!-- Approximate code order for component files:
* javascript-literals.lang
* javascript-values.lang
* javascript-functions-classes.lang
* javascript-expressions.lang
* javascript-statements.lang
* javascript-modules.lang
-->
<!-- # Main context -->
<context id="js" class="no-spell-check">
<include>
<context ref="embedded-lang-hooks"/>
<context ref="comments"/>
<context ref="js-st:directives"/>
<context ref="js-mod:export-declarations"/>
<context ref="js-mod:import-declarations"/>
<context ref="js-st:statements"/>
</include>
</context> <!-- /js -->
</definitions>
</language>

View File

@ -0,0 +1,265 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Jeffery To <jeffery.to@gmail.com>
Copyright (C) 2019 Jeffery To <jeffery.to@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="jsdoc" name="JSDoc" version="2.0" _section="Markup" hidden="true">
<styles>
<style id="inline-tag" name="Inline tag" map-to="def:doc-comment-element"/>
<style id="type" name="Type" map-to="def:doc-comment-element"/>
<style id="block-tag" name="Block tag" map-to="def:doc-comment-element"/>
<style id="note" name="Note" map-to="def:note"/>
<style id="argument" name="Argument" map-to="def:doc-comment-element"/>
<style id="event" name="Event" map-to="jsdoc:argument"/>
<style id="keyword" name="Keyword" map-to="jsdoc:argument"/>
<style id="namepath" name="Namepath" map-to="jsdoc:argument"/>
<style id="escape" name="Escape"/>
</styles>
<!-- from js:identifier-char -->
<keyword-char-class>[\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{00B7}\x{0387}\x{1369}-\x{1371}\x{19DA}$\x{200C}\x{200D}]</keyword-char-class>
<definitions>
<!--
Based on:
* JSDoc 3
https://jsdoc.app/
* Google Closure Compiler
https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler
* TSDoc
https://github.com/microsoft/tsdoc
https://api-extractor.com/pages/tsdoc/doc_comment_syntax/
-->
<context id="embedded-lang-hooks"/>
<context id="escape" style-ref="escape">
<match>\\[@{}]</match>
</context>
<context id="inline-tag" style-ref="inline-tag" end-at-line-end="true">
<start>\{@</start>
<end>\}</end>
<include>
<context ref="embedded-lang-hooks"/>
<context ref="escape"/>
<context ref="def:in-comment"/>
</include>
</context>
<context id="type" style-ref="type" end-at-line-end="true">
<start>\{</start>
<end>\}</end>
<include>
<context ref="embedded-lang-hooks"/>
<context ref="escape"/>
<context ref="def:in-comment"/>
</include>
</context>
<!-- Block tags -->
<define-regex id="argument">[^\s@{*][^\s*]*</define-regex>
<context id="argument" style-ref="argument" end-parent="true">
<start>\%{argument}</start>
<end>\%{def:always-match}</end>
</context>
<context id="argument-block-tag" end-at-line-end="true">
<start extended="true">
@
(?:
default |
tutorial |
variation
)
\%]
</start>
<end>(?=\S)</end>
<include>
<context sub-pattern="0" where="start" style-ref="block-tag"/>
<context ref="embedded-lang-hooks"/>
<context ref="argument"/>
</include>
</context>
<context id="event-block-tag" end-at-line-end="true">
<start extended="true">
@
(?:
emits |
event |
fires |
listens
)
\%]
</start>
<end>(?=\S)</end>
<include>
<context sub-pattern="0" where="start" style-ref="block-tag"/>
<context ref="embedded-lang-hooks"/>
<context ref="argument" style-ref="event"/>
</include>
</context>
<context id="keyword-block-tag" end-at-line-end="true">
<start extended="true">
@
(?:
access |
kind
)
\%]
</start>
<end>(?=\S)</end>
<include>
<context sub-pattern="0" where="start" style-ref="block-tag"/>
<context ref="embedded-lang-hooks"/>
<context ref="argument" style-ref="keyword"/>
</include>
</context>
<context id="namepath-block-tag" end-at-line-end="true">
<start extended="true">
@
(?:
memberof! |
(?:
alias |
augments |
callback |
constructs |
exports |
extends |
external |
function |
func |
host |
interface |
lends |
memberof |
method |
mixes |
mixin |
name |
requires |
template | # closure compiler
typeParam | # tsdoc
this
)
\%]
)
</start>
<end>(?=\S)</end>
<include>
<context sub-pattern="0" where="start" style-ref="block-tag"/>
<context ref="embedded-lang-hooks"/>
<context ref="argument" style-ref="namepath"/>
</include>
</context>
<context id="type-namepath-block-tag" end-at-line-end="true">
<start extended="true">
@
(?:
argument |
arg |
class |
constant |
constructor |
const |
member |
module |
namespace |
param |
property |
prop |
typedef |
var
)
\%]
</start>
<end>(?=\S)</end>
<include>
<context sub-pattern="0" where="start" style-ref="block-tag"/>
<context ref="embedded-lang-hooks"/>
<context ref="type"/>
<context ref="argument" style-ref="namepath"/>
</include>
</context>
<context id="borrows-block-tag" end-at-line-end="true">
<start>@borrows\%]</start>
<end>(?=\S)</end>
<include>
<context sub-pattern="0" where="start" style-ref="block-tag"/>
<context ref="embedded-lang-hooks"/>
<context style-ref="namepath" once-only="true">
<match>\%{argument}</match>
</context>
<context end-parent="true">
<start>\%[as\%]</start>
<end>(?=\S)</end>
<include>
<context ref="argument" style-ref="namepath"/>
</include>
</context>
</include>
</context>
<context id="note-block-tag" style-ref="block-tag">
<match>@todo\%]</match>
<include>
<context sub-pattern="0" style-ref="note"/>
</include>
</context>
<context id="block-tag" style-ref="block-tag">
<match>@\%{js:identifier}</match>
</context>
<!-- Main context -->
<context id="jsdoc">
<include>
<context ref="escape"/>
<context ref="inline-tag"/>
<context ref="type"/>
<context ref="argument-block-tag"/>
<context ref="event-block-tag"/>
<context ref="keyword-block-tag"/>
<context ref="namepath-block-tag"/>
<context ref="type-namepath-block-tag"/>
<context ref="borrows-block-tag"/>
<context ref="note-block-tag"/>
<context ref="block-tag"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Sapphire Becker <guess@logicplace.com>
Copyright (C) 2011 by Sapphire Becker <guess@logicplace.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<!--
TODO:
If once-only or end-parent is ever supported for context-reference and
context-to-be-included elements this can be updated to allow only one
value in the doc, after a key, and between each comma in an array. Also
I'd be able to add support for displaying an error for trailing commas.
-->
<language id="json" name="JSON" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">application/json</property>
<property name="globs">*.json;*.geojson;*.topojson</property>
</metadata>
<styles>
<style id="keyname" name="Key" map-to="def:constant"/>
<style id="special-char" name="Escaped Character" map-to="js:escape"/>
<style id="string" name="String" map-to="js:string"/>
<style id="null-value" name="Null Value" map-to="js:null-value"/>
<style id="boolean" name="Boolean Value" map-to="js:boolean"/>
<style id="error" name="Error" map-to="def:error"/>
<style id="decimal" name="Decimal" map-to="def:decimal"/>
<style id="float" name="Floating point number" map-to="def:floating-point"/>
</styles>
<definitions>
<context id="array">
<start>\[</start>
<end>\]</end>
<include>
<context>
<start></start>
<end>,|\s*(?=\&#93;)</end>
<include>
<context ref="value"/>
</include>
</context>
</include>
</context>
<context id="object">
<start>\{</start>
<end>\}</end>
<include>
<context ref="string" style-ref="keyname"/>
<context>
<start>:</start>
<end>,|\s*(?=})</end>
<include>
<context sub-pattern="0" where="start" style-ref="keyname"/>
<context ref="value"/>
</include>
</context>
<context ref="catchall"/>
</include>
</context>
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context id="valid-escape" style-ref="special-char">
<match>\\(?:[ntrfb"\\/]|u[0-9a-fA-F]{4})</match>
</context>
<context id="invalid-escape" style-ref="error">
<match>\\(?:x[0-9a-fA-F]{2}|[0-3]?[0-7]{1,2}|.)</match>
</context>
<context id="line-continue" style-ref="error">
<start>\\$</start>
<end>^</end>
</context>
</include>
</context>
<context id="decimal" style-ref="decimal">
<match>-?(?:[1-9][0-9]*|0)(?![.eE])</match>
</context>
<context id="float" style-ref="float">
<match>-?(?:[1-9][0-9]*|0)(?:\.[0-9]+)?(?:[eE][+\-]?[0-9]+)?</match>
</context>
<context id="catchall" style-ref="error" extend-parent="false">
<match>\S</match>
</context>
<context id="value"><include>
<context ref="object"/>
<context ref="array"/>
<context ref="string"/>
<context ref="decimal"/>
<context ref="float"/>
<context ref="js-lit:null-value" style-ref="null-value"/>
<context ref="js-lit:boolean" style-ref="boolean"/>
<context ref="catchall"/>
</include></context>
<context id="json" class="no-spell-check">
<include>
<context ref="value"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,378 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Jeffery To <jeffery.to@gmail.com>
Copyright (C) 2019 Jeffery To <jeffery.to@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="jsx" name="JSX" version="2.0" _section="Script">
<metadata>
<property name="mimetypes">application/jsx;application/x-jsx;text/x-jsx;text/jsx</property>
<property name="globs">*.jsx</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<style id="element" name="Element"/>
<style id="spread-attribute" name="Spread attribute"/>
<style id="attribute-expression" name="Attribute expression"/>
<style id="child-expression" name="Child expression"/>
</styles>
<!-- from js:identifier-char -->
<keyword-char-class>[\p{L}\p{Nl}\x{1885}-\x{1886}\x{2118}\x{212E}\x{309B}-\x{309C}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{00B7}\x{0387}\x{1369}-\x{1371}\x{19DA}$\x{200C}\x{200D}]</keyword-char-class>
<definitions>
<!-- Based on the JSX spec: https://github.com/facebook/jsx -->
<!-- using a style from another lang file before referencing a
context from the file causes "style not defined" errors
https://gitlab.gnome.org/GNOME/gtksourceview/issues/67
-->
<context id="style-not-defined-error-workaround">
<include>
<context ref="xml:xml"/>
</include>
</context> <!-- /style-not-defined-error-workaround -->
<!-- # General -->
<!-- reference js here to avoid "unknown id" error when referencing
a regex from js before referencing a context from js
https://gitlab.gnome.org/GNOME/gtksourceview/issues/67
-->
<context id="main-lang">
<include>
<context ref="js:js"/>
</include>
</context> <!-- /main-lang -->
<define-regex id="_start-tag-start">(?:&lt;(?!/))</define-regex>
<!-- # Names -->
<define-regex id="_identifier-part" extended="true">
(?: \%{js:identifier-part} | - )
</define-regex> <!-- /_identifier-part -->
<!-- <JSXIdentifier> -->
<define-regex id="_identifier" extended="true">
\%{js:identifier-start} \%{_identifier-part}*
</define-regex> <!-- /_identifier -->
<context id="_identifier" once-only="true">
<match>\%{_identifier}</match>
</context> <!-- /_identifier -->
<context id="_choice-identifier" end-parent="true">
<start>(?=\%{js:identifier-start})</start>
<end>\%{_identifier}</end>
</context> <!-- /_choice-identifier -->
<!-- <JSXNamespacedName> -->
<define-regex id="_namespaced-name" extended="true">
(?: \%{_identifier} : \%{_identifier} )
</define-regex> <!-- /_namespaced-name -->
<context id="_choice-namespaced-name" end-parent="true">
<start>(?=\%{_namespaced-name})</start>
<end>\%{_namespaced-name}</end>
</context> <!-- /_choice-namespaced-name -->
<!-- <JSXMemberExpression> -->
<define-regex id="_member-expression" extended="true">
(?: \%{_identifier} (?: \. \%{_identifier} )+ )
</define-regex> <!-- /_member-expression -->
<context id="_choice-member-expression" end-parent="true">
<start>(?=\%{_member-expression})</start>
<end>\%{_member-expression}</end>
</context> <!-- /_choice-member-expression -->
<!-- # Element name -->
<!-- <JSXElementName> -->
<context id="_element-name" style-ref="xml:element-name" once-only="true">
<start>(?=\%{js:identifier-start})</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:comments"/>
<context id="_element-name-content">
<include>
<context ref="_choice-namespaced-name"/>
<context ref="_choice-member-expression"/>
<context ref="_choice-identifier"/>
</include>
</context> <!-- /_element-name-content -->
</include>
</context> <!-- /_element-name -->
<context id="_ordered-element-name" once-only="true">
<start>\%{js:before-next-token}</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="_element-name"/>
</include>
</context> <!-- /_ordered-element-name -->
<!-- # Attributes -->
<!-- ## Spread attributes -->
<!-- <JSXSpreadAttribute> -->
<context id="_spread-attributes" style-ref="spread-attribute">
<start>{</start>
<end>}</end>
<include>
<context ref="js:comments"/>
<context id="_spread-attribute-content">
<include>
<context ref="js:ordered-spread-syntax"/>
<context ref="js-expr:expression-without-comma"/>
</include>
</context> <!-- /_spread-attribute-content -->
</include>
</context> <!-- /_spread-attributes -->
<!-- ## Attribute name -->
<!-- <JSXAttributeName> -->
<context id="_attribute-names" style-ref="xml:attribute-name">
<start>(?=\%{js:identifier-start})</start>
<end>\%{js:before-next-token}</end>
<include>
<context ref="js:comments"/>
<context id="_attribute-name-content">
<include>
<context ref="_choice-namespaced-name"/>
<context ref="_choice-identifier"/>
</include>
</context> <!-- /_attribute-name-content -->
</include>
</context> <!-- /_attribute-names -->
<!-- ## Attribute value -->
<!-- <JSXAttributeValue> (part of) -->
<context id="_choice-attribute-value-string" style-ref="xml:attribute-value" end-parent="true" class="string" class-disabled="no-spell-check">
<start>["']</start>
<end>\%{0@start}</end>
<include>
<!-- no comments here -->
<context id="_attribute-value-string-content">
<include>
<!-- javascript escapes do not appear to be parsed here
but xml entities / character references appear to be
parsed -->
<context ref="xml:entity"/>
<context ref="xml:character-reference"/>
</include>
</context> <!-- /_attribute-value-string-content -->
</include>
</context> <!-- /_choice-attribute-value-string -->
<!-- <JSXAttributeValue> (part of) -->
<context id="_choice-attribute-value-expression" style-ref="attribute-expression" end-parent="true">
<start>{</start>
<end>}</end>
<include>
<context ref="js:comments"/>
<context id="_attribute-value-expression-content">
<include>
<!-- no spread syntax here -->
<context ref="js-expr:expression-without-comma"/>
</include>
</context> <!-- /_attribute-value-expression-content -->
</include>
</context> <!-- /_choice-attribute-value-expression -->
<!-- ## Attribute initializer -->
<!-- <JSXAttributeInitializer> -->
<context id="_attribute-initializers">
<start>=</start>
<end>\%{js:before-next-token}</end>
<include>
<context sub-pattern="0" where="start" style-ref="xml:attribute-name"/>
<context ref="js:comments"/>
<context id="_attribute-initializer-content">
<include>
<context ref="_choice-attribute-value-string"/>
<context ref="_choice-attribute-value-expression"/>
<context ref="choice-element"/>
</include>
</context> <!-- /_attribute-initializer-content -->
</include>
</context> <!-- /_attribute-initializers -->
<!-- # Element / fragment -->
<context id="_element-content">
<include>
<!-- ## Start tag -->
<!-- <JSXOpeningElement> / <JSXSelfClosingElement> -->
<context id="_start-tag-head" style-ref="xml:tag" once-only="true" class="no-spell-check">
<start>\%{_start-tag-start}</start>
<end>(?=/?&gt;)</end>
<include>
<context sub-pattern="0" where="start" style-ref="xml:element-name"/>
<context ref="js:comments"/>
<context id="_start-tag-head-content">
<include>
<context ref="_ordered-element-name"/>
<context ref="_spread-attributes"/>
<context ref="_attribute-names"/>
<context ref="_attribute-initializers"/>
</include>
</context> <!-- /_start-tag-head-content -->
</include>
</context> <!-- /_start-tag-head -->
<context id="_start-tag-tail-empty-element-end-parent" style-ref="xml:tag" end-parent="true" class="no-spell-check">
<start>(?=/&gt;)</start>
<end>/&gt;</end>
<include>
<context sub-pattern="0" where="end" style-ref="xml:element-name"/>
</include>
</context> <!-- /_start-tag-tail-empty-element-end-parent -->
<context id="_start-tag-tail" style-ref="xml:tag" once-only="true" class="no-spell-check">
<match>&gt;</match>
<include>
<context sub-pattern="0" style-ref="xml:element-name"/>
</include>
</context> <!-- /_start-tag-tail -->
<!-- ## End tag -->
<context id="_end-tag-end-parent" style-ref="xml:tag" end-parent="true" class="no-spell-check">
<start>&lt;/</start>
<end>&gt;</end>
<include>
<context sub-pattern="0" where="start" style-ref="xml:element-name"/>
<context sub-pattern="0" where="end" style-ref="xml:element-name"/>
<context ref="js:comments"/>
<context id="_end-tag-content">
<include>
<context ref="_ordered-element-name"/>
</include>
</context> <!-- /_end-tag-content -->
</include>
</context> <!-- /_end-tag-end-parent -->
<!-- ## Nested elements -->
<!-- <JSXElement> / <JSXFragment> -->
<context id="_elements" style-ref="element" class-disabled="no-spell-check">
<start>(?=\%{_start-tag-start})</start>
<include>
<!-- no comments here - comments appear to be parsed as regular
text -->
<context ref="_element-content"/>
</include>
</context> <!-- /_elements -->
<!-- ## Child expressions -->
<!-- <JSXChild> / <JSXChildExpression> -->
<context id="_child-expressions" style-ref="child-expression" class="no-spell-check">
<start>{</start>
<end>}</end>
<include>
<context ref="js:comments"/>
<context id="_child-expression-content">
<include>
<context ref="js:ordered-spread-syntax"/>
<context ref="js-expr:expression-without-comma"/>
</include>
</context> <!-- /_child-expression-content -->
</include>
</context> <!-- /_child-expressions -->
<!-- ## XML syntax -->
<!-- javascript escapes do not appear to be parsed here
but xml character entity / numeric character references
appear to be parsed -->
<context ref="xml:entity"/>
<context ref="xml:character-reference"/>
</include>
</context> <!-- /_element-content -->
<!-- <JSXElement> / <JSXFragment> -->
<context id="choice-element" style-ref="element" end-parent="true" class-disabled="no-spell-check">
<start>(?=\%{_start-tag-start})</start>
<include>
<!-- no comments here - comments appear to be parsed as regular
text -->
<context ref="_element-content"/>
</include>
</context> <!-- /choice-element -->
<!-- # Primary expression -->
<context id="_jsx-primary-expression-content">
<include>
<context ref="choice-element"/>
<context ref="js-expr:_primary-expression-content" original="true"/>
</include>
</context> <!-- /_jsx-primary-expression-content -->
<replace id="js-expr:_primary-expression-content" ref="_jsx-primary-expression-content"/>
<!-- # Main context -->
<context id="jsx" class="no-spell-check">
<include>
<context ref="main-lang"/>
</include>
</context> <!-- /jsx -->
</definitions>
</language>

View File

@ -0,0 +1,393 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Waldir Pimenta
Copyright (C) 2013 Waldir Pimenta <waldir@email.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="julia" name="Julia" version="2.0" _section="Scientific" >
<metadata>
<property name="globs" >*.jl</property>
<property name="line-comment-start" >#</property>
<property name="block-comment-start">#=</property>
<property name="block-comment-end">=#</property>
</metadata>
<!--
A list of styles can be defined here, and optionally mapped to the default styles.
The full list of available styles can be found in the `def.lang` file.
-->
<styles>
<style id="comment" name="Comment" map-to="def:comment" />
<style id="string" name="String" map-to="def:string" />
<style id="character" name="Character" map-to="def:character" />
<style id="number" name="Number" map-to="def:number" />
<style id="boolean" name="Boolean" map-to="def:boolean" />
<style id="math-constant" name="Math Constant" map-to="def:constant" />
<style id="special-constant" name="Special Constant" map-to="def:special-constant" />
<style id="operator" name="Operator" map-to="def:operator" />
<style id="keyword" name="Keyword" map-to="def:keyword" />
<style id="macro" name="Macro" map-to="def:preprocessor" />
<style id="external-command" name="External Command" map-to="def:constant" />
<style id="builtin-function" name="Built-in Function" map-to="def:builtin" />
<style id="module" name="Module" map-to="def:builtin" />
<style id="type" name="Type" map-to="def:type" />
</styles>
<definitions>
<context id="string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context ref="def:escape" />
</include>
</context>
<!--
This context needs to be defined before the "operator" context,
so it takes precedence over the transpose operator, '
-->
<context id="character" style-ref="character">
<match extended="true">
'(
([^\\']|\\.) |
\\[0-7]{1,3} |
\\x[0-9a-fA-F]{1,2} |
\\u[0-9a-fA-F]{1,3} |
\\u[0-9a-cA-C][0-9a-fA-F]{3} |
\\u[dD][0-7][0-9a-fA-F]{2} |
\\U[0-9a-fA-F]{1,5} |
\\U10[0-9a-fA-F]{4}
)'
</match>
</context>
<context id="number" style-ref="number">
<match extended="true">
(?&lt;!\w) 0b[01]+ | # binary
(?&lt;!\w) 0o[0-7]+ | # octal
(?&lt;!\w) 0x[0-9a-fA-F]+ | # hexadecimal
(?&lt;!\w) (\d+(\.\d+)?|\.\d+)([eE][+-]?\d+)? # decimal
</match>
</context>
<context id="boolean" style-ref="boolean">
<keyword>true|false</keyword>
</context>
<context id="math-constant" style-ref="math-constant">
<match extended="true">
(?&lt;=\d|\b) pi \b |
(?&lt;=\d|\b) e \b |
(?&lt;=\d|\b) im \b |
(?&lt;=\d|\b) Inf(32)? \b |
(?&lt;=\d|\b) NaN(32)? \b
</match>
</context>
<context id="special-constant" style-ref="special-constant">
<keyword>nothing</keyword>
<keyword>missing</keyword>
<!-- http://docs.julialang.org/en/latest/stdlib/constants/ -->
<keyword>ARGS</keyword>
<keyword>LOAD_PATH</keyword>
<keyword>CPU_CORES</keyword>
<keyword>OS_NAME</keyword>
<keyword>C_NULL</keyword>
<keyword>WORD_SIZE</keyword>
<keyword>VERSION</keyword>
<!-- exports.jl -->
<keyword>ENDIAN_BOM</keyword>
<keyword>ENV</keyword>
<keyword>stderr</keyword>
<keyword>stdin</keyword>
<keyword>stdout</keyword>
<!-- type-related -->
<keyword>T</keyword>
<keyword>ANY</keyword>
</context>
<!-- http://docs.julialang.org/en/latest/manual/mathematical-operations.html -->
<context id="operator">
<include>
<context ref="octave:operator" />
<context id="julia-operators" style-ref="operator">
<match extended="true">
[$%]=? |
\.[&lt;&gt;%'] |
\.[&lt;&gt;=!]=
</match>
</context>
</include>
</context>
<!-- http://docs.julialang.org/en/latest/stdlib/punctuation.html -->
<context id="punctuation" style-ref="operator">
<match extended="true">
\(|\) |
\[|\] |
\{|\} |
\.|,|;|\? |
\.\.\.
</match>
</context>
<!-- See *lang_keywords[] in ui/repl-readline.c for a list -->
<context id="keyword" style-ref="keyword">
<!-- code blocks -->
<keyword>begin</keyword>
<keyword>do</keyword>
<keyword>for</keyword>
<keyword>in</keyword>
<keyword>function</keyword>
<keyword>if</keyword>
<keyword>struct</keyword>
<keyword>mutable struct</keyword>
<keyword>let</keyword>
<keyword>quote</keyword>
<keyword>try</keyword>
<keyword>type</keyword>
<keyword>while</keyword>
<keyword>catch</keyword>
<keyword>finally</keyword>
<keyword>else</keyword>
<keyword>elseif</keyword>
<keyword>end</keyword>
<!-- keywords -->
<keyword>abstract type</keyword>
<keyword>primitive type</keyword>
<keyword>bitstype</keyword>
<keyword>break</keyword>
<keyword>ccall</keyword>
<keyword>const</keyword>
<keyword>continue</keyword>
<keyword>export</keyword>
<keyword>global</keyword>
<keyword>import</keyword>
<keyword>importall</keyword>
<keyword>local</keyword>
<keyword>macro</keyword>
<keyword>module</keyword>
<keyword>baremodule</keyword>
<keyword>return</keyword>
<keyword>typealias</keyword>
<keyword>using</keyword>
<keyword>where</keyword>
<keyword>new</keyword>
</context>
<!-- See http://docs.julialang.org/en/latest/manual/running-external-programs/ -->
<context id="external-command" style-ref="external-command" >
<start>`</start>
<end>`</end>
</context>
<!-- jl_init_primitives() in src/builtins.c -->
<!-- TODO: once the standard library is stabilized,
add more from exports.jl -->
<context id="builtin-function" style-ref="builtin-function">
<keyword>is</keyword>
<keyword>typeof</keyword>
<keyword>subtype</keyword>
<keyword>isa</keyword>
<keyword>typeassert</keyword>
<keyword>apply</keyword>
<keyword>kwcall</keyword>
<keyword>throw</keyword>
<keyword>tuple</keyword>
<keyword>method_exists</keyword>
<keyword>applicable</keyword>
<keyword>invoke</keyword>
<keyword>eval</keyword>
<keyword>isdefined</keyword>
<keyword>yieldto</keyword>
</context>
<context id="module" style-ref="module">
<!-- http://docs.julialang.org/en/latest/manual/modules/#standard-modules -->
<keyword>Base</keyword>
<keyword>Core</keyword>
<keyword>Main</keyword>
<!-- exports.jl -->
<keyword>PCRE</keyword>
<keyword>FFTW</keyword>
<keyword>Collections</keyword>
<keyword>DSP</keyword>
<keyword>LinAlg</keyword>
<keyword>LibRandom</keyword>
<keyword>Random</keyword>
<keyword>Math</keyword>
<keyword>MPFR</keyword>
<keyword>GMP</keyword>
<keyword>Sort</keyword>
<keyword>Test</keyword>
<keyword>Pkg</keyword>
<keyword>Operators</keyword>
<keyword>Errno</keyword>
<keyword>Meta</keyword>
<keyword>Graphics</keyword>
</context>
<!-- Sources: base/exports.jl and examples/typetree.jl -->
<context id="type" style-ref="type">
<keyword>Any|None|Nothing|Missing|Void|Union|Some</keyword>
<keyword>Type(Constructor|Name|Var|_Array)?|(Union|Data|NonTuple)Type</keyword>
<keyword>(Abstract|Strided|Bit)?(Array|Matrix|Vector)</keyword>
<keyword>Abstract(Cmd|RNG|SparseMatrix)</keyword>
<keyword>(Abstract|Strided)?VecOrMat</keyword>
<keyword>SparseMatrixCSC</keyword>
<keyword>(D|Sub((Or)?D)?)Array</keyword>
<keyword>Chars?</keyword>
<keyword>(ASCII|Byte|Char|DirectIndex|Generic|Rep|Rev|Rope|Sub|UTF8)?String</keyword>
<keyword>Bool</keyword>
<keyword>Number</keyword>
<keyword>Real</keyword>
<keyword>Rational</keyword>
<keyword>ImaginaryUnit</keyword>
<keyword>Signed|Unsigned</keyword>
<keyword>Int(eger|Set|8|16|32|64|128)?</keyword>
<keyword>Uint(8|16|32|64|128)?</keyword>
<keyword>Float(ingPoint|32|64)</keyword>
<keyword>Complex(Pair|64|128)?</keyword>
<keyword>Big(Int|Float)</keyword>
<keyword>C(float|double|ptrdiff_t|u?(int|long(long)?|char|short)|s?size_t|wchar_t)</keyword>
<keyword>(Argument|Bounds|Divide|Domain|EOF|Inexact|Key|Load|Memory|Method|Parse|(Stack)?Overflow|System|Type|UV|UndefRef)Error</keyword>
<keyword>(Error|Interrupt|Disconnect)?Exception</keyword>
<keyword>Algorithm</keyword>
<keyword>Associative</keyword>
<keyword>AsyncStream</keyword>
<keyword>Box</keyword>
<keyword>BunchKaufman</keyword>
<keyword>CPUinfo</keyword>
<keyword>CallStack</keyword>
<keyword>Callback</keyword>
<keyword>Cholesky</keyword>
<keyword>CholeskyPivoted</keyword>
<keyword>Cmd(Redirect)?</keyword>
<keyword>(And|Or)Cmds</keyword>
<keyword>Colon</keyword>
<keyword>LU|(((Sym|LDLT|LU)?Tr|B)id|D)iagonal</keyword>
<keyword>Dict</keyword>
<keyword>EachLine</keyword>
<keyword>Eigen</keyword>
<keyword>EmptyCallStack</keyword>
<keyword>Enumerate</keyword>
<keyword>EnvHash</keyword>
<keyword>Executable</keyword>
<keyword>Expr(Node)?</keyword>
<keyword>Factorization</keyword>
<keyword>FDWatcher</keyword>
<keyword>(Abstract)?File</keyword>
<keyword>File(Monitor|Offset)</keyword>
<keyword>Filter</keyword>
<keyword>(Intrinsic)?Function</keyword>
<keyword>Hermitian</keyword>
<keyword>Hessenberg</keyword>
<keyword>IO(Buffer|Stream)?</keyword>
<keyword>InetAddr</keyword>
<keyword>IpAddr|IPv[46]</keyword>
<keyword>(Key|Value)Iterator</keyword>
<keyword>LambdaStaticData</keyword>
<keyword>LocalProcess</keyword>
<keyword>Long(Expr|Symbol|Tuple)</keyword>
<keyword>MersenneTwister</keyword>
<keyword>Method(Table)?</keyword>
<keyword>MmapArrayInfo</keyword>
<keyword>Module</keyword>
<keyword>NTuple</keyword>
<keyword>NamedPipe</keyword>
<keyword>(Getfield|Goto|Label|LineNumber|Quote)Node</keyword>
<keyword>NotFound</keyword>
<keyword>OS_FD</keyword>
<keyword>ObjectIdDict</keyword>
<keyword>PollingFileWatcher</keyword>
<keyword>Process(Chain(OrNot)?|Group)?</keyword>
<keyword>Ptr</keyword>
<keyword>QR(Pivoted)?</keyword>
<keyword>Range(s|1|Index|VecIntList)?</keyword>
<keyword>RawOrBoxedHandle</keyword>
<keyword>Redirectable</keyword>
<keyword>Regex(Match(Iterator)?)?</keyword>
<keyword>RemoteRef</keyword>
<keyword>Rest</keyword>
<keyword>Reverse</keyword>
<keyword>(Generalized)?(SVD|Schur)</keyword>
<keyword>Set</keyword>
<keyword>Socket</keyword>
<keyword>(Merge|Insertion|Tim|Quick)Sort</keyword>
<keyword>SpawnNullStream</keyword>
<keyword>Stat</keyword>
<keyword>StateUpdate</keyword>
<keyword>StaticVarInfo</keyword>
<keyword>Symbol(Node)?</keyword>
<keyword>TTY</keyword>
<keyword>Task</keyword>
<keyword>TcpSocket</keyword>
<keyword>TmStruct</keyword>
<keyword>Top(Node)?</keyword>
<keyword>Triangular</keyword>
<keyword>UV(Handle|PollingWatcher|Stream)</keyword>
<keyword>UdpSocket</keyword>
<keyword>Undef(RefTag)?</keyword>
<keyword>VarTable</keyword>
<keyword>Vararg</keyword>
<keyword>VersionNumber</keyword>
<keyword>Wait(For|Task)</keyword>
<keyword>Weak(KeyDict|Ref)</keyword>
<keyword>Woodbury</keyword>
<keyword>(Timeout|Idle|Single)?AsyncWork</keyword>
<keyword>Work(er|Item)</keyword>
<keyword>Zip</keyword>
</context>
<context id="comment-multiline-nested" style-ref="comment" class-disabled="no-spell-check" class="comment" >
<start>#=</start>
<end>=#</end>
<include>
<context ref="comment-multiline-nested"/>
</include>
</context>
<context id="julia" class="no-spell-check">
<include>
<context ref="comment-multiline-nested"/>
<context ref="def:shebang" />
<context ref="def:shell-like-comment" />
<context ref="string" />
<context ref="character" />
<context ref="number" />
<context ref="boolean" />
<context ref="math-constant" />
<context ref="special-constant" />
<context ref="operator" />
<context ref="punctuation" />
<context ref="keyword" />
<context ref="external-command" />
<context ref="builtin-function" />
<context ref="module" />
<context ref="type" />
<context ref="octave:function-handle" style-ref="macro" />
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,389 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Adam Dingle
Copyright (C) 2017 Adam Dingle <adam@medovina.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="kotlin" name="Kotlin" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-kotlin</property>
<property name="globs">*.kt;*.kts</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<style id="builtin" name="Builtin Value" map-to="def:builtin"/>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="declaration" name="Declaration" map-to="def:type"/>
<style id="default" name="Default"/>
<style id="error" name="Error" map-to="def:error"/>
<style id="escaped-character" name="Escaped Character" map-to="def:special-char"/>
<style id="external" name="External" map-to="def:preprocessor"/>
<style id="identifier" name="Identifier" map-to="def:identifier"/>
<style id="interpolated" name="Interpolated Expression" map-to="def:identifier"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="modifier" name="Modifier" map-to="def:type"/>
<style id="number" name="Number" map-to="def:decimal"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="special" name="Special Constant" map-to="def:special-constant"/>
<style id="string" name="String" map-to="def:string"/>
<style id="type" name="Data Type" map-to="def:identifier"/>
</styles>
<definitions>
<define-regex id="simple-name">[a-zA-Z_$][a-zA-Z_$0-9]*</define-regex>
<define-regex id="compound-name">\%{simple-name}(\.\%{simple-name})*</define-regex>
<define-regex id="annotation-target" extended="true">
field|file|property|get|set|receiver|param|setparam|delegate
</define-regex>
<context id="annotation" style-ref="special">
<match extended="true">
@(\%{annotation-target}:)?
( \%{compound-name} | \[ (\%{compound-name} \s*)+ \] )
</match>
</context>
<context id="block-comment" style-ref="comment">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
<context ref="block-comment"/>
</include>
</context>
<context id="builtin" style-ref="builtin">
<keyword>it</keyword>
<keyword>super</keyword>
<keyword>this@?</keyword>
</context>
<define-regex id="escaped-character" extended="true">
\\( # leading backslash
[\\\"\'nrbt$] | # escaped character
u[0-9a-fA-F]{4} # unicode char
)
</define-regex>
<context id="character" style-ref="special">
<match>'(\%{escaped-character}|.)'</match>
</context>
<context id="character-error" style-ref="error">
<match>'(\%{escaped-character}|.)[^\s]+'</match>
</context>
<context id="declaration" style-ref="declaration">
<keyword>class</keyword>
<keyword>constructor</keyword>
<keyword>fun</keyword>
<keyword>get</keyword>
<keyword>init</keyword>
<keyword>interface</keyword>
<keyword>object</keyword>
<keyword>set</keyword>
<keyword>typealias</keyword>
<keyword>val</keyword>
<keyword>var</keyword>
</context>
<context id="variance-annotation">
<match>(&lt;|,) *(in|out)</match>
<include>
<context sub-pattern="1" style-ref="operator" />
<context sub-pattern="2" style-ref="modifier" />
</include>
</context>
<context id="expression" style-ref="keyword">
<keyword>as</keyword>
<keyword>break@?</keyword>
<keyword>catch</keyword>
<keyword>continue@?</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>finally</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>is</keyword>
<keyword>return@?</keyword>
<keyword>throw</keyword>
<keyword>to</keyword>
<keyword>try</keyword>
<keyword>when</keyword>
<keyword>while</keyword>
</context>
<context id="external" style-ref="external">
<keyword>import</keyword>
<keyword>package</keyword>
</context>
<context id="literal-identifier">
<start>`</start>
<end>`</end>
</context>
<context id="modifier" style-ref="modifier">
<keyword>abstract</keyword>
<keyword>annotation</keyword>
<keyword>by</keyword>
<keyword>companion</keyword>
<keyword>const</keyword>
<keyword>crossinline</keyword>
<keyword>data</keyword>
<keyword>enum</keyword>
<keyword>external</keyword>
<keyword>final</keyword>
<keyword>infix</keyword>
<keyword>inline</keyword>
<keyword>inner</keyword>
<keyword>internal</keyword>
<keyword>lateinit</keyword>
<keyword>noinline</keyword>
<keyword>open</keyword>
<keyword>operator</keyword>
<keyword>override</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>reified</keyword>
<keyword>sealed</keyword>
<keyword>suspend</keyword>
<keyword>tailrec</keyword>
<keyword>vararg</keyword>
<keyword>where</keyword>
</context>
<context id="numeric" style-ref="number">
<match extended="true">
\b ( 0x [0-9A-Fa-f][0-9A-Fa-f_]* # hex literal
| 0b [01][01_]* # binary literal
| ([0-9]+[Ee][-]?[0-9]+|
([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFdD]?|
[0-9]+[FfDd] # floating-point literal
| [0-9][0-9_]*L? # integer literal
)
</match>
</context>
<context id="operator" style-ref="operator">
<match>[-+*/%=.!|?@:;,_&amp;&lt;&gt;()\[\]]</match>
</context>
<context id="special" style-ref="special">
<keyword>false</keyword>
<keyword>true</keyword>
<keyword>null</keyword>
</context>
<context id="interpolated-identifier" style-ref="interpolated">
<match>\$[a-zA-Z]+</match>
</context>
<context id="interpolated-expression" style-ref="interpolated">
<start>\${</start>
<end>}</end>
<include>
<context ref="kotlin"/>
</include>
</context>
<context id="string" style-ref="string" end-at-line-end="true"
class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
<include>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
<context ref="interpolated-identifier"/>
<context ref="interpolated-expression"/>
</include>
</context>
<context id="multiline-string" style-ref="string" end-at-line-end="false" class="string" class-disabled="no-spell-check">
<start>"""</start>
<end>"""</end>
<include>
<context ref="interpolated-identifier"/>
<context ref="interpolated-expression"/>
</include>
</context>
<context id="type" style-ref="type">
<keyword>dynamic</keyword>
<!-- kotlin -->
<keyword>Annotation</keyword>
<keyword>Any</keyword>
<keyword>Array</keyword>
<keyword>AssertionError</keyword>
<keyword>Boolean</keyword>
<keyword>BooleanArray</keyword>
<keyword>Byte</keyword>
<keyword>ByteArray</keyword>
<keyword>Char</keyword>
<keyword>CharArray</keyword>
<keyword>CharSequence</keyword>
<keyword>ClassCastException</keyword>
<keyword>Comparable</keyword>
<keyword>Comparator</keyword>
<keyword>ConcurrentModificationException</keyword>
<keyword>DeprecationLevel</keyword>
<keyword>Double</keyword>
<keyword>DoubleArray</keyword>
<keyword>Enum</keyword>
<keyword>Error</keyword>
<keyword>Exception</keyword>
<keyword>Float</keyword>
<keyword>FloatArray</keyword>
<keyword>Function</keyword>
<keyword>IllegalArgumentException</keyword>
<keyword>IllegalStateException</keyword>
<keyword>IndexOutOfBoundsException</keyword>
<keyword>Int</keyword>
<keyword>IntArray</keyword>
<keyword>KotlinVersion</keyword>
<keyword>Lazy</keyword>
<keyword>LazyThreadSafetyMode</keyword>
<keyword>Long</keyword>
<keyword>LongArray</keyword>
<keyword>NoSuchElementException</keyword>
<keyword>NoWhenBranchMatchedException</keyword>
<keyword>Nothing</keyword>
<keyword>NullPointerException</keyword>
<keyword>Number</keyword>
<keyword>NumberFormatException</keyword>
<keyword>Pair</keyword>
<keyword>RuntimeException</keyword>
<keyword>Short</keyword>
<keyword>ShortArray</keyword>
<keyword>String</keyword>
<keyword>Throwable</keyword>
<keyword>Triple</keyword>
<keyword>Unit</keyword>
<keyword>UnsupportedOperationException</keyword>
<keyword>NotImplementedError</keyword>
<!-- kotlin.collections -->
<keyword>AbstractCollection</keyword>
<keyword>AbstractIterator</keyword>
<keyword>AbstractList</keyword>
<keyword>AbstractMap</keyword>
<keyword>AbstractMutableCollection</keyword>
<keyword>AbstractMutableList</keyword>
<keyword>AbstractMutableMap</keyword>
<keyword>AbstractMutableSet</keyword>
<keyword>AbstractSet</keyword>
<keyword>ArrayList</keyword>
<keyword>BooleanIterator</keyword>
<keyword>ByteIterator</keyword>
<keyword>CharIterator</keyword>
<keyword>Collection</keyword>
<keyword>DoubleIterator</keyword>
<keyword>FloatIterator</keyword>
<keyword>Grouping</keyword>
<keyword>HashMap</keyword>
<keyword>HashSet</keyword>
<keyword>IndexedValue</keyword>
<keyword>IntIterator</keyword>
<keyword>Iterable</keyword>
<keyword>Iterator</keyword>
<keyword>LinkedHashMap</keyword>
<keyword>LinkedHashSet</keyword>
<keyword>List</keyword>
<keyword>ListIterator</keyword>
<keyword>LongIterator</keyword>
<keyword>Map</keyword>
<keyword>MutableCollection</keyword>
<keyword>MutableIterable</keyword>
<keyword>MutableIterator</keyword>
<keyword>MutableList</keyword>
<keyword>MutableListIterator</keyword>
<keyword>MutableMap</keyword>
<keyword>MutableSet</keyword>
<keyword>RandomAccess</keyword>
<keyword>Set</keyword>
<keyword>ShortIterator</keyword>
<!-- kotlin.ranges -->
<keyword>CharProgression</keyword>
<keyword>CharRange</keyword>
<keyword>ClosedFloatingPointRange</keyword>
<keyword>ClosedRange</keyword>
<keyword>IntProgression</keyword>
<keyword>IntRange</keyword>
<keyword>LongProgression</keyword>
<keyword>LongRange</keyword>
<!-- kotlin.sequences -->
<keyword>Sequence</keyword>
<!-- kotlin.text -->
<keyword>Appendable</keyword>
<keyword>CharCategory</keyword>
<keyword>CharDirectionality</keyword>
<keyword>Charsets</keyword>
<keyword>MatchGroup</keyword>
<keyword>MatchGroupCollection</keyword>
<keyword>MatchNamedGroupCollection</keyword>
<keyword>MatchResult</keyword>
<keyword>Regex</keyword>
<keyword>RegexOption</keyword>
<keyword>StringBuilder</keyword>
<keyword>Typography</keyword>
</context>
<context id="kotlin" class="no-spell-check">
<include>
<context ref="def:c-like-comment"/>
<context ref="def:c-like-close-comment-outside-comment"/>
<context ref="annotation"/>
<context ref="block-comment"/>
<context ref="builtin"/>
<context ref="character"/>
<context ref="character-error"/>
<context ref="declaration"/>
<context ref="variance-annotation"/>
<context ref="expression"/>
<context ref="external"/>
<context ref="literal-identifier"/>
<context ref="modifier"/>
<context ref="multiline-string"/>
<context ref="numeric"/>
<context ref="operator"/>
<context ref="special"/>
<context ref="string"/>
<context ref="type"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,72 @@
<!--
This file is part of GtkSourceView
Copyright (C) 2006 Paolo Maggi <paolo@gnome.org>
Copyright (C) 2006 Leonardo Ferreira Fontenelle <leo.fontenelle@gmail.com>
gtksourceview is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
gtksourceview is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<!-- FIXME: the "name" attribute can be "_name" to be marked for translation -->
<!ENTITY % itemattrs
"name CDATA #REQUIRED
style CDATA #REQUIRED">
<!ELEMENT language (escape-char?,(line-comment|block-comment|string|syntax-item|pattern-item|keyword-list)+)>
<!-- FIXME: the "name" and "section" attributes can be prefixed with
"_" to be marked for translation -->
<!ATTLIST language
name CDATA #REQUIRED
version CDATA #REQUIRED
section CDATA #REQUIRED
translation-domain CDATA #IMPLIED
mimetypes CDATA #REQUIRED>
<!ELEMENT escape-char (#PCDATA)>
<!ELEMENT line-comment (start-regex)>
<!ATTLIST line-comment
%itemattrs;>
<!ELEMENT block-comment (start-regex,end-regex)>
<!ATTLIST block-comment
%itemattrs;>
<!ELEMENT string (start-regex,end-regex)>
<!ATTLIST string
%itemattrs;
end-at-line-end (true|false) "true">
<!ELEMENT syntax-item (start-regex,end-regex)>
<!ATTLIST syntax-item
%itemattrs;>
<!ELEMENT pattern-item (regex)>
<!ATTLIST pattern-item
%itemattrs;>
<!ELEMENT keyword-list (keyword+)>
<!ATTLIST keyword-list
%itemattrs;
case-sensitive (true|false) "true"
match-empty-string-at-beginning (true|false) "false"
match-empty-string-at-end (true|false) "false"
beginning-regex CDATA #IMPLIED
end-regex CDATA #IMPLIED>
<!ELEMENT start-regex (#PCDATA)>
<!ELEMENT end-regex (#PCDATA)>
<!ELEMENT regex (#PCDATA)>
<!ELEMENT keyword (#PCDATA)>

View File

@ -0,0 +1,372 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
gtksourceview is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
gtksourceview is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<!--
This file describes the XML format used for syntax highlight
descriptions for the GtkSourceView 1.x library.
.lang files are XML files which describe how to highlight syntax;
this RNG is used for validation purposes.
.lang files should be located in $PREFIX/gtksourceview-1.0/language-specs/,
or in ~./gnome2/gtksourceview-1.0/language-specs/
To check if a .lang file is valid, run
$ xmllint FILENAME - -relaxng language.rng
If you create a new .lang file or modify an existing one, please note
that it will be (re)loaded by the application only after it is
restarted.
-->
<!--
Boolean type
Attributes that are of type boolean allow the following values:
- 'true', 'TRUE' and '1' all meaning true
- 'false', FALSE' and '0' all meaning false
It is encouraged to use 'TRUE' and 'FALSE' instead of the alternatives.
-->
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<define name="boolean">
<choice>
<value>true</value>
<value>false</value>
<value>TRUE</value>
<value>FALSE</value>
<value>0</value>
<value>1</value>
</choice>
</define>
<!--
Attributes required by all element representing a syntax or pattern tag.
- name the name of the tag (it can appear in the UI)
- style the style used to highlight the tag. Recognized values
are (from gtksourcestylescheme.h):
- Base-N Integer used for values with a base
other than 10
- Character used for single characters
- Comment used for comments
- Data Type used for data types
- Function used for function names
- Decimal used for decimal values
- Floating Point used for floating point values
- Keyword used for keywords
- Preprocessor used for preprocessor instructions
- String used for strings
- Specials used for 'special' things
- Others (DEPRECATED, replaced by "Data Type")
- Others 2 used for 'other' things
- Others 3 used for 'other' things
The "name" attribute can be prefixed with "_" to be marked for
translation.
-->
<define name="tagattrs">
<choice>
<attribute name="_name">
<data type="string"/>
</attribute>
<attribute name="name">
<data type="string"/>
</attribute>
</choice>
<attribute name="style">
<data type="string"/>
</attribute>
</define>
<!--
The root of the definition file is the element "language".
Required attributes:
- name the name of the language (it can appear in menus and
dialog boxes)
- section the category the language belongs to (e.g. "Sources",
"Scripts", etc.)
- version version of the .lang file format (1.0)
- mimetypes a list of mime-types that identifies the types of file
that must be highlighted using the .lang file
Optional attributes:
- translation-domain
the translation domain used by the file
The "name" and "section" attributes can be prefixed with
"_" to be marked for translation.
-->
<define name="language">
<element name="language">
<ref name="attlist.language"/>
<optional>
<ref name="escape-char"/>
</optional>
<oneOrMore>
<choice>
<ref name="line-comment"/>
<ref name="block-comment"/>
<ref name="string"/>
<ref name="syntax-item"/>
<ref name="pattern-item"/>
<ref name="keyword-list"/>
</choice>
</oneOrMore>
</element>
</define>
<define name="attlist.language" combine="interleave">
<choice>
<attribute name="_name">
<data type="string"/>
</attribute>
<attribute name="name">
<data type="string"/>
</attribute>
</choice>
<choice>
<attribute name="_section">
<data type="string"/>
</attribute>
<attribute name="section">
<data type="string"/>
</attribute>
</choice>
<attribute name="version">
<data type="string">
<param name="pattern">1\.0</param>
</data>
</attribute>
<attribute name="mimetypes"/>
<optional>
<attribute name="translation-domain"/>
</optional>
</define>
<!-- Which character is used in escape sequences. -->
<define name="escape-char">
<element name="escape-char">
<ref name="attlist.escape-char"/>
<text/>
</element>
</define>
<define name="attlist.escape-char" combine="interleave">
<empty/>
</define>
<!--
The line-comment" element represents single line comments.
The "start-regex" subelement defines the regex matching the start of
the comment.
-->
<define name="line-comment">
<element name="line-comment">
<ref name="attlist.line-comment"/>
<ref name="start-regex"/>
</element>
</define>
<define name="attlist.line-comment" combine="interleave">
<ref name="tagattrs"/>
</define>
<!--
The "block-comment" element represents multiple lines comments.
The "start-regex" subelement defines the regex matching the beginning of
the comment.
The "end-regex" subelement defines the regex matching the end of
the comment.
-->
<define name="block-comment">
<element name="block-comment">
<ref name="attlist.block-comment"/>
<ref name="start-regex"/>
<ref name="end-regex"/>
</element>
</define>
<define name="attlist.block-comment" combine="interleave">
<ref name="tagattrs"/>
</define>
<!--
The "string" element represents string.
The "start-regex" subelement defines the regex matching the beginning of
the string.
The "end-regex" subelement defines the regex matching the end of
the string.
Optional attributes:
- end-at-line-end whether the string end at the end of line
-->
<define name="string">
<element name="string">
<ref name="attlist.string"/>
<ref name="start-regex"/>
<ref name="end-regex"/>
</element>
</define>
<define name="attlist.string" combine="interleave">
<ref name="tagattrs"/>
<optional>
<attribute name="end-at-line-end" a:defaultValue="TRUE">
<ref name="boolean"/>
</attribute>
</optional>
</define>
<!--
The "syntax-item" element represents a generic region of the document.
The "start-regex" subelement defines the regex matching the beginning of
the region.
The "end-regex" subelement defines the regex matching the end of
the region.
-->
<define name="syntax-item">
<element name="syntax-item">
<ref name="attlist.syntax-item"/>
<ref name="start-regex"/>
<ref name="end-regex"/>
</element>
</define>
<define name="attlist.syntax-item" combine="interleave">
<ref name="tagattrs"/>
</define>
<!--
The "pattern-item" element represents a generic token.
The "regex" subelement defines the regex matching the token.
-->
<define name="pattern-item">
<element name="pattern-item">
<ref name="attlist.pattern-item"/>
<ref name="regex"/>
</element>
</define>
<define name="attlist.pattern-item" combine="interleave">
<ref name="tagattrs"/>
</define>
<!--
The "keyword-list" element represents a list of keywords, it can have
one or more "keyword" subelements each one representing a keyword.
A "keyword" subelement defines the regex matching a keyword of the
language.
Optional attributes:
- case-sensitive whether the keywords are case sensitive
- match-empty-string-at-beginning:
whether the empty string (\b) should be matched
at the beginning of the keywords
- match-empty-string-at-end
whether the empty string (\b) should be matched
at the end of the keywords
- beginning-regex if all keywords start with a regex, you can
specify it here to avoid doing it for
every single keyword
- end-regex if all keywords end with a regex, you can
specify it here to avoid doing it for
every single keyword
-->
<define name="keyword-list">
<element name="keyword-list">
<ref name="attlist.keyword-list"/>
<oneOrMore>
<ref name="keyword"/>
</oneOrMore>
</element>
</define>
<define name="attlist.keyword-list" combine="interleave">
<ref name="tagattrs"/>
<optional>
<attribute name="case-sensitive" a:defaultValue="TRUE">
<ref name="boolean"/>
</attribute>
</optional>
<optional>
<attribute name="match-empty-string-at-beginning" a:defaultValue="FALSE">
<ref name="boolean"/>
</attribute>
</optional>
<optional>
<attribute name="match-empty-string-at-end" a:defaultValue="FALSE">
<ref name="boolean"/>
</attribute>
</optional>
<optional>
<attribute name="beginning-regex"/>
</optional>
<optional>
<attribute name="end-regex"/>
</optional>
</define>
<!-- Elements used inside other elements -->
<define name="keyword">
<element name="keyword">
<ref name="attlist.keyword"/>
<text/>
</element>
</define>
<define name="attlist.keyword" combine="interleave">
<empty/>
</define>
<define name="regex">
<element name="regex">
<ref name="attlist.regex"/>
<text/>
</element>
</define>
<define name="attlist.regex" combine="interleave">
<empty/>
</define>
<define name="start-regex">
<element name="start-regex">
<ref name="attlist.start-regex"/>
<text/>
</element>
</define>
<define name="attlist.start-regex" combine="interleave">
<empty/>
</define>
<define name="end-regex">
<element name="end-regex">
<ref name="attlist.end-regex"/>
<text/>
</element>
</define>
<define name="attlist.end-regex" combine="interleave">
<empty/>
</define>
<start>
<choice>
<ref name="language"/>
</choice>
</start>
</grammar>

View File

@ -0,0 +1,481 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2005-2007 Marco Barisione <barisione@gmail.com>
Copyright (C) 2005-2007 Emanuele Aina
Copyright (C) 2011 Sapphire Becker <guess@logicplace.com>
gtksourceview is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
gtksourceview is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<element name="language">
<choice>
<attribute name="name"/>
<attribute name="_name"/>
</choice>
<attribute name="id">
<data type="string">
<param name="pattern">[a-zA-Z0-9_\-]+</param>
</data>
</attribute>
<attribute name="version"/>
<optional>
<choice>
<attribute name="section"/>
<attribute name="_section"/>
</choice>
</optional>
<optional>
<attribute name="hidden">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="translation-domain"/>
</optional>
<optional>
<oneOrMore>
<element name="author">
<text/>
</element>
</oneOrMore>
</optional>
<optional>
<ref name="metadata"/>
</optional>
<optional>
<ref name="styles" />
</optional>
<optional>
<element name="default-regex-options">
<ref name="regex-options"/>
</element>
</optional>
<optional>
<element name="keyword-char-class">
<text/>
</element>
</optional>
<ref name="definitions" />
</element>
</start>
<define name="id-type">
<data type="string">
<param name="pattern">([a-zA-Z0-9_\-]+:)?[a-zA-Z0-9_\-]+</param>
</data>
</define>
<define name="ref-type">
<data type="string">
<param name="pattern">([a-zA-Z0-9_\-]+:)?[a-zA-Z0-9_\-]+(:\*)?</param>
</data>
</define>
<define name="boolean-value">
<choice>
<value>true</value>
<value>false</value>
</choice>
</define>
<define name="regex-options">
<optional>
<attribute name="extended">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="case-sensitive">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="dupnames">
<ref name="boolean-value"/>
</attribute>
</optional>
</define>
<define name="property">
<element name="property">
<attribute name="name">
<!-- <data type="string">-->
<!-- <param name="pattern">[a-zA-Z0-9_\-]+</param>-->
<!-- </data>-->
</attribute>
<text/>
<!-- <optional>
<attribute name="mimetypes"/>
</optional>-->
</element>
</define>
<define name="metadata">
<element name="metadata">
<zeroOrMore>
<ref name="property"/>
</zeroOrMore>
</element>
</define>
<define name="styles">
<element name="styles">
<oneOrMore>
<element name="style">
<attribute name="id">
<data type="string">
<param name="pattern">[a-zA-Z0-9_\-]+</param>
</data>
</attribute>
<choice>
<attribute name="name"/>
<attribute name="_name"/>
</choice>
<optional>
<attribute name="map-to">
<ref name="id-type"/>
</attribute>
</optional>
</element>
</oneOrMore>
</element>
</define>
<define name="definitions">
<element name="definitions">
<interleave>
<oneOrMore>
<choice>
<ref name="context-to-be-included"/>
<ref name="context-container"/>
<ref name="context-simple"/>
<ref name="context-reference"/>
<ref name="context-placeholder"/>
</choice>
</oneOrMore>
<zeroOrMore>
<ref name="define-regex"/>
</zeroOrMore>
<zeroOrMore>
<ref name="replace-context"/>
</zeroOrMore>
</interleave>
</element>
</define>
<define name="context-simple">
<element name="context">
<optional>
<attribute name="id">
<ref name="id-type"/>
</attribute>
</optional>
<optional>
<attribute name="style-ref">
<ref name="id-type"/>
</attribute>
</optional>
<optional>
<attribute name="extend-parent">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="end-parent">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="first-line-only">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="once-only">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="class"/>
</optional>
<optional>
<attribute name="class-disabled"/>
</optional>
<choice>
<element name="match">
<ref name="regex-options"/>
<text/>
</element>
<group>
<optional>
<element name="prefix"><text/></element>
</optional>
<optional>
<element name="suffix"><text/></element>
</optional>
<oneOrMore>
<element name="keyword"><text/></element>
</oneOrMore>
</group>
</choice>
<optional>
<element name="include">
<oneOrMore>
<ref name="context-subpattern-simple"/>
</oneOrMore>
</element>
</optional>
</element>
</define>
<define name="context-container">
<element name="context">
<optional>
<attribute name="id">
<ref name="id-type"/>
</attribute>
</optional>
<optional>
<attribute name="style-ref">
<ref name="id-type"/>
</attribute>
</optional>
<optional>
<attribute name="style-inside">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="extend-parent">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="end-parent">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="end-at-line-end">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="first-line-only">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="once-only">
<ref name="boolean-value"/>
</attribute>
</optional>
<optional>
<attribute name="class"/>
</optional>
<optional>
<attribute name="class-disabled"/>
</optional>
<element name="start">
<ref name="regex-options"/>
<text/>
</element>
<optional>
<element name="end">
<ref name="regex-options"/>
<text/>
</element>
</optional>
<optional>
<element name="include">
<interleave>
<oneOrMore>
<choice>
<ref name="context-container"/>
<ref name="context-simple"/>
<ref name="context-to-be-included"/>
<ref name="context-subpattern-container"/>
<ref name="context-reference"/>
<ref name="context-placeholder"/>
</choice>
</oneOrMore>
<zeroOrMore>
<ref name="define-regex"/>
</zeroOrMore>
</interleave>
</element>
</optional>
</element>
</define>
<define name="context-to-be-included">
<element name="context">
<attribute name="id">
<ref name="id-type"/>
</attribute>
<optional>
<attribute name="class"/>
</optional>
<optional>
<attribute name="class-disabled"/>
</optional>
<element name="include">
<interleave>
<oneOrMore>
<choice>
<ref name="context-container"/>
<ref name="context-simple"/>
<ref name="context-to-be-included"/>
<ref name="context-reference"/>
<ref name="context-placeholder"/>
</choice>
</oneOrMore>
<zeroOrMore>
<ref name="define-regex"/>
</zeroOrMore>
</interleave>
</element>
</element>
</define>
<define name="context-subpattern-simple">
<element name="context">
<optional>
<attribute name="id">
<ref name="id-type"/>
</attribute>
</optional>
<optional>
<attribute name="style-ref">
<ref name="id-type"/>
</attribute>
</optional>
<optional>
<attribute name="class"/>
</optional>
<optional>
<attribute name="class-disabled"/>
</optional>
<attribute name="sub-pattern"/>
</element>
</define>
<define name="context-subpattern-container">
<element name="context">
<optional>
<attribute name="id">
<ref name="id-type"/>
</attribute>
</optional>
<optional>
<attribute name="style-ref">
<ref name="id-type"/>
</attribute>
</optional>
<optional>
<attribute name="class"/>
</optional>
<optional>
<attribute name="class-disabled"/>
</optional>
<attribute name="sub-pattern"/>
<attribute name="where">
<choice>
<value>start</value>
<value>end</value>
</choice>
</attribute>
</element>
</define>
<define name="context-reference">
<element name="context">
<attribute name="ref">
<ref name="ref-type"/>
</attribute>
<optional>
<choice>
<attribute name="style-ref">
<ref name="id-type"/>
</attribute>
<attribute name="ignore-style">
<ref name="boolean-value"/>
</attribute>
<attribute name="original">
<ref name="boolean-value"/>
</attribute>
</choice>
</optional>
</element>
</define>
<define name="context-placeholder">
<element name="context">
<attribute name="id">
<ref name="id-type"/>
</attribute>
</element>
</define>
<define name="define-regex">
<element name="define-regex">
<attribute name="id">
<ref name="id-type"/>
</attribute>
<ref name="regex-options"/>
<text/>
</element>
</define>
<define name="replace-context">
<element name="replace">
<attribute name="id">
<ref name="ref-type"/>
</attribute>
<attribute name="ref">
<ref name="ref-type"/>
</attribute>
</element>
</define>
</grammar>

View File

@ -0,0 +1,654 @@
<?xml version="1.0"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2005-2007 - Marco Barisione <barisione@gmail.com>
Copyright (C) 2012-2013 - Tobias Marczewski <tmarczewski@ed-alumni.net>
Copyright (C) 2013, 2016 - Sébastien Wilmet <swilmet@gnome.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="latex" name="LaTeX" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">text/x-tex</property>
<property name="globs">*.tex;*.ltx;*.sty;*.cls;*.dtx;*.ins;*.bbl</property>
<property name="line-comment-start">%</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="display-math" name="Math Mode" map-to="def:string"/>
<style id="inline-math" name="Inline Math Mode" map-to="latex:display-math"/>
<style id="math" name="Math Mode" map-to="latex:display-math"/>
<style id="math-boundary" name="Math Boundary" map-to="latex:display-math"/>
<style id="include" name="Include" map-to="def:keyword"/>
<style id="common-commands" name="Command" map-to="def:keyword"/>
<style id="command" name="Command" map-to="def:keyword"/>
<style id="verbatim" name="Verbatim" map-to="def:comment"/>
<style id="special-char" name="Special Character" map-to="def:special-char"/>
<style id="part" name="Part Heading" map-to="def:heading0"/>
<style id="chapter" name="Chapter Heading" map-to="def:heading1"/>
<style id="section" name="Section Heading" map-to="def:heading2"/>
<style id="subsection" name="SubSection Heading" map-to="def:heading3"/>
<style id="subsubsection" name="SubSubSection Heading" map-to="def:heading4"/>
<style id="paragraph" name="Paragraph Heading" map-to="def:heading5"/>
<style id="subparagraph" name="SubParagraph Heading" map-to="def:heading6"/>
</styles>
<definitions>
<!-- comment -->
<context id="comment">
<include>
<context id="end-line-comment" style-ref="comment">
<start>%</start>
<end>$</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="comment-env" style-ref="comment" class="no-spell-check">
<start>\\begin\{comment\}</start>
<end>\\end\{comment\}</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
</include>
</context>
<!-- verbatim -->
<context id="verbatim-env" style-inside="true" style-ref="verbatim" class-disabled="no-spell-check">
<start>(\\begin)\{(verbatim\*?|alltt)\}</start>
<end>(\\end)\{(\%{2@start})\}</end>
<include>
<context sub-pattern="1" where="start" style-ref="common-commands" class="no-spell-check"/>
<context sub-pattern="1" where="end" style-ref="common-commands" class="no-spell-check"/>
<context sub-pattern="2" where="start" class="no-spell-check"/>
<context sub-pattern="2" where="end" class="no-spell-check"/>
</include>
</context>
<context id="lstlisting-env" style-inside="true" style-ref="verbatim" class="no-spell-check">
<start>(\\begin)\{(lstlisting|minted)\}</start>
<end>(\\end)\{\%{2@start}\}</end>
<include>
<context sub-pattern="1" where="start" style-ref="common-commands"/>
<context sub-pattern="1" where="end" style-ref="common-commands"/>
</include>
</context>
<!-- Embedded R Code (Sweave package) -->
<context id="R-block" class="no-spell-check">
<start>(\\begin)\{(Scode|Sinput|Soutput)\}</start>
<end>(\\end)\{\%{2@start}\}</end>
<include>
<context sub-pattern="1" where="start" style-ref="common-commands"/>
<context sub-pattern="1" where="end" style-ref="common-commands"/>
<context ref="r:r"/>
</include>
</context>
<!--
Examples: \url{http://google.de}, \href{http://google.de}{Google}
Supports also urls with math symbols: \url{https://example.com/$test}
-->
<context id="urls">
<include>
<context ref="url-command"/>
<context ref="href-command"/>
</include>
</context>
<context id="url-command" class="no-spell-check">
<match extended="true">
(\\url) # url command.
\{ # Literal opening braces.
[ \t]* # Optional spaces or tabs after the opening braces.
.*? # URL
[ \t]* # Optional spaces or tabs before the closing braces.
\} # closing url command.
</match>
<include>
<context sub-pattern="1" style-ref="command"/>
</include>
</context>
<context id="href-command">
<match extended="true">
(\\href) # url command.
\{( # Literal opening braces.
[ \t]* # Optional spaces or tabs after the opening braces.
.*? # URL
[ \t]* # Optional spaces or tabs before the closing braces.
)\} # closing url command.
\{(.*?)\} # link text
</match>
<include>
<context sub-pattern="1" class="no-spell-check" style-ref="command"/>
<context sub-pattern="2" class="no-spell-check"/>
</include>
</context>
<!--using brackets is an experimental feature from the listings package. The
following must support these cases:
\lstinline[]{code in here}
\lstinline[key=val, key=val]{code in here}
\lstinline[key=val, key=val]!code in here!
\lstinline[]!code in here!
\lstinline[][code in here[
\lstinline[NOT code in here, must specify empty optional argument to use square brackets[
\lstinline{code in here}
\lstinline{code in {here} but NOT in here} % brackets do not nest
\lstinline!code in here!
\lstinline=code in here=
\lstinline{this needs to fail{
If using \verb instead of \lstinline, the brackets cannot be used
-->
<context id="lstinline-curly-brackets" style-inside="true" style-ref="verbatim" class="no-spell-check">
<start>(\\lstinline)(\[.*?\])?{</start>
<end>}</end>
<include>
<context sub-pattern="1" where="start" style-ref="command"/>
</include>
</context>
<context id="lstinline-square-brackets" style-inside="true" style-ref="verbatim" class="no-spell-check">
<!-- square brackets don't match with the pair, and they require an
optional argument, even if empty -->
<start>(\\lstinline)(\[.*?\])\[</start>
<end>\[</end>
<include>
<context sub-pattern="1" where="start" style-ref="command"/>
</include>
</context>
<context id="lstinline" style-inside="true" style-ref="verbatim" class="no-spell-check">
<start>(\\lstinline)(\[.*?\])?((?!\[)\S)</start> <!-- ignore when starting with [ -->
<end>\%{3@start}</end>
<include>
<context sub-pattern="1" where="start" style-ref="command"/>
</include>
</context>
<context id="mintinline-curly-brackets" style-inside="true" style-ref="verbatim" class="no-spell-check">
<start>(\\mintinline)(\[.*?\])?\{.+?\}{</start>
<end>}</end>
<include>
<context sub-pattern="1" where="start" style-ref="command"/>
</include>
</context>
<context id="mintinline" style-inside="true" style-ref="verbatim" class="no-spell-check">
<start>(\\mintinline)(\[.*?\])?\{.+?\}((?!\[)\S)</start> <!-- ignore when starting with [ -->
<end>\%{3@start}</end>
<include>
<context sub-pattern="1" where="start" style-ref="command"/>
</include>
</context>
<!-- If using \verb instead of \lstinline, the brackets cannot be used -->
<context id="verbatim-inline" style-inside="true" style-ref="verbatim" class-disabled="no-spell-check">
<start>(\\verb)\*?(\S)</start>
<end>\%{2@start}</end>
<include>
<context sub-pattern="1" where="start" style-ref="command" class="no-spell-check"/>
</include>
</context>
<context id="verbatim">
<include>
<context ref="verbatim-env"/>
<context ref="lstlisting-env"/>
<context ref="verbatim-inline"/>
<context ref="lstinline-curly-brackets"/>
<context ref="lstinline-square-brackets"/>
<context ref="lstinline"/>
<context ref="mintinline-curly-brackets" />
<context ref="mintinline"/>
</include>
</context>
<!-- commands -->
<context id="common-commands" style-ref="common-commands" class="no-spell-check">
<prefix>\\</prefix>
<!-- We need to special case "_" since it is not considered a
boundary but it is allowed in latex -->
<suffix>(\b|(?=_))</suffix>
<keyword>Alpha</keyword>
<keyword>Beta</keyword>
<keyword>Chi</keyword>
<keyword>Delta</keyword>
<keyword>Epsilon</keyword>
<keyword>Eta</keyword>
<keyword>Gamma</keyword>
<keyword>Iota</keyword>
<keyword>Kappa</keyword>
<keyword>Lambda</keyword>
<keyword>Leftarrow</keyword>
<keyword>Leftrightarrow</keyword>
<keyword>Mu</keyword>
<keyword>Nu</keyword>
<keyword>Omega</keyword>
<keyword>Phi</keyword>
<keyword>Pi</keyword>
<keyword>Psi</keyword>
<keyword>Rho</keyword>
<keyword>Rightarrow</keyword>
<keyword>Sigma</keyword>
<keyword>Tau</keyword>
<keyword>Zeta</keyword>
<keyword>alpha</keyword>
<keyword>appendix</keyword>
<keyword>begin</keyword>
<keyword>beta</keyword>
<keyword>bigcap</keyword>
<keyword>bigcup</keyword>
<keyword>cap</keyword>
<keyword>cdot</keyword>
<keyword>chapter</keyword>
<keyword>chi</keyword>
<keyword>cite</keyword>
<keyword>cup</keyword>
<keyword>delta</keyword>
<keyword>documentclass</keyword>
<keyword>end</keyword>
<keyword>enumi</keyword>
<keyword>enumii</keyword>
<keyword>enumiii</keyword>
<keyword>enumiv</keyword>
<keyword>epsilon</keyword>
<keyword>equation</keyword>
<keyword>eta</keyword>
<keyword>exists</keyword>
<keyword>figure</keyword>
<keyword>footnote</keyword>
<keyword>footnotemark</keyword>
<keyword>footnotetext</keyword>
<keyword>forall</keyword>
<keyword>gamma</keyword>
<keyword>geq</keyword>
<keyword>in</keyword>
<keyword>int</keyword>
<keyword>iota</keyword>
<keyword>kappa</keyword>
<keyword>label</keyword>
<keyword>lambda</keyword>
<keyword>ldots</keyword>
<keyword>leftarrow</keyword>
<keyword>leq</keyword>
<keyword>mpfootnote</keyword>
<keyword>mu</keyword>
<keyword>neq</keyword>
<keyword>newcommand</keyword>
<keyword>newenvironment</keyword>
<keyword>newfont</keyword>
<keyword>newtheorem</keyword>
<keyword>not</keyword>
<keyword>notin</keyword>
<keyword>nu</keyword>
<keyword>omega</keyword>
<keyword>onecolumn</keyword>
<keyword>page</keyword>
<keyword>pageref</keyword>
<keyword>paragraph</keyword>
<keyword>part</keyword>
<keyword>phi</keyword>
<keyword>pi</keyword>
<keyword>prod</keyword>
<keyword>psi</keyword>
<keyword>qquad</keyword>
<keyword>quad</keyword>
<keyword>ref</keyword>
<keyword>rho</keyword>
<keyword>rightarrow</keyword>
<keyword>section</keyword>
<keyword>setminus</keyword>
<keyword>sigma</keyword>
<keyword>subparagraph</keyword>
<keyword>subsection</keyword>
<keyword>subset</keyword>
<keyword>subseteq</keyword>
<keyword>subsetneq</keyword>
<keyword>subsubsection</keyword>
<keyword>subsubsubsection</keyword>
<keyword>sum</keyword>
<keyword>supset</keyword>
<keyword>supseteq</keyword>
<keyword>supsetneq</keyword>
<keyword>table</keyword>
<keyword>tau</keyword>
<keyword>times</keyword>
<keyword>twocolumn</keyword>
<keyword>varepsilon</keyword>
<keyword>varphi</keyword>
<keyword>zeta</keyword>
</context>
<context id="generic-command" style-ref="command" class="no-spell-check" extend-parent="false">
<match>\\\@?[[:alnum:]]+\*?</match>
</context>
<context id="specific-commands">
<include>
<context id="documentclass" class="no-spell-check">
<match>(\\documentclass)(\[.*\])?(\{.*\})?</match>
<include>
<context sub-pattern="1" style-ref="common-commands"/>
</include>
</context>
<context id="include" class="no-spell-check">
<match>(\\(input|include|includeonly|usepackage))\b(\[.*\])?(\{.*\})?</match>
<include>
<context sub-pattern="1" style-ref="include"/>
</include>
</context>
<context id="begin-end-command" class="no-spell-check">
<match>(\\(begin|end))\{.*\}</match>
<include>
<context sub-pattern="1" style-ref="common-commands"/>
</include>
</context>
</include>
</context>
<!-- special characters -->
<define-regex id="accents" extended="true">
(\\( #leading backslash
( #1-Accents-
[bcdHruv\.\^'`~"=] # accent symbol
\s*\{([a-zA-Z] | \\i | \\j)\} | # letter (\i \j for i,j without dot)
[\.\^'`~"=]\s*([a-zA-Z] | \\i | \\j) |# non-letter accents without braces
t\s*\{([a-zA-Z] | \\i | \\j){2}\} # special accent over two letters
) | ( #2-Special letters-
(aa|AA | ae|AE | oe|OE | ss|SS | # letters followed by a non-word
[oO] | [lL])(?![a-zA-Z_@]) # character or e.g. \l causes
) # unwanted behaviour (i.e. \label)
)) | (!` | \?`) #3-Spanish punctuation
</define-regex>
<context id="special-char">
<include>
<!-- Include accents here before the escaped command symbols because for
example the hat (^) can be used as an accent and will be placed over
the following letter (e.g. \^o will NOT produce ^o) -->
<context id="accents" style-ref="special-char" class="no-spell-check">
<match>\%{accents}</match>
</context>
<context id="special-symbols" style-ref="special-char" class="no-spell-check">
<prefix>\\</prefix>
<suffix></suffix>
<keyword>\$</keyword>
<keyword>&amp;</keyword>
<keyword>%</keyword>
<keyword>#</keyword>
<keyword>_</keyword>
<keyword>\{</keyword>
<keyword>\}</keyword>
<keyword>~</keyword>
<keyword>\^</keyword>
<keyword>\\</keyword>
</context>
</include>
</context>
<!-- headings -->
<context id="curly-braces-pair">
<start>\{</start>
<end>\}</end>
<include>
<context ref="curly-braces-pair"/>
<context ref="latex"/>
</include>
</context>
<context id="headings">
<include>
<context id="part" style-inside="true" style-ref="part" end-at-line-end="true" class-disabled="no-spell-check">
<start>(\\part\*?)\{</start>
<end>\}</end>
<include>
<context sub-pattern="1" where="start" style-ref="common-commands" class="no-spell-check"/>
<context ref="curly-braces-pair"/>
<context ref="latex"/>
</include>
</context>
<context id="chapter" style-inside="true" style-ref="chapter" end-at-line-end="true" class-disabled="no-spell-check">
<start>(\\chapter\*?)\{</start>
<end>\}</end>
<include>
<context sub-pattern="1" where="start" style-ref="common-commands" class="no-spell-check"/>
<context ref="curly-braces-pair"/>
<context ref="latex"/>
</include>
</context>
<context id="section" style-inside="true" style-ref="section" end-at-line-end="true" class-disabled="no-spell-check">
<start>(\\section\*?)\{</start>
<end>\}</end>
<include>
<context sub-pattern="1" where="start" style-ref="common-commands" class="no-spell-check"/>
<context ref="curly-braces-pair"/>
<context ref="latex"/>
</include>
</context>
<context id="subsection" style-inside="true" style-ref="subsection" end-at-line-end="true" class-disabled="no-spell-check">
<start>(\\subsection\*?)\{</start>
<end>\}</end>
<include>
<context sub-pattern="1" where="start" style-ref="common-commands" class="no-spell-check"/>
<context ref="curly-braces-pair"/>
<context ref="latex"/>
</include>
</context>
<context id="subsubsection" style-inside="true" style-ref="subsubsection" end-at-line-end="true" class-disabled="no-spell-check">
<start>(\\subsubsection\*?)\{</start>
<end>\}</end>
<include>
<context sub-pattern="1" where="start" style-ref="common-commands" class="no-spell-check"/>
<context ref="curly-braces-pair"/>
<context ref="latex"/>
</include>
</context>
<context id="paragraph" style-inside="true" style-ref="paragraph" end-at-line-end="true" class-disabled="no-spell-check">
<start>(\\paragraph\*?)\{</start>
<end>\}</end>
<include>
<context sub-pattern="1" where="start" style-ref="common-commands" class="no-spell-check"/>
<context ref="curly-braces-pair"/>
<context ref="latex"/>
</include>
</context>
<context id="subparagraph" style-inside="true" style-ref="subparagraph" end-at-line-end="true" class-disabled="no-spell-check">
<start>(\\subparagraph\*?)\{</start>
<end>\}</end>
<include>
<context sub-pattern="1" where="start" style-ref="common-commands" class="no-spell-check"/>
<context ref="curly-braces-pair"/>
<context ref="latex"/>
</include>
</context>
</include>
</context>
<!-- math -->
<!-- Commands exclusive to math mode -->
<context id="math-command" class="no-spell-check" style-ref="common-commands">
<match extended="true">
\\(
frac | sqrt | sum | (co)?prod | o?int | #-Functions
infty | (c|d|v)dots | nonumber | #-special in math mode
mathnormal | math(rm|sf|tt|it|bf|cal) | #-Math font commands
(display|text|script(script)?)style | #-Math size commands
alpha | beta | (g|G)amma | (d|D)elta | #-Greek letters
(var)?epsilon | zeta | eta | ((vart)|t|T)heta | ##
iota | kappa | (l|L)ambda | mu | nu | (x|X)i | ##
((varp)|p|P)i | (var)?rho | ((vars)|s|S)igma | ##
tau | (u|U)psilon | ((varp)|p|P)hi | chi | ##
(p|P)si | (o|O)mega | ##
pm | mp | times | div | cdot | ast | star | #-Binary operators
dd?agger | amalg | (sq)?c(a|u)p | uplus | vee | ##
wedge | o(plus|minus|times) | (big)?circ | ##
bullet | (d|D)iamond | (un)?(l|r)hd | ##
o(slash|dot) | Box | bigtriangle(up|down) | ##
triangle(left|right) | setminus | wr | ##
gets | to | ((u|U)p(down)? | (d|D)own)arrow | #-Arrows and pointers
((l|L)eft(right)?|(r|R)ight)arrow | (long)mapsto |##
hook(left|right)arrow | (ne|se|sw|nw)arrow | ##
(left|right)harpoon(up|down) | rightleftharpoons |##
(l|L)ong(left(right)?|right)arrow | ##
(wide)hat | check | dd?ot | breve | acute | #-Accents in math mode
grave | bar | vec | (wide)tilde | mathring | ##
(over|under)(line|brace) | (i|j)math | ##i, j dots removed
(arc)?(cosh?|sinh?|tanh?) | arg | coth? | csc | #-Function names
deg | det | dim | exp | gcd | hom | inf | ker | ##
lg | lim(inf|sup)? | ln | log | max | min | Pr | ##
sec | sup ##
)(?=\b)
</match>
</context>
<context id="math-spacing" style-ref="special-char">
<match>\\[;:!]</match>
</context>
<context id="math-brackets" style-ref="common-commands">
<match extended="true">
\\(left | right | [bB]igg?[lr]) ( # bracket size specifier
\(|\) | \[|\] | \\\{|\\\} | # normal brackets (curly escaped)
\| | \\\| | / | \\backslash | # pipe and slashes
\\( #-symbol commands
[lr]floor | [lr]ceil | [lr]angle | ##
([uU]p(down)?|[dD]own)arrow ##
) ##
)
</match>
</context>
<context id="math-super-sub-script" style-ref="common-commands">
<match>\^|_</match>
</context>
<context id="in-math" class="no-spell-check">
<include>
<context ref="comment"/>
<context ref="math-command"/>
<context ref="math-spacing"/>
<context ref="math-brackets"/>
<context ref="special-char"/>
<context ref="math-super-sub-script"/>
<context ref="generic-command"/>
</include>
</context>
<context id="math-1" style-ref="math" class="no-spell-check">
<start>\$\$</start>
<end>\$\$</end>
<include>
<context sub-pattern="0" where="start" style-ref="math-boundary"/>
<context sub-pattern="0" where="end" style-ref="math-boundary"/>
<context ref="in-math"/>
</include>
</context>
<context id="math-2" style-ref="math" class="no-spell-check">
<start>\\\[</start>
<end>\\\]</end>
<include>
<context sub-pattern="0" where="start" style-ref="math-boundary"/>
<context sub-pattern="0" where="end" style-ref="math-boundary"/>
<context ref="in-math"/>
</include>
</context>
<context id="math-env" style-ref="math" style-inside="true" class="no-spell-check">
<start>(\\begin)\{(math|displaymath|equation\*?|align\*?|eqnarray\*?)\}</start>
<end>(\\end)\{\%{2@start}\}</end>
<include>
<context sub-pattern="1" where="start" style-ref="common-commands"/>
<context sub-pattern="1" where="end" style-ref="common-commands"/>
<context ref="in-math"/>
</include>
</context>
<context id="inline-math-1" style-ref="inline-math" class="no-spell-check">
<start>\$</start>
<end>\$</end>
<include>
<context sub-pattern="0" where="start" style-ref="math-boundary"/>
<context sub-pattern="0" where="end" style-ref="math-boundary"/>
<context ref="in-math"/>
</include>
</context>
<context id="inline-math-2" style-ref="inline-math" class="no-spell-check">
<start>\\\(</start>
<end>\\\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="math-boundary"/>
<context sub-pattern="0" where="end" style-ref="math-boundary"/>
<context ref="in-math"/>
</include>
</context>
<context id="math">
<include>
<context ref="math-1"/>
<context ref="math-2"/>
<context ref="math-env"/>
<context ref="inline-math-1"/>
<context ref="inline-math-2"/>
</include>
</context>
<context id="latex">
<include>
<context ref="comment"/>
<context ref="verbatim"/>
<context ref="R-block"/>
<context ref="headings"/>
<context ref="math"/>
<context ref="urls"/>
<context ref="specific-commands"/>
<context ref="common-commands"/>
<context ref="special-char"/>
<context ref="generic-command"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,921 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Jeffery To <jeffery.to@gmail.com>
Copyright (C) 2018-2019 Jeffery To <jeffery.to@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="less" name="Less" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">text/less;text/x-less</property>
<property name="globs">*.less</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<!-- variables -->
<style id="variable" name="Variable" map-to="def:identifier"/>
<style id="built-in-variable" name="Built-in Variable" map-to="def:builtin"/>
<!-- operators -->
<style id="operator-symbol" name="Operator Symbol" map-to="css:symbol"/>
<!-- Less data types -->
<style id="boolean" name="Boolean Value" map-to="def:boolean"/>
<style id="group-delimiter" name="Group Delimiter" map-to="css:delimiter"/>
<!-- mixins -->
<style id="mixin-parameters-delimiter" name="Mixin Parameters Delimiter" map-to="css:delimiter"/>
<!-- guards -->
<style id="guard-operator" name="Guard Operator" map-to="css:at-rule-operator"/>
<!-- Less selectors -->
<style id="selector-fragment" name="Selector Fragment"/>
</styles>
<default-regex-options case-sensitive="false"/>
<keyword-char-class>[a-z0-9_\x{80}-\x{10ffff}\\-]</keyword-char-class>
<definitions>
<!-- global -->
<define-regex id="identifier">[\w-]+</define-regex>
<define-regex id="statement-end" extended="true">;|(?=})</define-regex>
<context id="embedded-lang-hook"/>
<context id="less-embedded-lang-hook">
<include>
<context ref="embedded-lang-hook"/>
<context ref="css:embedded-lang-hook" original="true"/>
</include>
</context>
<context id="single-line-comment" style-ref="css:comment" end-at-line-end="true" class-disabled="no-spell-check" class="comment">
<start>//</start>
<include>
<context ref="css:embedded-lang-hook"/>
<!-- line continuations not allowed -->
<context ref="def:in-comment"/>
</include>
</context>
<context id="less-comment">
<include>
<context ref="single-line-comment"/>
<context ref="css:comment" original="true"/>
</include>
</context>
<replace id="css:embedded-lang-hook" ref="less-embedded-lang-hook"/>
<replace id="css:comment" ref="less-comment"/>
<!-- variables -->
<context id="variable" style-ref="variable">
<match>@\%{identifier}</match>
</context>
<context id="variable-interpolation" style-ref="variable">
<start>@{</start>
<end>}</end>
<include>
<context ref="css:embedded-lang-hook"/>
<!-- no comment here -->
<!-- nested interpolations are not documented but appear to work
(functions as variable reference / indirection) -->
<context ref="variable-interpolation-value"/>
</include>
</context>
<context id="variable-reference" style-ref="variable">
<match>@@\%{identifier}</match>
</context>
<context id="property-variable" style-ref="variable">
<match>\$\%{identifier}</match>
</context>
<context id="arguments-variable" style-ref="built-in-variable">
<match>@arguments\%]</match>
</context>
<context id="arguments-variable-interpolation" style-ref="built-in-variable">
<match>@{arguments}</match>
</context>
<context id="variable-value">
<include>
<context ref="arguments-variable"/>
<context ref="variable"/>
<context ref="variable-reference"/>
<context ref="property-variable"/>
</include>
</context>
<context id="variable-interpolation-value">
<include>
<context ref="arguments-variable-interpolation"/>
<context ref="variable-interpolation"/>
</include>
</context>
<!-- operators -->
<!-- it appears the slash is treated as division everywhere except
in a font property declaration and in an aspect ratio media query test,
not sure how to detect these cases
also not sure what are Less' rules regarding hyphen vs subtraction -->
<context id="arithmetic-operator" style-ref="operator-symbol">
<match extended="true">
(
[+*/] |
(?&lt;! \%{css:single-identifier-char} )
-
(?! \%{css:single-identifier-char} )
)
</match>
</context>
<!-- Less data types -->
<context id="boolean" style-ref="boolean">
<keyword>true</keyword>
</context>
<context id="double-quoted-escape-string" style-ref="css:string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>~"</start>
<end>"</end>
<include>
<context ref="css:embedded-lang-hook"/>
<!-- no comment here -->
<context ref="css:string-content"/>
</include>
</context>
<context id="single-quoted-escape-string" style-ref="css:string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>~'</start>
<end>'</end>
<include>
<context ref="css:embedded-lang-hook"/>
<!-- no comment here -->
<context ref="css:string-content"/>
</include>
</context>
<context id="escape-string">
<include>
<context ref="double-quoted-escape-string"/>
<context ref="single-quoted-escape-string"/>
</include>
</context>
<context id="detached-ruleset">
<start>{</start>
<end>}</end>
<include>
<context sub-pattern="0" where="start" style-ref="css:block-delimiter"/>
<context sub-pattern="0" where="end" style-ref="css:block-delimiter"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="css:style-block-content"/>
</include>
</context>
<context id="detached-ruleset-call-close-paren" style-ref="variable">
<match>\)</match>
</context>
<context id="detached-ruleset-call">
<start>@\%{identifier}\(</start>
<end>\%{statement-end}</end>
<include>
<context sub-pattern="0" where="start" style-ref="variable"/>
<context sub-pattern="0" where="end" style-ref="css:delimiter"/>
<context ref="css:embedded-lang-hook"/>
<!-- no comment here -->
<context ref="detached-ruleset-call-close-paren"/>
</include>
</context>
<context id="data-group">
<start>\(</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="group-delimiter"/>
<context sub-pattern="0" where="end" style-ref="group-delimiter"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="css:data-value"/>
</include>
</context>
<context id="any-group">
<start>\(</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="group-delimiter"/>
<context sub-pattern="0" where="end" style-ref="group-delimiter"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="css:any-value"/>
</include>
</context>
<!-- data types -->
<context id="less-string-content">
<include>
<context ref="variable-interpolation-value"/>
<context ref="css:string-content" original="true"/>
</include>
</context>
<replace id="css:string-content" ref="less-string-content"/>
<!-- Less functions -->
<!-- since % isn't a valid identifier -->
<context id="format">
<start>%\(</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="css:function"/>
<context sub-pattern="0" where="end" style-ref="css:function"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="css:function-content"/>
</include>
</context>
<!-- functions -->
<context id="less-url">
<start>url\(</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="css:function"/>
<context sub-pattern="0" where="end" style-ref="css:function"/>
<context ref="css:embedded-lang-hook"/>
<!-- only accept multi-line comments because // is part of urls -->
<context ref="css:comment" original="true"/>
<context ref="css:escape" ignore-style="true"/>
<context ref="css:string-value"/>
</include>
</context>
<context id="less-function-content">
<include>
<context ref="css:function-content" original="true"/>
<context ref="css:semicolon"/> <!-- allowed as argument separator -->
</include>
</context>
<context id="less-function-call">
<include>
<context ref="format"/>
<context ref="css:function-call" original="true"/>
</include>
</context>
<replace id="css:url" ref="less-url"/>
<replace id="css:function-content" ref="less-function-content"/>
<replace id="css:function-call" ref="less-function-call"/>
<!-- data values -->
<context id="less-name-value">
<include>
<context ref="css:function-call"/>
<context ref="variable-value"/>
<context ref="escape-string"/> <!-- outputs unquoted strings -->
<context ref="css:name-value" original="true"/>
</include>
</context>
<context id="less-string-value">
<include>
<context ref="css:function-call"/>
<context ref="variable-value"/>
<context ref="css:string-value" original="true"/>
</include>
</context>
<context id="less-data-value">
<include>
<context ref="css:function-call"/>
<context ref="data-group"/>
<context ref="variable-value"/>
<context ref="escape-string"/>
<context ref="css:string-value" original="true"/>
<context ref="css:color-value"/>
<context ref="css:number-value"/>
<context ref="css:unicode-range"/>
<context ref="arithmetic-operator"/>
</include>
</context>
<replace id="css:name-value" ref="less-name-value"/>
<replace id="css:string-value" ref="less-string-value"/>
<replace id="css:data-value" ref="less-data-value"/>
<!-- any assignable value -->
<context id="less-any-value">
<include>
<context ref="css:function-call"/>
<context ref="any-group"/>
<context ref="variable-value"/>
<context ref="escape-string"/>
<context ref="boolean"/>
<context ref="detached-ruleset"/>
<context ref="css:property-value-keyword"/>
<context ref="css:string-value" original="true"/>
<context ref="css:color-value"/>
<context ref="css:number-value"/>
<context ref="css:unicode-range"/>
<context ref="arithmetic-operator"/>
<context ref="css:name-value" original="true"/>
<context ref="css:slash"/>
<context ref="css:comma"/>
</include>
</context>
<replace id="css:any-value" ref="less-any-value"/>
<!-- style properties -->
<context id="less-property-name">
<include>
<context ref="variable-interpolation-value"/>
<context ref="css:property-name" original="true"/>
</include>
</context>
<replace id="css:property-name" ref="less-property-name"/>
<!-- style block -->
<context id="less-declaration-property">
<include>
<context ref="variable"/> <!-- variable assignment -->
<context ref="css:declaration-property" original="true"/>
</include>
</context>
<context id="less-declaration-value">
<start extended="true">
(?(DEFINE)
(?&lt;escape_comment_start&gt; (?: \\ /[/*] )+ )
(?&lt;escape&gt; (?: \\ . )+ )
(?&lt;escape_not_interpolation_start&gt; (?: \\ (?! @{ ) . )+ )
(?&lt;interpolation_start_chars&gt;
(?: (?: @ (?! { ) )+ | (?: (?&lt;! @ ) { )+ )
)
(?&lt;comment_start_chars&gt;
(?: (?: (?&lt;! / ) / (?! [/*] ) )+ | (?: (?&lt;! / ) \* )+ )
)
(?&lt;comment_end_chars&gt;
(?: (?: \* (?! / ) )+ | (?: (?&lt;! \* ) / )+ )
)
(?&lt;single_line_comment&gt; // .* )
(?&lt;interpolation&gt; # recursive subpattern to find matching braces
@{
(?:
(?&gt;
(?:
[^}@{]+ |
# no escapes
(?&amp;interpolation_start_chars)
)+
) |
(?&amp;interpolation)
)*
}
)
(?&lt;parentheses&gt; # recursive subpattern to find matching parentheses
\(
(?:
(?&gt;
(?:
[^\\)(/*"']+ |
(?&amp;escape_comment_start) |
(?&amp;escape) |
(?&amp;comment_start_chars)
)+
) |
(?&amp;parentheses) |
(?&amp;single_line_comment) |
(?&amp;multiline_comment) |
(?&amp;double_quote_string) |
(?&amp;single_quote_string)
)*
\)
)
(?&lt;multiline_comment&gt; # subpattern to find matching comment delimiters
/\*
(?:
(?&gt;
(?:
[^*/]+ |
# no escapes
(?&amp;comment_end_chars)
)+
)
)*
\*/
)
(?&lt;double_quote_string&gt; # subpattern to find matching double quotes
"
(?:
(?&gt;
(?:
[^\\"@{]+ |
(?&amp;escape_not_interpolation_start) |
(?&amp;interpolation_start_chars)
)+
) |
(?&amp;interpolation)
)*
"
)
(?&lt;single_quote_string&gt; # subpattern to find matching single quotes
'
(?:
(?&gt;
(?:
[^\\'@{]+ |
(?&amp;escape_not_interpolation_start) |
(?&amp;interpolation_start_chars)
)+
) |
(?&amp;interpolation)
)*
'
)
)
(
\+_?: | # property merge
:
(?:
(?! # not the start of a
\%{css:single-identifier-char} | # pseudo-class
[:\\] | # pseudo-element, escape
@{ | # variable interpolation
/\* # comment
) | # or
(?= # ends like a normal declaration
(?:
(?&gt;
(?:
[^\\;}{(/*"']+ |
(?&amp;escape_comment_start) |
(?&amp;escape) |
(?&amp;comment_start_chars)
)+
) |
(?&amp;parentheses) |
(?&amp;single_line_comment) |
(?&amp;multiline_comment) |
(?&amp;double_quote_string) |
(?&amp;single_quote_string)
)*
\%{css:declaration-value-end} # with a semicolon or at the end of a block
)
)
)
</start>
<end>\%{css:declaration-value-end}</end>
<include>
<context sub-pattern="0" where="start" style-ref="css:delimiter"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="css:declaration-value-content"/>
</include>
</context>
<context id="less-style-block-content">
<include>
<context ref="css:at-rule"/> <!-- because Less variables look like at-rules -->
<context ref="detached-ruleset-call"/>
<context ref="standalone-plugin-function-call"/>
<context ref="css:style-block-content" original="true"/>
<context ref="css:selector"/>
<context ref="css:style-block"/>
</include>
</context>
<replace id="css:declaration-property" ref="less-declaration-property"/>
<replace id="css:declaration-value" ref="less-declaration-value"/>
<replace id="css:style-block-content" ref="less-style-block-content"/>
<!-- media queries -->
<!-- include variable-value at this level because a variable can
contain the whole media feature test,
e.g. ~'(orientation: landscape)'
allowing variable-value here means variables are also allowed
for media type and media feature test name/value -->
<context id="less-media-queries">
<include>
<context ref="variable-value"/>
<context ref="css:media-queries" original="true"/>
</include>
</context>
<replace id="css:media-queries" ref="less-media-queries"/>
<!-- Less at-rules -->
<!--
@plugin <options>? <url(...)|"url">;
-->
<context id="at-plugin-options">
<start>(?&lt;=@plugin)\s*(\()</start>
<end>\)</end>
<include>
<context sub-pattern="1" where="start" style-ref="group-delimiter"/>
<context sub-pattern="0" where="end" style-ref="group-delimiter"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<!-- options are passed to the plugin directly, not parsed by Less -->
</include>
</context>
<context id="at-plugin">
<start>@plugin\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="css:at-rule"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="at-plugin-options"/>
<context ref="css:url"/>
<!-- appears to follow the same rules as @import regarding variables -->
<context ref="escape-string"/>
<context ref="css:string-value" original="true"/>
<context ref="css:at-rule-delimiter"/>
</include>
</context>
<context id="standalone-plugin-function-call">
<start>(?=\%{identifier}\()</start>
<end>\%{statement-end}</end>
<include>
<context sub-pattern="0" where="end" style-ref="css:delimiter"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="css:function-call"/>
</include>
</context>
<!-- at-rules -->
<context id="less-at-charset">
<start case-sensitive="true">@charset\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="css:at-rule"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<!-- though Less preserves quote type, which may be invalid -->
<context ref="css:string"/>
<context ref="css:at-rule-delimiter"/>
</include>
</context>
<context id="less-font-feature-type-value">
<include>
<context ref="variable-interpolation-value"/>
<context ref="css:font-feature-type-value" original="true"/>
</include>
</context>
<context id="less-font-feature-value-declaration-name">
<include>
<context ref="variable-interpolation-value"/>
<context ref="css:font-feature-value-declaration-name" original="true"/>
</include>
</context>
<context id="less-font-feature-value-declaration-value-content">
<include>
<context ref="variable-value"/>
<context ref="css:font-feature-value-declaration-value-content" original="true"/>
</include>
</context>
<!--
@import <option (, option)*>? <url(...)|"url"> <media-queries>?;
-->
<context id="less-at-import-options-keyword" style-ref="css:keyword">
<keyword>css</keyword>
<keyword>inline</keyword>
<keyword>less</keyword>
<keyword>multiple</keyword>
<keyword>once</keyword>
<keyword>optional</keyword>
<keyword>reference</keyword>
</context>
<context id="less-at-import-options">
<start>(?&lt;=@import)\s*(\()</start>
<end>\)</end>
<include>
<context sub-pattern="1" where="start" style-ref="group-delimiter"/>
<context sub-pattern="0" where="end" style-ref="group-delimiter"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="less-at-import-options-keyword"/>
<context ref="css:comma"/>
</include>
</context>
<context id="less-at-import">
<start>@import\%]</start>
<include>
<context sub-pattern="0" where="start" style-ref="css:at-rule"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="less-at-import-options"/>
<context ref="css:url"/>
<context ref="css:media-queries"/>
<!--
it appears only variable interpolation (in strings) is allowed
https://github.com/SomMeri/less4j/wiki/Less-Language-Import#syntax
but variables are allowed in media queries :-P
-->
<context ref="css:string-value" original="true"/>
<context ref="css:at-rule-delimiter"/>
</include>
</context>
<context id="less-keyframe-selector-value">
<include>
<context ref="variable-interpolation-value"/>
<context ref="css:keyframe-selector-value" original="true"/>
</include>
</context>
<context id="less-at-rule">
<include>
<context ref="at-plugin"/>
<context ref="css:at-rule" original="true"/>
</include>
</context>
<replace id="css:at-rule-style-block-content" ref="less-style-block-content"/>
<replace id="css:at-rule-css-block-content" ref="less-style-block-content"/>
<replace id="css:at-charset" ref="less-at-charset"/>
<replace id="css:font-feature-type-value" ref="less-font-feature-type-value"/>
<replace id="css:font-feature-value-declaration-name" ref="less-font-feature-value-declaration-name"/>
<replace id="css:font-feature-value-declaration-value-content" ref="less-font-feature-value-declaration-value-content"/>
<replace id="css:at-import" ref="less-at-import"/>
<replace id="css:keyframe-selector-value" ref="less-keyframe-selector-value"/>
<replace id="css:at-rule" ref="less-at-rule"/>
<!-- mixins -->
<context id="variable-arguments" style-ref="operator-symbol">
<match>\.\.\.</match>
</context>
<context id="mixin-parameters">
<start>\(</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="mixin-parameters-delimiter"/>
<context sub-pattern="0" where="end" style-ref="mixin-parameters-delimiter"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="css:any-value"/>
<context ref="variable-arguments"/>
<context ref="css:colon"/> <!-- named parameters / default values -->
<context ref="css:semicolon"/>
</include>
</context>
<!-- guards -->
<context id="guard-logical-operator" style-ref="guard-operator">
<keyword>and</keyword>
<keyword>not</keyword>
<keyword>or</keyword>
</context>
<context id="guard-comparison-operator" style-ref="operator-symbol">
<match>(&gt;=?|=&lt;?|&lt;)</match>
</context>
<context id="guard-test">
<start>\(</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="css:test-delimiter"/>
<context sub-pattern="0" where="end" style-ref="css:test-delimiter"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="css:any-value"/>
<context ref="guard-comparison-operator"/>
</include>
</context>
<context id="guard">
<start>\%[when\%]</start>
<end>(?={)</end>
<include>
<context sub-pattern="0" where="start" style-ref="guard-operator"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="guard-test"/>
<context ref="guard-logical-operator"/>
<context ref="css:comma"/>
</include>
</context>
<!-- Less selectors -->
<context id="parent-combinator">
<match>(&amp;)(\%{css:identifier-chars}?)</match>
<include>
<context sub-pattern="1" style-ref="css:combinator"/>
<context sub-pattern="2" style-ref="selector-fragment"/>
</include>
</context>
<context id="variable-interpolation-fragment" style-ref="selector-fragment">
<match>(?&lt;=})\%{css:identifier-chars}</match>
</context>
<context id="extend-pseudo-class-keyword" once-only="true" style-ref="css:keyword">
<keyword>all</keyword>
</context>
<context id="extend-pseudo-class" end-parent="true">
<start>\%[extend\(</start>
<end>\)</end>
<include>
<context sub-pattern="0" where="start" style-ref="css:pseudo-class"/>
<context sub-pattern="0" where="end" style-ref="css:pseudo-class"/>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="extend-pseudo-class-keyword"/>
<context ref="css:selector"/>
</include>
</context>
<!-- selectors -->
<context id="less-attribute-selector-content">
<include>
<context ref="variable-interpolation-value"/>
<context ref="css:attribute-selector-content" original="true"/>
</include>
</context>
<context id="less-simple-selector">
<include>
<context ref="variable-interpolation-value"/> <!-- include in simple selector to be included in :not() -->
<context ref="variable-interpolation-fragment"/>
<context ref="css:simple-selector" original="true"/>
</include>
</context>
<context id="less-combinator">
<include>
<context ref="parent-combinator"/>
<context ref="css:combinator" original="true"/>
</include>
</context>
<context id="less-lang-pseudo-class-content">
<include>
<context ref="variable-interpolation-value"/>
<context ref="css:lang-pseudo-class-content" original="true"/>
</include>
</context>
<context id="less-nth-pseudo-class-content">
<include>
<context ref="variable-interpolation-value"/>
<context ref="css:nth-pseudo-class-content" original="true"/>
</include>
</context>
<context id="less-pseudo-class-content">
<include>
<context ref="extend-pseudo-class"/>
<context ref="css:pseudo-class-content" original="true"/>
</include>
</context>
<context id="less-pseudo-class-not-pseudo-class-argument-content">
<include>
<context ref="extend-pseudo-class" style-ref="css:error"/>
<context ref="css:pseudo-class-not-pseudo-class-argument-content" original="true"/>
</include>
</context>
<context id="less-selector">
<include>
<context ref="guard"/>
<context ref="css:modifier"/>
<context ref="css:selector" original="true"/>
<context ref="mixin-parameters"/> <!-- can interfere with pseudo-class arguments -->
<context ref="css:semicolon"/> <!-- after mixin calls -->
</include>
</context>
<replace id="css:attribute-selector-content" ref="less-attribute-selector-content"/>
<replace id="css:simple-selector" ref="less-simple-selector"/>
<replace id="css:combinator" ref="less-combinator"/>
<replace id="css:lang-pseudo-class-content" ref="less-lang-pseudo-class-content"/>
<replace id="css:nth-pseudo-class-content" ref="less-nth-pseudo-class-content"/>
<replace id="css:pseudo-class-content" ref="less-pseudo-class-content"/>
<replace id="css:pseudo-class-not-pseudo-class-argument-content" ref="less-pseudo-class-not-pseudo-class-argument-content"/>
<replace id="css:selector" ref="less-selector"/>
<!-- top level declarations -->
<context id="top-level-declaration-property">
<include>
<context ref="variable"/>
</include>
</context>
<context id="top-level-declaration">
<include>
<context ref="top-level-declaration-property"/>
<context ref="css:declaration-value"/>
<context ref="css:modifier"/>
<context ref="css:semicolon"/>
</include>
</context>
<!-- main context -->
<context id="less" class="no-spell-check">
<include>
<context ref="css:embedded-lang-hook"/>
<context ref="css:comment"/>
<context ref="css:at-rule"/> <!-- because Less variables look like at-rules -->
<context ref="detached-ruleset-call"/>
<context ref="standalone-plugin-function-call"/>
<context ref="top-level-declaration"/>
<context ref="css:selector"/>
<context ref="css:style-block"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,208 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Marcello Pogliani
Copyright (C) 2013 Marcello Pogliani <marcello.pogliani@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="lex" name="Lex" _section="Source" version="2.0">
<metadata>
<property name="globs">*.l;*.lex;*.flex</property>
<property name="line-comment-start">//</property>
<property name="block-comment-start">/*</property>
<property name="block-comment-end">*/</property>
</metadata>
<styles>
<style id="token" name="Token" map-to="def:keyword" />
<style id="keyword" name="Keyword" map-to="def:keyword" />
<style id="regexp" name="Pattern" map-to="def:identifier" />
<style id="expression" name="Expression" map-to="def:type" />
</styles>
<definitions>
<define-regex id="identifier">[a-zA-Z_.][a-zA-Z0-9_.]*</define-regex>
<define-regex id="start-cond">&lt;\%{identifier}(,\%{identifier})*&gt;</define-regex>
<!-- blocks for embedded C code -->
<context id="inline-c">
<start>^%{</start>
<end>^%}</end>
<include>
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context sub-pattern="0" where="end" style-ref="keyword"/>
<context ref="c:c"/>
</include>
</context>
<context id="top-block">
<start>^%top{</start>
<end>^}</end>
<include>
<context sub-pattern="0" where="start" style-ref="keyword"/>
<context sub-pattern="0" where="end" style-ref="keyword"/>
<context ref="c:c"/>
</include>
</context>
<context id="c-with-brackets">
<include>
<context>
<start>{</start>
<end>}</end>
<include>
<context ref="c-with-brackets"/>
</include>
</context>
<context ref="c:c"/>
</include>
</context>
<context id="indented-lines-c-code">
<start>^(?=[ \t])</start>
<end>$</end>
<include>
<context ref="c:c" />
</include>
</context>
<!-- (1) definition section (before the first %%) -->
<context id="definitions">
<include>
<context ref="inline-c"/> <!-- %{ ... %} -->
<context ref="top-block"/> <!-- %top -->
<context ref="indented-lines-c-code" /> <!-- indented lines are copied verbatim to output, hence they're pure C code -->
<context ref="option-or-scope"/>
<context ref="def:c-like-comment"/>
<context ref="def:c-like-comment-multiline"/>
<context ref="def:c-like-close-comment-outside-comment"/>
<context ref="definition"/>
</include>
</context>
<context id="definition" style-ref="expression">
<start>^\%{identifier}</start>
<end>$</end>
<include>
<context sub-pattern="0" where="start" style-ref="token"/>
</include>
</context>
<context id="option-or-scope" style-ref="keyword">
<prefix>^%</prefix>
<keyword>option</keyword>
<keyword>s</keyword>
<keyword>x</keyword>
<keyword>pointer</keyword>
<keyword>array</keyword>
</context>
<!-- (2) rule section (after the first %%) -->
<context id="rule-section">
<start>^%%</start>
<include>
<context sub-pattern="0" where="start" style-ref="token"/>
<context ref="rule"/>
<context ref="indented-lines-c-code"/>
<context ref="inline-c"/>
<context ref="user-code"/>
</include>
</context>
<context id="rule">
<start>^(?=[^% \t])</start>
<end>$</end>
<include>
<context id="pattern" style-ref="expression">
<start>^</start>
<end>[ \t]</end>
<include>
<context ref="round-brackets" />
<context ref="square-brackets" />
<context>
<start>"</start>
<end>"</end>
<include>
<context ref="escaped-char" />
</include>
</context>
<context ref="start-condition" /> <!-- <SOMETHING>pattern -->
<context ref="start-condition-block" /> <!-- <SOMETHING>{ block } -->
<context ref="escaped-char" />
</include>
</context>
<context ref="c-with-brackets"/>
</include>
</context>
<context id="start-condition" style-ref="keyword">
<match>^\%{start-cond}(?=[^{])</match>
</context>
<context id="start-condition-block">
<start>(^\%{start-cond}){</start>
<end>}</end>
<include>
<context sub-pattern="1" where="start" style-ref="keyword"/>
<context ref="c-with-brackets" />
</include>
</context>
<context id="escaped-char">
<match>\\.</match>
</context>
<context id="square-brackets">
<start>\[</start>
<end>\]</end>
<include>
<context ref="escaped-char" />
<context ref="square-brackets" />
</include>
</context>
<context id="round-brackets">
<start>\(</start>
<end>\)</end>
<include>
<context ref="escaped-char" />
<context ref="round-brackets" />
</include>
</context>
<!-- (3) user code section, this is pure C -->
<context id="user-code">
<start>^%%</start>
<include>
<context sub-pattern="0" where="start" style-ref="token"/>
<context ref="c:c"/>
</include>
</context>
<!-- Main context -->
<context id="lex" class="no-spell-check">
<include>
<context ref="definitions"/>
<context ref="rule-section"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Yevgen Muntyan <muntyan@tamu.edu>
Copyright (C) 2006-2007 Yevgen Muntyan <muntyan@tamu.edu>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="libtool" name="libtool" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">text/x-libtool</property>
<property name="globs">*.la;*.lai;*.lo</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="constant" name="Constant" map-to="def:constant"/>
<style id="boolean" name="Boolean" map-to="libtool:constant"/>
</styles>
<definitions>
<context id="libtool">
<include>
<context ref="def:shell-like-comment"/>
<context end-at-line-end="true">
<start>\=</start>
<include>
<context ref="def:single-quoted-string"/>
<context ref="def:string"/>
<context ref="def:shell-like-comment"/>
<context ref="def:decimal"/>
<context style-ref="boolean">
<keyword>yes</keyword>
<keyword>no</keyword>
</context>
</include>
</context>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,314 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2012 Stefan Sundin (recover89@gmail.com)
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="llvm" _name="LLVM IR" version="2.0" _section="Source">
<metadata>
<property name="globs">*.ll</property>
<property name="line-comment-start">;</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="string" name="String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="function" name="Function" map-to="def:function"/>
<style id="constant" name="Constants" map-to="def:constant"/>
<style id="variable" name="Variable" map-to="def:variable"/>
<style id="identifier" name="Identifier" map-to="def:identifier"/>
<style id="type" name="Data Type" map-to="def:type"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
<style id="number" name="Number" map-to="def:decimal"/>
</styles>
<definitions>
<context id="keywords" style-ref="keyword">
<!-- Linkage Types -->
<keyword>private</keyword>
<keyword>linker_private</keyword>
<keyword>linker_private_weak</keyword>
<keyword>linker_private_weak_def_auto</keyword>
<keyword>internal</keyword>
<keyword>available_externally</keyword>
<keyword>linkonce</keyword>
<keyword>common</keyword>
<keyword>weak</keyword>
<keyword>appending</keyword>
<keyword>extern_weak</keyword>
<keyword>linkonce_odr</keyword>
<keyword>weak_odr</keyword>
<keyword>external</keyword>
<keyword>dllimport</keyword>
<keyword>dllexport</keyword>
<!-- Calling Conventions -->
<keyword>ccc</keyword>
<keyword>fastcc</keyword>
<keyword>coldcc</keyword>
<!-- Visibility Styles -->
<keyword>default</keyword>
<keyword>hidden</keyword>
<keyword>protected</keyword>
<!-- Named Types -->
<keyword>type</keyword>
<!-- Global Variables -->
<keyword>thread_local</keyword>
<keyword>constant</keyword>
<keyword>unnamed_addr</keyword>
<keyword>addrspace</keyword>
<!-- Functions -->
<keyword>define</keyword>
<!-- Aliases -->
<keyword>alias</keyword>
<!-- Parameter Attributes -->
<keyword>declare</keyword>
<keyword>zeroext</keyword>
<keyword>signext</keyword>
<keyword>inreg</keyword>
<keyword>byval</keyword>
<keyword>sret</keyword>
<keyword>noalias</keyword>
<keyword>nocapture</keyword>
<keyword>nest</keyword>
<!-- Garbage Collector Names -->
<keyword>gc</keyword>
<!-- Function Attributes -->
<keyword>address_safety</keyword>
<keyword>alignstack</keyword>
<keyword>alwaysinline</keyword>
<keyword>nonlazybind</keyword>
<keyword>inlinehint</keyword>
<keyword>naked</keyword>
<keyword>noimplicitfloat</keyword>
<keyword>noinline</keyword>
<keyword>noredzone</keyword>
<keyword>noreturn</keyword>
<keyword>nounwind</keyword>
<keyword>optsize</keyword>
<keyword>readnone</keyword>
<keyword>readonly</keyword>
<keyword>returns_twice</keyword>
<keyword>ssp</keyword>
<keyword>sspreq</keyword>
<keyword>uwtable</keyword>
<keyword>align</keyword>
<!-- Module-Level Inline Assembly -->
<keyword>module</keyword>
<keyword>asm</keyword>
<!-- Data Layout -->
<keyword>target</keyword>
<keyword>datalayout</keyword>
<keyword>triple</keyword>
<!-- Atomic Memory Ordering Constraints -->
<keyword>unordered</keyword>
<keyword>monotonic</keyword>
<keyword>acquire</keyword>
<keyword>release</keyword>
<keyword>acq_rel</keyword>
<keyword>seq_cst</keyword>
<keyword>singlethread</keyword>
<!-- add / sub / mul / shl -->
<keyword>nuw</keyword>
<keyword>nsw</keyword>
<!-- udiv / sdiv / lshr / ashr -->
<keyword>exact</keyword>
<!-- load / store / cmpxchg / atomicrmw -->
<keyword>volatile</keyword>
<keyword>atomic</keyword>
<!-- trunc / zext / sext / fptrunc / fpext / fptoui / fptosi / uitofp / sitofp / ptrtoint / inttoptr / bitcast -->
<keyword>to</keyword>
<!-- landingpad -->
<keyword>personality</keyword>
<keyword>cleanup</keyword>
<keyword>catch</keyword>
<keyword>filter</keyword>
<!-- icmp -->
<keyword>eq</keyword>
<keyword>ne</keyword>
<keyword>ugt</keyword>
<keyword>uge</keyword>
<keyword>ult</keyword>
<keyword>ule</keyword>
<keyword>sgt</keyword>
<keyword>slt</keyword>
<keyword>sle</keyword>
<!-- fcmp -->
<keyword>oeq</keyword>
<keyword>ogt</keyword>
<keyword>oge</keyword>
<keyword>olt</keyword>
<keyword>ole</keyword>
<keyword>one</keyword>
<keyword>ord</keyword>
<keyword>ueq</keyword>
<keyword>ugt</keyword>
<keyword>uge</keyword>
<keyword>ult</keyword>
<keyword>ule</keyword>
<keyword>une</keyword>
<keyword>uno</keyword>
<!-- getelementptr -->
<keyword>inbounds</keyword>
</context>
<context id="functions" style-ref="function">
<!-- Terminator Instructions -->
<keyword>ret</keyword>
<keyword>br</keyword>
<keyword>switch</keyword>
<keyword>indirectbr</keyword>
<keyword>invoke</keyword>
<keyword>resume</keyword>
<keyword>unreachable</keyword>
<!-- Binary Operations -->
<keyword>add</keyword>
<keyword>fadd</keyword>
<keyword>sub</keyword>
<keyword>fsub</keyword>
<keyword>mul</keyword>
<keyword>fmul</keyword>
<keyword>udiv</keyword>
<keyword>sdiv</keyword>
<keyword>fdiv</keyword>
<keyword>urem</keyword>
<keyword>srem</keyword>
<keyword>frem</keyword>
<!-- Bitwise Binary Operations -->
<keyword>shl</keyword>
<keyword>lshr</keyword>
<keyword>ashr</keyword>
<keyword>and</keyword>
<keyword>or</keyword>
<keyword>xor</keyword>
<!-- Vector Operations -->
<keyword>extractelement</keyword>
<keyword>insertelement</keyword>
<keyword>shufflevector</keyword>
<!-- Aggregate Operations -->
<keyword>extractvalue</keyword>
<keyword>insertvalue</keyword>
<!-- Memory Access and Addressing Operations -->
<keyword>alloca</keyword>
<keyword>load</keyword>
<keyword>store</keyword>
<keyword>fence</keyword>
<keyword>cmpxchg</keyword>
<keyword>atomicrmw</keyword>
<keyword>getelementptr</keyword>
<!-- Conversion Operations -->
<keyword>trunc</keyword>
<keyword>zext</keyword>
<keyword>sext</keyword>
<keyword>fptrunc</keyword>
<keyword>fpext</keyword>
<keyword>fptoui</keyword>
<keyword>fptosi</keyword>
<keyword>uitofp</keyword>
<keyword>sitofp</keyword>
<keyword>ptrtoint</keyword>
<keyword>inttoptr</keyword>
<keyword>bitcast</keyword>
<!-- Other Operations -->
<keyword>icmp</keyword>
<keyword>fcmp</keyword>
<keyword>phi</keyword>
<keyword>select</keyword>
<keyword>call</keyword>
<keyword>va_arg</keyword>
<keyword>landingpad</keyword>
</context>
<context id="constant" style-ref="constant">
<keyword>null</keyword>
<keyword>zeroinitializer</keyword>
<keyword>undef</keyword>
</context>
<context id="boolean" style-ref="boolean">
<keyword>true</keyword>
<keyword>false</keyword>
</context>
<context id="types" style-ref="type">
<!-- Floating Point Types -->
<keyword>half</keyword>
<keyword>float</keyword>
<keyword>double</keyword>
<keyword>x86_fp80</keyword>
<keyword>fp128</keyword>
<keyword>ppc_fp128</keyword>
<!-- X86mmx Type -->
<keyword>x86mmx</keyword>
<!-- Void Type -->
<keyword>void</keyword>
<!-- Label Type -->
<keyword>label</keyword>
<!-- Metadata Type -->
<keyword>metadata</keyword>
<!-- Opaque Structure Types -->
<keyword>opaque</keyword>
</context>
<context id="integertype" style-ref="type">
<match>i[0-9]+</match>
</context>
<context id="variable" style-ref="variable">
<match>[%!][a-zA-Z$\._0-9]*</match>
</context>
<context id="identifier" style-ref="identifier">
<match>@[a-zA-Z$\._][a-zA-Z$\._0-9]*</match>
</context>
<context id="numeric" style-ref="number">
<match extended="true">
(\b([0-9]+|0x[0-9a-fA-F]+)\b|
\b([0-9]*\.[0-9]+[Ee][+-]?[0-9]+|
[0-9]+))
</match>
</context>
<context id="string" style-ref="string" end-at-line-end="true">
<start>"</start>
<end>"</end>
</context>
<context id="line-comment" style-ref="comment" end-at-line-end="true">
<start>;</start>
</context>
<context id="llvm">
<include>
<context ref="keywords"/>
<context ref="functions"/>
<context ref="constant"/>
<context ref="boolean"/>
<context ref="types"/>
<context ref="integertype"/>
<context ref="variable"/>
<context ref="identifier"/>
<context ref="numeric"/>
<context ref="string"/>
<context ref="line-comment"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Ryuinferno, Paul Lammertsma, Kelly Craft
Copyright (C) 2013 Ryuinferno <ryuinferno.xda@gmail.com>
Copyright (C) 2014 Paul Lammertsma <paul@pixplicity.com>
Copyright (C) 2017 Kelly Craft <mushroomhead52e@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="logcat" name="logcat" version="2.0" _section="Other">
<metadata>
<property name="mimetypes">text/x-logcat</property>
<property name="globs">*.logcat</property>
</metadata>
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="verbose" name="Verbose" map-to="def:identifier"/>
<style id="debug" name="Debug" map-to="def:shebang"/>
<style id="info" name="Info" map-to="def:string"/>
<style id="warning" name="Warning" map-to="def:statement"/>
<style id="error" name="Error" map-to="def:number"/>
<style id="fatal" name="Fatal" map-to="def:error"/>
<style id="others" name="Others" map-to="def:comment"/>
</styles>
<definitions>
<context id="comment1" style-ref="comment">
<start>^---------</start>
<end>$</end>
</context>
<context id="comment2" style-ref="comment">
<start>^#</start>
<end>$</end>
</context>
<context id="datetime" style-ref="comment">
<start>^([0-9]{4}-[0-9]{2}|[0-9]{2})-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}</start>
<end> </end>
</context>
<context id="thread" style-ref="comment">
<start>([ ]+[0-9]+[ ]+|[0-9]{5} )</start>
<end>([0-9]{5}|[0-9]{4}|[0-9]{3}|[0-9]{2}|[0-9]{1})</end>
</context>
<context id="verbose" style-ref="verbose">
<start>( V |V\/|V\()</start>
<end>$</end>
</context>
<context id="debug" style-ref="debug">
<start>( D |D\/|D\()</start>
<end>$</end>
</context>
<context id="info" style-ref="info">
<start>( I |I\/|I\()</start>
<end>$</end>
</context>
<context id="warning" style-ref="warning">
<start>( W |W\/|W\()</start>
<end>$</end>
</context>
<context id="error" style-ref="error">
<start>( E |E\/|E\()</start>
<end>$</end>
</context>
<context id="fatal" style-ref="fatal">
<start>( F |F\/|F\()</start>
<end>$</end>
</context>
<!-- Main context -->
<context id="logcat" class="no-spell-check">
<include>
<context ref="comment1"/>
<context ref="comment2"/>
<context ref="datetime"/>
<context ref="thread"/>
<context ref="verbose"/>
<context ref="debug"/>
<context ref="info"/>
<context ref="warning"/>
<context ref="error"/>
<context ref="fatal"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,387 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Author: Paulo Moura <pmoura@logtalk.org>
Copyright (c) 2007-2019 Paulo Moura <pmoura@logtalk.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
-->
<language id="logtalk" name="Logtalk" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-logtalk</property>
<property name="globs">*.lgt</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="operator" name="Operator" map-to="def:operator"/>
<style id="error" name="Error" map-to="def:error"/>
<style id="string" name="String" map-to="def:string"/>
<style id="entity" name="Data type" map-to="def:type"/>
<style id="directive" name="Preprocessor directive" map-to="def:preprocessor"/>
<style id="number" name="Number" map-to="def:decimal"/>
<style id="built-in" name="Keyword" map-to="def:keyword"/>
<style id="variable" name="Variable" map-to="def:identifier"/>
<style id="escaped-character" name="Escaped Character" map-to="def:special-char"/>
</styles>
<definitions>
<define-regex id="escaped-character" extended="true">
\\([\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\)
</define-regex>
<context id="string" style-ref="string" end-at-line-end="true">
<start>"</start>
<end>"</end>
</context>
<context id="quoted-atom" style-ref="string" end-at-line-end="true">
<start>'</start>
<end>'</end>
<include>
<context id="escaped-character" style-ref="escaped-character">
<match>\%{escaped-character}</match>
</context>
</include>
</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="block-comment" style-ref="comment">
<start>/\*</start>
<end>\*/</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="close-comment-outside-comment" style-ref="error">
<match>\*/(?!\*)</match>
</context>
<context id="entity-directives" style-ref="entity">
<prefix>^\s*:-\s</prefix>
<keyword>(object)(?=[(])</keyword>
<keyword>(protocol)(?=[(])</keyword>
<keyword>(category)(?=[(])</keyword>
<keyword>(end_(object|protocol|category))(?=[.])</keyword>
</context>
<context id="entity-relations" style-ref="entity">
<keyword>(complements)(?=[(])</keyword>
<keyword>(extends)(?=[(])</keyword>
<keyword>(i(mp(orts|lements)|nstantiates))(?=[(])</keyword>
<keyword>(specializes)(?=[(])</keyword>
</context>
<context id="conditional-compilation-directives" style-ref="directive">
<prefix>^\s*:-\s</prefix>
<keyword>(e(lse|ndif))(?=[.])</keyword>
<keyword>((el)?if)(?=[(])</keyword>
</context>
<context id="source-file-directives" style-ref="directive">
<prefix>^\s*:-\s</prefix>
<keyword>(en(coding|sure_loaded))(?=[(])</keyword>
<keyword>(set_(logtalk|prolog)_flag)(?=[(])</keyword>
</context>
<context id="predicate-directives" style-ref="directive">
<prefix>^\s*:-\s</prefix>
<!-- Scope directives -->
<keyword>(p(ublic|r(otected|ivate)))(?=[(])</keyword>
<!-- Multi-threading directives -->
<keyword>(synchronized)(?=[(])</keyword>
<keyword>(synchronized)(?=[.])</keyword>
<keyword>(threaded)(?=[.])</keyword>
<!-- Other directives -->
<keyword>(alias)(?=[(])</keyword>
<keyword>((re)?export)(?=[(])</keyword>
<keyword>(in(clude|itialization|fo))(?=[(])</keyword>
<keyword>(mod(e|ule))(?=[(])</keyword>
<keyword>(built_in)(?=[.])</keyword>
<keyword>(dynamic)(?=[(])</keyword>
<keyword>(dynamic)(?=[.])</keyword>
<keyword>(discontiguous)(?=[(])</keyword>
<keyword>(m(eta_(non_terminal|predicate)|ultifile))(?=[(])</keyword>
<keyword>(op)(?=[(])</keyword>
<keyword>(c(alls|oinductive))(?=[(])</keyword>
<keyword>(use(s|_module))(?=[(])</keyword>
</context>
<context id="built-in-methods" style-ref="built-in">
<!-- Method execution context -->
<keyword>(context)(?=[(])</keyword>
<keyword>(parameter)(?=[(])</keyword>
<keyword>(se(lf|nder))(?=[(])</keyword>
<keyword>(this)(?=[(])</keyword>
<!-- Reflection -->
<keyword>(current_predicate)(?=[(])</keyword>
<keyword>(predicate_property)(?=[(])</keyword>
<!-- Database -->
<keyword>(a(bolish|ssert(a|z)))(?=[(])</keyword>
<keyword>(clause)(?=[(])</keyword>
<keyword>(retract(all)?)(?=[(])</keyword>
<!-- All solutions -->
<keyword>((bag|set)of)(?=[(])</keyword>
<keyword>(f(ind|or)all)(?=[(])</keyword>
<!-- Event handlers -->
<keyword>(before)(?=[(])</keyword>
<keyword>(after)(?=[(])</keyword>
<!-- Message forwarding handler -->
<keyword>(forward)(?=[(])</keyword>
<!-- DCGs -->
<keyword>(expand_(goal|term))(?=[(])</keyword>
<keyword>((goal|term)_expansion)(?=[(])</keyword>
<keyword>(phrase)(?=[(])</keyword>
</context>
<context id="built-in-predicates" style-ref="built-in">
<!-- Entity -->
<keyword>((abolish|c(reate|urrent))_(object|protocol|category))(?=[(])</keyword>
<keyword>((object|protocol|category)_property)(?=[(])</keyword>
<!-- Entity relations -->
<keyword>(co(mplements_object|nforms_to_protocol))(?=[(])</keyword>
<keyword>(extends_(object|protocol|category))(?=[(])</keyword>
<keyword>(imp(lements_protocol|orts_category))(?=[(])</keyword>
<keyword>((instantiat|specializ)es_class)(?=[(])</keyword>
<!-- Events -->
<keyword>(current_event)(?=[(])</keyword>
<keyword>((abolish|define)_events)(?=[(])</keyword>
<!-- Flags -->
<keyword>((set|create|current)_logtalk_flag)(?=[(])</keyword>
<!-- Compiling, loading, and library paths -->
<keyword>(logtalk_(compile|l(ibrary_path|oad|oad_context)|make(_target_action)?))(?=[(])</keyword>
<keyword>logtalk_make</keyword>
<!-- Multi-threading predicates -->
<keyword>(threaded(_(call|once|ignore|exit|peek|wait|notify))?)(?=[(])</keyword>
<!-- Engine predicates -->
<keyword>(threaded_engine(_(create|destroy|self|next|next_reified|yield|post|fetch))?)(?=[(])</keyword>
<!-- All solutions -->
<keyword>(forall)(?=[(])</keyword>
</context>
<context id="other-built-in-predicates" style-ref="built-in">
<!-- Term unification -->
<keyword>(subsumes_term)(?=[(])</keyword>
<keyword>(unify_with_occurs_check)(?=[(])</keyword>
<!-- Term testing -->
<keyword>(atom(ic)?)(?=[(])</keyword>
<keyword>(integer)(?=[(])</keyword>
<keyword>(float)(?=[(])</keyword>
<keyword>(c(allable|ompound))(?=[(])</keyword>
<keyword>((non)?var)(?=[(])</keyword>
<keyword>(number)(?=[(])</keyword>
<keyword>(ground)(?=[(])</keyword>
<keyword>(acyclic_term)(?=[(])</keyword>
<!-- Term creation and decomposition -->
<keyword>(functor)(?=[(])</keyword>
<keyword>(arg)(?=[(])</keyword>
<keyword>(copy_term)(?=[(])</keyword>
<keyword>(numbervars)(?=[(])</keyword>
<keyword>(term_variables)(?=[(])</keyword>
<!-- Arithemtic evaluation -->
<keyword>is</keyword>
<!-- Evaluable functors -->
<keyword>e</keyword>
<keyword>pi</keyword>
<keyword>(div)(?=[(])</keyword>
<keyword>(rem)(?=[(])</keyword>
<keyword>div</keyword>
<keyword>rem</keyword>
<keyword>(m(ax|in|od))(?=[(])</keyword>
<keyword>mod</keyword>
<keyword>(abs)(?=[(])</keyword>
<keyword>(sign)(?=[(])</keyword>
<keyword>(float(_(integer|fractional)_part)?)(?=[(])</keyword>
<keyword>(floor)(?=[(])</keyword>
<keyword>(truncate)(?=[(])</keyword>
<keyword>(round)(?=[(])</keyword>
<keyword>(ceiling)(?=[(])</keyword>
<!-- Other arithemtic functors -->
<keyword>(sin)(?=[(])</keyword>
<keyword>(cos)(?=[(])</keyword>
<keyword>(tan)(?=[(])</keyword>
<keyword>(a(cos|sin|tan|tan2))(?=[(])</keyword>
<keyword>(exp)(?=[(])</keyword>
<keyword>(log)(?=[(])</keyword>
<keyword>(sqrt)(?=[(])</keyword>
<keyword>(xor)(?=[(])</keyword>
<!-- Stream selection and control -->
<keyword>((current|set)_(in|out)put)(?=[(])</keyword>
<keyword>(open)(?=[(])</keyword>
<keyword>(close)(?=[(])</keyword>
<keyword>(flush_output)(?=[(])</keyword>
<keyword>flush_output</keyword>
<keyword>(stream_property)(?=[(])</keyword>
<keyword>(at_end_of_stream)(?=[(])</keyword>
<keyword>at_end_of_stream</keyword>
<keyword>(set_stream_position)(?=[(])</keyword>
<!-- Character input/output -->
<keyword>((get|p(eek|ut))_c(har|ode))(?=[(])</keyword>
<keyword>(nl)(?=[(])</keyword>
<keyword>nl</keyword>
<!-- Byte input/output -->
<keyword>((get|peek|put)_byte)(?=[(])</keyword>
<!-- Term input/output -->
<keyword>(read(_term)?)(?=[(])</keyword>
<keyword>(write(q|_(canonical|term))?)(?=[(])</keyword>
<keyword>((current_)?op)(?=[(])</keyword>
<keyword>((current_)?char_conversion)(?=[(])</keyword>
<!-- Logic and control -->
<keyword>(ca(ll|tch)|ignore|once|throw)(?=[(])</keyword>
<keyword>(true|fa(il|lse)|repeat|(instantiation|system)_error)(?![-!(^~])</keyword>
<keyword>((type|domain|existence|permission|representation|evaluation|resource|syntax)_error)(?=[(])</keyword>
<!-- Atomic term processing -->
<keyword>(atom_(length|c(hars|o(ncat|des))))(?=[(])</keyword>
<keyword>(sub_atom)(?=[(])</keyword>
<keyword>(char_code)(?=[(])</keyword>
<keyword>(number_c(hars|odes))(?=[(])</keyword>
<!-- Implementation defined hooks functions -->
<keyword>((set|current)_prolog_flag)(?=[(])</keyword>
<keyword>(halt)(?=[(])</keyword>
<keyword>halt</keyword>
<!-- Sorting -->
<keyword>((key)?sort)(?=[(])</keyword>
</context>
<context id="built-in-operators" style-ref="built-in">
<prefix></prefix>
<suffix></suffix>
<!-- Term unification -->
<keyword>=</keyword>
<keyword>\\=</keyword>
<!-- Term comparison -->
<keyword>(compare)(?=[(])</keyword>
<keyword>==</keyword>
<keyword>\\==</keyword>
<keyword>@&lt;</keyword>
<keyword>@=&lt;</keyword>
<keyword>@&gt;=</keyword>
<keyword>@&gt;</keyword>
<!-- Term creation and decomposition -->
<keyword>=\.\.</keyword>
<!-- Arithemtic comparison -->
<keyword>=:=</keyword>
<keyword>=\\=</keyword>
<keyword>&lt;</keyword>
<keyword>=&lt;</keyword>
<keyword>&gt;</keyword>
<keyword>&gt;=</keyword>
<!-- Evaluable functors -->
<keyword>\+(?![,a-z])</keyword>
<keyword>(?&lt;!:)(-)(?![,a-z])</keyword>
<keyword>\*</keyword>
<keyword>//</keyword>
<keyword>/</keyword>
<!-- Other arithemtic functors -->
<keyword>\*\*</keyword>
<!-- Bitwise functors -->
<keyword>&gt;&gt;</keyword>
<keyword>&lt;&lt;</keyword>
<keyword>/\\</keyword>
<keyword>\\/</keyword>
<keyword>\\</keyword>
<!-- Logic and control -->
<keyword>(\\\+|!)</keyword>
<!-- Existential quantifier -->
<keyword>\^</keyword>
<!-- Predicate aliases -->
<keyword>\bas\b</keyword>
</context>
<context id="number" style-ref="number">
<match extended="true">
\b(0'[\\].|0'.|0b[0-1]+|0o[0-7]+|0x[0-9a-fA-F]+|\d+(\.\d+)?([eE]([-+])?\d+)?)
</match>
</context>
<context id="variable" style-ref="variable">
<match extended="true">
\b[A-Z_][a-zA-Z0-9_]*
</match>
</context>
<context id="message-sending-operators" style-ref="built-in">
<prefix></prefix>
<suffix></suffix>
<keyword>::</keyword>
<keyword>\^\^</keyword>
</context>
<context id="category-predicate-direct-call" style-ref="built-in">
<prefix></prefix>
<suffix></suffix>
<keyword>:</keyword>
</context>
<context id="external-call-operator" style-ref="built-in">
<prefix></prefix>
<suffix></suffix>
<keyword>\{</keyword>
<keyword>\}</keyword>
</context>
<!--
<context id="mode-operators" style-ref="built-in">
<prefix></prefix>
<suffix></suffix>
<keyword>\+</keyword>
<keyword>-</keyword>
<keyword>\?</keyword>
<keyword>@</keyword>
</context>
-->
<context id="logtalk">
<include>
<context ref="string"/>
<context ref="quoted-atom"/>
<context ref="line-comment"/>
<context ref="block-comment"/>
<context ref="close-comment-outside-comment"/>
<context ref="entity-directives"/>
<context ref="entity-relations"/>
<context ref="conditional-compilation-directives"/>
<context ref="source-file-directives"/>
<context ref="predicate-directives"/>
<context ref="built-in-methods"/>
<context ref="built-in-predicates"/>
<context ref="other-built-in-predicates"/>
<context ref="built-in-operators"/>
<context ref="number"/>
<context ref="variable"/>
<context ref="message-sending-operators"/>
<context ref="category-predicate-direct-call"/>
<context ref="external-call-operator"/>
<!--
<context ref="mode-operators"/>
-->
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,301 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Bjørn Lindeijer <bjorn@lindeijer.nl>
Copyright (C) 2004 Bjørn Lindeijer <bjorn@lindeijer.nl>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="lua" name="Lua" version="2.0" _section="Script">
<metadata>
<property name="mimetypes">text/x-lua</property>
<property name="globs">*.lua</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="string" name="String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="escape" name="Escaped Character" map-to="def:special-char"/>
<style id="reserved" name="Reserved Identifier" map-to="def:keyword"/>
<style id="label" name="Label" map-to="def:keyword"/>
<style id="function" name="Function" map-to="def:function"/>
<style id="nil-value" name="Nil Constant" map-to="def:special-constant"/>
<style id="boolean" name="Boolean value" map-to="def:boolean"/>
</styles>
<definitions>
<context id="lua-escape" style-ref="escape">
<match>\\(\d{1,3}|a|b|f|n|r|t|u{[0-9a-fA-F]+?}|v|x[0-9a-fA-F]{2}|z|\\|"|'|\[|\])</match>
</context>
<context id="label" style-ref="label">
<match>\:\:[A-Za-z_][A-Za-z0-9_]*\:\:</match>
</context>
<context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
<start>["']</start>
<end>\%{0@start}</end>
<include>
<context ref="lua-escape"/>
<context ref="def:line-continue"/>
</include>
</context>
<context id="multi-line-string" style-ref="string" class="string" class-disabled="no-spell-check">
<start>\[(=*)\[</start>
<end>]\%{1@start}]</end>
</context>
<context id="block-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
<start>--\[(=*)\[</start>
<end>]\%{1@start}]</end>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
<start>--</start>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<context id="keywords" style-ref="keyword">
<keyword>and</keyword>
<keyword>break</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>elseif</keyword>
<keyword>end</keyword>
<keyword>for</keyword>
<keyword>function</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>local</keyword>
<keyword>not</keyword>
<keyword>or</keyword>
<keyword>repeat</keyword>
<keyword>return</keyword>
<keyword>then</keyword>
<keyword>until</keyword>
<keyword>while</keyword>
</context>
<context id="functions" style-ref="function">
<keyword>assert</keyword>
<keyword>bit32\.arshift</keyword>
<keyword>bit32\.band</keyword>
<keyword>bit32\.bnot</keyword>
<keyword>bit32\.bor</keyword>
<keyword>bit32\.btest</keyword>
<keyword>bit32\.bxor</keyword>
<keyword>bit32\.extract</keyword>
<keyword>bit32\.lrotate</keyword>
<keyword>bit32\.lshift</keyword>
<keyword>bit32\.replace</keyword>
<keyword>bit32\.rrotate</keyword>
<keyword>bit32\.rshift</keyword>
<keyword>collectgarbage</keyword>
<keyword>coroutine\.create</keyword>
<keyword>coroutine\.resume</keyword>
<keyword>coroutine\.running</keyword>
<keyword>coroutine\.status</keyword>
<keyword>coroutine\.wrap</keyword>
<keyword>coroutine\.yield</keyword>
<keyword>debug\.debug</keyword>
<keyword>debug\.gethook</keyword>
<keyword>debug\.getinfo</keyword>
<keyword>debug\.getlocal</keyword>
<keyword>debug\.getmetatable</keyword>
<keyword>debug\.getregistry</keyword>
<keyword>debug\.getupvalue</keyword>
<keyword>debug\.getuservalue</keyword>
<keyword>debug\.sethook</keyword>
<keyword>debug\.setlocal</keyword>
<keyword>debug\.setmetatable</keyword>
<keyword>debug\.setupvalue</keyword>
<keyword>debug\.setuservalue</keyword>
<keyword>debug\.traceback</keyword>
<keyword>debug\.upvalueid</keyword>
<keyword>debug\.upvaluejoin</keyword>
<keyword>dofile</keyword>
<keyword>error</keyword>
<keyword>getmetatable</keyword>
<keyword>io\.close</keyword>
<keyword>io\.flush</keyword>
<keyword>io\.input</keyword>
<keyword>io\.lines</keyword>
<keyword>io\.open</keyword>
<keyword>io\.output</keyword>
<keyword>io\.popen</keyword>
<keyword>io\.read</keyword>
<keyword>io\.tmpfile</keyword>
<keyword>io\.type</keyword>
<keyword>io\.write</keyword>
<keyword>ipairs</keyword>
<keyword>load</keyword>
<keyword>loadfile</keyword>
<keyword>loadstring</keyword>
<keyword>math\.abs</keyword>
<keyword>math\.acos</keyword>
<keyword>math\.asin</keyword>
<keyword>math\.atan</keyword>
<keyword>math\.atan2</keyword>
<keyword>math\.ceil</keyword>
<keyword>math\.cos</keyword>
<keyword>math\.cosh</keyword>
<keyword>math\.deg</keyword>
<keyword>math\.exp</keyword>
<keyword>math\.floor</keyword>
<keyword>math\.fmod</keyword>
<keyword>math\.frexp</keyword>
<keyword>math\.ldexp</keyword>
<keyword>math\.log</keyword>
<keyword>math\.log10</keyword>
<keyword>math\.max</keyword>
<keyword>math\.min</keyword>
<keyword>math\.modf</keyword>
<keyword>math\.pow</keyword>
<keyword>math\.rad</keyword>
<keyword>math\.random</keyword>
<keyword>math\.randomseed</keyword>
<keyword>math\.sin</keyword>
<keyword>math\.sinh</keyword>
<keyword>math\.sqrt</keyword>
<keyword>math\.tan</keyword>
<keyword>math\.tanh</keyword>
<keyword>module</keyword>
<keyword>next</keyword>
<keyword>os\.clock</keyword>
<keyword>os\.date</keyword>
<keyword>os\.difftime</keyword>
<keyword>os\.execute</keyword>
<keyword>os\.exit</keyword>
<keyword>os\.getenv</keyword>
<keyword>os\.remove</keyword>
<keyword>os\.rename</keyword>
<keyword>os\.setlocale</keyword>
<keyword>os\.time</keyword>
<keyword>os\.tmpname</keyword>
<keyword>package\.loadlib</keyword>
<keyword>package\.searchpath</keyword>
<keyword>package\.seeall</keyword>
<keyword>pairs</keyword>
<keyword>pcall</keyword>
<keyword>print</keyword>
<keyword>rawequal</keyword>
<keyword>rawget</keyword>
<keyword>rawlen</keyword>
<keyword>rawset</keyword>
<keyword>require</keyword>
<keyword>select</keyword>
<keyword>setmetatable</keyword>
<keyword>string\.byte</keyword>
<keyword>string\.char</keyword>
<keyword>string\.dump</keyword>
<keyword>string\.find</keyword>
<keyword>string\.format</keyword>
<keyword>string\.gmatch</keyword>
<keyword>string\.gsub</keyword>
<keyword>string\.len</keyword>
<keyword>string\.lower</keyword>
<keyword>string\.match</keyword>
<keyword>string\.rep</keyword>
<keyword>string\.reverse</keyword>
<keyword>string\.sub</keyword>
<keyword>string\.upper</keyword>
<keyword>table\.concat</keyword>
<keyword>table\.insert</keyword>
<keyword>table\.maxn</keyword>
<keyword>table\.pack</keyword>
<keyword>table\.remove</keyword>
<keyword>table\.sort</keyword>
<keyword>table\.unpack</keyword>
<keyword>tonumber</keyword>
<keyword>tostring</keyword>
<keyword>type</keyword>
<keyword>unpack</keyword>
<keyword>xpcall</keyword>
<!-- Lua <= 5.1 -->
<keyword>getfenv</keyword>
<keyword>gcinfo</keyword>
<keyword>loadlib</keyword>
<keyword>setfenv</keyword>
<!-- table mode -->
<keyword>__mode</keyword>
<!-- metamethods -->
<keyword>__index</keyword>
<keyword>__newindex</keyword>
<keyword>__mode</keyword>
<keyword>__call</keyword>
<keyword>__metatable</keyword>
<keyword>__tostring</keyword>
<keyword>__len</keyword>
<keyword>__gc</keyword>
<keyword>__unm</keyword>
<keyword>__add</keyword>
<keyword>__sub</keyword>
<keyword>__mul</keyword>
<keyword>__div</keyword>
<keyword>__mod</keyword>
<keyword>__pow</keyword>
<keyword>__concat</keyword>
<keyword>__eq</keyword>
<keyword>__lt</keyword>
<keyword>__le</keyword>
</context>
<context id="lua-reserved" style-ref="reserved">
<keyword>_[A-Z][A-Za-z0-9_]*</keyword>
</context>
<context id="nil-value" style-ref="nil-value">
<keyword>nil</keyword>
</context>
<context id="boolean" style-ref="boolean">
<keyword>false</keyword>
<keyword>true</keyword>
</context>
<context id="lua" class="no-spell-check">
<include>
<context ref="def:shebang"/>
<context ref="multi-line-string"/>
<context ref="label"/>
<context ref="string"/>
<context ref="block-comment"/>
<context ref="line-comment"/>
<context ref="keywords"/>
<context ref="functions"/>
<context ref="lua-reserved"/>
<context ref="nil-value"/>
<context ref="boolean"/>
</include>
</context>
</definitions>
</language>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,190 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Author: Paolo Borelli <pborelli@katamail.com>
Copyright (C) 2005 Paolo Borelli <pborelli@katamail.com>
Copyright (C) 2005 Ricardo Lenz
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="makefile" name="Makefile" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-makefile</property>
<property name="globs">[Mm]akefile;GNUmakefile;*.make;*.mak;*.mk</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="variable" name="Variable" map-to="def:type"/>
<style id="assignment-rhs" name="Assignment Right Hand Side"/>
<style id="assignment-lhs" name="Assignment Left Hand Side"/>
<style id="targets" name="targets" map-to="def:function"/>
<style id="prereq" name="prereq"/>
<style id="command" name="command"/>
<style id="trailing-tab" name="Trailing Tab"/>
<style id="function" name="function" map-to="def:function"/>
<style id="keyword" name="keyword" map-to="def:keyword"/>
</styles>
<definitions>
<replace id="sh:sh" ref="command"/>
<replace id="sh:variable" ref="sh-variable"/>
<define-regex id="variable">[a-zA-Z_][a-zA-Z0-9_]*</define-regex>
<context id="variable-1">
<match>\$\((\%{variable})\)</match>
<include>
<context sub-pattern="1" style-ref="variable"/>
</include>
</context>
<context id="variable-2">
<match>\$\{(\%{variable})\}</match>
<include>
<context sub-pattern="1" style-ref="variable"/>
</include>
</context>
<context id="variable">
<include>
<context ref="variable-1"/>
<context ref="variable-2"/>
</include>
</context>
<context id="sh-variable">
<include>
<context ref="variable"/>
<context ref="sh:variable" original="true"/>
</include>
</context>
<context id="string">
<include>
<!-- skip escaped characters -->
<context>
<match>\\.</match>
</context>
<context ref="def:string"/>
</include>
</context>
<context id="assignment-rhs" style-ref="assignment-rhs" end-at-line-end="true">
<start></start>
<include>
<context ref="def:line-continue"/>
<context ref="def:shell-like-comment"/>
<context ref="variable"/>
<context ref="string"/>
<context ref="def:single-quoted-string"/>
<context ref="sh:backtick-subshell"/>
</include>
</context>
<context id="command" style-ref="command" extend-parent="false" end-at-line-end="true">
<start></start>
<include>
<context ref="def:line-continue"/>
<context ref="sh:sh" original="true"/>
</include>
</context>
<context id="directives" style-ref="keyword">
<keyword>define</keyword>
<keyword>else</keyword>
<keyword>endef</keyword>
<keyword>endif</keyword>
<keyword>if</keyword>
<keyword>ifdef</keyword>
<keyword>ifeq</keyword>
<keyword>ifndef</keyword>
<keyword>ifneq</keyword>
<keyword>include</keyword>
<keyword>override</keyword>
<keyword>unexport</keyword>
</context>
<context id="functions" style-ref="function">
<keyword>addprefix</keyword>
<keyword>addsuffix</keyword>
<keyword>basename</keyword>
<keyword>call</keyword>
<keyword>dir</keyword>
<keyword>error</keyword>
<keyword>filter</keyword>
<keyword>filter-out</keyword>
<keyword>findstring</keyword>
<keyword>firstword</keyword>
<keyword>foreach</keyword>
<keyword>join</keyword>
<keyword>notdir</keyword>
<keyword>origin</keyword>
<keyword>patsubst</keyword>
<keyword>shell</keyword>
<keyword>sort</keyword>
<keyword>strip</keyword>
<keyword>subst</keyword>
<keyword>suffix</keyword>
<keyword>warning</keyword>
<keyword>wildcard</keyword>
<keyword>word</keyword>
<keyword>words</keyword>
</context>
<context id="makefile">
<include>
<context ref="def:shebang"/>
<context ref="def:shell-like-comment"/>
<context id="assignment" end-at-line-end="true">
<start>^(\%{variable})\s*[\+\?:]?=</start>
<include>
<context sub-pattern="1" where="start" style-ref="assignment-lhs"/>
<context ref="assignment-rhs"/>
</include>
</context>
<context id="rule">
<start>^([^\t\:][^\:]*)\:</start>
<end>^(?!\t)</end>
<include>
<context sub-pattern="1" where="start" style-ref="targets"/>
<context ref="def:shell-like-comment"/>
<context ref="directives"/>
<context id="prereq" end-at-line-end="true" style-ref="prereq">
<start>(?&lt;=:)(?=.)</start>
<end>;</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
<context ref="variable"/>
<context ref="functions"/>
</include>
</context>
<context id="trailing-tab" style-ref="trailing-tab">
<match>^\t+$</match>
</context>
<context ref="command"/>
</include>
</context>
<context ref="directives"/>
<context ref="functions"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: Milo Casagrande <milo@ubuntu.com>
Copyright (C) 2009 Milo Casagrande <milo@ubuntu.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="mallard" name="Mallard" version="2.0" _section="Markup">
<metadata>
<property name="globs">*.page</property>
<property name="block-comment-start">&lt;!--</property>
<property name="block-comment-end">--&gt;</property>
</metadata>
<styles>
<style id="page" name="Page Elements" map-to="def:identifier"/>
<style id="section" name="Section Elements" map-to="def:identifier"/>
<style id="block" name="Block Elements" map-to="def:identifier"/>
<style id="inline" name="Inline Elements" map-to="def:identifier"/>
</styles>
<definitions>
<context id="page-element" once-only="true" style-ref="page" class="no-spell-check">
<keyword>page</keyword>
</context>
<context id="section-element" style-ref="section" class="no-spell-check">
<keyword>section</keyword>
</context>
<context id="block-elements" style-ref="block" class="no-spell-check">
<keyword>code</keyword>
<keyword>p</keyword>
<keyword>example</keyword>
<keyword>screen</keyword>
<keyword>media</keyword>
<keyword>comment</keyword>
<keyword>figure</keyword>
<keyword>listing</keyword>
<keyword>note</keyword>
<keyword>quote</keyword>
<keyword>synopsis</keyword>
<keyword>list</keyword>
<keyword>steps</keyword>
<keyword>terms</keyword>
<keyword>tree</keyword>
<keyword>table</keyword>
<keyword>col</keyword>
<keyword>colgroup</keyword>
<keyword>tr</keyword>
<keyword>td</keyword>
<keyword>item</keyword>
</context>
<context id="inline-elements" style-ref="inline" class="no-spell-check">
<keyword>app</keyword>
<keyword>cmd</keyword>
<keyword>code</keyword>
<keyword>em</keyword>
<keyword>file</keyword>
<keyword>gui</keyword>
<keyword>guiseq</keyword>
<keyword>input</keyword>
<keyword>key</keyword>
<keyword>keyseq</keyword>
<keyword>link</keyword>
<keyword>media</keyword>
<keyword>output</keyword>
<keyword>span</keyword>
<keyword>sys</keyword>
<keyword>var</keyword>
<keyword>info</keyword>
<keyword>credit</keyword>
<keyword>name</keyword>
<keyword>email</keyword>
<keyword>copyright</keyword>
<keyword>year</keyword>
<keyword>license</keyword>
<keyword>desc</keyword>
<keyword>link</keyword>
<keyword>revision</keyword>
<keyword>title</keyword>
<keyword>subtitle</keyword>
<keyword>desc</keyword>
<keyword>cite</keyword>
</context>
<context id="mallard-tags">
<include>
<context ref="page-element"/>
<context ref="section-element"/>
<context ref="block-elements"/>
<context ref="inline-elements"/>
<context ref="xml:element-name" original="true"/>
</include>
</context>
<replace id="xml:element-name" ref="mallard-tags"/>
<context id="mallard">
<include>
<context ref="xml:xml"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,409 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Author: Jean-Philippe Fleury
Copyright (C) 2011 Jean-Philippe Fleury <contact@jpfleury.net>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<!-- Note: this language definition file adds support for Markdown syntax,
described in the following websites:
* (fr) <http://michelf.com/projets/php-markdown/syntaxe/>
* (en) <http://daringfireball.net/projects/markdown/syntax> -->
<language id="markdown" name="Markdown" version="2.0" _section="Markup">
<metadata>
<property name="mimetypes">text/x-markdown</property>
<property name="globs">*.markdown;*.md;*.mkd</property>
<property name="block-comment-start">&lt;!--</property>
<property name="block-comment-end">--&gt;</property>
</metadata>
<styles>
<style id="header" name="Header" map-to="def:heading"/>
<style id="horizontal-rule" name="Horizontal Rule" map-to="def:thematic-break"/>
<style id="list-marker" name="List Marker" map-to="def:list-marker"/>
<style id="code-span" name="Code Span" map-to="def:inline-code"/>
<style id="code-block" name="Code Block" map-to="def:preformatted-section"/>
<style id="blockquote-marker" name="Blockquote Marker" map-to="def:shebang"/>
<style id="url" name="URL" map-to="def:link-destination"/>
<style id="link-text" name="Link Text" map-to="def:link-text"/>
<style id="label" name="Label" map-to="def:preprocessor"/>
<style id="attribute-value" name="Attribute Value" map-to="def:constant"/>
<style id="image-marker" name="Image Marker" map-to="def:link-symbol"/>
<style id="emphasis" name="Emphasis" map-to="def:emphasis"/>
<style id="strong-emphasis" name="Strong Emphasis" map-to="def:strong-emphasis"/>
<style id="backslash-escape" name="Backslash Escape" map-to="def:special-char"/>
<style id="line-break" name="Line Break" map-to="def:note"/>
</styles>
<definitions>
<!-- Examples:
# Header 1 #
## Header 2
###Header 3###
-->
<context id="atx-header" style-ref="header">
<match>^#+.+</match>
</context>
<!-- Examples:
Header 1
========
Header 2
-
-->
<!-- Note: line break can't be used in regex, so only underline is matched. -->
<context id="setext-header" style-ref="header">
<match>^(-+|=+)[ \t]*$</match>
</context>
<!-- Examples:
- - -
** ** ** ** **
_____
-->
<context id="horizontal-rule" style-ref="horizontal-rule">
<match extended="true">
^[ ]{0,3} # Maximum 3 spaces at the beginning of the line.
(
(-[ ]{0,2}){3,} | # 3 or more hyphens, with 2 spaces maximum between each hyphen.
(_[ ]{0,2}){3,} | # Idem, but with underscores.
(\*[ ]{0,2}){3,} # Idem, but with asterisks.
)
[ \t]*$ # Optional trailing spaces or tabs.
</match>
</context>
<!-- Note about following list and code block contexts: according to the
Markdown syntax, to write several paragraphs in a list item, we have
to indent each paragraph. Example:
- Item A (paragraph 1).
Item A (paragraph 2).
Item A (paragraph 3).
- Item B.
So there is a conflict in terms of syntax highlighting between an
indented paragraph inside a list item (4 spaces or 1 tab) and an
indented line of code outside a list (also 4 spaces or 1 tab). In this
language file, since a full context analysis can't be done (because
line break can't be used in regex), the choice was made to highlight
code block only from 2 levels of indentation. -->
<!-- Example (unordered list):
* Item
+ Item
- Item
Example (ordered list):
1. Item
2. Item
3. Item
-->
<context id="list" style-ref="list-marker">
<match extended="true">
^[ ]{0,3} # Maximum 3 spaces at the beginning of the line.
(
\*|\+|-| # Asterisk, plus or hyphen for unordered list.
[0-9]+\. # Number followed by period for ordered list.
)
[ \t]+ # Must be followed by at least 1 space or 1 tab.
</match>
</context>
<!-- Example:
<em>HTML code</em> displayed <strong>literally</strong>.
-->
<context id="code-block" class="no-spell-check">
<match>^( {8,}|\t{2,})([^ \t]+.*)</match>
<include>
<context sub-pattern="2" style-ref="code-block"/>
</include>
</context>
<!-- Note about following code span contexts: within a paragraph, text
wrapped with backticks indicates a code span. Markdown allows to use
one or more backticks to wrap text, provided that the number is identical
on both sides, and the same number of consecutive backticks is not
present within the text. The current language file supports code span
highlighting with up to 2 backticks surrounding text. -->
<!-- Examples:
Here's a literal HTML tag: `<p>`.
`Here's a code span containing ``backticks``.`
-->
<context id="1-backtick-code-span" class="no-spell-check" style-ref="code-span">
<match>(?&lt;!`)`[^`]+(`{2,}[^`]+)*`(?!`)</match>
</context>
<!-- Examples:
Here's a literal HTML tag: ``<p>``.
``The grave accent (`) is used in Markdown to indicate a code span.``
``Here's another code span containing ```backticks```.``
-->
<context id="2-backticks-code-span" class="no-spell-check" style-ref="code-span">
<match>(?&lt;!`)``[^`]+((`|`{3,})[^`]+)*``(?!`)</match>
</context>
<context id="3-backticks-code-span" class="no-spell-check" style-ref="code-block">
<start>^```.*$</start>
<end>^```$</end>
</context>
<!-- Example:
> Quoted text.
> Quoted text with `code span`.
>> Blockquote **nested**.
-->
<!-- Note: blockquote can contain block-level and inline Markdown elements,
but the current language file only highlights inline ones (emphasis,
link, etc.). -->
<context id="blockquote" end-at-line-end="true">
<start>^( {0,3}&gt;(?=.)( {0,4}&gt;)*)</start>
<include>
<context sub-pattern="1" where="start" style-ref="blockquote-marker"/>
<context ref="1-backtick-code-span"/>
<context ref="2-backticks-code-span"/>
<context ref="3-backticks-code-span"/>
<context ref="automatic-link"/>
<context ref="inline-link"/>
<context ref="reference-link"/>
<context ref="inline-image"/>
<context ref="reference-image"/>
<context ref="underscores-emphasis"/>
<context ref="asterisks-emphasis"/>
<context ref="underscores-strong-emphasis"/>
<context ref="asterisks-strong-emphasis"/>
<context ref="backslash-escape"/>
<context ref="line-break"/>
</include>
</context>
<!-- Examples:
<user@example.com>
<http://www.example.com/>
-->
<!-- Note: regular expressions are based from function `_DoAutoLinks` from
Markdown.pl (see <http://daringfireball.net/projects/markdown/>). -->
<context id="automatic-link" class="no-spell-check">
<match case-sensitive="false" extended="true">
&lt;
(((mailto:)?[a-z0-9.-]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+) | # E-mail.
((https?|ftp):[^'">\s]+)) # URL.
&gt;
</match>
<include>
<context sub-pattern="1" style-ref="url"/>
</include>
</context>
<!-- Examples:
[link text](http://www.example.com/)
[link text](<http://www.example.com/>)
[link text]( /folder/page.html "Title" )
-->
<context id="inline-link">
<match extended="true">
\[(.*?)\] # Link text.
\( # Literal opening parenthesis.
[ \t]* # Optional spaces or tabs after the opening parenthesis.
(&lt;(.*?)&gt; | # URL with brackets.
(.*?)) # URL without brackets.
([ \t]+(".*?"))? # Optional title.
[ \t]* # Optional spaces or tabs before the closing parenthesis.
\) # Literal closing parenthesis.
</match>
<include>
<context sub-pattern="1" style-ref="link-text"/>
<context sub-pattern="3" class="no-spell-check" style-ref="url"/>
<context sub-pattern="4" class="no-spell-check" style-ref="url"/>
<context sub-pattern="6" style-ref="attribute-value"/>
</include>
</context>
<!-- Examples:
[link text]
[link text][]
[link text][link label]
[link text] [link label]
-->
<!-- Note: some assertions are used to differentiate reference link from
link label. -->
<context id="reference-link">
<match>(?&lt;!^ |^ |^ )\[(.*?)\]([ \t]?\[(.*?)\])?(?!:)</match>
<include>
<context sub-pattern="1" style-ref="link-text"/>
<context sub-pattern="3" class="no-spell-check" style-ref="label"/>
</include>
</context>
<!-- Examples:
[link label]: /folder/page.html
[link label]: <http://www.example.com/>
[link label]: http://www.example.com/ "Title"
-->
<context id="link-definition">
<match extended="true">
^[ ]{0,3} # Maximum 3 spaces at the beginning of the line.
\[(.+?)\]: # Link label and colon.
[ \t]* # Optional spaces or tabs.
(&lt;([^ \t]+?)&gt; | # URL with brackets.
([^ \t]+?)) # URL without brackets.
([ \t]+(".*?"))? # Optional title.
[ \t]*$ # Optional trailing spaces or tabs.
</match>
<include>
<context sub-pattern="1" class="no-spell-check" style-ref="label"/>
<context sub-pattern="3" class="no-spell-check" style-ref="url"/>
<context sub-pattern="4" class="no-spell-check" style-ref="url"/>
<context sub-pattern="6" style-ref="attribute-value"/>
</include>
</context>
<!-- Examples:
![alt text](http://www.example.com/image.jpg)
![alt text]( <http://www.example.com/image.jpg> )
![alt text] (/path/to/image.jpg "Title")
-->
<context id="inline-image">
<match extended="true">
(!) # Leading ! sign.
\[(.*?)\][ ]? # Alternate text for the image (and optional space).
\( # Literal parenthesis.
[ \t]* # Optional spaces or tabs after the opening parenthesis.
(&lt;([^ \t]*?)&gt; | # Image path or URL with brackets.
([^ \t]*?)) # Image path or URL without brackets.
([ \t]+(".*?"))? # Optional title.
[ \t]* # Optional spaces or tabs before the closing parenthesis.
\) # Literal parenthesis.
</match>
<include>
<context sub-pattern="1" style-ref="image-marker"/>
<context sub-pattern="2" style-ref="attribute-value"/>
<context sub-pattern="4" class="no-spell-check" style-ref="url"/>
<context sub-pattern="5" class="no-spell-check" style-ref="url"/>
<context sub-pattern="6" style-ref="attribute-value"/>
</include>
</context>
<!-- Examples:
![alt text][image label]
![alt text] [image label]
-->
<context id="reference-image">
<match>(!)\[(.*?)\] ?\[(.*?)\]</match>
<include>
<context sub-pattern="1" style-ref="image-marker"/>
<context sub-pattern="2" style-ref="attribute-value"/>
<context sub-pattern="3" class="no-spell-check" style-ref="label"/>
</include>
</context>
<!-- Examples:
Lorem _ipsum dolor_ sit amet.
Here's an _emphasized text containing an underscore (\_)_.
-->
<context id="underscores-emphasis" style-ref="emphasis">
<match>(?&lt;!_)_[^_ \t].*?(?&lt;!\\|_| |\t)_(?!_)</match>
</context>
<!-- Examples:
Lorem *ipsum dolor* sit amet.
Here's an *emphasized text containing an asterisk (\*)*.
-->
<context id="asterisks-emphasis" style-ref="emphasis">
<match>(?&lt;!\*)\*[^\* \t].*?(?&lt;!\\|\*| |\t)\*(?!\*)</match>
</context>
<!-- Examples:
Lorem __ipsum dolor__ sit amet.
Here's a __strongly emphasized text containing an underscore (\_)__.
-->
<context id="underscores-strong-emphasis" style-ref="strong-emphasis">
<match>__[^_ \t].*?(?&lt;!\\|_| |\t)__</match>
</context>
<!-- Examples:
Lorem **ipsum dolor** sit amet.
Here's a **strongly emphasized text containing an asterisk (\*).**
-->
<context id="asterisks-strong-emphasis" style-ref="strong-emphasis">
<match>\*\*[^\* \t].*?(?&lt;!\\|\*| |\t)\*\*</match>
</context>
<context id="backslash-escape" style-ref="backslash-escape">
<match>\\[\\`*_{}\[\]()#+-.!]</match>
</context>
<!-- Note: a manual line break should be followed by a line containing text,
but since line break can't be used in regex, only trailing spaces or tabs
are matched. -->
<context id="line-break">
<match>(?&lt;=[^ \t])([ \t]{2,})$</match>
<include>
<context sub-pattern="1" style-ref="line-break"/>
</include>
</context>
<context id="markdown-syntax">
<include>
<context ref="atx-header"/>
<context ref="setext-header"/>
<context ref="horizontal-rule"/>
<context ref="list"/>
<context ref="code-block"/>
<context ref="1-backtick-code-span"/>
<context ref="2-backticks-code-span"/>
<context ref="3-backticks-code-span"/>
<context ref="blockquote"/>
<context ref="automatic-link"/>
<context ref="inline-link"/>
<context ref="reference-link"/>
<context ref="link-definition"/>
<context ref="inline-image"/>
<context ref="reference-image"/>
<context ref="underscores-emphasis"/>
<context ref="asterisks-emphasis"/>
<context ref="underscores-strong-emphasis"/>
<context ref="asterisks-strong-emphasis"/>
<context ref="backslash-escape"/>
<context ref="line-break"/>
</include>
</context>
<replace id="html:embedded-lang-hook-content" ref="markdown-syntax"/>
<context id="markdown">
<include>
<context ref="markdown-syntax"/>
<!-- Note: even if it's highlighted, Markdown syntax within HTML blocks
(e.g., `<div>`) is not processed. -->
<context ref="html:html"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,148 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Søren Hauberg, Muthiah Annamalai, Carnë Draug
Copyright (C) 2006 Søren Hauberg <soren@hauberg.org>
Copyright (C) 2006 Muthiah Annamalai <gnumuthu@users.sf.net>
Copyright (C) 2010-2015 Carnë Draug <carandraug+dev@gmail.com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="matlab" name="Matlab" version="2.0" _section="Scientific">
<metadata>
<property name="mimetypes">text/x-matlab</property>
<property name="globs">*.m</property>
<property name="line-comment-start">%</property>
<property name="block-comment-start">%{</property>
<property name="block-comment-end">%}</property>
</metadata>
<!--
Note: Matlab language is a subset of the Octave language. When making
modification to this file check if they apply to both languages.
-->
<styles>
<style id="comment" name="Comment" map-to="def:comment"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="builtin" name="Builtin" map-to="def:builtin"/>
</styles>
<definitions>
<context id="block-comment" style-ref="comment" class="comment"
class-disabled="no-spell-check">
<start>^\s*%{\s*$</start>
<end>^\s*%}\s*$</end>
<include>
<context ref="block-comment"/>
<context ref="def:in-comment"/>
</include>
</context>
<context id="line-comment" style-ref="comment" end-at-line-end="true"
class="comment" class-disabled="no-spell-check">
<start>%</start>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<!-- FIXME: Matlab probably has much more builtin functions
this is just the list that was already in the lang file before
being split from octave.lang -->
<context id="builtin" style-ref="builtin">
<keyword>abs</keyword>
<keyword>acos</keyword>
<keyword>asin</keyword>
<keyword>atan2</keyword>
<keyword>atan</keyword>
<keyword>ceil</keyword>
<keyword>conv</keyword>
<keyword>cosh</keyword>
<keyword>cos</keyword>
<keyword>cumprod</keyword>
<keyword>dims</keyword>
<keyword>error</keyword>
<keyword>fclose</keyword>
<keyword>floor</keyword>
<keyword>fopen</keyword>
<keyword>fprintf</keyword>
<keyword>fread</keyword>
<keyword>fsolve</keyword>
<keyword>imag</keyword>
<keyword>isempty</keyword>
<keyword>isinf</keyword>
<keyword>islogical</keyword>
<keyword>ismatrix</keyword>
<keyword>isnan</keyword>
<keyword>isna</keyword>
<keyword>isnumeric</keyword>
<keyword>isscalar</keyword>
<keyword>isstr</keyword>
<keyword>isvector</keyword>
<keyword>length</keyword>
<keyword>linspace</keyword>
<keyword>log10</keyword>
<keyword>log2</keyword>
<keyword>log</keyword>
<keyword>max</keyword>
<keyword>min</keyword>
<keyword>printf</keyword>
<keyword>prod</keyword>
<keyword>real</keyword>
<keyword>rem</keyword>
<keyword>repmat</keyword>
<keyword>reshape</keyword>
<keyword>round</keyword>
<keyword>setstr</keyword>
<keyword>sinh</keyword>
<keyword>sin</keyword>
<keyword>size</keyword>
<keyword>sort</keyword>
<keyword>sprintf</keyword>
<keyword>sqrt</keyword>
<keyword>strcat</keyword>
<keyword>strcmp</keyword>
<keyword>sum</keyword>
<keyword>system</keyword>
<keyword>tanh</keyword>
<keyword>tan</keyword>
<keyword>unlink</keyword>
<keyword>warning</keyword>
</context>
<context id="matlab" class="no-spell-check">
<include>
<context ref="block-comment"/>
<context ref="line-comment"/>
<context ref="octave:single-quoted-string"/>
<context ref="octave:operator"/>
<context ref="octave:data-type"/>
<context ref="octave:function-handle"/>
<context ref="octave:storage-type"/>
<context ref="octave:boolean"/>
<context ref="def:decimal"/>
<context ref="def:float"/>
<context ref="octave:reserved-constant"/>
<context ref="octave:octave-matlab-keyword"/>
<context ref="builtin"/>
</include>
</context>
</definitions>
</language>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,326 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2009, 2011, 2012 - Jean-Philippe Fleury <contact@jpfleury.net>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="mediawiki" name="MediaWiki" version="2.0" _section="Markup">
<metadata>
<property name="block-comment-start">&lt;!--</property>
<property name="block-comment-end">--&gt;</property>
</metadata>
<styles>
<style id="strong-emphasis" name="Strong Emphasis" map-to="def:strong-emphasis"/>
<style id="light-emphasis" name="Light Emphasis" map-to="def:emphasis"/>
<style id="signature" name="Signature" map-to="def:statement"/>
<style id="url" name="URL" map-to="def:link-destination"/>
<style id="link" name="Link" map-to="def:link-text"/>
<style id="link-symbol" name="Symbol on a Link" map-to="def:link-symbol"/>
<style id="line" name="Line" map-to="def:thematic-break"/>
<style id="list" name="List" map-to="def:list-marker"/>
<style id="magic-word" name="Magic Word" map-to="def:statement"/>
<style id="table-symbol" name="Symbol of a Table" map-to="def:statement"/>
<style id="preformatted" name="Preformatted" map-to="def:preformatted-section"/>
<style id="redirect" name="Redirect" map-to="def:statement"/>
<style id="title" name="Title" map-to="def:heading"/>
<style id="template" name="Template" map-to="def:statement"/>
</styles>
<definitions>
<!-- See <http://www.mediawiki.org/wiki/Manual:$wgUrlProtocols>. -->
<define-regex id="regex-url">(http://|https://|ftp://|irc://|gopher://|telnet://|nntp://|worldwind://|mailto:|news:)[^\s]+</define-regex>
<define-regex id="regex-internal-link">\[\[\s*[^\[\]\s][^\[\]]*?((\|)[^\[\]\|]*)?\]\]</define-regex>
<context id="double-emphasis" style-ref="strong-emphasis">
<match>'''''.+?'''''</match>
</context>
<context id="strong-emphasis" style-ref="strong-emphasis">
<match>'''.+?'''</match>
</context>
<context id="light-emphasis" style-ref="light-emphasis">
<match>''.+?''</match>
</context>
<!-- See <http://www.mediawiki.org/wiki/Help:Signatures/fr>. -->
<context id="signature" style-ref="signature">
<match>~{3,5}</match>
</context>
<context id="url" style-ref="url">
<match>(\%{regex-url})</match>
<include>
<context sub-pattern="1" style-ref="link"/>
</include>
</context>
<context id="internal-link" style-ref="link">
<match>\%{regex-internal-link}</match>
<include>
<context sub-pattern="2" style-ref="link-symbol"/>
</include>
</context>
<context id="external-link" style-ref="link">
<match extended="true">
(?&lt;!\[)
\[
\s*
(\%{regex-url})
[^\[\]]*
\]
(?!\])
</match>
<include>
<context sub-pattern="1" style-ref="url"/>
</include>
</context>
<context id="line" style-ref="line">
<match>^-{4,}</match>
</context>
<context id="list">
<match>^((\*|#(?!REDIRECT))+)\s*[^\*#\s]+</match>
<include>
<context sub-pattern="1" style-ref="list"/>
</include>
</context>
<context id="glossary-term">
<match extended="true">
^(;)
\s*
[^;:\s]+?
[^:]*
(:?)
</match>
<include>
<context sub-pattern="1" style-ref="list"/>
<context sub-pattern="2" style-ref="list"/>
</include>
</context>
<context id="glossary-definition">
<match extended="true">
^(:)
\s*
[^;:\s]+
</match>
<include>
<context sub-pattern="1" style-ref="list"/>
</include>
</context>
<!-- Magic words. See <http://www.mediawiki.org/wiki/Help:Magic_words>. -->
<context id="magic-word-1" style-ref="magic-word">
<prefix>__</prefix>
<suffix>__</suffix>
<!-- Behavior switches. -->
<keyword>NOTOC</keyword>
<keyword>FORCETOC</keyword>
<keyword>TOC</keyword>
<keyword>NOEDITSECTION</keyword>
<keyword>NEWSECTIONLINK</keyword>
<keyword>NONEWSECTIONLINK</keyword>
<keyword>NOGALLERY</keyword>
<keyword>HIDDENCAT</keyword>
<keyword>NOCONTENTCONVERT</keyword>
<keyword>NOCC</keyword>
<keyword>NOTITLECONVERT</keyword>
<keyword>NOTC</keyword>
<keyword>START</keyword>
<keyword>END</keyword>
<keyword>INDEX</keyword>
<keyword>NOINDEX</keyword>
<keyword>STATICREDIRECT</keyword>
</context>
<context id="magic-word-2" style-ref="magic-word">
<prefix>{{</prefix>
<suffix>}}</suffix>
<!-- Date and time. -->
<keyword>CURRENTYEAR</keyword>
<keyword>CURRENTMONTH</keyword>
<keyword>CURRENTMONTHNAME</keyword>
<keyword>CURRENTMONTHNAMEGEN</keyword>
<keyword>CURRENTMONTHABBREV</keyword>
<keyword>CURRENTDAY</keyword>
<keyword>CURRENTDAY2</keyword>
<keyword>CURRENTDOW</keyword>
<keyword>CURRENTDAYNAME</keyword>
<keyword>CURRENTTIME</keyword>
<keyword>CURRENTHOUR</keyword>
<keyword>CURRENTWEEK</keyword>
<keyword>CURRENTTIMESTAMP</keyword>
<keyword>LOCALYEAR</keyword>
<keyword>LOCALMONTH</keyword>
<keyword>LOCALMONTHNAME</keyword>
<keyword>LOCALMONTHNAMEGEN</keyword>
<keyword>LOCALMONTHABBREV</keyword>
<keyword>LOCALDAY</keyword>
<keyword>LOCALDAY2</keyword>
<keyword>LOCALDOW</keyword>
<keyword>LOCALDAYNAME</keyword>
<keyword>LOCALTIME</keyword>
<keyword>LOCALHOUR</keyword>
<keyword>LOCALWEEK</keyword>
<keyword>LOCALTIMESTAMP</keyword>
<!-- Technical metadata. -->
<keyword>SITENAME</keyword>
<keyword>SERVER</keyword>
<keyword>SERVERNAME</keyword>
<keyword>DIRMARK</keyword>
<keyword>DIRECTIONMARK</keyword>
<keyword>SCRIPTPATH</keyword>
<keyword>STYLEPATH</keyword>
<keyword>CURRENTVERSION</keyword>
<keyword>CONTENTLANGUAGE</keyword>
<keyword>CONTENTLANG</keyword>
<keyword>REVISIONID</keyword>
<keyword>REVISIONDAY</keyword>
<keyword>REVISIONDAY2</keyword>
<keyword>REVISIONMONTH</keyword>
<keyword>REVISIONMONTH1</keyword>
<keyword>REVISIONYEAR</keyword>
<keyword>REVISIONTIMESTAMP</keyword>
<keyword>REVISIONUSER</keyword>
<!-- Statistics. -->
<keyword>NUMBEROFPAGES</keyword>
<keyword>NUMBEROFARTICLES</keyword>
<keyword>NUMBEROFFILES</keyword>
<keyword>NUMBEROFEDITS</keyword>
<keyword>NUMBEROFVIEWS</keyword>
<keyword>NUMBEROFUSERS</keyword>
<keyword>NUMBEROFADMINS</keyword>
<keyword>NUMBEROFACTIVEUSERS</keyword>
<!-- Page names. -->
<keyword>FULLPAGENAME</keyword>
<keyword>PAGENAME</keyword>
<keyword>BASEPAGENAME</keyword>
<keyword>SUBPAGENAME</keyword>
<keyword>SUBJECTPAGENAME</keyword>
<keyword>TALKPAGENAME</keyword>
<keyword>FULLPAGENAMEE</keyword>
<keyword>PAGENAMEE</keyword>
<keyword>BASEPAGENAMEE</keyword>
<keyword>SUBPAGENAMEE</keyword>
<keyword>SUBJECTPAGENAMEE</keyword>
<keyword>TALKPAGENAMEE</keyword>
<!-- Namespaces. -->
<keyword>NAMESPACE</keyword>
<keyword>SUBJECTSPACE</keyword>
<keyword>ARTICLESPACE</keyword>
<keyword>TALKSPACE</keyword>
<keyword>NAMESPACEE</keyword>
<keyword>SUBJECTSPACEE</keyword>
<keyword>TALKSPACEE</keyword>
</context>
<context id="table">
<start>^\s*({\|)</start>
<end>^\s*(\|})</end>
<include>
<context sub-pattern="1" where="start" style-ref="table-symbol"/>
<context sub-pattern="1" where="end" style-ref="table-symbol"/>
<context ref="double-emphasis"/>
<context ref="strong-emphasis"/>
<context ref="light-emphasis"/>
<context ref="signature"/>
<context ref="url"/>
<context ref="internal-link"/>
<context ref="external-link"/>
<context ref="magic-word-1"/>
<context ref="magic-word-2"/>
<context ref="html:html"/>
<context id="table-symbol" extend-parent="false" style-ref="table-symbol">
<match extended="true">
^\s*(\|\+ | \|-+ | !) | \| | !{2,}
</match>
</context>
</include>
</context>
<context id="preformatted" style-ref="preformatted">
<match>^ +[^ ]+.*$</match>
</context>
<context id="redirect">
<match>^(#REDIRECT)\s*(\%{regex-internal-link})</match>
<include>
<context sub-pattern="1" style-ref="redirect"/>
<context sub-pattern="2" style-ref="link"/>
<context sub-pattern="4" style-ref="link-symbol"/>
</include>
</context>
<context id="title" style-ref="title">
<match>^=.+=\s*$</match>
</context>
<context id="template">
<match>({{)\s*[^{}\s]+[^{}]*(}})</match>
<include>
<context sub-pattern="1" style-ref="template"/>
<context sub-pattern="2" style-ref="template"/>
</include>
</context>
<context id="mediawiki-syntax">
<include>
<context ref="double-emphasis"/>
<context ref="strong-emphasis"/>
<context ref="light-emphasis"/>
<context ref="signature"/>
<context ref="url"/>
<context ref="internal-link"/>
<context ref="external-link"/>
<context ref="line"/>
<context ref="list"/>
<context ref="glossary-term"/>
<context ref="glossary-definition"/>
<context ref="magic-word-1"/>
<context ref="magic-word-2"/>
<context ref="table"/>
<context ref="preformatted"/>
<context ref="redirect"/>
<context ref="title"/>
<context ref="template"/>
</include>
</context>
<replace id="html:embedded-lang-hook-content" ref="mediawiki-syntax"/>
<context id="mediawiki">
<include>
<context ref="mediawiki-syntax"/>
<context ref="html:html"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,166 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Copyright (C) 2015 Jussi Pakkanen <jpakkane@gmail.com>
Copyright (C) 2015 Igor Gnatenko <ignatenko@src.gnome.org>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="meson" name="Meson" version="2.0" _section="Source">
<metadata>
<property name="mimetypes">text/x-meson</property>
<property name="globs">meson.build;meson_options.txt</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="builtin-command" name="Builtin Command" map-to="def:function"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="escape" name="Escape Sequence" map-to="def:special-char" />
<style id="string" name="String" map-to="def:string" />
<style id="boolean" name="Boolean" map-to="def:boolean"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
</styles>
<definitions>
<!--
https://mesonbuild.com/Syntax.html#strings
also ESCAPE_SEQUENCE_SINGLE_RE in mesonbuild/mparser.py
https://github.com/mesonbuild/meson/blob/0.52.0/mesonbuild/mparser.py#L23-L30
-->
<context id="escape" style-ref="escape">
<match extended="true">
\\
(
[\\'abfnrtv] | # single character escape
[0-7]{1,3} | # octal value
x[0-9A-Fa-f]{2} | # hex value
u[0-9A-Fa-f]{4} | # 16-bit hex value
U[0-9A-Fa-f]{8} | # 32-bit hex value
N\{[^}]+\} # named Unicode character
)
</match>
</context>
<context id="multiline-string" style-ref="string">
<start>'''</start>
<end>'''</end>
</context>
<context id="string" style-ref="string" end-at-line-end="true">
<start>'</start>
<end>'</end>
<include>
<context ref="escape"/>
</include>
</context>
<!-- http://mesonbuild.com/Reference-manual.html -->
<context id="builtin-command" style-ref="builtin-command">
<prefix>(?&lt;![\w\.])</prefix> <!-- not a method call -->
<suffix>(?=\s*\()</suffix> <!-- must be followed by opening parentheses -->
<keyword>add_global_arguments</keyword>
<keyword>add_global_link_arguments</keyword>
<keyword>add_languages</keyword>
<keyword>add_project_arguments</keyword>
<keyword>add_project_link_arguments</keyword>
<keyword>add_test_setup</keyword>
<keyword>assert</keyword>
<keyword>benchmark</keyword>
<keyword>both_libraries</keyword>
<keyword>build_target</keyword>
<keyword>configuration_data</keyword>
<keyword>configure_file</keyword>
<keyword>custom_target</keyword>
<keyword>declare_dependency</keyword>
<keyword>dependency</keyword>
<keyword>disabler</keyword>
<keyword>error</keyword>
<keyword>environment</keyword>
<keyword>executable</keyword>
<keyword>find_library</keyword>
<keyword>find_program</keyword>
<keyword>files</keyword>
<keyword>generator</keyword>
<keyword>get_option</keyword>
<keyword>get_variable</keyword>
<keyword>import</keyword>
<keyword>include_directories</keyword>
<keyword>install_data</keyword>
<keyword>install_headers</keyword>
<keyword>install_man</keyword>
<keyword>install_subdir</keyword>
<keyword>is_variable</keyword>
<keyword>jar</keyword>
<keyword>join_paths</keyword>
<keyword>library</keyword>
<keyword>message</keyword>
<keyword>warning</keyword>
<keyword>project</keyword>
<keyword>run_command</keyword>
<keyword>run_target</keyword>
<keyword>set_variable</keyword>
<keyword>shared_library</keyword>
<keyword>shared_module</keyword>
<keyword>static_library</keyword>
<keyword>subdir_done</keyword>
<keyword>subdir</keyword>
<keyword>subproject</keyword>
<keyword>test</keyword>
<keyword>vcs_tag</keyword>
<!-- Used in option file -->
<keyword>option</keyword>
</context>
<context id="operator" style-ref="operator">
<keyword>if</keyword>
<keyword>elif</keyword>
<keyword>else</keyword>
<keyword>endif</keyword>
<keyword>foreach</keyword>
<keyword>endforeach</keyword>
</context>
<context id="boolean" style-ref="boolean">
<prefix>(?&lt;![\w\.])</prefix>
<keyword>false</keyword>
<keyword>true</keyword>
</context>
<context id="keywords" style-ref="keyword">
<keyword>and</keyword>
<keyword>not</keyword>
<keyword>or</keyword>
<keyword>in</keyword>
<keyword>continue</keyword>
<keyword>break</keyword>
</context>
<context id="meson" class="no-spell-check">
<include>
<context ref="multiline-string"/>
<context ref="string"/>
<context ref="builtin-command"/>
<context ref="operator"/>
<context ref="boolean"/>
<context ref="keywords"/>
<context ref="def:shell-like-comment"/>
</include>
</context>
</definitions>
</language>

View File

@ -0,0 +1,261 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Authors: Jorn Baayen
Copyright (C) 2012 Jorn Baayen <jorn.baayen@moct7.com>
Based on modelica.xml from Kate, Copyright (C) 2008 Federico Zenith.
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, see <http://www.gnu.org/licenses/>.
-->
<language id="modelica" name="Modelica" version="2.0" _section="Scientific">
<metadata>
<property name="mimetypes">text/x-modelica</property>
<property name="globs">*.mo;*.mop</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="string" name="String" map-to="def:string"/>
<style id="operator" name="Operator" map-to="def:operator"/>
<style id="class-type" name="Class type" map-to="def:type"/>
<style id="data-type" name="Data type" map-to="def:type"/>
<style id="default-attribute" name="Default Attribute" map-to="def:identifier"/>
<style id="boolean" name="Boolean" map-to="def:boolean"/>
<style id="decimal" name="Decimal" map-to="def:decimal"/>
<style id="floating-point" name="Floating Point" map-to="def:floating-point"/>
<style id="base-n-integer" name="Base-N Integer" map-to="def:base-n-integer"/>
<style id="keyword" name="Keyword" map-to="def:keyword"/>
<style id="builtin" name="Builtin" map-to="def:builtin"/>
</styles>
<definitions>
<context id="double-quoted-string" style-ref="string" end-at-line-end="false" class="string" class-disabled="no-spell-check">
<start>"</start>
<end>"</end>
</context>
<!--To see the list of operators, use the function __operators__-->
<context id="operator" style-ref="operator">
<match extended="true">
(\.)?\+{1,2}?(?!\+) | # arithmetic operators
(\.)?\-{1,2}?(?!\-) | # already counting
(\.)?\*{1,2}?(?!\*) | # with auto increment,
(\.)?\/(?!\^) | # element by element,
(\.)?\\(?!\^) | # left division
(\.)?\^(?!\^) | # and both exp
(?&lt;=[0-9a-zA-Z_)\]}])(\.)?' | # transpose operator
&lt;=? | &gt;=? | != | ~= | == | &lt;&gt; | # comparison operators
&amp;{1,2}?(?!&amp;) | \|{1,2}?(?!\|) | ! | ~ | # boolean operators
= | # assignment operator
: | # range operator
</match>
</context>
<context id="class-type" style-ref="class-type">
<keyword>class</keyword>
<keyword>block</keyword>
<keyword>connector</keyword>
<keyword>function</keyword>
<keyword>model</keyword>
<keyword>package</keyword>
<keyword>record</keyword>
<keyword>type</keyword>
</context>
<context id="data-type" style-ref="data-type">
<keyword>Boolean</keyword>
<keyword>enumeration</keyword>
<keyword>ExternalObject</keyword>
<keyword>Integer</keyword>
<keyword>Real</keyword>
<keyword>StateSelect</keyword>
<keyword>String</keyword>
</context>
<context id="default-attribute" style-ref="default-attribute">
<keyword>display</keyword>
<keyword>fixed</keyword>
<keyword>max</keyword>
<keyword>min</keyword>
<keyword>nominal</keyword>
<keyword>quantity</keyword>
<keyword>start</keyword>
<keyword>stateSelect</keyword>
<keyword>unit</keyword>
<keyword>value</keyword>
</context>
<context id="boolean" style-ref="boolean">
<!-- falase and true can be used as functions too. Do not highlight as
boolean if followed by parentheses -->
<suffix>\b(?!(\s)*\()</suffix>
<keyword>false</keyword>
<keyword>true</keyword>
</context>
<context id="decimal" style-ref="decimal">
<match>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</match>
</context>
<context id="floating-point-number" style-ref="floating-point">
<match>\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?</match>
</context>
<!--To see the list of keywords, use the function __keywords__-->
<context id="keyword" style-ref="keyword">
<keyword>algorithm</keyword>
<keyword>and</keyword>
<keyword>annotation</keyword>
<keyword>assert</keyword>
<keyword>break</keyword>
<keyword>connect</keyword>
<keyword>constant</keyword>
<keyword>constrainedby</keyword>
<keyword>discrete</keyword>
<keyword>else</keyword>
<keyword>elseif</keyword>
<keyword>elsewhen</keyword>
<keyword>encapsulated</keyword>
<keyword>end</keyword>
<keyword>equation</keyword>
<keyword>expandable</keyword>
<keyword>extends</keyword>
<keyword>external</keyword>
<keyword>false</keyword>
<keyword>final</keyword>
<keyword>flow</keyword>
<keyword>for</keyword>
<keyword>if</keyword>
<keyword>import</keyword>
<keyword>in</keyword>
<keyword>inner</keyword>
<keyword>input</keyword>
<keyword>loop</keyword>
<keyword>not</keyword>
<keyword>or</keyword>
<keyword>outer</keyword>
<keyword>output</keyword>
<keyword>parameter</keyword>
<keyword>partial</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>redeclare</keyword>
<keyword>replaceable</keyword>
<keyword>return</keyword>
<keyword>then</keyword>
<keyword>true</keyword>
<keyword>when</keyword>
<keyword>while</keyword>
<keyword>within</keyword>
</context>
<context id="builtin" style-ref="builtin">
<!-- NOTE this is more like a built-in variable, but as it changes
its value during the simulation it is more like a function
without the (), and has therefore been placed here.-->
<keyword>time</keyword>
<keyword>abs</keyword>
<keyword>ceil</keyword>
<keyword>div</keyword>
<keyword>floor</keyword>
<keyword>integer</keyword>
<keyword>mod</keyword>
<keyword>rem</keyword>
<keyword>sign</keyword>
<keyword>sqrt</keyword>
<keyword>sin</keyword>
<keyword>cos</keyword>
<keyword>tan</keyword>
<keyword>asin</keyword>
<keyword>acos</keyword>
<keyword>atan</keyword>
<keyword>atan2</keyword>
<keyword>sinh</keyword>
<keyword>cosh</keyword>
<keyword>tanh</keyword>
<keyword>exp</keyword>
<keyword>log</keyword>
<keyword>log10</keyword>
<keyword>analysisType</keyword>
<keyword>cardinality</keyword> <!-- NOTE deprecated in 3.0. -->
<keyword>change</keyword>
<keyword>delay</keyword>
<keyword>der</keyword>
<keyword>direction</keyword>
<keyword>edge</keyword>
<keyword>initial</keyword>
<keyword>isPresent</keyword>
<keyword>noEvent</keyword>
<keyword>pre</keyword>
<keyword>reinit</keyword>
<keyword>sample</keyword>
<keyword>semiLinear</keyword>
<keyword>smooth</keyword>
<keyword>terminal</keyword>
<keyword>terminate</keyword>
<keyword>ndims</keyword>
<keyword>size</keyword>
<keyword>scalar</keyword>
<keyword>vector</keyword>
<keyword>matrix</keyword>
<keyword>array</keyword>
<keyword>zeros</keyword>
<keyword>ones</keyword>
<keyword>fill</keyword>
<keyword>identity</keyword>
<keyword>diagonal</keyword>
<keyword>linspace</keyword>
<keyword>min</keyword>
<keyword>max</keyword>
<keyword>sum</keyword>
<keyword>product</keyword>
<keyword>transpose</keyword>
<keyword>outerProduct</keyword>
<keyword>symmetric</keyword>
<keyword>cross</keyword>
<keyword>skew</keyword>
<keyword>cat</keyword>
</context>
<context id="modelica" class="no-spell-check">
<include>
<context ref="def:c-like-comment"/>
<context ref="def:c-like-comment-multiline"/>
<context ref="def:c-like-close-comment-outside-comment"/>
<context ref="double-quoted-string"/>
<context ref="operator"/>
<context ref="class-type"/>
<context ref="data-type"/>
<context ref="default-attribute"/>
<context ref="boolean"/>
<context ref="decimal"/>
<context ref="floating-point-number"/>
<context ref="keyword"/>
<context ref="builtin"/>
</include>
</context>
</definitions>
</language>

Some files were not shown because too many files have changed in this diff Show More