remove math.blas.syntax and merge parsing words into math.blas.vectors/matrices
[factor/jcg.git] / misc / Factor.tmbundle / Syntaxes / Factor.tmLanguage
blob199185c93de08e900bbc96d61187740b16b39061
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 <plist version="1.0">
4 <dict>
5 <key>fileTypes</key>
6 <array>
7 <string>factor</string>
8 <string>facts</string>
9 </array>
10 <key>foldingStartMarker</key>
11 <string>^\s*(M|C)?:|#(V|H|C)\{</string>
12 <key>foldingStopMarker</key>
13 <string>^\s*$</string>
14 <key>keyEquivalent</key>
15 <string>^~F</string>
16 <key>name</key>
17 <string>Factor</string>
18 <key>patterns</key>
19 <array>
20 <dict>
21 <key>captures</key>
22 <dict>
23 <key>2</key>
24 <dict>
25 <key>name</key>
26 <string>keyword.colon.factor</string>
27 </dict>
28 <key>3</key>
29 <dict>
30 <key>name</key>
31 <string>entity.name.function.factor</string>
32 </dict>
33 <key>4</key>
34 <dict>
35 <key>name</key>
36 <string>comment.stack-effect.factor</string>
37 </dict>
38 </dict>
39 <key>match</key>
40 <string>(^|(?&lt;=\s))(:)\s+([^\s]+)\s</string>
41 <key>name</key>
42 <string>definition.word.factor</string>
43 </dict>
44 <dict>
45 <key>captures</key>
46 <dict>
47 <key>2</key>
48 <dict>
49 <key>name</key>
50 <string>keyword.colon.factor</string>
51 </dict>
52 <key>3</key>
53 <dict>
54 <key>name</key>
55 <string>entity.name.method.factor</string>
56 </dict>
57 <key>4</key>
58 <dict>
59 <key>name</key>
60 <string>comment.stack-effect.factor</string>
61 </dict>
62 </dict>
63 <key>match</key>
64 <string>(^|(?&lt;=\s))(C:)\s+([^\s]+)\s</string>
65 <key>name</key>
66 <string>definition.word.class.factor</string>
67 </dict>
68 <dict>
69 <key>captures</key>
70 <dict>
71 <key>2</key>
72 <dict>
73 <key>name</key>
74 <string>keyword.colon.factor</string>
75 </dict>
76 <key>3</key>
77 <dict>
78 <key>name</key>
79 <string>entity.name.class.factor</string>
80 </dict>
81 <key>4</key>
82 <dict>
83 <key>name</key>
84 <string>entity.name.method.factor</string>
85 </dict>
86 <key>5</key>
87 <dict>
88 <key>name</key>
89 <string>comment.stack-effect.factor</string>
90 </dict>
91 </dict>
92 <key>match</key>
93 <string>(^|(?&lt;=\s))(M:)\s+([^\s]+)\s+([^\s]+)\s</string>
94 <key>name</key>
95 <string>definition.word.method.factor</string>
96 </dict>
97 <dict>
98 <key>captures</key>
99 <dict>
100 <key>2</key>
101 <dict>
102 <key>name</key>
103 <string>keyword.colon.factor</string>
104 </dict>
105 <key>4</key>
106 <dict>
107 <key>name</key>
108 <string>entity.name.generic.factor</string>
109 </dict>
110 <key>5</key>
111 <dict>
112 <key>name</key>
113 <string>comment.stack-effect.factor</string>
114 </dict>
115 </dict>
116 <key>match</key>
117 <string>(^|(?&lt;=\s))(G(ENERIC)?:)\s+([^\s]+)\s</string>
118 <key>name</key>
119 <string>definition.word.generic.factor</string>
120 </dict>
121 <dict>
122 <key>captures</key>
123 <dict>
124 <key>2</key>
125 <dict>
126 <key>name</key>
127 <string>storage.type.factor</string>
128 </dict>
129 <key>3</key>
130 <dict>
131 <key>name</key>
132 <string>entity.name.class.factor</string>
133 </dict>
134 </dict>
135 <key>match</key>
136 <string>(^|(?&lt;=\s))(TUPLE:)\s+([^\s]+)\s+(([^\s]+)+)</string>
137 <key>name</key>
138 <string>meta.class.factor</string>
139 </dict>
140 <dict>
141 <key>match</key>
142 <string>(^|(?&lt;=\s))(drop|2drop|3drop|keep|2keep|3keep|nip|2nip|dup|2dup|3dup|dupd|over|pick|tuck|swap|rot|-rot|roll|-roll|slip|2swap|swapd|&gt;r|r&gt;)(\s|$)</string>
143 <key>name</key>
144 <string>keyword.control.stack.factor</string>
145 </dict>
146 <dict>
147 <key>match</key>
148 <string>(^|(?&lt;=\s))(get|set)(\s|$)</string>
149 <key>name</key>
150 <string>keyword.control.variable.factor</string>
151 </dict>
152 <dict>
153 <key>match</key>
154 <string>(^|(?&lt;=\s))(if|when|unless|if*|unless*|when*)\*?(\s|$)</string>
155 <key>name</key>
156 <string>keyword.control.flow.factor</string>
157 </dict>
158 <dict>
159 <key>begin</key>
160 <string>(^|(?&lt;=\s))(USING:)</string>
161 <key>end</key>
162 <string>(?&lt;=\s);(\s|$)</string>
163 <key>name</key>
164 <string>keyword.control.using.factor</string>
165 <key>patterns</key>
166 <array>
167 <dict>
168 <key>match</key>
169 <string>(^|(?&lt;=\s))[^\s]+(\s|$)</string>
170 <key>name</key>
171 <string>constant.namespace.factor</string>
172 </dict>
173 </array>
174 </dict>
175 <dict>
176 <key>begin</key>
177 <string>(^|(?&lt;=\s))(REQUIRES:)</string>
178 <key>end</key>
179 <string>(?&lt;=\s);(\s|$)</string>
180 <key>name</key>
181 <string>keyword.control.requires.factor</string>
182 <key>patterns</key>
183 <array>
184 <dict>
185 <key>match</key>
186 <string>(^|(?&lt;=\s))[^\s]+(\s|$)</string>
187 <key>name</key>
188 <string>constant.namespace.factor</string>
189 </dict>
190 </array>
191 </dict>
192 <dict>
193 <key>match</key>
194 <string>(^|(?&lt;=\s))(f|t)(\s|$)</string>
195 <key>name</key>
196 <string>constant.language.factor</string>
197 </dict>
198 <dict>
199 <key>match</key>
200 <string>(^|(?&lt;=\s))CHAR:\s+[^\s]+(\s|$)</string>
201 <key>name</key>
202 <string>constant.character.factor</string>
203 </dict>
204 <dict>
205 <key>match</key>
206 <string>(^|(?&lt;=\s))((BIN:|OCT:)\s+)?-?\d+(\s|$)</string>
207 <key>name</key>
208 <string>constant.numeric.integer.factor</string>
209 </dict>
210 <dict>
211 <key>match</key>
212 <string>(^|(?&lt;=\s))HEX:\s+-?[\dA-Fa-f]+(\s|$)</string>
213 <key>name</key>
214 <string>constant.numeric.hexadecimal.integer.factor</string>
215 </dict>
216 <dict>
217 <key>match</key>
218 <string>(^|(?&lt;=\s))-?+\d+\.\d+(E(\+|-)\d+)?(\s|$)</string>
219 <key>name</key>
220 <string>constant.numeric.float.factor</string>
221 </dict>
222 <dict>
223 <key>match</key>
224 <string>(^|(?&lt;=\s))-?\d+/-?\d+(\s|$)</string>
225 <key>name</key>
226 <string>constant.numeric.rational.factor</string>
227 </dict>
228 <dict>
229 <key>begin</key>
230 <string>"</string>
231 <key>end</key>
232 <string>"</string>
233 <key>name</key>
234 <string>string.quoted.double.factor</string>
235 <key>patterns</key>
236 <array>
237 <dict>
238 <key>include</key>
239 <string>#escaped_characters</string>
240 </dict>
241 </array>
242 </dict>
243 <dict>
244 <key>begin</key>
245 <string>&lt;"</string>
246 <key>end</key>
247 <string>"&gt;</string>
248 <key>name</key>
249 <string>string.quoted.double.multiline.factor</string>
250 <key>patterns</key>
251 <array>
252 <dict>
253 <key>include</key>
254 <string>#escaped_characters</string>
255 </dict>
256 </array>
257 </dict>
258 <dict>
259 <key>begin</key>
260 <string>(^|(?&lt;=\s))(STRING:)\s+(\S+)</string>
261 <key>captures</key>
262 <dict>
263 <key>2</key>
264 <dict>
265 <key>name</key>
266 <string>keyword.colon.factor</string>
267 </dict>
268 <key>3</key>
269 <dict>
270 <key>name</key>
271 <string>entity.name.heredoc.factor</string>
272 </dict>
273 </dict>
274 <key>contentName</key>
275 <string>string.unquoted.heredoc.factor</string>
276 <key>end</key>
277 <string>^;$</string>
278 <key>name</key>
279 <string>definition.word.heredoc.factor</string>
280 </dict>
281 <dict>
282 <key>match</key>
283 <string>inline|foldable</string>
284 <key>name</key>
285 <string>storage.modifier.factor</string>
286 </dict>
287 <dict>
288 <key>match</key>
289 <string>(^|(?&lt;=\s))#?!(\s.*)?$</string>
290 <key>name</key>
291 <string>comment.line.factor</string>
292 </dict>
293 <dict>
294 <key>begin</key>
295 <string>\((?=\s)</string>
296 <key>end</key>
297 <string>(^|(?&lt;=\s))\)</string>
298 <key>name</key>
299 <string>comment.parens.factor</string>
300 </dict>
301 <dict>
302 <key>match</key>
303 <string>\b[^\s]+:\s+[^\s]+(\s|$)</string>
304 <key>name</key>
305 <string>keyword.control.postpone.factor</string>
306 </dict>
307 </array>
308 <key>repository</key>
309 <dict>
310 <key>escaped_characters</key>
311 <dict>
312 <key>patterns</key>
313 <array>
314 <dict>
315 <key>match</key>
316 <string>\\(\\|[enrts'"?]|[0-3]\d{,2}|[4-7]\d?|u[a-fA-F0-9]{,2})</string>
317 <key>name</key>
318 <string>constant.character.escape.factor</string>
319 </dict>
320 <dict>
321 <key>match</key>
322 <string>\\.</string>
323 <key>name</key>
324 <string>invalid.illegal.unknown-escape.factor</string>
325 </dict>
326 </array>
327 </dict>
328 </dict>
329 <key>scopeName</key>
330 <string>source.factor</string>
331 <key>uuid</key>
332 <string>3C9C9C2A-314A-475B-A4E4-A68BAAF3F36E</string>
333 </dict>
334 </plist>