-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.str
48 lines (41 loc) · 1.15 KB
/
example.str
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
/* regex pseudogrammar
SOURCE -> ELEMENT (SEPARATOR ELEMENT)* | PAIR (SEPARATOR PAIR)*
STRUCTURE -> ARRAY | MAP
PRIMITIVE -> NULL | BOOLEAN | INTEGER | FLOAT | STRING
ELEMENT -> PRIMITIVE | PAIR | STRUCTURE
INTEGER -> (+|-)?\d+
FLOAT -> \d+"."\d+
BOOLEAN -> false | true
NULL -> null
STRING -> (?<d>DELIMITER) (SUBSTRING | ESCAPE)* d | STRING_CHARACTER ([\s[^\n]]* STRING_CHARACTER)*
PAIR -> ELEMENT = ELEMENT | STRING STRUCTURE
MAP_PAIR -> PRIMITIVE (= ELEMENT | STRUCTURE)
ARRAY -> "[" (ELEMENT (SEPARATOR ELEMENT)*)? "]"
MAP -> "{" (PAIR (SEPARATOR MAP_PAIR)*)? "}"
SUBSTRING -> (?s) .+
ESCAPE -> "\".
STRING_CHARACTER -> [^]\[{}=\s,]
DELIMITER -> ["'`]{1|3,}
SEPARATOR -> [\n,]
*/
/* an example /* nested */ comment */
buildscript {
dependencies {
classpath = [net.example:old-gradle-plugin:1.2.3]
}
}
name = Structured Properties
version = 1.2.3
description = '
Structured Properties supports
multi-line strings
'
repositories [
mavenCentral
~/.m2/repository ## the local repository
https://repo.maven.apache.org/maven2/
]
dependencies {
implementation = [gradleApi, org.ow2.asm:asm:9.0-SNAPSHOT]
testImplementation = org.junit.jupiter:junit-jupiter:5.8.0
}