├── Preferences
├── Symbol list.plist
└── Folding.tmPreferences
├── info.plist
├── README.mdown
├── Commands
└── Build.plist
└── Syntaxes
└── ANTLR.plist
/Preferences/Symbol list.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Symbol List: Rule Names
7 | scope
8 | keyword.control.label.antlr
9 | settings
10 |
11 | showInSymbolList
12 | 1
13 |
14 | uuid
15 | 61C20EDE-4C2A-44B5-9893-EB1E4CF9EF96
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Preferences/Folding.tmPreferences:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | name
6 | Folding
7 | scope
8 | source.antlr
9 | settings
10 |
11 | foldingStartMarker
12 | /\*(?!\*/)|\{\s*$
13 | foldingStopMarker
14 | \*/|^\s*\}
15 |
16 | uuid
17 | 1762BD67-E4A2-4564-9C16-B127EAB87E82
18 |
19 |
20 |
--------------------------------------------------------------------------------
/info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | contactEmailRot13
6 | gz-ohaqyrf@znpebzngrf.pbz
7 | contactName
8 | Allan Odgaard
9 | description
10 | Support for the <a href="http://www.antlr.org/">ANTLR</a> parser generator tool.
11 | name
12 | ANTLR
13 | ordering
14 |
15 | EA5073FF-4ABB-44FA-95E3-6CB4B8818106
16 | ACABDECD-4F22-47D9-A5F4-DBA957A2A1CC
17 | 61C20EDE-4C2A-44B5-9893-EB1E4CF9EF96
18 |
19 | uuid
20 | 7F43D670-A808-4D6E-BDE7-8CD71C2396EC
21 |
22 |
23 |
--------------------------------------------------------------------------------
/README.mdown:
--------------------------------------------------------------------------------
1 | # Installation
2 |
3 | You can install this bundle in TextMate by opening the preferences and going to the bundles tab. After installation it will be automatically updated for you.
4 |
5 | # General
6 |
7 | * [Bundle Styleguide](http://kb.textmate.org/bundle_styleguide) — _before you make changes_
8 | * [Commit Styleguide](http://kb.textmate.org/commit_styleguide) — _before you send a pull request_
9 | * [Writing Bug Reports](http://kb.textmate.org/writing_bug_reports) — _before you report an issue_
10 |
11 | # License
12 |
13 | If not otherwise specified (see below), files in this repository fall under the following license:
14 |
15 | Permission to copy, use, modify, sell and distribute this
16 | software is granted. This software is provided "as is" without
17 | express or implied warranty, and with no claim as to its
18 | suitability for any purpose.
19 |
20 | An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”.
--------------------------------------------------------------------------------
/Commands/Build.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | beforeRunningCommand
6 | saveActiveFile
7 | command
8 | #!/usr/bin/env bash
9 | [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
10 |
11 | # To install ANTLR via MacPorts
12 | # 1. sudo port install antlr
13 | # 2. set TM_ANTLR to -classpath /opt/local/lib/antlr.jar antlr/Tool
14 |
15 | TM_JAVA=$(type -p "${TM_JAVA:-java}")
16 | TM_ANTLR="${TM_ANTLR:-org.antlr.Tool}"
17 |
18 | cd "$TM_DIRECTORY"
19 |
20 | # for this to work you need to set CLASSPATH to
21 | # include antlr v3, v2, and StringTemplate jars
22 | # or set TM_ANTLR to include a proper -classpath
23 | "$TM_JAVA" $TM_ANTLR "$TM_FILENAME"
24 |
25 | input
26 | none
27 | inputFormat
28 | text
29 | keyEquivalent
30 | @b
31 | name
32 | Build
33 | outputCaret
34 | afterOutput
35 | outputFormat
36 | text
37 | outputLocation
38 | toolTip
39 | scope
40 | source.antlr, source.antlr source.java
41 | semanticClass
42 | process.build.antlr
43 | uuid
44 | EA5073FF-4ABB-44FA-95E3-6CB4B8818106
45 | version
46 | 2
47 |
48 |
49 |
--------------------------------------------------------------------------------
/Syntaxes/ANTLR.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | fileTypes
6 |
7 | g
8 | g4
9 |
10 | keyEquivalent
11 | ^~A
12 | name
13 | ANTLR
14 | patterns
15 |
16 |
17 | include
18 | #strings
19 |
20 |
21 | include
22 | #comments
23 |
24 |
25 | begin
26 | \boptions\b
27 | beginCaptures
28 |
29 | 0
30 |
31 | name
32 | keyword.other.options.antlr
33 |
34 |
35 | end
36 | (?<=\})
37 | name
38 | meta.options.antlr
39 | patterns
40 |
41 |
42 | begin
43 | \{
44 | beginCaptures
45 |
46 | 0
47 |
48 | name
49 | punctuation.section.options.begin.antlr
50 |
51 |
52 | end
53 | \}
54 | endCaptures
55 |
56 | 0
57 |
58 | name
59 | punctuation.section.options.end.antlr
60 |
61 |
62 | name
63 | meta.options-block.antlr
64 | patterns
65 |
66 |
67 | include
68 | #strings
69 |
70 |
71 | include
72 | #comments
73 |
74 |
75 | match
76 | \b\d+\b
77 | name
78 | constant.numeric.antlr
79 |
80 |
81 | match
82 | \b(k|charVocabulary|filter|greedy|paraphrase|exportVocab|buildAST|defaultErrorHandler|language|namespace|namespaceStd|namespaceAntlr|genHashLines)\b
83 | name
84 | variable.other.option.antlr
85 |
86 |
87 | match
88 | \b(true|false)\b
89 | name
90 | constant.language.boolean.antlr
91 |
92 |
93 |
94 |
95 |
96 |
97 | begin
98 | ^(class)\b\s+(\w+)
99 | captures
100 |
101 | 1
102 |
103 | name
104 | storage.type.antlr
105 |
106 | 2
107 |
108 | name
109 | entity.name.type.class.antlr
110 |
111 |
112 | end
113 | ;
114 | name
115 | meta.definition.class.antlr
116 | patterns
117 |
118 |
119 | begin
120 | \b(extends)\b\s+
121 | captures
122 |
123 | 1
124 |
125 | name
126 | storage.modifier.antlr
127 |
128 |
129 | end
130 | (?=;)
131 | name
132 | meta.definition.class.extends.antlr
133 | patterns
134 |
135 |
136 | match
137 | \b(Parser|Lexer|TreeWalker)\b
138 | name
139 | support.class.antlr
140 |
141 |
142 |
143 |
144 |
145 |
146 | match
147 | ^protected\b
148 | name
149 | storage.modifier.antlr
150 |
151 |
152 | match
153 | ^[[:upper:]_][[:upper:][:digit:]_]*\b
154 | name
155 | entity.name.type.token.antlr
156 |
157 |
158 | captures
159 |
160 | 1
161 |
162 | name
163 | entity.name.function.rule.antlr
164 |
165 | 2
166 |
167 | name
168 | keyword.control.antlr
169 |
170 |
171 | match
172 | ^(\w+)(?:\s+(returns\b))?
173 | name
174 | meta.rule.antlr
175 |
176 |
177 | match
178 | \b[[:upper:]_][[:upper:][:digit:]_]*\b
179 | name
180 | constant.other.token.antlr
181 |
182 |
183 | include
184 | #nested-curly
185 |
186 |
187 | repository
188 |
189 | comments
190 |
191 | patterns
192 |
193 |
194 | begin
195 | /\*
196 | beginCaptures
197 |
198 | 0
199 |
200 | name
201 | punctuation.definition.comment.begin.antlr
202 |
203 |
204 | end
205 | \*/
206 | endCaptures
207 |
208 | 0
209 |
210 | name
211 | punctuation.definition.comment.end.antlr
212 |
213 |
214 | name
215 | comment.block.antlr
216 |
217 |
218 | begin
219 | (^[ \t]+)?(?=//)
220 | beginCaptures
221 |
222 | 1
223 |
224 | name
225 | punctuation.whitespace.comment.leading.antlr
226 |
227 |
228 | end
229 | (?!\G)
230 | patterns
231 |
232 |
233 | begin
234 | //
235 | beginCaptures
236 |
237 | 0
238 |
239 | name
240 | punctuation.definition.comment.antlr
241 |
242 |
243 | end
244 | \n
245 | name
246 | comment.line.double-slash.antlr
247 |
248 |
249 |
250 |
251 |
252 | nested-curly
253 |
254 | begin
255 | \{
256 | beginCaptures
257 |
258 | 0
259 |
260 | name
261 | punctuation.section.group.begin.antlr
262 |
263 |
264 | end
265 | \}
266 | endCaptures
267 |
268 | 0
269 |
270 | name
271 | punctuation.section.group.end.antlr
272 |
273 |
274 | name
275 | source.embedded.java-or-c.antlr
276 | patterns
277 |
278 |
279 | match
280 | \b(break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while)\b
281 | name
282 | keyword.control.java-or-c
283 |
284 |
285 | match
286 | \b(asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\b
287 | name
288 | storage.type.java-or-c
289 |
290 |
291 | match
292 | \b(const|extern|register|restrict|static|volatile|inline)\b
293 | name
294 | storage.modifier.java-or-c
295 |
296 |
297 | match
298 | \b(NULL|true|false|TRUE|FALSE)\b
299 | name
300 | constant.language.java-or-c
301 |
302 |
303 | match
304 | \b(sizeof)\b
305 | name
306 | keyword.operator.sizeof.java-or-c
307 |
308 |
309 | match
310 | \b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b
311 | name
312 | constant.numeric.java-or-c
313 |
314 |
315 | begin
316 | "
317 | beginCaptures
318 |
319 | 0
320 |
321 | name
322 | punctuation.definition.string.begin.java-or-c
323 |
324 |
325 | end
326 | "
327 | endCaptures
328 |
329 | 0
330 |
331 | name
332 | punctuation.definition.string.end.java-or-c
333 |
334 |
335 | name
336 | string.quoted.double.java-or-c
337 | patterns
338 |
339 |
340 | match
341 | \\.
342 | name
343 | constant.character.escape.antlr
344 |
345 |
346 |
347 |
348 | begin
349 | '
350 | beginCaptures
351 |
352 | 0
353 |
354 | name
355 | punctuation.definition.string.begin.java-or-c
356 |
357 |
358 | end
359 | '
360 | endCaptures
361 |
362 | 0
363 |
364 | name
365 | punctuation.definition.string.end.java-or-c
366 |
367 |
368 | name
369 | string.quoted.single.java-or-c
370 | patterns
371 |
372 |
373 | match
374 | \\.
375 | name
376 | constant.character.escape.antlr
377 |
378 |
379 |
380 |
381 | match
382 | \bEOF_CHAR\b
383 | name
384 | support.constant.eof-char.antlr
385 |
386 |
387 | include
388 | #comments
389 |
390 |
391 |
392 | strings
393 |
394 | patterns
395 |
396 |
397 | begin
398 | "
399 | beginCaptures
400 |
401 | 0
402 |
403 | name
404 | punctuation.definition.string.begin.antlr
405 |
406 |
407 | end
408 | "
409 | endCaptures
410 |
411 | 0
412 |
413 | name
414 | punctuation.definition.string.end.antlr
415 |
416 |
417 | name
418 | string.quoted.double.antlr
419 | patterns
420 |
421 |
422 | match
423 | \\(u[0-9A-Fa-f]{4}|.)
424 | name
425 | constant.character.escape.antlr
426 |
427 |
428 |
429 |
430 | begin
431 | '
432 | beginCaptures
433 |
434 | 0
435 |
436 | name
437 | punctuation.definition.string.begin.antlr
438 |
439 |
440 | end
441 | '
442 | endCaptures
443 |
444 | 0
445 |
446 | name
447 | punctuation.definition.string.end.antlr
448 |
449 |
450 | name
451 | string.quoted.single.antlr
452 | patterns
453 |
454 |
455 | match
456 | \\(u[0-9A-Fa-f]{4}|.)
457 | name
458 | constant.character.escape.antlr
459 |
460 |
461 |
462 |
463 |
464 |
465 | scopeName
466 | source.antlr
467 | uuid
468 | ACABDECD-4F22-47D9-A5F4-DBA957A2A1CC
469 |
470 |
471 |
--------------------------------------------------------------------------------