@retorquere/bibtex-parser 6.0.0 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/grammar.js +146 -124
  2. package/package.json +1 -1
package/grammar.js CHANGED
@@ -186,15 +186,17 @@ function peg$parse(input, options) {
186
186
  var peg$c12 = "\\";
187
187
  var peg$c13 = "$";
188
188
  var peg$c14 = "$$";
189
- var peg$c15 = "%";
190
- var peg$c16 = "newcommand";
191
- var peg$c17 = "href";
192
- var peg$c18 = "begin";
193
- var peg$c19 = "end";
194
- var peg$c20 = "[";
195
- var peg$c21 = "]";
196
- var peg$c22 = "=";
197
- var peg$c23 = "#";
189
+ var peg$c15 = "\\[";
190
+ var peg$c16 = "\\]";
191
+ var peg$c17 = "%";
192
+ var peg$c18 = "newcommand";
193
+ var peg$c19 = "href";
194
+ var peg$c20 = "begin";
195
+ var peg$c21 = "end";
196
+ var peg$c22 = "[";
197
+ var peg$c23 = "]";
198
+ var peg$c24 = "=";
199
+ var peg$c25 = "#";
198
200
 
199
201
  var peg$r0 = /^[^\n\r]/;
200
202
  var peg$r1 = /^[\n\r]/;
@@ -255,34 +257,36 @@ function peg$parse(input, options) {
255
257
  var peg$e27 = peg$classExpectation(["i", "j"], false, false);
256
258
  var peg$e28 = peg$literalExpectation("$", false);
257
259
  var peg$e29 = peg$literalExpectation("$$", false);
258
- var peg$e30 = peg$literalExpectation("%", false);
259
- var peg$e31 = peg$classExpectation(["\r", "\n"], true, false);
260
- var peg$e32 = peg$classExpectation(["_", "^"], false, false);
261
- var peg$e33 = peg$classExpectation([["A", "Z"], ["a", "z"], ["0", "9"], "\t", "\r", "\n"], true, false);
262
- var peg$e34 = peg$literalExpectation("newcommand", false);
263
- var peg$e35 = peg$literalExpectation("href", false);
264
- var peg$e36 = peg$literalExpectation("begin", false);
265
- var peg$e37 = peg$literalExpectation("end", false);
266
- var peg$e38 = peg$classExpectation([["A", "Z"], ["a", "z"]], false, false);
267
- var peg$e39 = peg$literalExpectation("[", false);
268
- var peg$e40 = peg$classExpectation(["]"], true, false);
269
- var peg$e41 = peg$literalExpectation("]", false);
270
- var peg$e42 = peg$classExpectation([" ", "\t", "^", "_", "$", "{", "}", "\\"], true, false);
271
- var peg$e43 = peg$classExpectation([["a", "z"], ["A", "Z"], "-", "_"], false, false);
272
- var peg$e44 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "-", "&", "_", ":"], false, false);
273
- var peg$e45 = peg$classExpectation(["'", "`", "\"", "=", "~", "^", "."], false, false);
274
- var peg$e46 = peg$classExpectation(["'", "`", "\"", "=", "~", "^", ".", "c", "b", "u", "v", "d", "r", "H", "k"], false, false);
275
- var peg$e47 = peg$literalExpectation("=", false);
276
- var peg$e48 = peg$literalExpectation("#", false);
277
- var peg$e49 = peg$classExpectation(["\r", "\n"], false, false);
278
- var peg$e50 = peg$otherExpectation("Mandatory Horizontal Whitespace");
279
- var peg$e51 = peg$classExpectation([" ", "\t"], false, false);
280
- var peg$e52 = peg$otherExpectation("Optional Horizontal Whitespace");
281
- var peg$e53 = peg$otherExpectation("Mandatory Vertical Whitespace");
282
- var peg$e54 = peg$otherExpectation("Optional Vertical Whitespace");
283
- var peg$e55 = peg$otherExpectation("Mandatory Whitespace");
284
- var peg$e56 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false);
285
- var peg$e57 = peg$otherExpectation("Optional Whitespace");
260
+ var peg$e30 = peg$literalExpectation("\\[", false);
261
+ var peg$e31 = peg$literalExpectation("\\]", false);
262
+ var peg$e32 = peg$literalExpectation("%", false);
263
+ var peg$e33 = peg$classExpectation(["\r", "\n"], true, false);
264
+ var peg$e34 = peg$classExpectation(["_", "^"], false, false);
265
+ var peg$e35 = peg$classExpectation([["A", "Z"], ["a", "z"], ["0", "9"], "\t", "\r", "\n"], true, false);
266
+ var peg$e36 = peg$literalExpectation("newcommand", false);
267
+ var peg$e37 = peg$literalExpectation("href", false);
268
+ var peg$e38 = peg$literalExpectation("begin", false);
269
+ var peg$e39 = peg$literalExpectation("end", false);
270
+ var peg$e40 = peg$classExpectation([["A", "Z"], ["a", "z"]], false, false);
271
+ var peg$e41 = peg$literalExpectation("[", false);
272
+ var peg$e42 = peg$classExpectation(["]"], true, false);
273
+ var peg$e43 = peg$literalExpectation("]", false);
274
+ var peg$e44 = peg$classExpectation([" ", "\t", "^", "_", "$", "{", "}", "\\"], true, false);
275
+ var peg$e45 = peg$classExpectation([["a", "z"], ["A", "Z"], "-", "_"], false, false);
276
+ var peg$e46 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "-", "&", "_", ":"], false, false);
277
+ var peg$e47 = peg$classExpectation(["'", "`", "\"", "=", "~", "^", "."], false, false);
278
+ var peg$e48 = peg$classExpectation(["'", "`", "\"", "=", "~", "^", ".", "c", "b", "u", "v", "d", "r", "H", "k"], false, false);
279
+ var peg$e49 = peg$literalExpectation("=", false);
280
+ var peg$e50 = peg$literalExpectation("#", false);
281
+ var peg$e51 = peg$classExpectation(["\r", "\n"], false, false);
282
+ var peg$e52 = peg$otherExpectation("Mandatory Horizontal Whitespace");
283
+ var peg$e53 = peg$classExpectation([" ", "\t"], false, false);
284
+ var peg$e54 = peg$otherExpectation("Optional Horizontal Whitespace");
285
+ var peg$e55 = peg$otherExpectation("Mandatory Vertical Whitespace");
286
+ var peg$e56 = peg$otherExpectation("Optional Vertical Whitespace");
287
+ var peg$e57 = peg$otherExpectation("Mandatory Whitespace");
288
+ var peg$e58 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false);
289
+ var peg$e59 = peg$otherExpectation("Optional Whitespace");
286
290
 
