github-linguist 4.8.16 → 4.8.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/source.abnf.json +455 -0
- data/grammars/source.c.json +0 -4
- data/grammars/source.ebnf.json +209 -0
- data/grammars/source.js.json +7 -7
- data/grammars/source.perl.json +1 -1
- data/grammars/source.swift.json +6 -6
- data/grammars/source.viml.json +1 -1
- data/lib/linguist/generated.rb +9 -0
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +25 -0
- data/lib/linguist/samples.json +2703 -831
- data/lib/linguist/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8ce746a6be5b7d4606094ebfeb1a13f783adee1
|
4
|
+
data.tar.gz: 8683257aa7cfb0b35d4295f028d5aa27e9da1687
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2e95d89d9c8c18b554071c17d3c36589c998016ef7defb951a89ba0b4664c6f465b9c8c9982a517fa0ff2fa56da89630fe14aacf981498a8b7ed95b5ee4984c
|
7
|
+
data.tar.gz: 06938cd06e041b740d12777164fd03af5dd5182170459a4600d2c593f48de89c2ea2a7df5bba006301720bb8a2272425aa9d9846aa3c939bca926144ddcdf696
|
@@ -0,0 +1,455 @@
|
|
1
|
+
{
|
2
|
+
"fileTypes": [
|
3
|
+
"abnf"
|
4
|
+
],
|
5
|
+
"keyEquivalent": "^~A",
|
6
|
+
"name": "ABNF",
|
7
|
+
"patterns": [
|
8
|
+
{
|
9
|
+
"include": "#comment"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"include": "#rule"
|
13
|
+
}
|
14
|
+
],
|
15
|
+
"repository": {
|
16
|
+
"comment": {
|
17
|
+
"begin": "(?:(?<leading-whitespace>^[ \\t]*)|[ \\t]*)(?=;\\p{Print}*$)",
|
18
|
+
"beginCaptures": {
|
19
|
+
"leading-whitespace": {
|
20
|
+
"name": "punctuation.whitespace.comment.leading.abnf"
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"end": "(?!\\G)",
|
24
|
+
"patterns": [
|
25
|
+
{
|
26
|
+
"include": "#comment-line"
|
27
|
+
}
|
28
|
+
]
|
29
|
+
},
|
30
|
+
"comment-line": {
|
31
|
+
"begin": ";",
|
32
|
+
"beginCaptures": {
|
33
|
+
"0": {
|
34
|
+
"name": "punctuation.definition.comment.abnf"
|
35
|
+
}
|
36
|
+
},
|
37
|
+
"comment": "A line comment starts with a `;` sign and continues to the \n end of the line.",
|
38
|
+
"end": "\\n",
|
39
|
+
"name": "comment.line.semicolon.abnf"
|
40
|
+
},
|
41
|
+
"constant": {
|
42
|
+
"patterns": [
|
43
|
+
{
|
44
|
+
"include": "#constant-decimal"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"include": "#constant-hex"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"include": "#constant-binary"
|
51
|
+
}
|
52
|
+
]
|
53
|
+
},
|
54
|
+
"constant-binary": {
|
55
|
+
"captures": {
|
56
|
+
"dash": {
|
57
|
+
"name": "keyword.operator.range.abnf"
|
58
|
+
},
|
59
|
+
"last": {
|
60
|
+
"patterns": [
|
61
|
+
{
|
62
|
+
"include": "#digit-binary"
|
63
|
+
}
|
64
|
+
]
|
65
|
+
},
|
66
|
+
"number": {
|
67
|
+
"patterns": [
|
68
|
+
{
|
69
|
+
"include": "#digit-binary"
|
70
|
+
}
|
71
|
+
]
|
72
|
+
},
|
73
|
+
"numbers-concat": {
|
74
|
+
"patterns": [
|
75
|
+
{
|
76
|
+
"include": "#digits-binary-concatenation"
|
77
|
+
}
|
78
|
+
]
|
79
|
+
}
|
80
|
+
},
|
81
|
+
"match": "(?x)%b\n # First number\n (?<number>[^\\s.-]+) \n # Optional \n # - dash followed by last number of range, or\n # - sequence of additional numbers separated by dot\n (?:(?:(?=-)(?<dash>-)(?<last>\\w+)) |\n (?<numbers-concat>[\\w.]+))?",
|
82
|
+
"name": "constant.numeric.binary.abnf"
|
83
|
+
},
|
84
|
+
"constant-decimal": {
|
85
|
+
"captures": {
|
86
|
+
"dash": {
|
87
|
+
"name": "keyword.operator.range.abnf"
|
88
|
+
},
|
89
|
+
"last": {
|
90
|
+
"patterns": [
|
91
|
+
{
|
92
|
+
"include": "#digit-decimal"
|
93
|
+
}
|
94
|
+
]
|
95
|
+
},
|
96
|
+
"number": {
|
97
|
+
"patterns": [
|
98
|
+
{
|
99
|
+
"include": "#digit-decimal"
|
100
|
+
}
|
101
|
+
]
|
102
|
+
},
|
103
|
+
"numbers-concat": {
|
104
|
+
"patterns": [
|
105
|
+
{
|
106
|
+
"include": "#digits-decimal-concatenation"
|
107
|
+
}
|
108
|
+
]
|
109
|
+
}
|
110
|
+
},
|
111
|
+
"match": "(?x)%d\n (?<number>[^\\s.-]+)\n (?:(?:(?=-)(?<dash>-)(?<last>\\w+)) |\n (?<numbers-concat>[\\w.]+))?",
|
112
|
+
"name": "constant.numeric.decimal.abnf"
|
113
|
+
},
|
114
|
+
"constant-hex": {
|
115
|
+
"captures": {
|
116
|
+
"dash": {
|
117
|
+
"name": "keyword.operator.range.abnf"
|
118
|
+
},
|
119
|
+
"last": {
|
120
|
+
"patterns": [
|
121
|
+
{
|
122
|
+
"include": "#digit-hex"
|
123
|
+
}
|
124
|
+
]
|
125
|
+
},
|
126
|
+
"number": {
|
127
|
+
"patterns": [
|
128
|
+
{
|
129
|
+
"include": "#digit-hex"
|
130
|
+
}
|
131
|
+
]
|
132
|
+
},
|
133
|
+
"numbers-concat": {
|
134
|
+
"patterns": [
|
135
|
+
{
|
136
|
+
"include": "#digits-hex-concatenation"
|
137
|
+
}
|
138
|
+
]
|
139
|
+
}
|
140
|
+
},
|
141
|
+
"match": "(?x)%x\n (?<number>[^\\s.-]+)\n (?:(?:(?=-)(?<dash>-)(?<last>\\w+)) |\n (?<numbers-concat>[\\w.]+))?",
|
142
|
+
"name": "constant.numeric.hex.abnf"
|
143
|
+
},
|
144
|
+
"digit-binary": {
|
145
|
+
"patterns": [
|
146
|
+
{
|
147
|
+
"include": "#digit-binary-valid"
|
148
|
+
},
|
149
|
+
{
|
150
|
+
"include": "#digit-binary-invalid"
|
151
|
+
}
|
152
|
+
]
|
153
|
+
},
|
154
|
+
"digit-binary-invalid": {
|
155
|
+
"match": "\\S",
|
156
|
+
"name": "invalid.illegal.digit.binary.abnf"
|
157
|
+
},
|
158
|
+
"digit-binary-valid": {
|
159
|
+
"match": "[01]"
|
160
|
+
},
|
161
|
+
"digit-decimal": {
|
162
|
+
"patterns": [
|
163
|
+
{
|
164
|
+
"include": "#digit-decimal-valid"
|
165
|
+
},
|
166
|
+
{
|
167
|
+
"include": "#digit-decimal-invalid"
|
168
|
+
}
|
169
|
+
]
|
170
|
+
},
|
171
|
+
"digit-decimal-invalid": {
|
172
|
+
"match": "\\S",
|
173
|
+
"name": "invalid.illegal.digit.decimal.abnf"
|
174
|
+
},
|
175
|
+
"digit-decimal-valid": {
|
176
|
+
"match": "\\d"
|
177
|
+
},
|
178
|
+
"digit-hex": {
|
179
|
+
"patterns": [
|
180
|
+
{
|
181
|
+
"include": "#digit-hex-valid"
|
182
|
+
},
|
183
|
+
{
|
184
|
+
"include": "#digit-hex-invalid"
|
185
|
+
}
|
186
|
+
]
|
187
|
+
},
|
188
|
+
"digit-hex-invalid": {
|
189
|
+
"match": "\\S",
|
190
|
+
"name": "invalid.illegal.digit.hex.abnf"
|
191
|
+
},
|
192
|
+
"digit-hex-valid": {
|
193
|
+
"match": "\\h"
|
194
|
+
},
|
195
|
+
"digits-binary-concatenation": {
|
196
|
+
"captures": {
|
197
|
+
"dot": {
|
198
|
+
"name": "keyword.operator.concatenation.abnf"
|
199
|
+
},
|
200
|
+
"number": {
|
201
|
+
"patterns": [
|
202
|
+
{
|
203
|
+
"include": "#digit-binary"
|
204
|
+
}
|
205
|
+
]
|
206
|
+
}
|
207
|
+
},
|
208
|
+
"match": "(?<dot>\\.)(?<number>[^\\s.]+)"
|
209
|
+
},
|
210
|
+
"digits-decimal-concatenation": {
|
211
|
+
"captures": {
|
212
|
+
"dot": {
|
213
|
+
"name": "keyword.operator.concatenation.abnf"
|
214
|
+
},
|
215
|
+
"number": {
|
216
|
+
"patterns": [
|
217
|
+
{
|
218
|
+
"include": "#digit-decimal"
|
219
|
+
}
|
220
|
+
]
|
221
|
+
}
|
222
|
+
},
|
223
|
+
"match": "(?<dot>\\.)(?<number>[^\\s.]+)"
|
224
|
+
},
|
225
|
+
"digits-hex-concatenation": {
|
226
|
+
"captures": {
|
227
|
+
"dot": {
|
228
|
+
"name": "keyword.operator.concatenation.abnf"
|
229
|
+
},
|
230
|
+
"number": {
|
231
|
+
"patterns": [
|
232
|
+
{
|
233
|
+
"include": "#digit-hex"
|
234
|
+
}
|
235
|
+
]
|
236
|
+
}
|
237
|
+
},
|
238
|
+
"match": "(?<dot>\\.)(?<number>[^\\s.]+)"
|
239
|
+
},
|
240
|
+
"operator-alternative": {
|
241
|
+
"match": "/",
|
242
|
+
"name": "keyword.operator.alternative.abnf"
|
243
|
+
},
|
244
|
+
"operator-definition": {
|
245
|
+
"patterns": [
|
246
|
+
{
|
247
|
+
"include": "#operator-equal-alternative"
|
248
|
+
},
|
249
|
+
{
|
250
|
+
"include": "#operator-equal"
|
251
|
+
}
|
252
|
+
]
|
253
|
+
},
|
254
|
+
"operator-equal": {
|
255
|
+
"match": "=",
|
256
|
+
"name": "keyword.operator.equal.abnf"
|
257
|
+
},
|
258
|
+
"operator-equal-alternative": {
|
259
|
+
"match": "=/",
|
260
|
+
"name": "keyword.operator.equal-alternative.abnf"
|
261
|
+
},
|
262
|
+
"rule": {
|
263
|
+
"begin": "(?x)^(\\s*)\n # We match the name of the rule and all following whitespace \n # characters. We use the additional whitespace to catch a \n # missing closing angle bracket.\n (?<name>\\S+\\s+)\n # The definition operator follows after the rule name.\n (?<operator>\\S+)\n ",
|
264
|
+
"captures": {
|
265
|
+
"name": {
|
266
|
+
"name": "entity.name.function.abnf",
|
267
|
+
"patterns": [
|
268
|
+
{
|
269
|
+
"include": "#rule-name"
|
270
|
+
}
|
271
|
+
]
|
272
|
+
},
|
273
|
+
"operator": {
|
274
|
+
"patterns": [
|
275
|
+
{
|
276
|
+
"include": "#operator-definition"
|
277
|
+
},
|
278
|
+
{
|
279
|
+
"match": "\\S+",
|
280
|
+
"name": "invalid.illegal.operator.abnf"
|
281
|
+
}
|
282
|
+
]
|
283
|
+
}
|
284
|
+
},
|
285
|
+
"comment": "A rule start with a possibly empty sequence of whitespace. The \n rule continues if the next line starts with at least one more\n whitespace character than the initial line of the rule.",
|
286
|
+
"name": "meta.rule.abnf",
|
287
|
+
"patterns": [
|
288
|
+
{
|
289
|
+
"include": "#rule-right-side"
|
290
|
+
}
|
291
|
+
],
|
292
|
+
"while": "^(?=\\1\\s)"
|
293
|
+
},
|
294
|
+
"rule-group": {
|
295
|
+
"begin": "\\(",
|
296
|
+
"captures": {
|
297
|
+
"0": {
|
298
|
+
"name": "keyword.other.group.abnf"
|
299
|
+
}
|
300
|
+
},
|
301
|
+
"end": "\\)",
|
302
|
+
"name": "meta.rule.group.abnf",
|
303
|
+
"patterns": [
|
304
|
+
{
|
305
|
+
"include": "#rule-right-side"
|
306
|
+
}
|
307
|
+
]
|
308
|
+
},
|
309
|
+
"rule-name": {
|
310
|
+
"patterns": [
|
311
|
+
{
|
312
|
+
"include": "#rule-name-angle-brackets"
|
313
|
+
},
|
314
|
+
{
|
315
|
+
"include": "#rule-name-plain"
|
316
|
+
}
|
317
|
+
]
|
318
|
+
},
|
319
|
+
"rule-name-angle-brackets": {
|
320
|
+
"begin": "<",
|
321
|
+
"captures": {
|
322
|
+
"0": {
|
323
|
+
"name": "keyword.other.angle-bracket.abnf"
|
324
|
+
}
|
325
|
+
},
|
326
|
+
"comment": "Angle brackets may be used around a rule name.",
|
327
|
+
"end": ">|(\\s)",
|
328
|
+
"endCaptures": {
|
329
|
+
"0": {
|
330
|
+
"name": "keyword.other.angle-bracket.abnf"
|
331
|
+
},
|
332
|
+
"1": {
|
333
|
+
"name": "invalid.illegal.missing.angle-bracket.abnf"
|
334
|
+
}
|
335
|
+
},
|
336
|
+
"name": "variable.other.rule",
|
337
|
+
"patterns": [
|
338
|
+
{
|
339
|
+
"include": "#rule-name"
|
340
|
+
}
|
341
|
+
]
|
342
|
+
},
|
343
|
+
"rule-name-core": {
|
344
|
+
"captures": {
|
345
|
+
"rule": {
|
346
|
+
"name": "support.constant.core-rule.$1.abnf"
|
347
|
+
}
|
348
|
+
},
|
349
|
+
"match": "(?x)\\b(?<rule>\n ALPHA |\n BIT |\n CHAR |\n CR(?:LF)? | \n CTL |\n DIGIT |\n DQUOTE |\n HEXDIG |\n HTAB |\n LF |\n LWSP |\n OCTECT |\n SP |\n VCHAR |\n WSP \n )\\b"
|
350
|
+
},
|
351
|
+
"rule-name-plain": {
|
352
|
+
"captures": {
|
353
|
+
"invalid": {
|
354
|
+
"name": "invalid.illegal.character.abnf"
|
355
|
+
}
|
356
|
+
},
|
357
|
+
"comment": "The name of a rule is a sequence of characters, beginning \n with an alphabetic character, and followed by a combination of \n alphabetic characters, digits, and hyphens (dashes)",
|
358
|
+
"match": "[a-zA-Z][a-zA-Z0-9\\-]*|(?<invalid>\\S)",
|
359
|
+
"name": "variable.other.rule.abnf"
|
360
|
+
},
|
361
|
+
"rule-optional": {
|
362
|
+
"begin": "\\[",
|
363
|
+
"captures": {
|
364
|
+
"0": {
|
365
|
+
"name": "keyword.other.optional.abnf"
|
366
|
+
}
|
367
|
+
},
|
368
|
+
"end": "\\]",
|
369
|
+
"name": "meta.rule.optional.abnf",
|
370
|
+
"patterns": [
|
371
|
+
{
|
372
|
+
"include": "#rule-right-side"
|
373
|
+
}
|
374
|
+
]
|
375
|
+
},
|
376
|
+
"rule-right-side": {
|
377
|
+
"patterns": [
|
378
|
+
{
|
379
|
+
"include": "#rule-group"
|
380
|
+
},
|
381
|
+
{
|
382
|
+
"include": "#rule-optional"
|
383
|
+
},
|
384
|
+
{
|
385
|
+
"include": "#variable-repetition"
|
386
|
+
},
|
387
|
+
{
|
388
|
+
"include": "#operator-alternative"
|
389
|
+
},
|
390
|
+
{
|
391
|
+
"include": "#comment"
|
392
|
+
},
|
393
|
+
{
|
394
|
+
"include": "#constant"
|
395
|
+
},
|
396
|
+
{
|
397
|
+
"include": "#string-double-quoted"
|
398
|
+
},
|
399
|
+
{
|
400
|
+
"include": "#rule-name-core"
|
401
|
+
},
|
402
|
+
{
|
403
|
+
"include": "#rule-name"
|
404
|
+
}
|
405
|
+
]
|
406
|
+
},
|
407
|
+
"string-double-quoted": {
|
408
|
+
"patterns": [
|
409
|
+
{
|
410
|
+
"include": "#string-double-quoted-case-insensitive"
|
411
|
+
},
|
412
|
+
{
|
413
|
+
"include": "#string-double-quoted-case-sensitive"
|
414
|
+
}
|
415
|
+
]
|
416
|
+
},
|
417
|
+
"string-double-quoted-case-insensitive": {
|
418
|
+
"begin": "(?<operator>%i)?\"",
|
419
|
+
"captures": {
|
420
|
+
"operator": {
|
421
|
+
"name": "keyword.operator.case-insensitive.abnf"
|
422
|
+
}
|
423
|
+
},
|
424
|
+
"end": "\"",
|
425
|
+
"name": "string.quoted.double.case-insensitive.abnf"
|
426
|
+
},
|
427
|
+
"string-double-quoted-case-sensitive": {
|
428
|
+
"begin": "(?<operator>%s)\"",
|
429
|
+
"captures": {
|
430
|
+
"operator": {
|
431
|
+
"name": "keyword.operator.case-insensitive.abnf"
|
432
|
+
}
|
433
|
+
},
|
434
|
+
"end": "\"",
|
435
|
+
"name": "string.quoted.double.case-sensitive.abnf"
|
436
|
+
},
|
437
|
+
"variable-repetition": {
|
438
|
+
"captures": {
|
439
|
+
"max": {
|
440
|
+
"name": "constant.numeric.decimal.$max.abnf"
|
441
|
+
},
|
442
|
+
"min": {
|
443
|
+
"name": "constant.numeric.decimal.$min.abnf"
|
444
|
+
},
|
445
|
+
"repetition": {
|
446
|
+
"name": "keyword.operator.repetition.abnf"
|
447
|
+
}
|
448
|
+
},
|
449
|
+
"comment": "Variable repetition uses the syntax\n\n - <min>*<max>element or\n - <repetition>element\n\n , where element is an ABNF element such as a group or a\n (sub)rule. the parts in angle brackets specify a decimal\n number. Both <min> and <max> are optional.",
|
450
|
+
"match": "(?x)\n # Repetition\n (?:(?<min>\\d*)(?<repetition>\\*)(?<max>\\d*) |\n (?<max>\\d+))\n # Followed by ABNF element\n (?=[a-zA-Z(\"])"
|
451
|
+
}
|
452
|
+
},
|
453
|
+
"scopeName": "source.abnf",
|
454
|
+
"uuid": "7E104F42-A7B3-47CE-AE6E-D55E62C4D5E0"
|
455
|
+
}
|