forked from mike-lischke/vscode-antlr4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
519 lines (519 loc) · 16.3 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
{
"name": "vscode-antlr4",
"displayName": "ANTLR4 grammar syntax support",
"description": "Language support for ANTLR4 grammar files",
"icon": "misc/antlr-logo.png",
"galleryBanner": {
"color": "#2789e1",
"theme": "dark"
},
"version": "2.0.4",
"publisher": "mike-lischke",
"license": "SEE LICENSE IN LICENSE.txt",
"repository": {
"type": "git",
"url": "https://github.com/mike-lischke/vscode-antlr4"
},
"bugs": {
"url": "https://github.com/mike-lischke/vscode-antlr4/issues"
},
"homepage": "http://www.soft-gems.net",
"engines": {
"vscode": "^1.23.0"
},
"categories": [
"Programming Languages",
"Debuggers"
],
"activationEvents": [
"onLanguage:antlr"
],
"main": "./out/src/extension",
"contributes": {
"languages": [
{
"id": "antlr",
"aliases": [
"ANTLR",
"antlr"
],
"extensions": [
".g",
".g4"
],
"firstLine": "^(lexer|parser)?\\s*grammar\\s*\\w+\\s*;",
"configuration": "./antlr.configuration.json"
}
],
"grammars": [
{
"language": "antlr",
"scopeName": "source.antlr",
"path": "./syntaxes/antlr.json"
}
],
"themes": [
{
"label": "Complete Dark",
"uiTheme": "vs-dark",
"path": "./themes/complete_dark.json"
},
{
"label": "Complete Light",
"uiTheme": "vs",
"path": "./themes/complete_light.json"
}
],
"configuration": {
"title": "ANTLR4 configuration",
"properties": {
"antlr4.referencesCodeLens.enabled": {
"type": "boolean",
"default": false,
"description": "Enable/disable the references code lens"
},
"antlr4.customcss": {
"type": [],
"default": [],
"description": "List of custom CSS URIs for diagram SVG files"
},
"antlr4.rrd.saveDir": {
"type": "string",
"default": "",
"description": "Default export target folder for railroad diagrams"
},
"antlr4.atn.saveDir": {
"type": "string",
"default": "",
"description": "Default export target folder for ATN SVG files"
},
"antlr4.atn.maxLabelCount": {
"type": "number",
"default": 3,
"description": "Max number of labels displayed on a transition in an ATN graph"
},
"antlr4.call-graph.saveDir": {
"type": "string",
"default": "",
"description": "Default export target folder for call graphs"
},
"antlr4.generation": {
"type": "object",
"default": {
"mode": "internal",
"language": "Java",
"listeners": true,
"visitors": false
},
"description": "Settings related to parser generation",
"properties": {
"mode": {
"type": "string",
"default": "internal",
"description": "Determines the mode for code generation (none at all, only for internal use, also for external use)",
"enum": [
"none",
"internal",
"external"
]
},
"outputDir": {
"type": "string",
"default": "",
"description": "Output dir where all output is generated (relative to grammar or absolute path)"
},
"importDir": {
"type": "string",
"default": "",
"description": "Location to import grammars from (relative to a grammar or absolute path)"
},
"package": {
"type": "string",
"default": "",
"description": "Package/namespace for generated code"
},
"language": {
"type": "string",
"default": "Java",
"description": "Specifies the target language for the generated code, overriding what is specified in the grammar"
},
"listeners": {
"type": "boolean",
"default": true,
"description": "Also create listeners on code generation"
},
"visitors": {
"type": "boolean",
"default": false,
"description": "Also create visitors on code generation"
}
}
},
"antlr4.format": {
"type": "object",
"default": {
"alignTrailingComments": false,
"allowShortBlocksOnASingleLine": true,
"breakBeforeBraces": false,
"columnLimit": 100,
"continuationIndentWidth": 4,
"indentWidth": 4,
"keepEmptyLinesAtTheStartOfBlocks": false,
"maxEmptyLinesToKeep": 1,
"reflowComments": true,
"spaceBeforeAssignmentOperators": true,
"tabWidth": 4,
"useTab": true,
"alignColons": "none",
"singleLineOverrulesHangingColon": true,
"allowShortRulesOnASingleLine": true,
"alignSemicolons": "none",
"breakBeforeParens": false,
"ruleInternalsOnSingleLine": false,
"minEmptyLines": 0,
"groupedAlignments": true,
"alignFirstTokens": false,
"alignLexerCommands": false,
"alignActions": false,
"alignLabels": true,
"alignTrailers": false
},
"description": "Settings related to code formatting",
"properties": {
"alignTrailingComments": {
"type": "boolean",
"default": false,
"description": "If true, aligns trailing comments"
},
"allowShortBlocksOnASingleLine": {
"type": "boolean",
"default": true,
"description": "Allows contracting short blocks to a single line"
},
"breakBeforeBraces": {
"type": "boolean",
"default": false,
"description": "When true start predicates and actions on a new line"
},
"columnLimit": {
"type": "number",
"default": 100,
"description": "The character count after which automatic line breaking takes place"
},
"continuationIndentWidth": {
"type": "number",
"default": 4,
"description": "Indentation for line continuation (only used if useTab is false)"
},
"indentWidth": {
"type": "number",
"default": 4,
"description": "Character count for indentation (if useTab is false)"
},
"keepEmptyLinesAtTheStartOfBlocks": {
"type": "boolean",
"default": false,
"description": "If true, empty lines at the start of blocks are kept"
},
"maxEmptyLinesToKeep": {
"type": "number",
"default": 1,
"description": "The maximum number of consecutive empty lines to keep"
},
"reflowComments": {
"type": "boolean",
"default": true,
"description": "Reformat comments to fit the column limit"
},
"spaceBeforeAssignmentOperators": {
"type": "boolean",
"default": true,
"description": "Enables spaces around operators"
},
"tabWidth": {
"type": "number",
"default": 4,
"description": "Multiples of this value determine tab stops in a document"
},
"useTab": {
"type": "boolean",
"default": true,
"description": "Use tabs for indentation"
},
"alignColons": {
"type": "string",
"default": "none",
"enum": [
"none",
"trailing",
"hanging"
],
"description": "Align colons among rules (scope depends on groupedAlignments)"
},
"singleLineOverrulesHangingColon": {
"type": "boolean",
"default": true,
"description": "Single line mode overrides hanging colon setting (applies also to alignSemicolons)"
},
"allowShortRulesOnASingleLine": {
"type": "boolean",
"default": true,
"description": "Allows contracting short rules on a single line (short: < 2/3 of columnLimit)"
},
"alignSemicolons": {
"type": "string",
"default": "none",
"enum": [
"none",
"ownLine",
"hanging"
],
"description": "Determines the alignment of semicolons in rules (no alignment, first column on an own line or aligned to pipe chars on an own line)"
},
"breakBeforeParens": {
"type": "boolean",
"default": false,
"description": "For blocks: if true puts opening parentheses on an own line"
},
"ruleInternalsOnSingleLine": {
"type": "boolean",
"default": false,
"description": "Place rule internals (return value, local variables, @init, @after) all on a single line"
},
"minEmptyLines": {
"type": "number",
"default": 0,
"description": "Determines the number of empty lines that must exist (between rules or other full statements)"
},
"groupedAlignments": {
"type": "boolean",
"default": true,
"description": "When true only consecutive lines are considered for alignments"
},
"alignFirstTokens": {
"type": "boolean",
"default": false,
"description": "Align the first token after the colon among rules"
},
"alignLexerCommands": {
"type": "boolean",
"default": false,
"description": "Align lexer commands (starting with ->) among rule"
},
"alignActions": {
"type": "boolean",
"default": false,
"description": "Align action blocks + predicates among rules and alternatives"
},
"alignLabels": {
"type": "boolean",
"default": true,
"description": "Align alt labels (only when a rule is not on a single line)"
},
"alignTrailers": {
"type": "boolean",
"default": false,
"description": "Combine all alignments (align whatever comes first: colons, comments etc.)"
}
}
},
"antlr4.debug": {
"type": "object",
"description": "Debugging related settings",
"default": {},
"properties": {}
}
}
},
"commands": [
{
"command": "antlr.atn.singleRule",
"title": "Show ATN Graph for Rule"
},
{
"command": "antlr.rrd.singleRule",
"title": "Show Railroad Diagram for Rule"
},
{
"command": "antlr.rrd.allRules",
"title": "Show Railroad Diagram for all Rules"
},
{
"command": "antlr.call-graph",
"title": "Show Grammar Call Graph"
},
{
"command": "antlr.tools.generateSentences",
"title": "Generate Sentences From Grammar"
},
{
"command": "antlr.tools.startGREPL",
"title": "Open Grammar REPL console "
}
],
"menus": {
"explorer/context": [],
"editor/title/context": [
{
"when": "resourceLangId == antlr",
"command": "antlr.rrd.allRules",
"group": "antlr@1"
}
],
"editor/title": [
{
"when": "resourceLangId == antlr",
"command": "antlr.rrd.allRules",
"group": "antlr@1"
}
],
"editor/context": [
{
"when": "resourceLangId == antlr",
"command": "antlr.rrd.singleRule",
"group": "antlr@1"
},
{
"when": "resourceLangId == antlr",
"command": "antlr.rrd.allRules",
"group": "antlr@2"
},
{
"when": "resourceLangId == antlr",
"command": "antlr.atn.singleRule",
"group": "antlr@3"
},
{
"when": "resourceLangId == antlr",
"command": "antlr.call-graph",
"group": "antlr@4"
},
{
"when": "resourceLangId == antlr",
"command": "antlr.tools.startGREPL",
"group": "antlr@5"
}
]
},
"views": {
"explorer": [
{
"id": "antlr4.imports",
"name": "Grammar Dependencies",
"when": "resourceLangId == 'antlr'"
}
],
"debug": [
{
"id": "antlr4.lexerSymbols",
"name": "Lexer Tokens"
},
{
"id": "antlr4.parserSymbols",
"name": "Parser Rules"
},
{
"id": "antlr4.channels",
"name": "Token channels"
},
{
"id": "antlr4.modes",
"name": "Lexer modes"
}
]
},
"breakpoints": [
{
"language": "antlr"
}
],
"debuggers": [
{
"type": "antlr-debug",
"label": "ANTLR4 Debug",
"runtime": "node",
"configurationAttributes": {
"launch": {
"required": [
"input"
],
"properties": {
"input": {
"type": "string",
"description": "Absolute path to a text file containing test input to parse.",
"default": "${workspaceFolder}/${command:AskForTestInput}"
},
"startRule": {
"type": "string",
"description": "The name of the rule to be used as entry point. If none is given the rule with index 0 is used.",
"default": ""
},
"grammar": {
"type": "string",
"description": "The path to a grammar to debug. Leave empty to debug the grammar in the active editor.",
"default": null
},
"trace": {
"type": "boolean",
"description": "Log internal debugger messages to debug console.",
"default": false
},
"printParseTree": {
"type": "boolean",
"description": "Print the textual parse tree in the debug console",
"default": true
},
"visualParseTree": {
"type": "boolean",
"description": "Show a visual parse tree during debug",
"default": true
}
}
}
},
"configurationSnippets": [
{
"label": "ANTLR: Parse",
"description": "A new configuration for parsing with a grammar.",
"body": {
"type": "antlr-debug",
"request": "launch",
"name": "${2:Run Parser}",
"input": "^\"\\${workspaceFolder}/${1:Input}\"",
"visualParseTree": true
}
}
],
"variables": {
"AskForTestInput": "antlr.getTestInputName"
}
}
]
},
"scripts": {
"postinstall": "node ./node_modules/vscode/bin/install",
"publish": "vsce publish",
"test": "tsc && mocha ./out/test/backend/test.js"
},
"dependencies": {
"antlr4-c3": "^1.1.8",
"antlr4ts": "^0.4.1-alpha.0",
"await-notify": "^1.0.1",
"d3": "^5.5.0",
"fs-extra": "^6.0.1",
"vscode-debugadapter": "^1.29.0",
"vscode-debugprotocol": "^1.29.0"
},
"devDependencies": {
"@types/chai": "^4.1.3",
"@types/d3": "^4.13.0",
"@types/fs-extra": "^5.0.2",
"@types/glob": "^5.0.35",
"@types/mocha": "^2.2.48",
"@types/node": "^8.10.12",
"chai": "^4.1.2",
"mocha": "^4.1.0",
"typescript": "^2.9.2",
"vscode": "^1.1.18"
}
}