287
291
  var peg$f0 = function(r) {
288
292
  return {
@@ -2580,6 +2584,15 @@ function peg$parse(input, options) {
2580
2584
  s2 = peg$FAILED;
2581
2585
  if (peg$silentFails === 0) { peg$fail(peg$e29); }
2582
2586
  }
2587
+ if (s2 === peg$FAILED) {
2588
+ if (input.substr(peg$currPos, 2) === peg$c15) {
2589
+ s2 = peg$c15;
2590
+ peg$currPos += 2;
2591
+ } else {
2592
+ s2 = peg$FAILED;
2593
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
2594
+ }
2595
+ }
2583
2596
  }
2584
2597
  if (s2 !== peg$FAILED) {
2585
2598
  peg$savedPos = peg$currPos;
@@ -2623,6 +2636,15 @@ function peg$parse(input, options) {
2623
2636
  s5 = peg$FAILED;
2624
2637
  if (peg$silentFails === 0) { peg$fail(peg$e29); }
2625
2638
  }
2639
+ if (s5 === peg$FAILED) {
2640
+ if (input.substr(peg$currPos, 2) === peg$c16) {
2641
+ s5 = peg$c16;
2642
+ peg$currPos += 2;
2643
+ } else {
2644
+ s5 = peg$FAILED;
2645
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
2646
+ }
2647
+ }
2626
2648
  }
2627
2649
  if (s5 !== peg$FAILED) {
2628
2650
  peg$savedPos = peg$currPos;
@@ -2664,11 +2686,11 @@ function peg$parse(input, options) {
2664
2686
 
2665
2687
  s0 = peg$currPos;
2666
2688
  if (input.charCodeAt(peg$currPos) === 37) {
2667
- s1 = peg$c15;
2689
+ s1 = peg$c17;
2668
2690
  peg$currPos++;
2669
2691
  } else {
2670
2692
  s1 = peg$FAILED;
2671
- if (peg$silentFails === 0) { peg$fail(peg$e30); }
2693
+ if (peg$silentFails === 0) { peg$fail(peg$e32); }
2672
2694
  }
2673
2695
  if (s1 !== peg$FAILED) {
2674
2696
  s2 = peg$parse__h();
@@ -2679,7 +2701,7 @@ function peg$parse(input, options) {
2679
2701
  peg$currPos++;
2680
2702
  } else {
2681
2703
  s5 = peg$FAILED;
2682
- if (peg$silentFails === 0) { peg$fail(peg$e31); }
2704
+ if (peg$silentFails === 0) { peg$fail(peg$e33); }
2683
2705
  }
2684
2706
  if (s5 !== peg$FAILED) {
2685
2707
  while (s5 !== peg$FAILED) {
@@ -2689,7 +2711,7 @@ function peg$parse(input, options) {
2689
2711
  peg$currPos++;
2690
2712
  } else {
2691
2713
  s5 = peg$FAILED;
2692
- if (peg$silentFails === 0) { peg$fail(peg$e31); }
2714
+ if (peg$silentFails === 0) { peg$fail(peg$e33); }
2693
2715
  }
2694
2716
  }
2695
2717
  } else {
@@ -2756,7 +2778,7 @@ function peg$parse(input, options) {
2756
2778
  peg$currPos++;
2757
2779
  } else {
2758
2780
  s1 = peg$FAILED;
2759
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
2781
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
2760
2782
  }
2761
2783
  if (s1 !== peg$FAILED) {
2762
2784
  s2 = peg$parse__h();
@@ -3002,7 +3024,7 @@ function peg$parse(input, options) {
3002
3024
  peg$currPos++;
3003
3025
  } else {
3004
3026
  s3 = peg$FAILED;
3005
- if (peg$silentFails === 0) { peg$fail(peg$e33); }
3027
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
3006
3028
  }
3007
3029
  if (s3 !== peg$FAILED) {
3008
3030
  s2 = input.substring(s2, peg$currPos);
@@ -3036,12 +3058,12 @@ function peg$parse(input, options) {
3036
3058
  if (peg$silentFails === 0) { peg$fail(peg$e26); }
3037
3059
  }
3038
3060
  if (s1 !== peg$FAILED) {
3039
- if (input.substr(peg$currPos, 10) === peg$c16) {
3040
- s2 = peg$c16;
3061
+ if (input.substr(peg$currPos, 10) === peg$c18) {
3062
+ s2 = peg$c18;
3041
3063
  peg$currPos += 10;
3042
3064
  } else {
3043
3065
  s2 = peg$FAILED;
3044
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
3066
+ if (peg$silentFails === 0) { peg$fail(peg$e36); }
3045
3067
  }
3046
3068
  if (s2 !== peg$FAILED) {
3047
3069
  s3 = peg$parseBlock();
@@ -3094,12 +3116,12 @@ function peg$parse(input, options) {
3094
3116
  if (peg$silentFails === 0) { peg$fail(peg$e26); }
3095
3117
  }
3096
3118
  if (s1 !== peg$FAILED) {
3097
- if (input.substr(peg$currPos, 4) === peg$c17) {
3098
- s2 = peg$c17;
3119
+ if (input.substr(peg$currPos, 4) === peg$c19) {
3120
+ s2 = peg$c19;
3099
3121
  peg$currPos += 4;
3100
3122
  } else {
3101
3123
  s2 = peg$FAILED;
3102
- if (peg$silentFails === 0) { peg$fail(peg$e35); }
3124
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
3103
3125
  }
3104
3126
  if (s2 !== peg$FAILED) {
3105
3127
  s3 = peg$parse__h();
@@ -3158,12 +3180,12 @@ function peg$parse(input, options) {
3158
3180
  if (s1 !== peg$FAILED) {
3159
3181
  s2 = peg$currPos;
3160
3182
  peg$silentFails++;
3161
- if (input.substr(peg$currPos, 5) === peg$c18) {
3162
- s3 = peg$c18;
3183
+ if (input.substr(peg$currPos, 5) === peg$c20) {
3184
+ s3 = peg$c20;
3163
3185
  peg$currPos += 5;
3164
3186
  } else {
3165
3187
  s3 = peg$FAILED;
3166
- if (peg$silentFails === 0) { peg$fail(peg$e36); }
3188
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
3167
3189
  }
3168
3190
  peg$silentFails--;
3169
3191
  if (s3 === peg$FAILED) {
@@ -3175,12 +3197,12 @@ function peg$parse(input, options) {
3175
3197
  if (s2 !== peg$FAILED) {
3176
3198
  s3 = peg$currPos;
3177
3199
  peg$silentFails++;
3178
- if (input.substr(peg$currPos, 3) === peg$c19) {
3179
- s4 = peg$c19;
3200
+ if (input.substr(peg$currPos, 3) === peg$c21) {
3201
+ s4 = peg$c21;
3180
3202
  peg$currPos += 3;
3181
3203
  } else {
3182
3204
  s4 = peg$FAILED;
3183
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
3205
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
3184
3206
  }
3185
3207
  peg$silentFails--;
3186
3208
  if (s4 === peg$FAILED) {
@@ -3197,7 +3219,7 @@ function peg$parse(input, options) {
3197
3219
  peg$currPos++;
3198
3220
  } else {
3199
3221
  s6 = peg$FAILED;
3200
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
3222
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
3201
3223
  }
3202
3224
  if (s6 !== peg$FAILED) {
3203
3225
  while (s6 !== peg$FAILED) {
@@ -3207,7 +3229,7 @@ function peg$parse(input, options) {
3207
3229
  peg$currPos++;
3208
3230
  } else {
3209
3231
  s6 = peg$FAILED;
3210
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
3232
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
3211
3233
  }
3212
3234
  }
3213
3235
  } else {
@@ -3301,12 +3323,12 @@ function peg$parse(input, options) {
3301
3323
  if (s1 !== peg$FAILED) {
3302
3324
  s2 = peg$currPos;
3303
3325
  peg$silentFails++;
3304
- if (input.substr(peg$currPos, 5) === peg$c18) {
3305
- s3 = peg$c18;
3326
+ if (input.substr(peg$currPos, 5) === peg$c20) {
3327
+ s3 = peg$c20;
3306
3328
  peg$currPos += 5;
3307
3329
  } else {
3308
3330
  s3 = peg$FAILED;
3309
- if (peg$silentFails === 0) { peg$fail(peg$e36); }
3331
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
3310
3332
  }
3311
3333
  peg$silentFails--;
3312
3334
  if (s3 === peg$FAILED) {
@@ -3318,12 +3340,12 @@ function peg$parse(input, options) {
3318
3340
  if (s2 !== peg$FAILED) {
3319
3341
  s3 = peg$currPos;
3320
3342
  peg$silentFails++;
3321
- if (input.substr(peg$currPos, 3) === peg$c19) {
3322
- s4 = peg$c19;
3343
+ if (input.substr(peg$currPos, 3) === peg$c21) {
3344
+ s4 = peg$c21;
3323
3345
  peg$currPos += 3;
3324
3346
  } else {
3325
3347
  s4 = peg$FAILED;
3326
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
3348
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
3327
3349
  }
3328
3350
  peg$silentFails--;
3329
3351
  if (s4 === peg$FAILED) {
@@ -3340,7 +3362,7 @@ function peg$parse(input, options) {
3340
3362
  peg$currPos++;
3341
3363
  } else {
3342
3364
  s6 = peg$FAILED;
3343
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
3365
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
3344
3366
  }
3345
3367
  if (s6 !== peg$FAILED) {
3346
3368
  while (s6 !== peg$FAILED) {
@@ -3350,7 +3372,7 @@ function peg$parse(input, options) {
3350
3372
  peg$currPos++;
3351
3373
  } else {
3352
3374
  s6 = peg$FAILED;
3353
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
3375
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
3354
3376
  }
3355
3377
  }
3356
3378
  } else {
@@ -3438,12 +3460,12 @@ function peg$parse(input, options) {
3438
3460
  if (s1 !== peg$FAILED) {
3439
3461
  s2 = peg$currPos;
3440
3462
  peg$silentFails++;
3441
- if (input.substr(peg$currPos, 5) === peg$c18) {
3442
- s3 = peg$c18;
3463
+ if (input.substr(peg$currPos, 5) === peg$c20) {
3464
+ s3 = peg$c20;
3443
3465
  peg$currPos += 5;
3444
3466
  } else {
3445
3467
  s3 = peg$FAILED;
3446
- if (peg$silentFails === 0) { peg$fail(peg$e36); }
3468
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
3447
3469
  }
3448
3470
  peg$silentFails--;
3449
3471
  if (s3 === peg$FAILED) {
@@ -3455,12 +3477,12 @@ function peg$parse(input, options) {
3455
3477
  if (s2 !== peg$FAILED) {
3456
3478
  s3 = peg$currPos;
3457
3479
  peg$silentFails++;
3458
- if (input.substr(peg$currPos, 3) === peg$c19) {
3459
- s4 = peg$c19;
3480
+ if (input.substr(peg$currPos, 3) === peg$c21) {
3481
+ s4 = peg$c21;
3460
3482
  peg$currPos += 3;
3461
3483
  } else {
3462
3484
  s4 = peg$FAILED;
3463
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
3485
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
3464
3486
  }
3465
3487
  peg$silentFails--;
3466
3488
  if (s4 === peg$FAILED) {
@@ -3477,7 +3499,7 @@ function peg$parse(input, options) {
3477
3499
  peg$currPos++;
3478
3500
  } else {
3479
3501
  s6 = peg$FAILED;
3480
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
3502
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
3481
3503
  }
3482
3504
  if (s6 !== peg$FAILED) {
3483
3505
  while (s6 !== peg$FAILED) {
@@ -3487,7 +3509,7 @@ function peg$parse(input, options) {
3487
3509
  peg$currPos++;
3488
3510
  } else {
3489
3511
  s6 = peg$FAILED;
3490
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
3512
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
3491
3513
  }
3492
3514
  }
3493
3515
  } else {
@@ -3560,12 +3582,12 @@ function peg$parse(input, options) {
3560
3582
  if (s1 !== peg$FAILED) {
3561
3583
  s2 = peg$currPos;
3562
3584
  peg$silentFails++;
3563
- if (input.substr(peg$currPos, 5) === peg$c18) {
3564
- s3 = peg$c18;
3585
+ if (input.substr(peg$currPos, 5) === peg$c20) {
3586
+ s3 = peg$c20;
3565
3587
  peg$currPos += 5;
3566
3588
  } else {
3567
3589
  s3 = peg$FAILED;
3568
- if (peg$silentFails === 0) { peg$fail(peg$e36); }
3590
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
3569
3591
  }
3570
3592
  peg$silentFails--;
3571
3593
  if (s3 === peg$FAILED) {
@@ -3577,12 +3599,12 @@ function peg$parse(input, options) {
3577
3599
  if (s2 !== peg$FAILED) {
3578
3600
  s3 = peg$currPos;
3579
3601
  peg$silentFails++;
3580
- if (input.substr(peg$currPos, 3) === peg$c19) {
3581
- s4 = peg$c19;
3602
+ if (input.substr(peg$currPos, 3) === peg$c21) {
3603
+ s4 = peg$c21;
3582
3604
  peg$currPos += 3;
3583
3605
  } else {
3584
3606
  s4 = peg$FAILED;
3585
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
3607
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
3586
3608
  }
3587
3609
  peg$silentFails--;
3588
3610
  if (s4 === peg$FAILED) {
@@ -3599,7 +3621,7 @@ function peg$parse(input, options) {
3599
3621
  peg$currPos++;
3600
3622
  } else {
3601
3623
  s6 = peg$FAILED;
3602
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
3624
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
3603
3625
  }
3604
3626
  if (s6 !== peg$FAILED) {
3605
3627
  while (s6 !== peg$FAILED) {
@@ -3609,7 +3631,7 @@ function peg$parse(input, options) {
3609
3631
  peg$currPos++;
3610
3632
  } else {
3611
3633
  s6 = peg$FAILED;
3612
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
3634
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
3613
3635
  }
3614
3636
  }
3615
3637
  } else {
@@ -3676,12 +3698,12 @@ function peg$parse(input, options) {
3676
3698
  if (s1 !== peg$FAILED) {
3677
3699
  s2 = peg$currPos;
3678
3700
  peg$silentFails++;
3679
- if (input.substr(peg$currPos, 5) === peg$c18) {
3680
- s3 = peg$c18;
3701
+ if (input.substr(peg$currPos, 5) === peg$c20) {
3702
+ s3 = peg$c20;
3681
3703
  peg$currPos += 5;
3682
3704
  } else {
3683
3705
  s3 = peg$FAILED;
3684
- if (peg$silentFails === 0) { peg$fail(peg$e36); }
3706
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
3685
3707
  }
3686
3708
  peg$silentFails--;
3687
3709
  if (s3 === peg$FAILED) {
@@ -3693,12 +3715,12 @@ function peg$parse(input, options) {
3693
3715
  if (s2 !== peg$FAILED) {
3694
3716
  s3 = peg$currPos;
3695
3717
  peg$silentFails++;
3696
- if (input.substr(peg$currPos, 3) === peg$c19) {
3697
- s4 = peg$c19;
3718
+ if (input.substr(peg$currPos, 3) === peg$c21) {
3719
+ s4 = peg$c21;
3698
3720
  peg$currPos += 3;
3699
3721
  } else {
3700
3722
  s4 = peg$FAILED;
3701
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
3723
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
3702
3724
  }
3703
3725
  peg$silentFails--;
3704
3726
  if (s4 === peg$FAILED) {
@@ -3715,7 +3737,7 @@ function peg$parse(input, options) {
3715
3737
  peg$currPos++;
3716
3738
  } else {
3717
3739
  s6 = peg$FAILED;
3718
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
3740
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
3719
3741
  }
3720
3742
  if (s6 !== peg$FAILED) {
3721
3743
  while (s6 !== peg$FAILED) {
@@ -3725,7 +3747,7 @@ function peg$parse(input, options) {
3725
3747
  peg$currPos++;
3726
3748
  } else {
3727
3749
  s6 = peg$FAILED;
3728
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
3750
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
3729
3751
  }
3730
3752
  }
3731
3753
  } else {
@@ -3777,11 +3799,11 @@ function peg$parse(input, options) {
3777
3799
 
3778
3800
  s0 = peg$currPos;
3779
3801
  if (input.charCodeAt(peg$currPos) === 91) {
3780
- s1 = peg$c20;
3802
+ s1 = peg$c22;
3781
3803
  peg$currPos++;
3782
3804
  } else {
3783
3805
  s1 = peg$FAILED;
3784
- if (peg$silentFails === 0) { peg$fail(peg$e39); }
3806
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
3785
3807
  }
3786
3808
  if (s1 !== peg$FAILED) {
3787
3809
  s2 = peg$parse__h();
@@ -3792,7 +3814,7 @@ function peg$parse(input, options) {
3792
3814
  peg$currPos++;
3793
3815
  } else {
3794
3816
  s5 = peg$FAILED;
3795
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
3817
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
3796
3818
  }
3797
3819
  if (s5 !== peg$FAILED) {
3798
3820
  while (s5 !== peg$FAILED) {
@@ -3802,7 +3824,7 @@ function peg$parse(input, options) {
3802
3824
  peg$currPos++;
3803
3825
  } else {
3804
3826
  s5 = peg$FAILED;
3805
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
3827
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
3806
3828
  }
3807
3829
  }
3808
3830
  } else {
@@ -3816,11 +3838,11 @@ function peg$parse(input, options) {
3816
3838
  if (s3 !== peg$FAILED) {
3817
3839
  s4 = peg$parse__h();
3818
3840
  if (input.charCodeAt(peg$currPos) === 93) {
3819
- s5 = peg$c21;
3841
+ s5 = peg$c23;
3820
3842
  peg$currPos++;
3821
3843
  } else {
3822
3844
  s5 = peg$FAILED;
3823
- if (peg$silentFails === 0) { peg$fail(peg$e41); }
3845
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
3824
3846
  }
3825
3847
  if (s5 !== peg$FAILED) {
3826
3848
  peg$savedPos = s0;
@@ -3851,7 +3873,7 @@ function peg$parse(input, options) {
3851
3873
  peg$currPos++;
3852
3874
  } else {
3853
3875
  s2 = peg$FAILED;
3854
- if (peg$silentFails === 0) { peg$fail(peg$e42); }
3876
+ if (peg$silentFails === 0) { peg$fail(peg$e44); }
3855
3877
  }
3856
3878
  if (s2 !== peg$FAILED) {
3857
3879
  peg$savedPos = s0;
@@ -3886,7 +3908,7 @@ function peg$parse(input, options) {
3886
3908
  peg$currPos++;
3887
3909
  } else {
3888
3910
  s2 = peg$FAILED;
3889
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
3911
+ if (peg$silentFails === 0) { peg$fail(peg$e45); }
3890
3912
  }
3891
3913
  if (s2 !== peg$FAILED) {
3892
3914
  s3 = [];
@@ -3895,7 +3917,7 @@ function peg$parse(input, options) {
3895
3917
  peg$currPos++;
3896
3918
  } else {
3897
3919
  s4 = peg$FAILED;
3898
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
3920
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
3899
3921
  }
3900
3922
  while (s4 !== peg$FAILED) {
3901
3923
  s3.push(s4);
@@ -3904,7 +3926,7 @@ function peg$parse(input, options) {
3904
3926
  peg$currPos++;
3905
3927
  } else {
3906
3928
  s4 = peg$FAILED;
3907
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
3929
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
3908
3930
  }
3909
3931
  }
3910
3932
  s2 = [s2, s3];
@@ -3930,7 +3952,7 @@ function peg$parse(input, options) {
3930
3952
  peg$currPos++;
3931
3953
  } else {
3932
3954
  s0 = peg$FAILED;
3933
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
3955
+ if (peg$silentFails === 0) { peg$fail(peg$e47); }
3934
3956
  }
3935
3957
 
3936
3958
  return s0;
@@ -3944,7 +3966,7 @@ function peg$parse(input, options) {
3944
3966
  peg$currPos++;
3945
3967
  } else {
3946
3968
  s0 = peg$FAILED;
3947
- if (peg$silentFails === 0) { peg$fail(peg$e46); }
3969
+ if (peg$silentFails === 0) { peg$fail(peg$e48); }
3948
3970
  }
3949
3971
 
3950
3972
  return s0;
@@ -3956,11 +3978,11 @@ function peg$parse(input, options) {
3956
3978
  s0 = peg$currPos;
3957
3979
  s1 = peg$parse__();
3958
3980
  if (input.charCodeAt(peg$currPos) === 61) {
3959
- s2 = peg$c22;
3981
+ s2 = peg$c24;
3960
3982
  peg$currPos++;
3961
3983
  } else {
3962
3984
  s2 = peg$FAILED;
3963
- if (peg$silentFails === 0) { peg$fail(peg$e47); }
3985
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
3964
3986
  }
3965
3987
  if (s2 !== peg$FAILED) {
3966
3988
  s3 = peg$parse__();
@@ -4014,11 +4036,11 @@ function peg$parse(input, options) {
4014
4036
  s0 = peg$currPos;
4015
4037
  s1 = peg$parse__();
4016
4038
  if (input.charCodeAt(peg$currPos) === 35) {
4017
- s2 = peg$c23;
4039
+ s2 = peg$c25;
4018
4040
  peg$currPos++;
4019
4041
  } else {
4020
4042
  s2 = peg$FAILED;
4021
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
4043
+ if (peg$silentFails === 0) { peg$fail(peg$e50); }
4022
4044
  }
4023
4045
  if (s2 !== peg$FAILED) {
4024
4046
  s3 = peg$parse__();
@@ -4040,7 +4062,7 @@ function peg$parse(input, options) {
4040
4062
  peg$currPos++;
4041
4063
  } else {
4042
4064
  s0 = peg$FAILED;
4043
- if (peg$silentFails === 0) { peg$fail(peg$e49); }
4065
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
4044
4066
  }
4045
4067
 
4046
4068
  return s0;
@@ -4056,7 +4078,7 @@ function peg$parse(input, options) {
4056
4078
  peg$currPos++;
4057
4079
  } else {
4058
4080
  s1 = peg$FAILED;
4059
- if (peg$silentFails === 0) { peg$fail(peg$e51); }
4081
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
4060
4082
  }
4061
4083
  if (s1 !== peg$FAILED) {
4062
4084
  while (s1 !== peg$FAILED) {
@@ -4066,7 +4088,7 @@ function peg$parse(input, options) {
4066
4088
  peg$currPos++;
4067
4089
  } else {
4068
4090
  s1 = peg$FAILED;
4069
- if (peg$silentFails === 0) { peg$fail(peg$e51); }
4091
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
4070
4092
  }
4071
4093
  }
4072
4094
  } else {
@@ -4075,7 +4097,7 @@ function peg$parse(input, options) {
4075
4097
  peg$silentFails--;
4076
4098
  if (s0 === peg$FAILED) {
4077
4099
  s1 = peg$FAILED;
4078
- if (peg$silentFails === 0) { peg$fail(peg$e50); }
4100
+ if (peg$silentFails === 0) { peg$fail(peg$e52); }
4079
4101
  }
4080
4102
 
4081
4103
  return s0;
@@ -4091,7 +4113,7 @@ function peg$parse(input, options) {
4091
4113
  peg$currPos++;
4092
4114
  } else {
4093
4115
  s1 = peg$FAILED;
4094
- if (peg$silentFails === 0) { peg$fail(peg$e51); }
4116
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
4095
4117
  }
4096
4118
  while (s1 !== peg$FAILED) {
4097
4119
  s0.push(s1);
@@ -4100,12 +4122,12 @@ function peg$parse(input, options) {
4100
4122
  peg$currPos++;
4101
4123
  } else {
4102
4124
  s1 = peg$FAILED;
4103
- if (peg$silentFails === 0) { peg$fail(peg$e51); }
4125
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
4104
4126
  }
4105
4127
  }
4106
4128
  peg$silentFails--;
4107
4129
  s1 = peg$FAILED;
4108
- if (peg$silentFails === 0) { peg$fail(peg$e52); }
4130
+ if (peg$silentFails === 0) { peg$fail(peg$e54); }
4109
4131
 
4110
4132
  return s0;
4111
4133
  }
@@ -4120,7 +4142,7 @@ function peg$parse(input, options) {
4120
4142
  peg$currPos++;
4121
4143
  } else {
4122
4144
  s1 = peg$FAILED;
4123
- if (peg$silentFails === 0) { peg$fail(peg$e49); }
4145
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
4124
4146
  }
4125
4147
  if (s1 !== peg$FAILED) {
4126
4148
  while (s1 !== peg$FAILED) {
@@ -4130,7 +4152,7 @@ function peg$parse(input, options) {
4130
4152
  peg$currPos++;
4131
4153
  } else {
4132
4154
  s1 = peg$FAILED;
4133
- if (peg$silentFails === 0) { peg$fail(peg$e49); }
4155
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
4134
4156
  }
4135
4157
  }
4136
4158
  } else {
@@ -4139,7 +4161,7 @@ function peg$parse(input, options) {
4139
4161
  peg$silentFails--;
4140
4162
  if (s0 === peg$FAILED) {
4141
4163
  s1 = peg$FAILED;
4142
- if (peg$silentFails === 0) { peg$fail(peg$e53); }
4164
+ if (peg$silentFails === 0) { peg$fail(peg$e55); }
4143
4165
  }
4144
4166
 
4145
4167
  return s0;
@@ -4155,7 +4177,7 @@ function peg$parse(input, options) {
4155
4177
  peg$currPos++;
4156
4178
  } else {
4157
4179
  s1 = peg$FAILED;
4158
- if (peg$silentFails === 0) { peg$fail(peg$e49); }
4180
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
4159
4181
  }
4160
4182
  while (s1 !== peg$FAILED) {
4161
4183
  s0.push(s1);
@@ -4164,12 +4186,12 @@ function peg$parse(input, options) {
4164
4186
  peg$currPos++;
4165
4187
  } else {
4166
4188
  s1 = peg$FAILED;
4167
- if (peg$silentFails === 0) { peg$fail(peg$e49); }
4189
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
4168
4190
  }
4169
4191
  }
4170
4192
  peg$silentFails--;
4171
4193
  s1 = peg$FAILED;
4172
- if (peg$silentFails === 0) { peg$fail(peg$e54); }
4194
+ if (peg$silentFails === 0) { peg$fail(peg$e56); }
4173
4195
 
4174
4196
  return s0;
4175
4197
  }
@@ -4184,7 +4206,7 @@ function peg$parse(input, options) {
4184
4206
  peg$currPos++;
4185
4207
  } else {
4186
4208
  s1 = peg$FAILED;
4187
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
4209
+ if (peg$silentFails === 0) { peg$fail(peg$e58); }
4188
4210
  }
4189
4211
  if (s1 !== peg$FAILED) {
4190
4212
  while (s1 !== peg$FAILED) {
@@ -4194,7 +4216,7 @@ function peg$parse(input, options) {
4194
4216
  peg$currPos++;
4195
4217
  } else {
4196
4218
  s1 = peg$FAILED;
4197
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
4219
+ if (peg$silentFails === 0) { peg$fail(peg$e58); }
4198
4220
  }
4199
4221
  }
4200
4222
  } else {
@@ -4203,7 +4225,7 @@ function peg$parse(input, options) {
4203
4225
  peg$silentFails--;
4204
4226
  if (s0 === peg$FAILED) {
4205
4227
  s1 = peg$FAILED;
4206
- if (peg$silentFails === 0) { peg$fail(peg$e55); }
4228
+ if (peg$silentFails === 0) { peg$fail(peg$e57); }
4207
4229
  }
4208
4230
 
4209
4231
  return s0;
@@ -4219,7 +4241,7 @@ function peg$parse(input, options) {
4219
4241
  peg$currPos++;
4220
4242
  } else {
4221
4243
  s1 = peg$FAILED;
4222
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
4244
+ if (peg$silentFails === 0) { peg$fail(peg$e58); }
4223
4245
  }
4224
4246
  while (s1 !== peg$FAILED) {
4225
4247
  s0.push(s1);
@@ -4228,12 +4250,12 @@ function peg$parse(input, options) {
4228
4250
  peg$currPos++;
4229
4251
  } else {
4230
4252
  s1 = peg$FAILED;
4231
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
4253
+ if (peg$silentFails === 0) { peg$fail(peg$e58); }
4232
4254
  }
4233
4255
  }
4234
4256
  peg$silentFails--;
4235
4257
  s1 = peg$FAILED;
4236
- if (peg$silentFails === 0) { peg$fail(peg$e57); }
4258
+ if (peg$silentFails === 0) { peg$fail(peg$e59); }
4237
4259
 
4238
4260
  return s0;
4239
4261
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@retorquere/bibtex-parser",
3
- "version": "6.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "BibTeX parser",
5
5
  "main": "index.js",
6
6
  "scripts": {