@retorquere/bibtex-parser 7.0.12 → 7.0.14
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/grammar.js +191 -184
- package/index.js +2 -2
- package/package.json +9 -9
package/grammar.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// @generated by Peggy 4.0.0.
|
|
2
2
|
//
|
|
3
3
|
// https://peggyjs.org/
|
|
4
4
|
|
|
5
5
|
"use strict";
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
function peg$subclass(child, parent) {
|
|
8
9
|
function C() { this.constructor = child; }
|
|
9
10
|
C.prototype = parent.prototype;
|
|
@@ -807,16 +808,16 @@ function peg$parse(input, options) {
|
|
|
807
808
|
})
|
|
808
809
|
};
|
|
809
810
|
var peg$f68 = function(v) { return v };
|
|
810
|
-
var peg$currPos = 0;
|
|
811
|
-
var peg$savedPos =
|
|
811
|
+
var peg$currPos = options.peg$currPos | 0;
|
|
812
|
+
var peg$savedPos = peg$currPos;
|
|
812
813
|
var peg$posDetailsCache = [{ line: 1, column: 1 }];
|
|
813
|
-
var peg$maxFailPos =
|
|
814
|
-
var peg$maxFailExpected = [];
|
|
815
|
-
var peg$silentFails = 0;
|
|
814
|
+
var peg$maxFailPos = peg$currPos;
|
|
815
|
+
var peg$maxFailExpected = options.peg$maxFailExpected || [];
|
|
816
|
+
var peg$silentFails = options.peg$silentFails | 0;
|
|
816
817
|
|
|
817
818
|
var peg$result;
|
|
818
819
|
|
|
819
|
-
if (
|
|
820
|
+
if (options.startRule) {
|
|
820
821
|
if (!(options.startRule in peg$startRuleFunctions)) {
|
|
821
822
|
throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
|
|
822
823
|
}
|
|
@@ -891,9 +892,11 @@ function peg$parse(input, options) {
|
|
|
891
892
|
if (details) {
|
|
892
893
|
return details;
|
|
893
894
|
} else {
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
895
|
+
if (pos >= peg$posDetailsCache.length) {
|
|
896
|
+
p = peg$posDetailsCache.length - 1;
|
|
897
|
+
} else {
|
|
898
|
+
p = pos;
|
|
899
|
+
while (!peg$posDetailsCache[--p]) {}
|
|
897
900
|
}
|
|
898
901
|
|
|
899
902
|
details = peg$posDetailsCache[p];
|
|
@@ -998,8 +1001,8 @@ function peg$parse(input, options) {
|
|
|
998
1001
|
}
|
|
999
1002
|
if (s1 !== peg$FAILED) {
|
|
1000
1003
|
s2 = peg$parse__();
|
|
1001
|
-
|
|
1002
|
-
|
|
1004
|
+
s3 = input.substr(peg$currPos, 7);
|
|
1005
|
+
if (s3.toLowerCase() === peg$c1) {
|
|
1003
1006
|
peg$currPos += 7;
|
|
1004
1007
|
} else {
|
|
1005
1008
|
s3 = peg$FAILED;
|
|
@@ -1034,8 +1037,8 @@ function peg$parse(input, options) {
|
|
|
1034
1037
|
}
|
|
1035
1038
|
if (s1 !== peg$FAILED) {
|
|
1036
1039
|
s2 = peg$parse__();
|
|
1037
|
-
|
|
1038
|
-
|
|
1040
|
+
s3 = input.substr(peg$currPos, 7);
|
|
1041
|
+
if (s3.toLowerCase() === peg$c1) {
|
|
1039
1042
|
peg$currPos += 7;
|
|
1040
1043
|
} else {
|
|
1041
1044
|
s3 = peg$FAILED;
|
|
@@ -1045,8 +1048,8 @@ function peg$parse(input, options) {
|
|
|
1045
1048
|
s4 = peg$parse__h();
|
|
1046
1049
|
s5 = peg$currPos;
|
|
1047
1050
|
s6 = [];
|
|
1048
|
-
|
|
1049
|
-
|
|
1051
|
+
s7 = input.charAt(peg$currPos);
|
|
1052
|
+
if (peg$r0.test(s7)) {
|
|
1050
1053
|
peg$currPos++;
|
|
1051
1054
|
} else {
|
|
1052
1055
|
s7 = peg$FAILED;
|
|
@@ -1054,8 +1057,8 @@ function peg$parse(input, options) {
|
|
|
1054
1057
|
}
|
|
1055
1058
|
while (s7 !== peg$FAILED) {
|
|
1056
1059
|
s6.push(s7);
|
|
1057
|
-
|
|
1058
|
-
|
|
1060
|
+
s7 = input.charAt(peg$currPos);
|
|
1061
|
+
if (peg$r0.test(s7)) {
|
|
1059
1062
|
peg$currPos++;
|
|
1060
1063
|
} else {
|
|
1061
1064
|
s7 = peg$FAILED;
|
|
@@ -1064,8 +1067,8 @@ function peg$parse(input, options) {
|
|
|
1064
1067
|
}
|
|
1065
1068
|
s5 = input.substring(s5, peg$currPos);
|
|
1066
1069
|
s6 = [];
|
|
1067
|
-
|
|
1068
|
-
|
|
1070
|
+
s7 = input.charAt(peg$currPos);
|
|
1071
|
+
if (peg$r1.test(s7)) {
|
|
1069
1072
|
peg$currPos++;
|
|
1070
1073
|
} else {
|
|
1071
1074
|
s7 = peg$FAILED;
|
|
@@ -1073,8 +1076,8 @@ function peg$parse(input, options) {
|
|
|
1073
1076
|
}
|
|
1074
1077
|
while (s7 !== peg$FAILED) {
|
|
1075
1078
|
s6.push(s7);
|
|
1076
|
-
|
|
1077
|
-
|
|
1079
|
+
s7 = input.charAt(peg$currPos);
|
|
1080
|
+
if (peg$r1.test(s7)) {
|
|
1078
1081
|
peg$currPos++;
|
|
1079
1082
|
} else {
|
|
1080
1083
|
s7 = peg$FAILED;
|
|
@@ -1095,8 +1098,8 @@ function peg$parse(input, options) {
|
|
|
1095
1098
|
s0 = peg$currPos;
|
|
1096
1099
|
s1 = peg$currPos;
|
|
1097
1100
|
s2 = peg$currPos;
|
|
1098
|
-
|
|
1099
|
-
|
|
1101
|
+
s3 = input.charAt(peg$currPos);
|
|
1102
|
+
if (peg$r2.test(s3)) {
|
|
1100
1103
|
peg$currPos++;
|
|
1101
1104
|
} else {
|
|
1102
1105
|
s3 = peg$FAILED;
|
|
@@ -1104,8 +1107,8 @@ function peg$parse(input, options) {
|
|
|
1104
1107
|
}
|
|
1105
1108
|
if (s3 !== peg$FAILED) {
|
|
1106
1109
|
s4 = [];
|
|
1107
|
-
|
|
1108
|
-
|
|
1110
|
+
s5 = input.charAt(peg$currPos);
|
|
1111
|
+
if (peg$r0.test(s5)) {
|
|
1109
1112
|
peg$currPos++;
|
|
1110
1113
|
} else {
|
|
1111
1114
|
s5 = peg$FAILED;
|
|
@@ -1113,8 +1116,8 @@ function peg$parse(input, options) {
|
|
|
1113
1116
|
}
|
|
1114
1117
|
while (s5 !== peg$FAILED) {
|
|
1115
1118
|
s4.push(s5);
|
|
1116
|
-
|
|
1117
|
-
|
|
1119
|
+
s5 = input.charAt(peg$currPos);
|
|
1120
|
+
if (peg$r0.test(s5)) {
|
|
1118
1121
|
peg$currPos++;
|
|
1119
1122
|
} else {
|
|
1120
1123
|
s5 = peg$FAILED;
|
|
@@ -1134,8 +1137,8 @@ function peg$parse(input, options) {
|
|
|
1134
1137
|
}
|
|
1135
1138
|
if (s1 !== peg$FAILED) {
|
|
1136
1139
|
s2 = [];
|
|
1137
|
-
|
|
1138
|
-
|
|
1140
|
+
s3 = input.charAt(peg$currPos);
|
|
1141
|
+
if (peg$r1.test(s3)) {
|
|
1139
1142
|
peg$currPos++;
|
|
1140
1143
|
} else {
|
|
1141
1144
|
s3 = peg$FAILED;
|
|
@@ -1143,8 +1146,8 @@ function peg$parse(input, options) {
|
|
|
1143
1146
|
}
|
|
1144
1147
|
while (s3 !== peg$FAILED) {
|
|
1145
1148
|
s2.push(s3);
|
|
1146
|
-
|
|
1147
|
-
|
|
1149
|
+
s3 = input.charAt(peg$currPos);
|
|
1150
|
+
if (peg$r1.test(s3)) {
|
|
1148
1151
|
peg$currPos++;
|
|
1149
1152
|
} else {
|
|
1150
1153
|
s3 = peg$FAILED;
|
|
@@ -1199,8 +1202,8 @@ function peg$parse(input, options) {
|
|
|
1199
1202
|
}
|
|
1200
1203
|
if (s1 !== peg$FAILED) {
|
|
1201
1204
|
s2 = [];
|
|
1202
|
-
|
|
1203
|
-
|
|
1205
|
+
s3 = input.charAt(peg$currPos);
|
|
1206
|
+
if (peg$r3.test(s3)) {
|
|
1204
1207
|
peg$currPos++;
|
|
1205
1208
|
} else {
|
|
1206
1209
|
s3 = peg$FAILED;
|
|
@@ -1211,8 +1214,8 @@ function peg$parse(input, options) {
|
|
|
1211
1214
|
}
|
|
1212
1215
|
while (s3 !== peg$FAILED) {
|
|
1213
1216
|
s2.push(s3);
|
|
1214
|
-
|
|
1215
|
-
|
|
1217
|
+
s3 = input.charAt(peg$currPos);
|
|
1218
|
+
if (peg$r3.test(s3)) {
|
|
1216
1219
|
peg$currPos++;
|
|
1217
1220
|
} else {
|
|
1218
1221
|
s3 = peg$FAILED;
|
|
@@ -1259,8 +1262,8 @@ function peg$parse(input, options) {
|
|
|
1259
1262
|
s2 = peg$parse__();
|
|
1260
1263
|
s3 = peg$currPos;
|
|
1261
1264
|
s4 = [];
|
|
1262
|
-
|
|
1263
|
-
|
|
1265
|
+
s5 = input.charAt(peg$currPos);
|
|
1266
|
+
if (peg$r4.test(s5)) {
|
|
1264
1267
|
peg$currPos++;
|
|
1265
1268
|
} else {
|
|
1266
1269
|
s5 = peg$FAILED;
|
|
@@ -1269,8 +1272,8 @@ function peg$parse(input, options) {
|
|
|
1269
1272
|
if (s5 !== peg$FAILED) {
|
|
1270
1273
|
while (s5 !== peg$FAILED) {
|
|
1271
1274
|
s4.push(s5);
|
|
1272
|
-
|
|
1273
|
-
|
|
1275
|
+
s5 = input.charAt(peg$currPos);
|
|
1276
|
+
if (peg$r4.test(s5)) {
|
|
1274
1277
|
peg$currPos++;
|
|
1275
1278
|
} else {
|
|
1276
1279
|
s5 = peg$FAILED;
|
|
@@ -1287,8 +1290,8 @@ function peg$parse(input, options) {
|
|
|
1287
1290
|
}
|
|
1288
1291
|
if (s3 !== peg$FAILED) {
|
|
1289
1292
|
s4 = peg$parse__();
|
|
1290
|
-
|
|
1291
|
-
|
|
1293
|
+
s5 = input.charAt(peg$currPos);
|
|
1294
|
+
if (peg$r5.test(s5)) {
|
|
1292
1295
|
peg$currPos++;
|
|
1293
1296
|
} else {
|
|
1294
1297
|
s5 = peg$FAILED;
|
|
@@ -1308,8 +1311,8 @@ function peg$parse(input, options) {
|
|
|
1308
1311
|
s10 = peg$parseField();
|
|
1309
1312
|
}
|
|
1310
1313
|
s10 = peg$parse__();
|
|
1311
|
-
|
|
1312
|
-
|
|
1314
|
+
s11 = input.charAt(peg$currPos);
|
|
1315
|
+
if (peg$r6.test(s11)) {
|
|
1313
1316
|
peg$currPos++;
|
|
1314
1317
|
} else {
|
|
1315
1318
|
s11 = peg$FAILED;
|
|
@@ -1352,8 +1355,8 @@ function peg$parse(input, options) {
|
|
|
1352
1355
|
}
|
|
1353
1356
|
if (s1 !== peg$FAILED) {
|
|
1354
1357
|
s2 = peg$parse__();
|
|
1355
|
-
|
|
1356
|
-
|
|
1358
|
+
s3 = input.substr(peg$currPos, 8);
|
|
1359
|
+
if (s3.toLowerCase() === peg$c4) {
|
|
1357
1360
|
peg$currPos += 8;
|
|
1358
1361
|
} else {
|
|
1359
1362
|
s3 = peg$FAILED;
|
|
@@ -1361,8 +1364,8 @@ function peg$parse(input, options) {
|
|
|
1361
1364
|
}
|
|
1362
1365
|
if (s3 !== peg$FAILED) {
|
|
1363
1366
|
s4 = peg$parse__();
|
|
1364
|
-
|
|
1365
|
-
|
|
1367
|
+
s5 = input.charAt(peg$currPos);
|
|
1368
|
+
if (peg$r5.test(s5)) {
|
|
1366
1369
|
peg$currPos++;
|
|
1367
1370
|
} else {
|
|
1368
1371
|
s5 = peg$FAILED;
|
|
@@ -1401,8 +1404,8 @@ function peg$parse(input, options) {
|
|
|
1401
1404
|
}
|
|
1402
1405
|
}
|
|
1403
1406
|
s8 = peg$parse__();
|
|
1404
|
-
|
|
1405
|
-
|
|
1407
|
+
s9 = input.charAt(peg$currPos);
|
|
1408
|
+
if (peg$r6.test(s9)) {
|
|
1406
1409
|
peg$currPos++;
|
|
1407
1410
|
} else {
|
|
1408
1411
|
s9 = peg$FAILED;
|
|
@@ -1445,8 +1448,8 @@ function peg$parse(input, options) {
|
|
|
1445
1448
|
}
|
|
1446
1449
|
if (s1 !== peg$FAILED) {
|
|
1447
1450
|
s2 = peg$parse__();
|
|
1448
|
-
|
|
1449
|
-
|
|
1451
|
+
s3 = input.substr(peg$currPos, 6);
|
|
1452
|
+
if (s3.toLowerCase() === peg$c5) {
|
|
1450
1453
|
peg$currPos += 6;
|
|
1451
1454
|
} else {
|
|
1452
1455
|
s3 = peg$FAILED;
|
|
@@ -1454,8 +1457,8 @@ function peg$parse(input, options) {
|
|
|
1454
1457
|
}
|
|
1455
1458
|
if (s3 !== peg$FAILED) {
|
|
1456
1459
|
s4 = peg$parse__();
|
|
1457
|
-
|
|
1458
|
-
|
|
1460
|
+
s5 = input.charAt(peg$currPos);
|
|
1461
|
+
if (peg$r5.test(s5)) {
|
|
1459
1462
|
peg$currPos++;
|
|
1460
1463
|
} else {
|
|
1461
1464
|
s5 = peg$FAILED;
|
|
@@ -1479,8 +1482,8 @@ function peg$parse(input, options) {
|
|
|
1479
1482
|
}
|
|
1480
1483
|
if (s9 !== peg$FAILED) {
|
|
1481
1484
|
s10 = peg$parse__();
|
|
1482
|
-
|
|
1483
|
-
|
|
1485
|
+
s11 = input.charAt(peg$currPos);
|
|
1486
|
+
if (peg$r6.test(s11)) {
|
|
1484
1487
|
peg$currPos++;
|
|
1485
1488
|
} else {
|
|
1486
1489
|
s11 = peg$FAILED;
|
|
@@ -1529,8 +1532,8 @@ function peg$parse(input, options) {
|
|
|
1529
1532
|
s1 = peg$parse__();
|
|
1530
1533
|
s2 = peg$currPos;
|
|
1531
1534
|
s3 = [];
|
|
1532
|
-
|
|
1533
|
-
|
|
1535
|
+
s4 = input.charAt(peg$currPos);
|
|
1536
|
+
if (peg$r7.test(s4)) {
|
|
1534
1537
|
peg$currPos++;
|
|
1535
1538
|
} else {
|
|
1536
1539
|
s4 = peg$FAILED;
|
|
@@ -1538,8 +1541,8 @@ function peg$parse(input, options) {
|
|
|
1538
1541
|
}
|
|
1539
1542
|
while (s4 !== peg$FAILED) {
|
|
1540
1543
|
s3.push(s4);
|
|
1541
|
-
|
|
1542
|
-
|
|
1544
|
+
s4 = input.charAt(peg$currPos);
|
|
1545
|
+
if (peg$r7.test(s4)) {
|
|
1543
1546
|
peg$currPos++;
|
|
1544
1547
|
} else {
|
|
1545
1548
|
s4 = peg$FAILED;
|
|
@@ -1734,8 +1737,8 @@ function peg$parse(input, options) {
|
|
|
1734
1737
|
s1 = peg$parse__();
|
|
1735
1738
|
s2 = peg$currPos;
|
|
1736
1739
|
s3 = [];
|
|
1737
|
-
|
|
1738
|
-
|
|
1740
|
+
s4 = input.charAt(peg$currPos);
|
|
1741
|
+
if (peg$r8.test(s4)) {
|
|
1739
1742
|
peg$currPos++;
|
|
1740
1743
|
} else {
|
|
1741
1744
|
s4 = peg$FAILED;
|
|
@@ -1744,8 +1747,8 @@ function peg$parse(input, options) {
|
|
|
1744
1747
|
if (s4 !== peg$FAILED) {
|
|
1745
1748
|
while (s4 !== peg$FAILED) {
|
|
1746
1749
|
s3.push(s4);
|
|
1747
|
-
|
|
1748
|
-
|
|
1750
|
+
s4 = input.charAt(peg$currPos);
|
|
1751
|
+
if (peg$r8.test(s4)) {
|
|
1749
1752
|
peg$currPos++;
|
|
1750
1753
|
} else {
|
|
1751
1754
|
s4 = peg$FAILED;
|
|
@@ -1850,8 +1853,8 @@ function peg$parse(input, options) {
|
|
|
1850
1853
|
s0 = peg$currPos;
|
|
1851
1854
|
s1 = peg$currPos;
|
|
1852
1855
|
s2 = [];
|
|
1853
|
-
|
|
1854
|
-
|
|
1856
|
+
s3 = input.charAt(peg$currPos);
|
|
1857
|
+
if (peg$r3.test(s3)) {
|
|
1855
1858
|
peg$currPos++;
|
|
1856
1859
|
} else {
|
|
1857
1860
|
s3 = peg$FAILED;
|
|
@@ -1860,8 +1863,8 @@ function peg$parse(input, options) {
|
|
|
1860
1863
|
if (s3 !== peg$FAILED) {
|
|
1861
1864
|
while (s3 !== peg$FAILED) {
|
|
1862
1865
|
s2.push(s3);
|
|
1863
|
-
|
|
1864
|
-
|
|
1866
|
+
s3 = input.charAt(peg$currPos);
|
|
1867
|
+
if (peg$r3.test(s3)) {
|
|
1865
1868
|
peg$currPos++;
|
|
1866
1869
|
} else {
|
|
1867
1870
|
s3 = peg$FAILED;
|
|
@@ -1928,8 +1931,8 @@ function peg$parse(input, options) {
|
|
|
1928
1931
|
s0 = peg$currPos;
|
|
1929
1932
|
s1 = peg$currPos;
|
|
1930
1933
|
s2 = [];
|
|
1931
|
-
|
|
1932
|
-
|
|
1934
|
+
s3 = input.charAt(peg$currPos);
|
|
1935
|
+
if (peg$r9.test(s3)) {
|
|
1933
1936
|
peg$currPos++;
|
|
1934
1937
|
} else {
|
|
1935
1938
|
s3 = peg$FAILED;
|
|
@@ -1938,8 +1941,8 @@ function peg$parse(input, options) {
|
|
|
1938
1941
|
if (s3 !== peg$FAILED) {
|
|
1939
1942
|
while (s3 !== peg$FAILED) {
|
|
1940
1943
|
s2.push(s3);
|
|
1941
|
-
|
|
1942
|
-
|
|
1944
|
+
s3 = input.charAt(peg$currPos);
|
|
1945
|
+
if (peg$r9.test(s3)) {
|
|
1943
1946
|
peg$currPos++;
|
|
1944
1947
|
} else {
|
|
1945
1948
|
s3 = peg$FAILED;
|
|
@@ -2209,8 +2212,8 @@ function peg$parse(input, options) {
|
|
|
2209
2212
|
s0 = peg$currPos;
|
|
2210
2213
|
s1 = peg$currPos;
|
|
2211
2214
|
s2 = [];
|
|
2212
|
-
|
|
2213
|
-
|
|
2215
|
+
s3 = input.charAt(peg$currPos);
|
|
2216
|
+
if (peg$r10.test(s3)) {
|
|
2214
2217
|
peg$currPos++;
|
|
2215
2218
|
} else {
|
|
2216
2219
|
s3 = peg$FAILED;
|
|
@@ -2219,8 +2222,8 @@ function peg$parse(input, options) {
|
|
|
2219
2222
|
if (s3 !== peg$FAILED) {
|
|
2220
2223
|
while (s3 !== peg$FAILED) {
|
|
2221
2224
|
s2.push(s3);
|
|
2222
|
-
|
|
2223
|
-
|
|
2225
|
+
s3 = input.charAt(peg$currPos);
|
|
2226
|
+
if (peg$r10.test(s3)) {
|
|
2224
2227
|
peg$currPos++;
|
|
2225
2228
|
} else {
|
|
2226
2229
|
s3 = peg$FAILED;
|
|
@@ -2250,8 +2253,8 @@ function peg$parse(input, options) {
|
|
|
2250
2253
|
s0 = peg$currPos;
|
|
2251
2254
|
s1 = peg$currPos;
|
|
2252
2255
|
s2 = [];
|
|
2253
|
-
|
|
2254
|
-
|
|
2256
|
+
s3 = input.charAt(peg$currPos);
|
|
2257
|
+
if (peg$r11.test(s3)) {
|
|
2255
2258
|
peg$currPos++;
|
|
2256
2259
|
} else {
|
|
2257
2260
|
s3 = peg$FAILED;
|
|
@@ -2260,8 +2263,8 @@ function peg$parse(input, options) {
|
|
|
2260
2263
|
if (s3 !== peg$FAILED) {
|
|
2261
2264
|
while (s3 !== peg$FAILED) {
|
|
2262
2265
|
s2.push(s3);
|
|
2263
|
-
|
|
2264
|
-
|
|
2266
|
+
s3 = input.charAt(peg$currPos);
|
|
2267
|
+
if (peg$r11.test(s3)) {
|
|
2265
2268
|
peg$currPos++;
|
|
2266
2269
|
} else {
|
|
2267
2270
|
s3 = peg$FAILED;
|
|
@@ -2291,8 +2294,8 @@ function peg$parse(input, options) {
|
|
|
2291
2294
|
s0 = peg$currPos;
|
|
2292
2295
|
s1 = peg$currPos;
|
|
2293
2296
|
s2 = [];
|
|
2294
|
-
|
|
2295
|
-
|
|
2297
|
+
s3 = input.charAt(peg$currPos);
|
|
2298
|
+
if (peg$r12.test(s3)) {
|
|
2296
2299
|
peg$currPos++;
|
|
2297
2300
|
} else {
|
|
2298
2301
|
s3 = peg$FAILED;
|
|
@@ -2301,8 +2304,8 @@ function peg$parse(input, options) {
|
|
|
2301
2304
|
if (s3 !== peg$FAILED) {
|
|
2302
2305
|
while (s3 !== peg$FAILED) {
|
|
2303
2306
|
s2.push(s3);
|
|
2304
|
-
|
|
2305
|
-
|
|
2307
|
+
s3 = input.charAt(peg$currPos);
|
|
2308
|
+
if (peg$r12.test(s3)) {
|
|
2306
2309
|
peg$currPos++;
|
|
2307
2310
|
} else {
|
|
2308
2311
|
s3 = peg$FAILED;
|
|
@@ -2354,8 +2357,8 @@ function peg$parse(input, options) {
|
|
|
2354
2357
|
if (s1 !== peg$FAILED) {
|
|
2355
2358
|
s2 = peg$currPos;
|
|
2356
2359
|
s3 = [];
|
|
2357
|
-
|
|
2358
|
-
|
|
2360
|
+
s4 = input.charAt(peg$currPos);
|
|
2361
|
+
if (peg$r13.test(s4)) {
|
|
2359
2362
|
peg$currPos++;
|
|
2360
2363
|
} else {
|
|
2361
2364
|
s4 = peg$FAILED;
|
|
@@ -2364,8 +2367,8 @@ function peg$parse(input, options) {
|
|
|
2364
2367
|
if (s4 !== peg$FAILED) {
|
|
2365
2368
|
while (s4 !== peg$FAILED) {
|
|
2366
2369
|
s3.push(s4);
|
|
2367
|
-
|
|
2368
|
-
|
|
2370
|
+
s4 = input.charAt(peg$currPos);
|
|
2371
|
+
if (peg$r13.test(s4)) {
|
|
2369
2372
|
peg$currPos++;
|
|
2370
2373
|
} else {
|
|
2371
2374
|
s4 = peg$FAILED;
|
|
@@ -2429,8 +2432,8 @@ function peg$parse(input, options) {
|
|
|
2429
2432
|
if (s5 !== peg$FAILED) {
|
|
2430
2433
|
s6 = peg$currPos;
|
|
2431
2434
|
s7 = [];
|
|
2432
|
-
|
|
2433
|
-
|
|
2435
|
+
s8 = input.charAt(peg$currPos);
|
|
2436
|
+
if (peg$r13.test(s8)) {
|
|
2434
2437
|
peg$currPos++;
|
|
2435
2438
|
} else {
|
|
2436
2439
|
s8 = peg$FAILED;
|
|
@@ -2439,8 +2442,8 @@ function peg$parse(input, options) {
|
|
|
2439
2442
|
if (s8 !== peg$FAILED) {
|
|
2440
2443
|
while (s8 !== peg$FAILED) {
|
|
2441
2444
|
s7.push(s8);
|
|
2442
|
-
|
|
2443
|
-
|
|
2445
|
+
s8 = input.charAt(peg$currPos);
|
|
2446
|
+
if (peg$r13.test(s8)) {
|
|
2444
2447
|
peg$currPos++;
|
|
2445
2448
|
} else {
|
|
2446
2449
|
s8 = peg$FAILED;
|
|
@@ -2521,8 +2524,8 @@ function peg$parse(input, options) {
|
|
|
2521
2524
|
s2 = peg$parseExtendedDiacritic();
|
|
2522
2525
|
if (s2 !== peg$FAILED) {
|
|
2523
2526
|
s3 = peg$parse__();
|
|
2524
|
-
|
|
2525
|
-
|
|
2527
|
+
s4 = input.charAt(peg$currPos);
|
|
2528
|
+
if (peg$r13.test(s4)) {
|
|
2526
2529
|
peg$currPos++;
|
|
2527
2530
|
} else {
|
|
2528
2531
|
s4 = peg$FAILED;
|
|
@@ -2538,8 +2541,8 @@ function peg$parse(input, options) {
|
|
|
2538
2541
|
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
2539
2542
|
}
|
|
2540
2543
|
if (s5 !== peg$FAILED) {
|
|
2541
|
-
|
|
2542
|
-
|
|
2544
|
+
s6 = input.charAt(peg$currPos);
|
|
2545
|
+
if (peg$r14.test(s6)) {
|
|
2543
2546
|
peg$currPos++;
|
|
2544
2547
|
} else {
|
|
2545
2548
|
s6 = peg$FAILED;
|
|
@@ -2786,8 +2789,8 @@ function peg$parse(input, options) {
|
|
|
2786
2789
|
s2 = peg$parse__h();
|
|
2787
2790
|
s3 = peg$currPos;
|
|
2788
2791
|
s4 = [];
|
|
2789
|
-
|
|
2790
|
-
|
|
2792
|
+
s5 = input.charAt(peg$currPos);
|
|
2793
|
+
if (peg$r15.test(s5)) {
|
|
2791
2794
|
peg$currPos++;
|
|
2792
2795
|
} else {
|
|
2793
2796
|
s5 = peg$FAILED;
|
|
@@ -2796,8 +2799,8 @@ function peg$parse(input, options) {
|
|
|
2796
2799
|
if (s5 !== peg$FAILED) {
|
|
2797
2800
|
while (s5 !== peg$FAILED) {
|
|
2798
2801
|
s4.push(s5);
|
|
2799
|
-
|
|
2800
|
-
|
|
2802
|
+
s5 = input.charAt(peg$currPos);
|
|
2803
|
+
if (peg$r15.test(s5)) {
|
|
2801
2804
|
peg$currPos++;
|
|
2802
2805
|
} else {
|
|
2803
2806
|
s5 = peg$FAILED;
|
|
@@ -2893,8 +2896,8 @@ function peg$parse(input, options) {
|
|
|
2893
2896
|
var s0, s1, s2, s3;
|
|
2894
2897
|
|
|
2895
2898
|
s0 = peg$currPos;
|
|
2896
|
-
|
|
2897
|
-
|
|
2899
|
+
s1 = input.charAt(peg$currPos);
|
|
2900
|
+
if (peg$r16.test(s1)) {
|
|
2898
2901
|
peg$currPos++;
|
|
2899
2902
|
} else {
|
|
2900
2903
|
s1 = peg$FAILED;
|
|
@@ -2933,8 +2936,8 @@ function peg$parse(input, options) {
|
|
|
2933
2936
|
s2 = peg$parseSimpleDiacritic();
|
|
2934
2937
|
if (s2 !== peg$FAILED) {
|
|
2935
2938
|
s3 = peg$parse__();
|
|
2936
|
-
|
|
2937
|
-
|
|
2939
|
+
s4 = input.charAt(peg$currPos);
|
|
2940
|
+
if (peg$r13.test(s4)) {
|
|
2938
2941
|
peg$currPos++;
|
|
2939
2942
|
} else {
|
|
2940
2943
|
s4 = peg$FAILED;
|
|
@@ -2950,8 +2953,8 @@ function peg$parse(input, options) {
|
|
|
2950
2953
|
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
2951
2954
|
}
|
|
2952
2955
|
if (s5 !== peg$FAILED) {
|
|
2953
|
-
|
|
2954
|
-
|
|
2956
|
+
s6 = input.charAt(peg$currPos);
|
|
2957
|
+
if (peg$r14.test(s6)) {
|
|
2955
2958
|
peg$currPos++;
|
|
2956
2959
|
} else {
|
|
2957
2960
|
s6 = peg$FAILED;
|
|
@@ -3004,8 +3007,8 @@ function peg$parse(input, options) {
|
|
|
3004
3007
|
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
3005
3008
|
}
|
|
3006
3009
|
if (s3 !== peg$FAILED) {
|
|
3007
|
-
|
|
3008
|
-
|
|
3010
|
+
s4 = input.charAt(peg$currPos);
|
|
3011
|
+
if (peg$r13.test(s4)) {
|
|
3009
3012
|
peg$currPos++;
|
|
3010
3013
|
} else {
|
|
3011
3014
|
s4 = peg$FAILED;
|
|
@@ -3021,8 +3024,8 @@ function peg$parse(input, options) {
|
|
|
3021
3024
|
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3022
3025
|
}
|
|
3023
3026
|
if (s5 !== peg$FAILED) {
|
|
3024
|
-
|
|
3025
|
-
|
|
3027
|
+
s6 = input.charAt(peg$currPos);
|
|
3028
|
+
if (peg$r14.test(s6)) {
|
|
3026
3029
|
peg$currPos++;
|
|
3027
3030
|
} else {
|
|
3028
3031
|
s6 = peg$FAILED;
|
|
@@ -3127,7 +3130,7 @@ function peg$parse(input, options) {
|
|
|
3127
3130
|
}
|
|
3128
3131
|
|
|
3129
3132
|
function peg$parseSymbolCommand() {
|
|
3130
|
-
var s0, s1, s2
|
|
3133
|
+
var s0, s1, s2;
|
|
3131
3134
|
|
|
3132
3135
|
s0 = peg$currPos;
|
|
3133
3136
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
@@ -3138,19 +3141,13 @@ function peg$parse(input, options) {
|
|
|
3138
3141
|
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3139
3142
|
}
|
|
3140
3143
|
if (s1 !== peg$FAILED) {
|
|
3141
|
-
s2 = peg$currPos;
|
|
3142
|
-
if (peg$r17.test(
|
|
3143
|
-
s3 = input.charAt(peg$currPos);
|
|
3144
|
+
s2 = input.charAt(peg$currPos);
|
|
3145
|
+
if (peg$r17.test(s2)) {
|
|
3144
3146
|
peg$currPos++;
|
|
3145
3147
|
} else {
|
|
3146
|
-
|
|
3148
|
+
s2 = peg$FAILED;
|
|
3147
3149
|
if (peg$silentFails === 0) { peg$fail(peg$e35); }
|
|
3148
3150
|
}
|
|
3149
|
-
if (s3 !== peg$FAILED) {
|
|
3150
|
-
s2 = input.substring(s2, peg$currPos);
|
|
3151
|
-
} else {
|
|
3152
|
-
s2 = s3;
|
|
3153
|
-
}
|
|
3154
3151
|
if (s2 !== peg$FAILED) {
|
|
3155
3152
|
peg$savedPos = s0;
|
|
3156
3153
|
s0 = peg$f46(s2);
|
|
@@ -3460,8 +3457,8 @@ function peg$parse(input, options) {
|
|
|
3460
3457
|
if (s3 !== peg$FAILED) {
|
|
3461
3458
|
s4 = peg$currPos;
|
|
3462
3459
|
s5 = [];
|
|
3463
|
-
|
|
3464
|
-
|
|
3460
|
+
s6 = input.charAt(peg$currPos);
|
|
3461
|
+
if (peg$r18.test(s6)) {
|
|
3465
3462
|
peg$currPos++;
|
|
3466
3463
|
} else {
|
|
3467
3464
|
s6 = peg$FAILED;
|
|
@@ -3470,8 +3467,8 @@ function peg$parse(input, options) {
|
|
|
3470
3467
|
if (s6 !== peg$FAILED) {
|
|
3471
3468
|
while (s6 !== peg$FAILED) {
|
|
3472
3469
|
s5.push(s6);
|
|
3473
|
-
|
|
3474
|
-
|
|
3470
|
+
s6 = input.charAt(peg$currPos);
|
|
3471
|
+
if (peg$r18.test(s6)) {
|
|
3475
3472
|
peg$currPos++;
|
|
3476
3473
|
} else {
|
|
3477
3474
|
s6 = peg$FAILED;
|
|
@@ -3603,8 +3600,8 @@ function peg$parse(input, options) {
|
|
|
3603
3600
|
if (s3 !== peg$FAILED) {
|
|
3604
3601
|
s4 = peg$currPos;
|
|
3605
3602
|
s5 = [];
|
|
3606
|
-
|
|
3607
|
-
|
|
3603
|
+
s6 = input.charAt(peg$currPos);
|
|
3604
|
+
if (peg$r18.test(s6)) {
|
|
3608
3605
|
peg$currPos++;
|
|
3609
3606
|
} else {
|
|
3610
3607
|
s6 = peg$FAILED;
|
|
@@ -3613,8 +3610,8 @@ function peg$parse(input, options) {
|
|
|
3613
3610
|
if (s6 !== peg$FAILED) {
|
|
3614
3611
|
while (s6 !== peg$FAILED) {
|
|
3615
3612
|
s5.push(s6);
|
|
3616
|
-
|
|
3617
|
-
|
|
3613
|
+
s6 = input.charAt(peg$currPos);
|
|
3614
|
+
if (peg$r18.test(s6)) {
|
|
3618
3615
|
peg$currPos++;
|
|
3619
3616
|
} else {
|
|
3620
3617
|
s6 = peg$FAILED;
|
|
@@ -3740,8 +3737,8 @@ function peg$parse(input, options) {
|
|
|
3740
3737
|
if (s3 !== peg$FAILED) {
|
|
3741
3738
|
s4 = peg$currPos;
|
|
3742
3739
|
s5 = [];
|
|
3743
|
-
|
|
3744
|
-
|
|
3740
|
+
s6 = input.charAt(peg$currPos);
|
|
3741
|
+
if (peg$r18.test(s6)) {
|
|
3745
3742
|
peg$currPos++;
|
|
3746
3743
|
} else {
|
|
3747
3744
|
s6 = peg$FAILED;
|
|
@@ -3750,8 +3747,8 @@ function peg$parse(input, options) {
|
|
|
3750
3747
|
if (s6 !== peg$FAILED) {
|
|
3751
3748
|
while (s6 !== peg$FAILED) {
|
|
3752
3749
|
s5.push(s6);
|
|
3753
|
-
|
|
3754
|
-
|
|
3750
|
+
s6 = input.charAt(peg$currPos);
|
|
3751
|
+
if (peg$r18.test(s6)) {
|
|
3755
3752
|
peg$currPos++;
|
|
3756
3753
|
} else {
|
|
3757
3754
|
s6 = peg$FAILED;
|
|
@@ -3862,8 +3859,8 @@ function peg$parse(input, options) {
|
|
|
3862
3859
|
if (s3 !== peg$FAILED) {
|
|
3863
3860
|
s4 = peg$currPos;
|
|
3864
3861
|
s5 = [];
|
|
3865
|
-
|
|
3866
|
-
|
|
3862
|
+
s6 = input.charAt(peg$currPos);
|
|
3863
|
+
if (peg$r18.test(s6)) {
|
|
3867
3864
|
peg$currPos++;
|
|
3868
3865
|
} else {
|
|
3869
3866
|
s6 = peg$FAILED;
|
|
@@ -3872,8 +3869,8 @@ function peg$parse(input, options) {
|
|
|
3872
3869
|
if (s6 !== peg$FAILED) {
|
|
3873
3870
|
while (s6 !== peg$FAILED) {
|
|
3874
3871
|
s5.push(s6);
|
|
3875
|
-
|
|
3876
|
-
|
|
3872
|
+
s6 = input.charAt(peg$currPos);
|
|
3873
|
+
if (peg$r18.test(s6)) {
|
|
3877
3874
|
peg$currPos++;
|
|
3878
3875
|
} else {
|
|
3879
3876
|
s6 = peg$FAILED;
|
|
@@ -3978,8 +3975,8 @@ function peg$parse(input, options) {
|
|
|
3978
3975
|
if (s3 !== peg$FAILED) {
|
|
3979
3976
|
s4 = peg$currPos;
|
|
3980
3977
|
s5 = [];
|
|
3981
|
-
|
|
3982
|
-
|
|
3978
|
+
s6 = input.charAt(peg$currPos);
|
|
3979
|
+
if (peg$r18.test(s6)) {
|
|
3983
3980
|
peg$currPos++;
|
|
3984
3981
|
} else {
|
|
3985
3982
|
s6 = peg$FAILED;
|
|
@@ -3988,8 +3985,8 @@ function peg$parse(input, options) {
|
|
|
3988
3985
|
if (s6 !== peg$FAILED) {
|
|
3989
3986
|
while (s6 !== peg$FAILED) {
|
|
3990
3987
|
s5.push(s6);
|
|
3991
|
-
|
|
3992
|
-
|
|
3988
|
+
s6 = input.charAt(peg$currPos);
|
|
3989
|
+
if (peg$r18.test(s6)) {
|
|
3993
3990
|
peg$currPos++;
|
|
3994
3991
|
} else {
|
|
3995
3992
|
s6 = peg$FAILED;
|
|
@@ -4122,8 +4119,8 @@ function peg$parse(input, options) {
|
|
|
4122
4119
|
s3 = peg$FAILED;
|
|
4123
4120
|
}
|
|
4124
4121
|
if (s3 !== peg$FAILED) {
|
|
4125
|
-
|
|
4126
|
-
|
|
4122
|
+
s4 = input.charAt(peg$currPos);
|
|
4123
|
+
if (peg$r12.test(s4)) {
|
|
4127
4124
|
peg$currPos++;
|
|
4128
4125
|
} else {
|
|
4129
4126
|
s4 = peg$FAILED;
|
|
@@ -4168,8 +4165,8 @@ function peg$parse(input, options) {
|
|
|
4168
4165
|
s2 = peg$parse__h();
|
|
4169
4166
|
s3 = peg$currPos;
|
|
4170
4167
|
s4 = [];
|
|
4171
|
-
|
|
4172
|
-
|
|
4168
|
+
s5 = input.charAt(peg$currPos);
|
|
4169
|
+
if (peg$r19.test(s5)) {
|
|
4173
4170
|
peg$currPos++;
|
|
4174
4171
|
} else {
|
|
4175
4172
|
s5 = peg$FAILED;
|
|
@@ -4178,8 +4175,8 @@ function peg$parse(input, options) {
|
|
|
4178
4175
|
if (s5 !== peg$FAILED) {
|
|
4179
4176
|
while (s5 !== peg$FAILED) {
|
|
4180
4177
|
s4.push(s5);
|
|
4181
|
-
|
|
4182
|
-
|
|
4178
|
+
s5 = input.charAt(peg$currPos);
|
|
4179
|
+
if (peg$r19.test(s5)) {
|
|
4183
4180
|
peg$currPos++;
|
|
4184
4181
|
} else {
|
|
4185
4182
|
s5 = peg$FAILED;
|
|
@@ -4227,8 +4224,8 @@ function peg$parse(input, options) {
|
|
|
4227
4224
|
|
|
4228
4225
|
s0 = peg$currPos;
|
|
4229
4226
|
s1 = peg$parse__h();
|
|
4230
|
-
|
|
4231
|
-
|
|
4227
|
+
s2 = input.charAt(peg$currPos);
|
|
4228
|
+
if (peg$r20.test(s2)) {
|
|
4232
4229
|
peg$currPos++;
|
|
4233
4230
|
} else {
|
|
4234
4231
|
s2 = peg$FAILED;
|
|
@@ -4265,8 +4262,8 @@ function peg$parse(input, options) {
|
|
|
4265
4262
|
|
|
4266
4263
|
s0 = peg$currPos;
|
|
4267
4264
|
s1 = peg$currPos;
|
|
4268
|
-
|
|
4269
|
-
|
|
4265
|
+
s2 = input.charAt(peg$currPos);
|
|
4266
|
+
if (peg$r21.test(s2)) {
|
|
4270
4267
|
peg$currPos++;
|
|
4271
4268
|
} else {
|
|
4272
4269
|
s2 = peg$FAILED;
|
|
@@ -4274,8 +4271,8 @@ function peg$parse(input, options) {
|
|
|
4274
4271
|
}
|
|
4275
4272
|
if (s2 !== peg$FAILED) {
|
|
4276
4273
|
s3 = [];
|
|
4277
|
-
|
|
4278
|
-
|
|
4274
|
+
s4 = input.charAt(peg$currPos);
|
|
4275
|
+
if (peg$r22.test(s4)) {
|
|
4279
4276
|
peg$currPos++;
|
|
4280
4277
|
} else {
|
|
4281
4278
|
s4 = peg$FAILED;
|
|
@@ -4283,8 +4280,8 @@ function peg$parse(input, options) {
|
|
|
4283
4280
|
}
|
|
4284
4281
|
while (s4 !== peg$FAILED) {
|
|
4285
4282
|
s3.push(s4);
|
|
4286
|
-
|
|
4287
|
-
|
|
4283
|
+
s4 = input.charAt(peg$currPos);
|
|
4284
|
+
if (peg$r22.test(s4)) {
|
|
4288
4285
|
peg$currPos++;
|
|
4289
4286
|
} else {
|
|
4290
4287
|
s4 = peg$FAILED;
|
|
@@ -4309,8 +4306,8 @@ function peg$parse(input, options) {
|
|
|
4309
4306
|
function peg$parseSimpleDiacritic() {
|
|
4310
4307
|
var s0;
|
|
4311
4308
|
|
|
4312
|
-
|
|
4313
|
-
|
|
4309
|
+
s0 = input.charAt(peg$currPos);
|
|
4310
|
+
if (peg$r23.test(s0)) {
|
|
4314
4311
|
peg$currPos++;
|
|
4315
4312
|
} else {
|
|
4316
4313
|
s0 = peg$FAILED;
|
|
@@ -4323,8 +4320,8 @@ function peg$parse(input, options) {
|
|
|
4323
4320
|
function peg$parseExtendedDiacritic() {
|
|
4324
4321
|
var s0;
|
|
4325
4322
|
|
|
4326
|
-
|
|
4327
|
-
|
|
4323
|
+
s0 = input.charAt(peg$currPos);
|
|
4324
|
+
if (peg$r24.test(s0)) {
|
|
4328
4325
|
peg$currPos++;
|
|
4329
4326
|
} else {
|
|
4330
4327
|
s0 = peg$FAILED;
|
|
@@ -4405,8 +4402,8 @@ function peg$parse(input, options) {
|
|
|
4405
4402
|
function peg$parseEOL() {
|
|
4406
4403
|
var s0;
|
|
4407
4404
|
|
|
4408
|
-
|
|
4409
|
-
|
|
4405
|
+
s0 = input.charAt(peg$currPos);
|
|
4406
|
+
if (peg$r25.test(s0)) {
|
|
4410
4407
|
peg$currPos++;
|
|
4411
4408
|
} else {
|
|
4412
4409
|
s0 = peg$FAILED;
|
|
@@ -4421,8 +4418,8 @@ function peg$parse(input, options) {
|
|
|
4421
4418
|
|
|
4422
4419
|
peg$silentFails++;
|
|
4423
4420
|
s0 = [];
|
|
4424
|
-
|
|
4425
|
-
|
|
4421
|
+
s1 = input.charAt(peg$currPos);
|
|
4422
|
+
if (peg$r26.test(s1)) {
|
|
4426
4423
|
peg$currPos++;
|
|
4427
4424
|
} else {
|
|
4428
4425
|
s1 = peg$FAILED;
|
|
@@ -4431,8 +4428,8 @@ function peg$parse(input, options) {
|
|
|
4431
4428
|
if (s1 !== peg$FAILED) {
|
|
4432
4429
|
while (s1 !== peg$FAILED) {
|
|
4433
4430
|
s0.push(s1);
|
|
4434
|
-
|
|
4435
|
-
|
|
4431
|
+
s1 = input.charAt(peg$currPos);
|
|
4432
|
+
if (peg$r26.test(s1)) {
|
|
4436
4433
|
peg$currPos++;
|
|
4437
4434
|
} else {
|
|
4438
4435
|
s1 = peg$FAILED;
|
|
@@ -4456,8 +4453,8 @@ function peg$parse(input, options) {
|
|
|
4456
4453
|
|
|
4457
4454
|
peg$silentFails++;
|
|
4458
4455
|
s0 = [];
|
|
4459
|
-
|
|
4460
|
-
|
|
4456
|
+
s1 = input.charAt(peg$currPos);
|
|
4457
|
+
if (peg$r26.test(s1)) {
|
|
4461
4458
|
peg$currPos++;
|
|
4462
4459
|
} else {
|
|
4463
4460
|
s1 = peg$FAILED;
|
|
@@ -4465,8 +4462,8 @@ function peg$parse(input, options) {
|
|
|
4465
4462
|
}
|
|
4466
4463
|
while (s1 !== peg$FAILED) {
|
|
4467
4464
|
s0.push(s1);
|
|
4468
|
-
|
|
4469
|
-
|
|
4465
|
+
s1 = input.charAt(peg$currPos);
|
|
4466
|
+
if (peg$r26.test(s1)) {
|
|
4470
4467
|
peg$currPos++;
|
|
4471
4468
|
} else {
|
|
4472
4469
|
s1 = peg$FAILED;
|
|
@@ -4485,8 +4482,8 @@ function peg$parse(input, options) {
|
|
|
4485
4482
|
|
|
4486
4483
|
peg$silentFails++;
|
|
4487
4484
|
s0 = [];
|
|
4488
|
-
|
|
4489
|
-
|
|
4485
|
+
s1 = input.charAt(peg$currPos);
|
|
4486
|
+
if (peg$r25.test(s1)) {
|
|
4490
4487
|
peg$currPos++;
|
|
4491
4488
|
} else {
|
|
4492
4489
|
s1 = peg$FAILED;
|
|
@@ -4495,8 +4492,8 @@ function peg$parse(input, options) {
|
|
|
4495
4492
|
if (s1 !== peg$FAILED) {
|
|
4496
4493
|
while (s1 !== peg$FAILED) {
|
|
4497
4494
|
s0.push(s1);
|
|
4498
|
-
|
|
4499
|
-
|
|
4495
|
+
s1 = input.charAt(peg$currPos);
|
|
4496
|
+
if (peg$r25.test(s1)) {
|
|
4500
4497
|
peg$currPos++;
|
|
4501
4498
|
} else {
|
|
4502
4499
|
s1 = peg$FAILED;
|
|
@@ -4520,8 +4517,8 @@ function peg$parse(input, options) {
|
|
|
4520
4517
|
|
|
4521
4518
|
peg$silentFails++;
|
|
4522
4519
|
s0 = [];
|
|
4523
|
-
|
|
4524
|
-
|
|
4520
|
+
s1 = input.charAt(peg$currPos);
|
|
4521
|
+
if (peg$r25.test(s1)) {
|
|
4525
4522
|
peg$currPos++;
|
|
4526
4523
|
} else {
|
|
4527
4524
|
s1 = peg$FAILED;
|
|
@@ -4529,8 +4526,8 @@ function peg$parse(input, options) {
|
|
|
4529
4526
|
}
|
|
4530
4527
|
while (s1 !== peg$FAILED) {
|
|
4531
4528
|
s0.push(s1);
|
|
4532
|
-
|
|
4533
|
-
|
|
4529
|
+
s1 = input.charAt(peg$currPos);
|
|
4530
|
+
if (peg$r25.test(s1)) {
|
|
4534
4531
|
peg$currPos++;
|
|
4535
4532
|
} else {
|
|
4536
4533
|
s1 = peg$FAILED;
|
|
@@ -4549,8 +4546,8 @@ function peg$parse(input, options) {
|
|
|
4549
4546
|
|
|
4550
4547
|
peg$silentFails++;
|
|
4551
4548
|
s0 = [];
|
|
4552
|
-
|
|
4553
|
-
|
|
4549
|
+
s1 = input.charAt(peg$currPos);
|
|
4550
|
+
if (peg$r27.test(s1)) {
|
|
4554
4551
|
peg$currPos++;
|
|
4555
4552
|
} else {
|
|
4556
4553
|
s1 = peg$FAILED;
|
|
@@ -4559,8 +4556,8 @@ function peg$parse(input, options) {
|
|
|
4559
4556
|
if (s1 !== peg$FAILED) {
|
|
4560
4557
|
while (s1 !== peg$FAILED) {
|
|
4561
4558
|
s0.push(s1);
|
|
4562
|
-
|
|
4563
|
-
|
|
4559
|
+
s1 = input.charAt(peg$currPos);
|
|
4560
|
+
if (peg$r27.test(s1)) {
|
|
4564
4561
|
peg$currPos++;
|
|
4565
4562
|
} else {
|
|
4566
4563
|
s1 = peg$FAILED;
|
|
@@ -4584,8 +4581,8 @@ function peg$parse(input, options) {
|
|
|
4584
4581
|
|
|
4585
4582
|
peg$silentFails++;
|
|
4586
4583
|
s0 = [];
|
|
4587
|
-
|
|
4588
|
-
|
|
4584
|
+
s1 = input.charAt(peg$currPos);
|
|
4585
|
+
if (peg$r27.test(s1)) {
|
|
4589
4586
|
peg$currPos++;
|
|
4590
4587
|
} else {
|
|
4591
4588
|
s1 = peg$FAILED;
|
|
@@ -4593,8 +4590,8 @@ function peg$parse(input, options) {
|
|
|
4593
4590
|
}
|
|
4594
4591
|
while (s1 !== peg$FAILED) {
|
|
4595
4592
|
s0.push(s1);
|
|
4596
|
-
|
|
4597
|
-
|
|
4593
|
+
s1 = input.charAt(peg$currPos);
|
|
4594
|
+
if (peg$r27.test(s1)) {
|
|
4598
4595
|
peg$currPos++;
|
|
4599
4596
|
} else {
|
|
4600
4597
|
s1 = peg$FAILED;
|
|
@@ -4882,6 +4879,15 @@ function peg$parse(input, options) {
|
|
|
4882
4879
|
|
|
4883
4880
|
peg$result = peg$startRuleFunction();
|
|
4884
4881
|
|
|
4882
|
+
if (options.peg$library) {
|
|
4883
|
+
return /** @type {any} */ ({
|
|
4884
|
+
peg$result,
|
|
4885
|
+
peg$currPos,
|
|
4886
|
+
peg$FAILED,
|
|
4887
|
+
peg$maxFailExpected,
|
|
4888
|
+
peg$maxFailPos
|
|
4889
|
+
});
|
|
4890
|
+
}
|
|
4885
4891
|
if (peg$result !== peg$FAILED && peg$currPos === input.length) {
|
|
4886
4892
|
return peg$result;
|
|
4887
4893
|
} else {
|
|
@@ -4900,6 +4906,7 @@ function peg$parse(input, options) {
|
|
|
4900
4906
|
}
|
|
4901
4907
|
|
|
4902
4908
|
module.exports = {
|
|
4909
|
+
StartRules: ["Bibliography"],
|
|
4903
4910
|
SyntaxError: peg$SyntaxError,
|
|
4904
4911
|
parse: peg$parse
|
|
4905
4912
|
};
|
package/index.js
CHANGED
|
@@ -299,7 +299,7 @@ class Parser {
|
|
|
299
299
|
ast(input, clean = true) {
|
|
300
300
|
let parsed = [];
|
|
301
301
|
for (const chunk of chunker.parse(input)) {
|
|
302
|
-
const { children } = bibtex.parse(chunk.text, Object.assign(Object.assign({}, this.options), { combining: unicode2latex_1.combining.
|
|
302
|
+
const { children } = bibtex.parse(chunk.text, Object.assign(Object.assign({}, this.options), { combining: unicode2latex_1.combining.macros }));
|
|
303
303
|
if (clean)
|
|
304
304
|
this.clean(children);
|
|
305
305
|
parsed = parsed.concat(children);
|
|
@@ -419,7 +419,7 @@ class Parser {
|
|
|
419
419
|
parseChunk(chunk) {
|
|
420
420
|
this.chunk = chunk.text;
|
|
421
421
|
try {
|
|
422
|
-
let bib = bibtex.parse(chunk.text, Object.assign(Object.assign({}, this.options), { combining: unicode2latex_1.combining.
|
|
422
|
+
let bib = bibtex.parse(chunk.text, Object.assign(Object.assign({}, this.options), { combining: unicode2latex_1.combining.macros }));
|
|
423
423
|
if (bib.kind !== 'Bibliography')
|
|
424
424
|
throw new Error(this.show(bib));
|
|
425
425
|
bib = this.clean(bib);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retorquere/bibtex-parser",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.14",
|
|
4
4
|
"description": "BibTeX parser",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "./index.d.ts",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"author": "Emiliano Heyns",
|
|
38
38
|
"license": "ISC",
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@microsoft/api-documenter": "^7.23.
|
|
41
|
-
"@microsoft/api-extractor": "^7.
|
|
42
|
-
"@types/node": "^20.11.
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
44
|
-
"@typescript-eslint/parser": "^
|
|
40
|
+
"@microsoft/api-documenter": "^7.23.27",
|
|
41
|
+
"@microsoft/api-extractor": "^7.40.4",
|
|
42
|
+
"@types/node": "^20.11.19",
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
|
44
|
+
"@typescript-eslint/parser": "^7.0.2",
|
|
45
45
|
"command-line-args": "^5.2.1",
|
|
46
46
|
"csv": "^6.3.6",
|
|
47
47
|
"digital-tree": "^2.0.4",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"glob": "^10.3.10",
|
|
53
53
|
"mkdirp": "^3.0.1",
|
|
54
54
|
"node-fetch": "^3.3.2",
|
|
55
|
-
"peggy": "^
|
|
56
|
-
"piscina": "^4.3.
|
|
55
|
+
"peggy": "^4.0.0",
|
|
56
|
+
"piscina": "^4.3.2",
|
|
57
57
|
"slug": "^8.2.3",
|
|
58
58
|
"tap": "^18.7.0",
|
|
59
59
|
"ts-node": "^10.9.2",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"typescript": "^5.3.3"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"unicode2latex": "^
|
|
64
|
+
"unicode2latex": "^5.0.6",
|
|
65
65
|
"xregexp": "^5.1.1"
|
|
66
66
|
},
|
|
67
67
|
"files": [
|