PageRenderTime 104ms CodeModel.GetById 73ms app.highlight 4ms RepoModel.GetById 16ms app.codeStats 0ms

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

#
XML | 204 lines | 161 code | 20 blank | 23 comment | 0 complexity | f8b234ab851e7c37ae1de2b36b288ff8 MD5 | raw file
  1<?xml version="1.0"?>
  2
  3<!DOCTYPE MODE SYSTEM "xmode.dtd">
  4
  5<MODE>
  6      <!-- Syntax highlighting mode for the Inform language. You can find out more about inform at
  7           http://www.gnelson.demon.co.uk/inform.html
  8           And an inform language guide at
  9           http://www.gnelson.demon.co.uk/dman/index.html
 10        -->
 11    <PROPS>
 12        <!--
 13        <PROPERTY NAME="commentStart" VALUE="/*" />
 14        <PROPERTY NAME="commentEnd" VALUE="*/" />
 15        -->
 16        <PROPERTY NAME="lineComment" VALUE="!" />
 17        <PROPERTY NAME="wordBreakChars" VALUE=",+-=&lt;&gt;/?^&amp;*" />
 18
 19        <!-- Auto indent -->
 20        <PROPERTY NAME="indentOpenBrackets" VALUE="{[" />
 21        <PROPERTY NAME="indentCloseBrackets" VALUE="}]" />
 22        <PROPERTY NAME="indentNextLine"
 23            VALUE="\s*(((if|while)\s*\(|else\s*|else\s+if\s*\(|for\s*\(.*\))[^{;]*)" />
 24        <!-- set this to 'true' if you want to use GNU coding style -->
 25        <PROPERTY NAME="doubleBracketIndent" VALUE="false" />
 26
 27        <PROPERTY NAME="filenameGlob" VALUE="*.(inf|h)" />
 28    </PROPS>
 29
 30    <RULES
 31            IGNORE_CASE="FALSE"
 32            HIGHLIGHT_DIGITS="TRUE"
 33            DIGIT_RE="(\$[\p{XDigit}]|[\p{Digit}])">
 34        <EOL_SPAN TYPE="COMMENT1">!</EOL_SPAN>
 35
 36        <!-- strings can span lines -->
 37        <SPAN TYPE="LITERAL1" DELEGATE="InformInnerText">
 38            <BEGIN>"</BEGIN>
 39            <END>"</END>
 40        </SPAN>
 41        <SPAN TYPE="LITERAL2">
 42            <BEGIN>'</BEGIN>
 43            <END>'</END>
 44        </SPAN>
 45
 46        <!-- preprocessor statements -->
 47        <EOL_SPAN TYPE="KEYWORD2">#</EOL_SPAN>
 48        <EOL_SPAN TYPE="COMMENT1">!</EOL_SPAN>
 49
 50        <!-- special sequences that require special highlighting -->
 51        <SEQ TYPE="OPERATOR">=</SEQ>
 52        <SEQ TYPE="OPERATOR">==</SEQ>
 53        <SEQ TYPE="OPERATOR">&gt;=</SEQ>
 54        <SEQ TYPE="OPERATOR">&lt;=</SEQ>
 55        <SEQ TYPE="OPERATOR">~=</SEQ>
 56        <SEQ TYPE="OPERATOR">+</SEQ>
 57        <SEQ TYPE="OPERATOR">-</SEQ>
 58        <SEQ TYPE="OPERATOR">$</SEQ>
 59        <SEQ TYPE="OPERATOR">/</SEQ>
 60        <SEQ TYPE="OPERATOR">*</SEQ>
 61        <SEQ TYPE="OPERATOR">&gt;</SEQ>
 62        <SEQ TYPE="OPERATOR">&lt;</SEQ>
 63        <SEQ TYPE="OPERATOR">%</SEQ>
 64        <SEQ TYPE="OPERATOR">&amp;</SEQ>
 65        <SEQ TYPE="OPERATOR">|</SEQ>
 66        <SEQ TYPE="OPERATOR">^</SEQ>
 67        <SEQ TYPE="OPERATOR">~</SEQ>
 68        <SEQ TYPE="OPERATOR">}</SEQ>
 69        <SEQ TYPE="OPERATOR">{</SEQ>
 70        <SEQ TYPE="OPERATOR">]</SEQ>
 71        <SEQ TYPE="OPERATOR">[</SEQ>
 72
 73        <SEQ TYPE="OPERATOR">.&amp;</SEQ>
 74        <SEQ TYPE="OPERATOR">.#</SEQ>
 75        <SEQ TYPE="OPERATOR">--></SEQ>
 76
 77        <!-- Function calls -->
 78        <MARK_PREVIOUS TYPE="FUNCTION" EXCLUDE_MATCH="TRUE">(</MARK_PREVIOUS>
 79        <MARK_PREVIOUS TYPE="FUNCTION" EXCLUDE_MATCH="TRUE">::</MARK_PREVIOUS>
 80
 81        <MARK_PREVIOUS AT_WHITESPACE_END="FALSE"
 82            EXCLUDE_MATCH="TRUE"
 83            TYPE="LABEL">:</MARK_PREVIOUS>
 84
 85        <KEYWORDS>
 86            <!-- operators -->
 87            <KEYWORD1>has</KEYWORD1>
 88            <KEYWORD1>hasnt</KEYWORD1>
 89            <KEYWORD1>in</KEYWORD1>
 90            <KEYWORD1>notin</KEYWORD1>
 91            <KEYWORD1>ofclass</KEYWORD1>
 92            <KEYWORD1>provides</KEYWORD1>
 93            <KEYWORD1>or</KEYWORD1>
 94
 95            <!-- text-base conversion functions -->
 96            <LITERAL2>char</LITERAL2>
 97            <LITERAL2>string</LITERAL2>
 98            <LITERAL2>address</LITERAL2>
 99            <LITERAL2>name</LITERAL2>
100            <LITERAL2>a</LITERAL2>
101            <LITERAL2>an</LITERAL2>
102            <LITERAL2>the</LITERAL2>
103            <LITERAL2>The</LITERAL2>
104            <LITERAL2>property</LITERAL2>
105            <LITERAL2>object</LITERAL2>
106
107            <!-- language semantics -->
108            <KEYWORD1>break</KEYWORD1>
109            <KEYWORD1>continue</KEYWORD1>
110            <KEYWORD1>do</KEYWORD1>
111                <KEYWORD1>until</KEYWORD1>
112            <KEYWORD1>for</KEYWORD1>
113            <KEYWORD1>give</KEYWORD1>
114            <KEYWORD1>if</KEYWORD1>
115                <KEYWORD1>else</KEYWORD1>
116            <KEYWORD1>inversion</KEYWORD1>
117            <KEYWORD1>jump</KEYWORD1>
118            <KEYWORD1>move</KEYWORD1>
119                <KEYWORD2>to</KEYWORD2>
120            <KEYWORD1>objectloop</KEYWORD1>
121            <KEYWORD1>remove</KEYWORD1>
122            <KEYWORD1>return</KEYWORD1>
123            <KEYWORD1>rfalse</KEYWORD1>
124            <KEYWORD1>rtrue</KEYWORD1>
125            <KEYWORD1>string</KEYWORD1>
126            <KEYWORD1>switch</KEYWORD1>
127            <KEYWORD1>while</KEYWORD1>
128
129            <!-- class keyworks -->
130            <KEYWORD1>with</KEYWORD1>
131<!--			<KEYWORD1>has</KEYWORD1> -->
132
133            <!-- built-in functions -->
134            <FUNCTION>new_line</FUNCTION>
135            <FUNCTION>print</FUNCTION>
136            <FUNCTION>print_ret</FUNCTION>
137            <FUNCTION>box</FUNCTION>
138            <FUNCTION>font</FUNCTION>
139                <KEYWORD2>on</KEYWORD2>
140                <KEYWORD2>off</KEYWORD2>
141            <FUNCTION>quit</FUNCTION>
142            <FUNCTION>read</FUNCTION>
143            <FUNCTION>restore</FUNCTION>
144            <FUNCTION>save</FUNCTION>
145            <FUNCTION>spaces</FUNCTION>
146            <FUNCTION>style</FUNCTION>
147                <KEYWORD2>roman</KEYWORD2>
148                <KEYWORD2>bold</KEYWORD2>
149                <KEYWORD2>underline</KEYWORD2>
150                <KEYWORD2>reverse</KEYWORD2>
151                <KEYWORD2>fixed</KEYWORD2>
152            <FUNCTION>score</FUNCTION>
153            <FUNCTION>time</FUNCTION>
154
155            <!-- Top-level keyworks -->
156            <KEYWORD3>Abbreviate</KEYWORD3>
157            <KEYWORD3>Array</KEYWORD3>
158            <KEYWORD3>Attribute</KEYWORD3>
159            <KEYWORD3>Class</KEYWORD3>
160            <KEYWORD3>Constant</KEYWORD3>
161            <KEYWORD3>Default</KEYWORD3>
162            <KEYWORD3>End</KEYWORD3>
163            <KEYWORD3>Endif</KEYWORD3>
164            <KEYWORD3>Extend</KEYWORD3>
165            <KEYWORD3>Global</KEYWORD3>
166            <KEYWORD3>Ifdef</KEYWORD3>
167            <KEYWORD3>Ifndef</KEYWORD3>
168            <KEYWORD3>Ifnot</KEYWORD3>
169            <KEYWORD3>Iftrue</KEYWORD3>
170            <KEYWORD3>Iffalse</KEYWORD3>
171            <KEYWORD3>Import</KEYWORD3>
172            <KEYWORD3>Include</KEYWORD3>
173            <KEYWORD3>Link</KEYWORD3>
174            <KEYWORD3>Lowstring</KEYWORD3>
175            <KEYWORD3>Message</KEYWORD3>
176            <KEYWORD3>Object</KEYWORD3>
177            <KEYWORD3>Property</KEYWORD3>
178            <KEYWORD3>Replace</KEYWORD3>
179            <KEYWORD3>Serial</KEYWORD3>
180            <KEYWORD3>Switches</KEYWORD3>
181            <KEYWORD3>Statusline</KEYWORD3>
182            <KEYWORD3>System_file</KEYWORD3>
183            <KEYWORD3>Verb</KEYWORD3>
184            <KEYWORD3>private</KEYWORD3>
185
186            <LITERAL2>false</LITERAL2>
187            <LITERAL2>true</LITERAL2>
188            <LITERAL2>null</LITERAL2>
189            <LITERAL2>super</LITERAL2>
190            <LITERAL2>self</LITERAL2>
191
192            <INVALID>this</INVALID>
193        </KEYWORDS>
194    </RULES>
195    <RULES SET="InformInnerText" IGNORE_CASE="FALSE" DEFAULT="LITERAL1">
196        <SEQ TYPE="OPERATOR">^</SEQ>
197        <SEQ TYPE="OPERATOR">~</SEQ>
198        <SEQ TYPE="OPERATOR">@</SEQ>
199        <SEQ TYPE="OPERATOR">\</SEQ>
200
201        <!-- escaping the @ symbol -->
202        <SEQ TYPE="LITERAL2">@@</SEQ>
203    </RULES>
204</MODE>