1 <?xml version="1.0"?>
\r
3 <!DOCTYPE MODE SYSTEM "xmode.dtd">
\r
5 <!-- Extension of c.xml to handle Objective-C keywords. -->
\r
8 <PROPERTY NAME="commentStart" VALUE="/*" />
\r
9 <PROPERTY NAME="commentEnd" VALUE="*/" />
\r
10 <PROPERTY NAME="lineComment" VALUE="//" />
\r
11 <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
\r
13 <!-- Auto indent -->
\r
14 <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
\r
15 <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
\r
16 <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
\r
17 <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
\r
18 <PROPERTY NAME="indentNextLine"
\r
19 VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
\r
20 <PROPERTY NAME="unindentThisLine"
\r
21 VALUE="^.*(default:\s*|case.*:.*)$" />
\r
22 <PROPERTY NAME="electricKeys" VALUE=":" />
\r
26 ESCAPE="\" IGNORE_CASE="FALSE"
\r
27 HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
\r
28 <EOL_SPAN TYPE="KEYWORD2" AT_WHITESPACE_END="TRUE" DELEGATE="CPP">#</EOL_SPAN>
\r
30 <IMPORT DELEGATE="c::LEX"/>
\r
31 <IMPORT DELEGATE="c::CORE"/>
\r
32 <IMPORT DELEGATE="CORE"/>
\r
35 <!-- Core language -->
\r
37 ESCAPE="\" IGNORE_CASE="FALSE"
\r
38 HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
\r
40 <!-- Types (Objective C) -->
\r
41 <KEYWORD3>id</KEYWORD3>
\r
42 <KEYWORD3>Class</KEYWORD3>
\r
43 <KEYWORD3>SEL</KEYWORD3>
\r
44 <KEYWORD3>IMP</KEYWORD3>
\r
45 <KEYWORD3>BOOL</KEYWORD3>
\r
47 <!-- Keywords (Objective C) -->
\r
48 <KEYWORD1>oneway</KEYWORD1>
\r
49 <KEYWORD1>in</KEYWORD1>
\r
50 <KEYWORD1>out</KEYWORD1>
\r
51 <KEYWORD1>inout</KEYWORD1>
\r
52 <KEYWORD1>bycopy</KEYWORD1>
\r
53 <KEYWORD1>byref</KEYWORD1>
\r
54 <KEYWORD1>self</KEYWORD1>
\r
55 <KEYWORD1>super</KEYWORD1>
\r
57 <!-- Preprocessor Directives (Objective C)-->
\r
58 <KEYWORD1>@interface</KEYWORD1>
\r
59 <KEYWORD1>@implementation</KEYWORD1>
\r
60 <KEYWORD1>@protocol</KEYWORD1>
\r
61 <KEYWORD1>@end</KEYWORD1>
\r
62 <KEYWORD1>@private</KEYWORD1>
\r
63 <KEYWORD1>@protected</KEYWORD1>
\r
64 <KEYWORD1>@public</KEYWORD1>
\r
65 <KEYWORD1>@class</KEYWORD1>
\r
66 <KEYWORD1>@selector</KEYWORD1>
\r
67 <KEYWORD1>@endcode</KEYWORD1>
\r
68 <KEYWORD1>@defs</KEYWORD1>
\r
70 <LITERAL2>TRUE</LITERAL2>
\r
71 <LITERAL2>FALSE</LITERAL2>
\r
72 <LITERAL2>YES</LITERAL2>
\r
73 <LITERAL2>NO</LITERAL2>
\r
74 <LITERAL2>NULL</LITERAL2>
\r
75 <LITERAL2>nil</LITERAL2>
\r
76 <LITERAL2>Nil</LITERAL2>
\r
80 <!-- Preprocessor specific rules -->
\r
82 ESCAPE="\" IGNORE_CASE="FALSE"
\r
83 HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
\r
85 <EOL_SPAN_REGEXP HASH_CHAR="include" TYPE="MARKUP" DELEGATE="c::INCLUDE">include\b</EOL_SPAN_REGEXP>
\r
86 <EOL_SPAN_REGEXP HASH_CHAR="import" TYPE="MARKUP" DELEGATE="c::INCLUDE">import\b</EOL_SPAN_REGEXP>
\r
87 <EOL_SPAN_REGEXP HASH_CHAR="define" TYPE="MARKUP" DELEGATE="DEFINE">define\b</EOL_SPAN_REGEXP>
\r
88 <EOL_SPAN_REGEXP HASH_CHAR="endif" TYPE="MARKUP" DELEGATE="c::LEX">endif\b</EOL_SPAN_REGEXP>
\r
89 <EOL_SPAN_REGEXP HASH_CHAR="elif" TYPE="MARKUP" DELEGATE="c::CONDITION">elif\b</EOL_SPAN_REGEXP>
\r
90 <EOL_SPAN_REGEXP HASH_CHAR="if" TYPE="MARKUP" DELEGATE="c::CONDITION">if\b</EOL_SPAN_REGEXP>
\r
92 <IMPORT DELEGATE="c::LEX"/>
\r
96 <MARKUP>ifdef</MARKUP>
\r
97 <MARKUP>ifndef</MARKUP>
\r
98 <MARKUP>else</MARKUP>
\r
99 <MARKUP>error</MARKUP>
\r
100 <MARKUP>line</MARKUP>
\r
101 <MARKUP>pragma</MARKUP>
\r
102 <MARKUP>undef</MARKUP>
\r
103 <MARKUP>warning</MARKUP>
\r
107 <!-- After #define directive -->
\r
108 <!-- Almost same as the normal code,
\r
109 except two additional operators # and ##. -->
\r
110 <RULES SET="DEFINE"
\r
111 ESCAPE="\" IGNORE_CASE="FALSE"
\r
112 HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="[0-9][0-9a-zA-Z]*">
\r
113 <SEQ TYPE="OPERATOR">#</SEQ>
\r
114 <IMPORT DELEGATE="c::LEX"/>
\r
115 <IMPORT DELEGATE="c::CORE"/>
\r
116 <IMPORT DELEGATE="CORE"/>
\r