-
Notifications
You must be signed in to change notification settings - Fork 6
/
format.json
47 lines (46 loc) · 2.03 KB
/
format.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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Picireny input format definition.",
"type": "object",
"properties": {
"start": {
"description": "Name of start rule optionally prefixed with a grammar name (specified as [grammarname:]rulename).",
"type": "string"
},
"grammars": {
"description": "Grammar descriptions mapped to (freely chosen) grammar names.",
"type": "object",
"patternProperties": {
".*": {
"description": "Grammar description.",
"type": "object",
"properties": {
"files": {
"description": "List of ANTLR grammar files.",
"type": "array",
"items": {
"description": "Grammar file (resolved relative to the location of the input format definition).",
"type": "string"
},
"minItems": 1
},
"islands": {
"description": "Regex patterns mapped to names of tokens of the described grammar.",
"type": "object",
"patternProperties": {
".*": {
"description": "Regex pattern matched on token instances (named capture groups define those parts of the token, which should be parsed with a rule of an island grammar, specified as [grammarname:]rulename).",
"type": "string"
}
}
},
"replacements": {
"$ref": "replacements.json"
}
},
"required": [ "files" ]
}
}
}
}
}