PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.3
Code Block Pro – Beautiful Syntax Highlighting v1.27.3
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / jison.tmLanguage.json

jison.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.27.3, at build/shiki/languages/jison.tmLanguage.json

713 lines 18.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "name": "jison",
3 "scopeName": "source.jison",
4 "fileTypes": ["jison"],
5 "patterns": [
6 {
7 "begin": "%%",
8 "end": "\\z",
9 "beginCaptures": {
10 "0": {
11 "name": "meta.separator.section.jison"
12 }
13 },
14 "patterns": [
15 {
16 "begin": "%%",
17 "end": "\\z",
18 "beginCaptures": {
19 "0": {
20 "name": "meta.separator.section.jison"
21 }
22 },
23 "patterns": [
24 {
25 "name": "meta.section.epilogue.jison",
26 "begin": "\\G",
27 "end": "\\z",
28 "contentName": "source.js.embedded.jison",
29 "patterns": [
30 {
31 "include": "#epilogue_section"
32 }
33 ]
34 }
35 ]
36 },
37 {
38 "name": "meta.section.rules.jison",
39 "begin": "\\G",
40 "end": "(?=%%)",
41 "patterns": [
42 {
43 "include": "#rules_section"
44 }
45 ]
46 }
47 ]
48 },
49 {
50 "name": "meta.section.declarations.jison",
51 "begin": "^",
52 "end": "(?=%%)",
53 "patterns": [
54 {
55 "include": "#declarations_section"
56 }
57 ]
58 }
59 ],
60 "repository": {
61 "declarations_section": {
62 "patterns": [
63 {
64 "include": "#comments"
65 },
66 {
67 "begin": "^\\s*(%lex)\\s*$",
68 "end": "^\\s*(/lex)\\b",
69 "beginCaptures": {
70 "1": {
71 "name": "entity.name.tag.lexer.begin.jison"
72 }
73 },
74 "endCaptures": {
75 "1": {
76 "name": "entity.name.tag.lexer.end.jison"
77 }
78 },
79 "patterns": [
80 {
81 "begin": "%%",
82 "end": "(?=/lex)",
83 "beginCaptures": {
84 "0": {
85 "name": "meta.separator.section.jisonlex"
86 }
87 },
88 "patterns": [
89 {
90 "begin": "^%%",
91 "end": "(?=/lex)",
92 "beginCaptures": {
93 "0": {
94 "name": "meta.separator.section.jisonlex"
95 }
96 },
97 "patterns": [
98 {
99 "name": "meta.section.user-code.jisonlex",
100 "begin": "\\G",
101 "end": "(?=/lex)",
102 "contentName": "source.js.embedded.jisonlex",
103 "patterns": [
104 {
105 "include": "source.jisonlex#user_code_section"
106 }
107 ]
108 }
109 ]
110 },
111 {
112 "name": "meta.section.rules.jisonlex",
113 "begin": "\\G",
114 "end": "^(?=%%|/lex)",
115 "patterns": [
116 {
117 "include": "source.jisonlex#rules_section"
118 }
119 ]
120 }
121 ]
122 },
123 {
124 "name": "meta.section.definitions.jisonlex",
125 "begin": "^",
126 "end": "(?=%%|/lex)",
127 "patterns": [
128 {
129 "include": "source.jisonlex#definitions_section"
130 }
131 ]
132 }
133 ]
134 },
135 {
136 "name": "meta.section.prologue.jison",
137 "begin": "(?=%\\{)",
138 "end": "(?<=%\\})",
139 "patterns": [
140 {
141 "include": "#user_code_blocks"
142 }
143 ]
144 },
145 {
146 "include": "#options_declarations"
147 },
148 {
149 "name": "keyword.other.declaration.$1.jison",
150 "match": "%(ebnf|left|nonassoc|parse-param|right|start)\\b"
151 },
152 {
153 "include": "#include_declarations"
154 },
155 {
156 "name": "meta.code.jison",
157 "begin": "%(code)\\b",
158 "end": "$",
159 "beginCaptures": {
160 "0": {
161 "name": "keyword.other.declaration.$1.jison"
162 }
163 },
164 "patterns": [
165 {
166 "include": "#comments"
167 },
168 {
169 "include": "#rule_actions"
170 },
171 {
172 "name": "keyword.other.code-qualifier.$1.jison",
173 "match": "(init|required)"
174 },
175 {
176 "include": "#quoted_strings"
177 },
178 {
179 "name": "string.unquoted.jison",
180 "match": "\\b[[:alpha:]_](?:[\\w-]*\\w)?\\b"
181 }
182 ]
183 },
184 {
185 "name": "meta.parser-type.jison",
186 "begin": "%(parser-type)\\b",
187 "end": "$",
188 "beginCaptures": {
189 "0": {
190 "name": "keyword.other.declaration.$1.jison"
191 }
192 },
193 "patterns": [
194 {
195 "include": "#comments"
196 },
197 {
198 "include": "#quoted_strings"
199 },
200 {
201 "name": "string.unquoted.jison",
202 "match": "\\b[[:alpha:]_](?:[\\w-]*\\w)?\\b"
203 }
204 ]
205 },
206 {
207 "name": "meta.token.jison",
208 "begin": "%(token)\\b",
209 "end": "$|(%%|;)",
210 "beginCaptures": {
211 "0": {
212 "name": "keyword.other.declaration.$1.jison"
213 }
214 },
215 "endCaptures": {
216 "1": {
217 "name": "punctuation.terminator.declaration.token.jison"
218 }
219 },
220 "patterns": [
221 {
222 "include": "#comments"
223 },
224 {
225 "include": "#numbers"
226 },
227 {
228 "include": "#quoted_strings"
229 },
230 {
231 "name": "invalid.unimplemented.jison",
232 "match": "<[[:alpha:]_](?:[\\w-]*\\w)?>"
233 },
234 {
235 "name": "entity.other.token.jison",
236 "match": "\\S+"
237 }
238 ]
239 },
240 {
241 "name": "keyword.other.declaration.$1.jison",
242 "match": "%(debug|import)\\b"
243 },
244 {
245 "name": "invalid.illegal.jison",
246 "match": "%prec\\b"
247 },
248 {
249 "name": "invalid.unimplemented.jison",
250 "match": "%[[:alpha:]_](?:[\\w-]*\\w)?\\b"
251 },
252 {
253 "include": "#numbers"
254 },
255 {
256 "include": "#quoted_strings"
257 }
258 ]
259 },
260 "rules_section": {
261 "patterns": [
262 {
263 "include": "#comments"
264 },
265 {
266 "include": "#actions"
267 },
268 {
269 "include": "#include_declarations"
270 },
271 {
272 "name": "meta.rule.jison",
273 "begin": "\\b[[:alpha:]_](?:[\\w-]*\\w)?\\b",
274 "end": ";",
275 "beginCaptures": {
276 "0": {
277 "name": "entity.name.constant.rule-result.jison"
278 }
279 },
280 "endCaptures": {
281 "0": {
282 "name": "punctuation.terminator.rule.jison"
283 }
284 },
285 "patterns": [
286 {
287 "include": "#comments"
288 },
289 {
290 "name": "meta.rule-components.jison",
291 "begin": ":",
292 "end": "(?=;)",
293 "beginCaptures": {
294 "0": {
295 "name": "keyword.operator.rule-components.assignment.jison"
296 }
297 },
298 "patterns": [
299 {
300 "include": "#comments"
301 },
302 {
303 "include": "#quoted_strings"
304 },
305 {
306 "match": "(\\[)([[:alpha:]_](?:[\\w-]*\\w)?)(\\])",
307 "captures": {
308 "1": {
309 "name": "punctuation.definition.named-reference.begin.jison"
310 },
311 "2": {
312 "name": "entity.name.other.reference.jison"
313 },
314 "3": {
315 "name": "punctuation.definition.named-reference.end.jison"
316 }
317 }
318 },
319 {
320 "name": "meta.prec.jison",
321 "begin": "(%(prec))\\s*",
322 "end": "(?<=['\"])|(?=\\s)",
323 "beginCaptures": {
324 "1": {
325 "name": "keyword.other.$2.jison"
326 }
327 },
328 "patterns": [
329 {
330 "include": "#comments"
331 },
332 {
333 "include": "#quoted_strings"
334 },
335 {
336 "name": "constant.other.token.jison",
337 "begin": "(?=\\S)",
338 "end": "(?=\\s)"
339 }
340 ]
341 },
342 {
343 "name": "keyword.operator.rule-components.separator.jison",
344 "match": "\\|"
345 },
346 {
347 "name": "keyword.other.$0.jison",
348 "match": "\\b(?:EOF|error)\\b"
349 },
350 {
351 "name": "keyword.other.empty.jison",
352 "match": "(?:%(?:e(?:mpty|psilon))|\\b[Ɛɛεϵ])\\b"
353 },
354 {
355 "include": "#rule_actions"
356 }
357 ]
358 }
359 ]
360 }
361 ]
362 },
363 "epilogue_section": {
364 "patterns": [
365 {
366 "include": "#user_code_include_declarations"
367 },
368 {
369 "include": "source.js"
370 }
371 ]
372 },
373 "actions": {
374 "patterns": [
375 {
376 "name": "meta.action.jison",
377 "begin": "\\{\\{",
378 "end": "\\}\\}",
379 "beginCaptures": {
380 "0": {
381 "name": "punctuation.definition.action.begin.jison"
382 }
383 },
384 "endCaptures": {
385 "0": {
386 "name": "punctuation.definition.action.end.jison"
387 }
388 },
389 "contentName": "source.js.embedded.jison",
390 "patterns": [
391 {
392 "include": "source.js"
393 }
394 ]
395 },
396 {
397 "name": "meta.action.jison",
398 "begin": "(?=%\\{)",
399 "end": "(?<=%\\})",
400 "patterns": [
401 {
402 "include": "#user_code_blocks"
403 }
404 ]
405 }
406 ]
407 },
408 "rule_actions": {
409 "patterns": [
410 {
411 "include": "#actions"
412 },
413 {
414 "name": "meta.action.jison",
415 "begin": "\\{",
416 "end": "\\}",
417 "beginCaptures": {
418 "0": {
419 "name": "punctuation.definition.action.begin.jison"
420 }
421 },
422 "endCaptures": {
423 "0": {
424 "name": "punctuation.definition.action.end.jison"
425 }
426 },
427 "contentName": "source.js.embedded.jison",
428 "patterns": [
429 {
430 "include": "source.js"
431 }
432 ]
433 },
434 {
435 "include": "#include_declarations"
436 },
437 {
438 "name": "meta.action.jison",
439 "begin": "->|→",
440 "end": "$",
441 "beginCaptures": {
442 "0": {
443 "name": "punctuation.definition.action.arrow.jison"
444 }
445 },
446 "contentName": "source.js.embedded.jison",
447 "patterns": [
448 {
449 "include": "source.js"
450 }
451 ]
452 }
453 ]
454 },
455 "comments": {
456 "patterns": [
457 {
458 "name": "comment.line.double-slash.jison",
459 "begin": "//",
460 "end": "$",
461 "beginCaptures": {
462 "0": {
463 "name": "punctuation.definition.comment.jison"
464 }
465 }
466 },
467 {
468 "name": "comment.block.jison",
469 "begin": "/\\*",
470 "end": "\\*/",
471 "beginCaptures": {
472 "0": {
473 "name": "punctuation.definition.comment.begin.jison"
474 }
475 },
476 "endCaptures": {
477 "0": {
478 "name": "punctuation.definition.comment.end.jison"
479 }
480 }
481 }
482 ]
483 },
484 "include_declarations": {
485 "patterns": [
486 {
487 "name": "meta.include.jison",
488 "begin": "(%(include))\\s*",
489 "end": "(?<=['\"])|(?=\\s)",
490 "beginCaptures": {
491 "1": {
492 "name": "keyword.other.declaration.$2.jison"
493 }
494 },
495 "patterns": [
496 {
497 "include": "#include_paths"
498 }
499 ]
500 }
501 ]
502 },
503 "user_code_include_declarations": {
504 "patterns": [
505 {
506 "name": "meta.include.jison",
507 "begin": "^(%(include))\\s*",
508 "end": "(?<=['\"])|(?=\\s)",
509 "beginCaptures": {
510 "1": {
511 "name": "keyword.other.declaration.$2.jison"
512 }
513 },
514 "patterns": [
515 {
516 "include": "#include_paths"
517 }
518 ]
519 }
520 ]
521 },
522 "include_paths": {
523 "patterns": [
524 {
525 "include": "#quoted_strings"
526 },
527 {
528 "name": "string.unquoted.jison",
529 "begin": "(?=\\S)",
530 "end": "(?=\\s)",
531 "patterns": [
532 {
533 "include": "source.js#string_escapes"
534 }
535 ]
536 }
537 ]
538 },
539 "numbers": {
540 "patterns": [
541 {
542 "match": "(0[Xx])([0-9A-Fa-f]+)",
543 "captures": {
544 "1": {
545 "name": "storage.type.number.jison"
546 },
547 "2": {
548 "name": "constant.numeric.integer.hexadecimal.jison"
549 }
550 }
551 },
552 {
553 "name": "constant.numeric.integer.decimal.jison",
554 "match": "\\d+"
555 }
556 ]
557 },
558 "options_declarations": {
559 "patterns": [
560 {
561 "name": "meta.options.jison",
562 "begin": "%options\\b",
563 "end": "^(?=\\S|\\s*$)",
564 "beginCaptures": {
565 "0": {
566 "name": "keyword.other.options.jison"
567 }
568 },
569 "patterns": [
570 {
571 "include": "#comments"
572 },
573 {
574 "name": "entity.name.constant.jison",
575 "match": "\\b[[:alpha:]_](?:[\\w-]*\\w)?\\b"
576 },
577 {
578 "begin": "(=)\\s*",
579 "end": "(?<=['\"])|(?=\\s)",
580 "beginCaptures": {
581 "1": {
582 "name": "keyword.operator.option.assignment.jison"
583 }
584 },
585 "patterns": [
586 {
587 "include": "#comments"
588 },
589 {
590 "name": "constant.language.boolean.$1.jison",
591 "match": "\\b(true|false)\\b"
592 },
593 {
594 "include": "#numbers"
595 },
596 {
597 "include": "#quoted_strings"
598 },
599 {
600 "name": "string.unquoted.jison",
601 "match": "\\S+"
602 }
603 ]
604 },
605 {
606 "include": "#quoted_strings"
607 }
608 ]
609 }
610 ]
611 },
612 "quoted_strings": {
613 "patterns": [
614 {
615 "name": "string.quoted.double.jison",
616 "begin": "\"",
617 "end": "\"",
618 "patterns": [
619 {
620 "include": "source.js#string_escapes"
621 }
622 ]
623 },
624 {
625 "name": "string.quoted.single.jison",
626 "begin": "'",
627 "end": "'",
628 "patterns": [
629 {
630 "include": "source.js#string_escapes"
631 }
632 ]
633 }
634 ]
635 },
636 "user_code_blocks": {
637 "patterns": [
638 {
639 "name": "meta.user-code-block.jison",
640 "begin": "%\\{",
641 "end": "%\\}",
642 "beginCaptures": {
643 "0": {
644 "name": "punctuation.definition.user-code-block.begin.jison"
645 }
646 },
647 "endCaptures": {
648 "0": {
649 "name": "punctuation.definition.user-code-block.end.jison"
650 }
651 },
652 "contentName": "source.js.embedded.jison",
653 "patterns": [
654 {
655 "include": "source.js"
656 }
657 ]
658 }
659 ]
660 }
661 },
662 "injections": {
663 "L:(meta.action.jison - (comment | string)), source.js.embedded.jison - (comment | string), source.js.embedded.source - (comment | string.quoted.double | string.quoted.single)": {
664 "patterns": [
665 {
666 "name": "variable.language.semantic-value.jison",
667 "match": "\\${2}"
668 },
669 {
670 "name": "variable.language.result-location.jison",
671 "match": "@\\$"
672 },
673 {
674 "name": "variable.language.stack-index-0.jison",
675 "match": "##\\$|\\byysp\\b"
676 },
677 {
678 "name": "support.variable.token-reference.jison",
679 "match": "#\\S+#"
680 },
681 {
682 "name": "variable.language.result-id.jison",
683 "match": "#\\$"
684 },
685 {
686 "name": "support.variable.token-value.jison",
687 "match": "\\$(?:-?\\d+|[[:alpha:]_](?:[\\w-]*\\w)?)"
688 },
689 {
690 "name": "support.variable.token-location.jison",
691 "match": "@(?:-?\\d+|[[:alpha:]_](?:[\\w-]*\\w)?)"
692 },
693 {
694 "name": "support.variable.stack-index.jison",
695 "match": "##(?:-?\\d+|[[:alpha:]_](?:[\\w-]*\\w)?)"
696 },
697 {
698 "name": "support.variable.token-id.jison",
699 "match": "#(?:-?\\d+|[[:alpha:]_](?:[\\w-]*\\w)?)"
700 },
701 {
702 "name": "variable.language.jison",
703 "match": "\\byy(?:l(?:eng|ineno|oc|stack)|rulelength|s(?:tate|s?tack)|text|vstack)\\b"
704 },
705 {
706 "name": "keyword.other.jison",
707 "match": "\\byy(?:clearin|erro[kr])\\b"
708 }
709 ]
710 }
711 }
712 }
713