@retorquere/bibtex-parser 7.0.11 → 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.
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;
@@ -194,18 +195,16 @@ function peg$parse(input, options) {
194
195
  var peg$c15 = "\\]";
195
196
  var peg$c16 = "%";
196
197
  var peg$c17 = "\\\\";
197
- var peg$c18 = "\r";
198
- var peg$c19 = "\n";
199
- var peg$c20 = "newcommand";
200
- var peg$c21 = "url";
201
- var peg$c22 = "href";
202
- var peg$c23 = "\\verb";
203
- var peg$c24 = "begin";
204
- var peg$c25 = "end";
205
- var peg$c26 = "[";
206
- var peg$c27 = "]";
207
- var peg$c28 = "=";
208
- var peg$c29 = "#";
198
+ var peg$c18 = "newcommand";
199
+ var peg$c19 = "url";
200
+ var peg$c20 = "href";
201
+ var peg$c21 = "\\verb";
202
+ var peg$c22 = "begin";
203
+ var peg$c23 = "end";
204
+ var peg$c24 = "[";
205
+ var peg$c25 = "]";
206
+ var peg$c26 = "=";
207
+ var peg$c27 = "#";
209
208
 
210
209
  var peg$r0 = /^[^\n\r]/;
211
210
  var peg$r1 = /^[\n\r]/;
@@ -270,37 +269,35 @@ function peg$parse(input, options) {
270
269
  var peg$e31 = peg$literalExpectation("%", false);
271
270
  var peg$e32 = peg$classExpectation(["\r", "\n"], true, false);
272
271
  var peg$e33 = peg$literalExpectation("\\\\", false);
273
- var peg$e34 = peg$literalExpectation("\r", false);
274
- var peg$e35 = peg$literalExpectation("\n", false);
275
- var peg$e36 = peg$classExpectation(["_", "^"], false, false);
276
- var peg$e37 = peg$classExpectation([["A", "Z"], ["a", "z"], ["0", "9"], "[", "]", "\t", "\r", "\n"], true, false);
277
- var peg$e38 = peg$literalExpectation("newcommand", false);
278
- var peg$e39 = peg$literalExpectation("url", false);
279
- var peg$e40 = peg$literalExpectation("href", false);
280
- var peg$e41 = peg$literalExpectation("\\verb", false);
281
- var peg$e42 = peg$anyExpectation();
282
- var peg$e43 = peg$literalExpectation("begin", false);
283
- var peg$e44 = peg$literalExpectation("end", false);
284
- var peg$e45 = peg$classExpectation([["A", "Z"], ["a", "z"]], false, false);
285
- var peg$e46 = peg$literalExpectation("[", false);
286
- var peg$e47 = peg$classExpectation(["]"], true, false);
287
- var peg$e48 = peg$literalExpectation("]", false);
288
- var peg$e49 = peg$classExpectation([" ", "\t", "^", "_", "$", "{", "}", "\\"], true, false);
289
- var peg$e50 = peg$classExpectation([["a", "z"], ["A", "Z"], "-", "_"], false, false);
290
- var peg$e51 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "-", "&", "_", ":"], false, false);
291
- var peg$e52 = peg$classExpectation(["'", "`", "\"", "=", "~", "^", "."], false, false);
292
- var peg$e53 = peg$classExpectation(["'", "`", "\"", "=", "~", "^", ".", "c", "b", "u", "v", "d", "r", "H", "k"], false, false);
293
- var peg$e54 = peg$literalExpectation("=", false);
294
- var peg$e55 = peg$literalExpectation("#", false);
295
- var peg$e56 = peg$classExpectation(["\r", "\n"], false, false);
296
- var peg$e57 = peg$otherExpectation("Mandatory Horizontal Whitespace");
297
- var peg$e58 = peg$classExpectation([" ", "\t"], false, false);
298
- var peg$e59 = peg$otherExpectation("Optional Horizontal Whitespace");
299
- var peg$e60 = peg$otherExpectation("Mandatory Vertical Whitespace");
300
- var peg$e61 = peg$otherExpectation("Optional Vertical Whitespace");
301
- var peg$e62 = peg$otherExpectation("Mandatory Whitespace");
302
- var peg$e63 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false);
303
- var peg$e64 = peg$otherExpectation("Optional Whitespace");
272
+ var peg$e34 = peg$classExpectation(["_", "^"], false, false);
273
+ var peg$e35 = peg$classExpectation([["A", "Z"], ["a", "z"], ["0", "9"], "[", "]", "\t", "\r", "\n"], true, false);
274
+ var peg$e36 = peg$literalExpectation("newcommand", false);
275
+ var peg$e37 = peg$literalExpectation("url", false);
276
+ var peg$e38 = peg$literalExpectation("href", false);
277
+ var peg$e39 = peg$literalExpectation("\\verb", false);
278
+ var peg$e40 = peg$anyExpectation();
279
+ var peg$e41 = peg$literalExpectation("begin", false);
280
+ var peg$e42 = peg$literalExpectation("end", false);
281
+ var peg$e43 = peg$classExpectation([["A", "Z"], ["a", "z"]], false, false);
282
+ var peg$e44 = peg$literalExpectation("[", false);
283
+ var peg$e45 = peg$classExpectation(["]"], true, false);
284
+ var peg$e46 = peg$literalExpectation("]", false);
285
+ var peg$e47 = peg$classExpectation([" ", "\t", "^", "_", "$", "{", "}", "\\"], true, false);
286
+ var peg$e48 = peg$classExpectation([["a", "z"], ["A", "Z"], "-", "_"], false, false);
287
+ var peg$e49 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "-", "&", "_", ":"], false, false);
288
+ var peg$e50 = peg$classExpectation(["'", "`", "\"", "=", "~", "^", "."], false, false);
289
+ var peg$e51 = peg$classExpectation(["'", "`", "\"", "=", "~", "^", ".", "c", "b", "u", "v", "d", "r", "H", "k"], false, false);
290
+ var peg$e52 = peg$literalExpectation("=", false);
291
+ var peg$e53 = peg$literalExpectation("#", false);
292
+ var peg$e54 = peg$classExpectation(["\r", "\n"], false, false);
293
+ var peg$e55 = peg$otherExpectation("Mandatory Horizontal Whitespace");
294
+ var peg$e56 = peg$classExpectation([" ", "\t"], false, false);
295
+ var peg$e57 = peg$otherExpectation("Optional Horizontal Whitespace");
296
+ var peg$e58 = peg$otherExpectation("Mandatory Vertical Whitespace");
297
+ var peg$e59 = peg$otherExpectation("Optional Vertical Whitespace");
298
+ var peg$e60 = peg$otherExpectation("Mandatory Whitespace");
299
+ var peg$e61 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false);
300
+ var peg$e62 = peg$otherExpectation("Optional Whitespace");
304
301
 
305
302
  var peg$f0 = function(r) {
306
303
  return {
@@ -440,8 +437,8 @@ function peg$parse(input, options) {
440
437
  var peg$f23 = function(v) {
441
438
  return v.reduce((a, b) => a.concat(b), []);
442
439
  };
443
- var peg$f24 = function(v) { return v; };
444
- var peg$f25 = function(v) { return v; };
440
+ var peg$f24 = function(v) { return parBreak(v); };
441
+ var peg$f25 = function(v) { return parBreak(v); };
445
442
  var peg$f26 = function(v) { return v; };
446
443
  var peg$f27 = function(v) { return v; };
447
444
  var peg$f28 = function(v) {
@@ -449,7 +446,7 @@ function peg$parse(input, options) {
449
446
  kind: 'Text',
450
447
  loc: location(),
451
448
  source: text(),
452
- value: normalizeWhitespace(v),
449
+ value: v,
453
450
  mode: math.on ? 'math' : 'text',
454
451
  })
455
452
  };
@@ -458,7 +455,7 @@ function peg$parse(input, options) {
458
455
  kind: 'Text',
459
456
  loc: location(),
460
457
  source: text(),
461
- value: normalizeWhitespace(v),
458
+ value: v,
462
459
  mode: math.on ? 'math' : 'text',
463
460
  })
464
461
  };
@@ -540,6 +537,8 @@ function peg$parse(input, options) {
540
537
  }
541
538
  }
542
539
 
540
+ block.value = parBreak(block.value)
541
+
543
542
  return handle_markup_switches(block)
544
543
  };
545
544
  var peg$f36 = function() { return !math.on };
@@ -575,19 +574,7 @@ function peg$parse(input, options) {
575
574
  },
576
575
  }
577
576
  };
