@retorquere/bibtex-parser 7.0.12 → 7.0.13

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.
Files changed (3) hide show
  1. package/grammar.js +191 -184
  2. package/index.js +2 -2
  3. package/package.json +9 -9
package/grammar.js CHANGED
@@ -1,9 +1,10 @@
1
- // Generated by Peggy 3.0.2.
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 = 0;
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 = 0;
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 ("startRule" in options) {
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
- p = pos - 1;
895
- while (!peg$posDetailsCache[p]) {
896
- p--;
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
- if (input.substr(peg$currPos, 7).toLowerCase() === peg$c1) {
1002
- s3 = input.substr(peg$currPos, 7);
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
- if (input.substr(peg$currPos, 7).toLowerCase() === peg$c1) {
1038
- s3 = input.substr(peg$currPos, 7);
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
- if (peg$r0.test(input.charAt(peg$currPos))) {
1049
- s7 = input.charAt(peg$currPos);
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
- if (peg$r0.test(input.charAt(peg$currPos))) {
1058
- s7 = input.charAt(peg$currPos);
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
- if (peg$r1.test(input.charAt(peg$currPos))) {
1068
- s7 = input.charAt(peg$currPos);
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
- if (peg$r1.test(input.charAt(peg$currPos))) {
1077
- s7 = input.charAt(peg$currPos);
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
- if (peg$r2.test(input.charAt(peg$currPos))) {
1099
- s3 = input.charAt(peg$currPos);
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
- if (peg$r0.test(input.charAt(peg$currPos))) {
1108
- s5 = input.charAt(peg$currPos);
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
- if (peg$r0.test(input.charAt(peg$currPos))) {
1117
- s5 = input.charAt(peg$currPos);
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
- if (peg$r1.test(input.charAt(peg$currPos))) {
1138
- s3 = input.charAt(peg$currPos);
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
- if (peg$r1.test(input.charAt(peg$currPos))) {
1147
- s3 = input.charAt(peg$currPos);
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
- if (peg$r3.test(input.charAt(peg$currPos))) {
1203
- s3 = input.charAt(peg$currPos);
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
- if (peg$r3.test(input.charAt(peg$currPos))) {
1215
- s3 = input.charAt(peg$currPos);
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
- if (peg$r4.test(input.charAt(peg$currPos))) {
1263
- s5 = input.charAt(peg$currPos);
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
- if (peg$r4.test(input.charAt(peg$currPos))) {
1273
- s5 = input.charAt(peg$currPos);
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
- if (peg$r5.test(input.charAt(peg$currPos))) {
1291
- s5 = input.charAt(peg$currPos);
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
- if (peg$r6.test(input.charAt(peg$currPos))) {
1312
- s11 = input.charAt(peg$currPos);
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
- if (input.substr(peg$currPos, 8).toLowerCase() === peg$c4) {
1356
- s3 = input.substr(peg$currPos, 8);
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
- if (peg$r5.test(input.charAt(peg$currPos))) {
1365
- s5 = input.charAt(peg$currPos);
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
- if (peg$r6.test(input.charAt(peg$currPos))) {
1405
- s9 = input.charAt(peg$currPos);
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
- if (input.substr(peg$currPos, 6).toLowerCase() === peg$c5) {
1449
- s3 = input.substr(peg$currPos, 6);
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
- if (peg$r5.test(input.charAt(peg$currPos))) {
1458
- s5 = input.charAt(peg$currPos);
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
- if (peg$r6.test(input.charAt(peg$currPos))) {
1483
- s11 = input.charAt(peg$currPos);
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
- if (peg$r7.test(input.charAt(peg$currPos))) {
1533
- s4 = input.charAt(peg$currPos);
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
- if (peg$r7.test(input.charAt(peg$currPos))) {
1542
- s4 = input.charAt(peg$currPos);
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
- if (peg$r8.test(input.charAt(peg$currPos))) {
1738
- s4 = input.charAt(peg$currPos);
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
- if (peg$r8.test(input.charAt(peg$currPos))) {
1748
- s4 = input.charAt(peg$currPos);
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
- if (peg$r3.test(input.charAt(peg$currPos))) {
1854
- s3 = input.charAt(peg$currPos);
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
- if (peg$r3.test(input.charAt(peg$currPos))) {
1864
- s3 = input.charAt(peg$currPos);
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
- if (peg$r9.test(input.charAt(peg$currPos))) {
1932
- s3 = input.charAt(peg$currPos);
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
- if (peg$r9.test(input.charAt(peg$currPos))) {
1942
- s3 = input.charAt(peg$currPos);
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
- if (peg$r10.test(input.charAt(peg$currPos))) {
2213
- s3 = input.charAt(peg$currPos);
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
- if (peg$r10.test(input.charAt(peg$currPos))) {
2223
- s3 = input.charAt(peg$currPos);
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
- if (peg$r11.test(input.charAt(peg$currPos))) {
2254
- s3 = input.charAt(peg$currPos);
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
- if (peg$r11.test(input.charAt(peg$currPos))) {
2264
- s3 = input.charAt(peg$currPos);
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
- if (peg$r12.test(input.charAt(peg$currPos))) {
2295
- s3 = input.charAt(peg$currPos);
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
- if (peg$r12.test(input.charAt(peg$currPos))) {
2305
- s3 = input.charAt(peg$currPos);
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
- if (peg$r13.test(input.charAt(peg$currPos))) {
2358
- s4 = input.charAt(peg$currPos);
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
- if (peg$r13.test(input.charAt(peg$currPos))) {
2368
- s4 = input.charAt(peg$currPos);
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
- if (peg$r13.test(input.charAt(peg$currPos))) {
2433
- s8 = input.charAt(peg$currPos);
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
- if (peg$r13.test(input.charAt(peg$currPos))) {
2443
- s8 = input.charAt(peg$currPos);
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
- if (peg$r13.test(input.charAt(peg$currPos))) {
2525
- s4 = input.charAt(peg$currPos);
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
- if (peg$r14.test(input.charAt(peg$currPos))) {
2542
- s6 = input.charAt(peg$currPos);
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
- if (peg$r15.test(input.charAt(peg$currPos))) {
2790
- s5 = input.charAt(peg$currPos);
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
- if (peg$r15.test(input.charAt(peg$currPos))) {
2800
- s5 = input.charAt(peg$currPos);
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
- if (peg$r16.test(input.charAt(peg$currPos))) {
2897
- s1 = input.charAt(peg$currPos);
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
- if (peg$r13.test(input.charAt(peg$currPos))) {
2937
- s4 = input.charAt(peg$currPos);
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
- if (peg$r14.test(input.charAt(peg$currPos))) {
2954
- s6 = input.charAt(peg$currPos);
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
- if (peg$r13.test(input.charAt(peg$currPos))) {
3008
- s4 = input.charAt(peg$currPos);
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
- if (peg$r14.test(input.charAt(peg$currPos))) {
3025
- s6 = input.charAt(peg$currPos);
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, s3;
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(input.charAt(peg$currPos))) {
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
- s3 = peg$FAILED;
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
- if (peg$r18.test(input.charAt(peg$currPos))) {
3464
- s6 = input.charAt(peg$currPos);
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
- if (peg$r18.test(input.charAt(peg$currPos))) {
3474
- s6 = input.charAt(peg$currPos);
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
- if (peg$r18.test(input.charAt(peg$currPos))) {
3607
- s6 = input.charAt(peg$currPos);
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
- if (peg$r18.test(input.charAt(peg$currPos))) {
3617
- s6 = input.charAt(peg$currPos);
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
- if (peg$r18.test(input.charAt(peg$currPos))) {
3744
- s6 = input.charAt(peg$currPos);
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
- if (peg$r18.test(input.charAt(peg$currPos))) {
3754
- s6 = input.charAt(peg$currPos);
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
- if (peg$r18.test(input.charAt(peg$currPos))) {
3866
- s6 = input.charAt(peg$currPos);
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
- if (peg$r18.test(input.charAt(peg$currPos))) {
3876
- s6 = input.charAt(peg$currPos);
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
- if (peg$r18.test(input.charAt(peg$currPos))) {
3982
- s6 = input.charAt(peg$currPos);
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
- if (peg$r18.test(input.charAt(peg$currPos))) {
3992
- s6 = input.charAt(peg$currPos);
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
- if (peg$r12.test(input.charAt(peg$currPos))) {
4126
- s4 = input.charAt(peg$currPos);
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
- if (peg$r19.test(input.charAt(peg$currPos))) {
4172
- s5 = input.charAt(peg$currPos);
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
- if (peg$r19.test(input.charAt(peg$currPos))) {
4182
- s5 = input.charAt(peg$currPos);
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
- if (peg$r20.test(input.charAt(peg$currPos))) {
4231
- s2 = input.charAt(peg$currPos);
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
- if (peg$r21.test(input.charAt(peg$currPos))) {
4269
- s2 = input.charAt(peg$currPos);
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
- if (peg$r22.test(input.charAt(peg$currPos))) {
4278
- s4 = input.charAt(peg$currPos);
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
- if (peg$r22.test(input.charAt(peg$currPos))) {
4287
- s4 = input.charAt(peg$currPos);
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
- if (peg$r23.test(input.charAt(peg$currPos))) {
4313
- s0 = input.charAt(peg$currPos);
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
- if (peg$r24.test(input.charAt(peg$currPos))) {
4327
- s0 = input.charAt(peg$currPos);
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
- if (peg$r25.test(input.charAt(peg$currPos))) {
4409
- s0 = input.charAt(peg$currPos);
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
- if (peg$r26.test(input.charAt(peg$currPos))) {
4425
- s1 = input.charAt(peg$currPos);
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
- if (peg$r26.test(input.charAt(peg$currPos))) {
4435
- s1 = input.charAt(peg$currPos);
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
- if (peg$r26.test(input.charAt(peg$currPos))) {
4460
- s1 = input.charAt(peg$currPos);
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
- if (peg$r26.test(input.charAt(peg$currPos))) {
4469
- s1 = input.charAt(peg$currPos);
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
- if (peg$r25.test(input.charAt(peg$currPos))) {
4489
- s1 = input.charAt(peg$currPos);
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
- if (peg$r25.test(input.charAt(peg$currPos))) {
4499
- s1 = input.charAt(peg$currPos);
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
- if (peg$r25.test(input.charAt(peg$currPos))) {
4524
- s1 = input.charAt(peg$currPos);
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
- if (peg$r25.test(input.charAt(peg$currPos))) {
4533
- s1 = input.charAt(peg$currPos);
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
- if (peg$r27.test(input.charAt(peg$currPos))) {
4553
- s1 = input.charAt(peg$currPos);
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
- if (peg$r27.test(input.charAt(peg$currPos))) {
4563
- s1 = input.charAt(peg$currPos);
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
- if (peg$r27.test(input.charAt(peg$currPos))) {
4588
- s1 = input.charAt(peg$currPos);
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
- if (peg$r27.test(input.charAt(peg$currPos))) {
4597
- s1 = input.charAt(peg$currPos);
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.commands }));
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.commands }));
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.12",
3
+ "version": "7.0.13",
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.20",
41
- "@microsoft/api-extractor": "^7.39.4",
42
- "@types/node": "^20.11.9",
43
- "@typescript-eslint/eslint-plugin": "^6.19.1",
44
- "@typescript-eslint/parser": "^6.19.1",
40
+ "@microsoft/api-documenter": "^7.23.26",
41
+ "@microsoft/api-extractor": "^7.40.3",
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": "^3.0.2",
56
- "piscina": "^4.3.0",
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": "^4.0.42",
64
+ "unicode2latex": "^5.0.3",
65
65
  "xregexp": "^5.1.1"
66
66
  },
67
67
  "files": [