capdag 1.419.4 → 1.439.69
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/README.md +56 -4
- package/cap-fab-renderer.js +216 -74
- package/capdag.js +4239 -1115
- package/formal/index.d.ts +4 -1
- package/formal/index.js +5742 -2
- package/formal/program.wasm +0 -0
- package/machine-parser.js +1547 -234
- package/machine.pegjs +112 -17
- package/package.json +4 -4
package/machine-parser.js
CHANGED
|
@@ -166,58 +166,146 @@ function peg$parse(input, options) {
|
|
|
166
166
|
|
|
167
167
|
const peg$c0 = "[";
|
|
168
168
|
const peg$c1 = "]";
|
|
169
|
-
const peg$c2 = "
|
|
170
|
-
const peg$c3 = "
|
|
171
|
-
const peg$c4 = "
|
|
172
|
-
const peg$c5 = "
|
|
173
|
-
const peg$c6 = "
|
|
174
|
-
const peg$c7 = "
|
|
175
|
-
const peg$c8 = "
|
|
176
|
-
const peg$c9 = "
|
|
177
|
-
const peg$c10 = "
|
|
178
|
-
const peg$c11 = "
|
|
169
|
+
const peg$c2 = "machine";
|
|
170
|
+
const peg$c3 = "(";
|
|
171
|
+
const peg$c4 = ",";
|
|
172
|
+
const peg$c5 = ")";
|
|
173
|
+
const peg$c6 = "=";
|
|
174
|
+
const peg$c7 = "{";
|
|
175
|
+
const peg$c8 = "}";
|
|
176
|
+
const peg$c9 = "-";
|
|
177
|
+
const peg$c10 = ">";
|
|
178
|
+
const peg$c11 = "true";
|
|
179
|
+
const peg$c12 = "false";
|
|
180
|
+
const peg$c13 = "null";
|
|
181
|
+
const peg$c14 = ":";
|
|
182
|
+
const peg$c15 = "0";
|
|
183
|
+
const peg$c16 = ".";
|
|
184
|
+
const peg$c17 = "\"";
|
|
185
|
+
const peg$c18 = "\\";
|
|
186
|
+
const peg$c19 = "\\u";
|
|
187
|
+
const peg$c20 = "cap:";
|
|
188
|
+
const peg$c21 = "\r\n";
|
|
189
|
+
const peg$c22 = "\\\"";
|
|
190
|
+
const peg$c23 = "\\\\";
|
|
179
191
|
|
|
180
192
|
const peg$r0 = /^[a-zA-Z_]/;
|
|
181
193
|
const peg$r1 = /^[a-zA-Z0-9_\-]/;
|
|
182
|
-
const peg$r2 = /^[
|
|
183
|
-
const peg$r3 = /^[
|
|
194
|
+
const peg$r2 = /^[1-9]/;
|
|
195
|
+
const peg$r3 = /^[0-9]/;
|
|
196
|
+
const peg$r4 = /^[eE]/;
|
|
197
|
+
const peg$r5 = /^[+\-]/;
|
|
198
|
+
const peg$r6 = /^[^"\\\0-\x1F]/;
|
|
199
|
+
const peg$r7 = /^["\\\/bfnrt]/;
|
|
200
|
+
const peg$r8 = /^[0-9a-fA-F]/;
|
|
201
|
+
const peg$r9 = /^[\n\r]/;
|
|
202
|
+
const peg$r10 = /^[ \t\r\n]/;
|
|
184
203
|
|
|
185
204
|
const peg$e0 = peg$literalExpectation("[", false);
|
|
186
205
|
const peg$e1 = peg$literalExpectation("]", false);
|
|
187
|
-
const peg$e2 = peg$literalExpectation("
|
|
188
|
-
const peg$e3 = peg$literalExpectation("
|
|
189
|
-
const peg$e4 = peg$literalExpectation("
|
|
190
|
-
const peg$e5 = peg$literalExpectation("
|
|
191
|
-
const peg$e6 = peg$literalExpectation("
|
|
192
|
-
const peg$e7 = peg$
|
|
193
|
-
const peg$e8 = peg$
|
|
194
|
-
const peg$e9 = peg$literalExpectation("
|
|
195
|
-
const peg$e10 = peg$
|
|
196
|
-
const peg$e11 = peg$
|
|
197
|
-
const peg$e12 = peg$
|
|
198
|
-
const peg$e13 = peg$
|
|
199
|
-
const peg$e14 = peg$literalExpectation("
|
|
200
|
-
const peg$e15 = peg$literalExpectation("
|
|
201
|
-
const peg$e16 = peg$literalExpectation("
|
|
202
|
-
const peg$e17 = peg$
|
|
203
|
-
const peg$e18 = peg$
|
|
206
|
+
const peg$e2 = peg$literalExpectation("machine", false);
|
|
207
|
+
const peg$e3 = peg$literalExpectation("(", false);
|
|
208
|
+
const peg$e4 = peg$literalExpectation(",", false);
|
|
209
|
+
const peg$e5 = peg$literalExpectation(")", false);
|
|
210
|
+
const peg$e6 = peg$literalExpectation("=", false);
|
|
211
|
+
const peg$e7 = peg$literalExpectation("{", false);
|
|
212
|
+
const peg$e8 = peg$literalExpectation("}", false);
|
|
213
|
+
const peg$e9 = peg$literalExpectation("-", false);
|
|
214
|
+
const peg$e10 = peg$literalExpectation(">", false);
|
|
215
|
+
const peg$e11 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false, false);
|
|
216
|
+
const peg$e12 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false, false);
|
|
217
|
+
const peg$e13 = peg$literalExpectation("true", false);
|
|
218
|
+
const peg$e14 = peg$literalExpectation("false", false);
|
|
219
|
+
const peg$e15 = peg$literalExpectation("null", false);
|
|
220
|
+
const peg$e16 = peg$literalExpectation(":", false);
|
|
221
|
+
const peg$e17 = peg$literalExpectation("0", false);
|
|
222
|
+
const peg$e18 = peg$classExpectation([["1", "9"]], false, false, false);
|
|
223
|
+
const peg$e19 = peg$classExpectation([["0", "9"]], false, false, false);
|
|
224
|
+
const peg$e20 = peg$literalExpectation(".", false);
|
|
225
|
+
const peg$e21 = peg$classExpectation(["e", "E"], false, false, false);
|
|
226
|
+
const peg$e22 = peg$classExpectation(["+", "-"], false, false, false);
|
|
227
|
+
const peg$e23 = peg$literalExpectation("\"", false);
|
|
228
|
+
const peg$e24 = peg$classExpectation(["\"", "\\", ["\0", "\x1F"]], true, false, false);
|
|
229
|
+
const peg$e25 = peg$literalExpectation("\\", false);
|
|
230
|
+
const peg$e26 = peg$classExpectation(["\"", "\\", "/", "b", "f", "n", "r", "t"], false, false, false);
|
|
231
|
+
const peg$e27 = peg$literalExpectation("\\u", false);
|
|
232
|
+
const peg$e28 = peg$classExpectation([["0", "9"], ["a", "f"], ["A", "F"]], false, false, false);
|
|
233
|
+
const peg$e29 = peg$literalExpectation("cap:", false);
|
|
234
|
+
const peg$e30 = peg$anyExpectation();
|
|
235
|
+
const peg$e31 = peg$otherExpectation("newline");
|
|
236
|
+
const peg$e32 = peg$literalExpectation("\r\n", false);
|
|
237
|
+
const peg$e33 = peg$classExpectation(["\n", "\r"], false, false, false);
|
|
238
|
+
const peg$e34 = peg$literalExpectation("\\\"", false);
|
|
239
|
+
const peg$e35 = peg$literalExpectation("\\\\", false);
|
|
240
|
+
const peg$e36 = peg$classExpectation([" ", "\t", "\r", "\n"], false, false, false);
|
|
241
|
+
const peg$e37 = peg$otherExpectation("required whitespace");
|
|
204
242
|
|
|
205
243
|
function peg$f0(stmts) { return stmts; }
|
|
206
|
-
function peg$f1(
|
|
244
|
+
function peg$f1(b) { return b; }
|
|
207
245
|
function peg$f2(inner) { return inner; }
|
|
208
|
-
function peg$f3(
|
|
246
|
+
function peg$f3(inner) { return { ...inner, location: location() }; }
|
|
247
|
+
function peg$f4(a, c) {
|
|
209
248
|
return { type: 'header', alias: a.value, capUrn: c.value, location: location(), aliasLocation: a.location, capUrnLocation: c.location };
|
|
210
249
|
}
|
|
211
|
-
function peg$
|
|
212
|
-
return { type: '
|
|
250
|
+
function peg$f5(a, r) {
|
|
251
|
+
return { type: 'machine_header', alias: a.value, referenceText: r.value, location: location(), aliasLocation: a.location, referenceLocation: r.location };
|
|
213
252
|
}
|
|
214
|
-
function peg$
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
253
|
+
function peg$f6(s, a1, c, a2, t) {
|
|
254
|
+
return {
|
|
255
|
+
type: 'wiring',
|
|
256
|
+
sources: s.members,
|
|
257
|
+
sourcesLocation: s.location,
|
|
258
|
+
step: c.alias.value,
|
|
259
|
+
stepLocation: c.alias.location,
|
|
260
|
+
policy: c.policy,
|
|
261
|
+
policyLocation: c.policyLocation,
|
|
262
|
+
arrowLocations: [a1, a2],
|
|
263
|
+
targets: t.targets,
|
|
264
|
+
targetsLocation: t.location,
|
|
265
|
+
location: location(),
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
function peg$f7(g) { return g; }
|
|
269
|
+
function peg$f8(a) { return { members: [{ name: null, nameLocation: null, node: a.value, location: a.location, valueLocation: a.location }], location: a.location }; }
|
|
270
|
+
function peg$f9(first, m) { return m; }
|
|
271
|
+
function peg$f10(first, rest) { return [first, ...rest]; }
|
|
272
|
+
function peg$f11(ms) {
|
|
273
|
+
return { members: ms || [], location: location() };
|
|
274
|
+
}
|
|
275
|
+
function peg$f12(c) { return { name: null, nameLocation: null, constantText: c.value, location: c.location, valueLocation: c.location }; }
|
|
276
|
+
function peg$f13(a) { return { name: null, nameLocation: null, node: a.value, location: a.location, valueLocation: a.location }; }
|
|
277
|
+
function peg$f14(n, c) { return { constantText: c.value, valueLocation: c.location }; }
|
|
278
|
+
function peg$f15(n, a) { return { node: a.value, valueLocation: a.location }; }
|
|
279
|
+
function peg$f16(n, v) {
|
|
280
|
+
return { name: n.value, nameLocation: n.location, ...v, location: location() };
|
|
281
|
+
}
|
|
282
|
+
function peg$f17(a, p) {
|
|
283
|
+
return { alias: a, policy: p ? p.entries : [], policyLocation: p ? p.location : null };
|
|
284
|
+
}
|
|
285
|
+
function peg$f18(first, e) { return e; }
|
|
286
|
+
function peg$f19(first, rest) { return [first, ...rest]; }
|
|
287
|
+
function peg$f20(es) {
|
|
288
|
+
return { entries: es || [], location: location() };
|
|
289
|
+
}
|
|
290
|
+
function peg$f21(k, v) {
|
|
291
|
+
return { key: k.value, keyLocation: k.location, value: v.value, isNumber: v.isNumber, valueLocation: v.location };
|
|
292
|
+
}
|
|
293
|
+
function peg$f22(n) { return { value: n, isNumber: true, location: location() }; }
|
|
294
|
+
function peg$f23(a) { return { value: a, isNumber: false, location: location() }; }
|
|
295
|
+
function peg$f24(g) { return g; }
|
|
296
|
+
function peg$f25(a) { return { targets: [{ name: null, nameLocation: null, node: a.value, location: a.location, valueLocation: a.location }], location: a.location }; }
|
|
297
|
+
function peg$f26(first, t) { return t; }
|
|
298
|
+
function peg$f27(first, rest) { return [first, ...rest]; }
|
|
299
|
+
function peg$f28(ts) {
|
|
300
|
+
return { targets: ts || [], location: location() };
|
|
218
301
|
}
|
|
219
|
-
function peg$
|
|
220
|
-
function peg$
|
|
302
|
+
function peg$f29(n, a) { return { name: n.value, nameLocation: n.location, node: a.value, location: location(), valueLocation: a.location }; }
|
|
303
|
+
function peg$f30(a) { return { name: null, nameLocation: null, node: a.value, location: a.location, valueLocation: a.location }; }
|
|
304
|
+
function peg$f31() { return location(); }
|
|
305
|
+
function peg$f32(a) { return { value: a, location: location() }; }
|
|
306
|
+
function peg$f33(c) { return { value: c, location: location() }; }
|
|
307
|
+
function peg$f34(s) { return { value: s, location: location() }; }
|
|
308
|
+
function peg$f35(c) { return { value: c, location: location() }; }
|
|
221
309
|
let peg$currPos = options.peg$currPos | 0;
|
|
222
310
|
let peg$savedPos = peg$currPos;
|
|
223
311
|
const peg$posDetailsCache = [{ line: 1, column: 1 }];
|
|
@@ -407,7 +495,36 @@ function peg$parse(input, options) {
|
|
|
407
495
|
}
|
|
408
496
|
|
|
409
497
|
function peg$parsestmt() {
|
|
410
|
-
let s0, s1, s2
|
|
498
|
+
let s0, s1, s2;
|
|
499
|
+
|
|
500
|
+
s0 = peg$currPos;
|
|
501
|
+
s1 = peg$parsebracketed();
|
|
502
|
+
if (s1 !== peg$FAILED) {
|
|
503
|
+
s2 = peg$parse_();
|
|
504
|
+
peg$savedPos = s0;
|
|
505
|
+
s0 = peg$f1(s1);
|
|
506
|
+
} else {
|
|
507
|
+
peg$currPos = s0;
|
|
508
|
+
s0 = peg$FAILED;
|
|
509
|
+
}
|
|
510
|
+
if (s0 === peg$FAILED) {
|
|
511
|
+
s0 = peg$currPos;
|
|
512
|
+
s1 = peg$parseinner();
|
|
513
|
+
if (s1 !== peg$FAILED) {
|
|
514
|
+
s2 = peg$parse_();
|
|
515
|
+
peg$savedPos = s0;
|
|
516
|
+
s0 = peg$f2(s1);
|
|
517
|
+
} else {
|
|
518
|
+
peg$currPos = s0;
|
|
519
|
+
s0 = peg$FAILED;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
return s0;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
function peg$parsebracketed() {
|
|
527
|
+
let s0, s1, s2, s3, s4, s5;
|
|
411
528
|
|
|
412
529
|
s0 = peg$currPos;
|
|
413
530
|
if (input.charCodeAt(peg$currPos) === 91) {
|
|
@@ -430,9 +547,8 @@ function peg$parse(input, options) {
|
|
|
430
547
|
if (peg$silentFails === 0) { peg$fail(peg$e1); }
|
|
431
548
|
}
|
|
432
549
|
if (s5 !== peg$FAILED) {
|
|
433
|
-
s6 = peg$parse_();
|
|
434
550
|
peg$savedPos = s0;
|
|
435
|
-
s0 = peg$
|
|
551
|
+
s0 = peg$f3(s3);
|
|
436
552
|
} else {
|
|
437
553
|
peg$currPos = s0;
|
|
438
554
|
s0 = peg$FAILED;
|
|
@@ -445,18 +561,6 @@ function peg$parse(input, options) {
|
|
|
445
561
|
peg$currPos = s0;
|
|
446
562
|
s0 = peg$FAILED;
|
|
447
563
|
}
|
|
448
|
-
if (s0 === peg$FAILED) {
|
|
449
|
-
s0 = peg$currPos;
|
|
450
|
-
s1 = peg$parseinner();
|
|
451
|
-
if (s1 !== peg$FAILED) {
|
|
452
|
-
s2 = peg$parse_();
|
|
453
|
-
peg$savedPos = s0;
|
|
454
|
-
s0 = peg$f2(s1);
|
|
455
|
-
} else {
|
|
456
|
-
peg$currPos = s0;
|
|
457
|
-
s0 = peg$FAILED;
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
564
|
|
|
461
565
|
return s0;
|
|
462
566
|
}
|
|
@@ -466,7 +570,10 @@ function peg$parse(input, options) {
|
|
|
466
570
|
|
|
467
571
|
s0 = peg$parsewiring();
|
|
468
572
|
if (s0 === peg$FAILED) {
|
|
469
|
-
s0 = peg$
|
|
573
|
+
s0 = peg$parsemachine_header();
|
|
574
|
+
if (s0 === peg$FAILED) {
|
|
575
|
+
s0 = peg$parseheader();
|
|
576
|
+
}
|
|
470
577
|
}
|
|
471
578
|
|
|
472
579
|
return s0;
|
|
@@ -483,7 +590,42 @@ function peg$parse(input, options) {
|
|
|
483
590
|
s3 = peg$parsecap_urn_loc();
|
|
484
591
|
if (s3 !== peg$FAILED) {
|
|
485
592
|
peg$savedPos = s0;
|
|
486
|
-
s0 = peg$
|
|
593
|
+
s0 = peg$f4(s1, s3);
|
|
594
|
+
} else {
|
|
595
|
+
peg$currPos = s0;
|
|
596
|
+
s0 = peg$FAILED;
|
|
597
|
+
}
|
|
598
|
+
} else {
|
|
599
|
+
peg$currPos = s0;
|
|
600
|
+
s0 = peg$FAILED;
|
|
601
|
+
}
|
|
602
|
+
} else {
|
|
603
|
+
peg$currPos = s0;
|
|
604
|
+
s0 = peg$FAILED;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
return s0;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
function peg$parsemachine_header() {
|
|
611
|
+
let s0, s1, s2, s3, s4, s5;
|
|
612
|
+
|
|
613
|
+
s0 = peg$currPos;
|
|
614
|
+
s1 = peg$parsealias_loc();
|
|
615
|
+
if (s1 !== peg$FAILED) {
|
|
616
|
+
s2 = peg$parse__();
|
|
617
|
+
if (s2 !== peg$FAILED) {
|
|
618
|
+
s3 = peg$parsemachine_kw();
|
|
619
|
+
if (s3 !== peg$FAILED) {
|
|
620
|
+
s4 = peg$parse_();
|
|
621
|
+
s5 = peg$parsestring_loc();
|
|
622
|
+
if (s5 !== peg$FAILED) {
|
|
623
|
+
peg$savedPos = s0;
|
|
624
|
+
s0 = peg$f5(s1, s5);
|
|
625
|
+
} else {
|
|
626
|
+
peg$currPos = s0;
|
|
627
|
+
s0 = peg$FAILED;
|
|
628
|
+
}
|
|
487
629
|
} else {
|
|
488
630
|
peg$currPos = s0;
|
|
489
631
|
s0 = peg$FAILED;
|
|
@@ -500,26 +642,63 @@ function peg$parse(input, options) {
|
|
|
500
642
|
return s0;
|
|
501
643
|
}
|
|
502
644
|
|
|
645
|
+
function peg$parsemachine_kw() {
|
|
646
|
+
let s0, s1, s2, s3;
|
|
647
|
+
|
|
648
|
+
s0 = peg$currPos;
|
|
649
|
+
if (input.substr(peg$currPos, 7) === peg$c2) {
|
|
650
|
+
s1 = peg$c2;
|
|
651
|
+
peg$currPos += 7;
|
|
652
|
+
} else {
|
|
653
|
+
s1 = peg$FAILED;
|
|
654
|
+
if (peg$silentFails === 0) { peg$fail(peg$e2); }
|
|
655
|
+
}
|
|
656
|
+
if (s1 !== peg$FAILED) {
|
|
657
|
+
s2 = peg$currPos;
|
|
658
|
+
peg$silentFails++;
|
|
659
|
+
s3 = peg$parsealias_continue();
|
|
660
|
+
peg$silentFails--;
|
|
661
|
+
if (s3 === peg$FAILED) {
|
|
662
|
+
s2 = undefined;
|
|
663
|
+
} else {
|
|
664
|
+
peg$currPos = s2;
|
|
665
|
+
s2 = peg$FAILED;
|
|
666
|
+
}
|
|
667
|
+
if (s2 !== peg$FAILED) {
|
|
668
|
+
s1 = [s1, s2];
|
|
669
|
+
s0 = s1;
|
|
670
|
+
} else {
|
|
671
|
+
peg$currPos = s0;
|
|
672
|
+
s0 = peg$FAILED;
|
|
673
|
+
}
|
|
674
|
+
} else {
|
|
675
|
+
peg$currPos = s0;
|
|
676
|
+
s0 = peg$FAILED;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
return s0;
|
|
680
|
+
}
|
|
681
|
+
|
|
503
682
|
function peg$parsewiring() {
|
|
504
683
|
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
|
|
505
684
|
|
|
506
685
|
s0 = peg$currPos;
|
|
507
|
-
s1 = peg$
|
|
686
|
+
s1 = peg$parsesources();
|
|
508
687
|
if (s1 !== peg$FAILED) {
|
|
509
688
|
s2 = peg$parse_();
|
|
510
|
-
s3 = peg$
|
|
689
|
+
s3 = peg$parsearrow_loc();
|
|
511
690
|
if (s3 !== peg$FAILED) {
|
|
512
691
|
s4 = peg$parse_();
|
|
513
|
-
s5 = peg$
|
|
692
|
+
s5 = peg$parsestep();
|
|
514
693
|
if (s5 !== peg$FAILED) {
|
|
515
694
|
s6 = peg$parse_();
|
|
516
|
-
s7 = peg$
|
|
695
|
+
s7 = peg$parsearrow_loc();
|
|
517
696
|
if (s7 !== peg$FAILED) {
|
|
518
697
|
s8 = peg$parse_();
|
|
519
|
-
s9 = peg$
|
|
698
|
+
s9 = peg$parsetargets();
|
|
520
699
|
if (s9 !== peg$FAILED) {
|
|
521
700
|
peg$savedPos = s0;
|
|
522
|
-
s0 = peg$
|
|
701
|
+
s0 = peg$f6(s1, s3, s5, s7, s9);
|
|
523
702
|
} else {
|
|
524
703
|
peg$currPos = s0;
|
|
525
704
|
s0 = peg$FAILED;
|
|
@@ -544,118 +723,115 @@ function peg$parse(input, options) {
|
|
|
544
723
|
return s0;
|
|
545
724
|
}
|
|
546
725
|
|
|
547
|
-
function peg$
|
|
548
|
-
let s0;
|
|
549
|
-
|
|
550
|
-
s0 = peg$parsegroup_loc();
|
|
551
|
-
if (s0 === peg$FAILED) {
|
|
552
|
-
s0 = peg$parsesingle_alias_loc();
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
return s0;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
function peg$parsesingle_alias_loc() {
|
|
726
|
+
function peg$parsesources() {
|
|
559
727
|
let s0, s1;
|
|
560
728
|
|
|
561
729
|
s0 = peg$currPos;
|
|
562
|
-
s1 = peg$
|
|
730
|
+
s1 = peg$parsesource_group();
|
|
563
731
|
if (s1 !== peg$FAILED) {
|
|
564
732
|
peg$savedPos = s0;
|
|
565
|
-
s1 = peg$
|
|
733
|
+
s1 = peg$f7(s1);
|
|
566
734
|
}
|
|
567
735
|
s0 = s1;
|
|
736
|
+
if (s0 === peg$FAILED) {
|
|
737
|
+
s0 = peg$currPos;
|
|
738
|
+
s1 = peg$parsealias_loc();
|
|
739
|
+
if (s1 !== peg$FAILED) {
|
|
740
|
+
peg$savedPos = s0;
|
|
741
|
+
s1 = peg$f8(s1);
|
|
742
|
+
}
|
|
743
|
+
s0 = s1;
|
|
744
|
+
}
|
|
568
745
|
|
|
569
746
|
return s0;
|
|
570
747
|
}
|
|
571
748
|
|
|
572
|
-
function peg$
|
|
573
|
-
let s0, s1, s2, s3, s4, s5, s6, s7, s8;
|
|
749
|
+
function peg$parsesource_group() {
|
|
750
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
|
|
574
751
|
|
|
575
752
|
s0 = peg$currPos;
|
|
576
753
|
if (input.charCodeAt(peg$currPos) === 40) {
|
|
577
|
-
s1 = peg$
|
|
754
|
+
s1 = peg$c3;
|
|
578
755
|
peg$currPos++;
|
|
579
756
|
} else {
|
|
580
757
|
s1 = peg$FAILED;
|
|
581
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
758
|
+
if (peg$silentFails === 0) { peg$fail(peg$e3); }
|
|
582
759
|
}
|
|
583
760
|
if (s1 !== peg$FAILED) {
|
|
584
761
|
s2 = peg$parse_();
|
|
585
|
-
s3 = peg$
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
s5 =
|
|
762
|
+
s3 = peg$currPos;
|
|
763
|
+
s4 = peg$parsemember();
|
|
764
|
+
if (s4 !== peg$FAILED) {
|
|
765
|
+
s5 = [];
|
|
766
|
+
s6 = peg$currPos;
|
|
767
|
+
s7 = peg$parse_();
|
|
589
768
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
590
|
-
|
|
769
|
+
s8 = peg$c4;
|
|
591
770
|
peg$currPos++;
|
|
592
771
|
} else {
|
|
593
|
-
|
|
594
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
772
|
+
s8 = peg$FAILED;
|
|
773
|
+
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
595
774
|
}
|
|
596
|
-
if (
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
if (
|
|
600
|
-
peg$savedPos =
|
|
601
|
-
|
|
775
|
+
if (s8 !== peg$FAILED) {
|
|
776
|
+
s9 = peg$parse_();
|
|
777
|
+
s10 = peg$parsemember();
|
|
778
|
+
if (s10 !== peg$FAILED) {
|
|
779
|
+
peg$savedPos = s6;
|
|
780
|
+
s6 = peg$f9(s4, s10);
|
|
602
781
|
} else {
|
|
603
|
-
peg$currPos =
|
|
604
|
-
|
|
605
|
-
}
|
|
606
|
-
} else {
|
|
607
|
-
peg$currPos = s5;
|
|
608
|
-
s5 = peg$FAILED;
|
|
609
|
-
}
|
|
610
|
-
if (s5 !== peg$FAILED) {
|
|
611
|
-
while (s5 !== peg$FAILED) {
|
|
612
|
-
s4.push(s5);
|
|
613
|
-
s5 = peg$currPos;
|
|
614
|
-
if (input.charCodeAt(peg$currPos) === 44) {
|
|
615
|
-
s6 = peg$c3;
|
|
616
|
-
peg$currPos++;
|
|
617
|
-
} else {
|
|
618
|
-
s6 = peg$FAILED;
|
|
619
|
-
if (peg$silentFails === 0) { peg$fail(peg$e3); }
|
|
620
|
-
}
|
|
621
|
-
if (s6 !== peg$FAILED) {
|
|
622
|
-
s7 = peg$parse_();
|
|
623
|
-
s8 = peg$parsealias_loc();
|
|
624
|
-
if (s8 !== peg$FAILED) {
|
|
625
|
-
peg$savedPos = s5;
|
|
626
|
-
s5 = peg$f6(s3, s8);
|
|
627
|
-
} else {
|
|
628
|
-
peg$currPos = s5;
|
|
629
|
-
s5 = peg$FAILED;
|
|
630
|
-
}
|
|
631
|
-
} else {
|
|
632
|
-
peg$currPos = s5;
|
|
633
|
-
s5 = peg$FAILED;
|
|
634
|
-
}
|
|
782
|
+
peg$currPos = s6;
|
|
783
|
+
s6 = peg$FAILED;
|
|
635
784
|
}
|
|
636
785
|
} else {
|
|
637
|
-
|
|
786
|
+
peg$currPos = s6;
|
|
787
|
+
s6 = peg$FAILED;
|
|
638
788
|
}
|
|
639
|
-
|
|
640
|
-
s5
|
|
641
|
-
|
|
642
|
-
|
|
789
|
+
while (s6 !== peg$FAILED) {
|
|
790
|
+
s5.push(s6);
|
|
791
|
+
s6 = peg$currPos;
|
|
792
|
+
s7 = peg$parse_();
|
|
793
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
794
|
+
s8 = peg$c4;
|
|
643
795
|
peg$currPos++;
|
|
644
796
|
} else {
|
|
645
|
-
|
|
797
|
+
s8 = peg$FAILED;
|
|
646
798
|
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
647
799
|
}
|
|
648
|
-
if (
|
|
649
|
-
|
|
650
|
-
|
|
800
|
+
if (s8 !== peg$FAILED) {
|
|
801
|
+
s9 = peg$parse_();
|
|
802
|
+
s10 = peg$parsemember();
|
|
803
|
+
if (s10 !== peg$FAILED) {
|
|
804
|
+
peg$savedPos = s6;
|
|
805
|
+
s6 = peg$f9(s4, s10);
|
|
806
|
+
} else {
|
|
807
|
+
peg$currPos = s6;
|
|
808
|
+
s6 = peg$FAILED;
|
|
809
|
+
}
|
|
651
810
|
} else {
|
|
652
|
-
peg$currPos =
|
|
653
|
-
|
|
811
|
+
peg$currPos = s6;
|
|
812
|
+
s6 = peg$FAILED;
|
|
654
813
|
}
|
|
655
|
-
} else {
|
|
656
|
-
peg$currPos = s0;
|
|
657
|
-
s0 = peg$FAILED;
|
|
658
814
|
}
|
|
815
|
+
peg$savedPos = s3;
|
|
816
|
+
s3 = peg$f10(s4, s5);
|
|
817
|
+
} else {
|
|
818
|
+
peg$currPos = s3;
|
|
819
|
+
s3 = peg$FAILED;
|
|
820
|
+
}
|
|
821
|
+
if (s3 === peg$FAILED) {
|
|
822
|
+
s3 = null;
|
|
823
|
+
}
|
|
824
|
+
s4 = peg$parse_();
|
|
825
|
+
if (input.charCodeAt(peg$currPos) === 41) {
|
|
826
|
+
s5 = peg$c5;
|
|
827
|
+
peg$currPos++;
|
|
828
|
+
} else {
|
|
829
|
+
s5 = peg$FAILED;
|
|
830
|
+
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
831
|
+
}
|
|
832
|
+
if (s5 !== peg$FAILED) {
|
|
833
|
+
peg$savedPos = s0;
|
|
834
|
+
s0 = peg$f11(s3);
|
|
659
835
|
} else {
|
|
660
836
|
peg$currPos = s0;
|
|
661
837
|
s0 = peg$FAILED;
|
|
@@ -668,43 +844,71 @@ function peg$parse(input, options) {
|
|
|
668
844
|
return s0;
|
|
669
845
|
}
|
|
670
846
|
|
|
671
|
-
function peg$
|
|
672
|
-
let s0, s1
|
|
847
|
+
function peg$parsemember() {
|
|
848
|
+
let s0, s1;
|
|
673
849
|
|
|
674
|
-
s0 = peg$
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
peg$
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
s1
|
|
686
|
-
if (
|
|
687
|
-
|
|
688
|
-
peg$
|
|
689
|
-
} else {
|
|
690
|
-
s2 = peg$FAILED;
|
|
691
|
-
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
850
|
+
s0 = peg$parsenamed_member();
|
|
851
|
+
if (s0 === peg$FAILED) {
|
|
852
|
+
s0 = peg$currPos;
|
|
853
|
+
s1 = peg$parseconstant_loc();
|
|
854
|
+
if (s1 !== peg$FAILED) {
|
|
855
|
+
peg$savedPos = s0;
|
|
856
|
+
s1 = peg$f12(s1);
|
|
857
|
+
}
|
|
858
|
+
s0 = s1;
|
|
859
|
+
if (s0 === peg$FAILED) {
|
|
860
|
+
s0 = peg$currPos;
|
|
861
|
+
s1 = peg$parsealias_loc();
|
|
862
|
+
if (s1 !== peg$FAILED) {
|
|
863
|
+
peg$savedPos = s0;
|
|
864
|
+
s1 = peg$f13(s1);
|
|
692
865
|
}
|
|
866
|
+
s0 = s1;
|
|
693
867
|
}
|
|
694
|
-
} else {
|
|
695
|
-
s1 = peg$FAILED;
|
|
696
868
|
}
|
|
869
|
+
|
|
870
|
+
return s0;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
function peg$parsenamed_member() {
|
|
874
|
+
let s0, s1, s2, s3, s4, s5, s6;
|
|
875
|
+
|
|
876
|
+
s0 = peg$currPos;
|
|
877
|
+
s1 = peg$parsealias_loc();
|
|
697
878
|
if (s1 !== peg$FAILED) {
|
|
698
|
-
|
|
699
|
-
|
|
879
|
+
s2 = peg$parse_();
|
|
880
|
+
if (input.charCodeAt(peg$currPos) === 61) {
|
|
881
|
+
s3 = peg$c6;
|
|
700
882
|
peg$currPos++;
|
|
701
883
|
} else {
|
|
702
|
-
|
|
884
|
+
s3 = peg$FAILED;
|
|
703
885
|
if (peg$silentFails === 0) { peg$fail(peg$e6); }
|
|
704
886
|
}
|
|
705
|
-
if (
|
|
706
|
-
|
|
707
|
-
|
|
887
|
+
if (s3 !== peg$FAILED) {
|
|
888
|
+
s4 = peg$parse_();
|
|
889
|
+
s5 = peg$currPos;
|
|
890
|
+
s6 = peg$parseconstant_loc();
|
|
891
|
+
if (s6 !== peg$FAILED) {
|
|
892
|
+
peg$savedPos = s5;
|
|
893
|
+
s6 = peg$f14(s1, s6);
|
|
894
|
+
}
|
|
895
|
+
s5 = s6;
|
|
896
|
+
if (s5 === peg$FAILED) {
|
|
897
|
+
s5 = peg$currPos;
|
|
898
|
+
s6 = peg$parsealias_loc();
|
|
899
|
+
if (s6 !== peg$FAILED) {
|
|
900
|
+
peg$savedPos = s5;
|
|
901
|
+
s6 = peg$f15(s1, s6);
|
|
902
|
+
}
|
|
903
|
+
s5 = s6;
|
|
904
|
+
}
|
|
905
|
+
if (s5 !== peg$FAILED) {
|
|
906
|
+
peg$savedPos = s0;
|
|
907
|
+
s0 = peg$f16(s1, s5);
|
|
908
|
+
} else {
|
|
909
|
+
peg$currPos = s0;
|
|
910
|
+
s0 = peg$FAILED;
|
|
911
|
+
}
|
|
708
912
|
} else {
|
|
709
913
|
peg$currPos = s0;
|
|
710
914
|
s0 = peg$FAILED;
|
|
@@ -717,61 +921,1170 @@ function peg$parse(input, options) {
|
|
|
717
921
|
return s0;
|
|
718
922
|
}
|
|
719
923
|
|
|
720
|
-
function peg$
|
|
721
|
-
let s0, s1;
|
|
924
|
+
function peg$parsestep() {
|
|
925
|
+
let s0, s1, s2, s3;
|
|
722
926
|
|
|
723
927
|
s0 = peg$currPos;
|
|
724
|
-
s1 = peg$
|
|
928
|
+
s1 = peg$parsealias_loc();
|
|
725
929
|
if (s1 !== peg$FAILED) {
|
|
930
|
+
s2 = peg$parse_();
|
|
931
|
+
s3 = peg$parsepolicy_loc();
|
|
932
|
+
if (s3 === peg$FAILED) {
|
|
933
|
+
s3 = null;
|
|
934
|
+
}
|
|
726
935
|
peg$savedPos = s0;
|
|
727
|
-
|
|
936
|
+
s0 = peg$f17(s1, s3);
|
|
937
|
+
} else {
|
|
938
|
+
peg$currPos = s0;
|
|
939
|
+
s0 = peg$FAILED;
|
|
728
940
|
}
|
|
729
|
-
s0 = s1;
|
|
730
941
|
|
|
731
942
|
return s0;
|
|
732
943
|
}
|
|
733
944
|
|
|
734
|
-
function peg$
|
|
735
|
-
let s0, s1, s2, s3, s4;
|
|
945
|
+
function peg$parsepolicy_loc() {
|
|
946
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
|
|
736
947
|
|
|
737
948
|
s0 = peg$currPos;
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
if (peg$r0.test(s2)) {
|
|
949
|
+
if (input.charCodeAt(peg$currPos) === 123) {
|
|
950
|
+
s1 = peg$c7;
|
|
741
951
|
peg$currPos++;
|
|
742
952
|
} else {
|
|
743
|
-
|
|
953
|
+
s1 = peg$FAILED;
|
|
744
954
|
if (peg$silentFails === 0) { peg$fail(peg$e7); }
|
|
745
955
|
}
|
|
746
|
-
if (
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
956
|
+
if (s1 !== peg$FAILED) {
|
|
957
|
+
s2 = peg$parse_();
|
|
958
|
+
s3 = peg$currPos;
|
|
959
|
+
s4 = peg$parsepolicy_entry();
|
|
960
|
+
if (s4 !== peg$FAILED) {
|
|
961
|
+
s5 = [];
|
|
962
|
+
s6 = peg$currPos;
|
|
963
|
+
s7 = peg$parse_();
|
|
964
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
965
|
+
s8 = peg$c4;
|
|
966
|
+
peg$currPos++;
|
|
967
|
+
} else {
|
|
968
|
+
s8 = peg$FAILED;
|
|
969
|
+
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
970
|
+
}
|
|
971
|
+
if (s8 !== peg$FAILED) {
|
|
972
|
+
s9 = peg$parse_();
|
|
973
|
+
s10 = peg$parsepolicy_entry();
|
|
974
|
+
if (s10 !== peg$FAILED) {
|
|
975
|
+
peg$savedPos = s6;
|
|
976
|
+
s6 = peg$f18(s4, s10);
|
|
977
|
+
} else {
|
|
978
|
+
peg$currPos = s6;
|
|
979
|
+
s6 = peg$FAILED;
|
|
980
|
+
}
|
|
981
|
+
} else {
|
|
982
|
+
peg$currPos = s6;
|
|
983
|
+
s6 = peg$FAILED;
|
|
984
|
+
}
|
|
985
|
+
while (s6 !== peg$FAILED) {
|
|
986
|
+
s5.push(s6);
|
|
987
|
+
s6 = peg$currPos;
|
|
988
|
+
s7 = peg$parse_();
|
|
989
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
990
|
+
s8 = peg$c4;
|
|
991
|
+
peg$currPos++;
|
|
992
|
+
} else {
|
|
993
|
+
s8 = peg$FAILED;
|
|
994
|
+
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
995
|
+
}
|
|
996
|
+
if (s8 !== peg$FAILED) {
|
|
997
|
+
s9 = peg$parse_();
|
|
998
|
+
s10 = peg$parsepolicy_entry();
|
|
999
|
+
if (s10 !== peg$FAILED) {
|
|
1000
|
+
peg$savedPos = s6;
|
|
1001
|
+
s6 = peg$f18(s4, s10);
|
|
1002
|
+
} else {
|
|
1003
|
+
peg$currPos = s6;
|
|
1004
|
+
s6 = peg$FAILED;
|
|
1005
|
+
}
|
|
1006
|
+
} else {
|
|
1007
|
+
peg$currPos = s6;
|
|
1008
|
+
s6 = peg$FAILED;
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
peg$savedPos = s3;
|
|
1012
|
+
s3 = peg$f19(s4, s5);
|
|
1013
|
+
} else {
|
|
1014
|
+
peg$currPos = s3;
|
|
1015
|
+
s3 = peg$FAILED;
|
|
1016
|
+
}
|
|
1017
|
+
if (s3 === peg$FAILED) {
|
|
1018
|
+
s3 = null;
|
|
1019
|
+
}
|
|
1020
|
+
s4 = peg$parse_();
|
|
1021
|
+
if (input.charCodeAt(peg$currPos) === 125) {
|
|
1022
|
+
s5 = peg$c8;
|
|
1023
|
+
peg$currPos++;
|
|
1024
|
+
} else {
|
|
1025
|
+
s5 = peg$FAILED;
|
|
1026
|
+
if (peg$silentFails === 0) { peg$fail(peg$e8); }
|
|
1027
|
+
}
|
|
1028
|
+
if (s5 !== peg$FAILED) {
|
|
1029
|
+
peg$savedPos = s0;
|
|
1030
|
+
s0 = peg$f20(s3);
|
|
1031
|
+
} else {
|
|
1032
|
+
peg$currPos = s0;
|
|
1033
|
+
s0 = peg$FAILED;
|
|
1034
|
+
}
|
|
1035
|
+
} else {
|
|
1036
|
+
peg$currPos = s0;
|
|
1037
|
+
s0 = peg$FAILED;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
return s0;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
function peg$parsepolicy_entry() {
|
|
1044
|
+
let s0, s1, s2, s3, s4, s5;
|
|
1045
|
+
|
|
1046
|
+
s0 = peg$currPos;
|
|
1047
|
+
s1 = peg$parsealias_loc();
|
|
1048
|
+
if (s1 !== peg$FAILED) {
|
|
1049
|
+
s2 = peg$parse_();
|
|
1050
|
+
if (input.charCodeAt(peg$currPos) === 61) {
|
|
1051
|
+
s3 = peg$c6;
|
|
1052
|
+
peg$currPos++;
|
|
1053
|
+
} else {
|
|
1054
|
+
s3 = peg$FAILED;
|
|
1055
|
+
if (peg$silentFails === 0) { peg$fail(peg$e6); }
|
|
1056
|
+
}
|
|
1057
|
+
if (s3 !== peg$FAILED) {
|
|
1058
|
+
s4 = peg$parse_();
|
|
1059
|
+
s5 = peg$parsepolicy_value();
|
|
1060
|
+
if (s5 !== peg$FAILED) {
|
|
1061
|
+
peg$savedPos = s0;
|
|
1062
|
+
s0 = peg$f21(s1, s5);
|
|
1063
|
+
} else {
|
|
1064
|
+
peg$currPos = s0;
|
|
1065
|
+
s0 = peg$FAILED;
|
|
1066
|
+
}
|
|
1067
|
+
} else {
|
|
1068
|
+
peg$currPos = s0;
|
|
1069
|
+
s0 = peg$FAILED;
|
|
1070
|
+
}
|
|
1071
|
+
} else {
|
|
1072
|
+
peg$currPos = s0;
|
|
1073
|
+
s0 = peg$FAILED;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
return s0;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
function peg$parsepolicy_value() {
|
|
1080
|
+
let s0, s1, s2;
|
|
1081
|
+
|
|
1082
|
+
s0 = peg$currPos;
|
|
1083
|
+
s1 = peg$currPos;
|
|
1084
|
+
s2 = peg$parsenumber();
|
|
1085
|
+
if (s2 !== peg$FAILED) {
|
|
1086
|
+
s1 = input.substring(s1, peg$currPos);
|
|
1087
|
+
} else {
|
|
1088
|
+
s1 = s2;
|
|
1089
|
+
}
|
|
1090
|
+
if (s1 !== peg$FAILED) {
|
|
1091
|
+
peg$savedPos = s0;
|
|
1092
|
+
s1 = peg$f22(s1);
|
|
1093
|
+
}
|
|
1094
|
+
s0 = s1;
|
|
1095
|
+
if (s0 === peg$FAILED) {
|
|
1096
|
+
s0 = peg$currPos;
|
|
1097
|
+
s1 = peg$parsealias();
|
|
1098
|
+
if (s1 !== peg$FAILED) {
|
|
1099
|
+
peg$savedPos = s0;
|
|
1100
|
+
s1 = peg$f23(s1);
|
|
1101
|
+
}
|
|
1102
|
+
s0 = s1;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
return s0;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
function peg$parsetargets() {
|
|
1109
|
+
let s0, s1;
|
|
1110
|
+
|
|
1111
|
+
s0 = peg$currPos;
|
|
1112
|
+
s1 = peg$parsetarget_group();
|
|
1113
|
+
if (s1 !== peg$FAILED) {
|
|
1114
|
+
peg$savedPos = s0;
|
|
1115
|
+
s1 = peg$f24(s1);
|
|
1116
|
+
}
|
|
1117
|
+
s0 = s1;
|
|
1118
|
+
if (s0 === peg$FAILED) {
|
|
1119
|
+
s0 = peg$currPos;
|
|
1120
|
+
s1 = peg$parsealias_loc();
|
|
1121
|
+
if (s1 !== peg$FAILED) {
|
|
1122
|
+
peg$savedPos = s0;
|
|
1123
|
+
s1 = peg$f25(s1);
|
|
1124
|
+
}
|
|
1125
|
+
s0 = s1;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
return s0;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
function peg$parsetarget_group() {
|
|
1132
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
|
|
1133
|
+
|
|
1134
|
+
s0 = peg$currPos;
|
|
1135
|
+
if (input.charCodeAt(peg$currPos) === 40) {
|
|
1136
|
+
s1 = peg$c3;
|
|
1137
|
+
peg$currPos++;
|
|
1138
|
+
} else {
|
|
1139
|
+
s1 = peg$FAILED;
|
|
1140
|
+
if (peg$silentFails === 0) { peg$fail(peg$e3); }
|
|
1141
|
+
}
|
|
1142
|
+
if (s1 !== peg$FAILED) {
|
|
1143
|
+
s2 = peg$parse_();
|
|
1144
|
+
s3 = peg$currPos;
|
|
1145
|
+
s4 = peg$parsetarget();
|
|
1146
|
+
if (s4 !== peg$FAILED) {
|
|
1147
|
+
s5 = [];
|
|
1148
|
+
s6 = peg$currPos;
|
|
1149
|
+
s7 = peg$parse_();
|
|
1150
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1151
|
+
s8 = peg$c4;
|
|
1152
|
+
peg$currPos++;
|
|
1153
|
+
} else {
|
|
1154
|
+
s8 = peg$FAILED;
|
|
1155
|
+
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
1156
|
+
}
|
|
1157
|
+
if (s8 !== peg$FAILED) {
|
|
1158
|
+
s9 = peg$parse_();
|
|
1159
|
+
s10 = peg$parsetarget();
|
|
1160
|
+
if (s10 !== peg$FAILED) {
|
|
1161
|
+
peg$savedPos = s6;
|
|
1162
|
+
s6 = peg$f26(s4, s10);
|
|
1163
|
+
} else {
|
|
1164
|
+
peg$currPos = s6;
|
|
1165
|
+
s6 = peg$FAILED;
|
|
1166
|
+
}
|
|
1167
|
+
} else {
|
|
1168
|
+
peg$currPos = s6;
|
|
1169
|
+
s6 = peg$FAILED;
|
|
1170
|
+
}
|
|
1171
|
+
while (s6 !== peg$FAILED) {
|
|
1172
|
+
s5.push(s6);
|
|
1173
|
+
s6 = peg$currPos;
|
|
1174
|
+
s7 = peg$parse_();
|
|
1175
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1176
|
+
s8 = peg$c4;
|
|
1177
|
+
peg$currPos++;
|
|
1178
|
+
} else {
|
|
1179
|
+
s8 = peg$FAILED;
|
|
1180
|
+
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
1181
|
+
}
|
|
1182
|
+
if (s8 !== peg$FAILED) {
|
|
1183
|
+
s9 = peg$parse_();
|
|
1184
|
+
s10 = peg$parsetarget();
|
|
1185
|
+
if (s10 !== peg$FAILED) {
|
|
1186
|
+
peg$savedPos = s6;
|
|
1187
|
+
s6 = peg$f26(s4, s10);
|
|
1188
|
+
} else {
|
|
1189
|
+
peg$currPos = s6;
|
|
1190
|
+
s6 = peg$FAILED;
|
|
1191
|
+
}
|
|
1192
|
+
} else {
|
|
1193
|
+
peg$currPos = s6;
|
|
1194
|
+
s6 = peg$FAILED;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
peg$savedPos = s3;
|
|
1198
|
+
s3 = peg$f27(s4, s5);
|
|
1199
|
+
} else {
|
|
1200
|
+
peg$currPos = s3;
|
|
1201
|
+
s3 = peg$FAILED;
|
|
1202
|
+
}
|
|
1203
|
+
if (s3 === peg$FAILED) {
|
|
1204
|
+
s3 = null;
|
|
1205
|
+
}
|
|
1206
|
+
s4 = peg$parse_();
|
|
1207
|
+
if (input.charCodeAt(peg$currPos) === 41) {
|
|
1208
|
+
s5 = peg$c5;
|
|
1209
|
+
peg$currPos++;
|
|
1210
|
+
} else {
|
|
1211
|
+
s5 = peg$FAILED;
|
|
1212
|
+
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
1213
|
+
}
|
|
1214
|
+
if (s5 !== peg$FAILED) {
|
|
1215
|
+
peg$savedPos = s0;
|
|
1216
|
+
s0 = peg$f28(s3);
|
|
1217
|
+
} else {
|
|
1218
|
+
peg$currPos = s0;
|
|
1219
|
+
s0 = peg$FAILED;
|
|
1220
|
+
}
|
|
1221
|
+
} else {
|
|
1222
|
+
peg$currPos = s0;
|
|
1223
|
+
s0 = peg$FAILED;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
return s0;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
function peg$parsetarget() {
|
|
1230
|
+
let s0, s1, s2, s3, s4, s5;
|
|
1231
|
+
|
|
1232
|
+
s0 = peg$currPos;
|
|
1233
|
+
s1 = peg$parsealias_loc();
|
|
1234
|
+
if (s1 !== peg$FAILED) {
|
|
1235
|
+
s2 = peg$parse_();
|
|
1236
|
+
if (input.charCodeAt(peg$currPos) === 61) {
|
|
1237
|
+
s3 = peg$c6;
|
|
1238
|
+
peg$currPos++;
|
|
1239
|
+
} else {
|
|
1240
|
+
s3 = peg$FAILED;
|
|
1241
|
+
if (peg$silentFails === 0) { peg$fail(peg$e6); }
|
|
1242
|
+
}
|
|
1243
|
+
if (s3 !== peg$FAILED) {
|
|
1244
|
+
s4 = peg$parse_();
|
|
1245
|
+
s5 = peg$parsealias_loc();
|
|
1246
|
+
if (s5 !== peg$FAILED) {
|
|
1247
|
+
peg$savedPos = s0;
|
|
1248
|
+
s0 = peg$f29(s1, s5);
|
|
1249
|
+
} else {
|
|
1250
|
+
peg$currPos = s0;
|
|
1251
|
+
s0 = peg$FAILED;
|
|
1252
|
+
}
|
|
1253
|
+
} else {
|
|
1254
|
+
peg$currPos = s0;
|
|
1255
|
+
s0 = peg$FAILED;
|
|
1256
|
+
}
|
|
1257
|
+
} else {
|
|
1258
|
+
peg$currPos = s0;
|
|
1259
|
+
s0 = peg$FAILED;
|
|
1260
|
+
}
|
|
1261
|
+
if (s0 === peg$FAILED) {
|
|
1262
|
+
s0 = peg$currPos;
|
|
1263
|
+
s1 = peg$parsealias_loc();
|
|
1264
|
+
if (s1 !== peg$FAILED) {
|
|
1265
|
+
peg$savedPos = s0;
|
|
1266
|
+
s1 = peg$f30(s1);
|
|
1267
|
+
}
|
|
1268
|
+
s0 = s1;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
return s0;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
function peg$parsearrow_loc() {
|
|
1275
|
+
let s0, s1, s2;
|
|
1276
|
+
|
|
1277
|
+
s0 = peg$currPos;
|
|
1278
|
+
s1 = [];
|
|
1279
|
+
if (input.charCodeAt(peg$currPos) === 45) {
|
|
1280
|
+
s2 = peg$c9;
|
|
1281
|
+
peg$currPos++;
|
|
1282
|
+
} else {
|
|
1283
|
+
s2 = peg$FAILED;
|
|
1284
|
+
if (peg$silentFails === 0) { peg$fail(peg$e9); }
|
|
1285
|
+
}
|
|
1286
|
+
if (s2 !== peg$FAILED) {
|
|
1287
|
+
while (s2 !== peg$FAILED) {
|
|
1288
|
+
s1.push(s2);
|
|
1289
|
+
if (input.charCodeAt(peg$currPos) === 45) {
|
|
1290
|
+
s2 = peg$c9;
|
|
1291
|
+
peg$currPos++;
|
|
1292
|
+
} else {
|
|
1293
|
+
s2 = peg$FAILED;
|
|
1294
|
+
if (peg$silentFails === 0) { peg$fail(peg$e9); }
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
} else {
|
|
1298
|
+
s1 = peg$FAILED;
|
|
1299
|
+
}
|
|
1300
|
+
if (s1 !== peg$FAILED) {
|
|
1301
|
+
if (input.charCodeAt(peg$currPos) === 62) {
|
|
1302
|
+
s2 = peg$c10;
|
|
1303
|
+
peg$currPos++;
|
|
1304
|
+
} else {
|
|
1305
|
+
s2 = peg$FAILED;
|
|
1306
|
+
if (peg$silentFails === 0) { peg$fail(peg$e10); }
|
|
1307
|
+
}
|
|
1308
|
+
if (s2 !== peg$FAILED) {
|
|
1309
|
+
peg$savedPos = s0;
|
|
1310
|
+
s0 = peg$f31();
|
|
1311
|
+
} else {
|
|
1312
|
+
peg$currPos = s0;
|
|
1313
|
+
s0 = peg$FAILED;
|
|
1314
|
+
}
|
|
1315
|
+
} else {
|
|
1316
|
+
peg$currPos = s0;
|
|
1317
|
+
s0 = peg$FAILED;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
return s0;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
function peg$parsealias_loc() {
|
|
1324
|
+
let s0, s1;
|
|
1325
|
+
|
|
1326
|
+
s0 = peg$currPos;
|
|
1327
|
+
s1 = peg$parsealias();
|
|
1328
|
+
if (s1 !== peg$FAILED) {
|
|
1329
|
+
peg$savedPos = s0;
|
|
1330
|
+
s1 = peg$f32(s1);
|
|
1331
|
+
}
|
|
1332
|
+
s0 = s1;
|
|
1333
|
+
|
|
1334
|
+
return s0;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
function peg$parsealias() {
|
|
1338
|
+
let s0, s1, s2, s3, s4;
|
|
1339
|
+
|
|
1340
|
+
s0 = peg$currPos;
|
|
1341
|
+
s1 = peg$currPos;
|
|
1342
|
+
s2 = input.charAt(peg$currPos);
|
|
1343
|
+
if (peg$r0.test(s2)) {
|
|
1344
|
+
peg$currPos++;
|
|
1345
|
+
} else {
|
|
1346
|
+
s2 = peg$FAILED;
|
|
1347
|
+
if (peg$silentFails === 0) { peg$fail(peg$e11); }
|
|
1348
|
+
}
|
|
1349
|
+
if (s2 !== peg$FAILED) {
|
|
1350
|
+
s3 = [];
|
|
1351
|
+
s4 = peg$parsealias_continue();
|
|
1352
|
+
while (s4 !== peg$FAILED) {
|
|
1353
|
+
s3.push(s4);
|
|
1354
|
+
s4 = peg$parsealias_continue();
|
|
1355
|
+
}
|
|
1356
|
+
s2 = [s2, s3];
|
|
1357
|
+
s1 = s2;
|
|
1358
|
+
} else {
|
|
1359
|
+
peg$currPos = s1;
|
|
1360
|
+
s1 = peg$FAILED;
|
|
1361
|
+
}
|
|
1362
|
+
if (s1 !== peg$FAILED) {
|
|
1363
|
+
s0 = input.substring(s0, peg$currPos);
|
|
1364
|
+
} else {
|
|
1365
|
+
s0 = s1;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
return s0;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
function peg$parsealias_continue() {
|
|
1372
|
+
let s0;
|
|
1373
|
+
|
|
1374
|
+
s0 = input.charAt(peg$currPos);
|
|
1375
|
+
if (peg$r1.test(s0)) {
|
|
1376
|
+
peg$currPos++;
|
|
1377
|
+
} else {
|
|
1378
|
+
s0 = peg$FAILED;
|
|
1379
|
+
if (peg$silentFails === 0) { peg$fail(peg$e12); }
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
return s0;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
function peg$parseconstant_loc() {
|
|
1386
|
+
let s0, s1, s2;
|
|
1387
|
+
|
|
1388
|
+
s0 = peg$currPos;
|
|
1389
|
+
s1 = peg$currPos;
|
|
1390
|
+
s2 = peg$parseconstant();
|
|
1391
|
+
if (s2 !== peg$FAILED) {
|
|
1392
|
+
s1 = input.substring(s1, peg$currPos);
|
|
1393
|
+
} else {
|
|
1394
|
+
s1 = s2;
|
|
1395
|
+
}
|
|
1396
|
+
if (s1 !== peg$FAILED) {
|
|
1397
|
+
peg$savedPos = s0;
|
|
1398
|
+
s1 = peg$f33(s1);
|
|
1399
|
+
}
|
|
1400
|
+
s0 = s1;
|
|
1401
|
+
|
|
1402
|
+
return s0;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
function peg$parseconstant() {
|
|
1406
|
+
let s0;
|
|
1407
|
+
|
|
1408
|
+
s0 = peg$parseobject();
|
|
1409
|
+
if (s0 === peg$FAILED) {
|
|
1410
|
+
s0 = peg$parsearray();
|
|
1411
|
+
if (s0 === peg$FAILED) {
|
|
1412
|
+
s0 = peg$parsestring();
|
|
1413
|
+
if (s0 === peg$FAILED) {
|
|
1414
|
+
s0 = peg$parsenumber();
|
|
1415
|
+
if (s0 === peg$FAILED) {
|
|
1416
|
+
s0 = peg$parseboolean();
|
|
1417
|
+
if (s0 === peg$FAILED) {
|
|
1418
|
+
s0 = peg$parsenull();
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
return s0;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
function peg$parseboolean() {
|
|
1429
|
+
let s0, s1, s2, s3;
|
|
1430
|
+
|
|
1431
|
+
s0 = peg$currPos;
|
|
1432
|
+
if (input.substr(peg$currPos, 4) === peg$c11) {
|
|
1433
|
+
s1 = peg$c11;
|
|
1434
|
+
peg$currPos += 4;
|
|
1435
|
+
} else {
|
|
1436
|
+
s1 = peg$FAILED;
|
|
1437
|
+
if (peg$silentFails === 0) { peg$fail(peg$e13); }
|
|
1438
|
+
}
|
|
1439
|
+
if (s1 === peg$FAILED) {
|
|
1440
|
+
if (input.substr(peg$currPos, 5) === peg$c12) {
|
|
1441
|
+
s1 = peg$c12;
|
|
1442
|
+
peg$currPos += 5;
|
|
1443
|
+
} else {
|
|
1444
|
+
s1 = peg$FAILED;
|
|
1445
|
+
if (peg$silentFails === 0) { peg$fail(peg$e14); }
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
if (s1 !== peg$FAILED) {
|
|
1449
|
+
s2 = peg$currPos;
|
|
1450
|
+
peg$silentFails++;
|
|
1451
|
+
s3 = peg$parsealias_continue();
|
|
1452
|
+
peg$silentFails--;
|
|
1453
|
+
if (s3 === peg$FAILED) {
|
|
1454
|
+
s2 = undefined;
|
|
1455
|
+
} else {
|
|
1456
|
+
peg$currPos = s2;
|
|
1457
|
+
s2 = peg$FAILED;
|
|
1458
|
+
}
|
|
1459
|
+
if (s2 !== peg$FAILED) {
|
|
1460
|
+
s1 = [s1, s2];
|
|
1461
|
+
s0 = s1;
|
|
1462
|
+
} else {
|
|
1463
|
+
peg$currPos = s0;
|
|
1464
|
+
s0 = peg$FAILED;
|
|
1465
|
+
}
|
|
1466
|
+
} else {
|
|
1467
|
+
peg$currPos = s0;
|
|
1468
|
+
s0 = peg$FAILED;
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
return s0;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
function peg$parsenull() {
|
|
1475
|
+
let s0, s1, s2, s3;
|
|
1476
|
+
|
|
1477
|
+
s0 = peg$currPos;
|
|
1478
|
+
if (input.substr(peg$currPos, 4) === peg$c13) {
|
|
1479
|
+
s1 = peg$c13;
|
|
1480
|
+
peg$currPos += 4;
|
|
1481
|
+
} else {
|
|
1482
|
+
s1 = peg$FAILED;
|
|
1483
|
+
if (peg$silentFails === 0) { peg$fail(peg$e15); }
|
|
1484
|
+
}
|
|
1485
|
+
if (s1 !== peg$FAILED) {
|
|
1486
|
+
s2 = peg$currPos;
|
|
1487
|
+
peg$silentFails++;
|
|
1488
|
+
s3 = peg$parsealias_continue();
|
|
1489
|
+
peg$silentFails--;
|
|
1490
|
+
if (s3 === peg$FAILED) {
|
|
1491
|
+
s2 = undefined;
|
|
1492
|
+
} else {
|
|
1493
|
+
peg$currPos = s2;
|
|
1494
|
+
s2 = peg$FAILED;
|
|
1495
|
+
}
|
|
1496
|
+
if (s2 !== peg$FAILED) {
|
|
1497
|
+
s1 = [s1, s2];
|
|
1498
|
+
s0 = s1;
|
|
1499
|
+
} else {
|
|
1500
|
+
peg$currPos = s0;
|
|
1501
|
+
s0 = peg$FAILED;
|
|
1502
|
+
}
|
|
1503
|
+
} else {
|
|
1504
|
+
peg$currPos = s0;
|
|
1505
|
+
s0 = peg$FAILED;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
return s0;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
function peg$parseobject() {
|
|
1512
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
|
|
1513
|
+
|
|
1514
|
+
s0 = peg$currPos;
|
|
1515
|
+
if (input.charCodeAt(peg$currPos) === 123) {
|
|
1516
|
+
s1 = peg$c7;
|
|
1517
|
+
peg$currPos++;
|
|
1518
|
+
} else {
|
|
1519
|
+
s1 = peg$FAILED;
|
|
1520
|
+
if (peg$silentFails === 0) { peg$fail(peg$e7); }
|
|
1521
|
+
}
|
|
1522
|
+
if (s1 !== peg$FAILED) {
|
|
1523
|
+
s2 = peg$parse_();
|
|
1524
|
+
s3 = peg$currPos;
|
|
1525
|
+
s4 = peg$parsepair();
|
|
1526
|
+
if (s4 !== peg$FAILED) {
|
|
1527
|
+
s5 = [];
|
|
1528
|
+
s6 = peg$currPos;
|
|
1529
|
+
s7 = peg$parse_();
|
|
1530
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1531
|
+
s8 = peg$c4;
|
|
1532
|
+
peg$currPos++;
|
|
1533
|
+
} else {
|
|
1534
|
+
s8 = peg$FAILED;
|
|
1535
|
+
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
1536
|
+
}
|
|
1537
|
+
if (s8 !== peg$FAILED) {
|
|
1538
|
+
s9 = peg$parse_();
|
|
1539
|
+
s10 = peg$parsepair();
|
|
1540
|
+
if (s10 !== peg$FAILED) {
|
|
1541
|
+
s7 = [s7, s8, s9, s10];
|
|
1542
|
+
s6 = s7;
|
|
1543
|
+
} else {
|
|
1544
|
+
peg$currPos = s6;
|
|
1545
|
+
s6 = peg$FAILED;
|
|
1546
|
+
}
|
|
1547
|
+
} else {
|
|
1548
|
+
peg$currPos = s6;
|
|
1549
|
+
s6 = peg$FAILED;
|
|
1550
|
+
}
|
|
1551
|
+
while (s6 !== peg$FAILED) {
|
|
1552
|
+
s5.push(s6);
|
|
1553
|
+
s6 = peg$currPos;
|
|
1554
|
+
s7 = peg$parse_();
|
|
1555
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1556
|
+
s8 = peg$c4;
|
|
1557
|
+
peg$currPos++;
|
|
1558
|
+
} else {
|
|
1559
|
+
s8 = peg$FAILED;
|
|
1560
|
+
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
1561
|
+
}
|
|
1562
|
+
if (s8 !== peg$FAILED) {
|
|
1563
|
+
s9 = peg$parse_();
|
|
1564
|
+
s10 = peg$parsepair();
|
|
1565
|
+
if (s10 !== peg$FAILED) {
|
|
1566
|
+
s7 = [s7, s8, s9, s10];
|
|
1567
|
+
s6 = s7;
|
|
1568
|
+
} else {
|
|
1569
|
+
peg$currPos = s6;
|
|
1570
|
+
s6 = peg$FAILED;
|
|
1571
|
+
}
|
|
1572
|
+
} else {
|
|
1573
|
+
peg$currPos = s6;
|
|
1574
|
+
s6 = peg$FAILED;
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
s4 = [s4, s5];
|
|
1578
|
+
s3 = s4;
|
|
1579
|
+
} else {
|
|
1580
|
+
peg$currPos = s3;
|
|
1581
|
+
s3 = peg$FAILED;
|
|
1582
|
+
}
|
|
1583
|
+
if (s3 === peg$FAILED) {
|
|
1584
|
+
s3 = null;
|
|
1585
|
+
}
|
|
1586
|
+
s4 = peg$parse_();
|
|
1587
|
+
if (input.charCodeAt(peg$currPos) === 125) {
|
|
1588
|
+
s5 = peg$c8;
|
|
1589
|
+
peg$currPos++;
|
|
1590
|
+
} else {
|
|
1591
|
+
s5 = peg$FAILED;
|
|
1592
|
+
if (peg$silentFails === 0) { peg$fail(peg$e8); }
|
|
1593
|
+
}
|
|
1594
|
+
if (s5 !== peg$FAILED) {
|
|
1595
|
+
s1 = [s1, s2, s3, s4, s5];
|
|
1596
|
+
s0 = s1;
|
|
1597
|
+
} else {
|
|
1598
|
+
peg$currPos = s0;
|
|
1599
|
+
s0 = peg$FAILED;
|
|
1600
|
+
}
|
|
1601
|
+
} else {
|
|
1602
|
+
peg$currPos = s0;
|
|
1603
|
+
s0 = peg$FAILED;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
return s0;
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
function peg$parsepair() {
|
|
1610
|
+
let s0, s1, s2, s3, s4, s5;
|
|
1611
|
+
|
|
1612
|
+
s0 = peg$currPos;
|
|
1613
|
+
s1 = peg$parsestring();
|
|
1614
|
+
if (s1 !== peg$FAILED) {
|
|
1615
|
+
s2 = peg$parse_();
|
|
1616
|
+
if (input.charCodeAt(peg$currPos) === 58) {
|
|
1617
|
+
s3 = peg$c14;
|
|
1618
|
+
peg$currPos++;
|
|
1619
|
+
} else {
|
|
1620
|
+
s3 = peg$FAILED;
|
|
1621
|
+
if (peg$silentFails === 0) { peg$fail(peg$e16); }
|
|
1622
|
+
}
|
|
1623
|
+
if (s3 !== peg$FAILED) {
|
|
1624
|
+
s4 = peg$parse_();
|
|
1625
|
+
s5 = peg$parseconstant();
|
|
1626
|
+
if (s5 !== peg$FAILED) {
|
|
1627
|
+
s1 = [s1, s2, s3, s4, s5];
|
|
1628
|
+
s0 = s1;
|
|
1629
|
+
} else {
|
|
1630
|
+
peg$currPos = s0;
|
|
1631
|
+
s0 = peg$FAILED;
|
|
1632
|
+
}
|
|
1633
|
+
} else {
|
|
1634
|
+
peg$currPos = s0;
|
|
1635
|
+
s0 = peg$FAILED;
|
|
1636
|
+
}
|
|
1637
|
+
} else {
|
|
1638
|
+
peg$currPos = s0;
|
|
1639
|
+
s0 = peg$FAILED;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
return s0;
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
function peg$parsearray() {
|
|
1646
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
|
|
1647
|
+
|
|
1648
|
+
s0 = peg$currPos;
|
|
1649
|
+
if (input.charCodeAt(peg$currPos) === 91) {
|
|
1650
|
+
s1 = peg$c0;
|
|
1651
|
+
peg$currPos++;
|
|
1652
|
+
} else {
|
|
1653
|
+
s1 = peg$FAILED;
|
|
1654
|
+
if (peg$silentFails === 0) { peg$fail(peg$e0); }
|
|
1655
|
+
}
|
|
1656
|
+
if (s1 !== peg$FAILED) {
|
|
1657
|
+
s2 = peg$parse_();
|
|
1658
|
+
s3 = peg$currPos;
|
|
1659
|
+
s4 = peg$parseconstant();
|
|
1660
|
+
if (s4 !== peg$FAILED) {
|
|
1661
|
+
s5 = [];
|
|
1662
|
+
s6 = peg$currPos;
|
|
1663
|
+
s7 = peg$parse_();
|
|
1664
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1665
|
+
s8 = peg$c4;
|
|
1666
|
+
peg$currPos++;
|
|
1667
|
+
} else {
|
|
1668
|
+
s8 = peg$FAILED;
|
|
1669
|
+
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
1670
|
+
}
|
|
1671
|
+
if (s8 !== peg$FAILED) {
|
|
1672
|
+
s9 = peg$parse_();
|
|
1673
|
+
s10 = peg$parseconstant();
|
|
1674
|
+
if (s10 !== peg$FAILED) {
|
|
1675
|
+
s7 = [s7, s8, s9, s10];
|
|
1676
|
+
s6 = s7;
|
|
1677
|
+
} else {
|
|
1678
|
+
peg$currPos = s6;
|
|
1679
|
+
s6 = peg$FAILED;
|
|
1680
|
+
}
|
|
1681
|
+
} else {
|
|
1682
|
+
peg$currPos = s6;
|
|
1683
|
+
s6 = peg$FAILED;
|
|
1684
|
+
}
|
|
1685
|
+
while (s6 !== peg$FAILED) {
|
|
1686
|
+
s5.push(s6);
|
|
1687
|
+
s6 = peg$currPos;
|
|
1688
|
+
s7 = peg$parse_();
|
|
1689
|
+
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1690
|
+
s8 = peg$c4;
|
|
1691
|
+
peg$currPos++;
|
|
1692
|
+
} else {
|
|
1693
|
+
s8 = peg$FAILED;
|
|
1694
|
+
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
1695
|
+
}
|
|
1696
|
+
if (s8 !== peg$FAILED) {
|
|
1697
|
+
s9 = peg$parse_();
|
|
1698
|
+
s10 = peg$parseconstant();
|
|
1699
|
+
if (s10 !== peg$FAILED) {
|
|
1700
|
+
s7 = [s7, s8, s9, s10];
|
|
1701
|
+
s6 = s7;
|
|
1702
|
+
} else {
|
|
1703
|
+
peg$currPos = s6;
|
|
1704
|
+
s6 = peg$FAILED;
|
|
1705
|
+
}
|
|
1706
|
+
} else {
|
|
1707
|
+
peg$currPos = s6;
|
|
1708
|
+
s6 = peg$FAILED;
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
s4 = [s4, s5];
|
|
1712
|
+
s3 = s4;
|
|
1713
|
+
} else {
|
|
1714
|
+
peg$currPos = s3;
|
|
1715
|
+
s3 = peg$FAILED;
|
|
1716
|
+
}
|
|
1717
|
+
if (s3 === peg$FAILED) {
|
|
1718
|
+
s3 = null;
|
|
1719
|
+
}
|
|
1720
|
+
s4 = peg$parse_();
|
|
1721
|
+
if (input.charCodeAt(peg$currPos) === 93) {
|
|
1722
|
+
s5 = peg$c1;
|
|
1723
|
+
peg$currPos++;
|
|
1724
|
+
} else {
|
|
1725
|
+
s5 = peg$FAILED;
|
|
1726
|
+
if (peg$silentFails === 0) { peg$fail(peg$e1); }
|
|
1727
|
+
}
|
|
1728
|
+
if (s5 !== peg$FAILED) {
|
|
1729
|
+
s1 = [s1, s2, s3, s4, s5];
|
|
1730
|
+
s0 = s1;
|
|
1731
|
+
} else {
|
|
1732
|
+
peg$currPos = s0;
|
|
1733
|
+
s0 = peg$FAILED;
|
|
1734
|
+
}
|
|
1735
|
+
} else {
|
|
1736
|
+
peg$currPos = s0;
|
|
1737
|
+
s0 = peg$FAILED;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
return s0;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
function peg$parsenumber() {
|
|
1744
|
+
let s0, s1, s2, s3, s4, s5, s6, s7, s8;
|
|
1745
|
+
|
|
1746
|
+
s0 = peg$currPos;
|
|
1747
|
+
if (input.charCodeAt(peg$currPos) === 45) {
|
|
1748
|
+
s1 = peg$c9;
|
|
1749
|
+
peg$currPos++;
|
|
1750
|
+
} else {
|
|
1751
|
+
s1 = peg$FAILED;
|
|
1752
|
+
if (peg$silentFails === 0) { peg$fail(peg$e9); }
|
|
1753
|
+
}
|
|
1754
|
+
if (s1 === peg$FAILED) {
|
|
1755
|
+
s1 = null;
|
|
1756
|
+
}
|
|
1757
|
+
if (input.charCodeAt(peg$currPos) === 48) {
|
|
1758
|
+
s2 = peg$c15;
|
|
1759
|
+
peg$currPos++;
|
|
1760
|
+
} else {
|
|
1761
|
+
s2 = peg$FAILED;
|
|
1762
|
+
if (peg$silentFails === 0) { peg$fail(peg$e17); }
|
|
1763
|
+
}
|
|
1764
|
+
if (s2 === peg$FAILED) {
|
|
1765
|
+
s2 = peg$currPos;
|
|
1766
|
+
s3 = input.charAt(peg$currPos);
|
|
1767
|
+
if (peg$r2.test(s3)) {
|
|
1768
|
+
peg$currPos++;
|
|
1769
|
+
} else {
|
|
1770
|
+
s3 = peg$FAILED;
|
|
1771
|
+
if (peg$silentFails === 0) { peg$fail(peg$e18); }
|
|
1772
|
+
}
|
|
1773
|
+
if (s3 !== peg$FAILED) {
|
|
1774
|
+
s4 = [];
|
|
1775
|
+
s5 = input.charAt(peg$currPos);
|
|
1776
|
+
if (peg$r3.test(s5)) {
|
|
1777
|
+
peg$currPos++;
|
|
1778
|
+
} else {
|
|
1779
|
+
s5 = peg$FAILED;
|
|
1780
|
+
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
1781
|
+
}
|
|
1782
|
+
while (s5 !== peg$FAILED) {
|
|
1783
|
+
s4.push(s5);
|
|
1784
|
+
s5 = input.charAt(peg$currPos);
|
|
1785
|
+
if (peg$r3.test(s5)) {
|
|
1786
|
+
peg$currPos++;
|
|
1787
|
+
} else {
|
|
1788
|
+
s5 = peg$FAILED;
|
|
1789
|
+
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
s3 = [s3, s4];
|
|
1793
|
+
s2 = s3;
|
|
1794
|
+
} else {
|
|
1795
|
+
peg$currPos = s2;
|
|
1796
|
+
s2 = peg$FAILED;
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
if (s2 !== peg$FAILED) {
|
|
1800
|
+
s3 = peg$currPos;
|
|
1801
|
+
if (input.charCodeAt(peg$currPos) === 46) {
|
|
1802
|
+
s4 = peg$c16;
|
|
750
1803
|
peg$currPos++;
|
|
751
1804
|
} else {
|
|
752
1805
|
s4 = peg$FAILED;
|
|
753
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
1806
|
+
if (peg$silentFails === 0) { peg$fail(peg$e20); }
|
|
754
1807
|
}
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
if (peg$
|
|
1808
|
+
if (s4 !== peg$FAILED) {
|
|
1809
|
+
s5 = [];
|
|
1810
|
+
s6 = input.charAt(peg$currPos);
|
|
1811
|
+
if (peg$r3.test(s6)) {
|
|
1812
|
+
peg$currPos++;
|
|
1813
|
+
} else {
|
|
1814
|
+
s6 = peg$FAILED;
|
|
1815
|
+
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
1816
|
+
}
|
|
1817
|
+
if (s6 !== peg$FAILED) {
|
|
1818
|
+
while (s6 !== peg$FAILED) {
|
|
1819
|
+
s5.push(s6);
|
|
1820
|
+
s6 = input.charAt(peg$currPos);
|
|
1821
|
+
if (peg$r3.test(s6)) {
|
|
1822
|
+
peg$currPos++;
|
|
1823
|
+
} else {
|
|
1824
|
+
s6 = peg$FAILED;
|
|
1825
|
+
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
} else {
|
|
1829
|
+
s5 = peg$FAILED;
|
|
1830
|
+
}
|
|
1831
|
+
if (s5 !== peg$FAILED) {
|
|
1832
|
+
s4 = [s4, s5];
|
|
1833
|
+
s3 = s4;
|
|
1834
|
+
} else {
|
|
1835
|
+
peg$currPos = s3;
|
|
1836
|
+
s3 = peg$FAILED;
|
|
1837
|
+
}
|
|
1838
|
+
} else {
|
|
1839
|
+
peg$currPos = s3;
|
|
1840
|
+
s3 = peg$FAILED;
|
|
1841
|
+
}
|
|
1842
|
+
if (s3 === peg$FAILED) {
|
|
1843
|
+
s3 = null;
|
|
1844
|
+
}
|
|
1845
|
+
s4 = peg$currPos;
|
|
1846
|
+
s5 = input.charAt(peg$currPos);
|
|
1847
|
+
if (peg$r4.test(s5)) {
|
|
1848
|
+
peg$currPos++;
|
|
1849
|
+
} else {
|
|
1850
|
+
s5 = peg$FAILED;
|
|
1851
|
+
if (peg$silentFails === 0) { peg$fail(peg$e21); }
|
|
1852
|
+
}
|
|
1853
|
+
if (s5 !== peg$FAILED) {
|
|
1854
|
+
s6 = input.charAt(peg$currPos);
|
|
1855
|
+
if (peg$r5.test(s6)) {
|
|
759
1856
|
peg$currPos++;
|
|
760
1857
|
} else {
|
|
1858
|
+
s6 = peg$FAILED;
|
|
1859
|
+
if (peg$silentFails === 0) { peg$fail(peg$e22); }
|
|
1860
|
+
}
|
|
1861
|
+
if (s6 === peg$FAILED) {
|
|
1862
|
+
s6 = null;
|
|
1863
|
+
}
|
|
1864
|
+
s7 = [];
|
|
1865
|
+
s8 = input.charAt(peg$currPos);
|
|
1866
|
+
if (peg$r3.test(s8)) {
|
|
1867
|
+
peg$currPos++;
|
|
1868
|
+
} else {
|
|
1869
|
+
s8 = peg$FAILED;
|
|
1870
|
+
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
1871
|
+
}
|
|
1872
|
+
if (s8 !== peg$FAILED) {
|
|
1873
|
+
while (s8 !== peg$FAILED) {
|
|
1874
|
+
s7.push(s8);
|
|
1875
|
+
s8 = input.charAt(peg$currPos);
|
|
1876
|
+
if (peg$r3.test(s8)) {
|
|
1877
|
+
peg$currPos++;
|
|
1878
|
+
} else {
|
|
1879
|
+
s8 = peg$FAILED;
|
|
1880
|
+
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
} else {
|
|
1884
|
+
s7 = peg$FAILED;
|
|
1885
|
+
}
|
|
1886
|
+
if (s7 !== peg$FAILED) {
|
|
1887
|
+
s5 = [s5, s6, s7];
|
|
1888
|
+
s4 = s5;
|
|
1889
|
+
} else {
|
|
1890
|
+
peg$currPos = s4;
|
|
761
1891
|
s4 = peg$FAILED;
|
|
762
|
-
if (peg$silentFails === 0) { peg$fail(peg$e8); }
|
|
763
1892
|
}
|
|
1893
|
+
} else {
|
|
1894
|
+
peg$currPos = s4;
|
|
1895
|
+
s4 = peg$FAILED;
|
|
764
1896
|
}
|
|
765
|
-
|
|
1897
|
+
if (s4 === peg$FAILED) {
|
|
1898
|
+
s4 = null;
|
|
1899
|
+
}
|
|
1900
|
+
s5 = peg$currPos;
|
|
1901
|
+
peg$silentFails++;
|
|
1902
|
+
s6 = peg$parsealias_continue();
|
|
1903
|
+
peg$silentFails--;
|
|
1904
|
+
if (s6 === peg$FAILED) {
|
|
1905
|
+
s5 = undefined;
|
|
1906
|
+
} else {
|
|
1907
|
+
peg$currPos = s5;
|
|
1908
|
+
s5 = peg$FAILED;
|
|
1909
|
+
}
|
|
1910
|
+
if (s5 !== peg$FAILED) {
|
|
1911
|
+
s1 = [s1, s2, s3, s4, s5];
|
|
1912
|
+
s0 = s1;
|
|
1913
|
+
} else {
|
|
1914
|
+
peg$currPos = s0;
|
|
1915
|
+
s0 = peg$FAILED;
|
|
1916
|
+
}
|
|
1917
|
+
} else {
|
|
1918
|
+
peg$currPos = s0;
|
|
1919
|
+
s0 = peg$FAILED;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
return s0;
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
function peg$parsestring_loc() {
|
|
1926
|
+
let s0, s1, s2;
|
|
1927
|
+
|
|
1928
|
+
s0 = peg$currPos;
|
|
1929
|
+
s1 = peg$currPos;
|
|
1930
|
+
s2 = peg$parsestring();
|
|
1931
|
+
if (s2 !== peg$FAILED) {
|
|
1932
|
+
s1 = input.substring(s1, peg$currPos);
|
|
1933
|
+
} else {
|
|
766
1934
|
s1 = s2;
|
|
1935
|
+
}
|
|
1936
|
+
if (s1 !== peg$FAILED) {
|
|
1937
|
+
peg$savedPos = s0;
|
|
1938
|
+
s1 = peg$f34(s1);
|
|
1939
|
+
}
|
|
1940
|
+
s0 = s1;
|
|
1941
|
+
|
|
1942
|
+
return s0;
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
function peg$parsestring() {
|
|
1946
|
+
let s0, s1, s2, s3;
|
|
1947
|
+
|
|
1948
|
+
s0 = peg$currPos;
|
|
1949
|
+
if (input.charCodeAt(peg$currPos) === 34) {
|
|
1950
|
+
s1 = peg$c17;
|
|
1951
|
+
peg$currPos++;
|
|
767
1952
|
} else {
|
|
768
|
-
peg$currPos = s1;
|
|
769
1953
|
s1 = peg$FAILED;
|
|
1954
|
+
if (peg$silentFails === 0) { peg$fail(peg$e23); }
|
|
770
1955
|
}
|
|
771
1956
|
if (s1 !== peg$FAILED) {
|
|
772
|
-
|
|
1957
|
+
s2 = [];
|
|
1958
|
+
s3 = peg$parsestring_char();
|
|
1959
|
+
while (s3 !== peg$FAILED) {
|
|
1960
|
+
s2.push(s3);
|
|
1961
|
+
s3 = peg$parsestring_char();
|
|
1962
|
+
}
|
|
1963
|
+
if (input.charCodeAt(peg$currPos) === 34) {
|
|
1964
|
+
s3 = peg$c17;
|
|
1965
|
+
peg$currPos++;
|
|
1966
|
+
} else {
|
|
1967
|
+
s3 = peg$FAILED;
|
|
1968
|
+
if (peg$silentFails === 0) { peg$fail(peg$e23); }
|
|
1969
|
+
}
|
|
1970
|
+
if (s3 !== peg$FAILED) {
|
|
1971
|
+
s1 = [s1, s2, s3];
|
|
1972
|
+
s0 = s1;
|
|
1973
|
+
} else {
|
|
1974
|
+
peg$currPos = s0;
|
|
1975
|
+
s0 = peg$FAILED;
|
|
1976
|
+
}
|
|
773
1977
|
} else {
|
|
774
|
-
|
|
1978
|
+
peg$currPos = s0;
|
|
1979
|
+
s0 = peg$FAILED;
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
return s0;
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
function peg$parsestring_char() {
|
|
1986
|
+
let s0, s1, s2, s3, s4, s5;
|
|
1987
|
+
|
|
1988
|
+
s0 = input.charAt(peg$currPos);
|
|
1989
|
+
if (peg$r6.test(s0)) {
|
|
1990
|
+
peg$currPos++;
|
|
1991
|
+
} else {
|
|
1992
|
+
s0 = peg$FAILED;
|
|
1993
|
+
if (peg$silentFails === 0) { peg$fail(peg$e24); }
|
|
1994
|
+
}
|
|
1995
|
+
if (s0 === peg$FAILED) {
|
|
1996
|
+
s0 = peg$currPos;
|
|
1997
|
+
if (input.charCodeAt(peg$currPos) === 92) {
|
|
1998
|
+
s1 = peg$c18;
|
|
1999
|
+
peg$currPos++;
|
|
2000
|
+
} else {
|
|
2001
|
+
s1 = peg$FAILED;
|
|
2002
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
2003
|
+
}
|
|
2004
|
+
if (s1 !== peg$FAILED) {
|
|
2005
|
+
s2 = input.charAt(peg$currPos);
|
|
2006
|
+
if (peg$r7.test(s2)) {
|
|
2007
|
+
peg$currPos++;
|
|
2008
|
+
} else {
|
|
2009
|
+
s2 = peg$FAILED;
|
|
2010
|
+
if (peg$silentFails === 0) { peg$fail(peg$e26); }
|
|
2011
|
+
}
|
|
2012
|
+
if (s2 !== peg$FAILED) {
|
|
2013
|
+
s1 = [s1, s2];
|
|
2014
|
+
s0 = s1;
|
|
2015
|
+
} else {
|
|
2016
|
+
peg$currPos = s0;
|
|
2017
|
+
s0 = peg$FAILED;
|
|
2018
|
+
}
|
|
2019
|
+
} else {
|
|
2020
|
+
peg$currPos = s0;
|
|
2021
|
+
s0 = peg$FAILED;
|
|
2022
|
+
}
|
|
2023
|
+
if (s0 === peg$FAILED) {
|
|
2024
|
+
s0 = peg$currPos;
|
|
2025
|
+
if (input.substr(peg$currPos, 2) === peg$c19) {
|
|
2026
|
+
s1 = peg$c19;
|
|
2027
|
+
peg$currPos += 2;
|
|
2028
|
+
} else {
|
|
2029
|
+
s1 = peg$FAILED;
|
|
2030
|
+
if (peg$silentFails === 0) { peg$fail(peg$e27); }
|
|
2031
|
+
}
|
|
2032
|
+
if (s1 !== peg$FAILED) {
|
|
2033
|
+
s2 = input.charAt(peg$currPos);
|
|
2034
|
+
if (peg$r8.test(s2)) {
|
|
2035
|
+
peg$currPos++;
|
|
2036
|
+
} else {
|
|
2037
|
+
s2 = peg$FAILED;
|
|
2038
|
+
if (peg$silentFails === 0) { peg$fail(peg$e28); }
|
|
2039
|
+
}
|
|
2040
|
+
if (s2 !== peg$FAILED) {
|
|
2041
|
+
s3 = input.charAt(peg$currPos);
|
|
2042
|
+
if (peg$r8.test(s3)) {
|
|
2043
|
+
peg$currPos++;
|
|
2044
|
+
} else {
|
|
2045
|
+
s3 = peg$FAILED;
|
|
2046
|
+
if (peg$silentFails === 0) { peg$fail(peg$e28); }
|
|
2047
|
+
}
|
|
2048
|
+
if (s3 !== peg$FAILED) {
|
|
2049
|
+
s4 = input.charAt(peg$currPos);
|
|
2050
|
+
if (peg$r8.test(s4)) {
|
|
2051
|
+
peg$currPos++;
|
|
2052
|
+
} else {
|
|
2053
|
+
s4 = peg$FAILED;
|
|
2054
|
+
if (peg$silentFails === 0) { peg$fail(peg$e28); }
|
|
2055
|
+
}
|
|
2056
|
+
if (s4 !== peg$FAILED) {
|
|
2057
|
+
s5 = input.charAt(peg$currPos);
|
|
2058
|
+
if (peg$r8.test(s5)) {
|
|
2059
|
+
peg$currPos++;
|
|
2060
|
+
} else {
|
|
2061
|
+
s5 = peg$FAILED;
|
|
2062
|
+
if (peg$silentFails === 0) { peg$fail(peg$e28); }
|
|
2063
|
+
}
|
|
2064
|
+
if (s5 !== peg$FAILED) {
|
|
2065
|
+
s1 = [s1, s2, s3, s4, s5];
|
|
2066
|
+
s0 = s1;
|
|
2067
|
+
} else {
|
|
2068
|
+
peg$currPos = s0;
|
|
2069
|
+
s0 = peg$FAILED;
|
|
2070
|
+
}
|
|
2071
|
+
} else {
|
|
2072
|
+
peg$currPos = s0;
|
|
2073
|
+
s0 = peg$FAILED;
|
|
2074
|
+
}
|
|
2075
|
+
} else {
|
|
2076
|
+
peg$currPos = s0;
|
|
2077
|
+
s0 = peg$FAILED;
|
|
2078
|
+
}
|
|
2079
|
+
} else {
|
|
2080
|
+
peg$currPos = s0;
|
|
2081
|
+
s0 = peg$FAILED;
|
|
2082
|
+
}
|
|
2083
|
+
} else {
|
|
2084
|
+
peg$currPos = s0;
|
|
2085
|
+
s0 = peg$FAILED;
|
|
2086
|
+
}
|
|
2087
|
+
}
|
|
775
2088
|
}
|
|
776
2089
|
|
|
777
2090
|
return s0;
|
|
@@ -784,7 +2097,7 @@ function peg$parse(input, options) {
|
|
|
784
2097
|
s1 = peg$parsecap_urn();
|
|
785
2098
|
if (s1 !== peg$FAILED) {
|
|
786
2099
|
peg$savedPos = s0;
|
|
787
|
-
s1 = peg$
|
|
2100
|
+
s1 = peg$f35(s1);
|
|
788
2101
|
}
|
|
789
2102
|
s0 = s1;
|
|
790
2103
|
|
|
@@ -796,12 +2109,12 @@ function peg$parse(input, options) {
|
|
|
796
2109
|
|
|
797
2110
|
s0 = peg$currPos;
|
|
798
2111
|
s1 = peg$currPos;
|
|
799
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
800
|
-
s2 = peg$
|
|
2112
|
+
if (input.substr(peg$currPos, 4) === peg$c20) {
|
|
2113
|
+
s2 = peg$c20;
|
|
801
2114
|
peg$currPos += 4;
|
|
802
2115
|
} else {
|
|
803
2116
|
s2 = peg$FAILED;
|
|
804
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2117
|
+
if (peg$silentFails === 0) { peg$fail(peg$e29); }
|
|
805
2118
|
}
|
|
806
2119
|
if (s2 !== peg$FAILED) {
|
|
807
2120
|
s3 = [];
|
|
@@ -864,7 +2177,7 @@ function peg$parse(input, options) {
|
|
|
864
2177
|
peg$currPos++;
|
|
865
2178
|
} else {
|
|
866
2179
|
s3 = peg$FAILED;
|
|
867
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2180
|
+
if (peg$silentFails === 0) { peg$fail(peg$e30); }
|
|
868
2181
|
}
|
|
869
2182
|
if (s3 !== peg$FAILED) {
|
|
870
2183
|
s1 = [s1, s2, s3];
|
|
@@ -890,26 +2203,26 @@ function peg$parse(input, options) {
|
|
|
890
2203
|
let s0, s1;
|
|
891
2204
|
|
|
892
2205
|
peg$silentFails++;
|
|
893
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
894
|
-
s0 = peg$
|
|
2206
|
+
if (input.substr(peg$currPos, 2) === peg$c21) {
|
|
2207
|
+
s0 = peg$c21;
|
|
895
2208
|
peg$currPos += 2;
|
|
896
2209
|
} else {
|
|
897
2210
|
s0 = peg$FAILED;
|
|
898
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2211
|
+
if (peg$silentFails === 0) { peg$fail(peg$e32); }
|
|
899
2212
|
}
|
|
900
2213
|
if (s0 === peg$FAILED) {
|
|
901
2214
|
s0 = input.charAt(peg$currPos);
|
|
902
|
-
if (peg$
|
|
2215
|
+
if (peg$r9.test(s0)) {
|
|
903
2216
|
peg$currPos++;
|
|
904
2217
|
} else {
|
|
905
2218
|
s0 = peg$FAILED;
|
|
906
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2219
|
+
if (peg$silentFails === 0) { peg$fail(peg$e33); }
|
|
907
2220
|
}
|
|
908
2221
|
}
|
|
909
2222
|
peg$silentFails--;
|
|
910
2223
|
if (s0 === peg$FAILED) {
|
|
911
2224
|
s1 = peg$FAILED;
|
|
912
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2225
|
+
if (peg$silentFails === 0) { peg$fail(peg$e31); }
|
|
913
2226
|
}
|
|
914
2227
|
|
|
915
2228
|
return s0;
|
|
@@ -920,39 +2233,39 @@ function peg$parse(input, options) {
|
|
|
920
2233
|
|
|
921
2234
|
s0 = peg$currPos;
|
|
922
2235
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
923
|
-
s1 = peg$
|
|
2236
|
+
s1 = peg$c17;
|
|
924
2237
|
peg$currPos++;
|
|
925
2238
|
} else {
|
|
926
2239
|
s1 = peg$FAILED;
|
|
927
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2240
|
+
if (peg$silentFails === 0) { peg$fail(peg$e23); }
|
|
928
2241
|
}
|
|
929
2242
|
if (s1 !== peg$FAILED) {
|
|
930
2243
|
s2 = [];
|
|
931
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
932
|
-
s3 = peg$
|
|
2244
|
+
if (input.substr(peg$currPos, 2) === peg$c22) {
|
|
2245
|
+
s3 = peg$c22;
|
|
933
2246
|
peg$currPos += 2;
|
|
934
2247
|
} else {
|
|
935
2248
|
s3 = peg$FAILED;
|
|
936
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2249
|
+
if (peg$silentFails === 0) { peg$fail(peg$e34); }
|
|
937
2250
|
}
|
|
938
2251
|
if (s3 === peg$FAILED) {
|
|
939
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
940
|
-
s3 = peg$
|
|
2252
|
+
if (input.substr(peg$currPos, 2) === peg$c23) {
|
|
2253
|
+
s3 = peg$c23;
|
|
941
2254
|
peg$currPos += 2;
|
|
942
2255
|
} else {
|
|
943
2256
|
s3 = peg$FAILED;
|
|
944
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2257
|
+
if (peg$silentFails === 0) { peg$fail(peg$e35); }
|
|
945
2258
|
}
|
|
946
2259
|
if (s3 === peg$FAILED) {
|
|
947
2260
|
s3 = peg$currPos;
|
|
948
2261
|
s4 = peg$currPos;
|
|
949
2262
|
peg$silentFails++;
|
|
950
2263
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
951
|
-
s5 = peg$
|
|
2264
|
+
s5 = peg$c17;
|
|
952
2265
|
peg$currPos++;
|
|
953
2266
|
} else {
|
|
954
2267
|
s5 = peg$FAILED;
|
|
955
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2268
|
+
if (peg$silentFails === 0) { peg$fail(peg$e23); }
|
|
956
2269
|
}
|
|
957
2270
|
peg$silentFails--;
|
|
958
2271
|
if (s5 === peg$FAILED) {
|
|
@@ -967,7 +2280,7 @@ function peg$parse(input, options) {
|
|
|
967
2280
|
peg$currPos++;
|
|
968
2281
|
} else {
|
|
969
2282
|
s5 = peg$FAILED;
|
|
970
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2283
|
+
if (peg$silentFails === 0) { peg$fail(peg$e30); }
|
|
971
2284
|
}
|
|
972
2285
|
if (s5 !== peg$FAILED) {
|
|
973
2286
|
s4 = [s4, s5];
|
|
@@ -984,31 +2297,31 @@ function peg$parse(input, options) {
|
|
|
984
2297
|
}
|
|
985
2298
|
while (s3 !== peg$FAILED) {
|
|
986
2299
|
s2.push(s3);
|
|
987
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
988
|
-
s3 = peg$
|
|
2300
|
+
if (input.substr(peg$currPos, 2) === peg$c22) {
|
|
2301
|
+
s3 = peg$c22;
|
|
989
2302
|
peg$currPos += 2;
|
|
990
2303
|
} else {
|
|
991
2304
|
s3 = peg$FAILED;
|
|
992
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2305
|
+
if (peg$silentFails === 0) { peg$fail(peg$e34); }
|
|
993
2306
|
}
|
|
994
2307
|
if (s3 === peg$FAILED) {
|
|
995
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
996
|
-
s3 = peg$
|
|
2308
|
+
if (input.substr(peg$currPos, 2) === peg$c23) {
|
|
2309
|
+
s3 = peg$c23;
|
|
997
2310
|
peg$currPos += 2;
|
|
998
2311
|
} else {
|
|
999
2312
|
s3 = peg$FAILED;
|
|
1000
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2313
|
+
if (peg$silentFails === 0) { peg$fail(peg$e35); }
|
|
1001
2314
|
}
|
|
1002
2315
|
if (s3 === peg$FAILED) {
|
|
1003
2316
|
s3 = peg$currPos;
|
|
1004
2317
|
s4 = peg$currPos;
|
|
1005
2318
|
peg$silentFails++;
|
|
1006
2319
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
1007
|
-
s5 = peg$
|
|
2320
|
+
s5 = peg$c17;
|
|
1008
2321
|
peg$currPos++;
|
|
1009
2322
|
} else {
|
|
1010
2323
|
s5 = peg$FAILED;
|
|
1011
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2324
|
+
if (peg$silentFails === 0) { peg$fail(peg$e23); }
|
|
1012
2325
|
}
|
|
1013
2326
|
peg$silentFails--;
|
|
1014
2327
|
if (s5 === peg$FAILED) {
|
|
@@ -1023,7 +2336,7 @@ function peg$parse(input, options) {
|
|
|
1023
2336
|
peg$currPos++;
|
|
1024
2337
|
} else {
|
|
1025
2338
|
s5 = peg$FAILED;
|
|
1026
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2339
|
+
if (peg$silentFails === 0) { peg$fail(peg$e30); }
|
|
1027
2340
|
}
|
|
1028
2341
|
if (s5 !== peg$FAILED) {
|
|
1029
2342
|
s4 = [s4, s5];
|
|
@@ -1040,11 +2353,11 @@ function peg$parse(input, options) {
|
|
|
1040
2353
|
}
|
|
1041
2354
|
}
|
|
1042
2355
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
1043
|
-
s3 = peg$
|
|
2356
|
+
s3 = peg$c17;
|
|
1044
2357
|
peg$currPos++;
|
|
1045
2358
|
} else {
|
|
1046
2359
|
s3 = peg$FAILED;
|
|
1047
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2360
|
+
if (peg$silentFails === 0) { peg$fail(peg$e23); }
|
|
1048
2361
|
}
|
|
1049
2362
|
if (s3 !== peg$FAILED) {
|
|
1050
2363
|
s1 = [s1, s2, s3];
|
|
@@ -1067,20 +2380,20 @@ function peg$parse(input, options) {
|
|
|
1067
2380
|
peg$silentFails++;
|
|
1068
2381
|
s0 = [];
|
|
1069
2382
|
s1 = input.charAt(peg$currPos);
|
|
1070
|
-
if (peg$
|
|
2383
|
+
if (peg$r10.test(s1)) {
|
|
1071
2384
|
peg$currPos++;
|
|
1072
2385
|
} else {
|
|
1073
2386
|
s1 = peg$FAILED;
|
|
1074
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2387
|
+
if (peg$silentFails === 0) { peg$fail(peg$e36); }
|
|
1075
2388
|
}
|
|
1076
2389
|
while (s1 !== peg$FAILED) {
|
|
1077
2390
|
s0.push(s1);
|
|
1078
2391
|
s1 = input.charAt(peg$currPos);
|
|
1079
|
-
if (peg$
|
|
2392
|
+
if (peg$r10.test(s1)) {
|
|
1080
2393
|
peg$currPos++;
|
|
1081
2394
|
} else {
|
|
1082
2395
|
s1 = peg$FAILED;
|
|
1083
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2396
|
+
if (peg$silentFails === 0) { peg$fail(peg$e36); }
|
|
1084
2397
|
}
|
|
1085
2398
|
}
|
|
1086
2399
|
peg$silentFails--;
|
|
@@ -1094,21 +2407,21 @@ function peg$parse(input, options) {
|
|
|
1094
2407
|
peg$silentFails++;
|
|
1095
2408
|
s0 = [];
|
|
1096
2409
|
s1 = input.charAt(peg$currPos);
|
|
1097
|
-
if (peg$
|
|
2410
|
+
if (peg$r10.test(s1)) {
|
|
1098
2411
|
peg$currPos++;
|
|
1099
2412
|
} else {
|
|
1100
2413
|
s1 = peg$FAILED;
|
|
1101
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2414
|
+
if (peg$silentFails === 0) { peg$fail(peg$e36); }
|
|
1102
2415
|
}
|
|
1103
2416
|
if (s1 !== peg$FAILED) {
|
|
1104
2417
|
while (s1 !== peg$FAILED) {
|
|
1105
2418
|
s0.push(s1);
|
|
1106
2419
|
s1 = input.charAt(peg$currPos);
|
|
1107
|
-
if (peg$
|
|
2420
|
+
if (peg$r10.test(s1)) {
|
|
1108
2421
|
peg$currPos++;
|
|
1109
2422
|
} else {
|
|
1110
2423
|
s1 = peg$FAILED;
|
|
1111
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2424
|
+
if (peg$silentFails === 0) { peg$fail(peg$e36); }
|
|
1112
2425
|
}
|
|
1113
2426
|
}
|
|
1114
2427
|
} else {
|
|
@@ -1117,7 +2430,7 @@ function peg$parse(input, options) {
|
|
|
1117
2430
|
peg$silentFails--;
|
|
1118
2431
|
if (s0 === peg$FAILED) {
|
|
1119
2432
|
s1 = peg$FAILED;
|
|
1120
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2433
|
+
if (peg$silentFails === 0) { peg$fail(peg$e37); }
|
|
1121
2434
|
}
|
|
1122
2435
|
|
|
1123
2436
|
return s0;
|