578
- var peg$f42 = function() {
579
- return {
580
- kind: 'RegularCommand',
581
- loc: location(),
582
- source: text(),
583
- command: 'par',
584
- arguments: {
585
- optional: [],
586
- required: [],
587
- },
588
- }
589
- };
590
- var peg$f43 = function(mode, v) {
577
+ var peg$f42 = function(mode, v) {
591
578
  if (v.kind === 'Block') v = v.value
592
579
 
593
580
  return {
@@ -597,7 +584,7 @@ function peg$parse(input, options) {
597
584
  value: v,
598
585
  }
599
586
  };
600
- var peg$f44 = function(mark, chr) {
587
+ var peg$f43 = function(mark, chr) {
601
588
  return {
602
589
  kind: 'DiacriticCommand',
603
590
  loc: location(),
@@ -607,7 +594,7 @@ function peg$parse(input, options) {
607
594
  character: chr[1] || chr[0],
608
595
  }
609
596
  };
610
- var peg$f45 = function(mark, chr) {
597
+ var peg$f44 = function(mark, chr) {
611
598
  return {
612
599
  kind: 'DiacriticCommand',
613
600
  loc: location(),
@@ -617,7 +604,7 @@ function peg$parse(input, options) {
617
604
  character: chr[1] || chr[0],
618
605
  }
619
606
  };
620
- var peg$f46 = function(mark, v) {
607
+ var peg$f45 = function(mark, v) {
621
608
  return {
622
609
  kind: 'RegularCommand',
623
610
  loc: location(),
@@ -629,7 +616,7 @@ function peg$parse(input, options) {
629
616
  },
630
617
  }
631
618
  };
632
- var peg$f47 = function(v) {
619
+ var peg$f46 = function(v) {
633
620
  return {
634
621
  kind: 'SymbolCommand',
635
622
  loc: location(),
@@ -637,8 +624,8 @@ function peg$parse(input, options) {
637
624
  command: v,
638
625
  }
639
626
  };
640
- var peg$f48 = function(cmd, name) { return name.value.length == 1 && name.value[0].kind === 'RegularCommand' };
641
- var peg$f49 = function(cmd, name, optional, def) {
627
+ var peg$f47 = function(cmd, name) { return name.value.length == 1 && name.value[0].kind === 'RegularCommand' };
628
+ var peg$f48 = function(cmd, name, optional, def) {
642
629
  return {
643
630
  kind: 'RegularCommand',
644
631
  loc: location(),
@@ -650,7 +637,7 @@ function peg$parse(input, options) {
650
637
  },
651
638
  }
652
639
  };
653
- var peg$f50 = function(cmd, url) {
640
+ var peg$f49 = function(cmd, url) {
654
641
  // https://github.com/retorquere/zotero-better-bibtex/issues/2617
655
642
  url.value = url.value.replace(/\\([\#%])/g, '$1')
656
643
  return {
@@ -664,7 +651,7 @@ function peg$parse(input, options) {
664
651
  },
665
652
  }
666
653
  };
667
- var peg$f51 = function(cmd, url, label) {
654
+ var peg$f50 = function(cmd, url, label) {
668
655
  // https://github.com/retorquere/zotero-better-bibtex/issues/2617
669
656
  url.value = url.value.replace(/\\([\#%])/g, '$1')
670
657
  return {
@@ -678,9 +665,9 @@ function peg$parse(input, options) {
678
665
  },
679
666
  }
680
667
  };
681
- var peg$f52 = function(delim) { return verbatim.set(delim) };
682
- var peg$f53 = function(delim, v) { return verbatim.set('') };
683
- var peg$f54 = function(delim, v) {
668
+ var peg$f51 = function(delim) { return verbatim.set(delim) };
669
+ var peg$f52 = function(delim, v) { return verbatim.set('') };
670
+ var peg$f53 = function(delim, v) {
684
671
  return basicTextConversions({
685
672
  kind: 'Text',
686
673
  loc: location(),
@@ -689,8 +676,8 @@ function peg$parse(input, options) {
689
676
  mode: 'verbatim',
690
677
  })
691
678
  };
692
- var peg$f55 = function(cmd) { return verbatimCommands.includes(cmd) && (has_arguments[cmd] === 2) };
693
- var peg$f56 = function(cmd, optional, req1, req2) {
679
+ var peg$f54 = function(cmd) { return verbatimCommands.includes(cmd) && (has_arguments[cmd] === 2) };
680
+ var peg$f55 = function(cmd, optional, req1, req2) {
694
681
  return {
695
682
  kind: 'RegularCommand',
696
683
  loc: location(),
@@ -702,8 +689,8 @@ function peg$parse(input, options) {
702
689
  },
703
690
  }
704
691
  };
705
- var peg$f57 = function(cmd) { return verbatimCommands.includes(cmd) && (has_arguments[cmd] === 1) };
706
- var peg$f58 = function(cmd, optional, req) {
692
+ var peg$f56 = function(cmd) { return verbatimCommands.includes(cmd) && (has_arguments[cmd] === 1) };
693
+ var peg$f57 = function(cmd, optional, req) {
707
694
  return {
708
695
  kind: 'RegularCommand',
709
696
  loc: location(),
@@ -715,8 +702,8 @@ function peg$parse(input, options) {
715
702
  },
716
703
  }
717
704
  };
718
- var peg$f59 = function(cmd) { return (has_arguments[cmd] === 2) };
719
- var peg$f60 = function(cmd, optional, req1, req2) {
705
+ var peg$f58 = function(cmd) { return (has_arguments[cmd] === 2) };
706
+ var peg$f59 = function(cmd, optional, req1, req2) {
720
707
  return {
721
708
  kind: 'RegularCommand',
722
709
  loc: location(),
@@ -728,8 +715,8 @@ function peg$parse(input, options) {
728
715
  },
729
716
  }
730
717
  };
731
- var peg$f61 = function(cmd) { return (has_arguments[cmd] === 1) };
732
- var peg$f62 = function(cmd, optional, req) {
718
+ var peg$f60 = function(cmd) { return (has_arguments[cmd] === 1) };
719
+ var peg$f61 = function(cmd, optional, req) {
733
720
  let m
734
721
  if (req.kind === 'Block') {
735
722
  switch (cmd) {
@@ -779,7 +766,7 @@ function peg$parse(input, options) {
779
766
  }
780
767
  }
781
768
  };
782
- var peg$f63 = function(cmd, optional) {
769
+ var peg$f62 = function(cmd, optional) {
783
770
  return {
784
771
  kind: 'RegularCommand',
785
772
  loc: location(),
@@ -791,9 +778,9 @@ function peg$parse(input, options) {
791
778
  }
792
779
  }
793
780
  };
794
- var peg$f64 = function(char) { return char !== verbatim.delim };
795
- var peg$f65 = function(char) { return char };
796
- var peg$f66 = function(char) {
781
+ var peg$f63 = function(char) { return char !== verbatim.delim };
782
+ var peg$f64 = function(char) { return char };
783
+ var peg$f65 = function(char) {
797
784
  return basicTextConversions({
798
785
  kind: 'Text',
799
786
  loc: location(),
@@ -802,7 +789,7 @@ function peg$parse(input, options) {
802
789
  mode: math.on ? 'math' : 'text',
803
790
  })
804
791
  };
805
- var peg$f67 = function(v) {
792
+ var peg$f66 = function(v) {
806
793
  return basicTextConversions({
807
794
  kind: 'Text', // this isn't really correct but I don't need these right now
808
795
  loc: location(),
@@ -811,26 +798,26 @@ function peg$parse(input, options) {
811
798
  mode: math.on ? 'math' : 'text',
812
799
  })
813
800
  };
814
- var peg$f68 = function(v) {
801
+ var peg$f67 = function(v) {
815
802
  return basicTextConversions({
816
803
  kind: 'Text',
817
804
  loc: location(),
818
805
  source: text(),
819
- value: normalizeWhitespace([v]),
806
+ value: normalizeWhitespace(v),
820
807
  mode: math.on ? 'math' : 'text',
821
808
  })
822
809
  };
823
- var peg$f69 = function(v) { return v };
824
- var peg$currPos = 0;
825
- var peg$savedPos = 0;
810
+ var peg$f68 = function(v) { return v };
811
+ var peg$currPos = options.peg$currPos | 0;
812
+ var peg$savedPos = peg$currPos;
826
813
  var peg$posDetailsCache = [{ line: 1, column: 1 }];
827
- var peg$maxFailPos = 0;
828
- var peg$maxFailExpected = [];
829
- 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;
830
817
 
831
818
  var peg$result;
832
819
 
833
- if ("startRule" in options) {
820
+ if (options.startRule) {
834
821
  if (!(options.startRule in peg$startRuleFunctions)) {
835
822
  throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
836
823
  }
@@ -905,9 +892,11 @@ function peg$parse(input, options) {
905
892
  if (details) {
906
893
  return details;
907
894
  } else {
908
- p = pos - 1;
909
- while (!peg$posDetailsCache[p]) {
910
- p--;
895
+ if (pos >= peg$posDetailsCache.length) {
896
+ p = peg$posDetailsCache.length - 1;
897
+ } else {
898
+ p = pos;
899
+ while (!peg$posDetailsCache[--p]) {}
911
900
  }
912
901
 
913
902
  details = peg$posDetailsCache[p];
@@ -1012,8 +1001,8 @@ function peg$parse(input, options) {
1012
1001
  }
1013
1002
  if (s1 !== peg$FAILED) {
1014
1003
  s2 = peg$parse__();
1015
- if (input.substr(peg$currPos, 7).toLowerCase() === peg$c1) {
1016
- s3 = input.substr(peg$currPos, 7);
1004
+ s3 = input.substr(peg$currPos, 7);
1005
+ if (s3.toLowerCase() === peg$c1) {
1017
1006
  peg$currPos += 7;
1018
1007
  } else {
1019
1008
  s3 = peg$FAILED;
@@ -1048,8 +1037,8 @@ function peg$parse(input, options) {
1048
1037
  }
1049
1038
  if (s1 !== peg$FAILED) {
1050
1039
  s2 = peg$parse__();
1051
- if (input.substr(peg$currPos, 7).toLowerCase() === peg$c1) {
1052
- s3 = input.substr(peg$currPos, 7);
1040
+ s3 = input.substr(peg$currPos, 7);
1041
+ if (s3.toLowerCase() === peg$c1) {
1053
1042
  peg$currPos += 7;
1054
1043
  } else {
1055
1044
  s3 = peg$FAILED;
@@ -1057,27 +1046,29 @@ function peg$parse(input, options) {
1057
1046
  }
1058
1047
  if (s3 !== peg$FAILED) {
1059
1048
  s4 = peg$parse__h();
1060
- s5 = [];
1061
- if (peg$r0.test(input.charAt(peg$currPos))) {
1062
- s6 = input.charAt(peg$currPos);
1049
+ s5 = peg$currPos;
1050
+ s6 = [];
1051
+ s7 = input.charAt(peg$currPos);
1052
+ if (peg$r0.test(s7)) {
1063
1053
  peg$currPos++;
1064
1054
  } else {
1065
- s6 = peg$FAILED;
1055
+ s7 = peg$FAILED;
1066
1056
  if (peg$silentFails === 0) { peg$fail(peg$e2); }
1067
1057
  }
1068
- while (s6 !== peg$FAILED) {
1069
- s5.push(s6);
1070
- if (peg$r0.test(input.charAt(peg$currPos))) {
1071
- s6 = input.charAt(peg$currPos);
1058
+ while (s7 !== peg$FAILED) {
1059
+ s6.push(s7);
1060
+ s7 = input.charAt(peg$currPos);
1061
+ if (peg$r0.test(s7)) {
1072
1062
  peg$currPos++;
1073
1063
  } else {
1074
- s6 = peg$FAILED;
1064
+ s7 = peg$FAILED;
1075
1065
  if (peg$silentFails === 0) { peg$fail(peg$e2); }
1076
1066
  }
1077
1067
  }
1068
+ s5 = input.substring(s5, peg$currPos);
1078
1069
  s6 = [];
1079
- if (peg$r1.test(input.charAt(peg$currPos))) {
1080
- s7 = input.charAt(peg$currPos);
1070
+ s7 = input.charAt(peg$currPos);
1071
+ if (peg$r1.test(s7)) {
1081
1072
  peg$currPos++;
1082
1073
  } else {
1083
1074
  s7 = peg$FAILED;
@@ -1085,8 +1076,8 @@ function peg$parse(input, options) {
1085
1076
  }
1086
1077
  while (s7 !== peg$FAILED) {
1087
1078
  s6.push(s7);
1088
- if (peg$r1.test(input.charAt(peg$currPos))) {
1089
- s7 = input.charAt(peg$currPos);
1079
+ s7 = input.charAt(peg$currPos);
1080
+ if (peg$r1.test(s7)) {
1090
1081
  peg$currPos++;
1091
1082
  } else {
1092
1083
  s7 = peg$FAILED;
@@ -1106,42 +1097,48 @@ function peg$parse(input, options) {
1106
1097
  if (s0 === peg$FAILED) {
1107
1098
  s0 = peg$currPos;
1108
1099
  s1 = peg$currPos;
1109
- if (peg$r2.test(input.charAt(peg$currPos))) {
1110
- s2 = input.charAt(peg$currPos);
1100
+ s2 = peg$currPos;
1101
+ s3 = input.charAt(peg$currPos);
1102
+ if (peg$r2.test(s3)) {
1111
1103
  peg$currPos++;
1112
1104
  } else {
1113
- s2 = peg$FAILED;
1105
+ s3 = peg$FAILED;
1114
1106
  if (peg$silentFails === 0) { peg$fail(peg$e4); }
1115
1107
  }
1116
- if (s2 !== peg$FAILED) {
1117
- s3 = [];
1118
- if (peg$r0.test(input.charAt(peg$currPos))) {
1119
- s4 = input.charAt(peg$currPos);
1108
+ if (s3 !== peg$FAILED) {
1109
+ s4 = [];
1110
+ s5 = input.charAt(peg$currPos);
1111
+ if (peg$r0.test(s5)) {
1120
1112
  peg$currPos++;
1121
1113
  } else {
1122
- s4 = peg$FAILED;
1114
+ s5 = peg$FAILED;
1123
1115
  if (peg$silentFails === 0) { peg$fail(peg$e2); }
1124
1116
  }
1125
- while (s4 !== peg$FAILED) {
1126
- s3.push(s4);
1127
- if (peg$r0.test(input.charAt(peg$currPos))) {
1128
- s4 = input.charAt(peg$currPos);
1117
+ while (s5 !== peg$FAILED) {
1118
+ s4.push(s5);
1119
+ s5 = input.charAt(peg$currPos);
1120
+ if (peg$r0.test(s5)) {
1129
1121
  peg$currPos++;
1130
1122
  } else {
1131
- s4 = peg$FAILED;
1123
+ s5 = peg$FAILED;
1132
1124
  if (peg$silentFails === 0) { peg$fail(peg$e2); }
1133
1125
  }
1134
1126
  }
1135
- s2 = [s2, s3];
1136
- s1 = s2;
1127
+ s3 = [s3, s4];
1128
+ s2 = s3;
1137
1129
  } else {
1138
- peg$currPos = s1;
1139
- s1 = peg$FAILED;
1130
+ peg$currPos = s2;
1131
+ s2 = peg$FAILED;
1132
+ }
1133
+ if (s2 !== peg$FAILED) {
1134
+ s1 = input.substring(s1, peg$currPos);
1135
+ } else {
1136
+ s1 = s2;
1140
1137
  }
1141
1138
  if (s1 !== peg$FAILED) {
1142
1139
  s2 = [];
1143
- if (peg$r1.test(input.charAt(peg$currPos))) {
1144
- s3 = input.charAt(peg$currPos);
1140
+ s3 = input.charAt(peg$currPos);
1141
+ if (peg$r1.test(s3)) {
1145
1142
  peg$currPos++;
1146
1143
  } else {
1147
1144
  s3 = peg$FAILED;
@@ -1149,8 +1146,8 @@ function peg$parse(input, options) {
1149
1146
  }
1150
1147
  while (s3 !== peg$FAILED) {
1151
1148
  s2.push(s3);
1152
- if (peg$r1.test(input.charAt(peg$currPos))) {
1153
- s3 = input.charAt(peg$currPos);
1149
+ s3 = input.charAt(peg$currPos);
1150
+ if (peg$r1.test(s3)) {
1154
1151
  peg$currPos++;
1155
1152
  } else {
1156
1153
  s3 = peg$FAILED;
@@ -1205,8 +1202,8 @@ function peg$parse(input, options) {
1205
1202
  }
1206
1203
  if (s1 !== peg$FAILED) {
1207
1204
  s2 = [];
1208
- if (peg$r3.test(input.charAt(peg$currPos))) {
1209
- s3 = input.charAt(peg$currPos);
1205
+ s3 = input.charAt(peg$currPos);
1206
+ if (peg$r3.test(s3)) {
1210
1207
  peg$currPos++;
1211
1208
  } else {
1212
1209
  s3 = peg$FAILED;
@@ -1217,8 +1214,8 @@ function peg$parse(input, options) {
1217
1214
  }
1218
1215
  while (s3 !== peg$FAILED) {
1219
1216
  s2.push(s3);
1220
- if (peg$r3.test(input.charAt(peg$currPos))) {
1221
- s3 = input.charAt(peg$currPos);
1217
+ s3 = input.charAt(peg$currPos);
1218
+ if (peg$r3.test(s3)) {
1222
1219
  peg$currPos++;
1223
1220
  } else {
1224
1221
  s3 = peg$FAILED;
@@ -1265,8 +1262,8 @@ function peg$parse(input, options) {
1265
1262
  s2 = peg$parse__();
1266
1263
  s3 = peg$currPos;
1267
1264
  s4 = [];
1268
- if (peg$r4.test(input.charAt(peg$currPos))) {
1269
- s5 = input.charAt(peg$currPos);
1265
+ s5 = input.charAt(peg$currPos);
1266
+ if (peg$r4.test(s5)) {
1270
1267
  peg$currPos++;
1271
1268
  } else {
1272
1269
  s5 = peg$FAILED;
@@ -1275,8 +1272,8 @@ function peg$parse(input, options) {
1275
1272
  if (s5 !== peg$FAILED) {
1276
1273
  while (s5 !== peg$FAILED) {
1277
1274
  s4.push(s5);
1278
- if (peg$r4.test(input.charAt(peg$currPos))) {
1279
- s5 = input.charAt(peg$currPos);
1275
+ s5 = input.charAt(peg$currPos);
1276
+ if (peg$r4.test(s5)) {
1280
1277
  peg$currPos++;
1281
1278
  } else {
1282
1279
  s5 = peg$FAILED;
@@ -1293,8 +1290,8 @@ function peg$parse(input, options) {
1293
1290
  }
1294
1291
  if (s3 !== peg$FAILED) {
1295
1292
  s4 = peg$parse__();
1296
- if (peg$r5.test(input.charAt(peg$currPos))) {
1297
- s5 = input.charAt(peg$currPos);
1293
+ s5 = input.charAt(peg$currPos);
1294
+ if (peg$r5.test(s5)) {
1298
1295
  peg$currPos++;
1299
1296
  } else {
1300
1297
  s5 = peg$FAILED;
@@ -1314,8 +1311,8 @@ function peg$parse(input, options) {
1314
1311
  s10 = peg$parseField();
1315
1312
  }
1316
1313
  s10 = peg$parse__();
1317
- if (peg$r6.test(input.charAt(peg$currPos))) {
1318
- s11 = input.charAt(peg$currPos);
1314
+ s11 = input.charAt(peg$currPos);
1315
+ if (peg$r6.test(s11)) {
1319
1316
  peg$currPos++;
1320
1317
  } else {
1321
1318
  s11 = peg$FAILED;
@@ -1358,8 +1355,8 @@ function peg$parse(input, options) {
1358
1355
  }
1359
1356
  if (s1 !== peg$FAILED) {
1360
1357
  s2 = peg$parse__();
1361
- if (input.substr(peg$currPos, 8).toLowerCase() === peg$c4) {
1362
- s3 = input.substr(peg$currPos, 8);
1358
+ s3 = input.substr(peg$currPos, 8);
1359
+ if (s3.toLowerCase() === peg$c4) {
1363
1360
  peg$currPos += 8;
1364
1361
  } else {
1365
1362
  s3 = peg$FAILED;
@@ -1367,8 +1364,8 @@ function peg$parse(input, options) {
1367
1364
  }
1368
1365
  if (s3 !== peg$FAILED) {
1369
1366
  s4 = peg$parse__();
1370
- if (peg$r5.test(input.charAt(peg$currPos))) {
1371
- s5 = input.charAt(peg$currPos);
1367
+ s5 = input.charAt(peg$currPos);
1368
+ if (peg$r5.test(s5)) {
1372
1369
  peg$currPos++;
1373
1370
  } else {
1374
1371
  s5 = peg$FAILED;
@@ -1407,8 +1404,8 @@ function peg$parse(input, options) {
1407
1404
  }
1408
1405
  }
1409
1406
  s8 = peg$parse__();
1410
- if (peg$r6.test(input.charAt(peg$currPos))) {
1411
- s9 = input.charAt(peg$currPos);
1407
+ s9 = input.charAt(peg$currPos);
1408
+ if (peg$r6.test(s9)) {
1412
1409
  peg$currPos++;
1413
1410
  } else {
1414
1411
  s9 = peg$FAILED;
@@ -1451,8 +1448,8 @@ function peg$parse(input, options) {
1451
1448
  }
1452
1449
  if (s1 !== peg$FAILED) {
1453
1450
  s2 = peg$parse__();
1454
- if (input.substr(peg$currPos, 6).toLowerCase() === peg$c5) {
1455
- s3 = input.substr(peg$currPos, 6);
1451
+ s3 = input.substr(peg$currPos, 6);
1452
+ if (s3.toLowerCase() === peg$c5) {
1456
1453
  peg$currPos += 6;
1457
1454
  } else {
1458
1455
  s3 = peg$FAILED;
@@ -1460,8 +1457,8 @@ function peg$parse(input, options) {
1460
1457
  }
1461
1458
  if (s3 !== peg$FAILED) {
1462
1459
  s4 = peg$parse__();
1463
- if (peg$r5.test(input.charAt(peg$currPos))) {
1464
- s5 = input.charAt(peg$currPos);
1460
+ s5 = input.charAt(peg$currPos);
1461
+ if (peg$r5.test(s5)) {
1465
1462
  peg$currPos++;
1466
1463
  } else {
1467
1464
  s5 = peg$FAILED;
@@ -1485,8 +1482,8 @@ function peg$parse(input, options) {
1485
1482
  }
1486
1483
  if (s9 !== peg$FAILED) {
1487
1484
  s10 = peg$parse__();
1488
- if (peg$r6.test(input.charAt(peg$currPos))) {
1489
- s11 = input.charAt(peg$currPos);
1485
+ s11 = input.charAt(peg$currPos);
1486
+ if (peg$r6.test(s11)) {
1490
1487
  peg$currPos++;
1491
1488
  } else {
1492
1489
  s11 = peg$FAILED;
@@ -1535,8 +1532,8 @@ function peg$parse(input, options) {
1535
1532
  s1 = peg$parse__();
1536
1533
  s2 = peg$currPos;
1537
1534
  s3 = [];
1538
- if (peg$r7.test(input.charAt(peg$currPos))) {
1539
- s4 = input.charAt(peg$currPos);
1535
+ s4 = input.charAt(peg$currPos);
1536
+ if (peg$r7.test(s4)) {
1540
1537
  peg$currPos++;
1541
1538
  } else {
1542
1539
  s4 = peg$FAILED;
@@ -1544,8 +1541,8 @@ function peg$parse(input, options) {
1544
1541
  }
1545
1542
  while (s4 !== peg$FAILED) {
1546
1543
  s3.push(s4);
1547
- if (peg$r7.test(input.charAt(peg$currPos))) {
1548
- s4 = input.charAt(peg$currPos);
1544
+ s4 = input.charAt(peg$currPos);
1545
+ if (peg$r7.test(s4)) {
1549
1546
  peg$currPos++;
1550
1547
  } else {
1551
1548
  s4 = peg$FAILED;
@@ -1740,8 +1737,8 @@ function peg$parse(input, options) {
1740
1737
  s1 = peg$parse__();
1741
1738
  s2 = peg$currPos;
1742
1739
  s3 = [];
1743
- if (peg$r8.test(input.charAt(peg$currPos))) {
1744
- s4 = input.charAt(peg$currPos);
1740
+ s4 = input.charAt(peg$currPos);
1741
+ if (peg$r8.test(s4)) {
1745
1742
  peg$currPos++;
1746
1743
  } else {
1747
1744
  s4 = peg$FAILED;
@@ -1750,8 +1747,8 @@ function peg$parse(input, options) {
1750
1747
  if (s4 !== peg$FAILED) {
1751
1748
  while (s4 !== peg$FAILED) {
1752
1749
  s3.push(s4);
1753
- if (peg$r8.test(input.charAt(peg$currPos))) {
1754
- s4 = input.charAt(peg$currPos);
1750
+ s4 = input.charAt(peg$currPos);
1751
+ if (peg$r8.test(s4)) {
1755
1752
  peg$currPos++;
1756
1753
  } else {
1757
1754
  s4 = peg$FAILED;
@@ -1856,8 +1853,8 @@ function peg$parse(input, options) {
1856
1853
  s0 = peg$currPos;
1857
1854
  s1 = peg$currPos;
1858
1855
  s2 = [];
1859
- if (peg$r3.test(input.charAt(peg$currPos))) {
1860
- s3 = input.charAt(peg$currPos);
1856
+ s3 = input.charAt(peg$currPos);
1857
+ if (peg$r3.test(s3)) {
1861
1858
  peg$currPos++;
1862
1859
  } else {
1863
1860
  s3 = peg$FAILED;
@@ -1866,8 +1863,8 @@ function peg$parse(input, options) {
1866
1863
  if (s3 !== peg$FAILED) {
1867
1864
  while (s3 !== peg$FAILED) {
1868
1865
  s2.push(s3);
1869
- if (peg$r3.test(input.charAt(peg$currPos))) {
1870
- s3 = input.charAt(peg$currPos);
1866
+ s3 = input.charAt(peg$currPos);
1867
+ if (peg$r3.test(s3)) {
1871
1868
  peg$currPos++;
1872
1869
  } else {
1873
1870
  s3 = peg$FAILED;
@@ -1934,8 +1931,8 @@ function peg$parse(input, options) {
1934
1931
  s0 = peg$currPos;
1935
1932
  s1 = peg$currPos;
1936
1933
  s2 = [];
1937
- if (peg$r9.test(input.charAt(peg$currPos))) {
1938
- s3 = input.charAt(peg$currPos);
1934
+ s3 = input.charAt(peg$currPos);
1935
+ if (peg$r9.test(s3)) {
1939
1936
  peg$currPos++;
1940
1937
  } else {
1941
1938
  s3 = peg$FAILED;
@@ -1944,8 +1941,8 @@ function peg$parse(input, options) {
1944
1941
  if (s3 !== peg$FAILED) {
1945
1942
  while (s3 !== peg$FAILED) {
1946
1943
  s2.push(s3);
1947
- if (peg$r9.test(input.charAt(peg$currPos))) {
1948
- s3 = input.charAt(peg$currPos);
1944
+ s3 = input.charAt(peg$currPos);
1945
+ if (peg$r9.test(s3)) {
1949
1946
  peg$currPos++;
1950
1947
  } else {
1951
1948
  s3 = peg$FAILED;
@@ -2210,30 +2207,36 @@ function peg$parse(input, options) {
2210
2207
  }
2211
2208
 
2212
2209
  function peg$parseText() {
2213
- var s0, s1, s2;
2210
+ var s0, s1, s2, s3;
2214
2211
 
2215
2212
  s0 = peg$currPos;
2216
- s1 = [];
2217
- if (peg$r10.test(input.charAt(peg$currPos))) {
2218
- s2 = input.charAt(peg$currPos);
2213
+ s1 = peg$currPos;
2214
+ s2 = [];
2215
+ s3 = input.charAt(peg$currPos);
2216
+ if (peg$r10.test(s3)) {
2219
2217
  peg$currPos++;
2220
2218
  } else {
2221
- s2 = peg$FAILED;
2219
+ s3 = peg$FAILED;
2222
2220
  if (peg$silentFails === 0) { peg$fail(peg$e18); }
2223
2221
  }
2224
- if (s2 !== peg$FAILED) {
2225
- while (s2 !== peg$FAILED) {
2226
- s1.push(s2);
2227
- if (peg$r10.test(input.charAt(peg$currPos))) {
2228
- s2 = input.charAt(peg$currPos);
2222
+ if (s3 !== peg$FAILED) {
2223
+ while (s3 !== peg$FAILED) {
2224
+ s2.push(s3);
2225
+ s3 = input.charAt(peg$currPos);
2226
+ if (peg$r10.test(s3)) {
2229
2227
  peg$currPos++;
2230
2228
  } else {
2231
- s2 = peg$FAILED;
2229
+ s3 = peg$FAILED;
2232
2230
  if (peg$silentFails === 0) { peg$fail(peg$e18); }
2233
2231
  }
2234
2232
  }
2235
2233
  } else {
2236
- s1 = peg$FAILED;
2234
+ s2 = peg$FAILED;
2235
+ }
2236
+ if (s2 !== peg$FAILED) {
2237
+ s1 = input.substring(s1, peg$currPos);
2238
+ } else {
2239
+ s1 = s2;
2237
2240
  }
2238
2241
  if (s1 !== peg$FAILED) {
2239
2242
  peg$savedPos = s0;
@@ -2245,30 +2248,36 @@ function peg$parse(input, options) {
2245
2248
  }
2246
2249
 
2247
2250
  function peg$parseTextNoQuotes() {
2248
- var s0, s1, s2;
2251
+ var s0, s1, s2, s3;
2249
2252
 
2250
2253
  s0 = peg$currPos;
2251
- s1 = [];
2252
- if (peg$r11.test(input.charAt(peg$currPos))) {
2253
- s2 = input.charAt(peg$currPos);
2254
+ s1 = peg$currPos;
2255
+ s2 = [];
2256
+ s3 = input.charAt(peg$currPos);
2257
+ if (peg$r11.test(s3)) {
2254
2258
  peg$currPos++;
2255
2259
  } else {
2256
- s2 = peg$FAILED;
2260
+ s3 = peg$FAILED;
2257
2261
  if (peg$silentFails === 0) { peg$fail(peg$e19); }
2258
2262
  }
2259
- if (s2 !== peg$FAILED) {
2260
- while (s2 !== peg$FAILED) {
2261
- s1.push(s2);
2262
- if (peg$r11.test(input.charAt(peg$currPos))) {
2263
- s2 = input.charAt(peg$currPos);
2263
+ if (s3 !== peg$FAILED) {
2264
+ while (s3 !== peg$FAILED) {
2265
+ s2.push(s3);
2266
+ s3 = input.charAt(peg$currPos);
2267
+ if (peg$r11.test(s3)) {
2264
2268
  peg$currPos++;
2265
2269
  } else {
2266
- s2 = peg$FAILED;
2270
+ s3 = peg$FAILED;
2267
2271
  if (peg$silentFails === 0) { peg$fail(peg$e19); }
2268
2272
  }
2269
2273
  }
2270
2274
  } else {
2271
- s1 = peg$FAILED;
2275
+ s2 = peg$FAILED;
2276
+ }
2277
+ if (s2 !== peg$FAILED) {
2278
+ s1 = input.substring(s1, peg$currPos);
2279
+ } else {
2280
+ s1 = s2;
2272
2281
  }
2273
2282
  if (s1 !== peg$FAILED) {
2274
2283
  peg$savedPos = s0;
@@ -2285,8 +2294,8 @@ function peg$parse(input, options) {
2285
2294
  s0 = peg$currPos;
2286
2295
  s1 = peg$currPos;
2287
2296
  s2 = [];
2288
- if (peg$r12.test(input.charAt(peg$currPos))) {
2289
- s3 = input.charAt(peg$currPos);
2297
+ s3 = input.charAt(peg$currPos);
2298
+ if (peg$r12.test(s3)) {
2290
2299
  peg$currPos++;
2291
2300
  } else {
2292
2301
  s3 = peg$FAILED;
@@ -2295,8 +2304,8 @@ function peg$parse(input, options) {
2295
2304
  if (s3 !== peg$FAILED) {
2296
2305
  while (s3 !== peg$FAILED) {
2297
2306
  s2.push(s3);
2298
- if (peg$r12.test(input.charAt(peg$currPos))) {
2299
- s3 = input.charAt(peg$currPos);
2307
+ s3 = input.charAt(peg$currPos);
2308
+ if (peg$r12.test(s3)) {
2300
2309
  peg$currPos++;
2301
2310
  } else {
2302
2311
  s3 = peg$FAILED;
@@ -2348,8 +2357,8 @@ function peg$parse(input, options) {
2348
2357
  if (s1 !== peg$FAILED) {
2349
2358
  s2 = peg$currPos;
2350
2359
  s3 = [];
2351
- if (peg$r13.test(input.charAt(peg$currPos))) {
2352
- s4 = input.charAt(peg$currPos);
2360
+ s4 = input.charAt(peg$currPos);
2361
+ if (peg$r13.test(s4)) {
2353
2362
  peg$currPos++;
2354
2363
  } else {
2355
2364
  s4 = peg$FAILED;
@@ -2358,8 +2367,8 @@ function peg$parse(input, options) {
2358
2367
  if (s4 !== peg$FAILED) {
2359
2368
  while (s4 !== peg$FAILED) {
2360
2369
  s3.push(s4);
2361
- if (peg$r13.test(input.charAt(peg$currPos))) {
2362
- s4 = input.charAt(peg$currPos);
2370
+ s4 = input.charAt(peg$currPos);
2371
+ if (peg$r13.test(s4)) {
2363
2372
  peg$currPos++;
2364
2373
  } else {
2365
2374
  s4 = peg$FAILED;
@@ -2423,8 +2432,8 @@ function peg$parse(input, options) {
2423
2432
  if (s5 !== peg$FAILED) {
2424
2433
  s6 = peg$currPos;
2425
2434
  s7 = [];
2426
- if (peg$r13.test(input.charAt(peg$currPos))) {
2427
- s8 = input.charAt(peg$currPos);
2435
+ s8 = input.charAt(peg$currPos);
2436
+ if (peg$r13.test(s8)) {
2428
2437
  peg$currPos++;
2429
2438
  } else {
2430
2439
  s8 = peg$FAILED;
@@ -2433,8 +2442,8 @@ function peg$parse(input, options) {
2433
2442
  if (s8 !== peg$FAILED) {
2434
2443
  while (s8 !== peg$FAILED) {
2435
2444
  s7.push(s8);
2436
- if (peg$r13.test(input.charAt(peg$currPos))) {
2437
- s8 = input.charAt(peg$currPos);
2445
+ s8 = input.charAt(peg$currPos);
2446
+ if (peg$r13.test(s8)) {
2438
2447
  peg$currPos++;
2439
2448
  } else {
2440
2449
  s8 = peg$FAILED;
@@ -2515,8 +2524,8 @@ function peg$parse(input, options) {
2515
2524
  s2 = peg$parseExtendedDiacritic();
2516
2525
  if (s2 !== peg$FAILED) {
2517
2526
  s3 = peg$parse__();
2518
- if (peg$r13.test(input.charAt(peg$currPos))) {
2519
- s4 = input.charAt(peg$currPos);
2527
+ s4 = input.charAt(peg$currPos);
2528
+ if (peg$r13.test(s4)) {
2520
2529
  peg$currPos++;
2521
2530
  } else {
2522
2531
  s4 = peg$FAILED;
@@ -2532,8 +2541,8 @@ function peg$parse(input, options) {
2532
2541
  if (peg$silentFails === 0) { peg$fail(peg$e25); }
2533
2542
  }
2534
2543
  if (s5 !== peg$FAILED) {
2535
- if (peg$r14.test(input.charAt(peg$currPos))) {
2536
- s6 = input.charAt(peg$currPos);
2544
+ s6 = input.charAt(peg$currPos);
2545
+ if (peg$r14.test(s6)) {
2537
2546
  peg$currPos++;
2538
2547
  } else {
2539
2548
  s6 = peg$FAILED;
@@ -2780,8 +2789,8 @@ function peg$parse(input, options) {
2780
2789
  s2 = peg$parse__h();
2781
2790
  s3 = peg$currPos;
2782
2791
  s4 = [];
2783
- if (peg$r15.test(input.charAt(peg$currPos))) {
2784
- s5 = input.charAt(peg$currPos);
2792
+ s5 = input.charAt(peg$currPos);
2793
+ if (peg$r15.test(s5)) {
2785
2794
  peg$currPos++;
2786
2795
  } else {
2787
2796
  s5 = peg$FAILED;
@@ -2790,8 +2799,8 @@ function peg$parse(input, options) {
2790
2799
  if (s5 !== peg$FAILED) {
2791
2800
  while (s5 !== peg$FAILED) {
2792
2801
  s4.push(s5);
2793
- if (peg$r15.test(input.charAt(peg$currPos))) {
2794
- s5 = input.charAt(peg$currPos);
2802
+ s5 = input.charAt(peg$currPos);
2803
+ if (peg$r15.test(s5)) {
2795
2804
  peg$currPos++;
2796
2805
  } else {
2797
2806
  s5 = peg$FAILED;
@@ -2843,16 +2852,13 @@ function peg$parse(input, options) {
2843
2852
  if (s0 === peg$FAILED) {
2844
2853
  s0 = peg$parseLineBreak();
2845
2854
  if (s0 === peg$FAILED) {
2846
- s0 = peg$parseParBreak();
2855
+ s0 = peg$parseDiacriticCommand();
2847
2856
  if (s0 === peg$FAILED) {
2848
- s0 = peg$parseDiacriticCommand();
2857
+ s0 = peg$parseRegularCommand();
2849
2858
  if (s0 === peg$FAILED) {
2850
- s0 = peg$parseRegularCommand();
2859
+ s0 = peg$parseSymbolCommand();
2851
2860
  if (s0 === peg$FAILED) {
2852
- s0 = peg$parseSymbolCommand();
2853
- if (s0 === peg$FAILED) {
2854
- s0 = peg$parseInvalidCommand();
2855
- }
2861
+ s0 = peg$parseInvalidCommand();
2856
2862
  }
2857
2863
  }
2858
2864
  }
@@ -2886,80 +2892,23 @@ function peg$parse(input, options) {
2886
2892
  return s0;
2887
2893
  }
2888
2894
 
2889
- function peg$parseParBreak() {
2890
- var s0, s1, s2, s3, s4, s5, s6, s7;
2891
-
2892
- s0 = peg$currPos;
2893
- s1 = peg$parse__h();
2894
- if (input.charCodeAt(peg$currPos) === 13) {
2895
- s2 = peg$c18;
2896
- peg$currPos++;
2897
- } else {
2898
- s2 = peg$FAILED;
2899
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
2900
- }
2901
- if (s2 === peg$FAILED) {
2902
- s2 = null;
2903
- }
2904
- if (input.charCodeAt(peg$currPos) === 10) {
2905
- s3 = peg$c19;
2906
- peg$currPos++;
2907
- } else {
2908
- s3 = peg$FAILED;
2909
- if (peg$silentFails === 0) { peg$fail(peg$e35); }
2910
- }
2911
- if (s3 !== peg$FAILED) {
2912
- s4 = peg$parse__h();
2913
- if (input.charCodeAt(peg$currPos) === 13) {
2914
- s5 = peg$c18;
2915
- peg$currPos++;
2916
- } else {
2917
- s5 = peg$FAILED;
2918
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
2919
- }
2920
- if (s5 === peg$FAILED) {
2921
- s5 = null;
2922
- }
2923
- if (input.charCodeAt(peg$currPos) === 10) {
2924
- s6 = peg$c19;
2925
- peg$currPos++;
2926
- } else {
2927
- s6 = peg$FAILED;
2928
- if (peg$silentFails === 0) { peg$fail(peg$e35); }
2929
- }
2930
- if (s6 !== peg$FAILED) {
2931
- s7 = peg$parse__();
2932
- peg$savedPos = s0;
2933
- s0 = peg$f42();
2934
- } else {
2935
- peg$currPos = s0;
2936
- s0 = peg$FAILED;
2937
- }
2938
- } else {
2939
- peg$currPos = s0;
2940
- s0 = peg$FAILED;
2941
- }
2942
-
2943
- return s0;
2944
- }
2945
-
2946
2895
  function peg$parseScriptCommand() {
2947
2896
  var s0, s1, s2, s3;
2948
2897
 
2949
2898
  s0 = peg$currPos;
2950
- if (peg$r16.test(input.charAt(peg$currPos))) {
2951
- s1 = input.charAt(peg$currPos);
2899
+ s1 = input.charAt(peg$currPos);
2900
+ if (peg$r16.test(s1)) {
2952
2901
  peg$currPos++;
2953
2902
  } else {
2954
2903
  s1 = peg$FAILED;
2955
- if (peg$silentFails === 0) { peg$fail(peg$e36); }
2904
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
2956
2905
  }
2957
2906
  if (s1 !== peg$FAILED) {
2958
2907
  s2 = peg$parse__h();
2959
2908
  s3 = peg$parseArgument();
2960
2909
  if (s3 !== peg$FAILED) {
2961
2910
  peg$savedPos = s0;
2962
- s0 = peg$f43(s1, s3);
2911
+ s0 = peg$f42(s1, s3);
2963
2912
  } else {
2964
2913
  peg$currPos = s0;
2965
2914
  s0 = peg$FAILED;
@@ -2987,8 +2936,8 @@ function peg$parse(input, options) {
2987
2936
  s2 = peg$parseSimpleDiacritic();
2988
2937
  if (s2 !== peg$FAILED) {
2989
2938
  s3 = peg$parse__();
2990
- if (peg$r13.test(input.charAt(peg$currPos))) {
2991
- s4 = input.charAt(peg$currPos);
2939
+ s4 = input.charAt(peg$currPos);
2940
+ if (peg$r13.test(s4)) {
2992
2941
  peg$currPos++;
2993
2942
  } else {
2994
2943
  s4 = peg$FAILED;
@@ -3004,8 +2953,8 @@ function peg$parse(input, options) {
3004
2953
  if (peg$silentFails === 0) { peg$fail(peg$e25); }
3005
2954
  }
3006
2955
  if (s5 !== peg$FAILED) {
3007
- if (peg$r14.test(input.charAt(peg$currPos))) {
3008
- s6 = input.charAt(peg$currPos);
2956
+ s6 = input.charAt(peg$currPos);
2957
+ if (peg$r14.test(s6)) {
3009
2958
  peg$currPos++;
3010
2959
  } else {
3011
2960
  s6 = peg$FAILED;
@@ -3025,7 +2974,7 @@ function peg$parse(input, options) {
3025
2974
  }
3026
2975
  if (s4 !== peg$FAILED) {
3027
2976
  peg$savedPos = s0;
3028
- s0 = peg$f44(s2, s4);
2977
+ s0 = peg$f43(s2, s4);
3029
2978
  } else {
3030
2979
  peg$currPos = s0;
3031
2980
  s0 = peg$FAILED;
@@ -3058,8 +3007,8 @@ function peg$parse(input, options) {
3058
3007
  if (peg$silentFails === 0) { peg$fail(peg$e5); }
3059
3008
  }
3060
3009
  if (s3 !== peg$FAILED) {
3061
- if (peg$r13.test(input.charAt(peg$currPos))) {
3062
- s4 = input.charAt(peg$currPos);
3010
+ s4 = input.charAt(peg$currPos);
3011
+ if (peg$r13.test(s4)) {
3063
3012
  peg$currPos++;
3064
3013
  } else {
3065
3014
  s4 = peg$FAILED;
@@ -3075,8 +3024,8 @@ function peg$parse(input, options) {
3075
3024
  if (peg$silentFails === 0) { peg$fail(peg$e25); }
3076
3025
  }
3077
3026
  if (s5 !== peg$FAILED) {
3078
- if (peg$r14.test(input.charAt(peg$currPos))) {
3079
- s6 = input.charAt(peg$currPos);
3027
+ s6 = input.charAt(peg$currPos);
3028
+ if (peg$r14.test(s6)) {
3080
3029
  peg$currPos++;
3081
3030
  } else {
3082
3031
  s6 = peg$FAILED;
@@ -3104,7 +3053,7 @@ function peg$parse(input, options) {
3104
3053
  }
3105
3054
  if (s5 !== peg$FAILED) {
3106
3055
  peg$savedPos = s0;
3107
- s0 = peg$f45(s2, s4);
3056
+ s0 = peg$f44(s2, s4);
3108
3057
  } else {
3109
3058
  peg$currPos = s0;
3110
3059
  s0 = peg$FAILED;
@@ -3157,7 +3106,7 @@ function peg$parse(input, options) {
3157
3106
  s4 = peg$parseRegularValue();
3158
3107
  if (s4 !== peg$FAILED) {
3159
3108
  peg$savedPos = s0;
3160
- s0 = peg$f46(s2, s4);
3109
+ s0 = peg$f45(s2, s4);
3161
3110
  } else {
3162
3111
  peg$currPos = s0;
3163
3112
  s0 = peg$FAILED;
@@ -3181,7 +3130,7 @@ function peg$parse(input, options) {
3181
3130
  }
3182
3131
 
3183
3132
  function peg$parseSymbolCommand() {
3184
- var s0, s1, s2, s3;
3133
+ var s0, s1, s2;
3185
3134
 
3186
3135
  s0 = peg$currPos;
3187
3136
  if (input.charCodeAt(peg$currPos) === 92) {
@@ -3192,22 +3141,16 @@ function peg$parse(input, options) {
3192
3141
  if (peg$silentFails === 0) { peg$fail(peg$e25); }
3193
3142
  }
3194
3143
  if (s1 !== peg$FAILED) {
3195
- s2 = peg$currPos;
3196
- if (peg$r17.test(input.charAt(peg$currPos))) {
3197
- s3 = input.charAt(peg$currPos);
3144
+ s2 = input.charAt(peg$currPos);
3145
+ if (peg$r17.test(s2)) {
3198
3146
  peg$currPos++;
3199
3147
  } else {
3200
- s3 = peg$FAILED;
3201
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
3202
- }
3203
- if (s3 !== peg$FAILED) {
3204
- s2 = input.substring(s2, peg$currPos);
3205
- } else {
3206
- s2 = s3;
3148
+ s2 = peg$FAILED;
3149
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
3207
3150
  }
3208
3151
  if (s2 !== peg$FAILED) {
3209
3152
  peg$savedPos = s0;
3210
- s0 = peg$f47(s2);
3153
+ s0 = peg$f46(s2);
3211
3154
  } else {
3212
3155
  peg$currPos = s0;
3213
3156
  s0 = peg$FAILED;
@@ -3232,18 +3175,18 @@ function peg$parse(input, options) {
3232
3175
  if (peg$silentFails === 0) { peg$fail(peg$e25); }
3233
3176
  }
3234
3177
  if (s1 !== peg$FAILED) {
3235
- if (input.substr(peg$currPos, 10) === peg$c20) {
3236
- s2 = peg$c20;
3178
+ if (input.substr(peg$currPos, 10) === peg$c18) {
3179
+ s2 = peg$c18;
3237
3180
  peg$currPos += 10;
3238
3181
  } else {
3239
3182
  s2 = peg$FAILED;
3240
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
3183
+ if (peg$silentFails === 0) { peg$fail(peg$e36); }
3241
3184
  }
3242
3185
  if (s2 !== peg$FAILED) {
3243
3186
  s3 = peg$parseBlock();
3244
3187
  if (s3 !== peg$FAILED) {
3245
3188
  peg$savedPos = peg$currPos;
3246
- s4 = peg$f48(s2, s3);
3189
+ s4 = peg$f47(s2, s3);
3247
3190
  if (s4) {
3248
3191
  s4 = undefined;
3249
3192
  } else {
@@ -3259,7 +3202,7 @@ function peg$parse(input, options) {
3259
3202
  s6 = peg$parseArgument();
3260
3203
  if (s6 !== peg$FAILED) {
3261
3204
  peg$savedPos = s0;
3262
- s0 = peg$f49(s2, s3, s5, s6);
3205
+ s0 = peg$f48(s2, s3, s5, s6);
3263
3206
  } else {
3264
3207
  peg$currPos = s0;
3265
3208
  s0 = peg$FAILED;
@@ -3290,12 +3233,12 @@ function peg$parse(input, options) {
3290
3233
  if (peg$silentFails === 0) { peg$fail(peg$e25); }
3291
3234
  }
3292
3235
  if (s1 !== peg$FAILED) {
3293
- if (input.substr(peg$currPos, 3) === peg$c21) {
3294
- s2 = peg$c21;
3236
+ if (input.substr(peg$currPos, 3) === peg$c19) {
3237
+ s2 = peg$c19;
3295
3238
  peg$currPos += 3;
3296
3239
  } else {
3297
3240
  s2 = peg$FAILED;
3298
- if (peg$silentFails === 0) { peg$fail(peg$e39); }
3241
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
3299
3242
  }
3300
3243
  if (s2 !== peg$FAILED) {
3301
3244
  s3 = peg$parse__h();
@@ -3319,7 +3262,7 @@ function peg$parse(input, options) {
3319
3262
  s5 = peg$parseVerbatimFieldValue();
3320
3263
  if (s5 !== peg$FAILED) {
3321
3264
  peg$savedPos = s0;
3322
- s0 = peg$f50(s2, s5);
3265
+ s0 = peg$f49(s2, s5);
3323
3266
  } else {
3324
3267
  peg$currPos = s0;
3325
3268
  s0 = peg$FAILED;
@@ -3346,12 +3289,12 @@ function peg$parse(input, options) {
3346
3289
  if (peg$silentFails === 0) { peg$fail(peg$e25); }
3347
3290
  }
3348
3291
  if (s1 !== peg$FAILED) {
3349
- if (input.substr(peg$currPos, 4) === peg$c22) {
3350
- s2 = peg$c22;
3292
+ if (input.substr(peg$currPos, 4) === peg$c20) {
3293
+ s2 = peg$c20;
3351
3294
  peg$currPos += 4;
3352
3295
  } else {
3353
3296
  s2 = peg$FAILED;
3354
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
3297
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
3355
3298
  }
3356
3299
  if (s2 !== peg$FAILED) {
3357
3300
  s3 = peg$parse__h();
@@ -3377,7 +3320,7 @@ function peg$parse(input, options) {
3377
3320
  s6 = peg$parseArgument();
3378
3321
  if (s6 !== peg$FAILED) {
3379
3322
  peg$savedPos = s0;
3380
- s0 = peg$f51(s2, s5, s6);
3323
+ s0 = peg$f50(s2, s5, s6);
3381
3324
  } else {
3382
3325
  peg$currPos = s0;
3383
3326
  s0 = peg$FAILED;
@@ -3400,12 +3343,12 @@ function peg$parse(input, options) {
3400
3343
  }
3401
3344
  if (s0 === peg$FAILED) {
3402
3345
  s0 = peg$currPos;
3403
- if (input.substr(peg$currPos, 5) === peg$c23) {
3404
- s1 = peg$c23;
3346
+ if (input.substr(peg$currPos, 5) === peg$c21) {
3347
+ s1 = peg$c21;
3405
3348
  peg$currPos += 5;
3406
3349
  } else {
3407
3350
  s1 = peg$FAILED;
3408
- if (peg$silentFails === 0) { peg$fail(peg$e41); }
3351
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
3409
3352
  }
3410
3353
  if (s1 !== peg$FAILED) {
3411
3354
  if (input.length > peg$currPos) {
@@ -3413,11 +3356,11 @@ function peg$parse(input, options) {
3413
3356
  peg$currPos++;
3414
3357
  } else {
3415
3358
  s2 = peg$FAILED;
3416
- if (peg$silentFails === 0) { peg$fail(peg$e42); }
3359
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
3417
3360
  }
3418
3361
  if (s2 !== peg$FAILED) {
3419
3362
  peg$savedPos = peg$currPos;
3420
- s3 = peg$f52(s2);
3363
+ s3 = peg$f51(s2);
3421
3364
  if (s3) {
3422
3365
  s3 = undefined;
3423
3366
  } else {
@@ -3435,11 +3378,11 @@ function peg$parse(input, options) {
3435
3378
  peg$currPos++;
3436
3379
  } else {
3437
3380
  s5 = peg$FAILED;
3438
- if (peg$silentFails === 0) { peg$fail(peg$e42); }
3381
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
3439
3382
  }
3440
3383
  if (s5 !== peg$FAILED) {
3441
3384
  peg$savedPos = peg$currPos;
3442
- s6 = peg$f53(s2, s4);
3385
+ s6 = peg$f52(s2, s4);
3443
3386
  if (s6) {
3444
3387
  s6 = undefined;
3445
3388
  } else {
@@ -3447,7 +3390,7 @@ function peg$parse(input, options) {
3447
3390
  }
3448
3391
  if (s6 !== peg$FAILED) {
3449
3392
  peg$savedPos = s0;
3450
- s0 = peg$f54(s2, s4);
3393
+ s0 = peg$f53(s2, s4);
3451
3394
  } else {
3452
3395
  peg$currPos = s0;
3453
3396
  s0 = peg$FAILED;
@@ -3480,12 +3423,12 @@ function peg$parse(input, options) {
3480
3423
  if (s1 !== peg$FAILED) {
3481
3424
  s2 = peg$currPos;
3482
3425
  peg$silentFails++;
3483
- if (input.substr(peg$currPos, 5) === peg$c24) {
3484
- s3 = peg$c24;
3426
+ if (input.substr(peg$currPos, 5) === peg$c22) {
3427
+ s3 = peg$c22;
3485
3428
  peg$currPos += 5;
3486
3429
  } else {
3487
3430
  s3 = peg$FAILED;
3488
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
3431
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
3489
3432
  }
3490
3433
  peg$silentFails--;
3491
3434
  if (s3 === peg$FAILED) {
@@ -3497,12 +3440,12 @@ function peg$parse(input, options) {
3497
3440
  if (s2 !== peg$FAILED) {
3498
3441
  s3 = peg$currPos;
3499
3442
  peg$silentFails++;
3500
- if (input.substr(peg$currPos, 3) === peg$c25) {
3501
- s4 = peg$c25;
3443
+ if (input.substr(peg$currPos, 3) === peg$c23) {
3444
+ s4 = peg$c23;
3502
3445
  peg$currPos += 3;
3503
3446
  } else {
3504
3447
  s4 = peg$FAILED;
3505
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
3448
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
3506
3449
  }
3507
3450
  peg$silentFails--;
3508
3451
  if (s4 === peg$FAILED) {
@@ -3514,22 +3457,22 @@ function peg$parse(input, options) {
3514
3457
  if (s3 !== peg$FAILED) {
3515
3458
  s4 = peg$currPos;
3516
3459
  s5 = [];
3517
- if (peg$r18.test(input.charAt(peg$currPos))) {
3518
- s6 = input.charAt(peg$currPos);
3460
+ s6 = input.charAt(peg$currPos);
3461
+ if (peg$r18.test(s6)) {
3519
3462
  peg$currPos++;
3520
3463
  } else {
3521
3464
  s6 = peg$FAILED;
3522
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
3465
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
3523
3466
  }
3524
3467
  if (s6 !== peg$FAILED) {
3525
3468
  while (s6 !== peg$FAILED) {
3526
3469
  s5.push(s6);
3527
- if (peg$r18.test(input.charAt(peg$currPos))) {
3528
- s6 = input.charAt(peg$currPos);
3470
+ s6 = input.charAt(peg$currPos);
3471
+ if (peg$r18.test(s6)) {
3529
3472
  peg$currPos++;
3530
3473
  } else {
3531
3474
  s6 = peg$FAILED;
3532
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
3475
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
3533
3476
  }
3534
3477
  }
3535
3478
  } else {
@@ -3542,7 +3485,7 @@ function peg$parse(input, options) {
3542
3485
  }
3543
3486
  if (s4 !== peg$FAILED) {
3544
3487
  peg$savedPos = peg$currPos;
3545
- s5 = peg$f55(s4);
3488
+ s5 = peg$f54(s4);
3546
3489
  if (s5) {
3547
3490
  s5 = undefined;
3548
3491
  } else {
@@ -3578,7 +3521,7 @@ function peg$parse(input, options) {
3578
3521
  s10 = peg$parseVerbatimFieldValue();
3579
3522
  if (s10 !== peg$FAILED) {
3580
3523
  peg$savedPos = s0;
3581
- s0 = peg$f56(s4, s6, s9, s10);
3524
+ s0 = peg$f55(s4, s6, s9, s10);
3582
3525
  } else {
3583
3526
  peg$currPos = s0;
3584
3527
  s0 = peg$FAILED;
@@ -3623,12 +3566,12 @@ function peg$parse(input, options) {
3623
3566
  if (s1 !== peg$FAILED) {
3624
3567
  s2 = peg$currPos;
3625
3568
  peg$silentFails++;
3626
- if (input.substr(peg$currPos, 5) === peg$c24) {
3627
- s3 = peg$c24;
3569
+ if (input.substr(peg$currPos, 5) === peg$c22) {
3570
+ s3 = peg$c22;
3628
3571
  peg$currPos += 5;
3629
3572
  } else {
3630
3573
  s3 = peg$FAILED;
3631
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
3574
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
3632
3575
  }
3633
3576
  peg$silentFails--;
3634
3577
  if (s3 === peg$FAILED) {
@@ -3640,12 +3583,12 @@ function peg$parse(input, options) {
3640
3583
  if (s2 !== peg$FAILED) {
3641
3584
  s3 = peg$currPos;
3642
3585
  peg$silentFails++;
3643
- if (input.substr(peg$currPos, 3) === peg$c25) {
3644
- s4 = peg$c25;
3586
+ if (input.substr(peg$currPos, 3) === peg$c23) {
3587
+ s4 = peg$c23;
3645
3588
  peg$currPos += 3;
3646
3589
  } else {
3647
3590
  s4 = peg$FAILED;
3648
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
3591
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
3649
3592
  }
3650
3593
  peg$silentFails--;
3651
3594
  if (s4 === peg$FAILED) {
@@ -3657,22 +3600,22 @@ function peg$parse(input, options) {
3657
3600
  if (s3 !== peg$FAILED) {
3658
3601
  s4 = peg$currPos;
3659
3602
  s5 = [];
3660
- if (peg$r18.test(input.charAt(peg$currPos))) {
3661
- s6 = input.charAt(peg$currPos);
3603
+ s6 = input.charAt(peg$currPos);
3604
+ if (peg$r18.test(s6)) {
3662
3605
  peg$currPos++;
3663
3606
  } else {
3664
3607
  s6 = peg$FAILED;
3665
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
3608
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
3666
3609
  }
3667
3610
  if (s6 !== peg$FAILED) {
3668
3611
  while (s6 !== peg$FAILED) {
3669
3612
  s5.push(s6);
3670
- if (peg$r18.test(input.charAt(peg$currPos))) {
3671
- s6 = input.charAt(peg$currPos);
3613
+ s6 = input.charAt(peg$currPos);
3614
+ if (peg$r18.test(s6)) {
3672
3615
  peg$currPos++;
3673
3616
  } else {
3674
3617
  s6 = peg$FAILED;
3675
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
3618
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
3676
3619
  }
3677
3620
  }
3678
3621
  } else {
@@ -3685,7 +3628,7 @@ function peg$parse(input, options) {
3685
3628
  }
3686
3629
  if (s4 !== peg$FAILED) {
3687
3630
  peg$savedPos = peg$currPos;
3688
- s5 = peg$f57(s4);
3631
+ s5 = peg$f56(s4);
3689
3632
  if (s5) {
3690
3633
  s5 = undefined;
3691
3634
  } else {
@@ -3719,7 +3662,7 @@ function peg$parse(input, options) {
3719
3662
  s9 = peg$parseVerbatimFieldValue();
3720
3663
  if (s9 !== peg$FAILED) {
3721
3664
  peg$savedPos = s0;
3722
- s0 = peg$f58(s4, s6, s9);
3665
+ s0 = peg$f57(s4, s6, s9);
3723
3666
  } else {
3724
3667
  peg$currPos = s0;
3725
3668
  s0 = peg$FAILED;
@@ -3760,12 +3703,12 @@ function peg$parse(input, options) {
3760
3703
  if (s1 !== peg$FAILED) {
3761
3704
  s2 = peg$currPos;
3762
3705
  peg$silentFails++;
3763
- if (input.substr(peg$currPos, 5) === peg$c24) {
3764
- s3 = peg$c24;
3706
+ if (input.substr(peg$currPos, 5) === peg$c22) {
3707
+ s3 = peg$c22;
3765
3708
  peg$currPos += 5;
3766
3709
  } else {
3767
3710
  s3 = peg$FAILED;
3768
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
3711
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
3769
3712
  }
3770
3713
  peg$silentFails--;
3771
3714
  if (s3 === peg$FAILED) {
@@ -3777,12 +3720,12 @@ function peg$parse(input, options) {
3777
3720
  if (s2 !== peg$FAILED) {
3778
3721
  s3 = peg$currPos;
3779
3722
  peg$silentFails++;
3780
- if (input.substr(peg$currPos, 3) === peg$c25) {
3781
- s4 = peg$c25;
3723
+ if (input.substr(peg$currPos, 3) === peg$c23) {
3724
+ s4 = peg$c23;
3782
3725
  peg$currPos += 3;
3783
3726
  } else {
3784
3727
  s4 = peg$FAILED;
3785
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
3728
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
3786
3729
  }
3787
3730
  peg$silentFails--;
3788
3731
  if (s4 === peg$FAILED) {
@@ -3794,22 +3737,22 @@ function peg$parse(input, options) {
3794
3737
  if (s3 !== peg$FAILED) {
3795
3738
  s4 = peg$currPos;
3796
3739
  s5 = [];
3797
- if (peg$r18.test(input.charAt(peg$currPos))) {
3798
- s6 = input.charAt(peg$currPos);
3740
+ s6 = input.charAt(peg$currPos);
3741
+ if (peg$r18.test(s6)) {
3799
3742
  peg$currPos++;
3800
3743
  } else {
3801
3744
  s6 = peg$FAILED;
3802
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
3745
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
3803
3746
  }
3804
3747
  if (s6 !== peg$FAILED) {
3805
3748
  while (s6 !== peg$FAILED) {
3806
3749
  s5.push(s6);
3807
- if (peg$r18.test(input.charAt(peg$currPos))) {
3808
- s6 = input.charAt(peg$currPos);
3750
+ s6 = input.charAt(peg$currPos);
3751
+ if (peg$r18.test(s6)) {
3809
3752
  peg$currPos++;
3810
3753
  } else {
3811
3754
  s6 = peg$FAILED;
3812
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
3755
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
3813
3756
  }
3814
3757
  }
3815
3758
  } else {
@@ -3822,7 +3765,7 @@ function peg$parse(input, options) {
3822
3765
  }
3823
3766
  if (s4 !== peg$FAILED) {
3824
3767
  peg$savedPos = peg$currPos;
3825
- s5 = peg$f59(s4);
3768
+ s5 = peg$f58(s4);
3826
3769
  if (s5) {
3827
3770
  s5 = undefined;
3828
3771
  } else {
@@ -3841,7 +3784,7 @@ function peg$parse(input, options) {
3841
3784
  s9 = peg$parseArgument();
3842
3785
  if (s9 !== peg$FAILED) {
3843
3786
  peg$savedPos = s0;
3844
- s0 = peg$f60(s4, s6, s8, s9);
3787
+ s0 = peg$f59(s4, s6, s8, s9);
3845
3788
  } else {
3846
3789
  peg$currPos = s0;
3847
3790
  s0 = peg$FAILED;
@@ -3882,12 +3825,12 @@ function peg$parse(input, options) {
3882
3825
  if (s1 !== peg$FAILED) {
3883
3826
  s2 = peg$currPos;
3884
3827
  peg$silentFails++;
3885
- if (input.substr(peg$currPos, 5) === peg$c24) {
3886
- s3 = peg$c24;
3828
+ if (input.substr(peg$currPos, 5) === peg$c22) {
3829
+ s3 = peg$c22;
3887
3830
  peg$currPos += 5;
3888
3831
  } else {
3889
3832
  s3 = peg$FAILED;
3890
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
3833
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
3891
3834
  }
3892
3835
  peg$silentFails--;
3893
3836
  if (s3 === peg$FAILED) {
@@ -3899,12 +3842,12 @@ function peg$parse(input, options) {
3899
3842
  if (s2 !== peg$FAILED) {
3900
3843
  s3 = peg$currPos;
3901
3844
  peg$silentFails++;
3902
- if (input.substr(peg$currPos, 3) === peg$c25) {
3903
- s4 = peg$c25;
3845
+ if (input.substr(peg$currPos, 3) === peg$c23) {
3846
+ s4 = peg$c23;
3904
3847
  peg$currPos += 3;
3905
3848
  } else {
3906
3849
  s4 = peg$FAILED;
3907
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
3850
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
3908
3851
  }
3909
3852
  peg$silentFails--;
3910
3853
  if (s4 === peg$FAILED) {
@@ -3916,22 +3859,22 @@ function peg$parse(input, options) {
3916
3859
  if (s3 !== peg$FAILED) {
3917
3860
  s4 = peg$currPos;
3918
3861
  s5 = [];
3919
- if (peg$r18.test(input.charAt(peg$currPos))) {
3920
- s6 = input.charAt(peg$currPos);
3862
+ s6 = input.charAt(peg$currPos);
3863
+ if (peg$r18.test(s6)) {
3921
3864
  peg$currPos++;
3922
3865
  } else {
3923
3866
  s6 = peg$FAILED;
3924
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
3867
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
3925
3868
  }
3926
3869
  if (s6 !== peg$FAILED) {
3927
3870
  while (s6 !== peg$FAILED) {
3928
3871
  s5.push(s6);
3929
- if (peg$r18.test(input.charAt(peg$currPos))) {
3930
- s6 = input.charAt(peg$currPos);
3872
+ s6 = input.charAt(peg$currPos);
3873
+ if (peg$r18.test(s6)) {
3931
3874
  peg$currPos++;
3932
3875
  } else {
3933
3876
  s6 = peg$FAILED;
3934
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
3877
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
3935
3878
  }
3936
3879
  }
3937
3880
  } else {
@@ -3944,7 +3887,7 @@ function peg$parse(input, options) {
3944
3887
  }
3945
3888
  if (s4 !== peg$FAILED) {
3946
3889
  peg$savedPos = peg$currPos;
3947
- s5 = peg$f61(s4);
3890
+ s5 = peg$f60(s4);
3948
3891
  if (s5) {
3949
3892
  s5 = undefined;
3950
3893
  } else {
@@ -3961,7 +3904,7 @@ function peg$parse(input, options) {
3961
3904
  s8 = peg$parseArgument();
3962
3905
  if (s8 !== peg$FAILED) {
3963
3906
  peg$savedPos = s0;
3964
- s0 = peg$f62(s4, s6, s8);
3907
+ s0 = peg$f61(s4, s6, s8);
3965
3908
  } else {
3966
3909
  peg$currPos = s0;
3967
3910
  s0 = peg$FAILED;
@@ -3998,12 +3941,12 @@ function peg$parse(input, options) {
3998
3941
  if (s1 !== peg$FAILED) {
3999
3942
  s2 = peg$currPos;
4000
3943
  peg$silentFails++;
4001
- if (input.substr(peg$currPos, 5) === peg$c24) {
4002
- s3 = peg$c24;
3944
+ if (input.substr(peg$currPos, 5) === peg$c22) {
3945
+ s3 = peg$c22;
4003
3946
  peg$currPos += 5;
4004
3947
  } else {
4005
3948
  s3 = peg$FAILED;
4006
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
3949
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
4007
3950
  }
4008
3951
  peg$silentFails--;
4009
3952
  if (s3 === peg$FAILED) {
@@ -4015,12 +3958,12 @@ function peg$parse(input, options) {
4015
3958
  if (s2 !== peg$FAILED) {
4016
3959
  s3 = peg$currPos;
4017
3960
  peg$silentFails++;
4018
- if (input.substr(peg$currPos, 3) === peg$c25) {
4019
- s4 = peg$c25;
3961
+ if (input.substr(peg$currPos, 3) === peg$c23) {
3962
+ s4 = peg$c23;
4020
3963
  peg$currPos += 3;
4021
3964
  } else {
4022
3965
  s4 = peg$FAILED;
4023
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
3966
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
4024
3967
  }
4025
3968
  peg$silentFails--;
4026
3969
  if (s4 === peg$FAILED) {
@@ -4032,22 +3975,22 @@ function peg$parse(input, options) {
4032
3975
  if (s3 !== peg$FAILED) {
4033
3976
  s4 = peg$currPos;
4034
3977
  s5 = [];
4035
- if (peg$r18.test(input.charAt(peg$currPos))) {
4036
- s6 = input.charAt(peg$currPos);
3978
+ s6 = input.charAt(peg$currPos);
3979
+ if (peg$r18.test(s6)) {
4037
3980
  peg$currPos++;
4038
3981
  } else {
4039
3982
  s6 = peg$FAILED;
4040
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
3983
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
4041
3984
  }
4042
3985
  if (s6 !== peg$FAILED) {
4043
3986
  while (s6 !== peg$FAILED) {
4044
3987
  s5.push(s6);
4045
- if (peg$r18.test(input.charAt(peg$currPos))) {
4046
- s6 = input.charAt(peg$currPos);
3988
+ s6 = input.charAt(peg$currPos);
3989
+ if (peg$r18.test(s6)) {
4047
3990
  peg$currPos++;
4048
3991
  } else {
4049
3992
  s6 = peg$FAILED;
4050
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
3993
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
4051
3994
  }
4052
3995
  }
4053
3996
  } else {
@@ -4067,7 +4010,7 @@ function peg$parse(input, options) {
4067
4010
  }
4068
4011
  s6 = peg$parse__();
4069
4012
  peg$savedPos = s0;
4070
- s0 = peg$f63(s4, s5);
4013
+ s0 = peg$f62(s4, s5);
4071
4014
  } else {
4072
4015
  peg$currPos = s0;
4073
4016
  s0 = peg$FAILED;
@@ -4105,11 +4048,11 @@ function peg$parse(input, options) {
4105
4048
  peg$currPos++;
4106
4049
  } else {
4107
4050
  s1 = peg$FAILED;
4108
- if (peg$silentFails === 0) { peg$fail(peg$e42); }
4051
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
4109
4052
  }
4110
4053
  if (s1 !== peg$FAILED) {
4111
4054
  peg$savedPos = peg$currPos;
4112
- s2 = peg$f64(s1);
4055
+ s2 = peg$f63(s1);
4113
4056
  if (s2) {
4114
4057
  s2 = undefined;
4115
4058
  } else {
@@ -4117,7 +4060,7 @@ function peg$parse(input, options) {
4117
4060
  }
4118
4061
  if (s2 !== peg$FAILED) {
4119
4062
  peg$savedPos = s0;
4120
- s0 = peg$f65(s1);
4063
+ s0 = peg$f64(s1);
4121
4064
  } else {
4122
4065
  peg$currPos = s0;
4123
4066
  s0 = peg$FAILED;
@@ -4144,12 +4087,12 @@ function peg$parse(input, options) {
4144
4087
  if (s1 !== peg$FAILED) {
4145
4088
  s2 = peg$currPos;
4146
4089
  peg$silentFails++;
4147
- if (input.substr(peg$currPos, 5) === peg$c24) {
4148
- s3 = peg$c24;
4090
+ if (input.substr(peg$currPos, 5) === peg$c22) {
4091
+ s3 = peg$c22;
4149
4092
  peg$currPos += 5;
4150
4093
  } else {
4151
4094
  s3 = peg$FAILED;
4152
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
4095
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
4153
4096
  }
4154
4097
  peg$silentFails--;
4155
4098
  if (s3 === peg$FAILED) {
@@ -4161,12 +4104,12 @@ function peg$parse(input, options) {
4161
4104
  if (s2 !== peg$FAILED) {
4162
4105
  s3 = peg$currPos;
4163
4106
  peg$silentFails++;
4164
- if (input.substr(peg$currPos, 3) === peg$c25) {
4165
- s4 = peg$c25;
4107
+ if (input.substr(peg$currPos, 3) === peg$c23) {
4108
+ s4 = peg$c23;
4166
4109
  peg$currPos += 3;
4167
4110
  } else {
4168
4111
  s4 = peg$FAILED;
4169
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
4112
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
4170
4113
  }
4171
4114
  peg$silentFails--;
4172
4115
  if (s4 === peg$FAILED) {
@@ -4176,8 +4119,8 @@ function peg$parse(input, options) {
4176
4119
  s3 = peg$FAILED;
4177
4120
  }
4178
4121
  if (s3 !== peg$FAILED) {
4179
- if (peg$r12.test(input.charAt(peg$currPos))) {
4180
- s4 = input.charAt(peg$currPos);
4122
+ s4 = input.charAt(peg$currPos);
4123
+ if (peg$r12.test(s4)) {
4181
4124
  peg$currPos++;
4182
4125
  } else {
4183
4126
  s4 = peg$FAILED;
@@ -4186,7 +4129,7 @@ function peg$parse(input, options) {
4186
4129
  if (s4 !== peg$FAILED) {
4187
4130
  s5 = peg$parse__();
4188
4131
  peg$savedPos = s0;
4189
- s0 = peg$f66(s4);
4132
+ s0 = peg$f65(s4);
4190
4133
  } else {
4191
4134
  peg$currPos = s0;
4192
4135
  s0 = peg$FAILED;
@@ -4212,32 +4155,32 @@ function peg$parse(input, options) {
4212
4155
 
4213
4156
  s0 = peg$currPos;
4214
4157
  if (input.charCodeAt(peg$currPos) === 91) {
4215
- s1 = peg$c26;
4158
+ s1 = peg$c24;
4216
4159
  peg$currPos++;
4217
4160
  } else {
4218
4161
  s1 = peg$FAILED;
4219
- if (peg$silentFails === 0) { peg$fail(peg$e46); }
4162
+ if (peg$silentFails === 0) { peg$fail(peg$e44); }
4220
4163
  }
4221
4164
  if (s1 !== peg$FAILED) {
4222
4165
  s2 = peg$parse__h();
4223
4166
  s3 = peg$currPos;
4224
4167
  s4 = [];
4225
- if (peg$r19.test(input.charAt(peg$currPos))) {
4226
- s5 = input.charAt(peg$currPos);
4168
+ s5 = input.charAt(peg$currPos);
4169
+ if (peg$r19.test(s5)) {
4227
4170
  peg$currPos++;
4228
4171
  } else {
4229
4172
  s5 = peg$FAILED;
4230
- if (peg$silentFails === 0) { peg$fail(peg$e47); }
4173
+ if (peg$silentFails === 0) { peg$fail(peg$e45); }
4231
4174
  }
4232
4175
  if (s5 !== peg$FAILED) {
4233
4176
  while (s5 !== peg$FAILED) {
4234
4177
  s4.push(s5);
4235
- if (peg$r19.test(input.charAt(peg$currPos))) {
4236
- s5 = input.charAt(peg$currPos);
4178
+ s5 = input.charAt(peg$currPos);
4179
+ if (peg$r19.test(s5)) {
4237
4180
  peg$currPos++;
4238
4181
  } else {
4239
4182
  s5 = peg$FAILED;
4240
- if (peg$silentFails === 0) { peg$fail(peg$e47); }
4183
+ if (peg$silentFails === 0) { peg$fail(peg$e45); }
4241
4184
  }
4242
4185
  }
4243
4186
  } else {
@@ -4251,15 +4194,15 @@ function peg$parse(input, options) {
4251
4194
  if (s3 !== peg$FAILED) {
4252
4195
  s4 = peg$parse__h();
4253
4196
  if (input.charCodeAt(peg$currPos) === 93) {
4254
- s5 = peg$c27;
4197
+ s5 = peg$c25;
4255
4198
  peg$currPos++;
4256
4199
  } else {
4257
4200
  s5 = peg$FAILED;
4258
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
4201
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
4259
4202
  }
4260
4203
  if (s5 !== peg$FAILED) {
4261
4204
  peg$savedPos = s0;
4262
- s0 = peg$f67(s3);
4205
+ s0 = peg$f66(s3);
4263
4206
  } else {
4264
4207
  peg$currPos = s0;
4265
4208
  s0 = peg$FAILED;
@@ -4281,16 +4224,16 @@ function peg$parse(input, options) {
4281
4224
 
4282
4225
  s0 = peg$currPos;
4283
4226
  s1 = peg$parse__h();
4284
- if (peg$r20.test(input.charAt(peg$currPos))) {
4285
- s2 = input.charAt(peg$currPos);
4227
+ s2 = input.charAt(peg$currPos);
4228
+ if (peg$r20.test(s2)) {
4286
4229
  peg$currPos++;
4287
4230
  } else {
4288
4231
  s2 = peg$FAILED;
4289
- if (peg$silentFails === 0) { peg$fail(peg$e49); }
4232
+ if (peg$silentFails === 0) { peg$fail(peg$e47); }
4290
4233
  }
4291
4234
  if (s2 !== peg$FAILED) {
4292
4235
  peg$savedPos = s0;
4293
- s0 = peg$f68(s2);
4236
+ s0 = peg$f67(s2);
4294
4237
  } else {
4295
4238
  peg$currPos = s0;
4296
4239
  s0 = peg$FAILED;
@@ -4304,7 +4247,7 @@ function peg$parse(input, options) {
4304
4247
  }
4305
4248
  if (s2 !== peg$FAILED) {
4306
4249
  peg$savedPos = s0;
4307
- s0 = peg$f69(s2);
4250
+ s0 = peg$f68(s2);
4308
4251
  } else {
4309
4252
  peg$currPos = s0;
4310
4253
  s0 = peg$FAILED;
@@ -4319,30 +4262,30 @@ function peg$parse(input, options) {
4319
4262
 
4320
4263
  s0 = peg$currPos;
4321
4264
  s1 = peg$currPos;
4322
- if (peg$r21.test(input.charAt(peg$currPos))) {
4323
- s2 = input.charAt(peg$currPos);
4265
+ s2 = input.charAt(peg$currPos);
4266
+ if (peg$r21.test(s2)) {
4324
4267
  peg$currPos++;
4325
4268
  } else {
4326
4269
  s2 = peg$FAILED;
4327
- if (peg$silentFails === 0) { peg$fail(peg$e50); }
4270
+ if (peg$silentFails === 0) { peg$fail(peg$e48); }
4328
4271
  }
4329
4272
  if (s2 !== peg$FAILED) {
4330
4273
  s3 = [];
4331
- if (peg$r22.test(input.charAt(peg$currPos))) {
4332
- s4 = input.charAt(peg$currPos);
4274
+ s4 = input.charAt(peg$currPos);
4275
+ if (peg$r22.test(s4)) {
4333
4276
  peg$currPos++;
4334
4277
  } else {
4335
4278
  s4 = peg$FAILED;
4336
- if (peg$silentFails === 0) { peg$fail(peg$e51); }
4279
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
4337
4280
  }
4338
4281
  while (s4 !== peg$FAILED) {
4339
4282
  s3.push(s4);
4340
- if (peg$r22.test(input.charAt(peg$currPos))) {
4341
- s4 = input.charAt(peg$currPos);
4283
+ s4 = input.charAt(peg$currPos);
4284
+ if (peg$r22.test(s4)) {
4342
4285
  peg$currPos++;
4343
4286
  } else {
4344
4287
  s4 = peg$FAILED;
4345
- if (peg$silentFails === 0) { peg$fail(peg$e51); }
4288
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
4346
4289
  }
4347
4290
  }
4348
4291
  s2 = [s2, s3];
@@ -4363,12 +4306,12 @@ function peg$parse(input, options) {
4363
4306
  function peg$parseSimpleDiacritic() {
4364
4307
  var s0;
4365
4308
 
4366
- if (peg$r23.test(input.charAt(peg$currPos))) {
4367
- s0 = input.charAt(peg$currPos);
4309
+ s0 = input.charAt(peg$currPos);
4310
+ if (peg$r23.test(s0)) {
4368
4311
  peg$currPos++;
4369
4312
  } else {
4370
4313
  s0 = peg$FAILED;
4371
- if (peg$silentFails === 0) { peg$fail(peg$e52); }
4314
+ if (peg$silentFails === 0) { peg$fail(peg$e50); }
4372
4315
  }
4373
4316
 
4374
4317
  return s0;
@@ -4377,12 +4320,12 @@ function peg$parse(input, options) {
4377
4320
  function peg$parseExtendedDiacritic() {
4378
4321
  var s0;
4379
4322
 
4380
- if (peg$r24.test(input.charAt(peg$currPos))) {
4381
- s0 = input.charAt(peg$currPos);
4323
+ s0 = input.charAt(peg$currPos);
4324
+ if (peg$r24.test(s0)) {
4382
4325
  peg$currPos++;
4383
4326
  } else {
4384
4327
  s0 = peg$FAILED;
4385
- if (peg$silentFails === 0) { peg$fail(peg$e53); }
4328
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
4386
4329
  }
4387
4330
 
4388
4331
  return s0;
@@ -4394,11 +4337,11 @@ function peg$parse(input, options) {
4394
4337
  s0 = peg$currPos;
4395
4338
  s1 = peg$parse__();
4396
4339
  if (input.charCodeAt(peg$currPos) === 61) {
4397
- s2 = peg$c28;
4340
+ s2 = peg$c26;
4398
4341
  peg$currPos++;
4399
4342
  } else {
4400
4343
  s2 = peg$FAILED;
4401
- if (peg$silentFails === 0) { peg$fail(peg$e54); }
4344
+ if (peg$silentFails === 0) { peg$fail(peg$e52); }
4402
4345
  }
4403
4346
  if (s2 !== peg$FAILED) {
4404
4347
  s3 = peg$parse__();
@@ -4438,11 +4381,11 @@ function peg$parse(input, options) {
4438
4381
  s0 = peg$currPos;
4439
4382
  s1 = peg$parse__();
4440
4383
  if (input.charCodeAt(peg$currPos) === 35) {
4441
- s2 = peg$c29;
4384
+ s2 = peg$c27;
4442
4385
  peg$currPos++;
4443
4386
  } else {
4444
4387
  s2 = peg$FAILED;
4445
- if (peg$silentFails === 0) { peg$fail(peg$e55); }
4388
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
4446
4389
  }
4447
4390
  if (s2 !== peg$FAILED) {
4448
4391
  s3 = peg$parse__();
@@ -4459,12 +4402,12 @@ function peg$parse(input, options) {
4459
4402
  function peg$parseEOL() {
4460
4403
  var s0;
4461
4404
 
4462
- if (peg$r25.test(input.charAt(peg$currPos))) {
4463
- s0 = input.charAt(peg$currPos);
4405
+ s0 = input.charAt(peg$currPos);
4406
+ if (peg$r25.test(s0)) {
4464
4407
  peg$currPos++;
4465
4408
  } else {
4466
4409
  s0 = peg$FAILED;
4467
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
4410
+ if (peg$silentFails === 0) { peg$fail(peg$e54); }
4468
4411
  }
4469
4412
 
4470
4413
  return s0;
@@ -4475,22 +4418,22 @@ function peg$parse(input, options) {
4475
4418
 
4476
4419
  peg$silentFails++;
4477
4420
  s0 = [];
4478
- if (peg$r26.test(input.charAt(peg$currPos))) {
4479
- s1 = input.charAt(peg$currPos);
4421
+ s1 = input.charAt(peg$currPos);
4422
+ if (peg$r26.test(s1)) {
4480
4423
  peg$currPos++;
4481
4424
  } else {
4482
4425
  s1 = peg$FAILED;
4483
- if (peg$silentFails === 0) { peg$fail(peg$e58); }
4426
+ if (peg$silentFails === 0) { peg$fail(peg$e56); }
4484
4427
  }
4485
4428
  if (s1 !== peg$FAILED) {
4486
4429
  while (s1 !== peg$FAILED) {
4487
4430
  s0.push(s1);
4488
- if (peg$r26.test(input.charAt(peg$currPos))) {
4489
- s1 = input.charAt(peg$currPos);
4431
+ s1 = input.charAt(peg$currPos);
4432
+ if (peg$r26.test(s1)) {
4490
4433
  peg$currPos++;
4491
4434
  } else {
4492
4435
  s1 = peg$FAILED;
4493
- if (peg$silentFails === 0) { peg$fail(peg$e58); }
4436
+ if (peg$silentFails === 0) { peg$fail(peg$e56); }
4494
4437
  }
4495
4438
  }
4496
4439
  } else {
@@ -4499,7 +4442,7 @@ function peg$parse(input, options) {
4499
4442
  peg$silentFails--;
4500
4443
  if (s0 === peg$FAILED) {
4501
4444
  s1 = peg$FAILED;
4502
- if (peg$silentFails === 0) { peg$fail(peg$e57); }
4445
+ if (peg$silentFails === 0) { peg$fail(peg$e55); }
4503
4446
  }
4504
4447
 
4505
4448
  return s0;
@@ -4510,26 +4453,26 @@ function peg$parse(input, options) {
4510
4453
 
4511
4454
  peg$silentFails++;
4512
4455
  s0 = [];
4513
- if (peg$r26.test(input.charAt(peg$currPos))) {
4514
- s1 = input.charAt(peg$currPos);
4456
+ s1 = input.charAt(peg$currPos);
4457
+ if (peg$r26.test(s1)) {
4515
4458
  peg$currPos++;
4516
4459
  } else {
4517
4460
  s1 = peg$FAILED;
4518
- if (peg$silentFails === 0) { peg$fail(peg$e58); }
4461
+ if (peg$silentFails === 0) { peg$fail(peg$e56); }
4519
4462
  }
4520
4463
  while (s1 !== peg$FAILED) {
4521
4464
  s0.push(s1);
4522
- if (peg$r26.test(input.charAt(peg$currPos))) {
4523
- s1 = input.charAt(peg$currPos);
4465
+ s1 = input.charAt(peg$currPos);
4466
+ if (peg$r26.test(s1)) {
4524
4467
  peg$currPos++;
4525
4468
  } else {
4526
4469
  s1 = peg$FAILED;
4527
- if (peg$silentFails === 0) { peg$fail(peg$e58); }
4470
+ if (peg$silentFails === 0) { peg$fail(peg$e56); }
4528
4471
  }
4529
4472
  }
4530
4473
  peg$silentFails--;
4531
4474
  s1 = peg$FAILED;
4532
- if (peg$silentFails === 0) { peg$fail(peg$e59); }
4475
+ if (peg$silentFails === 0) { peg$fail(peg$e57); }
4533
4476
 
4534
4477
  return s0;
4535
4478
  }
@@ -4539,22 +4482,22 @@ function peg$parse(input, options) {
4539
4482
 
4540
4483
  peg$silentFails++;
4541
4484
  s0 = [];
4542
- if (peg$r25.test(input.charAt(peg$currPos))) {
4543
- s1 = input.charAt(peg$currPos);
4485
+ s1 = input.charAt(peg$currPos);
4486
+ if (peg$r25.test(s1)) {
4544
4487
  peg$currPos++;
4545
4488
  } else {
4546
4489
  s1 = peg$FAILED;
4547
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
4490
+ if (peg$silentFails === 0) { peg$fail(peg$e54); }
4548
4491
  }
4549
4492
  if (s1 !== peg$FAILED) {
4550
4493
  while (s1 !== peg$FAILED) {
4551
4494
  s0.push(s1);
4552
- if (peg$r25.test(input.charAt(peg$currPos))) {
4553
- s1 = input.charAt(peg$currPos);
4495
+ s1 = input.charAt(peg$currPos);
4496
+ if (peg$r25.test(s1)) {
4554
4497
  peg$currPos++;
4555
4498
  } else {
4556
4499
  s1 = peg$FAILED;
4557
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
4500
+ if (peg$silentFails === 0) { peg$fail(peg$e54); }
4558
4501
  }
4559
4502
  }
4560
4503
  } else {
@@ -4563,7 +4506,7 @@ function peg$parse(input, options) {
4563
4506
  peg$silentFails--;
4564
4507
  if (s0 === peg$FAILED) {
4565
4508
  s1 = peg$FAILED;
4566
- if (peg$silentFails === 0) { peg$fail(peg$e60); }
4509
+ if (peg$silentFails === 0) { peg$fail(peg$e58); }
4567
4510
  }
4568
4511
 
4569
4512
  return s0;
@@ -4574,26 +4517,26 @@ function peg$parse(input, options) {
4574
4517
 
4575
4518
  peg$silentFails++;
4576
4519
  s0 = [];
4577
- if (peg$r25.test(input.charAt(peg$currPos))) {
4578
- s1 = input.charAt(peg$currPos);
4520
+ s1 = input.charAt(peg$currPos);
4521
+ if (peg$r25.test(s1)) {
4579
4522
  peg$currPos++;
4580
4523
  } else {
4581
4524
  s1 = peg$FAILED;
4582
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
4525
+ if (peg$silentFails === 0) { peg$fail(peg$e54); }
4583
4526
  }
4584
4527
  while (s1 !== peg$FAILED) {
4585
4528
  s0.push(s1);
4586
- if (peg$r25.test(input.charAt(peg$currPos))) {
4587
- s1 = input.charAt(peg$currPos);
4529
+ s1 = input.charAt(peg$currPos);
4530
+ if (peg$r25.test(s1)) {
4588
4531
  peg$currPos++;
4589
4532
  } else {
4590
4533
  s1 = peg$FAILED;
4591
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
4534
+ if (peg$silentFails === 0) { peg$fail(peg$e54); }
4592
4535
  }
4593
4536
  }
4594
4537
  peg$silentFails--;
4595
4538
  s1 = peg$FAILED;
4596
- if (peg$silentFails === 0) { peg$fail(peg$e61); }
4539
+ if (peg$silentFails === 0) { peg$fail(peg$e59); }
4597
4540
 
4598
4541
  return s0;
4599
4542
  }
@@ -4603,22 +4546,22 @@ function peg$parse(input, options) {
4603
4546
 
4604
4547
  peg$silentFails++;
4605
4548
  s0 = [];
4606
- if (peg$r27.test(input.charAt(peg$currPos))) {
4607
- s1 = input.charAt(peg$currPos);
4549
+ s1 = input.charAt(peg$currPos);
4550
+ if (peg$r27.test(s1)) {
4608
4551
  peg$currPos++;
4609
4552
  } else {
4610
4553
  s1 = peg$FAILED;
4611
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
4554
+ if (peg$silentFails === 0) { peg$fail(peg$e61); }
4612
4555
  }
4613
4556
  if (s1 !== peg$FAILED) {
4614
4557
  while (s1 !== peg$FAILED) {
4615
4558
  s0.push(s1);
4616
- if (peg$r27.test(input.charAt(peg$currPos))) {
4617
- s1 = input.charAt(peg$currPos);
4559
+ s1 = input.charAt(peg$currPos);
4560
+ if (peg$r27.test(s1)) {
4618
4561
  peg$currPos++;
4619
4562
  } else {
4620
4563
  s1 = peg$FAILED;
4621
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
4564
+ if (peg$silentFails === 0) { peg$fail(peg$e61); }
4622
4565
  }
4623
4566
  }
4624
4567
  } else {
@@ -4627,7 +4570,7 @@ function peg$parse(input, options) {
4627
4570
  peg$silentFails--;
4628
4571
  if (s0 === peg$FAILED) {
4629
4572
  s1 = peg$FAILED;
4630
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
4573
+ if (peg$silentFails === 0) { peg$fail(peg$e60); }
4631
4574
  }
4632
4575
 
4633
4576
  return s0;
@@ -4638,26 +4581,26 @@ function peg$parse(input, options) {
4638
4581
 
4639
4582
  peg$silentFails++;
4640
4583
  s0 = [];
4641
- if (peg$r27.test(input.charAt(peg$currPos))) {
4642
- s1 = input.charAt(peg$currPos);
4584
+ s1 = input.charAt(peg$currPos);
4585
+ if (peg$r27.test(s1)) {
4643
4586
  peg$currPos++;
4644
4587
  } else {
4645
4588
  s1 = peg$FAILED;
4646
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
4589
+ if (peg$silentFails === 0) { peg$fail(peg$e61); }
4647
4590
  }
4648
4591
  while (s1 !== peg$FAILED) {
4649
4592
  s0.push(s1);
4650
- if (peg$r27.test(input.charAt(peg$currPos))) {
4651
- s1 = input.charAt(peg$currPos);
4593
+ s1 = input.charAt(peg$currPos);
4594
+ if (peg$r27.test(s1)) {
4652
4595
  peg$currPos++;
4653
4596
  } else {
4654
4597
  s1 = peg$FAILED;
4655
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
4598
+ if (peg$silentFails === 0) { peg$fail(peg$e61); }
4656
4599
  }
4657
4600
  }
4658
4601
  peg$silentFails--;
4659
4602
  s1 = peg$FAILED;
4660
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
4603
+ if (peg$silentFails === 0) { peg$fail(peg$e62); }
4661
4604
 
4662
4605
  return s0;
4663
4606
  }
@@ -4713,19 +4656,8 @@ function peg$parse(input, options) {
4713
4656
  return verbatimFields.find(p => (typeof p === 'string') ? name === p : name.match(p))
4714
4657
  }
4715
4658
 
4716
- function normalizeWhitespace(textArr) {
4717
- if (typeof textArr === 'string') textArr = Array.from(textArr)
4718
-
4719
- return textArr.reduce((prev, curr) => {
4720
- if (/\s/.test(curr)) {
4721
- if (/\s/.test(prev[prev.length - 1])) {
4722
- return prev;
4723
- } else {
4724
- return prev + ' ';
4725
- }
4726
- }
4727
- return prev + curr;
4728
- }, '');
4659
+ function normalizeWhitespace(t) {
4660
+ return t.replace(/\r/g, '').replace(/[ \t\n]+/g, ' ')
4729
4661
  }
4730
4662
 
4731
4663
  const has_arguments = {
@@ -4917,8 +4849,45 @@ function peg$parse(input, options) {
4917
4849
  return block
4918
4850
  }
4919
4851
 
4852
+ function parBreak(nodes) {
4853
+ const broken = []
4854
+ for (const node of nodes) {
4855
+ if (node.kind !== 'Text') {
4856
+ broken.push(node)
4857
+ }
4858
+ else {
4859
+ node.value.split(/([ \t\r]*\n[ \t\r]*\n[ \t\r\n]*|[ \t\r\n]*\u2029[ \t\r\n]*)/).forEach((par, i) => {
4860
+ if (i % 2 == 0) {
4861
+ broken.push(basicTextConversions({...node, value: normalizeWhitespace(par)}))
4862
+ }
4863
+ else {
4864
+ broken.push({
4865
+ ...node,
4866
+ kind: 'RegularCommand',
4867
+ command: 'par',
4868
+ arguments: {
4869
+ optional: [],
4870
+ required: [],
4871
+ },
4872
+ })
4873
+ }
4874
+ })
4875
+ }
4876
+ }
4877
+ return broken
4878
+ }
4879
+
4920
4880
  peg$result = peg$startRuleFunction();
4921
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
+ }
4922
4891
  if (peg$result !== peg$FAILED && peg$currPos === input.length) {
4923
4892
  return peg$result;
4924
4893
  } else {
@@ -4937,6 +4906,7 @@ function peg$parse(input, options) {
4937
4906
  }
4938
4907
 
4939
4908
  module.exports = {
4909
+ StartRules: ["Bibliography"],
4940
4910
  SyntaxError: peg$SyntaxError,
4941
4911
  parse: peg$parse
4942
4912
  };