@redocly/respect-core 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/modules/runtime-expressions/{abnf-parser.cjs → abnf-parser.js} +693 -631
- package/lib/modules/runtime-expressions/index.d.ts +1 -0
- package/lib/modules/runtime-expressions/index.d.ts.map +1 -1
- package/lib/modules/runtime-expressions/index.js +3 -0
- package/lib/modules/runtime-expressions/index.js.map +1 -1
- package/lib/modules/runtime-expressions/lint.d.ts.map +1 -1
- package/lib/modules/runtime-expressions/lint.js +2 -4
- package/lib/modules/runtime-expressions/lint.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
* Generated by PEG.js 0.10.0.
|
|
3
|
-
*
|
|
4
|
-
* http://pegjs.org/
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
"use strict";
|
|
1
|
+
// Generated by PEG.js v0.11.0-master.b7b87ea, https://pegjs.org/
|
|
8
2
|
|
|
9
3
|
function peg$subclass(child, parent) {
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
child.prototype = new
|
|
4
|
+
function C() { this.constructor = child; }
|
|
5
|
+
C.prototype = parent.prototype;
|
|
6
|
+
child.prototype = new C();
|
|
13
7
|
}
|
|
14
8
|
|
|
15
9
|
function peg$SyntaxError(message, expected, found, location) {
|
|
16
|
-
this.message
|
|
10
|
+
this.message = message;
|
|
17
11
|
this.expected = expected;
|
|
18
|
-
this.found
|
|
12
|
+
this.found = found;
|
|
19
13
|
this.location = location;
|
|
20
|
-
this.name
|
|
14
|
+
this.name = "SyntaxError";
|
|
21
15
|
|
|
16
|
+
// istanbul ignore next
|
|
22
17
|
if (typeof Error.captureStackTrace === "function") {
|
|
23
18
|
Error.captureStackTrace(this, peg$SyntaxError);
|
|
24
19
|
}
|
|
@@ -26,37 +21,38 @@ function peg$SyntaxError(message, expected, found, location) {
|
|
|
26
21
|
|
|
27
22
|
peg$subclass(peg$SyntaxError, Error);
|
|
28
23
|
|
|
29
|
-
peg$SyntaxError.buildMessage = function(expected, found) {
|
|
24
|
+
peg$SyntaxError.buildMessage = function(expected, found, location) {
|
|
30
25
|
var DESCRIBE_EXPECTATION_FNS = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"class": function(expectation) {
|
|
36
|
-
var escapedParts = "",
|
|
37
|
-
i;
|
|
38
|
-
|
|
39
|
-
for (i = 0; i < expectation.parts.length; i++) {
|
|
40
|
-
escapedParts += expectation.parts[i] instanceof Array
|
|
41
|
-
? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1])
|
|
42
|
-
: classEscape(expectation.parts[i]);
|
|
43
|
-
}
|
|
26
|
+
literal: function(expectation) {
|
|
27
|
+
return "\"" + literalEscape(expectation.text) + "\"";
|
|
28
|
+
},
|
|
44
29
|
|
|
45
|
-
|
|
46
|
-
|
|
30
|
+
class: function(expectation) {
|
|
31
|
+
var escapedParts = expectation.parts.map(function(part) {
|
|
32
|
+
return Array.isArray(part)
|
|
33
|
+
? classEscape(part[0]) + "-" + classEscape(part[1])
|
|
34
|
+
: classEscape(part);
|
|
35
|
+
});
|
|
47
36
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
37
|
+
return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
|
|
38
|
+
},
|
|
51
39
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
40
|
+
any: function() {
|
|
41
|
+
return "any character";
|
|
42
|
+
},
|
|
55
43
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
44
|
+
end: function() {
|
|
45
|
+
return "end of input";
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
other: function(expectation) {
|
|
49
|
+
return expectation.description;
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
not: function(expectation) {
|
|
53
|
+
return "not " + describeExpectation(expectation.expected);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
60
56
|
|
|
61
57
|
function hex(ch) {
|
|
62
58
|
return ch.charCodeAt(0).toString(16).toUpperCase();
|
|
@@ -64,28 +60,28 @@ peg$SyntaxError.buildMessage = function(expected, found) {
|
|
|
64
60
|
|
|
65
61
|
function literalEscape(s) {
|
|
66
62
|
return s
|
|
67
|
-
.replace(/\\/g,
|
|
68
|
-
.replace(/"/g,
|
|
69
|
-
.replace(/\0/g,
|
|
70
|
-
.replace(/\t/g,
|
|
71
|
-
.replace(/\n/g,
|
|
72
|
-
.replace(/\r/g,
|
|
73
|
-
.replace(/[\x00-\x0F]/g, function(ch) { return
|
|
74
|
-
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return
|
|
63
|
+
.replace(/\\/g, "\\\\")
|
|
64
|
+
.replace(/"/g, "\\\"")
|
|
65
|
+
.replace(/\0/g, "\\0")
|
|
66
|
+
.replace(/\t/g, "\\t")
|
|
67
|
+
.replace(/\n/g, "\\n")
|
|
68
|
+
.replace(/\r/g, "\\r")
|
|
69
|
+
.replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); })
|
|
70
|
+
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); });
|
|
75
71
|
}
|
|
76
72
|
|
|
77
73
|
function classEscape(s) {
|
|
78
74
|
return s
|
|
79
|
-
.replace(/\\/g,
|
|
80
|
-
.replace(/\]/g,
|
|
81
|
-
.replace(/\^/g,
|
|
82
|
-
.replace(/-/g,
|
|
83
|
-
.replace(/\0/g,
|
|
84
|
-
.replace(/\t/g,
|
|
85
|
-
.replace(/\n/g,
|
|
86
|
-
.replace(/\r/g,
|
|
87
|
-
.replace(/[\x00-\x0F]/g, function(ch) { return
|
|
88
|
-
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return
|
|
75
|
+
.replace(/\\/g, "\\\\")
|
|
76
|
+
.replace(/\]/g, "\\]")
|
|
77
|
+
.replace(/\^/g, "\\^")
|
|
78
|
+
.replace(/-/g, "\\-")
|
|
79
|
+
.replace(/\0/g, "\\0")
|
|
80
|
+
.replace(/\t/g, "\\t")
|
|
81
|
+
.replace(/\n/g, "\\n")
|
|
82
|
+
.replace(/\r/g, "\\r")
|
|
83
|
+
.replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); })
|
|
84
|
+
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); });
|
|
89
85
|
}
|
|
90
86
|
|
|
91
87
|
function describeExpectation(expectation) {
|
|
@@ -93,12 +89,8 @@ peg$SyntaxError.buildMessage = function(expected, found) {
|
|
|
93
89
|
}
|
|
94
90
|
|
|
95
91
|
function describeExpected(expected) {
|
|
96
|
-
var descriptions =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
for (i = 0; i < expected.length; i++) {
|
|
100
|
-
descriptions[i] = describeExpectation(expected[i]);
|
|
101
|
-
}
|
|
92
|
+
var descriptions = expected.map(describeExpectation);
|
|
93
|
+
var i, j;
|
|
102
94
|
|
|
103
95
|
descriptions.sort();
|
|
104
96
|
|
|
@@ -134,124 +126,126 @@ peg$SyntaxError.buildMessage = function(expected, found) {
|
|
|
134
126
|
};
|
|
135
127
|
|
|
136
128
|
function peg$parse(input, options) {
|
|
137
|
-
options = options !==
|
|
138
|
-
|
|
139
|
-
var peg$FAILED = {}
|
|
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
|
-
|
|
129
|
+
options = options !== undefined ? options : {};
|
|
130
|
+
|
|
131
|
+
var peg$FAILED = {};
|
|
132
|
+
|
|
133
|
+
var peg$startRuleFunctions = { Start: peg$parseStart };
|
|
134
|
+
var peg$startRuleFunction = peg$parseStart;
|
|
135
|
+
|
|
136
|
+
var peg$c0 = "&&";
|
|
137
|
+
var peg$c1 = "||";
|
|
138
|
+
var peg$c2 = "!";
|
|
139
|
+
var peg$c3 = "==";
|
|
140
|
+
var peg$c4 = "!=";
|
|
141
|
+
var peg$c5 = "<=";
|
|
142
|
+
var peg$c6 = "<";
|
|
143
|
+
var peg$c7 = ">=";
|
|
144
|
+
var peg$c8 = ">";
|
|
145
|
+
var peg$c9 = "{";
|
|
146
|
+
var peg$c10 = "}";
|
|
147
|
+
var peg$c11 = "$url";
|
|
148
|
+
var peg$c12 = "$method";
|
|
149
|
+
var peg$c13 = "$statusCode";
|
|
150
|
+
var peg$c14 = "$request.";
|
|
151
|
+
var peg$c15 = "$response.";
|
|
152
|
+
var peg$c16 = "$inputs.";
|
|
153
|
+
var peg$c17 = "$steps.";
|
|
154
|
+
var peg$c18 = "$workflows.";
|
|
155
|
+
var peg$c19 = "$sourceDescriptions.";
|
|
156
|
+
var peg$c20 = "$components.";
|
|
157
|
+
var peg$c21 = "$components.parameters.";
|
|
158
|
+
var peg$c22 = "$outputs.";
|
|
159
|
+
var peg$c23 = ".";
|
|
160
|
+
var peg$c24 = "outputs.";
|
|
161
|
+
var peg$c25 = "header.";
|
|
162
|
+
var peg$c26 = "query.";
|
|
163
|
+
var peg$c27 = "path.";
|
|
164
|
+
var peg$c28 = "body";
|
|
165
|
+
var peg$c29 = "#";
|
|
166
|
+
var peg$c30 = "/";
|
|
167
|
+
var peg$c31 = "~";
|
|
168
|
+
var peg$c32 = "0";
|
|
169
|
+
var peg$c33 = "1";
|
|
170
|
+
var peg$c34 = "[";
|
|
171
|
+
var peg$c35 = "]";
|
|
172
|
+
var peg$c36 = "\"";
|
|
173
|
+
var peg$c37 = "'";
|
|
174
|
+
var peg$c38 = "true";
|
|
175
|
+
var peg$c39 = "false";
|
|
176
|
+
var peg$c40 = "null";
|
|
177
|
+
var peg$c41 = "undefined";
|
|
178
|
+
|
|
179
|
+
var peg$r0 = /^[!-.0-9A-Z_a-z]/;
|
|
180
|
+
var peg$r1 = /^[a-zA-Z]/;
|
|
181
|
+
var peg$r2 = /^[a-zA-Z0-9_\-]/;
|
|
182
|
+
var peg$r3 = /^[!#$%&'*+\-.\^_`|~a-zA-Z0-9\-]/;
|
|
183
|
+
var peg$r4 = /^[1-9]/;
|
|
184
|
+
var peg$r5 = /^[0-9]/;
|
|
185
|
+
var peg$r6 = /^[^"]/;
|
|
186
|
+
var peg$r7 = /^[^']/;
|
|
187
|
+
var peg$r8 = /^[ \t\r\n]/;
|
|
188
|
+
|
|
189
|
+
var peg$e0 = peg$literalExpectation("&&", false);
|
|
190
|
+
var peg$e1 = peg$literalExpectation("||", false);
|
|
191
|
+
var peg$e2 = peg$literalExpectation("!", false);
|
|
192
|
+
var peg$e3 = peg$literalExpectation("==", false);
|
|
193
|
+
var peg$e4 = peg$literalExpectation("!=", false);
|
|
194
|
+
var peg$e5 = peg$literalExpectation("<=", false);
|
|
195
|
+
var peg$e6 = peg$literalExpectation("<", false);
|
|
196
|
+
var peg$e7 = peg$literalExpectation(">=", false);
|
|
197
|
+
var peg$e8 = peg$literalExpectation(">", false);
|
|
198
|
+
var peg$e9 = peg$literalExpectation("{", false);
|
|
199
|
+
var peg$e10 = peg$literalExpectation("}", false);
|
|
200
|
+
var peg$e11 = peg$literalExpectation("$url", false);
|
|
201
|
+
var peg$e12 = peg$literalExpectation("$method", false);
|
|
202
|
+
var peg$e13 = peg$literalExpectation("$statusCode", false);
|
|
203
|
+
var peg$e14 = peg$literalExpectation("$request.", false);
|
|
204
|
+
var peg$e15 = peg$literalExpectation("$response.", false);
|
|
205
|
+
var peg$e16 = peg$literalExpectation("$inputs.", false);
|
|
206
|
+
var peg$e17 = peg$literalExpectation("$steps.", false);
|
|
207
|
+
var peg$e18 = peg$literalExpectation("$workflows.", false);
|
|
208
|
+
var peg$e19 = peg$literalExpectation("$sourceDescriptions.", false);
|
|
209
|
+
var peg$e20 = peg$literalExpectation("$components.", false);
|
|
210
|
+
var peg$e21 = peg$literalExpectation("$components.parameters.", false);
|
|
211
|
+
var peg$e22 = peg$literalExpectation("$outputs.", false);
|
|
212
|
+
var peg$e23 = peg$literalExpectation(".", false);
|
|
213
|
+
var peg$e24 = peg$literalExpectation("outputs.", false);
|
|
214
|
+
var peg$e25 = peg$literalExpectation("header.", false);
|
|
215
|
+
var peg$e26 = peg$literalExpectation("query.", false);
|
|
216
|
+
var peg$e27 = peg$literalExpectation("path.", false);
|
|
217
|
+
var peg$e28 = peg$literalExpectation("body", false);
|
|
218
|
+
var peg$e29 = peg$literalExpectation("#", false);
|
|
219
|
+
var peg$e30 = peg$literalExpectation("/", false);
|
|
220
|
+
var peg$e31 = peg$classExpectation([["!", "."], ["0", "9"], ["A", "Z"], "_", ["a", "z"]], false, false);
|
|
221
|
+
var peg$e32 = peg$literalExpectation("~", false);
|
|
222
|
+
var peg$e33 = peg$literalExpectation("0", false);
|
|
223
|
+
var peg$e34 = peg$literalExpectation("1", false);
|
|
224
|
+
var peg$e35 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false);
|
|
225
|
+
var peg$e36 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false);
|
|
226
|
+
var peg$e37 = peg$classExpectation(["!", "#", "$", "%", "&", "'", "*", "+", "-", ".", "^", "_", "`", "|", "~", ["a", "z"], ["A", "Z"], ["0", "9"], "-"], false, false);
|
|
227
|
+
var peg$e38 = peg$literalExpectation("[", false);
|
|
228
|
+
var peg$e39 = peg$literalExpectation("]", false);
|
|
229
|
+
var peg$e40 = peg$classExpectation([["1", "9"]], false, false);
|
|
230
|
+
var peg$e41 = peg$classExpectation([["0", "9"]], false, false);
|
|
231
|
+
var peg$e42 = peg$literalExpectation("\"", false);
|
|
232
|
+
var peg$e43 = peg$classExpectation(["\""], true, false);
|
|
233
|
+
var peg$e44 = peg$literalExpectation("'", false);
|
|
234
|
+
var peg$e45 = peg$classExpectation(["'"], true, false);
|
|
235
|
+
var peg$e46 = peg$literalExpectation("true", false);
|
|
236
|
+
var peg$e47 = peg$literalExpectation("false", false);
|
|
237
|
+
var peg$e48 = peg$literalExpectation("null", false);
|
|
238
|
+
var peg$e49 = peg$literalExpectation("undefined", false);
|
|
239
|
+
var peg$e50 = peg$classExpectation([" ", "\t", "\r", "\n"], false, false);
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
var peg$currPos = 0;
|
|
243
|
+
var peg$savedPos = 0;
|
|
244
|
+
var peg$posDetailsCache = [{ line: 1, column: 1 }];
|
|
245
|
+
var peg$expected = [];
|
|
246
|
+
var peg$silentFails = 0;
|
|
247
|
+
|
|
248
|
+
var peg$result;
|
|
255
249
|
|
|
256
250
|
if ("startRule" in options) {
|
|
257
251
|
if (!(options.startRule in peg$startRuleFunctions)) {
|
|
@@ -265,12 +259,22 @@ function peg$parse(input, options) {
|
|
|
265
259
|
return input.substring(peg$savedPos, peg$currPos);
|
|
266
260
|
}
|
|
267
261
|
|
|
262
|
+
function offset() {
|
|
263
|
+
return peg$savedPos;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function range() {
|
|
267
|
+
return [peg$savedPos, peg$currPos];
|
|
268
|
+
}
|
|
269
|
+
|
|
268
270
|
function location() {
|
|
269
271
|
return peg$computeLocation(peg$savedPos, peg$currPos);
|
|
270
272
|
}
|
|
271
273
|
|
|
272
274
|
function expected(description, location) {
|
|
273
|
-
location = location !==
|
|
275
|
+
location = location !== undefined
|
|
276
|
+
? location
|
|
277
|
+
: peg$computeLocation(peg$savedPos, peg$currPos);
|
|
274
278
|
|
|
275
279
|
throw peg$buildStructuredError(
|
|
276
280
|
[peg$otherExpectation(description)],
|
|
@@ -280,7 +284,9 @@ function peg$parse(input, options) {
|
|
|
280
284
|
}
|
|
281
285
|
|
|
282
286
|
function error(message, location) {
|
|
283
|
-
location = location !==
|
|
287
|
+
location = location !== undefined
|
|
288
|
+
? location
|
|
289
|
+
: peg$computeLocation(peg$savedPos, peg$currPos);
|
|
284
290
|
|
|
285
291
|
throw peg$buildSimpleError(message, location);
|
|
286
292
|
}
|
|
@@ -306,7 +312,8 @@ function peg$parse(input, options) {
|
|
|
306
312
|
}
|
|
307
313
|
|
|
308
314
|
function peg$computePosDetails(pos) {
|
|
309
|
-
var details = peg$posDetailsCache[pos]
|
|
315
|
+
var details = peg$posDetailsCache[pos];
|
|
316
|
+
var p;
|
|
310
317
|
|
|
311
318
|
if (details) {
|
|
312
319
|
return details;
|
|
@@ -318,7 +325,7 @@ function peg$parse(input, options) {
|
|
|
318
325
|
|
|
319
326
|
details = peg$posDetailsCache[p];
|
|
320
327
|
details = {
|
|
321
|
-
line:
|
|
328
|
+
line: details.line,
|
|
322
329
|
column: details.column
|
|
323
330
|
};
|
|
324
331
|
|
|
@@ -334,37 +341,65 @@ function peg$parse(input, options) {
|
|
|
334
341
|
}
|
|
335
342
|
|
|
336
343
|
peg$posDetailsCache[pos] = details;
|
|
344
|
+
|
|
337
345
|
return details;
|
|
338
346
|
}
|
|
339
347
|
}
|
|
340
348
|
|
|
349
|
+
var peg$VALIDFILENAME = typeof options.filename === "string" && options.filename.length > 0;
|
|
341
350
|
function peg$computeLocation(startPos, endPos) {
|
|
342
|
-
var
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
end: {
|
|
352
|
-
offset: endPos,
|
|
353
|
-
line: endPosDetails.line,
|
|
354
|
-
column: endPosDetails.column
|
|
355
|
-
}
|
|
351
|
+
var loc = {};
|
|
352
|
+
|
|
353
|
+
if ( peg$VALIDFILENAME ) loc.filename = options.filename;
|
|
354
|
+
|
|
355
|
+
var startPosDetails = peg$computePosDetails(startPos);
|
|
356
|
+
loc.start = {
|
|
357
|
+
offset: startPos,
|
|
358
|
+
line: startPosDetails.line,
|
|
359
|
+
column: startPosDetails.column
|
|
356
360
|
};
|
|
361
|
+
|
|
362
|
+
var endPosDetails = peg$computePosDetails(endPos);
|
|
363
|
+
loc.end = {
|
|
364
|
+
offset: endPos,
|
|
365
|
+
line: endPosDetails.line,
|
|
366
|
+
column: endPosDetails.column
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
return loc;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
function peg$begin() {
|
|
373
|
+
peg$expected.push({ pos: peg$currPos, variants: [] });
|
|
357
374
|
}
|
|
358
375
|
|
|
359
|
-
function peg$
|
|
360
|
-
|
|
376
|
+
function peg$expect(expected) {
|
|
377
|
+
var top = peg$expected[peg$expected.length - 1];
|
|
361
378
|
|
|
362
|
-
if (peg$currPos
|
|
363
|
-
|
|
364
|
-
|
|
379
|
+
if (peg$currPos < top.pos) { return; }
|
|
380
|
+
|
|
381
|
+
if (peg$currPos > top.pos) {
|
|
382
|
+
top.pos = peg$currPos;
|
|
383
|
+
top.variants = [];
|
|
365
384
|
}
|
|
366
385
|
|
|
367
|
-
|
|
386
|
+
top.variants.push(expected);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
function peg$end(invert) {
|
|
390
|
+
var expected = peg$expected.pop();
|
|
391
|
+
var top = peg$expected[peg$expected.length - 1];
|
|
392
|
+
var variants = expected.variants;
|
|
393
|
+
|
|
394
|
+
if (top.pos !== expected.pos) { return; }
|
|
395
|
+
|
|
396
|
+
if (invert) {
|
|
397
|
+
variants = variants.map(function(e) {
|
|
398
|
+
return e.type === "not" ? e.expected : { type: "not", expected: e };
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
Array.prototype.push.apply(top.variants, variants);
|
|
368
403
|
}
|
|
369
404
|
|
|
370
405
|
function peg$buildSimpleError(message, location) {
|
|
@@ -373,16 +408,33 @@ function peg$parse(input, options) {
|
|
|
373
408
|
|
|
374
409
|
function peg$buildStructuredError(expected, found, location) {
|
|
375
410
|
return new peg$SyntaxError(
|
|
376
|
-
peg$SyntaxError.buildMessage(expected, found),
|
|
411
|
+
peg$SyntaxError.buildMessage(expected, found, location),
|
|
377
412
|
expected,
|
|
378
413
|
found,
|
|
379
414
|
location
|
|
380
415
|
);
|
|
381
416
|
}
|
|
382
417
|
|
|
418
|
+
function peg$buildError() {
|
|
419
|
+
var expected = peg$expected[0];
|
|
420
|
+
var failPos = expected.pos;
|
|
421
|
+
|
|
422
|
+
return peg$buildStructuredError(
|
|
423
|
+
expected.variants,
|
|
424
|
+
failPos < input.length ? input.charAt(failPos) : null,
|
|
425
|
+
failPos < input.length
|
|
426
|
+
? peg$computeLocation(failPos, failPos + 1)
|
|
427
|
+
: peg$computeLocation(failPos, failPos)
|
|
428
|
+
);
|
|
429
|
+
}
|
|
430
|
+
|
|
383
431
|
function peg$parseStart() {
|
|
384
432
|
var s0;
|
|
385
433
|
|
|
434
|
+
var rule$expects = function (expected) {
|
|
435
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
436
|
+
}
|
|
437
|
+
|
|
386
438
|
s0 = peg$parseLogicalExpression();
|
|
387
439
|
|
|
388
440
|
return s0;
|
|
@@ -391,29 +443,23 @@ function peg$parse(input, options) {
|
|
|
391
443
|
function peg$parseLogicalExpression() {
|
|
392
444
|
var s0, s1, s2, s3, s4, s5, s6, s7;
|
|
393
445
|
|
|
446
|
+
var rule$expects = function (expected) {
|
|
447
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
448
|
+
}
|
|
449
|
+
|
|
394
450
|
s0 = peg$currPos;
|
|
395
451
|
s1 = peg$parseComparisonExpression();
|
|
396
452
|
if (s1 !== peg$FAILED) {
|
|
397
453
|
s2 = [];
|
|
398
454
|
s3 = peg$currPos;
|
|
399
455
|
s4 = peg$parse_();
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
s4 = [s4, s5, s6, s7];
|
|
408
|
-
s3 = s4;
|
|
409
|
-
} else {
|
|
410
|
-
peg$currPos = s3;
|
|
411
|
-
s3 = peg$FAILED;
|
|
412
|
-
}
|
|
413
|
-
} else {
|
|
414
|
-
peg$currPos = s3;
|
|
415
|
-
s3 = peg$FAILED;
|
|
416
|
-
}
|
|
456
|
+
s5 = peg$parseLogicalOperator();
|
|
457
|
+
if (s5 !== peg$FAILED) {
|
|
458
|
+
s6 = peg$parse_();
|
|
459
|
+
s7 = peg$parseComparisonExpression();
|
|
460
|
+
if (s7 !== peg$FAILED) {
|
|
461
|
+
s4 = [s4, s5, s6, s7];
|
|
462
|
+
s3 = s4;
|
|
417
463
|
} else {
|
|
418
464
|
peg$currPos = s3;
|
|
419
465
|
s3 = peg$FAILED;
|
|
@@ -426,23 +472,13 @@ function peg$parse(input, options) {
|
|
|
426
472
|
s2.push(s3);
|
|
427
473
|
s3 = peg$currPos;
|
|
428
474
|
s4 = peg$parse_();
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
s4 = [s4, s5, s6, s7];
|
|
437
|
-
s3 = s4;
|
|
438
|
-
} else {
|
|
439
|
-
peg$currPos = s3;
|
|
440
|
-
s3 = peg$FAILED;
|
|
441
|
-
}
|
|
442
|
-
} else {
|
|
443
|
-
peg$currPos = s3;
|
|
444
|
-
s3 = peg$FAILED;
|
|
445
|
-
}
|
|
475
|
+
s5 = peg$parseLogicalOperator();
|
|
476
|
+
if (s5 !== peg$FAILED) {
|
|
477
|
+
s6 = peg$parse_();
|
|
478
|
+
s7 = peg$parseComparisonExpression();
|
|
479
|
+
if (s7 !== peg$FAILED) {
|
|
480
|
+
s4 = [s4, s5, s6, s7];
|
|
481
|
+
s3 = s4;
|
|
446
482
|
} else {
|
|
447
483
|
peg$currPos = s3;
|
|
448
484
|
s3 = peg$FAILED;
|
|
@@ -452,13 +488,8 @@ function peg$parse(input, options) {
|
|
|
452
488
|
s3 = peg$FAILED;
|
|
453
489
|
}
|
|
454
490
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
s0 = s1;
|
|
458
|
-
} else {
|
|
459
|
-
peg$currPos = s0;
|
|
460
|
-
s0 = peg$FAILED;
|
|
461
|
-
}
|
|
491
|
+
s1 = [s1, s2];
|
|
492
|
+
s0 = s1;
|
|
462
493
|
} else {
|
|
463
494
|
peg$currPos = s0;
|
|
464
495
|
s0 = peg$FAILED;
|
|
@@ -470,28 +501,32 @@ function peg$parse(input, options) {
|
|
|
470
501
|
function peg$parseLogicalOperator() {
|
|
471
502
|
var s0;
|
|
472
503
|
|
|
504
|
+
var rule$expects = function (expected) {
|
|
505
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
rule$expects(peg$e0);
|
|
473
509
|
if (input.substr(peg$currPos, 2) === peg$c0) {
|
|
474
510
|
s0 = peg$c0;
|
|
475
511
|
peg$currPos += 2;
|
|
476
512
|
} else {
|
|
477
513
|
s0 = peg$FAILED;
|
|
478
|
-
if (peg$silentFails === 0) { peg$fail(peg$c1); }
|
|
479
514
|
}
|
|
480
515
|
if (s0 === peg$FAILED) {
|
|
481
|
-
|
|
482
|
-
|
|
516
|
+
rule$expects(peg$e1);
|
|
517
|
+
if (input.substr(peg$currPos, 2) === peg$c1) {
|
|
518
|
+
s0 = peg$c1;
|
|
483
519
|
peg$currPos += 2;
|
|
484
520
|
} else {
|
|
485
521
|
s0 = peg$FAILED;
|
|
486
|
-
if (peg$silentFails === 0) { peg$fail(peg$c3); }
|
|
487
522
|
}
|
|
488
523
|
if (s0 === peg$FAILED) {
|
|
524
|
+
rule$expects(peg$e2);
|
|
489
525
|
if (input.charCodeAt(peg$currPos) === 33) {
|
|
490
|
-
s0 = peg$
|
|
526
|
+
s0 = peg$c2;
|
|
491
527
|
peg$currPos++;
|
|
492
528
|
} else {
|
|
493
529
|
s0 = peg$FAILED;
|
|
494
|
-
if (peg$silentFails === 0) { peg$fail(peg$c5); }
|
|
495
530
|
}
|
|
496
531
|
}
|
|
497
532
|
}
|
|
@@ -502,52 +537,56 @@ function peg$parse(input, options) {
|
|
|
502
537
|
function peg$parseOperator() {
|
|
503
538
|
var s0;
|
|
504
539
|
|
|
505
|
-
|
|
506
|
-
|
|
540
|
+
var rule$expects = function (expected) {
|
|
541
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
rule$expects(peg$e3);
|
|
545
|
+
if (input.substr(peg$currPos, 2) === peg$c3) {
|
|
546
|
+
s0 = peg$c3;
|
|
507
547
|
peg$currPos += 2;
|
|
508
548
|
} else {
|
|
509
549
|
s0 = peg$FAILED;
|
|
510
|
-
if (peg$silentFails === 0) { peg$fail(peg$c7); }
|
|
511
550
|
}
|
|
512
551
|
if (s0 === peg$FAILED) {
|
|
513
|
-
|
|
514
|
-
|
|
552
|
+
rule$expects(peg$e4);
|
|
553
|
+
if (input.substr(peg$currPos, 2) === peg$c4) {
|
|
554
|
+
s0 = peg$c4;
|
|
515
555
|
peg$currPos += 2;
|
|
516
556
|
} else {
|
|
517
557
|
s0 = peg$FAILED;
|
|
518
|
-
if (peg$silentFails === 0) { peg$fail(peg$c9); }
|
|
519
558
|
}
|
|
520
559
|
if (s0 === peg$FAILED) {
|
|
521
|
-
|
|
522
|
-
|
|
560
|
+
rule$expects(peg$e5);
|
|
561
|
+
if (input.substr(peg$currPos, 2) === peg$c5) {
|
|
562
|
+
s0 = peg$c5;
|
|
523
563
|
peg$currPos += 2;
|
|
524
564
|
} else {
|
|
525
565
|
s0 = peg$FAILED;
|
|
526
|
-
if (peg$silentFails === 0) { peg$fail(peg$c11); }
|
|
527
566
|
}
|
|
528
567
|
if (s0 === peg$FAILED) {
|
|
568
|
+
rule$expects(peg$e6);
|
|
529
569
|
if (input.charCodeAt(peg$currPos) === 60) {
|
|
530
|
-
s0 = peg$
|
|
570
|
+
s0 = peg$c6;
|
|
531
571
|
peg$currPos++;
|
|
532
572
|
} else {
|
|
533
573
|
s0 = peg$FAILED;
|
|
534
|
-
if (peg$silentFails === 0) { peg$fail(peg$c13); }
|
|
535
574
|
}
|
|
536
575
|
if (s0 === peg$FAILED) {
|
|
537
|
-
|
|
538
|
-
|
|
576
|
+
rule$expects(peg$e7);
|
|
577
|
+
if (input.substr(peg$currPos, 2) === peg$c7) {
|
|
578
|
+
s0 = peg$c7;
|
|
539
579
|
peg$currPos += 2;
|
|
540
580
|
} else {
|
|
541
581
|
s0 = peg$FAILED;
|
|
542
|
-
if (peg$silentFails === 0) { peg$fail(peg$c15); }
|
|
543
582
|
}
|
|
544
583
|
if (s0 === peg$FAILED) {
|
|
584
|
+
rule$expects(peg$e8);
|
|
545
585
|
if (input.charCodeAt(peg$currPos) === 62) {
|
|
546
|
-
s0 = peg$
|
|
586
|
+
s0 = peg$c8;
|
|
547
587
|
peg$currPos++;
|
|
548
588
|
} else {
|
|
549
589
|
s0 = peg$FAILED;
|
|
550
|
-
if (peg$silentFails === 0) { peg$fail(peg$c17); }
|
|
551
590
|
}
|
|
552
591
|
}
|
|
553
592
|
}
|
|
@@ -561,6 +600,10 @@ function peg$parse(input, options) {
|
|
|
561
600
|
function peg$parseComparisonExpression() {
|
|
562
601
|
var s0, s1, s2, s3, s4, s5, s6, s7;
|
|
563
602
|
|
|
603
|
+
var rule$expects = function (expected) {
|
|
604
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
605
|
+
}
|
|
606
|
+
|
|
564
607
|
s0 = peg$currPos;
|
|
565
608
|
s1 = peg$parseCurlyExpression();
|
|
566
609
|
if (s1 === peg$FAILED) {
|
|
@@ -571,27 +614,45 @@ function peg$parse(input, options) {
|
|
|
571
614
|
}
|
|
572
615
|
if (s1 !== peg$FAILED) {
|
|
573
616
|
s2 = peg$parse_();
|
|
574
|
-
|
|
575
|
-
|
|
617
|
+
s3 = [];
|
|
618
|
+
s4 = peg$currPos;
|
|
619
|
+
s5 = peg$parseOperator();
|
|
620
|
+
if (s5 !== peg$FAILED) {
|
|
621
|
+
s6 = peg$parse_();
|
|
622
|
+
s7 = peg$parseCurlyExpression();
|
|
623
|
+
if (s7 === peg$FAILED) {
|
|
624
|
+
s7 = peg$parseBasicExpression();
|
|
625
|
+
if (s7 === peg$FAILED) {
|
|
626
|
+
s7 = peg$parseValue();
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
if (s7 !== peg$FAILED) {
|
|
630
|
+
s5 = [s5, s6, s7];
|
|
631
|
+
s4 = s5;
|
|
632
|
+
} else {
|
|
633
|
+
peg$currPos = s4;
|
|
634
|
+
s4 = peg$FAILED;
|
|
635
|
+
}
|
|
636
|
+
} else {
|
|
637
|
+
peg$currPos = s4;
|
|
638
|
+
s4 = peg$FAILED;
|
|
639
|
+
}
|
|
640
|
+
while (s4 !== peg$FAILED) {
|
|
641
|
+
s3.push(s4);
|
|
576
642
|
s4 = peg$currPos;
|
|
577
643
|
s5 = peg$parseOperator();
|
|
578
644
|
if (s5 !== peg$FAILED) {
|
|
579
645
|
s6 = peg$parse_();
|
|
580
|
-
|
|
581
|
-
|
|
646
|
+
s7 = peg$parseCurlyExpression();
|
|
647
|
+
if (s7 === peg$FAILED) {
|
|
648
|
+
s7 = peg$parseBasicExpression();
|
|
582
649
|
if (s7 === peg$FAILED) {
|
|
583
|
-
s7 = peg$
|
|
584
|
-
if (s7 === peg$FAILED) {
|
|
585
|
-
s7 = peg$parseValue();
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
if (s7 !== peg$FAILED) {
|
|
589
|
-
s5 = [s5, s6, s7];
|
|
590
|
-
s4 = s5;
|
|
591
|
-
} else {
|
|
592
|
-
peg$currPos = s4;
|
|
593
|
-
s4 = peg$FAILED;
|
|
650
|
+
s7 = peg$parseValue();
|
|
594
651
|
}
|
|
652
|
+
}
|
|
653
|
+
if (s7 !== peg$FAILED) {
|
|
654
|
+
s5 = [s5, s6, s7];
|
|
655
|
+
s4 = s5;
|
|
595
656
|
} else {
|
|
596
657
|
peg$currPos = s4;
|
|
597
658
|
s4 = peg$FAILED;
|
|
@@ -600,47 +661,9 @@ function peg$parse(input, options) {
|
|
|
600
661
|
peg$currPos = s4;
|
|
601
662
|
s4 = peg$FAILED;
|
|
602
663
|
}
|
|
603
|
-
while (s4 !== peg$FAILED) {
|
|
604
|
-
s3.push(s4);
|
|
605
|
-
s4 = peg$currPos;
|
|
606
|
-
s5 = peg$parseOperator();
|
|
607
|
-
if (s5 !== peg$FAILED) {
|
|
608
|
-
s6 = peg$parse_();
|
|
609
|
-
if (s6 !== peg$FAILED) {
|
|
610
|
-
s7 = peg$parseCurlyExpression();
|
|
611
|
-
if (s7 === peg$FAILED) {
|
|
612
|
-
s7 = peg$parseBasicExpression();
|
|
613
|
-
if (s7 === peg$FAILED) {
|
|
614
|
-
s7 = peg$parseValue();
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
if (s7 !== peg$FAILED) {
|
|
618
|
-
s5 = [s5, s6, s7];
|
|
619
|
-
s4 = s5;
|
|
620
|
-
} else {
|
|
621
|
-
peg$currPos = s4;
|
|
622
|
-
s4 = peg$FAILED;
|
|
623
|
-
}
|
|
624
|
-
} else {
|
|
625
|
-
peg$currPos = s4;
|
|
626
|
-
s4 = peg$FAILED;
|
|
627
|
-
}
|
|
628
|
-
} else {
|
|
629
|
-
peg$currPos = s4;
|
|
630
|
-
s4 = peg$FAILED;
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
if (s3 !== peg$FAILED) {
|
|
634
|
-
s1 = [s1, s2, s3];
|
|
635
|
-
s0 = s1;
|
|
636
|
-
} else {
|
|
637
|
-
peg$currPos = s0;
|
|
638
|
-
s0 = peg$FAILED;
|
|
639
|
-
}
|
|
640
|
-
} else {
|
|
641
|
-
peg$currPos = s0;
|
|
642
|
-
s0 = peg$FAILED;
|
|
643
664
|
}
|
|
665
|
+
s1 = [s1, s2, s3];
|
|
666
|
+
s0 = s1;
|
|
644
667
|
} else {
|
|
645
668
|
peg$currPos = s0;
|
|
646
669
|
s0 = peg$FAILED;
|
|
@@ -652,39 +675,33 @@ function peg$parse(input, options) {
|
|
|
652
675
|
function peg$parseCurlyExpression() {
|
|
653
676
|
var s0, s1, s2, s3, s4, s5;
|
|
654
677
|
|
|
678
|
+
var rule$expects = function (expected) {
|
|
679
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
680
|
+
}
|
|
681
|
+
|
|
655
682
|
s0 = peg$currPos;
|
|
683
|
+
rule$expects(peg$e9);
|
|
656
684
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
657
|
-
s1 = peg$
|
|
685
|
+
s1 = peg$c9;
|
|
658
686
|
peg$currPos++;
|
|
659
687
|
} else {
|
|
660
688
|
s1 = peg$FAILED;
|
|
661
|
-
if (peg$silentFails === 0) { peg$fail(peg$c19); }
|
|
662
689
|
}
|
|
663
690
|
if (s1 !== peg$FAILED) {
|
|
664
691
|
s2 = peg$parse_();
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
s1 = [s1, s2, s3, s4, s5];
|
|
679
|
-
s0 = s1;
|
|
680
|
-
} else {
|
|
681
|
-
peg$currPos = s0;
|
|
682
|
-
s0 = peg$FAILED;
|
|
683
|
-
}
|
|
684
|
-
} else {
|
|
685
|
-
peg$currPos = s0;
|
|
686
|
-
s0 = peg$FAILED;
|
|
687
|
-
}
|
|
692
|
+
s3 = peg$parseBasicExpression();
|
|
693
|
+
if (s3 !== peg$FAILED) {
|
|
694
|
+
s4 = peg$parse_();
|
|
695
|
+
rule$expects(peg$e10);
|
|
696
|
+
if (input.charCodeAt(peg$currPos) === 125) {
|
|
697
|
+
s5 = peg$c10;
|
|
698
|
+
peg$currPos++;
|
|
699
|
+
} else {
|
|
700
|
+
s5 = peg$FAILED;
|
|
701
|
+
}
|
|
702
|
+
if (s5 !== peg$FAILED) {
|
|
703
|
+
s1 = [s1, s2, s3, s4, s5];
|
|
704
|
+
s0 = s1;
|
|
688
705
|
} else {
|
|
689
706
|
peg$currPos = s0;
|
|
690
707
|
s0 = peg$FAILED;
|
|
@@ -699,38 +716,28 @@ function peg$parse(input, options) {
|
|
|
699
716
|
}
|
|
700
717
|
if (s0 === peg$FAILED) {
|
|
701
718
|
s0 = peg$currPos;
|
|
719
|
+
rule$expects(peg$e9);
|
|
702
720
|
if (input.charCodeAt(peg$currPos) === 123) {
|
|
703
|
-
s1 = peg$
|
|
721
|
+
s1 = peg$c9;
|
|
704
722
|
peg$currPos++;
|
|
705
723
|
} else {
|
|
706
724
|
s1 = peg$FAILED;
|
|
707
|
-
if (peg$silentFails === 0) { peg$fail(peg$c19); }
|
|
708
725
|
}
|
|
709
726
|
if (s1 !== peg$FAILED) {
|
|
710
727
|
s2 = peg$parse_();
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
s1 = [s1, s2, s3, s4, s5];
|
|
725
|
-
s0 = s1;
|
|
726
|
-
} else {
|
|
727
|
-
peg$currPos = s0;
|
|
728
|
-
s0 = peg$FAILED;
|
|
729
|
-
}
|
|
730
|
-
} else {
|
|
731
|
-
peg$currPos = s0;
|
|
732
|
-
s0 = peg$FAILED;
|
|
733
|
-
}
|
|
728
|
+
s3 = peg$parseLogicalExpression();
|
|
729
|
+
if (s3 !== peg$FAILED) {
|
|
730
|
+
s4 = peg$parse_();
|
|
731
|
+
rule$expects(peg$e10);
|
|
732
|
+
if (input.charCodeAt(peg$currPos) === 125) {
|
|
733
|
+
s5 = peg$c10;
|
|
734
|
+
peg$currPos++;
|
|
735
|
+
} else {
|
|
736
|
+
s5 = peg$FAILED;
|
|
737
|
+
}
|
|
738
|
+
if (s5 !== peg$FAILED) {
|
|
739
|
+
s1 = [s1, s2, s3, s4, s5];
|
|
740
|
+
s0 = s1;
|
|
734
741
|
} else {
|
|
735
742
|
peg$currPos = s0;
|
|
736
743
|
s0 = peg$FAILED;
|
|
@@ -751,37 +758,41 @@ function peg$parse(input, options) {
|
|
|
751
758
|
function peg$parseBasicExpression() {
|
|
752
759
|
var s0, s1, s2;
|
|
753
760
|
|
|
754
|
-
|
|
755
|
-
|
|
761
|
+
var rule$expects = function (expected) {
|
|
762
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
rule$expects(peg$e11);
|
|
766
|
+
if (input.substr(peg$currPos, 4) === peg$c11) {
|
|
767
|
+
s0 = peg$c11;
|
|
756
768
|
peg$currPos += 4;
|
|
757
769
|
} else {
|
|
758
770
|
s0 = peg$FAILED;
|
|
759
|
-
if (peg$silentFails === 0) { peg$fail(peg$c23); }
|
|
760
771
|
}
|
|
761
772
|
if (s0 === peg$FAILED) {
|
|
762
|
-
|
|
763
|
-
|
|
773
|
+
rule$expects(peg$e12);
|
|
774
|
+
if (input.substr(peg$currPos, 7) === peg$c12) {
|
|
775
|
+
s0 = peg$c12;
|
|
764
776
|
peg$currPos += 7;
|
|
765
777
|
} else {
|
|
766
778
|
s0 = peg$FAILED;
|
|
767
|
-
if (peg$silentFails === 0) { peg$fail(peg$c25); }
|
|
768
779
|
}
|
|
769
780
|
if (s0 === peg$FAILED) {
|
|
770
|
-
|
|
771
|
-
|
|
781
|
+
rule$expects(peg$e13);
|
|
782
|
+
if (input.substr(peg$currPos, 11) === peg$c13) {
|
|
783
|
+
s0 = peg$c13;
|
|
772
784
|
peg$currPos += 11;
|
|
773
785
|
} else {
|
|
774
786
|
s0 = peg$FAILED;
|
|
775
|
-
if (peg$silentFails === 0) { peg$fail(peg$c27); }
|
|
776
787
|
}
|
|
777
788
|
if (s0 === peg$FAILED) {
|
|
778
789
|
s0 = peg$currPos;
|
|
779
|
-
|
|
780
|
-
|
|
790
|
+
rule$expects(peg$e14);
|
|
791
|
+
if (input.substr(peg$currPos, 9) === peg$c14) {
|
|
792
|
+
s1 = peg$c14;
|
|
781
793
|
peg$currPos += 9;
|
|
782
794
|
} else {
|
|
783
795
|
s1 = peg$FAILED;
|
|
784
|
-
if (peg$silentFails === 0) { peg$fail(peg$c29); }
|
|
785
796
|
}
|
|
786
797
|
if (s1 !== peg$FAILED) {
|
|
787
798
|
s2 = peg$parseSource();
|
|
@@ -798,12 +809,12 @@ function peg$parse(input, options) {
|
|
|
798
809
|
}
|
|
799
810
|
if (s0 === peg$FAILED) {
|
|
800
811
|
s0 = peg$currPos;
|
|
801
|
-
|
|
802
|
-
|
|
812
|
+
rule$expects(peg$e15);
|
|
813
|
+
if (input.substr(peg$currPos, 10) === peg$c15) {
|
|
814
|
+
s1 = peg$c15;
|
|
803
815
|
peg$currPos += 10;
|
|
804
816
|
} else {
|
|
805
817
|
s1 = peg$FAILED;
|
|
806
|
-
if (peg$silentFails === 0) { peg$fail(peg$c31); }
|
|
807
818
|
}
|
|
808
819
|
if (s1 !== peg$FAILED) {
|
|
809
820
|
s2 = peg$parseSource();
|
|
@@ -820,12 +831,12 @@ function peg$parse(input, options) {
|
|
|
820
831
|
}
|
|
821
832
|
if (s0 === peg$FAILED) {
|
|
822
833
|
s0 = peg$currPos;
|
|
823
|
-
|
|
824
|
-
|
|
834
|
+
rule$expects(peg$e16);
|
|
835
|
+
if (input.substr(peg$currPos, 8) === peg$c16) {
|
|
836
|
+
s1 = peg$c16;
|
|
825
837
|
peg$currPos += 8;
|
|
826
838
|
} else {
|
|
827
839
|
s1 = peg$FAILED;
|
|
828
|
-
if (peg$silentFails === 0) { peg$fail(peg$c33); }
|
|
829
840
|
}
|
|
830
841
|
if (s1 !== peg$FAILED) {
|
|
831
842
|
s2 = peg$parsePropertyNameChain();
|
|
@@ -844,12 +855,12 @@ function peg$parse(input, options) {
|
|
|
844
855
|
s0 = peg$parseOutputsExpression();
|
|
845
856
|
if (s0 === peg$FAILED) {
|
|
846
857
|
s0 = peg$currPos;
|
|
847
|
-
|
|
848
|
-
|
|
858
|
+
rule$expects(peg$e17);
|
|
859
|
+
if (input.substr(peg$currPos, 7) === peg$c17) {
|
|
860
|
+
s1 = peg$c17;
|
|
849
861
|
peg$currPos += 7;
|
|
850
862
|
} else {
|
|
851
863
|
s1 = peg$FAILED;
|
|
852
|
-
if (peg$silentFails === 0) { peg$fail(peg$c35); }
|
|
853
864
|
}
|
|
854
865
|
if (s1 !== peg$FAILED) {
|
|
855
866
|
s2 = peg$parseStepsExpression();
|
|
@@ -866,12 +877,12 @@ function peg$parse(input, options) {
|
|
|
866
877
|
}
|
|
867
878
|
if (s0 === peg$FAILED) {
|
|
868
879
|
s0 = peg$currPos;
|
|
869
|
-
|
|
870
|
-
|
|
880
|
+
rule$expects(peg$e18);
|
|
881
|
+
if (input.substr(peg$currPos, 11) === peg$c18) {
|
|
882
|
+
s1 = peg$c18;
|
|
871
883
|
peg$currPos += 11;
|
|
872
884
|
} else {
|
|
873
885
|
s1 = peg$FAILED;
|
|
874
|
-
if (peg$silentFails === 0) { peg$fail(peg$c37); }
|
|
875
886
|
}
|
|
876
887
|
if (s1 !== peg$FAILED) {
|
|
877
888
|
s2 = peg$parseWorkflowsExpression();
|
|
@@ -888,12 +899,12 @@ function peg$parse(input, options) {
|
|
|
888
899
|
}
|
|
889
900
|
if (s0 === peg$FAILED) {
|
|
890
901
|
s0 = peg$currPos;
|
|
891
|
-
|
|
892
|
-
|
|
902
|
+
rule$expects(peg$e19);
|
|
903
|
+
if (input.substr(peg$currPos, 20) === peg$c19) {
|
|
904
|
+
s1 = peg$c19;
|
|
893
905
|
peg$currPos += 20;
|
|
894
906
|
} else {
|
|
895
907
|
s1 = peg$FAILED;
|
|
896
|
-
if (peg$silentFails === 0) { peg$fail(peg$c39); }
|
|
897
908
|
}
|
|
898
909
|
if (s1 !== peg$FAILED) {
|
|
899
910
|
s2 = peg$parsePropertyNameChain();
|
|
@@ -910,12 +921,12 @@ function peg$parse(input, options) {
|
|
|
910
921
|
}
|
|
911
922
|
if (s0 === peg$FAILED) {
|
|
912
923
|
s0 = peg$currPos;
|
|
913
|
-
|
|
914
|
-
|
|
924
|
+
rule$expects(peg$e20);
|
|
925
|
+
if (input.substr(peg$currPos, 12) === peg$c20) {
|
|
926
|
+
s1 = peg$c20;
|
|
915
927
|
peg$currPos += 12;
|
|
916
928
|
} else {
|
|
917
929
|
s1 = peg$FAILED;
|
|
918
|
-
if (peg$silentFails === 0) { peg$fail(peg$c41); }
|
|
919
930
|
}
|
|
920
931
|
if (s1 !== peg$FAILED) {
|
|
921
932
|
s2 = peg$parsePropertyNameChain();
|
|
@@ -932,12 +943,12 @@ function peg$parse(input, options) {
|
|
|
932
943
|
}
|
|
933
944
|
if (s0 === peg$FAILED) {
|
|
934
945
|
s0 = peg$currPos;
|
|
935
|
-
|
|
936
|
-
|
|
946
|
+
rule$expects(peg$e21);
|
|
947
|
+
if (input.substr(peg$currPos, 23) === peg$c21) {
|
|
948
|
+
s1 = peg$c21;
|
|
937
949
|
peg$currPos += 23;
|
|
938
950
|
} else {
|
|
939
951
|
s1 = peg$FAILED;
|
|
940
|
-
if (peg$silentFails === 0) { peg$fail(peg$c43); }
|
|
941
952
|
}
|
|
942
953
|
if (s1 !== peg$FAILED) {
|
|
943
954
|
s2 = peg$parsePropertyNameChain();
|
|
@@ -970,13 +981,17 @@ function peg$parse(input, options) {
|
|
|
970
981
|
function peg$parseOutputsExpression() {
|
|
971
982
|
var s0, s1, s2, s3, s4;
|
|
972
983
|
|
|
984
|
+
var rule$expects = function (expected) {
|
|
985
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
986
|
+
}
|
|
987
|
+
|
|
973
988
|
s0 = peg$currPos;
|
|
974
|
-
|
|
975
|
-
|
|
989
|
+
rule$expects(peg$e22);
|
|
990
|
+
if (input.substr(peg$currPos, 9) === peg$c22) {
|
|
991
|
+
s1 = peg$c22;
|
|
976
992
|
peg$currPos += 9;
|
|
977
993
|
} else {
|
|
978
994
|
s1 = peg$FAILED;
|
|
979
|
-
if (peg$silentFails === 0) { peg$fail(peg$c45); }
|
|
980
995
|
}
|
|
981
996
|
if (s1 !== peg$FAILED) {
|
|
982
997
|
s2 = peg$currPos;
|
|
@@ -986,13 +1001,8 @@ function peg$parse(input, options) {
|
|
|
986
1001
|
if (s4 === peg$FAILED) {
|
|
987
1002
|
s4 = null;
|
|
988
1003
|
}
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
s2 = s3;
|
|
992
|
-
} else {
|
|
993
|
-
peg$currPos = s2;
|
|
994
|
-
s2 = peg$FAILED;
|
|
995
|
-
}
|
|
1004
|
+
s3 = [s3, s4];
|
|
1005
|
+
s2 = s3;
|
|
996
1006
|
} else {
|
|
997
1007
|
peg$currPos = s2;
|
|
998
1008
|
s2 = peg$FAILED;
|
|
@@ -1018,24 +1028,28 @@ function peg$parse(input, options) {
|
|
|
1018
1028
|
function peg$parseStepsExpression() {
|
|
1019
1029
|
var s0, s1, s2, s3, s4, s5;
|
|
1020
1030
|
|
|
1031
|
+
var rule$expects = function (expected) {
|
|
1032
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1021
1035
|
s0 = peg$currPos;
|
|
1022
1036
|
s1 = peg$parsePropertyName();
|
|
1023
1037
|
if (s1 !== peg$FAILED) {
|
|
1038
|
+
rule$expects(peg$e23);
|
|
1024
1039
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
1025
|
-
s2 = peg$
|
|
1040
|
+
s2 = peg$c23;
|
|
1026
1041
|
peg$currPos++;
|
|
1027
1042
|
} else {
|
|
1028
1043
|
s2 = peg$FAILED;
|
|
1029
|
-
if (peg$silentFails === 0) { peg$fail(peg$c47); }
|
|
1030
1044
|
}
|
|
1031
1045
|
if (s2 !== peg$FAILED) {
|
|
1032
1046
|
s3 = peg$currPos;
|
|
1033
|
-
|
|
1034
|
-
|
|
1047
|
+
rule$expects(peg$e24);
|
|
1048
|
+
if (input.substr(peg$currPos, 8) === peg$c24) {
|
|
1049
|
+
s4 = peg$c24;
|
|
1035
1050
|
peg$currPos += 8;
|
|
1036
1051
|
} else {
|
|
1037
1052
|
s4 = peg$FAILED;
|
|
1038
|
-
if (peg$silentFails === 0) { peg$fail(peg$c49); }
|
|
1039
1053
|
}
|
|
1040
1054
|
if (s4 !== peg$FAILED) {
|
|
1041
1055
|
s5 = peg$parsePropertyNameWithPointer();
|
|
@@ -1075,24 +1089,28 @@ function peg$parse(input, options) {
|
|
|
1075
1089
|
function peg$parseWorkflowsExpression() {
|
|
1076
1090
|
var s0, s1, s2, s3, s4, s5;
|
|
1077
1091
|
|
|
1092
|
+
var rule$expects = function (expected) {
|
|
1093
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1078
1096
|
s0 = peg$currPos;
|
|
1079
1097
|
s1 = peg$parsePropertyName();
|
|
1080
1098
|
if (s1 !== peg$FAILED) {
|
|
1099
|
+
rule$expects(peg$e23);
|
|
1081
1100
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
1082
|
-
s2 = peg$
|
|
1101
|
+
s2 = peg$c23;
|
|
1083
1102
|
peg$currPos++;
|
|
1084
1103
|
} else {
|
|
1085
1104
|
s2 = peg$FAILED;
|
|
1086
|
-
if (peg$silentFails === 0) { peg$fail(peg$c47); }
|
|
1087
1105
|
}
|
|
1088
1106
|
if (s2 !== peg$FAILED) {
|
|
1089
1107
|
s3 = peg$currPos;
|
|
1090
|
-
|
|
1091
|
-
|
|
1108
|
+
rule$expects(peg$e24);
|
|
1109
|
+
if (input.substr(peg$currPos, 8) === peg$c24) {
|
|
1110
|
+
s4 = peg$c24;
|
|
1092
1111
|
peg$currPos += 8;
|
|
1093
1112
|
} else {
|
|
1094
1113
|
s4 = peg$FAILED;
|
|
1095
|
-
if (peg$silentFails === 0) { peg$fail(peg$c49); }
|
|
1096
1114
|
}
|
|
1097
1115
|
if (s4 !== peg$FAILED) {
|
|
1098
1116
|
s5 = peg$parsePropertyNameWithPointer();
|
|
@@ -1132,6 +1150,10 @@ function peg$parse(input, options) {
|
|
|
1132
1150
|
function peg$parsePropertyNameWithPointer() {
|
|
1133
1151
|
var s0, s1, s2;
|
|
1134
1152
|
|
|
1153
|
+
var rule$expects = function (expected) {
|
|
1154
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1135
1157
|
s0 = peg$currPos;
|
|
1136
1158
|
s1 = peg$parsePropertyName();
|
|
1137
1159
|
if (s1 !== peg$FAILED) {
|
|
@@ -1154,29 +1176,28 @@ function peg$parse(input, options) {
|
|
|
1154
1176
|
function peg$parsePropertyNameChain() {
|
|
1155
1177
|
var s0, s1, s2, s3, s4, s5, s6;
|
|
1156
1178
|
|
|
1179
|
+
var rule$expects = function (expected) {
|
|
1180
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1157
1183
|
s0 = peg$currPos;
|
|
1158
1184
|
s1 = peg$parsePropertyName();
|
|
1159
1185
|
if (s1 !== peg$FAILED) {
|
|
1160
1186
|
s2 = [];
|
|
1161
1187
|
s3 = peg$currPos;
|
|
1188
|
+
rule$expects(peg$e23);
|
|
1162
1189
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
1163
|
-
s4 = peg$
|
|
1190
|
+
s4 = peg$c23;
|
|
1164
1191
|
peg$currPos++;
|
|
1165
1192
|
} else {
|
|
1166
1193
|
s4 = peg$FAILED;
|
|
1167
|
-
if (peg$silentFails === 0) { peg$fail(peg$c47); }
|
|
1168
1194
|
}
|
|
1169
1195
|
if (s4 !== peg$FAILED) {
|
|
1170
1196
|
s5 = peg$parse_();
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
s3 = s4;
|
|
1176
|
-
} else {
|
|
1177
|
-
peg$currPos = s3;
|
|
1178
|
-
s3 = peg$FAILED;
|
|
1179
|
-
}
|
|
1197
|
+
s6 = peg$parsePropertyName();
|
|
1198
|
+
if (s6 !== peg$FAILED) {
|
|
1199
|
+
s4 = [s4, s5, s6];
|
|
1200
|
+
s3 = s4;
|
|
1180
1201
|
} else {
|
|
1181
1202
|
peg$currPos = s3;
|
|
1182
1203
|
s3 = peg$FAILED;
|
|
@@ -1188,24 +1209,19 @@ function peg$parse(input, options) {
|
|
|
1188
1209
|
while (s3 !== peg$FAILED) {
|
|
1189
1210
|
s2.push(s3);
|
|
1190
1211
|
s3 = peg$currPos;
|
|
1212
|
+
rule$expects(peg$e23);
|
|
1191
1213
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
1192
|
-
s4 = peg$
|
|
1214
|
+
s4 = peg$c23;
|
|
1193
1215
|
peg$currPos++;
|
|
1194
1216
|
} else {
|
|
1195
1217
|
s4 = peg$FAILED;
|
|
1196
|
-
if (peg$silentFails === 0) { peg$fail(peg$c47); }
|
|
1197
1218
|
}
|
|
1198
1219
|
if (s4 !== peg$FAILED) {
|
|
1199
1220
|
s5 = peg$parse_();
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
s3 = s4;
|
|
1205
|
-
} else {
|
|
1206
|
-
peg$currPos = s3;
|
|
1207
|
-
s3 = peg$FAILED;
|
|
1208
|
-
}
|
|
1221
|
+
s6 = peg$parsePropertyName();
|
|
1222
|
+
if (s6 !== peg$FAILED) {
|
|
1223
|
+
s4 = [s4, s5, s6];
|
|
1224
|
+
s3 = s4;
|
|
1209
1225
|
} else {
|
|
1210
1226
|
peg$currPos = s3;
|
|
1211
1227
|
s3 = peg$FAILED;
|
|
@@ -1215,13 +1231,8 @@ function peg$parse(input, options) {
|
|
|
1215
1231
|
s3 = peg$FAILED;
|
|
1216
1232
|
}
|
|
1217
1233
|
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
s0 = s1;
|
|
1221
|
-
} else {
|
|
1222
|
-
peg$currPos = s0;
|
|
1223
|
-
s0 = peg$FAILED;
|
|
1224
|
-
}
|
|
1234
|
+
s1 = [s1, s2];
|
|
1235
|
+
s0 = s1;
|
|
1225
1236
|
} else {
|
|
1226
1237
|
peg$currPos = s0;
|
|
1227
1238
|
s0 = peg$FAILED;
|
|
@@ -1233,6 +1244,10 @@ function peg$parse(input, options) {
|
|
|
1233
1244
|
function peg$parsePropertyName() {
|
|
1234
1245
|
var s0;
|
|
1235
1246
|
|
|
1247
|
+
var rule$expects = function (expected) {
|
|
1248
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1236
1251
|
s0 = peg$parseName();
|
|
1237
1252
|
if (s0 === peg$FAILED) {
|
|
1238
1253
|
s0 = peg$parseNumber();
|
|
@@ -1244,6 +1259,10 @@ function peg$parse(input, options) {
|
|
|
1244
1259
|
function peg$parseSource() {
|
|
1245
1260
|
var s0;
|
|
1246
1261
|
|
|
1262
|
+
var rule$expects = function (expected) {
|
|
1263
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1247
1266
|
s0 = peg$parseHeaderReference();
|
|
1248
1267
|
if (s0 === peg$FAILED) {
|
|
1249
1268
|
s0 = peg$parseQueryReference();
|
|
@@ -1261,13 +1280,17 @@ function peg$parse(input, options) {
|
|
|
1261
1280
|
function peg$parseHeaderReference() {
|
|
1262
1281
|
var s0, s1, s2;
|
|
1263
1282
|
|
|
1283
|
+
var rule$expects = function (expected) {
|
|
1284
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1264
1287
|
s0 = peg$currPos;
|
|
1265
|
-
|
|
1266
|
-
|
|
1288
|
+
rule$expects(peg$e25);
|
|
1289
|
+
if (input.substr(peg$currPos, 7) === peg$c25) {
|
|
1290
|
+
s1 = peg$c25;
|
|
1267
1291
|
peg$currPos += 7;
|
|
1268
1292
|
} else {
|
|
1269
1293
|
s1 = peg$FAILED;
|
|
1270
|
-
if (peg$silentFails === 0) { peg$fail(peg$c51); }
|
|
1271
1294
|
}
|
|
1272
1295
|
if (s1 !== peg$FAILED) {
|
|
1273
1296
|
s2 = peg$parseToken();
|
|
@@ -1289,13 +1312,17 @@ function peg$parse(input, options) {
|
|
|
1289
1312
|
function peg$parseQueryReference() {
|
|
1290
1313
|
var s0, s1, s2;
|
|
1291
1314
|
|
|
1315
|
+
var rule$expects = function (expected) {
|
|
1316
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1292
1319
|
s0 = peg$currPos;
|
|
1293
|
-
|
|
1294
|
-
|
|
1320
|
+
rule$expects(peg$e26);
|
|
1321
|
+
if (input.substr(peg$currPos, 6) === peg$c26) {
|
|
1322
|
+
s1 = peg$c26;
|
|
1295
1323
|
peg$currPos += 6;
|
|
1296
1324
|
} else {
|
|
1297
1325
|
s1 = peg$FAILED;
|
|
1298
|
-
if (peg$silentFails === 0) { peg$fail(peg$c53); }
|
|
1299
1326
|
}
|
|
1300
1327
|
if (s1 !== peg$FAILED) {
|
|
1301
1328
|
s2 = peg$parseName();
|
|
@@ -1317,13 +1344,17 @@ function peg$parse(input, options) {
|
|
|
1317
1344
|
function peg$parsePathReference() {
|
|
1318
1345
|
var s0, s1, s2;
|
|
1319
1346
|
|
|
1347
|
+
var rule$expects = function (expected) {
|
|
1348
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1320
1351
|
s0 = peg$currPos;
|
|
1321
|
-
|
|
1322
|
-
|
|
1352
|
+
rule$expects(peg$e27);
|
|
1353
|
+
if (input.substr(peg$currPos, 5) === peg$c27) {
|
|
1354
|
+
s1 = peg$c27;
|
|
1323
1355
|
peg$currPos += 5;
|
|
1324
1356
|
} else {
|
|
1325
1357
|
s1 = peg$FAILED;
|
|
1326
|
-
if (peg$silentFails === 0) { peg$fail(peg$c55); }
|
|
1327
1358
|
}
|
|
1328
1359
|
if (s1 !== peg$FAILED) {
|
|
1329
1360
|
s2 = peg$parseName();
|
|
@@ -1345,26 +1376,25 @@ function peg$parse(input, options) {
|
|
|
1345
1376
|
function peg$parseBodyReference() {
|
|
1346
1377
|
var s0, s1, s2;
|
|
1347
1378
|
|
|
1379
|
+
var rule$expects = function (expected) {
|
|
1380
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1348
1383
|
s0 = peg$currPos;
|
|
1349
|
-
|
|
1350
|
-
|
|
1384
|
+
rule$expects(peg$e28);
|
|
1385
|
+
if (input.substr(peg$currPos, 4) === peg$c28) {
|
|
1386
|
+
s1 = peg$c28;
|
|
1351
1387
|
peg$currPos += 4;
|
|
1352
1388
|
} else {
|
|
1353
1389
|
s1 = peg$FAILED;
|
|
1354
|
-
if (peg$silentFails === 0) { peg$fail(peg$c57); }
|
|
1355
1390
|
}
|
|
1356
1391
|
if (s1 !== peg$FAILED) {
|
|
1357
1392
|
s2 = peg$parsejsonPointer();
|
|
1358
1393
|
if (s2 === peg$FAILED) {
|
|
1359
1394
|
s2 = null;
|
|
1360
1395
|
}
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
s0 = s1;
|
|
1364
|
-
} else {
|
|
1365
|
-
peg$currPos = s0;
|
|
1366
|
-
s0 = peg$FAILED;
|
|
1367
|
-
}
|
|
1396
|
+
s1 = [s1, s2];
|
|
1397
|
+
s0 = s1;
|
|
1368
1398
|
} else {
|
|
1369
1399
|
peg$currPos = s0;
|
|
1370
1400
|
s0 = peg$FAILED;
|
|
@@ -1376,13 +1406,17 @@ function peg$parse(input, options) {
|
|
|
1376
1406
|
function peg$parsejsonPointer() {
|
|
1377
1407
|
var s0, s1, s2, s3;
|
|
1378
1408
|
|
|
1409
|
+
var rule$expects = function (expected) {
|
|
1410
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1379
1413
|
s0 = peg$currPos;
|
|
1414
|
+
rule$expects(peg$e29);
|
|
1380
1415
|
if (input.charCodeAt(peg$currPos) === 35) {
|
|
1381
|
-
s1 = peg$
|
|
1416
|
+
s1 = peg$c29;
|
|
1382
1417
|
peg$currPos++;
|
|
1383
1418
|
} else {
|
|
1384
1419
|
s1 = peg$FAILED;
|
|
1385
|
-
if (peg$silentFails === 0) { peg$fail(peg$c59); }
|
|
1386
1420
|
}
|
|
1387
1421
|
if (s1 !== peg$FAILED) {
|
|
1388
1422
|
s2 = [];
|
|
@@ -1391,13 +1425,8 @@ function peg$parse(input, options) {
|
|
|
1391
1425
|
s2.push(s3);
|
|
1392
1426
|
s3 = peg$parseJsonPathSegment();
|
|
1393
1427
|
}
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
s0 = s1;
|
|
1397
|
-
} else {
|
|
1398
|
-
peg$currPos = s0;
|
|
1399
|
-
s0 = peg$FAILED;
|
|
1400
|
-
}
|
|
1428
|
+
s1 = [s1, s2];
|
|
1429
|
+
s0 = s1;
|
|
1401
1430
|
} else {
|
|
1402
1431
|
peg$currPos = s0;
|
|
1403
1432
|
s0 = peg$FAILED;
|
|
@@ -1409,13 +1438,17 @@ function peg$parse(input, options) {
|
|
|
1409
1438
|
function peg$parseJsonPathSegment() {
|
|
1410
1439
|
var s0, s1, s2, s3;
|
|
1411
1440
|
|
|
1441
|
+
var rule$expects = function (expected) {
|
|
1442
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1412
1445
|
s0 = peg$currPos;
|
|
1446
|
+
rule$expects(peg$e30);
|
|
1413
1447
|
if (input.charCodeAt(peg$currPos) === 47) {
|
|
1414
|
-
s1 = peg$
|
|
1448
|
+
s1 = peg$c30;
|
|
1415
1449
|
peg$currPos++;
|
|
1416
1450
|
} else {
|
|
1417
1451
|
s1 = peg$FAILED;
|
|
1418
|
-
if (peg$silentFails === 0) { peg$fail(peg$c61); }
|
|
1419
1452
|
}
|
|
1420
1453
|
if (s1 !== peg$FAILED) {
|
|
1421
1454
|
s2 = [];
|
|
@@ -1430,13 +1463,8 @@ function peg$parse(input, options) {
|
|
|
1430
1463
|
s3 = peg$parseEscaped();
|
|
1431
1464
|
}
|
|
1432
1465
|
}
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
s0 = s1;
|
|
1436
|
-
} else {
|
|
1437
|
-
peg$currPos = s0;
|
|
1438
|
-
s0 = peg$FAILED;
|
|
1439
|
-
}
|
|
1466
|
+
s1 = [s1, s2];
|
|
1467
|
+
s0 = s1;
|
|
1440
1468
|
} else {
|
|
1441
1469
|
peg$currPos = s0;
|
|
1442
1470
|
s0 = peg$FAILED;
|
|
@@ -1448,12 +1476,16 @@ function peg$parse(input, options) {
|
|
|
1448
1476
|
function peg$parseUnescaped() {
|
|
1449
1477
|
var s0;
|
|
1450
1478
|
|
|
1451
|
-
|
|
1479
|
+
var rule$expects = function (expected) {
|
|
1480
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
rule$expects(peg$e31);
|
|
1484
|
+
if (peg$r0.test(input.charAt(peg$currPos))) {
|
|
1452
1485
|
s0 = input.charAt(peg$currPos);
|
|
1453
1486
|
peg$currPos++;
|
|
1454
1487
|
} else {
|
|
1455
1488
|
s0 = peg$FAILED;
|
|
1456
|
-
if (peg$silentFails === 0) { peg$fail(peg$c63); }
|
|
1457
1489
|
}
|
|
1458
1490
|
|
|
1459
1491
|
return s0;
|
|
@@ -1462,29 +1494,33 @@ function peg$parse(input, options) {
|
|
|
1462
1494
|
function peg$parseEscaped() {
|
|
1463
1495
|
var s0, s1, s2;
|
|
1464
1496
|
|
|
1497
|
+
var rule$expects = function (expected) {
|
|
1498
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1465
1501
|
s0 = peg$currPos;
|
|
1502
|
+
rule$expects(peg$e32);
|
|
1466
1503
|
if (input.charCodeAt(peg$currPos) === 126) {
|
|
1467
|
-
s1 = peg$
|
|
1504
|
+
s1 = peg$c31;
|
|
1468
1505
|
peg$currPos++;
|
|
1469
1506
|
} else {
|
|
1470
1507
|
s1 = peg$FAILED;
|
|
1471
|
-
if (peg$silentFails === 0) { peg$fail(peg$c65); }
|
|
1472
1508
|
}
|
|
1473
1509
|
if (s1 !== peg$FAILED) {
|
|
1510
|
+
rule$expects(peg$e33);
|
|
1474
1511
|
if (input.charCodeAt(peg$currPos) === 48) {
|
|
1475
|
-
s2 = peg$
|
|
1512
|
+
s2 = peg$c32;
|
|
1476
1513
|
peg$currPos++;
|
|
1477
1514
|
} else {
|
|
1478
1515
|
s2 = peg$FAILED;
|
|
1479
|
-
if (peg$silentFails === 0) { peg$fail(peg$c67); }
|
|
1480
1516
|
}
|
|
1481
1517
|
if (s2 === peg$FAILED) {
|
|
1518
|
+
rule$expects(peg$e34);
|
|
1482
1519
|
if (input.charCodeAt(peg$currPos) === 49) {
|
|
1483
|
-
s2 = peg$
|
|
1520
|
+
s2 = peg$c33;
|
|
1484
1521
|
peg$currPos++;
|
|
1485
1522
|
} else {
|
|
1486
1523
|
s2 = peg$FAILED;
|
|
1487
|
-
if (peg$silentFails === 0) { peg$fail(peg$c69); }
|
|
1488
1524
|
}
|
|
1489
1525
|
}
|
|
1490
1526
|
if (s2 !== peg$FAILED) {
|
|
@@ -1505,40 +1541,39 @@ function peg$parse(input, options) {
|
|
|
1505
1541
|
function peg$parseName() {
|
|
1506
1542
|
var s0, s1, s2, s3;
|
|
1507
1543
|
|
|
1544
|
+
var rule$expects = function (expected) {
|
|
1545
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1508
1548
|
s0 = peg$currPos;
|
|
1509
|
-
|
|
1549
|
+
rule$expects(peg$e35);
|
|
1550
|
+
if (peg$r1.test(input.charAt(peg$currPos))) {
|
|
1510
1551
|
s1 = input.charAt(peg$currPos);
|
|
1511
1552
|
peg$currPos++;
|
|
1512
1553
|
} else {
|
|
1513
1554
|
s1 = peg$FAILED;
|
|
1514
|
-
if (peg$silentFails === 0) { peg$fail(peg$c71); }
|
|
1515
1555
|
}
|
|
1516
1556
|
if (s1 !== peg$FAILED) {
|
|
1517
1557
|
s2 = [];
|
|
1518
|
-
|
|
1558
|
+
rule$expects(peg$e36);
|
|
1559
|
+
if (peg$r2.test(input.charAt(peg$currPos))) {
|
|
1519
1560
|
s3 = input.charAt(peg$currPos);
|
|
1520
1561
|
peg$currPos++;
|
|
1521
1562
|
} else {
|
|
1522
1563
|
s3 = peg$FAILED;
|
|
1523
|
-
if (peg$silentFails === 0) { peg$fail(peg$c73); }
|
|
1524
1564
|
}
|
|
1525
1565
|
while (s3 !== peg$FAILED) {
|
|
1526
1566
|
s2.push(s3);
|
|
1527
|
-
|
|
1567
|
+
rule$expects(peg$e36);
|
|
1568
|
+
if (peg$r2.test(input.charAt(peg$currPos))) {
|
|
1528
1569
|
s3 = input.charAt(peg$currPos);
|
|
1529
1570
|
peg$currPos++;
|
|
1530
1571
|
} else {
|
|
1531
1572
|
s3 = peg$FAILED;
|
|
1532
|
-
if (peg$silentFails === 0) { peg$fail(peg$c73); }
|
|
1533
1573
|
}
|
|
1534
1574
|
}
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
s0 = s1;
|
|
1538
|
-
} else {
|
|
1539
|
-
peg$currPos = s0;
|
|
1540
|
-
s0 = peg$FAILED;
|
|
1541
|
-
}
|
|
1575
|
+
s1 = [s1, s2];
|
|
1576
|
+
s0 = s1;
|
|
1542
1577
|
} else {
|
|
1543
1578
|
peg$currPos = s0;
|
|
1544
1579
|
s0 = peg$FAILED;
|
|
@@ -1550,23 +1585,27 @@ function peg$parse(input, options) {
|
|
|
1550
1585
|
function peg$parseToken() {
|
|
1551
1586
|
var s0, s1;
|
|
1552
1587
|
|
|
1588
|
+
var rule$expects = function (expected) {
|
|
1589
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1553
1592
|
s0 = [];
|
|
1554
|
-
|
|
1593
|
+
rule$expects(peg$e37);
|
|
1594
|
+
if (peg$r3.test(input.charAt(peg$currPos))) {
|
|
1555
1595
|
s1 = input.charAt(peg$currPos);
|
|
1556
1596
|
peg$currPos++;
|
|
1557
1597
|
} else {
|
|
1558
1598
|
s1 = peg$FAILED;
|
|
1559
|
-
if (peg$silentFails === 0) { peg$fail(peg$c75); }
|
|
1560
1599
|
}
|
|
1561
1600
|
if (s1 !== peg$FAILED) {
|
|
1562
1601
|
while (s1 !== peg$FAILED) {
|
|
1563
1602
|
s0.push(s1);
|
|
1564
|
-
|
|
1603
|
+
rule$expects(peg$e37);
|
|
1604
|
+
if (peg$r3.test(input.charAt(peg$currPos))) {
|
|
1565
1605
|
s1 = input.charAt(peg$currPos);
|
|
1566
1606
|
peg$currPos++;
|
|
1567
1607
|
} else {
|
|
1568
1608
|
s1 = peg$FAILED;
|
|
1569
|
-
if (peg$silentFails === 0) { peg$fail(peg$c75); }
|
|
1570
1609
|
}
|
|
1571
1610
|
}
|
|
1572
1611
|
} else {
|
|
@@ -1579,6 +1618,10 @@ function peg$parse(input, options) {
|
|
|
1579
1618
|
function peg$parseValue() {
|
|
1580
1619
|
var s0;
|
|
1581
1620
|
|
|
1621
|
+
var rule$expects = function (expected) {
|
|
1622
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1582
1625
|
s0 = peg$parseArray();
|
|
1583
1626
|
if (s0 === peg$FAILED) {
|
|
1584
1627
|
s0 = peg$parseNumber();
|
|
@@ -1602,31 +1645,30 @@ function peg$parse(input, options) {
|
|
|
1602
1645
|
function peg$parseArray() {
|
|
1603
1646
|
var s0, s1, s2, s3;
|
|
1604
1647
|
|
|
1648
|
+
var rule$expects = function (expected) {
|
|
1649
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1605
1652
|
s0 = peg$currPos;
|
|
1653
|
+
rule$expects(peg$e38);
|
|
1606
1654
|
if (input.charCodeAt(peg$currPos) === 91) {
|
|
1607
|
-
s1 = peg$
|
|
1655
|
+
s1 = peg$c34;
|
|
1608
1656
|
peg$currPos++;
|
|
1609
1657
|
} else {
|
|
1610
1658
|
s1 = peg$FAILED;
|
|
1611
|
-
if (peg$silentFails === 0) { peg$fail(peg$c77); }
|
|
1612
1659
|
}
|
|
1613
1660
|
if (s1 !== peg$FAILED) {
|
|
1614
1661
|
s2 = peg$parse_();
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
s0 = s1;
|
|
1626
|
-
} else {
|
|
1627
|
-
peg$currPos = s0;
|
|
1628
|
-
s0 = peg$FAILED;
|
|
1629
|
-
}
|
|
1662
|
+
rule$expects(peg$e39);
|
|
1663
|
+
if (input.charCodeAt(peg$currPos) === 93) {
|
|
1664
|
+
s3 = peg$c35;
|
|
1665
|
+
peg$currPos++;
|
|
1666
|
+
} else {
|
|
1667
|
+
s3 = peg$FAILED;
|
|
1668
|
+
}
|
|
1669
|
+
if (s3 !== peg$FAILED) {
|
|
1670
|
+
s1 = [s1, s2, s3];
|
|
1671
|
+
s0 = s1;
|
|
1630
1672
|
} else {
|
|
1631
1673
|
peg$currPos = s0;
|
|
1632
1674
|
s0 = peg$FAILED;
|
|
@@ -1642,16 +1684,20 @@ function peg$parse(input, options) {
|
|
|
1642
1684
|
function peg$parseNumber() {
|
|
1643
1685
|
var s0, s1, s2, s3, s4;
|
|
1644
1686
|
|
|
1687
|
+
var rule$expects = function (expected) {
|
|
1688
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1645
1691
|
s0 = peg$currPos;
|
|
1646
1692
|
s1 = peg$parseInteger();
|
|
1647
1693
|
if (s1 !== peg$FAILED) {
|
|
1648
1694
|
s2 = peg$currPos;
|
|
1695
|
+
rule$expects(peg$e23);
|
|
1649
1696
|
if (input.charCodeAt(peg$currPos) === 46) {
|
|
1650
|
-
s3 = peg$
|
|
1697
|
+
s3 = peg$c23;
|
|
1651
1698
|
peg$currPos++;
|
|
1652
1699
|
} else {
|
|
1653
1700
|
s3 = peg$FAILED;
|
|
1654
|
-
if (peg$silentFails === 0) { peg$fail(peg$c47); }
|
|
1655
1701
|
}
|
|
1656
1702
|
if (s3 !== peg$FAILED) {
|
|
1657
1703
|
s4 = peg$parseDigits();
|
|
@@ -1669,13 +1715,8 @@ function peg$parse(input, options) {
|
|
|
1669
1715
|
if (s2 === peg$FAILED) {
|
|
1670
1716
|
s2 = null;
|
|
1671
1717
|
}
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
s0 = s1;
|
|
1675
|
-
} else {
|
|
1676
|
-
peg$currPos = s0;
|
|
1677
|
-
s0 = peg$FAILED;
|
|
1678
|
-
}
|
|
1718
|
+
s1 = [s1, s2];
|
|
1719
|
+
s0 = s1;
|
|
1679
1720
|
} else {
|
|
1680
1721
|
peg$currPos = s0;
|
|
1681
1722
|
s0 = peg$FAILED;
|
|
@@ -1687,48 +1728,47 @@ function peg$parse(input, options) {
|
|
|
1687
1728
|
function peg$parseInteger() {
|
|
1688
1729
|
var s0, s1, s2, s3;
|
|
1689
1730
|
|
|
1731
|
+
var rule$expects = function (expected) {
|
|
1732
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
rule$expects(peg$e33);
|
|
1690
1736
|
if (input.charCodeAt(peg$currPos) === 48) {
|
|
1691
|
-
s0 = peg$
|
|
1737
|
+
s0 = peg$c32;
|
|
1692
1738
|
peg$currPos++;
|
|
1693
1739
|
} else {
|
|
1694
1740
|
s0 = peg$FAILED;
|
|
1695
|
-
if (peg$silentFails === 0) { peg$fail(peg$c67); }
|
|
1696
1741
|
}
|
|
1697
1742
|
if (s0 === peg$FAILED) {
|
|
1698
1743
|
s0 = peg$currPos;
|
|
1699
|
-
|
|
1744
|
+
rule$expects(peg$e40);
|
|
1745
|
+
if (peg$r4.test(input.charAt(peg$currPos))) {
|
|
1700
1746
|
s1 = input.charAt(peg$currPos);
|
|
1701
1747
|
peg$currPos++;
|
|
1702
1748
|
} else {
|
|
1703
1749
|
s1 = peg$FAILED;
|
|
1704
|
-
if (peg$silentFails === 0) { peg$fail(peg$c81); }
|
|
1705
1750
|
}
|
|
1706
1751
|
if (s1 !== peg$FAILED) {
|
|
1707
1752
|
s2 = [];
|
|
1708
|
-
|
|
1753
|
+
rule$expects(peg$e41);
|
|
1754
|
+
if (peg$r5.test(input.charAt(peg$currPos))) {
|
|
1709
1755
|
s3 = input.charAt(peg$currPos);
|
|
1710
1756
|
peg$currPos++;
|
|
1711
1757
|
} else {
|
|
1712
1758
|
s3 = peg$FAILED;
|
|
1713
|
-
if (peg$silentFails === 0) { peg$fail(peg$c83); }
|
|
1714
1759
|
}
|
|
1715
1760
|
while (s3 !== peg$FAILED) {
|
|
1716
1761
|
s2.push(s3);
|
|
1717
|
-
|
|
1762
|
+
rule$expects(peg$e41);
|
|
1763
|
+
if (peg$r5.test(input.charAt(peg$currPos))) {
|
|
1718
1764
|
s3 = input.charAt(peg$currPos);
|
|
1719
1765
|
peg$currPos++;
|
|
1720
1766
|
} else {
|
|
1721
1767
|
s3 = peg$FAILED;
|
|
1722
|
-
if (peg$silentFails === 0) { peg$fail(peg$c83); }
|
|
1723
1768
|
}
|
|
1724
1769
|
}
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
s0 = s1;
|
|
1728
|
-
} else {
|
|
1729
|
-
peg$currPos = s0;
|
|
1730
|
-
s0 = peg$FAILED;
|
|
1731
|
-
}
|
|
1770
|
+
s1 = [s1, s2];
|
|
1771
|
+
s0 = s1;
|
|
1732
1772
|
} else {
|
|
1733
1773
|
peg$currPos = s0;
|
|
1734
1774
|
s0 = peg$FAILED;
|
|
@@ -1741,23 +1781,27 @@ function peg$parse(input, options) {
|
|
|
1741
1781
|
function peg$parseDigits() {
|
|
1742
1782
|
var s0, s1;
|
|
1743
1783
|
|
|
1784
|
+
var rule$expects = function (expected) {
|
|
1785
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1744
1788
|
s0 = [];
|
|
1745
|
-
|
|
1789
|
+
rule$expects(peg$e41);
|
|
1790
|
+
if (peg$r5.test(input.charAt(peg$currPos))) {
|
|
1746
1791
|
s1 = input.charAt(peg$currPos);
|
|
1747
1792
|
peg$currPos++;
|
|
1748
1793
|
} else {
|
|
1749
1794
|
s1 = peg$FAILED;
|
|
1750
|
-
if (peg$silentFails === 0) { peg$fail(peg$c83); }
|
|
1751
1795
|
}
|
|
1752
1796
|
if (s1 !== peg$FAILED) {
|
|
1753
1797
|
while (s1 !== peg$FAILED) {
|
|
1754
1798
|
s0.push(s1);
|
|
1755
|
-
|
|
1799
|
+
rule$expects(peg$e41);
|
|
1800
|
+
if (peg$r5.test(input.charAt(peg$currPos))) {
|
|
1756
1801
|
s1 = input.charAt(peg$currPos);
|
|
1757
1802
|
peg$currPos++;
|
|
1758
1803
|
} else {
|
|
1759
1804
|
s1 = peg$FAILED;
|
|
1760
|
-
if (peg$silentFails === 0) { peg$fail(peg$c83); }
|
|
1761
1805
|
}
|
|
1762
1806
|
}
|
|
1763
1807
|
} else {
|
|
@@ -1770,6 +1814,10 @@ function peg$parse(input, options) {
|
|
|
1770
1814
|
function peg$parseString() {
|
|
1771
1815
|
var s0;
|
|
1772
1816
|
|
|
1817
|
+
var rule$expects = function (expected) {
|
|
1818
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1773
1821
|
s0 = peg$parseDoubleQuotedString();
|
|
1774
1822
|
if (s0 === peg$FAILED) {
|
|
1775
1823
|
s0 = peg$parseSingleQuotedString();
|
|
@@ -1781,48 +1829,47 @@ function peg$parse(input, options) {
|
|
|
1781
1829
|
function peg$parseDoubleQuotedString() {
|
|
1782
1830
|
var s0, s1, s2, s3;
|
|
1783
1831
|
|
|
1832
|
+
var rule$expects = function (expected) {
|
|
1833
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1784
1836
|
s0 = peg$currPos;
|
|
1837
|
+
rule$expects(peg$e42);
|
|
1785
1838
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
1786
|
-
s1 = peg$
|
|
1839
|
+
s1 = peg$c36;
|
|
1787
1840
|
peg$currPos++;
|
|
1788
1841
|
} else {
|
|
1789
1842
|
s1 = peg$FAILED;
|
|
1790
|
-
if (peg$silentFails === 0) { peg$fail(peg$c85); }
|
|
1791
1843
|
}
|
|
1792
1844
|
if (s1 !== peg$FAILED) {
|
|
1793
1845
|
s2 = [];
|
|
1794
|
-
|
|
1846
|
+
rule$expects(peg$e43);
|
|
1847
|
+
if (peg$r6.test(input.charAt(peg$currPos))) {
|
|
1795
1848
|
s3 = input.charAt(peg$currPos);
|
|
1796
1849
|
peg$currPos++;
|
|
1797
1850
|
} else {
|
|
1798
1851
|
s3 = peg$FAILED;
|
|
1799
|
-
if (peg$silentFails === 0) { peg$fail(peg$c87); }
|
|
1800
1852
|
}
|
|
1801
1853
|
while (s3 !== peg$FAILED) {
|
|
1802
1854
|
s2.push(s3);
|
|
1803
|
-
|
|
1855
|
+
rule$expects(peg$e43);
|
|
1856
|
+
if (peg$r6.test(input.charAt(peg$currPos))) {
|
|
1804
1857
|
s3 = input.charAt(peg$currPos);
|
|
1805
1858
|
peg$currPos++;
|
|
1806
1859
|
} else {
|
|
1807
1860
|
s3 = peg$FAILED;
|
|
1808
|
-
if (peg$silentFails === 0) { peg$fail(peg$c87); }
|
|
1809
1861
|
}
|
|
1810
1862
|
}
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
s0 = s1;
|
|
1822
|
-
} else {
|
|
1823
|
-
peg$currPos = s0;
|
|
1824
|
-
s0 = peg$FAILED;
|
|
1825
|
-
}
|
|
1863
|
+
rule$expects(peg$e42);
|
|
1864
|
+
if (input.charCodeAt(peg$currPos) === 34) {
|
|
1865
|
+
s3 = peg$c36;
|
|
1866
|
+
peg$currPos++;
|
|
1867
|
+
} else {
|
|
1868
|
+
s3 = peg$FAILED;
|
|
1869
|
+
}
|
|
1870
|
+
if (s3 !== peg$FAILED) {
|
|
1871
|
+
s1 = [s1, s2, s3];
|
|
1872
|
+
s0 = s1;
|
|
1826
1873
|
} else {
|
|
1827
1874
|
peg$currPos = s0;
|
|
1828
1875
|
s0 = peg$FAILED;
|
|
@@ -1838,48 +1885,47 @@ function peg$parse(input, options) {
|
|
|
1838
1885
|
function peg$parseSingleQuotedString() {
|
|
1839
1886
|
var s0, s1, s2, s3;
|
|
1840
1887
|
|
|
1888
|
+
var rule$expects = function (expected) {
|
|
1889
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1841
1892
|
s0 = peg$currPos;
|
|
1893
|
+
rule$expects(peg$e44);
|
|
1842
1894
|
if (input.charCodeAt(peg$currPos) === 39) {
|
|
1843
|
-
s1 = peg$
|
|
1895
|
+
s1 = peg$c37;
|
|
1844
1896
|
peg$currPos++;
|
|
1845
1897
|
} else {
|
|
1846
1898
|
s1 = peg$FAILED;
|
|
1847
|
-
if (peg$silentFails === 0) { peg$fail(peg$c89); }
|
|
1848
1899
|
}
|
|
1849
1900
|
if (s1 !== peg$FAILED) {
|
|
1850
1901
|
s2 = [];
|
|
1851
|
-
|
|
1902
|
+
rule$expects(peg$e45);
|
|
1903
|
+
if (peg$r7.test(input.charAt(peg$currPos))) {
|
|
1852
1904
|
s3 = input.charAt(peg$currPos);
|
|
1853
1905
|
peg$currPos++;
|
|
1854
1906
|
} else {
|
|
1855
1907
|
s3 = peg$FAILED;
|
|
1856
|
-
if (peg$silentFails === 0) { peg$fail(peg$c91); }
|
|
1857
1908
|
}
|
|
1858
1909
|
while (s3 !== peg$FAILED) {
|
|
1859
1910
|
s2.push(s3);
|
|
1860
|
-
|
|
1911
|
+
rule$expects(peg$e45);
|
|
1912
|
+
if (peg$r7.test(input.charAt(peg$currPos))) {
|
|
1861
1913
|
s3 = input.charAt(peg$currPos);
|
|
1862
1914
|
peg$currPos++;
|
|
1863
1915
|
} else {
|
|
1864
1916
|
s3 = peg$FAILED;
|
|
1865
|
-
if (peg$silentFails === 0) { peg$fail(peg$c91); }
|
|
1866
1917
|
}
|
|
1867
1918
|
}
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
s0 = s1;
|
|
1879
|
-
} else {
|
|
1880
|
-
peg$currPos = s0;
|
|
1881
|
-
s0 = peg$FAILED;
|
|
1882
|
-
}
|
|
1919
|
+
rule$expects(peg$e44);
|
|
1920
|
+
if (input.charCodeAt(peg$currPos) === 39) {
|
|
1921
|
+
s3 = peg$c37;
|
|
1922
|
+
peg$currPos++;
|
|
1923
|
+
} else {
|
|
1924
|
+
s3 = peg$FAILED;
|
|
1925
|
+
}
|
|
1926
|
+
if (s3 !== peg$FAILED) {
|
|
1927
|
+
s1 = [s1, s2, s3];
|
|
1928
|
+
s0 = s1;
|
|
1883
1929
|
} else {
|
|
1884
1930
|
peg$currPos = s0;
|
|
1885
1931
|
s0 = peg$FAILED;
|
|
@@ -1895,20 +1941,24 @@ function peg$parse(input, options) {
|
|
|
1895
1941
|
function peg$parseBoolean() {
|
|
1896
1942
|
var s0;
|
|
1897
1943
|
|
|
1898
|
-
|
|
1899
|
-
|
|
1944
|
+
var rule$expects = function (expected) {
|
|
1945
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
rule$expects(peg$e46);
|
|
1949
|
+
if (input.substr(peg$currPos, 4) === peg$c38) {
|
|
1950
|
+
s0 = peg$c38;
|
|
1900
1951
|
peg$currPos += 4;
|
|
1901
1952
|
} else {
|
|
1902
1953
|
s0 = peg$FAILED;
|
|
1903
|
-
if (peg$silentFails === 0) { peg$fail(peg$c93); }
|
|
1904
1954
|
}
|
|
1905
1955
|
if (s0 === peg$FAILED) {
|
|
1906
|
-
|
|
1907
|
-
|
|
1956
|
+
rule$expects(peg$e47);
|
|
1957
|
+
if (input.substr(peg$currPos, 5) === peg$c39) {
|
|
1958
|
+
s0 = peg$c39;
|
|
1908
1959
|
peg$currPos += 5;
|
|
1909
1960
|
} else {
|
|
1910
1961
|
s0 = peg$FAILED;
|
|
1911
|
-
if (peg$silentFails === 0) { peg$fail(peg$c95); }
|
|
1912
1962
|
}
|
|
1913
1963
|
}
|
|
1914
1964
|
|
|
@@ -1918,12 +1968,16 @@ function peg$parse(input, options) {
|
|
|
1918
1968
|
function peg$parseNull() {
|
|
1919
1969
|
var s0;
|
|
1920
1970
|
|
|
1921
|
-
|
|
1922
|
-
|
|
1971
|
+
var rule$expects = function (expected) {
|
|
1972
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
rule$expects(peg$e48);
|
|
1976
|
+
if (input.substr(peg$currPos, 4) === peg$c40) {
|
|
1977
|
+
s0 = peg$c40;
|
|
1923
1978
|
peg$currPos += 4;
|
|
1924
1979
|
} else {
|
|
1925
1980
|
s0 = peg$FAILED;
|
|
1926
|
-
if (peg$silentFails === 0) { peg$fail(peg$c97); }
|
|
1927
1981
|
}
|
|
1928
1982
|
|
|
1929
1983
|
return s0;
|
|
@@ -1932,12 +1986,16 @@ function peg$parse(input, options) {
|
|
|
1932
1986
|
function peg$parseUndefined() {
|
|
1933
1987
|
var s0;
|
|
1934
1988
|
|
|
1935
|
-
|
|
1936
|
-
|
|
1989
|
+
var rule$expects = function (expected) {
|
|
1990
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
rule$expects(peg$e49);
|
|
1994
|
+
if (input.substr(peg$currPos, 9) === peg$c41) {
|
|
1995
|
+
s0 = peg$c41;
|
|
1937
1996
|
peg$currPos += 9;
|
|
1938
1997
|
} else {
|
|
1939
1998
|
s0 = peg$FAILED;
|
|
1940
|
-
if (peg$silentFails === 0) { peg$fail(peg$c99); }
|
|
1941
1999
|
}
|
|
1942
2000
|
|
|
1943
2001
|
return s0;
|
|
@@ -1946,48 +2004,52 @@ function peg$parse(input, options) {
|
|
|
1946
2004
|
function peg$parse_() {
|
|
1947
2005
|
var s0, s1;
|
|
1948
2006
|
|
|
2007
|
+
var rule$expects = function (expected) {
|
|
2008
|
+
if (peg$silentFails === 0) peg$expect(expected);
|
|
2009
|
+
}
|
|
2010
|
+
|
|
1949
2011
|
s0 = [];
|
|
1950
|
-
|
|
2012
|
+
rule$expects(peg$e50);
|
|
2013
|
+
if (peg$r8.test(input.charAt(peg$currPos))) {
|
|
1951
2014
|
s1 = input.charAt(peg$currPos);
|
|
1952
2015
|
peg$currPos++;
|
|
1953
2016
|
} else {
|
|
1954
2017
|
s1 = peg$FAILED;
|
|
1955
|
-
if (peg$silentFails === 0) { peg$fail(peg$c101); }
|
|
1956
2018
|
}
|
|
1957
2019
|
while (s1 !== peg$FAILED) {
|
|
1958
2020
|
s0.push(s1);
|
|
1959
|
-
|
|
2021
|
+
rule$expects(peg$e50);
|
|
2022
|
+
if (peg$r8.test(input.charAt(peg$currPos))) {
|
|
1960
2023
|
s1 = input.charAt(peg$currPos);
|
|
1961
2024
|
peg$currPos++;
|
|
1962
2025
|
} else {
|
|
1963
2026
|
s1 = peg$FAILED;
|
|
1964
|
-
if (peg$silentFails === 0) { peg$fail(peg$c101); }
|
|
1965
2027
|
}
|
|
1966
2028
|
}
|
|
1967
2029
|
|
|
1968
2030
|
return s0;
|
|
1969
2031
|
}
|
|
1970
2032
|
|
|
2033
|
+
peg$begin();
|
|
1971
2034
|
peg$result = peg$startRuleFunction();
|
|
1972
2035
|
|
|
1973
2036
|
if (peg$result !== peg$FAILED && peg$currPos === input.length) {
|
|
1974
2037
|
return peg$result;
|
|
1975
2038
|
} else {
|
|
1976
2039
|
if (peg$result !== peg$FAILED && peg$currPos < input.length) {
|
|
1977
|
-
peg$
|
|
2040
|
+
peg$expect(peg$endExpectation());
|
|
1978
2041
|
}
|
|
1979
2042
|
|
|
1980
|
-
throw peg$
|
|
1981
|
-
peg$maxFailExpected,
|
|
1982
|
-
peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,
|
|
1983
|
-
peg$maxFailPos < input.length
|
|
1984
|
-
? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
|
|
1985
|
-
: peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
|
|
1986
|
-
);
|
|
2043
|
+
throw peg$buildError();
|
|
1987
2044
|
}
|
|
1988
2045
|
}
|
|
1989
2046
|
|
|
1990
|
-
|
|
2047
|
+
export {
|
|
2048
|
+
peg$SyntaxError as SyntaxError,
|
|
2049
|
+
peg$parse as parse
|
|
2050
|
+
};
|
|
2051
|
+
|
|
2052
|
+
export default {
|
|
1991
2053
|
SyntaxError: peg$SyntaxError,
|
|
1992
|
-
parse:
|
|
2054
|
+
parse: peg$parse
|
|
1993
2055
|
};
|