PageRenderTime 83ms CodeModel.GetById 78ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/jEdit/tags/jedit-4-3-pre5/modes/cplusplus.xml

#
XML | 170 lines | 165 code | 4 blank | 1 comment | 0 complexity | 82d4a67e9d73ef496792357fbcc85cb1 MD5 | raw file
  1<?xml version="1.0"?>
  2
  3<!DOCTYPE MODE SYSTEM "xmode.dtd">
  4
  5<MODE>
  6    <PROPS>
  7        <PROPERTY NAME="commentStart" VALUE="/*" />
  8        <PROPERTY NAME="commentEnd" VALUE="*/" />
  9        <PROPERTY NAME="lineComment" VALUE="//" />
 10        <PROPERTY NAME="wordBreakChars" VALUE=",+-=&lt;&gt;/?^&amp;*" />
 11
 12
 13	<!-- Auto indent -->
 14	<PROPERTY NAME="indentOpenBrackets" VALUE="{" />
 15	<PROPERTY NAME="indentCloseBrackets" VALUE="}" />
 16	<PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
 17	<PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
 18	<PROPERTY NAME="indentNextLine"
 19		VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
 20	<PROPERTY NAME="unindentThisLine"
 21		VALUE="^.*(default:\s*|case.*:.*)$" />
 22	<PROPERTY NAME="electricKeys" VALUE=":" />
 23    </PROPS>
 24    <RULES ESCAPE="\"
 25        IGNORE_CASE="FALSE"
 26        HIGHLIGHT_DIGITS="TRUE"
 27        DIGIT_RE="(0x\p{XDigit}+[lL]?|\d+(e\d*)?[lLdDfF]?)">
 28
 29        <!-- Silly comment -->
 30	<SEQ TYPE="COMMENT1">/**/</SEQ>
 31
 32	<!-- Doxygen comment, Javadoc style -->
 33        <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
 34            <BEGIN>/**</BEGIN>
 35            <END>*/</END>
 36        </SPAN>
 37
 38        <!-- Doxygen comment, Qt style -->
 39        <SPAN TYPE="COMMENT3" DELEGATE="doxygen::DOXYGEN">
 40            <BEGIN>/*!</BEGIN>
 41            <END>*/</END>
 42        </SPAN>
 43
 44        <!-- C style comment -->
 45        <SPAN TYPE="COMMENT1">
 46            <BEGIN>/*</BEGIN>
 47            <END>*/</END>
 48        </SPAN>
 49
 50        <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
 51            <BEGIN>"</BEGIN>
 52            <END>"</END>
 53        </SPAN>
 54        <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
 55            <BEGIN>'</BEGIN>
 56            <END>'</END>
 57        </SPAN>
 58
 59        <!-- preprocessor statements -->
 60        <SEQ TYPE="KEYWORD2">##</SEQ>
 61        <EOL_SPAN TYPE="KEYWORD2" DELEGATE="c::CPP">#</EOL_SPAN>
 62
 63        <EOL_SPAN TYPE="COMMENT2">//</EOL_SPAN>
 64        <SEQ TYPE="OPERATOR">=</SEQ>
 65        <SEQ TYPE="OPERATOR">!</SEQ>
 66        <SEQ TYPE="OPERATOR">&gt;=</SEQ>
 67        <SEQ TYPE="OPERATOR">&lt;=</SEQ>
 68        <SEQ TYPE="OPERATOR">+</SEQ>
 69        <SEQ TYPE="OPERATOR">-</SEQ>
 70        <SEQ TYPE="OPERATOR">/</SEQ>
 71
 72        <SEQ TYPE="OPERATOR">*</SEQ>
 73        <SEQ TYPE="OPERATOR">&gt;</SEQ>
 74        <SEQ TYPE="OPERATOR">&lt;</SEQ>
 75        <SEQ TYPE="OPERATOR">%</SEQ>
 76        <SEQ TYPE="OPERATOR">&amp;</SEQ>
 77        <SEQ TYPE="OPERATOR">|</SEQ>
 78        <SEQ TYPE="OPERATOR">^</SEQ>
 79        <SEQ TYPE="OPERATOR">~</SEQ>
 80        <SEQ TYPE="OPERATOR">}</SEQ>
 81        <SEQ TYPE="OPERATOR">{</SEQ>
 82        
 83        <MARK_PREVIOUS TYPE="FUNCTION">::</MARK_PREVIOUS>
 84        
 85        <MARK_PREVIOUS AT_WHITESPACE_END="TRUE"
 86            EXCLUDE_MATCH="TRUE"
 87            TYPE="LABEL">:</MARK_PREVIOUS>
 88
 89        <!-- Function calls -->
 90        <MARK_PREVIOUS TYPE="FUNCTION" EXCLUDE_MATCH="TRUE">(</MARK_PREVIOUS>
 91
 92        <KEYWORDS>
 93            <KEYWORD3>and</KEYWORD3>
 94            <KEYWORD3>and_eq</KEYWORD3>
 95            <KEYWORD2>asm</KEYWORD2>
 96            <KEYWORD1>auto</KEYWORD1>
 97            <KEYWORD3>bitand</KEYWORD3>
 98            <KEYWORD3>bitor</KEYWORD3>
 99            <KEYWORD3>bool</KEYWORD3>
100            <KEYWORD1>break</KEYWORD1>
101            <KEYWORD1>case</KEYWORD1>
102            <KEYWORD1>catch</KEYWORD1>
103            <KEYWORD3>char</KEYWORD3>
104            <KEYWORD3>class</KEYWORD3>
105            <KEYWORD3>compl</KEYWORD3>
106            <KEYWORD1>const</KEYWORD1>
107            <KEYWORD3>const_cast</KEYWORD3>
108            <KEYWORD1>continue</KEYWORD1>
109            <KEYWORD1>default</KEYWORD1>
110            <KEYWORD1>delete</KEYWORD1>
111            <KEYWORD1>do</KEYWORD1>
112            <KEYWORD3>double</KEYWORD3>
113            <KEYWORD3>dynamic_cast</KEYWORD3>
114            <KEYWORD1>else</KEYWORD1>
115            <KEYWORD3>enum</KEYWORD3>
116            <KEYWORD1>explicit</KEYWORD1>
117            <KEYWORD2>export</KEYWORD2>
118            <KEYWORD2>extern</KEYWORD2>
119            <LITERAL2>false</LITERAL2>
120            <KEYWORD3>float</KEYWORD3>
121            <KEYWORD1>for</KEYWORD1>
122            <KEYWORD1>friend</KEYWORD1>
123            <KEYWORD1>goto</KEYWORD1>
124            <KEYWORD1>if</KEYWORD1>
125            <KEYWORD1>inline</KEYWORD1>
126            <KEYWORD3>int</KEYWORD3>
127            <KEYWORD3>long</KEYWORD3>
128            <KEYWORD3>mutable</KEYWORD3>
129            <KEYWORD2>namespace</KEYWORD2>
130            <KEYWORD1>new</KEYWORD1>
131            <KEYWORD3>not</KEYWORD3>
132            <KEYWORD3>not_eq</KEYWORD3>
133            <KEYWORD3>operator</KEYWORD3>
134            <KEYWORD3>or</KEYWORD3>
135            <KEYWORD3>or_eq</KEYWORD3>
136            <KEYWORD1>private</KEYWORD1>
137            <KEYWORD1>protected</KEYWORD1>
138            <KEYWORD1>public</KEYWORD1>
139            <KEYWORD1>register</KEYWORD1>
140            <KEYWORD3>reinterpret_cast</KEYWORD3>
141            <KEYWORD1>return</KEYWORD1>
142            <KEYWORD3>short</KEYWORD3>
143            <KEYWORD3>signed</KEYWORD3>
144            <KEYWORD1>sizeof</KEYWORD1>
145            <KEYWORD1>static</KEYWORD1>
146            <KEYWORD3>static_cast</KEYWORD3>
147            <KEYWORD3>struct</KEYWORD3>
148            <KEYWORD1>switch</KEYWORD1>
149            <KEYWORD3>template</KEYWORD3>
150            <LITERAL2>this</LITERAL2>
151            <KEYWORD1>throw</KEYWORD1>
152            <LITERAL2>true</LITERAL2>
153            <KEYWORD1>try</KEYWORD1>
154            <KEYWORD3>typedef</KEYWORD3>
155            <KEYWORD3>typeid</KEYWORD3>
156            <KEYWORD3>typename</KEYWORD3>
157            <KEYWORD3>union</KEYWORD3>
158            <KEYWORD3>unsigned</KEYWORD3>
159            <KEYWORD2>using</KEYWORD2>
160            <KEYWORD1>virtual</KEYWORD1>
161            <KEYWORD1>void</KEYWORD1>
162            <KEYWORD1>volatile</KEYWORD1>
163            <KEYWORD3>wchar_t</KEYWORD3>
164            <KEYWORD1>while</KEYWORD1>
165            <KEYWORD3>xor</KEYWORD3>
166            <KEYWORD3>xor_eq</KEYWORD3>
167            <LITERAL2>NULL</LITERAL2>
168        </KEYWORDS>
169    </RULES>
170</MODE>