196 lines
7.1 KiB
Plaintext
196 lines
7.1 KiB
Plaintext
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE language SYSTEM "language.dtd">
|
||
|
<language _name="C++" version="1.0" _section="Sources"
|
||
|
mimetypes="text/x-c++;text/x-cpp;text/x-c-header;text/x-c++src;text/x-c++hdr"
|
||
|
extensions="*.h;*.H;*.cpp;*.cxx;*.cc;*.C;*.CPP;*.CXX">
|
||
|
|
||
|
<!-- <escape-char>\</escape-char> -->
|
||
|
|
||
|
<line-comment _name = "Line Comment" style= "Comment">
|
||
|
<start-regex>//</start-regex>
|
||
|
</line-comment>
|
||
|
|
||
|
<block-comment _name = "Block Comment" style = "Comment">
|
||
|
<start-regex>/\*</start-regex>
|
||
|
<end-regex>\*/</end-regex>
|
||
|
</block-comment>
|
||
|
|
||
|
<block-comment _name = "'#if 0' Comment" style = "Comment">
|
||
|
<start-regex>^[ \t]*#[ \t]*if[ \t]*0</start-regex>
|
||
|
<end-regex>[ \t]*#[ \t]*(endif|else)</end-regex>
|
||
|
</block-comment>
|
||
|
|
||
|
<string _name = "String" style = "String" end-at-line-end = "TRUE">
|
||
|
<start-regex>"</start-regex>
|
||
|
<end-regex>(?<!\\{1}|\\{3}|\\{5}|\\{7})"</end-regex>
|
||
|
</string>
|
||
|
|
||
|
<syntax-item _name = "Preprocessor 1" style = "Preprocessor">
|
||
|
<start-regex>^\s*#\s*(if|ifdef|ifndef|include|import|else|elif|define|endif|undef|error|pragma|line)\b.*\\$</start-regex>
|
||
|
<end-regex>[^\\]\n</end-regex>
|
||
|
</syntax-item>
|
||
|
<syntax-item _name = "Preprocessor 2" style = "Preprocessor">
|
||
|
<start-regex>^\s*#\s*(if|ifdef|ifndef|include|import|else|elif|define|endif|undef|error|pragma|line)\b</start-regex>
|
||
|
<end-regex>\n</end-regex>
|
||
|
</syntax-item>
|
||
|
|
||
|
<pattern-item _name = "Preprocessor error" style = "Error">
|
||
|
<regex>^\s*#\s*(?!if|ifdef|ifndef|include|import|else|elif|define|endif|undef|error|pragma|line).*</regex>
|
||
|
</pattern-item>
|
||
|
|
||
|
<pattern-item name="Function" style="Function">
|
||
|
<regex>\b[_\w][_\w\d]*(?=[\s]*[(])</regex>
|
||
|
</pattern-item>
|
||
|
|
||
|
<keyword-list _name = "Keywords" style = "Keyword" case-sensitive="TRUE">
|
||
|
<keyword>and</keyword>
|
||
|
<keyword>and_eq</keyword>
|
||
|
<keyword>asm</keyword>
|
||
|
<keyword>bitand</keyword>
|
||
|
<keyword>bitor</keyword>
|
||
|
<keyword>break</keyword>
|
||
|
<keyword>case</keyword>
|
||
|
<keyword>catch</keyword>
|
||
|
<keyword>compl</keyword>
|
||
|
<keyword>const_cast</keyword>
|
||
|
<keyword>continue</keyword>
|
||
|
<keyword>default</keyword>
|
||
|
<keyword>delete</keyword>
|
||
|
<keyword>do</keyword>
|
||
|
<keyword>dynamic_cast</keyword>
|
||
|
<keyword>else</keyword>
|
||
|
<keyword>for</keyword>
|
||
|
<keyword>fortran</keyword>
|
||
|
<keyword>friend</keyword>
|
||
|
<keyword>goto</keyword>
|
||
|
<keyword>if</keyword>
|
||
|
<keyword>new</keyword>
|
||
|
<keyword>not</keyword>
|
||
|
<keyword>not_eq</keyword>
|
||
|
<keyword>operator</keyword>
|
||
|
<keyword>or</keyword>
|
||
|
<keyword>or_eq</keyword>
|
||
|
<keyword>private</keyword>
|
||
|
<keyword>protected</keyword>
|
||
|
<keyword>public</keyword>
|
||
|
<keyword>reinterpret_cast</keyword>
|
||
|
<keyword>return</keyword>
|
||
|
<keyword>sizeof</keyword>
|
||
|
<keyword>static_cast</keyword>
|
||
|
<keyword>switch</keyword>
|
||
|
<keyword>this</keyword>
|
||
|
<keyword>throw</keyword>
|
||
|
<keyword>try</keyword>
|
||
|
<keyword>typeid</keyword>
|
||
|
<keyword>using</keyword>
|
||
|
<keyword>while</keyword>
|
||
|
<keyword>xor</keyword>
|
||
|
<keyword>xor_eq</keyword>
|
||
|
</keyword-list>
|
||
|
|
||
|
<keyword-list _name = "Types" style = "Data Type" case-sensitive="TRUE">
|
||
|
<keyword>auto</keyword>
|
||
|
<keyword>bool</keyword>
|
||
|
<keyword>char</keyword>
|
||
|
<keyword>class</keyword>
|
||
|
<keyword>const</keyword>
|
||
|
<keyword>double</keyword>
|
||
|
<keyword>enum</keyword>
|
||
|
<keyword>explicit</keyword>
|
||
|
<keyword>export</keyword>
|
||
|
<keyword>extern</keyword>
|
||
|
<keyword>float</keyword>
|
||
|
<keyword>inline</keyword>
|
||
|
<keyword>int</keyword>
|
||
|
<keyword>long</keyword>
|
||
|
<keyword>mutable</keyword>
|
||
|
<keyword>namespace</keyword>
|
||
|
<keyword>register</keyword>
|
||
|
<keyword>short</keyword>
|
||
|
<keyword>signed</keyword>
|
||
|
<keyword>static</keyword>
|
||
|
<keyword>struct</keyword>
|
||
|
<keyword>template</keyword>
|
||
|
<keyword>typedef</keyword>
|
||
|
<keyword>typename</keyword>
|
||
|
<keyword>union</keyword>
|
||
|
<keyword>unsigned</keyword>
|
||
|
<keyword>virtual</keyword>
|
||
|
<keyword>void</keyword>
|
||
|
<keyword>volatile</keyword>
|
||
|
<keyword>wchar_t</keyword>
|
||
|
<keyword>gboolean</keyword>
|
||
|
<keyword>gpointer</keyword>
|
||
|
<keyword>gconstpointer</keyword>
|
||
|
<keyword>gchar</keyword>
|
||
|
<keyword>guchar</keyword>
|
||
|
<keyword>gint</keyword>
|
||
|
<keyword>guint</keyword>
|
||
|
<keyword>gshort</keyword>
|
||
|
<keyword>gushort</keyword>
|
||
|
<keyword>glong</keyword>
|
||
|
<keyword>gulong</keyword>
|
||
|
<keyword>gint8</keyword>
|
||
|
<keyword>guint8</keyword>
|
||
|
<keyword>gint16</keyword>
|
||
|
<keyword>guint16</keyword>
|
||
|
<keyword>gint32</keyword>
|
||
|
<keyword>guint32</keyword>
|
||
|
<keyword>gint64</keyword>
|
||
|
<keyword>guint64</keyword>
|
||
|
<keyword>gfloat</keyword>
|
||
|
<keyword>gdouble</keyword>
|
||
|
<keyword>gsize</keyword>
|
||
|
<keyword>gssize</keyword>
|
||
|
</keyword-list>
|
||
|
|
||
|
<string _name = "Character Constant" style = "String" end-at-line-end = "TRUE">
|
||
|
<start-regex>'</start-regex>
|
||
|
<end-regex>'</end-regex>
|
||
|
</string>
|
||
|
|
||
|
<pattern-item _name = "Decimal" style = "Decimal">
|
||
|
<regex>\b([1-9][0-9]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
|
||
|
</pattern-item>
|
||
|
|
||
|
<pattern-item _name = "Floating Point Number" style = "Floating Point">
|
||
|
<regex>\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?</regex>
|
||
|
</pattern-item>
|
||
|
|
||
|
<pattern-item _name = "Octal Number" style = "BaseN">
|
||
|
<regex>\b0[0-7]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
|
||
|
</pattern-item>
|
||
|
|
||
|
<pattern-item _name = "Hex Number" style = "BaseN">
|
||
|
<regex>\b0[xX][0-9a-fA-F]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?\b</regex>
|
||
|
</pattern-item>
|
||
|
|
||
|
<keyword-list _name = "Common Macro" style = "Preprocessor" case-sensitive="TRUE">
|
||
|
<keyword>NULL</keyword>
|
||
|
<keyword>TRUE</keyword>
|
||
|
<keyword>FALSE</keyword>
|
||
|
<keyword>MAX</keyword>
|
||
|
<keyword>MIN</keyword>
|
||
|
<keyword>__LINE__</keyword>
|
||
|
<keyword>__DATA__</keyword>
|
||
|
<keyword>__FILE__</keyword>
|
||
|
<keyword>__TIME__</keyword>
|
||
|
<keyword>__STDC__</keyword>
|
||
|
<keyword>false</keyword>
|
||
|
<keyword>true</keyword>
|
||
|
</keyword-list>
|
||
|
|
||
|
<styles>
|
||
|
<style name="Function" default_style="Function" bold="0"/>
|
||
|
<style name="Decimal" default_style="Decimal"/>
|
||
|
<style name="Octal" default_style="BaseN"/>
|
||
|
<style name="Hex" default_style="BaseN"/>
|
||
|
<style name="String Char" default_style="Char"/>
|
||
|
<style name="Symbol" default_style="Normal"/>
|
||
|
<style name="Preprocessor" default_style="Others"/>
|
||
|
<style name="Floating Point" default_style="Float"/>
|
||
|
<style name="Common Macro" default_style="Keyword" foreground="#0095ff" bold="1" italic="0"/>
|
||
|
</styles>
|
||
|
|
||
|
</language>
|