remove math.blas.syntax and merge parsing words into math.blas.vectors/matrices
[factor/jcg.git] / basis / xmode / modes / pike.xml
blobfa50f3edee48f44af2d7daeff16cae65f9c282b5
1 <?xml version="1.0"?>\r
2 \r
3 <!-- Pike mode, contributed by\r
4                       Marco G?tze, <gomar@gmx.net> -->\r
5 <!-- Small fixes and autodoc support contributed by\r
6                       Peter Lundqvist <peterl@update.uu.se> -->\r
7 \r
8 <!DOCTYPE MODE SYSTEM "xmode.dtd">\r
9 \r
10 <MODE>\r
11   <PROPS>\r
12     <PROPERTY NAME="commentStart" VALUE="/*"/>\r
13     <PROPERTY NAME="commentEnd" VALUE="*/"/>\r
14     <PROPERTY NAME="lineComment" VALUE="//"/>\r
15     <PROPERTY NAME="wordBreakChars" VALUE=",+-=&lt;&gt;/?^&amp;*`"/>\r
17     <!-- Auto indent -->\r
18     <PROPERTY NAME="indentOpenBrackets" VALUE="{"/>\r
19     <PROPERTY NAME="indentCloseBrackets" VALUE="}"/>\r
20     <PROPERTY NAME="indentNextLine" VALUE="\s*(((if|(for(each)?)|while|catch|gauge)\s*\(|(do|else)\s*|else\s+if\s*\()[^{;]*)"/>\r
21     <!-- set this to 'true' if you want to use GNU coding style -->\r
22     <PROPERTY NAME="doubleBracketIndent" VALUE="false"/>\r
23   </PROPS>\r
24   <RULES IGNORE_CASE="FALSE" HIGHLIGHT_DIGITS="TRUE" DIGIT_RE="(0x[\p{XDigit}]+|[\p{Digit}]+|0[bB][01]+)[lLdDfF]?">\r
26     <!-- comments -->\r
27     <SPAN TYPE="COMMENT1" DELEGATE="COMMENT">\r
28       <BEGIN>/*</BEGIN>\r
29       <END>*/</END>\r
30     </SPAN>\r
31     <SEQ TYPE="INVALID">*/</SEQ>\r
33     <!-- Autodoc comment -->\r
34     <EOL_SPAN TYPE="COMMENT1" DELEGATE="AUTODOC">//!</EOL_SPAN>\r
35     <!-- C++ line comment -->\r
36     <EOL_SPAN TYPE="COMMENT1" DELEGATE="COMMENT">//</EOL_SPAN>\r
38     <!-- string, char literals -->\r
39     <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE" DELEGATE="STRING_LITERAL">\r
40       <BEGIN>"</BEGIN>\r
41       <END>"</END>\r
42     </SPAN>\r
43     <SPAN TYPE="LITERAL1" DELEGATE="STRING_LITERAL">\r
44       <BEGIN>#"</BEGIN>\r
45       <END>"</END>\r
46     </SPAN>\r
47     <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">\r
48       <BEGIN>'</BEGIN>\r
49       <END>'</END>\r
50     </SPAN>\r
52     <!-- preprocessor statements -->\r
53     <SEQ_REGEXP TYPE="KEYWORD2" HASH_CHAR="#" AT_LINE_START="TRUE">#.*?(?=($|/\*|//))</SEQ_REGEXP>\r
55     <!-- operators -->\r
56     <SEQ TYPE="OPERATOR">({</SEQ>\r
57     <SEQ TYPE="OPERATOR">})</SEQ>\r
58     <SEQ TYPE="OPERATOR">([</SEQ>\r
59     <SEQ TYPE="OPERATOR">])</SEQ>\r
60     <SEQ TYPE="OPERATOR">(&lt;</SEQ>\r
61     <SEQ TYPE="OPERATOR">&gt;)</SEQ>\r
62     <SEQ TYPE="OPERATOR">=</SEQ>\r
63     <SEQ TYPE="OPERATOR">!</SEQ>\r
64     <SEQ TYPE="OPERATOR">+</SEQ>\r
65     <SEQ TYPE="OPERATOR">-</SEQ>\r
66     <SEQ TYPE="OPERATOR">/</SEQ>\r
67     <SEQ TYPE="OPERATOR">*</SEQ>\r
68     <SEQ TYPE="OPERATOR">&gt;</SEQ>\r
69     <SEQ TYPE="OPERATOR">&lt;</SEQ>\r
70     <SEQ TYPE="OPERATOR">%</SEQ>\r
71     <SEQ TYPE="OPERATOR">&amp;</SEQ>\r
72     <SEQ TYPE="OPERATOR">|</SEQ>\r
73     <SEQ TYPE="OPERATOR">^</SEQ>\r
74     <SEQ TYPE="OPERATOR">~</SEQ>\r
75     <SEQ TYPE="OPERATOR">@</SEQ>\r
76     <SEQ TYPE="OPERATOR">`</SEQ>\r
77     <SEQ TYPE="OPERATOR">.</SEQ>\r
79     <!-- function calls -->\r
80     <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="OPERATOR">(</MARK_PREVIOUS>\r
81         <SEQ TYPE="OPERATOR">)</SEQ>\r
83     <KEYWORDS>\r
84       <!-- type modifiers -->\r
85       <KEYWORD1>constant</KEYWORD1>\r
86       <KEYWORD1>extern</KEYWORD1>\r
87       <KEYWORD1>final</KEYWORD1>\r
88       <KEYWORD1>inline</KEYWORD1>\r
89       <KEYWORD1>local</KEYWORD1>\r
90       <KEYWORD1>nomask</KEYWORD1>\r
91       <KEYWORD1>optional</KEYWORD1>\r
92       <KEYWORD1>private</KEYWORD1>\r
93       <KEYWORD1>protected</KEYWORD1>\r
94       <KEYWORD1>public</KEYWORD1>\r
95       <KEYWORD1>static</KEYWORD1>\r
96       <KEYWORD1>variant</KEYWORD1>\r
98       <!-- types -->\r
99       <KEYWORD3>array</KEYWORD3>\r
100       <KEYWORD3>class</KEYWORD3>\r
101       <KEYWORD3>float</KEYWORD3>\r
102       <KEYWORD3>function</KEYWORD3>\r
103       <KEYWORD3>int</KEYWORD3>\r
104       <KEYWORD3>mapping</KEYWORD3>\r
105       <KEYWORD3>mixed</KEYWORD3>\r
106       <KEYWORD3>multiset</KEYWORD3>\r
107       <KEYWORD3>object</KEYWORD3>\r
108       <KEYWORD3>program</KEYWORD3>\r
109       <KEYWORD3>string</KEYWORD3>\r
110       <KEYWORD3>void</KEYWORD3>\r
112       <!-- flow control and block-introducing keywords -->\r
113       <KEYWORD1>break</KEYWORD1>\r
114       <KEYWORD1>case</KEYWORD1>\r
115       <KEYWORD1>catch</KEYWORD1>\r
116       <KEYWORD1>continue</KEYWORD1>\r
117       <KEYWORD1>default</KEYWORD1>\r
118       <KEYWORD1>do</KEYWORD1>\r
119       <KEYWORD1>else</KEYWORD1>\r
120       <KEYWORD1>for</KEYWORD1>\r
121       <KEYWORD1>foreach</KEYWORD1>\r
122       <KEYWORD1>gauge</KEYWORD1>\r
123       <KEYWORD1>if</KEYWORD1>\r
124       <KEYWORD1>lambda</KEYWORD1>\r
125       <KEYWORD1>return</KEYWORD1>\r
126       <KEYWORD1>sscanf</KEYWORD1>\r
127       <KEYWORD1>switch</KEYWORD1>\r
128       <KEYWORD1>while</KEYWORD1>\r
130       <!-- special instructions -->\r
131       <KEYWORD2>import</KEYWORD2>\r
132       <KEYWORD2>inherit</KEYWORD2>\r
133     </KEYWORDS>\r
134   </RULES>\r
136   <RULES SET="COMMENT" IGNORE_CASE="FALSE" DEFAULT="COMMENT1">\r
137     <KEYWORDS>\r
138       <COMMENT2>FIXME</COMMENT2>\r
139       <COMMENT2>XXX</COMMENT2>\r
140     </KEYWORDS>\r
141   </RULES>\r
143   <RULES SET="AUTODOC" IGNORE_CASE="TRUE" DEFAULT="COMMENT1">\r
145                 <EOL_SPAN TYPE="NULL" DELEGATE="MAIN" MATCH_TYPE="CONTEXT">@decl</EOL_SPAN>\r
147                 <!-- XML tags -->\r
148                 <SPAN TYPE="MARKUP" DELEGATE="xml::TAGS">\r
149                   <BEGIN>@xml{</BEGIN>\r
150                         <END>@}</END>\r
151                 </SPAN>\r
152                 <!-- Cross references -->\r
153                 <SPAN TYPE="FUNCTION" NO_LINE_BREAK="TRUE">\r
154                 <BEGIN>@[</BEGIN>\r
155                         <END>]</END>\r
156                 </SPAN>\r
158                 <!-- Brace keywords -->\r
159                 <SEQ_REGEXP TYPE="FUNCTION" HASH_CHAR="@">@(b|i|u|tt|url|pre|ref|code|expr|image)?(\{.*@\})</SEQ_REGEXP>\r
161                 <!-- Attempt to get syntax highlighting of @decl-ed functions\r
162                      inside of the autodoc-rule.\r
164                      It works - but jEdit 4.1 has problems keeping it highlighted\r
165                      (the syntax highlighting works depending on how you travel\r
166                      past the @decl-ed region).\r
167                      Can't figure aout how to to proper coloring of the @decl\r
168                      keyword either.\r
170                      If there are problems with what regions are highlighted -\r
171                      try to uncomment this first.\r
172                 -->\r
173                 <EOL_SPAN TYPE="NULL" DELEGATE="MAIN">@decl</EOL_SPAN>\r
175                 <KEYWORDS>\r
176                   <!-- Meta keywords -->\r
177                   <LABEL>@appears</LABEL>\r
178                   <LABEL>@belongs</LABEL>\r
179                   <LABEL>@class</LABEL>\r
180                   <LABEL>@endclass</LABEL>\r
181                   <LABEL>@example</LABEL>\r
182                   <LABEL>@module</LABEL>\r
183                   <LABEL>@endmodule</LABEL>\r
184                   <LABEL>@namespace</LABEL>\r
185                   <LABEL>@endnamespace</LABEL>\r
186                   <!-- <LABEL>@decl</LABEL>\r
187                   -->\r
189                   <!-- Single keywords -->\r
190                   <LABEL>@deprecated</LABEL>\r
192                   <!-- Delimiter keywords -->\r
193                   <LABEL>@note</LABEL>\r
194                   <LABEL>@example</LABEL>\r
195                   <LABEL>@bugs</LABEL>\r
196                   <LABEL>@returns</LABEL>\r
197                   <LABEL>@throws</LABEL>\r
198                   <LABEL>@param</LABEL>\r
199                   <LABEL>@seealso</LABEL>\r
200                   <LABEL>@fixme</LABEL>\r
201                   <LABEL>@constant</LABEL>\r
202                   <LABEL>@member</LABEL>\r
203                   <LABEL>@index</LABEL>\r
204                   <LABEL>@elem</LABEL>\r
205                   <LABEL>@value</LABEL>\r
206                   <LABEL>@type</LABEL>\r
207                   <LABEL>@item</LABEL>\r
209                   <!-- Container keywords -->\r
210                   <LABEL>@section</LABEL>\r
211                   <LABEL>@mapping</LABEL>\r
212                   <LABEL>@endmapping</LABEL>\r
213                   <LABEL>@multiset</LABEL>\r
214                   <LABEL>@endmultiset</LABEL>\r
215                   <LABEL>@array</LABEL>\r
216                   <LABEL>@endarray</LABEL>\r
217                   <LABEL>@int</LABEL>\r
218                   <LABEL>@endint</LABEL>\r
219                   <LABEL>@string</LABEL>\r
220                   <LABEL>@endstring</LABEL>\r
221                   <LABEL>@mixed</LABEL>\r
222                   <LABEL>@endmixed</LABEL>\r
223                   <LABEL>@dl</LABEL>\r
224                   <LABEL>@enddl</LABEL>\r
225                   <LABEL>@ol</LABEL>\r
226                   <LABEL>@endol</LABEL>\r
227                   <LABEL>@ul</LABEL>\r
228                   <LABEL>@endol</LABEL>\r
230                   <!-- Special keywords -->\r
231                   <LABEL>@ignore</LABEL>\r
232                   <LABEL>@endignore</LABEL>\r
234                 </KEYWORDS>\r
236         </RULES>\r
238   <RULES SET="STRING_LITERAL" ESCAPE="\" IGNORE_CASE="TRUE" DEFAULT="LITERAL1">\r
239     <SEQ_REGEXP TYPE="LITERAL2" HASH_CHAR="%">%([^ a-z]*[a-z]|\[[^\]]*\])</SEQ_REGEXP>\r
240     <SEQ TYPE="COMMENT2">DEBUG:</SEQ>\r
241   </RULES>\r
242 </MODE>