-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjsony.pgx.yaml
110 lines (110 loc) · 2.46 KB
/
jsony.pgx.yaml
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
---
+grammar: jsony
+toprule: jsony
+version: 0.0.1
EOL:
.rgx: \r?\n
_:
.rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*
bare:
.rgx: ([^\s\{\}\[\]'",]*[^\s\{\}\[\]'",:])
comment:
.rgx: (?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n)
double:
.rgx: '"((?:\\(?:["\\/bfnrt]|u[0-9a-fA-F]{4})|[^"\x00-\x1f])*)"'
jsony:
.any:
- .ref: seq
- .ref: map
- .ref: top_seq
- .ref: top_map
- .ref: list
list:
+max: 1
.all:
- .ref: node
- +min: 0
-flat: 1
.all:
- .rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*,?(?:\s|(?:\#\ .*\r?\n|\#\r?\n|\
*\r?\n))*
- .ref: node
- +max: 1
.rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*,?(?:\s|(?:\#\ .*\r?\n|\#\r?\n|\
*\r?\n))*
map:
.all:
- .rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*\{(?:\s|(?:\#\ .*\r?\n|\#\r?\n|\
*\r?\n))*
- +min: 0
.ref: pair
- .rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*\}(?:\s|(?:\#\ .*\r?\n|\#\r?\n|\
*\r?\n))*
node:
.any:
- .ref: map
- .ref: seq
- .ref: scalar
pair:
.all:
- .ref: string
- .rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*:?(?:\s|(?:\#\ .*\r?\n|\#\r?\n|\
*\r?\n))*
- .ref: node
- .rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*,?(?:\s|(?:\#\ .*\r?\n|\#\r?\n|\
*\r?\n))*
scalar:
.any:
- .ref: double
- .ref: single
- .ref: bare
seq:
.all:
- .rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*\[(?:\s|(?:\#\ .*\r?\n|\#\r?\n|\
*\r?\n))*
- +max: 1
.all:
- .ref: node
- +min: 0
-flat: 1
.all:
- .rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*,?(?:\s|(?:\#\ .*\r?\n|\#\r?\n|\
*\r?\n))*
- .ref: node
- +max: 1
.rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*,?(?:\s|(?:\#\ .*\r?\n|\#\r?\n|\
*\r?\n))*
- .rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*\](?:\s|(?:\#\ .*\r?\n|\#\r?\n|\
*\r?\n))*
single:
.rgx: '''([^'']*)'''
string:
.ref: scalar
top_map:
+min: 1
.all:
- .ref: string
- .rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*:(?:\s|(?:\#\ .*\r?\n|\#\r?\n|\
*\r?\n))*
- .ref: node
- .ref: _
top_seq:
+min: 1
.ref: top_seq_entry
top_seq_entry:
.all:
- .rgx: (?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*\-\ +
- .all:
- +max: 1
.all:
- .ref: node
- +min: 0
-flat: 1
.all:
- .rgx: (?:\ *,\ *\r?\n(?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*|\ +)
- .ref: node
- +max: 1
.rgx: (?:\ *,\ *\r?\n(?:\s|(?:\#\ .*\r?\n|\#\r?\n|\ *\r?\n))*|\ +)
- .any:
- .ref: comment
- .ref: EOL