capdag 1.470.4 → 1.474.0
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 +6 -0
- package/capdag.js +494 -31
- package/machine-parser.js +103 -323
- package/package.json +2 -2
package/machine-parser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// @generated by Peggy 5.1.
|
|
1
|
+
// @generated by Peggy 5.1.1.
|
|
2
2
|
//
|
|
3
3
|
// https://peggyjs.org/
|
|
4
4
|
|
|
@@ -58,10 +58,9 @@ class peg$SyntaxError extends SyntaxError {
|
|
|
58
58
|
return s;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
function
|
|
61
|
+
function escape(s, special) {
|
|
62
62
|
return unicodeEscape(s
|
|
63
|
-
.replace(
|
|
64
|
-
.replace(/"/g, "\\\"")
|
|
63
|
+
.replace(special, "\\$&")
|
|
65
64
|
.replace(/\0/g, "\\0")
|
|
66
65
|
.replace(/\t/g, "\\t")
|
|
67
66
|
.replace(/\n/g, "\\n")
|
|
@@ -70,18 +69,12 @@ class peg$SyntaxError extends SyntaxError {
|
|
|
70
69
|
.replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
|
|
71
70
|
}
|
|
72
71
|
|
|
72
|
+
function literalEscape(s) {
|
|
73
|
+
return escape(s, /[\\"]/g);
|
|
74
|
+
}
|
|
75
|
+
|
|
73
76
|
function classEscape(s) {
|
|
74
|
-
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, ch => "\\x0" + hex(ch))
|
|
84
|
-
.replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
|
|
77
|
+
return escape(s, /[\\\]^-]/g);
|
|
85
78
|
}
|
|
86
79
|
|
|
87
80
|
const DESCRIBE_EXPECTATION_FNS = {
|
|
@@ -189,17 +182,6 @@ function peg$parse(input, options) {
|
|
|
189
182
|
const peg$c22 = "\\\"";
|
|
190
183
|
const peg$c23 = "\\\\";
|
|
191
184
|
|
|
192
|
-
const peg$r0 = /^[a-zA-Z_]/;
|
|
193
|
-
const peg$r1 = /^[a-zA-Z0-9_\-]/;
|
|
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]/;
|
|
203
185
|
|
|
204
186
|
const peg$e0 = peg$literalExpectation("[", false);
|
|
205
187
|
const peg$e1 = peg$literalExpectation("]", false);
|
|
@@ -314,6 +296,7 @@ function peg$parse(input, options) {
|
|
|
314
296
|
let peg$silentFails = options.peg$silentFails | 0;
|
|
315
297
|
|
|
316
298
|
let peg$result;
|
|
299
|
+
let peg$charCode;
|
|
317
300
|
|
|
318
301
|
if (options.startRule) {
|
|
319
302
|
if (!(options.startRule in peg$startRuleFunctions)) {
|
|
@@ -482,10 +465,10 @@ function peg$parse(input, options) {
|
|
|
482
465
|
s0 = peg$currPos;
|
|
483
466
|
s1 = peg$parse_();
|
|
484
467
|
s2 = [];
|
|
485
|
-
|
|
486
|
-
while (s3 !== peg$FAILED) {
|
|
487
|
-
s2.push(s3);
|
|
468
|
+
for (;;) {
|
|
488
469
|
s3 = peg$parsestmt();
|
|
470
|
+
if (s3 === peg$FAILED) { break; }
|
|
471
|
+
s2.push(s3);
|
|
489
472
|
}
|
|
490
473
|
s3 = peg$parse_();
|
|
491
474
|
peg$savedPos = s0;
|
|
@@ -763,31 +746,7 @@ function peg$parse(input, options) {
|
|
|
763
746
|
s4 = peg$parsemember();
|
|
764
747
|
if (s4 !== peg$FAILED) {
|
|
765
748
|
s5 = [];
|
|
766
|
-
|
|
767
|
-
s7 = peg$parse_();
|
|
768
|
-
if (input.charCodeAt(peg$currPos) === 44) {
|
|
769
|
-
s8 = peg$c4;
|
|
770
|
-
peg$currPos++;
|
|
771
|
-
} else {
|
|
772
|
-
s8 = peg$FAILED;
|
|
773
|
-
if (peg$silentFails === 0) { peg$fail(peg$e4); }
|
|
774
|
-
}
|
|
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);
|
|
781
|
-
} else {
|
|
782
|
-
peg$currPos = s6;
|
|
783
|
-
s6 = peg$FAILED;
|
|
784
|
-
}
|
|
785
|
-
} else {
|
|
786
|
-
peg$currPos = s6;
|
|
787
|
-
s6 = peg$FAILED;
|
|
788
|
-
}
|
|
789
|
-
while (s6 !== peg$FAILED) {
|
|
790
|
-
s5.push(s6);
|
|
749
|
+
for (;;) {
|
|
791
750
|
s6 = peg$currPos;
|
|
792
751
|
s7 = peg$parse_();
|
|
793
752
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
@@ -811,6 +770,8 @@ function peg$parse(input, options) {
|
|
|
811
770
|
peg$currPos = s6;
|
|
812
771
|
s6 = peg$FAILED;
|
|
813
772
|
}
|
|
773
|
+
if (s6 === peg$FAILED) { break; }
|
|
774
|
+
s5.push(s6);
|
|
814
775
|
}
|
|
815
776
|
peg$savedPos = s3;
|
|
816
777
|
s3 = peg$f10(s4, s5);
|
|
@@ -959,31 +920,7 @@ function peg$parse(input, options) {
|
|
|
959
920
|
s4 = peg$parsepolicy_entry();
|
|
960
921
|
if (s4 !== peg$FAILED) {
|
|
961
922
|
s5 = [];
|
|
962
|
-
|
|
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);
|
|
923
|
+
for (;;) {
|
|
987
924
|
s6 = peg$currPos;
|
|
988
925
|
s7 = peg$parse_();
|
|
989
926
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
@@ -1007,6 +944,8 @@ function peg$parse(input, options) {
|
|
|
1007
944
|
peg$currPos = s6;
|
|
1008
945
|
s6 = peg$FAILED;
|
|
1009
946
|
}
|
|
947
|
+
if (s6 === peg$FAILED) { break; }
|
|
948
|
+
s5.push(s6);
|
|
1010
949
|
}
|
|
1011
950
|
peg$savedPos = s3;
|
|
1012
951
|
s3 = peg$f19(s4, s5);
|
|
@@ -1145,31 +1084,7 @@ function peg$parse(input, options) {
|
|
|
1145
1084
|
s4 = peg$parsetarget();
|
|
1146
1085
|
if (s4 !== peg$FAILED) {
|
|
1147
1086
|
s5 = [];
|
|
1148
|
-
|
|
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);
|
|
1087
|
+
for (;;) {
|
|
1173
1088
|
s6 = peg$currPos;
|
|
1174
1089
|
s7 = peg$parse_();
|
|
1175
1090
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
@@ -1193,6 +1108,8 @@ function peg$parse(input, options) {
|
|
|
1193
1108
|
peg$currPos = s6;
|
|
1194
1109
|
s6 = peg$FAILED;
|
|
1195
1110
|
}
|
|
1111
|
+
if (s6 === peg$FAILED) { break; }
|
|
1112
|
+
s5.push(s6);
|
|
1196
1113
|
}
|
|
1197
1114
|
peg$savedPos = s3;
|
|
1198
1115
|
s3 = peg$f27(s4, s5);
|
|
@@ -1276,25 +1193,18 @@ function peg$parse(input, options) {
|
|
|
1276
1193
|
|
|
1277
1194
|
s0 = peg$currPos;
|
|
1278
1195
|
s1 = [];
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
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
|
-
}
|
|
1196
|
+
for (;;) {
|
|
1197
|
+
if (input.charCodeAt(peg$currPos) === 45) {
|
|
1198
|
+
s2 = peg$c9;
|
|
1199
|
+
peg$currPos++;
|
|
1200
|
+
} else {
|
|
1201
|
+
s2 = peg$FAILED;
|
|
1202
|
+
if (peg$silentFails === 0) { peg$fail(peg$e9); }
|
|
1296
1203
|
}
|
|
1297
|
-
|
|
1204
|
+
if (s2 === peg$FAILED) { break; }
|
|
1205
|
+
s1.push(s2);
|
|
1206
|
+
}
|
|
1207
|
+
if (s1.length < 1) {
|
|
1298
1208
|
s1 = peg$FAILED;
|
|
1299
1209
|
}
|
|
1300
1210
|
if (s1 !== peg$FAILED) {
|
|
@@ -1340,7 +1250,7 @@ function peg$parse(input, options) {
|
|
|
1340
1250
|
s0 = peg$currPos;
|
|
1341
1251
|
s1 = peg$currPos;
|
|
1342
1252
|
s2 = input.charAt(peg$currPos);
|
|
1343
|
-
if (peg$
|
|
1253
|
+
if ((peg$charCode = s2.charCodeAt(0), (peg$charCode >= 97 && peg$charCode <= 122) || (peg$charCode >= 65 && peg$charCode <= 90) || peg$charCode === 95)) {
|
|
1344
1254
|
peg$currPos++;
|
|
1345
1255
|
} else {
|
|
1346
1256
|
s2 = peg$FAILED;
|
|
@@ -1348,10 +1258,10 @@ function peg$parse(input, options) {
|
|
|
1348
1258
|
}
|
|
1349
1259
|
if (s2 !== peg$FAILED) {
|
|
1350
1260
|
s3 = [];
|
|
1351
|
-
|
|
1352
|
-
while (s4 !== peg$FAILED) {
|
|
1353
|
-
s3.push(s4);
|
|
1261
|
+
for (;;) {
|
|
1354
1262
|
s4 = peg$parsealias_continue();
|
|
1263
|
+
if (s4 === peg$FAILED) { break; }
|
|
1264
|
+
s3.push(s4);
|
|
1355
1265
|
}
|
|
1356
1266
|
s2 = [s2, s3];
|
|
1357
1267
|
s1 = s2;
|
|
@@ -1372,7 +1282,7 @@ function peg$parse(input, options) {
|
|
|
1372
1282
|
let s0;
|
|
1373
1283
|
|
|
1374
1284
|
s0 = input.charAt(peg$currPos);
|
|
1375
|
-
if (peg$
|
|
1285
|
+
if ((peg$charCode = s0.charCodeAt(0), (peg$charCode >= 97 && peg$charCode <= 122) || (peg$charCode >= 65 && peg$charCode <= 90) || (peg$charCode >= 48 && peg$charCode <= 57) || peg$charCode === 95 || peg$charCode === 45)) {
|
|
1376
1286
|
peg$currPos++;
|
|
1377
1287
|
} else {
|
|
1378
1288
|
s0 = peg$FAILED;
|
|
@@ -1525,31 +1435,7 @@ function peg$parse(input, options) {
|
|
|
1525
1435
|
s4 = peg$parsepair();
|
|
1526
1436
|
if (s4 !== peg$FAILED) {
|
|
1527
1437
|
s5 = [];
|
|
1528
|
-
|
|
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);
|
|
1438
|
+
for (;;) {
|
|
1553
1439
|
s6 = peg$currPos;
|
|
1554
1440
|
s7 = peg$parse_();
|
|
1555
1441
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
@@ -1573,6 +1459,8 @@ function peg$parse(input, options) {
|
|
|
1573
1459
|
peg$currPos = s6;
|
|
1574
1460
|
s6 = peg$FAILED;
|
|
1575
1461
|
}
|
|
1462
|
+
if (s6 === peg$FAILED) { break; }
|
|
1463
|
+
s5.push(s6);
|
|
1576
1464
|
}
|
|
1577
1465
|
s4 = [s4, s5];
|
|
1578
1466
|
s3 = s4;
|
|
@@ -1659,31 +1547,7 @@ function peg$parse(input, options) {
|
|
|
1659
1547
|
s4 = peg$parseconstant();
|
|
1660
1548
|
if (s4 !== peg$FAILED) {
|
|
1661
1549
|
s5 = [];
|
|
1662
|
-
|
|
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);
|
|
1550
|
+
for (;;) {
|
|
1687
1551
|
s6 = peg$currPos;
|
|
1688
1552
|
s7 = peg$parse_();
|
|
1689
1553
|
if (input.charCodeAt(peg$currPos) === 44) {
|
|
@@ -1707,6 +1571,8 @@ function peg$parse(input, options) {
|
|
|
1707
1571
|
peg$currPos = s6;
|
|
1708
1572
|
s6 = peg$FAILED;
|
|
1709
1573
|
}
|
|
1574
|
+
if (s6 === peg$FAILED) { break; }
|
|
1575
|
+
s5.push(s6);
|
|
1710
1576
|
}
|
|
1711
1577
|
s4 = [s4, s5];
|
|
1712
1578
|
s3 = s4;
|
|
@@ -1764,7 +1630,7 @@ function peg$parse(input, options) {
|
|
|
1764
1630
|
if (s2 === peg$FAILED) {
|
|
1765
1631
|
s2 = peg$currPos;
|
|
1766
1632
|
s3 = input.charAt(peg$currPos);
|
|
1767
|
-
if (peg$
|
|
1633
|
+
if ((peg$charCode = s3.charCodeAt(0), (peg$charCode >= 49 && peg$charCode <= 57))) {
|
|
1768
1634
|
peg$currPos++;
|
|
1769
1635
|
} else {
|
|
1770
1636
|
s3 = peg$FAILED;
|
|
@@ -1772,22 +1638,16 @@ function peg$parse(input, options) {
|
|
|
1772
1638
|
}
|
|
1773
1639
|
if (s3 !== peg$FAILED) {
|
|
1774
1640
|
s4 = [];
|
|
1775
|
-
|
|
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);
|
|
1641
|
+
for (;;) {
|
|
1784
1642
|
s5 = input.charAt(peg$currPos);
|
|
1785
|
-
if (peg$
|
|
1643
|
+
if ((peg$charCode = s5.charCodeAt(0), (peg$charCode >= 48 && peg$charCode <= 57))) {
|
|
1786
1644
|
peg$currPos++;
|
|
1787
1645
|
} else {
|
|
1788
1646
|
s5 = peg$FAILED;
|
|
1789
1647
|
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
1790
1648
|
}
|
|
1649
|
+
if (s5 === peg$FAILED) { break; }
|
|
1650
|
+
s4.push(s5);
|
|
1791
1651
|
}
|
|
1792
1652
|
s3 = [s3, s4];
|
|
1793
1653
|
s2 = s3;
|
|
@@ -1807,25 +1667,18 @@ function peg$parse(input, options) {
|
|
|
1807
1667
|
}
|
|
1808
1668
|
if (s4 !== peg$FAILED) {
|
|
1809
1669
|
s5 = [];
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
peg$
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
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
|
-
}
|
|
1670
|
+
for (;;) {
|
|
1671
|
+
s6 = input.charAt(peg$currPos);
|
|
1672
|
+
if ((peg$charCode = s6.charCodeAt(0), (peg$charCode >= 48 && peg$charCode <= 57))) {
|
|
1673
|
+
peg$currPos++;
|
|
1674
|
+
} else {
|
|
1675
|
+
s6 = peg$FAILED;
|
|
1676
|
+
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
1827
1677
|
}
|
|
1828
|
-
|
|
1678
|
+
if (s6 === peg$FAILED) { break; }
|
|
1679
|
+
s5.push(s6);
|
|
1680
|
+
}
|
|
1681
|
+
if (s5.length < 1) {
|
|
1829
1682
|
s5 = peg$FAILED;
|
|
1830
1683
|
}
|
|
1831
1684
|
if (s5 !== peg$FAILED) {
|
|
@@ -1844,7 +1697,7 @@ function peg$parse(input, options) {
|
|
|
1844
1697
|
}
|
|
1845
1698
|
s4 = peg$currPos;
|
|
1846
1699
|
s5 = input.charAt(peg$currPos);
|
|
1847
|
-
if (peg$
|
|
1700
|
+
if ((peg$charCode = s5.charCodeAt(0), peg$charCode === 101 || peg$charCode === 69)) {
|
|
1848
1701
|
peg$currPos++;
|
|
1849
1702
|
} else {
|
|
1850
1703
|
s5 = peg$FAILED;
|
|
@@ -1852,7 +1705,7 @@ function peg$parse(input, options) {
|
|
|
1852
1705
|
}
|
|
1853
1706
|
if (s5 !== peg$FAILED) {
|
|
1854
1707
|
s6 = input.charAt(peg$currPos);
|
|
1855
|
-
if (peg$
|
|
1708
|
+
if ((peg$charCode = s6.charCodeAt(0), peg$charCode === 43 || peg$charCode === 45)) {
|
|
1856
1709
|
peg$currPos++;
|
|
1857
1710
|
} else {
|
|
1858
1711
|
s6 = peg$FAILED;
|
|
@@ -1862,25 +1715,18 @@ function peg$parse(input, options) {
|
|
|
1862
1715
|
s6 = null;
|
|
1863
1716
|
}
|
|
1864
1717
|
s7 = [];
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
peg$
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
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
|
-
}
|
|
1718
|
+
for (;;) {
|
|
1719
|
+
s8 = input.charAt(peg$currPos);
|
|
1720
|
+
if ((peg$charCode = s8.charCodeAt(0), (peg$charCode >= 48 && peg$charCode <= 57))) {
|
|
1721
|
+
peg$currPos++;
|
|
1722
|
+
} else {
|
|
1723
|
+
s8 = peg$FAILED;
|
|
1724
|
+
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
1882
1725
|
}
|
|
1883
|
-
|
|
1726
|
+
if (s8 === peg$FAILED) { break; }
|
|
1727
|
+
s7.push(s8);
|
|
1728
|
+
}
|
|
1729
|
+
if (s7.length < 1) {
|
|
1884
1730
|
s7 = peg$FAILED;
|
|
1885
1731
|
}
|
|
1886
1732
|
if (s7 !== peg$FAILED) {
|
|
@@ -1955,10 +1801,10 @@ function peg$parse(input, options) {
|
|
|
1955
1801
|
}
|
|
1956
1802
|
if (s1 !== peg$FAILED) {
|
|
1957
1803
|
s2 = [];
|
|
1958
|
-
|
|
1959
|
-
while (s3 !== peg$FAILED) {
|
|
1960
|
-
s2.push(s3);
|
|
1804
|
+
for (;;) {
|
|
1961
1805
|
s3 = peg$parsestring_char();
|
|
1806
|
+
if (s3 === peg$FAILED) { break; }
|
|
1807
|
+
s2.push(s3);
|
|
1962
1808
|
}
|
|
1963
1809
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
1964
1810
|
s3 = peg$c17;
|
|
@@ -1986,7 +1832,7 @@ function peg$parse(input, options) {
|
|
|
1986
1832
|
let s0, s1, s2, s3, s4, s5;
|
|
1987
1833
|
|
|
1988
1834
|
s0 = input.charAt(peg$currPos);
|
|
1989
|
-
if (peg$
|
|
1835
|
+
if (s0 !== "" && !(peg$charCode = s0.charCodeAt(0), peg$charCode === 34 || peg$charCode === 92 || (peg$charCode >= 0 && peg$charCode <= 31))) {
|
|
1990
1836
|
peg$currPos++;
|
|
1991
1837
|
} else {
|
|
1992
1838
|
s0 = peg$FAILED;
|
|
@@ -2003,7 +1849,7 @@ function peg$parse(input, options) {
|
|
|
2003
1849
|
}
|
|
2004
1850
|
if (s1 !== peg$FAILED) {
|
|
2005
1851
|
s2 = input.charAt(peg$currPos);
|
|
2006
|
-
if (peg$
|
|
1852
|
+
if ((peg$charCode = s2.charCodeAt(0), peg$charCode === 34 || peg$charCode === 92 || peg$charCode === 47 || peg$charCode === 98 || peg$charCode === 102 || peg$charCode === 110 || peg$charCode === 114 || peg$charCode === 116)) {
|
|
2007
1853
|
peg$currPos++;
|
|
2008
1854
|
} else {
|
|
2009
1855
|
s2 = peg$FAILED;
|
|
@@ -2031,7 +1877,7 @@ function peg$parse(input, options) {
|
|
|
2031
1877
|
}
|
|
2032
1878
|
if (s1 !== peg$FAILED) {
|
|
2033
1879
|
s2 = input.charAt(peg$currPos);
|
|
2034
|
-
if (peg$
|
|
1880
|
+
if ((peg$charCode = s2.charCodeAt(0), (peg$charCode >= 48 && peg$charCode <= 57) || (peg$charCode >= 97 && peg$charCode <= 102) || (peg$charCode >= 65 && peg$charCode <= 70))) {
|
|
2035
1881
|
peg$currPos++;
|
|
2036
1882
|
} else {
|
|
2037
1883
|
s2 = peg$FAILED;
|
|
@@ -2039,7 +1885,7 @@ function peg$parse(input, options) {
|
|
|
2039
1885
|
}
|
|
2040
1886
|
if (s2 !== peg$FAILED) {
|
|
2041
1887
|
s3 = input.charAt(peg$currPos);
|
|
2042
|
-
if (peg$
|
|
1888
|
+
if ((peg$charCode = s3.charCodeAt(0), (peg$charCode >= 48 && peg$charCode <= 57) || (peg$charCode >= 97 && peg$charCode <= 102) || (peg$charCode >= 65 && peg$charCode <= 70))) {
|
|
2043
1889
|
peg$currPos++;
|
|
2044
1890
|
} else {
|
|
2045
1891
|
s3 = peg$FAILED;
|
|
@@ -2047,7 +1893,7 @@ function peg$parse(input, options) {
|
|
|
2047
1893
|
}
|
|
2048
1894
|
if (s3 !== peg$FAILED) {
|
|
2049
1895
|
s4 = input.charAt(peg$currPos);
|
|
2050
|
-
if (peg$
|
|
1896
|
+
if ((peg$charCode = s4.charCodeAt(0), (peg$charCode >= 48 && peg$charCode <= 57) || (peg$charCode >= 97 && peg$charCode <= 102) || (peg$charCode >= 65 && peg$charCode <= 70))) {
|
|
2051
1897
|
peg$currPos++;
|
|
2052
1898
|
} else {
|
|
2053
1899
|
s4 = peg$FAILED;
|
|
@@ -2055,7 +1901,7 @@ function peg$parse(input, options) {
|
|
|
2055
1901
|
}
|
|
2056
1902
|
if (s4 !== peg$FAILED) {
|
|
2057
1903
|
s5 = input.charAt(peg$currPos);
|
|
2058
|
-
if (peg$
|
|
1904
|
+
if ((peg$charCode = s5.charCodeAt(0), (peg$charCode >= 48 && peg$charCode <= 57) || (peg$charCode >= 97 && peg$charCode <= 102) || (peg$charCode >= 65 && peg$charCode <= 70))) {
|
|
2059
1905
|
peg$currPos++;
|
|
2060
1906
|
} else {
|
|
2061
1907
|
s5 = peg$FAILED;
|
|
@@ -2118,10 +1964,10 @@ function peg$parse(input, options) {
|
|
|
2118
1964
|
}
|
|
2119
1965
|
if (s2 !== peg$FAILED) {
|
|
2120
1966
|
s3 = [];
|
|
2121
|
-
|
|
2122
|
-
while (s4 !== peg$FAILED) {
|
|
2123
|
-
s3.push(s4);
|
|
1967
|
+
for (;;) {
|
|
2124
1968
|
s4 = peg$parsecap_urn_body();
|
|
1969
|
+
if (s4 === peg$FAILED) { break; }
|
|
1970
|
+
s3.push(s4);
|
|
2125
1971
|
}
|
|
2126
1972
|
s2 = [s2, s3];
|
|
2127
1973
|
s1 = s2;
|
|
@@ -2212,7 +2058,7 @@ function peg$parse(input, options) {
|
|
|
2212
2058
|
}
|
|
2213
2059
|
if (s0 === peg$FAILED) {
|
|
2214
2060
|
s0 = input.charAt(peg$currPos);
|
|
2215
|
-
if (peg$
|
|
2061
|
+
if ((peg$charCode = s0.charCodeAt(0), peg$charCode === 10 || peg$charCode === 13)) {
|
|
2216
2062
|
peg$currPos++;
|
|
2217
2063
|
} else {
|
|
2218
2064
|
s0 = peg$FAILED;
|
|
@@ -2241,62 +2087,7 @@ function peg$parse(input, options) {
|
|
|
2241
2087
|
}
|
|
2242
2088
|
if (s1 !== peg$FAILED) {
|
|
2243
2089
|
s2 = [];
|
|
2244
|
-
|
|
2245
|
-
s3 = peg$c22;
|
|
2246
|
-
peg$currPos += 2;
|
|
2247
|
-
} else {
|
|
2248
|
-
s3 = peg$FAILED;
|
|
2249
|
-
if (peg$silentFails === 0) { peg$fail(peg$e34); }
|
|
2250
|
-
}
|
|
2251
|
-
if (s3 === peg$FAILED) {
|
|
2252
|
-
if (input.substr(peg$currPos, 2) === peg$c23) {
|
|
2253
|
-
s3 = peg$c23;
|
|
2254
|
-
peg$currPos += 2;
|
|
2255
|
-
} else {
|
|
2256
|
-
s3 = peg$FAILED;
|
|
2257
|
-
if (peg$silentFails === 0) { peg$fail(peg$e35); }
|
|
2258
|
-
}
|
|
2259
|
-
if (s3 === peg$FAILED) {
|
|
2260
|
-
s3 = peg$currPos;
|
|
2261
|
-
s4 = peg$currPos;
|
|
2262
|
-
peg$silentFails++;
|
|
2263
|
-
if (input.charCodeAt(peg$currPos) === 34) {
|
|
2264
|
-
s5 = peg$c17;
|
|
2265
|
-
peg$currPos++;
|
|
2266
|
-
} else {
|
|
2267
|
-
s5 = peg$FAILED;
|
|
2268
|
-
if (peg$silentFails === 0) { peg$fail(peg$e23); }
|
|
2269
|
-
}
|
|
2270
|
-
peg$silentFails--;
|
|
2271
|
-
if (s5 === peg$FAILED) {
|
|
2272
|
-
s4 = undefined;
|
|
2273
|
-
} else {
|
|
2274
|
-
peg$currPos = s4;
|
|
2275
|
-
s4 = peg$FAILED;
|
|
2276
|
-
}
|
|
2277
|
-
if (s4 !== peg$FAILED) {
|
|
2278
|
-
if (input.length > peg$currPos) {
|
|
2279
|
-
s5 = input.charAt(peg$currPos);
|
|
2280
|
-
peg$currPos++;
|
|
2281
|
-
} else {
|
|
2282
|
-
s5 = peg$FAILED;
|
|
2283
|
-
if (peg$silentFails === 0) { peg$fail(peg$e30); }
|
|
2284
|
-
}
|
|
2285
|
-
if (s5 !== peg$FAILED) {
|
|
2286
|
-
s4 = [s4, s5];
|
|
2287
|
-
s3 = s4;
|
|
2288
|
-
} else {
|
|
2289
|
-
peg$currPos = s3;
|
|
2290
|
-
s3 = peg$FAILED;
|
|
2291
|
-
}
|
|
2292
|
-
} else {
|
|
2293
|
-
peg$currPos = s3;
|
|
2294
|
-
s3 = peg$FAILED;
|
|
2295
|
-
}
|
|
2296
|
-
}
|
|
2297
|
-
}
|
|
2298
|
-
while (s3 !== peg$FAILED) {
|
|
2299
|
-
s2.push(s3);
|
|
2090
|
+
for (;;) {
|
|
2300
2091
|
if (input.substr(peg$currPos, 2) === peg$c22) {
|
|
2301
2092
|
s3 = peg$c22;
|
|
2302
2093
|
peg$currPos += 2;
|
|
@@ -2351,6 +2142,8 @@ function peg$parse(input, options) {
|
|
|
2351
2142
|
}
|
|
2352
2143
|
}
|
|
2353
2144
|
}
|
|
2145
|
+
if (s3 === peg$FAILED) { break; }
|
|
2146
|
+
s2.push(s3);
|
|
2354
2147
|
}
|
|
2355
2148
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
2356
2149
|
s3 = peg$c17;
|
|
@@ -2379,22 +2172,16 @@ function peg$parse(input, options) {
|
|
|
2379
2172
|
|
|
2380
2173
|
peg$silentFails++;
|
|
2381
2174
|
s0 = [];
|
|
2382
|
-
|
|
2383
|
-
if (peg$r10.test(s1)) {
|
|
2384
|
-
peg$currPos++;
|
|
2385
|
-
} else {
|
|
2386
|
-
s1 = peg$FAILED;
|
|
2387
|
-
if (peg$silentFails === 0) { peg$fail(peg$e36); }
|
|
2388
|
-
}
|
|
2389
|
-
while (s1 !== peg$FAILED) {
|
|
2390
|
-
s0.push(s1);
|
|
2175
|
+
for (;;) {
|
|
2391
2176
|
s1 = input.charAt(peg$currPos);
|
|
2392
|
-
if (peg$
|
|
2177
|
+
if ((peg$charCode = s1.charCodeAt(0), peg$charCode === 32 || peg$charCode === 9 || peg$charCode === 13 || peg$charCode === 10)) {
|
|
2393
2178
|
peg$currPos++;
|
|
2394
2179
|
} else {
|
|
2395
2180
|
s1 = peg$FAILED;
|
|
2396
2181
|
if (peg$silentFails === 0) { peg$fail(peg$e36); }
|
|
2397
2182
|
}
|
|
2183
|
+
if (s1 === peg$FAILED) { break; }
|
|
2184
|
+
s0.push(s1);
|
|
2398
2185
|
}
|
|
2399
2186
|
peg$silentFails--;
|
|
2400
2187
|
|
|
@@ -2406,25 +2193,18 @@ function peg$parse(input, options) {
|
|
|
2406
2193
|
|
|
2407
2194
|
peg$silentFails++;
|
|
2408
2195
|
s0 = [];
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
peg$
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
if (s1 !== peg$FAILED) {
|
|
2417
|
-
while (s1 !== peg$FAILED) {
|
|
2418
|
-
s0.push(s1);
|
|
2419
|
-
s1 = input.charAt(peg$currPos);
|
|
2420
|
-
if (peg$r10.test(s1)) {
|
|
2421
|
-
peg$currPos++;
|
|
2422
|
-
} else {
|
|
2423
|
-
s1 = peg$FAILED;
|
|
2424
|
-
if (peg$silentFails === 0) { peg$fail(peg$e36); }
|
|
2425
|
-
}
|
|
2196
|
+
for (;;) {
|
|
2197
|
+
s1 = input.charAt(peg$currPos);
|
|
2198
|
+
if ((peg$charCode = s1.charCodeAt(0), peg$charCode === 32 || peg$charCode === 9 || peg$charCode === 13 || peg$charCode === 10)) {
|
|
2199
|
+
peg$currPos++;
|
|
2200
|
+
} else {
|
|
2201
|
+
s1 = peg$FAILED;
|
|
2202
|
+
if (peg$silentFails === 0) { peg$fail(peg$e36); }
|
|
2426
2203
|
}
|
|
2427
|
-
|
|
2204
|
+
if (s1 === peg$FAILED) { break; }
|
|
2205
|
+
s0.push(s1);
|
|
2206
|
+
}
|
|
2207
|
+
if (s0.length < 1) {
|
|
2428
2208
|
s0 = peg$FAILED;
|
|
2429
2209
|
}
|
|
2430
2210
|
peg$silentFails--;
|