@retorquere/bibtex-parser 7.0.7 → 7.0.9
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.d.ts +1 -1
- package/grammar.js +682 -601
- package/index.js +30 -29
- package/package.json +17 -17
- package/sentence-case.js +1 -1
- package/strings.bib +3243 -0
- package/unabbrev.json +29 -29
package/grammar.js
CHANGED
|
@@ -184,22 +184,22 @@ function peg$parse(input, options) {
|
|
|
184
184
|
var peg$c5 = "string";
|
|
185
185
|
var peg$c6 = ",";
|
|
186
186
|
var peg$c7 = "\"";
|
|
187
|
-
var peg$c8 = "{
|
|
188
|
-
var peg$c9 = "\\
|
|
189
|
-
var peg$c10 = "\\
|
|
190
|
-
var peg$c11 = "
|
|
191
|
-
var peg$c12 = "
|
|
192
|
-
var peg$c13 = "
|
|
193
|
-
var peg$c14 = "
|
|
194
|
-
var peg$c15 = "\\
|
|
195
|
-
var peg$c16 = "
|
|
196
|
-
var peg$c17 = "
|
|
197
|
-
var peg$c18 = "
|
|
198
|
-
var peg$c19 = "\
|
|
199
|
-
var peg$c20 = "
|
|
200
|
-
var peg$c21 = "
|
|
201
|
-
var peg$c22 = "
|
|
202
|
-
var peg$c23 = "
|
|
187
|
+
var peg$c8 = "\\begin{";
|
|
188
|
+
var peg$c9 = "\\end{";
|
|
189
|
+
var peg$c10 = "{\\";
|
|
190
|
+
var peg$c11 = "\\";
|
|
191
|
+
var peg$c12 = "$";
|
|
192
|
+
var peg$c13 = "$$";
|
|
193
|
+
var peg$c14 = "\\[";
|
|
194
|
+
var peg$c15 = "\\]";
|
|
195
|
+
var peg$c16 = "%";
|
|
196
|
+
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
203
|
var peg$c24 = "begin";
|
|
204
204
|
var peg$c25 = "end";
|
|
205
205
|
var peg$c26 = "[";
|
|
@@ -217,25 +217,24 @@ function peg$parse(input, options) {
|
|
|
217
217
|
var peg$r7 = /^[^ \t\r\n,]/;
|
|
218
218
|
var peg$r8 = /^[0-9A-Za-z!$&*+\-.\/:;<>?@[\\\]\^_`|~]/;
|
|
219
219
|
var peg$r9 = /^[^{}"]/;
|
|
220
|
-
var peg$r10 = /^[
|
|
221
|
-
var peg$r11 = /^[^\^_${}\\]/;
|
|
222
|
-
var peg$r12 = /^[
|
|
223
|
-
var peg$r13 = /^[
|
|
224
|
-
var peg$r14 = /^[
|
|
225
|
-
var peg$r15 = /^[
|
|
226
|
-
var peg$r16 = /^[
|
|
227
|
-
var peg$r17 = /^[
|
|
228
|
-
var peg$r18 = /^[
|
|
229
|
-
var peg$r19 = /^[
|
|
230
|
-
var peg$r20 = /^[
|
|
231
|
-
var peg$r21 = /^[
|
|
232
|
-
var peg$r22 = /^[a-zA-
|
|
233
|
-
var peg$r23 = /^[
|
|
234
|
-
var peg$r24 = /^['`"=~\^.]/;
|
|
235
|
-
var peg$r25 = /^[
|
|
236
|
-
var peg$r26 = /^[\
|
|
237
|
-
var peg$r27 = /^[ \t]/;
|
|
238
|
-
var peg$r28 = /^[ \t\n\r]/;
|
|
220
|
+
var peg$r10 = /^[^\^_${}\\]/;
|
|
221
|
+
var peg$r11 = /^[^\^_${}"\\]/;
|
|
222
|
+
var peg$r12 = /^[0-9]/;
|
|
223
|
+
var peg$r13 = /^[a-zA-Z0-9]/;
|
|
224
|
+
var peg$r14 = /^[ij]/;
|
|
225
|
+
var peg$r15 = /^[^\r\n]/;
|
|
226
|
+
var peg$r16 = /^[_\^]/;
|
|
227
|
+
var peg$r17 = /^[^A-Za-z0-9[\]\t\r\n]/;
|
|
228
|
+
var peg$r18 = /^[A-Za-z]/;
|
|
229
|
+
var peg$r19 = /^[^\]]/;
|
|
230
|
+
var peg$r20 = /^[^ \t\^_${}\\]/;
|
|
231
|
+
var peg$r21 = /^[a-zA-Z\-_]/;
|
|
232
|
+
var peg$r22 = /^[a-zA-Z0-9\-&_:]/;
|
|
233
|
+
var peg$r23 = /^['`"=~\^.]/;
|
|
234
|
+
var peg$r24 = /^['`"=~\^.cbuvdrHk]/;
|
|
235
|
+
var peg$r25 = /^[\r\n]/;
|
|
236
|
+
var peg$r26 = /^[ \t]/;
|
|
237
|
+
var peg$r27 = /^[ \t\n\r]/;
|
|
239
238
|
|
|
240
239
|
var peg$e0 = peg$literalExpectation("@", false);
|
|
241
240
|
var peg$e1 = peg$literalExpectation("comment", true);
|
|
@@ -255,31 +254,31 @@ function peg$parse(input, options) {
|
|
|
255
254
|
var peg$e15 = peg$classExpectation([["0", "9"], ["A", "Z"], ["a", "z"], "!", "$", "&", "*", "+", "-", ".", "/", ":", ";", "<", ">", "?", "@", "[", "\\", "]", "^", "_", "`", "|", "~"], false, false);
|
|
256
255
|
var peg$e16 = peg$literalExpectation("\"", false);
|
|
257
256
|
var peg$e17 = peg$classExpectation(["{", "}", "\""], true, false);
|
|
258
|
-
var peg$e18 = peg$
|
|
259
|
-
var peg$e19 = peg$classExpectation([
|
|
260
|
-
var peg$e20 = peg$classExpectation(["
|
|
261
|
-
var peg$e21 = peg$
|
|
262
|
-
var peg$e22 = peg$classExpectation([["0", "9"]], false, false);
|
|
263
|
-
var peg$e23 = peg$literalExpectation("\\
|
|
264
|
-
var peg$e24 = peg$
|
|
265
|
-
var peg$e25 = peg$literalExpectation("\\
|
|
266
|
-
var peg$e26 = peg$
|
|
267
|
-
var peg$e27 = peg$literalExpectation("
|
|
268
|
-
var peg$e28 = peg$
|
|
269
|
-
var peg$e29 = peg$literalExpectation("
|
|
270
|
-
var peg$e30 = peg$literalExpectation("
|
|
271
|
-
var peg$e31 = peg$literalExpectation("
|
|
272
|
-
var peg$e32 = peg$
|
|
273
|
-
var peg$e33 = peg$literalExpectation("
|
|
274
|
-
var peg$e34 = peg$
|
|
275
|
-
var peg$e35 = peg$literalExpectation("
|
|
276
|
-
var peg$e36 = peg$
|
|
277
|
-
var peg$e37 = peg$
|
|
278
|
-
var peg$e38 = peg$
|
|
279
|
-
var peg$e39 = peg$
|
|
280
|
-
var peg$e40 = peg$literalExpectation("
|
|
281
|
-
var peg$e41 = peg$literalExpectation("
|
|
282
|
-
var peg$e42 = peg$
|
|
257
|
+
var peg$e18 = peg$classExpectation(["^", "_", "$", "{", "}", "\\"], true, false);
|
|
258
|
+
var peg$e19 = peg$classExpectation(["^", "_", "$", "{", "}", "\"", "\\"], true, false);
|
|
259
|
+
var peg$e20 = peg$classExpectation([["0", "9"]], false, false);
|
|
260
|
+
var peg$e21 = peg$literalExpectation("\\begin{", false);
|
|
261
|
+
var peg$e22 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"]], false, false);
|
|
262
|
+
var peg$e23 = peg$literalExpectation("\\end{", false);
|
|
263
|
+
var peg$e24 = peg$literalExpectation("{\\", false);
|
|
264
|
+
var peg$e25 = peg$literalExpectation("\\", false);
|
|
265
|
+
var peg$e26 = peg$classExpectation(["i", "j"], false, false);
|
|
266
|
+
var peg$e27 = peg$literalExpectation("$", false);
|
|
267
|
+
var peg$e28 = peg$literalExpectation("$$", false);
|
|
268
|
+
var peg$e29 = peg$literalExpectation("\\[", false);
|
|
269
|
+
var peg$e30 = peg$literalExpectation("\\]", false);
|
|
270
|
+
var peg$e31 = peg$literalExpectation("%", false);
|
|
271
|
+
var peg$e32 = peg$classExpectation(["\r", "\n"], true, false);
|
|
272
|
+
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();
|
|
283
282
|
var peg$e43 = peg$literalExpectation("begin", false);
|
|
284
283
|
var peg$e44 = peg$literalExpectation("end", false);
|
|
285
284
|
var peg$e45 = peg$classExpectation([["A", "Z"], ["a", "z"]], false, false);
|
|
@@ -442,19 +441,10 @@ function peg$parse(input, options) {
|
|
|
442
441
|
return v.reduce((a, b) => a.concat(b), []);
|
|
443
442
|
};
|
|
444
443
|
var peg$f24 = function(v) { return v; };
|
|
445
|
-
var peg$f25 = function(v) {
|
|
446
|
-
return basicTextConversions({
|
|
447
|
-
kind: 'Text',
|
|
448
|
-
loc: location(),
|
|
449
|
-
source: text(),
|
|
450
|
-
value: v.join('').trim(),
|
|
451
|
-
mode: 'verbatim',
|
|
452
|
-
})
|
|
453
|
-
};
|
|
444
|
+
var peg$f25 = function(v) { return v; };
|
|
454
445
|
var peg$f26 = function(v) { return v; };
|
|
455
446
|
var peg$f27 = function(v) { return v; };
|
|
456
|
-
var peg$f28 = function(v) {
|
|
457
|
-
var peg$f29 = function(v) {
|
|
447
|
+
var peg$f28 = function(v) {
|
|
458
448
|
return basicTextConversions({
|
|
459
449
|
kind: 'Text',
|
|
460
450
|
loc: location(),
|
|
@@ -463,7 +453,7 @@ function peg$parse(input, options) {
|
|
|
463
453
|
mode: math.on ? 'math' : 'text',
|
|
464
454
|
})
|
|
465
455
|
};
|
|
466
|
-
var peg$
|
|
456
|
+
var peg$f29 = function(v) {
|
|
467
457
|
return basicTextConversions({
|
|
468
458
|
kind: 'Text',
|
|
469
459
|
loc: location(),
|
|
@@ -472,7 +462,7 @@ function peg$parse(input, options) {
|
|
|
472
462
|
mode: math.on ? 'math' : 'text',
|
|
473
463
|
})
|
|
474
464
|
};
|
|
475
|
-
var peg$
|
|
465
|
+
var peg$f30 = function(v) {
|
|
476
466
|
return {
|
|
477
467
|
kind: 'Number',
|
|
478
468
|
loc: location(),
|
|
@@ -480,7 +470,7 @@ function peg$parse(input, options) {
|
|
|
480
470
|
value: parseInt(v, 10),
|
|
481
471
|
}
|
|
482
472
|
};
|
|
483
|
-
var peg$
|
|
473
|
+
var peg$f31 = function(v) {
|
|
484
474
|
return {
|
|
485
475
|
kind: 'StringReference',
|
|
486
476
|
loc: location(),
|
|
@@ -488,8 +478,8 @@ function peg$parse(input, options) {
|
|
|
488
478
|
name: v,
|
|
489
479
|
}
|
|
490
480
|
};
|
|
491
|
-
var peg$
|
|
492
|
-
var peg$
|
|
481
|
+
var peg$f32 = function(env, v, cenv) { return env === cenv };
|
|
482
|
+
var peg$f33 = function(env, v, cenv) {
|
|
493
483
|
if (markup[env]) {
|
|
494
484
|
return {
|
|
495
485
|
kind: 'Block',
|
|
@@ -508,7 +498,7 @@ function peg$parse(input, options) {
|
|
|
508
498
|
}
|
|
509
499
|
}
|
|
510
500
|
};
|
|
511
|
-
var peg$
|
|
501
|
+
var peg$f34 = function(mark, chr) {
|
|
512
502
|
return {
|
|
513
503
|
kind: 'DiacriticCommand',
|
|
514
504
|
loc: location(),
|
|
@@ -518,16 +508,7 @@ function peg$parse(input, options) {
|
|
|
518
508
|
character: chr[1] || chr[0],
|
|
519
509
|
}
|
|
520
510
|
};
|
|
521
|
-
var peg$
|
|
522
|
-
return basicTextConversions({
|
|
523
|
-
kind: 'Text',
|
|
524
|
-
loc: location(),
|
|
525
|
-
source: text(),
|
|
526
|
-
value: v.join('').trim(),
|
|
527
|
-
mode: 'verbatim',
|
|
528
|
-
})
|
|
529
|
-
};
|
|
530
|
-
var peg$f37 = function(v) {
|
|
511
|
+
var peg$f35 = function(v) {
|
|
531
512
|
const block = {
|
|
532
513
|
kind: 'Block',
|
|
533
514
|
loc: location(),
|
|
@@ -561,10 +542,10 @@ function peg$parse(input, options) {
|
|
|
561
542
|
|
|
562
543
|
return handle_markup_switches(block)
|
|
563
544
|
};
|
|
564
|
-
var peg$
|
|
565
|
-
var peg$
|
|
566
|
-
var peg$
|
|
567
|
-
var peg$
|
|
545
|
+
var peg$f36 = function() { return !math.on };
|
|
546
|
+
var peg$f37 = function(mode) { return math.set(true) };
|
|
547
|
+
var peg$f38 = function(mode, v) { return math.set(false) };
|
|
548
|
+
var peg$f39 = function(mode, v) {
|
|
568
549
|
return {
|
|
569
550
|
kind: mode == '$$' ? 'DisplayMath' : 'InlineMath',
|
|
570
551
|
loc: location(),
|
|
@@ -574,7 +555,7 @@ function peg$parse(input, options) {
|
|
|
574
555
|
markup: {},
|
|
575
556
|
}
|
|
576
557
|
};
|
|
577
|
-
var peg$
|
|
558
|
+
var peg$f40 = function(v) {
|
|
578
559
|
return {
|
|
579
560
|
kind: 'LineComment',
|
|
580
561
|
loc: location(),
|
|
@@ -582,7 +563,7 @@ function peg$parse(input, options) {
|
|
|
582
563
|
value: v,
|
|
583
564
|
}
|
|
584
565
|
};
|
|
585
|
-
var peg$
|
|
566
|
+
var peg$f41 = function() {
|
|
586
567
|
return {
|
|
587
568
|
kind: 'RegularCommand',
|
|
588
569
|
loc: location(),
|
|
@@ -594,7 +575,7 @@ function peg$parse(input, options) {
|
|
|
594
575
|
},
|
|
595
576
|
}
|
|
596
577
|
};
|
|
597
|
-
var peg$
|
|
578
|
+
var peg$f42 = function() {
|
|
598
579
|
return {
|
|
599
580
|
kind: 'RegularCommand',
|
|
600
581
|
loc: location(),
|
|
@@ -606,7 +587,7 @@ function peg$parse(input, options) {
|
|
|
606
587
|
},
|
|
607
588
|
}
|
|
608
589
|
};
|
|
609
|
-
var peg$
|
|
590
|
+
var peg$f43 = function(mode, v) {
|
|
610
591
|
if (v.kind === 'Block') v = v.value
|
|
611
592
|
|
|
612
593
|
return {
|
|
@@ -616,7 +597,7 @@ function peg$parse(input, options) {
|
|
|
616
597
|
value: v,
|
|
617
598
|
}
|
|
618
599
|
};
|
|
619
|
-
var peg$
|
|
600
|
+
var peg$f44 = function(mark, chr) {
|
|
620
601
|
return {
|
|
621
602
|
kind: 'DiacriticCommand',
|
|
622
603
|
loc: location(),
|
|
@@ -626,7 +607,7 @@ function peg$parse(input, options) {
|
|
|
626
607
|
character: chr[1] || chr[0],
|
|
627
608
|
}
|
|
628
609
|
};
|
|
629
|
-
var peg$
|
|
610
|
+
var peg$f45 = function(mark, chr) {
|
|
630
611
|
return {
|
|
631
612
|
kind: 'DiacriticCommand',
|
|
632
613
|
loc: location(),
|
|
@@ -636,7 +617,7 @@ function peg$parse(input, options) {
|
|
|
636
617
|
character: chr[1] || chr[0],
|
|
637
618
|
}
|
|
638
619
|
};
|
|
639
|
-
var peg$
|
|
620
|
+
var peg$f46 = function(mark, v) {
|
|
640
621
|
return {
|
|
641
622
|
kind: 'RegularCommand',
|
|
642
623
|
loc: location(),
|
|
@@ -648,7 +629,7 @@ function peg$parse(input, options) {
|
|
|
648
629
|
},
|
|
649
630
|
}
|
|
650
631
|
};
|
|
651
|
-
var peg$
|
|
632
|
+
var peg$f47 = function(v) {
|
|
652
633
|
return {
|
|
653
634
|
kind: 'SymbolCommand',
|
|
654
635
|
loc: location(),
|
|
@@ -656,8 +637,8 @@ function peg$parse(input, options) {
|
|
|
656
637
|
command: v,
|
|
657
638
|
}
|
|
658
639
|
};
|
|
659
|
-
var peg$
|
|
660
|
-
var peg$
|
|
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) {
|
|
661
642
|
return {
|
|
662
643
|
kind: 'RegularCommand',
|
|
663
644
|
loc: location(),
|
|
@@ -669,7 +650,7 @@ function peg$parse(input, options) {
|
|
|
669
650
|
},
|
|
670
651
|
}
|
|
671
652
|
};
|
|
672
|
-
var peg$
|
|
653
|
+
var peg$f50 = function(cmd, url) {
|
|
673
654
|
// https://github.com/retorquere/zotero-better-bibtex/issues/2617
|
|
674
655
|
url.value = url.value.replace(/\\([\#%])/g, '$1')
|
|
675
656
|
return {
|
|
@@ -683,7 +664,7 @@ function peg$parse(input, options) {
|
|
|
683
664
|
},
|
|
684
665
|
}
|
|
685
666
|
};
|
|
686
|
-
var peg$
|
|
667
|
+
var peg$f51 = function(cmd, url, label) {
|
|
687
668
|
// https://github.com/retorquere/zotero-better-bibtex/issues/2617
|
|
688
669
|
url.value = url.value.replace(/\\([\#%])/g, '$1')
|
|
689
670
|
return {
|
|
@@ -697,8 +678,19 @@ function peg$parse(input, options) {
|
|
|
697
678
|
},
|
|
698
679
|
}
|
|
699
680
|
};
|
|
700
|
-
var peg$
|
|
701
|
-
var peg$
|
|
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) {
|
|
684
|
+
return basicTextConversions({
|
|
685
|
+
kind: 'Text',
|
|
686
|
+
loc: location(),
|
|
687
|
+
source: text(),
|
|
688
|
+
value: v.join(''),
|
|
689
|
+
mode: 'verbatim',
|
|
690
|
+
})
|
|
691
|
+
};
|
|
692
|
+
var peg$f55 = function(cmd) { return verbatimCommands.includes(cmd) && (has_arguments[cmd] === 2) };
|
|
693
|
+
var peg$f56 = function(cmd, optional, req1, req2) {
|
|
702
694
|
return {
|
|
703
695
|
kind: 'RegularCommand',
|
|
704
696
|
loc: location(),
|
|
@@ -710,8 +702,8 @@ function peg$parse(input, options) {
|
|
|
710
702
|
},
|
|
711
703
|
}
|
|
712
704
|
};
|
|
713
|
-
var peg$
|
|
714
|
-
var peg$
|
|
705
|
+
var peg$f57 = function(cmd) { return verbatimCommands.includes(cmd) && (has_arguments[cmd] === 1) };
|
|
706
|
+
var peg$f58 = function(cmd, optional, req) {
|
|
715
707
|
return {
|
|
716
708
|
kind: 'RegularCommand',
|
|
717
709
|
loc: location(),
|
|
@@ -723,8 +715,8 @@ function peg$parse(input, options) {
|
|
|
723
715
|
},
|
|
724
716
|
}
|
|
725
717
|
};
|
|
726
|
-
var peg$
|
|
727
|
-
var peg$
|
|
718
|
+
var peg$f59 = function(cmd) { return (has_arguments[cmd] === 2) };
|
|
719
|
+
var peg$f60 = function(cmd, optional, req1, req2) {
|
|
728
720
|
return {
|
|
729
721
|
kind: 'RegularCommand',
|
|
730
722
|
loc: location(),
|
|
@@ -736,8 +728,8 @@ function peg$parse(input, options) {
|
|
|
736
728
|
},
|
|
737
729
|
}
|
|
738
730
|
};
|
|
739
|
-
var peg$
|
|
740
|
-
var peg$
|
|
731
|
+
var peg$f61 = function(cmd) { return (has_arguments[cmd] === 1) };
|
|
732
|
+
var peg$f62 = function(cmd, optional, req) {
|
|
741
733
|
let m
|
|
742
734
|
if (req.kind === 'Block') {
|
|
743
735
|
switch (cmd) {
|
|
@@ -787,7 +779,7 @@ function peg$parse(input, options) {
|
|
|
787
779
|
}
|
|
788
780
|
}
|
|
789
781
|
};
|
|
790
|
-
var peg$
|
|
782
|
+
var peg$f63 = function(cmd, optional) {
|
|
791
783
|
return {
|
|
792
784
|
kind: 'RegularCommand',
|
|
793
785
|
loc: location(),
|
|
@@ -799,7 +791,18 @@ function peg$parse(input, options) {
|
|
|
799
791
|
}
|
|
800
792
|
}
|
|
801
793
|
};
|
|
802
|
-
var peg$
|
|
794
|
+
var peg$f64 = function(char) { return char !== verbatim.delim };
|
|
795
|
+
var peg$f65 = function(char) { return char };
|
|
796
|
+
var peg$f66 = function(char) {
|
|
797
|
+
return basicTextConversions({
|
|
798
|
+
kind: 'Text',
|
|
799
|
+
loc: location(),
|
|
800
|
+
source: text(),
|
|
801
|
+
value: char,
|
|
802
|
+
mode: math.on ? 'math' : 'text',
|
|
803
|
+
})
|
|
804
|
+
};
|
|
805
|
+
var peg$f67 = function(v) {
|
|
803
806
|
return basicTextConversions({
|
|
804
807
|
kind: 'Text', // this isn't really correct but I don't need these right now
|
|
805
808
|
loc: location(),
|
|
@@ -808,7 +811,7 @@ function peg$parse(input, options) {
|
|
|
808
811
|
mode: math.on ? 'math' : 'text',
|
|
809
812
|
})
|
|
810
813
|
};
|
|
811
|
-
var peg$
|
|
814
|
+
var peg$f68 = function(v) {
|
|
812
815
|
return basicTextConversions({
|
|
813
816
|
kind: 'Text',
|
|
814
817
|
loc: location(),
|
|
@@ -817,7 +820,7 @@ function peg$parse(input, options) {
|
|
|
817
820
|
mode: math.on ? 'math' : 'text',
|
|
818
821
|
})
|
|
819
822
|
};
|
|
820
|
-
var peg$
|
|
823
|
+
var peg$f69 = function(v) { return v };
|
|
821
824
|
var peg$currPos = 0;
|
|
822
825
|
var peg$savedPos = 0;
|
|
823
826
|
var peg$posDetailsCache = [{ line: 1, column: 1 }];
|
|
@@ -2041,7 +2044,7 @@ function peg$parse(input, options) {
|
|
|
2041
2044
|
}
|
|
2042
2045
|
|
|
2043
2046
|
function peg$parseRegularValue() {
|
|
2044
|
-
var s0, s1, s2, s3, s4
|
|
2047
|
+
var s0, s1, s2, s3, s4;
|
|
2045
2048
|
|
|
2046
2049
|
s0 = peg$currPos;
|
|
2047
2050
|
if (input.charCodeAt(peg$currPos) === 34) {
|
|
@@ -2106,74 +2109,30 @@ function peg$parse(input, options) {
|
|
|
2106
2109
|
}
|
|
2107
2110
|
if (s0 === peg$FAILED) {
|
|
2108
2111
|
s0 = peg$currPos;
|
|
2109
|
-
if (input.
|
|
2110
|
-
s1 = peg$
|
|
2111
|
-
peg$currPos
|
|
2112
|
+
if (input.charCodeAt(peg$currPos) === 123) {
|
|
2113
|
+
s1 = peg$c2;
|
|
2114
|
+
peg$currPos++;
|
|
2112
2115
|
} else {
|
|
2113
2116
|
s1 = peg$FAILED;
|
|
2114
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2117
|
+
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
2115
2118
|
}
|
|
2116
2119
|
if (s1 !== peg$FAILED) {
|
|
2117
|
-
s2 =
|
|
2118
|
-
peg$
|
|
2119
|
-
if (peg$r10.test(input.charAt(peg$currPos))) {
|
|
2120
|
-
s3 = input.charAt(peg$currPos);
|
|
2121
|
-
peg$currPos++;
|
|
2122
|
-
} else {
|
|
2123
|
-
s3 = peg$FAILED;
|
|
2124
|
-
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
2125
|
-
}
|
|
2126
|
-
peg$silentFails--;
|
|
2120
|
+
s2 = [];
|
|
2121
|
+
s3 = peg$parseEnvironment();
|
|
2127
2122
|
if (s3 === peg$FAILED) {
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
while (s4 !== peg$FAILED) {
|
|
2137
|
-
s3.push(s4);
|
|
2138
|
-
s4 = peg$parseVerbatimText();
|
|
2139
|
-
}
|
|
2140
|
-
if (input.charCodeAt(peg$currPos) === 125) {
|
|
2141
|
-
s4 = peg$c3;
|
|
2142
|
-
peg$currPos++;
|
|
2143
|
-
} else {
|
|
2144
|
-
s4 = peg$FAILED;
|
|
2145
|
-
if (peg$silentFails === 0) { peg$fail(peg$e7); }
|
|
2146
|
-
}
|
|
2147
|
-
if (s4 !== peg$FAILED) {
|
|
2148
|
-
s5 = peg$parseConcat();
|
|
2149
|
-
if (s5 === peg$FAILED) {
|
|
2150
|
-
s5 = null;
|
|
2123
|
+
s3 = peg$parseBlock();
|
|
2124
|
+
if (s3 === peg$FAILED) {
|
|
2125
|
+
s3 = peg$parseMath();
|
|
2126
|
+
if (s3 === peg$FAILED) {
|
|
2127
|
+
s3 = peg$parseCommand();
|
|
2128
|
+
if (s3 === peg$FAILED) {
|
|
2129
|
+
s3 = peg$parseText();
|
|
2130
|
+
}
|
|
2151
2131
|
}
|
|
2152
|
-
peg$savedPos = s0;
|
|
2153
|
-
s0 = peg$f25(s3);
|
|
2154
|
-
} else {
|
|
2155
|
-
peg$currPos = s0;
|
|
2156
|
-
s0 = peg$FAILED;
|
|
2157
2132
|
}
|
|
2158
|
-
} else {
|
|
2159
|
-
peg$currPos = s0;
|
|
2160
|
-
s0 = peg$FAILED;
|
|
2161
|
-
}
|
|
2162
|
-
} else {
|
|
2163
|
-
peg$currPos = s0;
|
|
2164
|
-
s0 = peg$FAILED;
|
|
2165
|
-
}
|
|
2166
|
-
if (s0 === peg$FAILED) {
|
|
2167
|
-
s0 = peg$currPos;
|
|
2168
|
-
if (input.charCodeAt(peg$currPos) === 123) {
|
|
2169
|
-
s1 = peg$c2;
|
|
2170
|
-
peg$currPos++;
|
|
2171
|
-
} else {
|
|
2172
|
-
s1 = peg$FAILED;
|
|
2173
|
-
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
2174
2133
|
}
|
|
2175
|
-
|
|
2176
|
-
s2
|
|
2134
|
+
while (s3 !== peg$FAILED) {
|
|
2135
|
+
s2.push(s3);
|
|
2177
2136
|
s3 = peg$parseEnvironment();
|
|
2178
2137
|
if (s3 === peg$FAILED) {
|
|
2179
2138
|
s3 = peg$parseBlock();
|
|
@@ -2187,58 +2146,42 @@ function peg$parse(input, options) {
|
|
|
2187
2146
|
}
|
|
2188
2147
|
}
|
|
2189
2148
|
}
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
}
|
|
2203
|
-
}
|
|
2204
|
-
}
|
|
2205
|
-
}
|
|
2206
|
-
if (input.charCodeAt(peg$currPos) === 125) {
|
|
2207
|
-
s3 = peg$c3;
|
|
2208
|
-
peg$currPos++;
|
|
2209
|
-
} else {
|
|
2210
|
-
s3 = peg$FAILED;
|
|
2211
|
-
if (peg$silentFails === 0) { peg$fail(peg$e7); }
|
|
2212
|
-
}
|
|
2213
|
-
if (s3 !== peg$FAILED) {
|
|
2214
|
-
s4 = peg$parseConcat();
|
|
2215
|
-
if (s4 === peg$FAILED) {
|
|
2216
|
-
s4 = null;
|
|
2217
|
-
}
|
|
2218
|
-
peg$savedPos = s0;
|
|
2219
|
-
s0 = peg$f26(s2);
|
|
2220
|
-
} else {
|
|
2221
|
-
peg$currPos = s0;
|
|
2222
|
-
s0 = peg$FAILED;
|
|
2149
|
+
}
|
|
2150
|
+
if (input.charCodeAt(peg$currPos) === 125) {
|
|
2151
|
+
s3 = peg$c3;
|
|
2152
|
+
peg$currPos++;
|
|
2153
|
+
} else {
|
|
2154
|
+
s3 = peg$FAILED;
|
|
2155
|
+
if (peg$silentFails === 0) { peg$fail(peg$e7); }
|
|
2156
|
+
}
|
|
2157
|
+
if (s3 !== peg$FAILED) {
|
|
2158
|
+
s4 = peg$parseConcat();
|
|
2159
|
+
if (s4 === peg$FAILED) {
|
|
2160
|
+
s4 = null;
|
|
2223
2161
|
}
|
|
2162
|
+
peg$savedPos = s0;
|
|
2163
|
+
s0 = peg$f25(s2);
|
|
2224
2164
|
} else {
|
|
2225
2165
|
peg$currPos = s0;
|
|
2226
2166
|
s0 = peg$FAILED;
|
|
2227
2167
|
}
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
peg$currPos = s0;
|
|
2240
|
-
s0 = peg$FAILED;
|
|
2168
|
+
} else {
|
|
2169
|
+
peg$currPos = s0;
|
|
2170
|
+
s0 = peg$FAILED;
|
|
2171
|
+
}
|
|
2172
|
+
if (s0 === peg$FAILED) {
|
|
2173
|
+
s0 = peg$currPos;
|
|
2174
|
+
s1 = peg$parseStringReference();
|
|
2175
|
+
if (s1 !== peg$FAILED) {
|
|
2176
|
+
s2 = peg$parseConcat();
|
|
2177
|
+
if (s2 === peg$FAILED) {
|
|
2178
|
+
s2 = null;
|
|
2241
2179
|
}
|
|
2180
|
+
peg$savedPos = s0;
|
|
2181
|
+
s0 = peg$f26(s1);
|
|
2182
|
+
} else {
|
|
2183
|
+
peg$currPos = s0;
|
|
2184
|
+
s0 = peg$FAILED;
|
|
2242
2185
|
}
|
|
2243
2186
|
}
|
|
2244
2187
|
}
|
|
@@ -2257,7 +2200,7 @@ function peg$parse(input, options) {
|
|
|
2257
2200
|
s2 = null;
|
|
2258
2201
|
}
|
|
2259
2202
|
peg$savedPos = s0;
|
|
2260
|
-
s0 = peg$
|
|
2203
|
+
s0 = peg$f27(s1);
|
|
2261
2204
|
} else {
|
|
2262
2205
|
peg$currPos = s0;
|
|
2263
2206
|
s0 = peg$FAILED;
|
|
@@ -2271,22 +2214,22 @@ function peg$parse(input, options) {
|
|
|
2271
2214
|
|
|
2272
2215
|
s0 = peg$currPos;
|
|
2273
2216
|
s1 = [];
|
|
2274
|
-
if (peg$
|
|
2217
|
+
if (peg$r10.test(input.charAt(peg$currPos))) {
|
|
2275
2218
|
s2 = input.charAt(peg$currPos);
|
|
2276
2219
|
peg$currPos++;
|
|
2277
2220
|
} else {
|
|
2278
2221
|
s2 = peg$FAILED;
|
|
2279
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2222
|
+
if (peg$silentFails === 0) { peg$fail(peg$e18); }
|
|
2280
2223
|
}
|
|
2281
2224
|
if (s2 !== peg$FAILED) {
|
|
2282
2225
|
while (s2 !== peg$FAILED) {
|
|
2283
2226
|
s1.push(s2);
|
|
2284
|
-
if (peg$
|
|
2227
|
+
if (peg$r10.test(input.charAt(peg$currPos))) {
|
|
2285
2228
|
s2 = input.charAt(peg$currPos);
|
|
2286
2229
|
peg$currPos++;
|
|
2287
2230
|
} else {
|
|
2288
2231
|
s2 = peg$FAILED;
|
|
2289
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2232
|
+
if (peg$silentFails === 0) { peg$fail(peg$e18); }
|
|
2290
2233
|
}
|
|
2291
2234
|
}
|
|
2292
2235
|
} else {
|
|
@@ -2294,7 +2237,7 @@ function peg$parse(input, options) {
|
|
|
2294
2237
|
}
|
|
2295
2238
|
if (s1 !== peg$FAILED) {
|
|
2296
2239
|
peg$savedPos = s0;
|
|
2297
|
-
s1 = peg$
|
|
2240
|
+
s1 = peg$f28(s1);
|
|
2298
2241
|
}
|
|
2299
2242
|
s0 = s1;
|
|
2300
2243
|
|
|
@@ -2306,22 +2249,22 @@ function peg$parse(input, options) {
|
|
|
2306
2249
|
|
|
2307
2250
|
s0 = peg$currPos;
|
|
2308
2251
|
s1 = [];
|
|
2309
|
-
if (peg$
|
|
2252
|
+
if (peg$r11.test(input.charAt(peg$currPos))) {
|
|
2310
2253
|
s2 = input.charAt(peg$currPos);
|
|
2311
2254
|
peg$currPos++;
|
|
2312
2255
|
} else {
|
|
2313
2256
|
s2 = peg$FAILED;
|
|
2314
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2257
|
+
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
2315
2258
|
}
|
|
2316
2259
|
if (s2 !== peg$FAILED) {
|
|
2317
2260
|
while (s2 !== peg$FAILED) {
|
|
2318
2261
|
s1.push(s2);
|
|
2319
|
-
if (peg$
|
|
2262
|
+
if (peg$r11.test(input.charAt(peg$currPos))) {
|
|
2320
2263
|
s2 = input.charAt(peg$currPos);
|
|
2321
2264
|
peg$currPos++;
|
|
2322
2265
|
} else {
|
|
2323
2266
|
s2 = peg$FAILED;
|
|
2324
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2267
|
+
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
2325
2268
|
}
|
|
2326
2269
|
}
|
|
2327
2270
|
} else {
|
|
@@ -2329,7 +2272,7 @@ function peg$parse(input, options) {
|
|
|
2329
2272
|
}
|
|
2330
2273
|
if (s1 !== peg$FAILED) {
|
|
2331
2274
|
peg$savedPos = s0;
|
|
2332
|
-
s1 = peg$
|
|
2275
|
+
s1 = peg$f29(s1);
|
|
2333
2276
|
}
|
|
2334
2277
|
s0 = s1;
|
|
2335
2278
|
|
|
@@ -2342,22 +2285,22 @@ function peg$parse(input, options) {
|
|
|
2342
2285
|
s0 = peg$currPos;
|
|
2343
2286
|
s1 = peg$currPos;
|
|
2344
2287
|
s2 = [];
|
|
2345
|
-
if (peg$
|
|
2288
|
+
if (peg$r12.test(input.charAt(peg$currPos))) {
|
|
2346
2289
|
s3 = input.charAt(peg$currPos);
|
|
2347
2290
|
peg$currPos++;
|
|
2348
2291
|
} else {
|
|
2349
2292
|
s3 = peg$FAILED;
|
|
2350
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2293
|
+
if (peg$silentFails === 0) { peg$fail(peg$e20); }
|
|
2351
2294
|
}
|
|
2352
2295
|
if (s3 !== peg$FAILED) {
|
|
2353
2296
|
while (s3 !== peg$FAILED) {
|
|
2354
2297
|
s2.push(s3);
|
|
2355
|
-
if (peg$
|
|
2298
|
+
if (peg$r12.test(input.charAt(peg$currPos))) {
|
|
2356
2299
|
s3 = input.charAt(peg$currPos);
|
|
2357
2300
|
peg$currPos++;
|
|
2358
2301
|
} else {
|
|
2359
2302
|
s3 = peg$FAILED;
|
|
2360
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2303
|
+
if (peg$silentFails === 0) { peg$fail(peg$e20); }
|
|
2361
2304
|
}
|
|
2362
2305
|
}
|
|
2363
2306
|
} else {
|
|
@@ -2370,7 +2313,7 @@ function peg$parse(input, options) {
|
|
|
2370
2313
|
}
|
|
2371
2314
|
if (s1 !== peg$FAILED) {
|
|
2372
2315
|
peg$savedPos = s0;
|
|
2373
|
-
s1 = peg$
|
|
2316
|
+
s1 = peg$f30(s1);
|
|
2374
2317
|
}
|
|
2375
2318
|
s0 = s1;
|
|
2376
2319
|
|
|
@@ -2384,7 +2327,7 @@ function peg$parse(input, options) {
|
|
|
2384
2327
|
s1 = peg$parseVariableName();
|
|
2385
2328
|
if (s1 !== peg$FAILED) {
|
|
2386
2329
|
peg$savedPos = s0;
|
|
2387
|
-
s1 = peg$
|
|
2330
|
+
s1 = peg$f31(s1);
|
|
2388
2331
|
}
|
|
2389
2332
|
s0 = s1;
|
|
2390
2333
|
|
|
@@ -2395,32 +2338,32 @@ function peg$parse(input, options) {
|
|
|
2395
2338
|
var s0, s1, s2, s3, s4, s5, s6, s7, s8;
|
|
2396
2339
|
|
|
2397
2340
|
s0 = peg$currPos;
|
|
2398
|
-
if (input.substr(peg$currPos, 7) === peg$
|
|
2399
|
-
s1 = peg$
|
|
2341
|
+
if (input.substr(peg$currPos, 7) === peg$c8) {
|
|
2342
|
+
s1 = peg$c8;
|
|
2400
2343
|
peg$currPos += 7;
|
|
2401
2344
|
} else {
|
|
2402
2345
|
s1 = peg$FAILED;
|
|
2403
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2346
|
+
if (peg$silentFails === 0) { peg$fail(peg$e21); }
|
|
2404
2347
|
}
|
|
2405
2348
|
if (s1 !== peg$FAILED) {
|
|
2406
2349
|
s2 = peg$currPos;
|
|
2407
2350
|
s3 = [];
|
|
2408
|
-
if (peg$
|
|
2351
|
+
if (peg$r13.test(input.charAt(peg$currPos))) {
|
|
2409
2352
|
s4 = input.charAt(peg$currPos);
|
|
2410
2353
|
peg$currPos++;
|
|
2411
2354
|
} else {
|
|
2412
2355
|
s4 = peg$FAILED;
|
|
2413
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2356
|
+
if (peg$silentFails === 0) { peg$fail(peg$e22); }
|
|
2414
2357
|
}
|
|
2415
2358
|
if (s4 !== peg$FAILED) {
|
|
2416
2359
|
while (s4 !== peg$FAILED) {
|
|
2417
2360
|
s3.push(s4);
|
|
2418
|
-
if (peg$
|
|
2361
|
+
if (peg$r13.test(input.charAt(peg$currPos))) {
|
|
2419
2362
|
s4 = input.charAt(peg$currPos);
|
|
2420
2363
|
peg$currPos++;
|
|
2421
2364
|
} else {
|
|
2422
2365
|
s4 = peg$FAILED;
|
|
2423
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2366
|
+
if (peg$silentFails === 0) { peg$fail(peg$e22); }
|
|
2424
2367
|
}
|
|
2425
2368
|
}
|
|
2426
2369
|
} else {
|
|
@@ -2470,32 +2413,32 @@ function peg$parse(input, options) {
|
|
|
2470
2413
|
}
|
|
2471
2414
|
}
|
|
2472
2415
|
}
|
|
2473
|
-
if (input.substr(peg$currPos, 5) === peg$
|
|
2474
|
-
s5 = peg$
|
|
2416
|
+
if (input.substr(peg$currPos, 5) === peg$c9) {
|
|
2417
|
+
s5 = peg$c9;
|
|
2475
2418
|
peg$currPos += 5;
|
|
2476
2419
|
} else {
|
|
2477
2420
|
s5 = peg$FAILED;
|
|
2478
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2421
|
+
if (peg$silentFails === 0) { peg$fail(peg$e23); }
|
|
2479
2422
|
}
|
|
2480
2423
|
if (s5 !== peg$FAILED) {
|
|
2481
2424
|
s6 = peg$currPos;
|
|
2482
2425
|
s7 = [];
|
|
2483
|
-
if (peg$
|
|
2426
|
+
if (peg$r13.test(input.charAt(peg$currPos))) {
|
|
2484
2427
|
s8 = input.charAt(peg$currPos);
|
|
2485
2428
|
peg$currPos++;
|
|
2486
2429
|
} else {
|
|
2487
2430
|
s8 = peg$FAILED;
|
|
2488
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2431
|
+
if (peg$silentFails === 0) { peg$fail(peg$e22); }
|
|
2489
2432
|
}
|
|
2490
2433
|
if (s8 !== peg$FAILED) {
|
|
2491
2434
|
while (s8 !== peg$FAILED) {
|
|
2492
2435
|
s7.push(s8);
|
|
2493
|
-
if (peg$
|
|
2436
|
+
if (peg$r13.test(input.charAt(peg$currPos))) {
|
|
2494
2437
|
s8 = input.charAt(peg$currPos);
|
|
2495
2438
|
peg$currPos++;
|
|
2496
2439
|
} else {
|
|
2497
2440
|
s8 = peg$FAILED;
|
|
2498
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2441
|
+
if (peg$silentFails === 0) { peg$fail(peg$e22); }
|
|
2499
2442
|
}
|
|
2500
2443
|
}
|
|
2501
2444
|
} else {
|
|
@@ -2516,7 +2459,7 @@ function peg$parse(input, options) {
|
|
|
2516
2459
|
}
|
|
2517
2460
|
if (s7 !== peg$FAILED) {
|
|
2518
2461
|
peg$savedPos = peg$currPos;
|
|
2519
|
-
s8 = peg$
|
|
2462
|
+
s8 = peg$f32(s2, s4, s6);
|
|
2520
2463
|
if (s8) {
|
|
2521
2464
|
s8 = undefined;
|
|
2522
2465
|
} else {
|
|
@@ -2524,7 +2467,7 @@ function peg$parse(input, options) {
|
|
|
2524
2467
|
}
|
|
2525
2468
|
if (s8 !== peg$FAILED) {
|
|
2526
2469
|
peg$savedPos = s0;
|
|
2527
|
-
s0 = peg$
|
|
2470
|
+
s0 = peg$f33(s2, s4, s6);
|
|
2528
2471
|
} else {
|
|
2529
2472
|
peg$currPos = s0;
|
|
2530
2473
|
s0 = peg$FAILED;
|
|
@@ -2561,40 +2504,40 @@ function peg$parse(input, options) {
|
|
|
2561
2504
|
var s0, s1, s2, s3, s4, s5, s6;
|
|
2562
2505
|
|
|
2563
2506
|
s0 = peg$currPos;
|
|
2564
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
2565
|
-
s1 = peg$
|
|
2507
|
+
if (input.substr(peg$currPos, 2) === peg$c10) {
|
|
2508
|
+
s1 = peg$c10;
|
|
2566
2509
|
peg$currPos += 2;
|
|
2567
2510
|
} else {
|
|
2568
2511
|
s1 = peg$FAILED;
|
|
2569
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2512
|
+
if (peg$silentFails === 0) { peg$fail(peg$e24); }
|
|
2570
2513
|
}
|
|
2571
2514
|
if (s1 !== peg$FAILED) {
|
|
2572
2515
|
s2 = peg$parseExtendedDiacritic();
|
|
2573
2516
|
if (s2 !== peg$FAILED) {
|
|
2574
2517
|
s3 = peg$parse__();
|
|
2575
|
-
if (peg$
|
|
2518
|
+
if (peg$r13.test(input.charAt(peg$currPos))) {
|
|
2576
2519
|
s4 = input.charAt(peg$currPos);
|
|
2577
2520
|
peg$currPos++;
|
|
2578
2521
|
} else {
|
|
2579
2522
|
s4 = peg$FAILED;
|
|
2580
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2523
|
+
if (peg$silentFails === 0) { peg$fail(peg$e22); }
|
|
2581
2524
|
}
|
|
2582
2525
|
if (s4 === peg$FAILED) {
|
|
2583
2526
|
s4 = peg$currPos;
|
|
2584
2527
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
2585
|
-
s5 = peg$
|
|
2528
|
+
s5 = peg$c11;
|
|
2586
2529
|
peg$currPos++;
|
|
2587
2530
|
} else {
|
|
2588
2531
|
s5 = peg$FAILED;
|
|
2589
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2532
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
2590
2533
|
}
|
|
2591
2534
|
if (s5 !== peg$FAILED) {
|
|
2592
|
-
if (peg$
|
|
2535
|
+
if (peg$r14.test(input.charAt(peg$currPos))) {
|
|
2593
2536
|
s6 = input.charAt(peg$currPos);
|
|
2594
2537
|
peg$currPos++;
|
|
2595
2538
|
} else {
|
|
2596
2539
|
s6 = peg$FAILED;
|
|
2597
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2540
|
+
if (peg$silentFails === 0) { peg$fail(peg$e26); }
|
|
2598
2541
|
}
|
|
2599
2542
|
if (s6 !== peg$FAILED) {
|
|
2600
2543
|
s5 = [s5, s6];
|
|
@@ -2618,7 +2561,7 @@ function peg$parse(input, options) {
|
|
|
2618
2561
|
}
|
|
2619
2562
|
if (s5 !== peg$FAILED) {
|
|
2620
2563
|
peg$savedPos = s0;
|
|
2621
|
-
s0 = peg$
|
|
2564
|
+
s0 = peg$f34(s2, s4);
|
|
2622
2565
|
} else {
|
|
2623
2566
|
peg$currPos = s0;
|
|
2624
2567
|
s0 = peg$FAILED;
|
|
@@ -2637,70 +2580,30 @@ function peg$parse(input, options) {
|
|
|
2637
2580
|
}
|
|
2638
2581
|
if (s0 === peg$FAILED) {
|
|
2639
2582
|
s0 = peg$currPos;
|
|
2640
|
-
if (input.
|
|
2641
|
-
s1 = peg$
|
|
2642
|
-
peg$currPos
|
|
2583
|
+
if (input.charCodeAt(peg$currPos) === 123) {
|
|
2584
|
+
s1 = peg$c2;
|
|
2585
|
+
peg$currPos++;
|
|
2643
2586
|
} else {
|
|
2644
2587
|
s1 = peg$FAILED;
|
|
2645
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2588
|
+
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
2646
2589
|
}
|
|
2647
2590
|
if (s1 !== peg$FAILED) {
|
|
2648
|
-
s2 =
|
|
2649
|
-
peg$
|
|
2650
|
-
if (peg$r10.test(input.charAt(peg$currPos))) {
|
|
2651
|
-
s3 = input.charAt(peg$currPos);
|
|
2652
|
-
peg$currPos++;
|
|
2653
|
-
} else {
|
|
2654
|
-
s3 = peg$FAILED;
|
|
2655
|
-
if (peg$silentFails === 0) { peg$fail(peg$e19); }
|
|
2656
|
-
}
|
|
2657
|
-
peg$silentFails--;
|
|
2591
|
+
s2 = [];
|
|
2592
|
+
s3 = peg$parseEnvironment();
|
|
2658
2593
|
if (s3 === peg$FAILED) {
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
s3.push(s4);
|
|
2669
|
-
s4 = peg$parseVerbatimText();
|
|
2670
|
-
}
|
|
2671
|
-
if (input.charCodeAt(peg$currPos) === 125) {
|
|
2672
|
-
s4 = peg$c3;
|
|
2673
|
-
peg$currPos++;
|
|
2674
|
-
} else {
|
|
2675
|
-
s4 = peg$FAILED;
|
|
2676
|
-
if (peg$silentFails === 0) { peg$fail(peg$e7); }
|
|
2677
|
-
}
|
|
2678
|
-
if (s4 !== peg$FAILED) {
|
|
2679
|
-
peg$savedPos = s0;
|
|
2680
|
-
s0 = peg$f36(s3);
|
|
2681
|
-
} else {
|
|
2682
|
-
peg$currPos = s0;
|
|
2683
|
-
s0 = peg$FAILED;
|
|
2594
|
+
s3 = peg$parseBlock();
|
|
2595
|
+
if (s3 === peg$FAILED) {
|
|
2596
|
+
s3 = peg$parseCommand();
|
|
2597
|
+
if (s3 === peg$FAILED) {
|
|
2598
|
+
s3 = peg$parseMath();
|
|
2599
|
+
if (s3 === peg$FAILED) {
|
|
2600
|
+
s3 = peg$parseText();
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2684
2603
|
}
|
|
2685
|
-
} else {
|
|
2686
|
-
peg$currPos = s0;
|
|
2687
|
-
s0 = peg$FAILED;
|
|
2688
|
-
}
|
|
2689
|
-
} else {
|
|
2690
|
-
peg$currPos = s0;
|
|
2691
|
-
s0 = peg$FAILED;
|
|
2692
|
-
}
|
|
2693
|
-
if (s0 === peg$FAILED) {
|
|
2694
|
-
s0 = peg$currPos;
|
|
2695
|
-
if (input.charCodeAt(peg$currPos) === 123) {
|
|
2696
|
-
s1 = peg$c2;
|
|
2697
|
-
peg$currPos++;
|
|
2698
|
-
} else {
|
|
2699
|
-
s1 = peg$FAILED;
|
|
2700
|
-
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
2701
2604
|
}
|
|
2702
|
-
|
|
2703
|
-
s2
|
|
2605
|
+
while (s3 !== peg$FAILED) {
|
|
2606
|
+
s2.push(s3);
|
|
2704
2607
|
s3 = peg$parseEnvironment();
|
|
2705
2608
|
if (s3 === peg$FAILED) {
|
|
2706
2609
|
s3 = peg$parseBlock();
|
|
@@ -2714,40 +2617,24 @@ function peg$parse(input, options) {
|
|
|
2714
2617
|
}
|
|
2715
2618
|
}
|
|
2716
2619
|
}
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
}
|
|
2729
|
-
}
|
|
2730
|
-
}
|
|
2731
|
-
}
|
|
2732
|
-
}
|
|
2733
|
-
if (input.charCodeAt(peg$currPos) === 125) {
|
|
2734
|
-
s3 = peg$c3;
|
|
2735
|
-
peg$currPos++;
|
|
2736
|
-
} else {
|
|
2737
|
-
s3 = peg$FAILED;
|
|
2738
|
-
if (peg$silentFails === 0) { peg$fail(peg$e7); }
|
|
2739
|
-
}
|
|
2740
|
-
if (s3 !== peg$FAILED) {
|
|
2741
|
-
peg$savedPos = s0;
|
|
2742
|
-
s0 = peg$f37(s2);
|
|
2743
|
-
} else {
|
|
2744
|
-
peg$currPos = s0;
|
|
2745
|
-
s0 = peg$FAILED;
|
|
2746
|
-
}
|
|
2620
|
+
}
|
|
2621
|
+
if (input.charCodeAt(peg$currPos) === 125) {
|
|
2622
|
+
s3 = peg$c3;
|
|
2623
|
+
peg$currPos++;
|
|
2624
|
+
} else {
|
|
2625
|
+
s3 = peg$FAILED;
|
|
2626
|
+
if (peg$silentFails === 0) { peg$fail(peg$e7); }
|
|
2627
|
+
}
|
|
2628
|
+
if (s3 !== peg$FAILED) {
|
|
2629
|
+
peg$savedPos = s0;
|
|
2630
|
+
s0 = peg$f35(s2);
|
|
2747
2631
|
} else {
|
|
2748
2632
|
peg$currPos = s0;
|
|
2749
2633
|
s0 = peg$FAILED;
|
|
2750
2634
|
}
|
|
2635
|
+
} else {
|
|
2636
|
+
peg$currPos = s0;
|
|
2637
|
+
s0 = peg$FAILED;
|
|
2751
2638
|
}
|
|
2752
2639
|
}
|
|
2753
2640
|
|
|
@@ -2759,7 +2646,7 @@ function peg$parse(input, options) {
|
|
|
2759
2646
|
|
|
2760
2647
|
s0 = peg$currPos;
|
|
2761
2648
|
peg$savedPos = peg$currPos;
|
|
2762
|
-
s1 = peg$
|
|
2649
|
+
s1 = peg$f36();
|
|
2763
2650
|
if (s1) {
|
|
2764
2651
|
s1 = undefined;
|
|
2765
2652
|
} else {
|
|
@@ -2767,33 +2654,33 @@ function peg$parse(input, options) {
|
|
|
2767
2654
|
}
|
|
2768
2655
|
if (s1 !== peg$FAILED) {
|
|
2769
2656
|
if (input.charCodeAt(peg$currPos) === 36) {
|
|
2770
|
-
s2 = peg$
|
|
2657
|
+
s2 = peg$c12;
|
|
2771
2658
|
peg$currPos++;
|
|
2772
2659
|
} else {
|
|
2773
2660
|
s2 = peg$FAILED;
|
|
2774
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2661
|
+
if (peg$silentFails === 0) { peg$fail(peg$e27); }
|
|
2775
2662
|
}
|
|
2776
2663
|
if (s2 === peg$FAILED) {
|
|
2777
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
2778
|
-
s2 = peg$
|
|
2664
|
+
if (input.substr(peg$currPos, 2) === peg$c13) {
|
|
2665
|
+
s2 = peg$c13;
|
|
2779
2666
|
peg$currPos += 2;
|
|
2780
2667
|
} else {
|
|
2781
2668
|
s2 = peg$FAILED;
|
|
2782
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2669
|
+
if (peg$silentFails === 0) { peg$fail(peg$e28); }
|
|
2783
2670
|
}
|
|
2784
2671
|
if (s2 === peg$FAILED) {
|
|
2785
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
2786
|
-
s2 = peg$
|
|
2672
|
+
if (input.substr(peg$currPos, 2) === peg$c14) {
|
|
2673
|
+
s2 = peg$c14;
|
|
2787
2674
|
peg$currPos += 2;
|
|
2788
2675
|
} else {
|
|
2789
2676
|
s2 = peg$FAILED;
|
|
2790
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2677
|
+
if (peg$silentFails === 0) { peg$fail(peg$e29); }
|
|
2791
2678
|
}
|
|
2792
2679
|
}
|
|
2793
2680
|
}
|
|
2794
2681
|
if (s2 !== peg$FAILED) {
|
|
2795
2682
|
peg$savedPos = peg$currPos;
|
|
2796
|
-
s3 = peg$
|
|
2683
|
+
s3 = peg$f37(s2);
|
|
2797
2684
|
if (s3) {
|
|
2798
2685
|
s3 = undefined;
|
|
2799
2686
|
} else {
|
|
@@ -2819,33 +2706,33 @@ function peg$parse(input, options) {
|
|
|
2819
2706
|
}
|
|
2820
2707
|
}
|
|
2821
2708
|
if (input.charCodeAt(peg$currPos) === 36) {
|
|
2822
|
-
s5 = peg$
|
|
2709
|
+
s5 = peg$c12;
|
|
2823
2710
|
peg$currPos++;
|
|
2824
2711
|
} else {
|
|
2825
2712
|
s5 = peg$FAILED;
|
|
2826
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2713
|
+
if (peg$silentFails === 0) { peg$fail(peg$e27); }
|
|
2827
2714
|
}
|
|
2828
2715
|
if (s5 === peg$FAILED) {
|
|
2829
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
2830
|
-
s5 = peg$
|
|
2716
|
+
if (input.substr(peg$currPos, 2) === peg$c13) {
|
|
2717
|
+
s5 = peg$c13;
|
|
2831
2718
|
peg$currPos += 2;
|
|
2832
2719
|
} else {
|
|
2833
2720
|
s5 = peg$FAILED;
|
|
2834
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2721
|
+
if (peg$silentFails === 0) { peg$fail(peg$e28); }
|
|
2835
2722
|
}
|
|
2836
2723
|
if (s5 === peg$FAILED) {
|
|
2837
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
2838
|
-
s5 = peg$
|
|
2724
|
+
if (input.substr(peg$currPos, 2) === peg$c15) {
|
|
2725
|
+
s5 = peg$c15;
|
|
2839
2726
|
peg$currPos += 2;
|
|
2840
2727
|
} else {
|
|
2841
2728
|
s5 = peg$FAILED;
|
|
2842
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2729
|
+
if (peg$silentFails === 0) { peg$fail(peg$e30); }
|
|
2843
2730
|
}
|
|
2844
2731
|
}
|
|
2845
2732
|
}
|
|
2846
2733
|
if (s5 !== peg$FAILED) {
|
|
2847
2734
|
peg$savedPos = peg$currPos;
|
|
2848
|
-
s6 = peg$
|
|
2735
|
+
s6 = peg$f38(s2, s4);
|
|
2849
2736
|
if (s6) {
|
|
2850
2737
|
s6 = undefined;
|
|
2851
2738
|
} else {
|
|
@@ -2853,7 +2740,7 @@ function peg$parse(input, options) {
|
|
|
2853
2740
|
}
|
|
2854
2741
|
if (s6 !== peg$FAILED) {
|
|
2855
2742
|
peg$savedPos = s0;
|
|
2856
|
-
s0 = peg$
|
|
2743
|
+
s0 = peg$f39(s2, s4);
|
|
2857
2744
|
} else {
|
|
2858
2745
|
peg$currPos = s0;
|
|
2859
2746
|
s0 = peg$FAILED;
|
|
@@ -2883,32 +2770,32 @@ function peg$parse(input, options) {
|
|
|
2883
2770
|
|
|
2884
2771
|
s0 = peg$currPos;
|
|
2885
2772
|
if (input.charCodeAt(peg$currPos) === 37) {
|
|
2886
|
-
s1 = peg$
|
|
2773
|
+
s1 = peg$c16;
|
|
2887
2774
|
peg$currPos++;
|
|
2888
2775
|
} else {
|
|
2889
2776
|
s1 = peg$FAILED;
|
|
2890
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2777
|
+
if (peg$silentFails === 0) { peg$fail(peg$e31); }
|
|
2891
2778
|
}
|
|
2892
2779
|
if (s1 !== peg$FAILED) {
|
|
2893
2780
|
s2 = peg$parse__h();
|
|
2894
2781
|
s3 = peg$currPos;
|
|
2895
2782
|
s4 = [];
|
|
2896
|
-
if (peg$
|
|
2783
|
+
if (peg$r15.test(input.charAt(peg$currPos))) {
|
|
2897
2784
|
s5 = input.charAt(peg$currPos);
|
|
2898
2785
|
peg$currPos++;
|
|
2899
2786
|
} else {
|
|
2900
2787
|
s5 = peg$FAILED;
|
|
2901
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2788
|
+
if (peg$silentFails === 0) { peg$fail(peg$e32); }
|
|
2902
2789
|
}
|
|
2903
2790
|
if (s5 !== peg$FAILED) {
|
|
2904
2791
|
while (s5 !== peg$FAILED) {
|
|
2905
2792
|
s4.push(s5);
|
|
2906
|
-
if (peg$
|
|
2793
|
+
if (peg$r15.test(input.charAt(peg$currPos))) {
|
|
2907
2794
|
s5 = input.charAt(peg$currPos);
|
|
2908
2795
|
peg$currPos++;
|
|
2909
2796
|
} else {
|
|
2910
2797
|
s5 = peg$FAILED;
|
|
2911
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2798
|
+
if (peg$silentFails === 0) { peg$fail(peg$e32); }
|
|
2912
2799
|
}
|
|
2913
2800
|
}
|
|
2914
2801
|
} else {
|
|
@@ -2932,7 +2819,7 @@ function peg$parse(input, options) {
|
|
|
2932
2819
|
}
|
|
2933
2820
|
if (s4 !== peg$FAILED) {
|
|
2934
2821
|
peg$savedPos = s0;
|
|
2935
|
-
s0 = peg$
|
|
2822
|
+
s0 = peg$f40(s3);
|
|
2936
2823
|
} else {
|
|
2937
2824
|
peg$currPos = s0;
|
|
2938
2825
|
s0 = peg$FAILED;
|
|
@@ -2963,6 +2850,9 @@ function peg$parse(input, options) {
|
|
|
2963
2850
|
s0 = peg$parseRegularCommand();
|
|
2964
2851
|
if (s0 === peg$FAILED) {
|
|
2965
2852
|
s0 = peg$parseSymbolCommand();
|
|
2853
|
+
if (s0 === peg$FAILED) {
|
|
2854
|
+
s0 = peg$parseInvalidCommand();
|
|
2855
|
+
}
|
|
2966
2856
|
}
|
|
2967
2857
|
}
|
|
2968
2858
|
}
|
|
@@ -2977,17 +2867,17 @@ function peg$parse(input, options) {
|
|
|
2977
2867
|
|
|
2978
2868
|
s0 = peg$currPos;
|
|
2979
2869
|
s1 = peg$parse__();
|
|
2980
|
-
if (input.substr(peg$currPos, 2) === peg$
|
|
2981
|
-
s2 = peg$
|
|
2870
|
+
if (input.substr(peg$currPos, 2) === peg$c17) {
|
|
2871
|
+
s2 = peg$c17;
|
|
2982
2872
|
peg$currPos += 2;
|
|
2983
2873
|
} else {
|
|
2984
2874
|
s2 = peg$FAILED;
|
|
2985
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2875
|
+
if (peg$silentFails === 0) { peg$fail(peg$e33); }
|
|
2986
2876
|
}
|
|
2987
2877
|
if (s2 !== peg$FAILED) {
|
|
2988
2878
|
s3 = peg$parse__();
|
|
2989
2879
|
peg$savedPos = s0;
|
|
2990
|
-
s0 = peg$
|
|
2880
|
+
s0 = peg$f41();
|
|
2991
2881
|
} else {
|
|
2992
2882
|
peg$currPos = s0;
|
|
2993
2883
|
s0 = peg$FAILED;
|
|
@@ -3002,45 +2892,45 @@ function peg$parse(input, options) {
|
|
|
3002
2892
|
s0 = peg$currPos;
|
|
3003
2893
|
s1 = peg$parse__h();
|
|
3004
2894
|
if (input.charCodeAt(peg$currPos) === 13) {
|
|
3005
|
-
s2 = peg$
|
|
2895
|
+
s2 = peg$c18;
|
|
3006
2896
|
peg$currPos++;
|
|
3007
2897
|
} else {
|
|
3008
2898
|
s2 = peg$FAILED;
|
|
3009
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2899
|
+
if (peg$silentFails === 0) { peg$fail(peg$e34); }
|
|
3010
2900
|
}
|
|
3011
2901
|
if (s2 === peg$FAILED) {
|
|
3012
2902
|
s2 = null;
|
|
3013
2903
|
}
|
|
3014
2904
|
if (input.charCodeAt(peg$currPos) === 10) {
|
|
3015
|
-
s3 = peg$
|
|
2905
|
+
s3 = peg$c19;
|
|
3016
2906
|
peg$currPos++;
|
|
3017
2907
|
} else {
|
|
3018
2908
|
s3 = peg$FAILED;
|
|
3019
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2909
|
+
if (peg$silentFails === 0) { peg$fail(peg$e35); }
|
|
3020
2910
|
}
|
|
3021
2911
|
if (s3 !== peg$FAILED) {
|
|
3022
2912
|
s4 = peg$parse__h();
|
|
3023
2913
|
if (input.charCodeAt(peg$currPos) === 13) {
|
|
3024
|
-
s5 = peg$
|
|
2914
|
+
s5 = peg$c18;
|
|
3025
2915
|
peg$currPos++;
|
|
3026
2916
|
} else {
|
|
3027
2917
|
s5 = peg$FAILED;
|
|
3028
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2918
|
+
if (peg$silentFails === 0) { peg$fail(peg$e34); }
|
|
3029
2919
|
}
|
|
3030
2920
|
if (s5 === peg$FAILED) {
|
|
3031
2921
|
s5 = null;
|
|
3032
2922
|
}
|
|
3033
2923
|
if (input.charCodeAt(peg$currPos) === 10) {
|
|
3034
|
-
s6 = peg$
|
|
2924
|
+
s6 = peg$c19;
|
|
3035
2925
|
peg$currPos++;
|
|
3036
2926
|
} else {
|
|
3037
2927
|
s6 = peg$FAILED;
|
|
3038
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2928
|
+
if (peg$silentFails === 0) { peg$fail(peg$e35); }
|
|
3039
2929
|
}
|
|
3040
2930
|
if (s6 !== peg$FAILED) {
|
|
3041
2931
|
s7 = peg$parse__();
|
|
3042
2932
|
peg$savedPos = s0;
|
|
3043
|
-
s0 = peg$
|
|
2933
|
+
s0 = peg$f42();
|
|
3044
2934
|
} else {
|
|
3045
2935
|
peg$currPos = s0;
|
|
3046
2936
|
s0 = peg$FAILED;
|
|
@@ -3057,19 +2947,19 @@ function peg$parse(input, options) {
|
|
|
3057
2947
|
var s0, s1, s2, s3;
|
|
3058
2948
|
|
|
3059
2949
|
s0 = peg$currPos;
|
|
3060
|
-
if (peg$
|
|
2950
|
+
if (peg$r16.test(input.charAt(peg$currPos))) {
|
|
3061
2951
|
s1 = input.charAt(peg$currPos);
|
|
3062
2952
|
peg$currPos++;
|
|
3063
2953
|
} else {
|
|
3064
2954
|
s1 = peg$FAILED;
|
|
3065
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2955
|
+
if (peg$silentFails === 0) { peg$fail(peg$e36); }
|
|
3066
2956
|
}
|
|
3067
2957
|
if (s1 !== peg$FAILED) {
|
|
3068
2958
|
s2 = peg$parse__h();
|
|
3069
2959
|
s3 = peg$parseArgument();
|
|
3070
2960
|
if (s3 !== peg$FAILED) {
|
|
3071
2961
|
peg$savedPos = s0;
|
|
3072
|
-
s0 = peg$
|
|
2962
|
+
s0 = peg$f43(s1, s3);
|
|
3073
2963
|
} else {
|
|
3074
2964
|
peg$currPos = s0;
|
|
3075
2965
|
s0 = peg$FAILED;
|
|
@@ -3087,39 +2977,39 @@ function peg$parse(input, options) {
|
|
|
3087
2977
|
|
|
3088
2978
|
s0 = peg$currPos;
|
|
3089
2979
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3090
|
-
s1 = peg$
|
|
2980
|
+
s1 = peg$c11;
|
|
3091
2981
|
peg$currPos++;
|
|
3092
2982
|
} else {
|
|
3093
2983
|
s1 = peg$FAILED;
|
|
3094
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2984
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3095
2985
|
}
|
|
3096
2986
|
if (s1 !== peg$FAILED) {
|
|
3097
2987
|
s2 = peg$parseSimpleDiacritic();
|
|
3098
2988
|
if (s2 !== peg$FAILED) {
|
|
3099
2989
|
s3 = peg$parse__();
|
|
3100
|
-
if (peg$
|
|
2990
|
+
if (peg$r13.test(input.charAt(peg$currPos))) {
|
|
3101
2991
|
s4 = input.charAt(peg$currPos);
|
|
3102
2992
|
peg$currPos++;
|
|
3103
2993
|
} else {
|
|
3104
2994
|
s4 = peg$FAILED;
|
|
3105
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
2995
|
+
if (peg$silentFails === 0) { peg$fail(peg$e22); }
|
|
3106
2996
|
}
|
|
3107
2997
|
if (s4 === peg$FAILED) {
|
|
3108
2998
|
s4 = peg$currPos;
|
|
3109
2999
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3110
|
-
s5 = peg$
|
|
3000
|
+
s5 = peg$c11;
|
|
3111
3001
|
peg$currPos++;
|
|
3112
3002
|
} else {
|
|
3113
3003
|
s5 = peg$FAILED;
|
|
3114
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3004
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3115
3005
|
}
|
|
3116
3006
|
if (s5 !== peg$FAILED) {
|
|
3117
|
-
if (peg$
|
|
3007
|
+
if (peg$r14.test(input.charAt(peg$currPos))) {
|
|
3118
3008
|
s6 = input.charAt(peg$currPos);
|
|
3119
3009
|
peg$currPos++;
|
|
3120
3010
|
} else {
|
|
3121
3011
|
s6 = peg$FAILED;
|
|
3122
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3012
|
+
if (peg$silentFails === 0) { peg$fail(peg$e26); }
|
|
3123
3013
|
}
|
|
3124
3014
|
if (s6 !== peg$FAILED) {
|
|
3125
3015
|
s5 = [s5, s6];
|
|
@@ -3135,7 +3025,7 @@ function peg$parse(input, options) {
|
|
|
3135
3025
|
}
|
|
3136
3026
|
if (s4 !== peg$FAILED) {
|
|
3137
3027
|
peg$savedPos = s0;
|
|
3138
|
-
s0 = peg$
|
|
3028
|
+
s0 = peg$f44(s2, s4);
|
|
3139
3029
|
} else {
|
|
3140
3030
|
peg$currPos = s0;
|
|
3141
3031
|
s0 = peg$FAILED;
|
|
@@ -3151,11 +3041,11 @@ function peg$parse(input, options) {
|
|
|
3151
3041
|
if (s0 === peg$FAILED) {
|
|
3152
3042
|
s0 = peg$currPos;
|
|
3153
3043
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3154
|
-
s1 = peg$
|
|
3044
|
+
s1 = peg$c11;
|
|
3155
3045
|
peg$currPos++;
|
|
3156
3046
|
} else {
|
|
3157
3047
|
s1 = peg$FAILED;
|
|
3158
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3048
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3159
3049
|
}
|
|
3160
3050
|
if (s1 !== peg$FAILED) {
|
|
3161
3051
|
s2 = peg$parseExtendedDiacritic();
|
|
@@ -3168,29 +3058,29 @@ function peg$parse(input, options) {
|
|
|
3168
3058
|
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
3169
3059
|
}
|
|
3170
3060
|
if (s3 !== peg$FAILED) {
|
|
3171
|
-
if (peg$
|
|
3061
|
+
if (peg$r13.test(input.charAt(peg$currPos))) {
|
|
3172
3062
|
s4 = input.charAt(peg$currPos);
|
|
3173
3063
|
peg$currPos++;
|
|
3174
3064
|
} else {
|
|
3175
3065
|
s4 = peg$FAILED;
|
|
3176
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3066
|
+
if (peg$silentFails === 0) { peg$fail(peg$e22); }
|
|
3177
3067
|
}
|
|
3178
3068
|
if (s4 === peg$FAILED) {
|
|
3179
3069
|
s4 = peg$currPos;
|
|
3180
3070
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3181
|
-
s5 = peg$
|
|
3071
|
+
s5 = peg$c11;
|
|
3182
3072
|
peg$currPos++;
|
|
3183
3073
|
} else {
|
|
3184
3074
|
s5 = peg$FAILED;
|
|
3185
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3075
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3186
3076
|
}
|
|
3187
3077
|
if (s5 !== peg$FAILED) {
|
|
3188
|
-
if (peg$
|
|
3078
|
+
if (peg$r14.test(input.charAt(peg$currPos))) {
|
|
3189
3079
|
s6 = input.charAt(peg$currPos);
|
|
3190
3080
|
peg$currPos++;
|
|
3191
3081
|
} else {
|
|
3192
3082
|
s6 = peg$FAILED;
|
|
3193
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3083
|
+
if (peg$silentFails === 0) { peg$fail(peg$e26); }
|
|
3194
3084
|
}
|
|
3195
3085
|
if (s6 !== peg$FAILED) {
|
|
3196
3086
|
s5 = [s5, s6];
|
|
@@ -3214,7 +3104,7 @@ function peg$parse(input, options) {
|
|
|
3214
3104
|
}
|
|
3215
3105
|
if (s5 !== peg$FAILED) {
|
|
3216
3106
|
peg$savedPos = s0;
|
|
3217
|
-
s0 = peg$
|
|
3107
|
+
s0 = peg$f45(s2, s4);
|
|
3218
3108
|
} else {
|
|
3219
3109
|
peg$currPos = s0;
|
|
3220
3110
|
s0 = peg$FAILED;
|
|
@@ -3238,11 +3128,11 @@ function peg$parse(input, options) {
|
|
|
3238
3128
|
if (s0 === peg$FAILED) {
|
|
3239
3129
|
s0 = peg$currPos;
|
|
3240
3130
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3241
|
-
s1 = peg$
|
|
3131
|
+
s1 = peg$c11;
|
|
3242
3132
|
peg$currPos++;
|
|
3243
3133
|
} else {
|
|
3244
3134
|
s1 = peg$FAILED;
|
|
3245
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3135
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3246
3136
|
}
|
|
3247
3137
|
if (s1 !== peg$FAILED) {
|
|
3248
3138
|
s2 = peg$parseExtendedDiacritic();
|
|
@@ -3267,7 +3157,7 @@ function peg$parse(input, options) {
|
|
|
3267
3157
|
s4 = peg$parseRegularValue();
|
|
3268
3158
|
if (s4 !== peg$FAILED) {
|
|
3269
3159
|
peg$savedPos = s0;
|
|
3270
|
-
s0 = peg$
|
|
3160
|
+
s0 = peg$f46(s2, s4);
|
|
3271
3161
|
} else {
|
|
3272
3162
|
peg$currPos = s0;
|
|
3273
3163
|
s0 = peg$FAILED;
|
|
@@ -3295,20 +3185,20 @@ function peg$parse(input, options) {
|
|
|
3295
3185
|
|
|
3296
3186
|
s0 = peg$currPos;
|
|
3297
3187
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3298
|
-
s1 = peg$
|
|
3188
|
+
s1 = peg$c11;
|
|
3299
3189
|
peg$currPos++;
|
|
3300
3190
|
} else {
|
|
3301
3191
|
s1 = peg$FAILED;
|
|
3302
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3192
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3303
3193
|
}
|
|
3304
3194
|
if (s1 !== peg$FAILED) {
|
|
3305
3195
|
s2 = peg$currPos;
|
|
3306
|
-
if (peg$
|
|
3196
|
+
if (peg$r17.test(input.charAt(peg$currPos))) {
|
|
3307
3197
|
s3 = input.charAt(peg$currPos);
|
|
3308
3198
|
peg$currPos++;
|
|
3309
3199
|
} else {
|
|
3310
3200
|
s3 = peg$FAILED;
|
|
3311
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3201
|
+
if (peg$silentFails === 0) { peg$fail(peg$e37); }
|
|
3312
3202
|
}
|
|
3313
3203
|
if (s3 !== peg$FAILED) {
|
|
3314
3204
|
s2 = input.substring(s2, peg$currPos);
|
|
@@ -3317,7 +3207,7 @@ function peg$parse(input, options) {
|
|
|
3317
3207
|
}
|
|
3318
3208
|
if (s2 !== peg$FAILED) {
|
|
3319
3209
|
peg$savedPos = s0;
|
|
3320
|
-
s0 = peg$
|
|
3210
|
+
s0 = peg$f47(s2);
|
|
3321
3211
|
} else {
|
|
3322
3212
|
peg$currPos = s0;
|
|
3323
3213
|
s0 = peg$FAILED;
|
|
@@ -3335,25 +3225,25 @@ function peg$parse(input, options) {
|
|
|
3335
3225
|
|
|
3336
3226
|
s0 = peg$currPos;
|
|
3337
3227
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3338
|
-
s1 = peg$
|
|
3228
|
+
s1 = peg$c11;
|
|
3339
3229
|
peg$currPos++;
|
|
3340
3230
|
} else {
|
|
3341
3231
|
s1 = peg$FAILED;
|
|
3342
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3232
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3343
3233
|
}
|
|
3344
3234
|
if (s1 !== peg$FAILED) {
|
|
3345
|
-
if (input.substr(peg$currPos, 10) === peg$
|
|
3346
|
-
s2 = peg$
|
|
3235
|
+
if (input.substr(peg$currPos, 10) === peg$c20) {
|
|
3236
|
+
s2 = peg$c20;
|
|
3347
3237
|
peg$currPos += 10;
|
|
3348
3238
|
} else {
|
|
3349
3239
|
s2 = peg$FAILED;
|
|
3350
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3240
|
+
if (peg$silentFails === 0) { peg$fail(peg$e38); }
|
|
3351
3241
|
}
|
|
3352
3242
|
if (s2 !== peg$FAILED) {
|
|
3353
3243
|
s3 = peg$parseBlock();
|
|
3354
3244
|
if (s3 !== peg$FAILED) {
|
|
3355
3245
|
peg$savedPos = peg$currPos;
|
|
3356
|
-
s4 = peg$
|
|
3246
|
+
s4 = peg$f48(s2, s3);
|
|
3357
3247
|
if (s4) {
|
|
3358
3248
|
s4 = undefined;
|
|
3359
3249
|
} else {
|
|
@@ -3369,7 +3259,7 @@ function peg$parse(input, options) {
|
|
|
3369
3259
|
s6 = peg$parseArgument();
|
|
3370
3260
|
if (s6 !== peg$FAILED) {
|
|
3371
3261
|
peg$savedPos = s0;
|
|
3372
|
-
s0 = peg$
|
|
3262
|
+
s0 = peg$f49(s2, s3, s5, s6);
|
|
3373
3263
|
} else {
|
|
3374
3264
|
peg$currPos = s0;
|
|
3375
3265
|
s0 = peg$FAILED;
|
|
@@ -3393,19 +3283,19 @@ function peg$parse(input, options) {
|
|
|
3393
3283
|
if (s0 === peg$FAILED) {
|
|
3394
3284
|
s0 = peg$currPos;
|
|
3395
3285
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3396
|
-
s1 = peg$
|
|
3286
|
+
s1 = peg$c11;
|
|
3397
3287
|
peg$currPos++;
|
|
3398
3288
|
} else {
|
|
3399
3289
|
s1 = peg$FAILED;
|
|
3400
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3290
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3401
3291
|
}
|
|
3402
3292
|
if (s1 !== peg$FAILED) {
|
|
3403
|
-
if (input.substr(peg$currPos, 3) === peg$
|
|
3404
|
-
s2 = peg$
|
|
3293
|
+
if (input.substr(peg$currPos, 3) === peg$c21) {
|
|
3294
|
+
s2 = peg$c21;
|
|
3405
3295
|
peg$currPos += 3;
|
|
3406
3296
|
} else {
|
|
3407
3297
|
s2 = peg$FAILED;
|
|
3408
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3298
|
+
if (peg$silentFails === 0) { peg$fail(peg$e39); }
|
|
3409
3299
|
}
|
|
3410
3300
|
if (s2 !== peg$FAILED) {
|
|
3411
3301
|
s3 = peg$parse__h();
|
|
@@ -3429,7 +3319,7 @@ function peg$parse(input, options) {
|
|
|
3429
3319
|
s5 = peg$parseVerbatimFieldValue();
|
|
3430
3320
|
if (s5 !== peg$FAILED) {
|
|
3431
3321
|
peg$savedPos = s0;
|
|
3432
|
-
s0 = peg$
|
|
3322
|
+
s0 = peg$f50(s2, s5);
|
|
3433
3323
|
} else {
|
|
3434
3324
|
peg$currPos = s0;
|
|
3435
3325
|
s0 = peg$FAILED;
|
|
@@ -3449,19 +3339,19 @@ function peg$parse(input, options) {
|
|
|
3449
3339
|
if (s0 === peg$FAILED) {
|
|
3450
3340
|
s0 = peg$currPos;
|
|
3451
3341
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3452
|
-
s1 = peg$
|
|
3342
|
+
s1 = peg$c11;
|
|
3453
3343
|
peg$currPos++;
|
|
3454
3344
|
} else {
|
|
3455
3345
|
s1 = peg$FAILED;
|
|
3456
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3346
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3457
3347
|
}
|
|
3458
3348
|
if (s1 !== peg$FAILED) {
|
|
3459
|
-
if (input.substr(peg$currPos, 4) === peg$
|
|
3460
|
-
s2 = peg$
|
|
3349
|
+
if (input.substr(peg$currPos, 4) === peg$c22) {
|
|
3350
|
+
s2 = peg$c22;
|
|
3461
3351
|
peg$currPos += 4;
|
|
3462
3352
|
} else {
|
|
3463
3353
|
s2 = peg$FAILED;
|
|
3464
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3354
|
+
if (peg$silentFails === 0) { peg$fail(peg$e40); }
|
|
3465
3355
|
}
|
|
3466
3356
|
if (s2 !== peg$FAILED) {
|
|
3467
3357
|
s3 = peg$parse__h();
|
|
@@ -3487,7 +3377,7 @@ function peg$parse(input, options) {
|
|
|
3487
3377
|
s6 = peg$parseArgument();
|
|
3488
3378
|
if (s6 !== peg$FAILED) {
|
|
3489
3379
|
peg$savedPos = s0;
|
|
3490
|
-
s0 = peg$
|
|
3380
|
+
s0 = peg$f51(s2, s5, s6);
|
|
3491
3381
|
} else {
|
|
3492
3382
|
peg$currPos = s0;
|
|
3493
3383
|
s0 = peg$FAILED;
|
|
@@ -3510,127 +3400,54 @@ function peg$parse(input, options) {
|
|
|
3510
3400
|
}
|
|
3511
3401
|
if (s0 === peg$FAILED) {
|
|
3512
3402
|
s0 = peg$currPos;
|
|
3513
|
-
if (input.
|
|
3514
|
-
s1 = peg$
|
|
3515
|
-
peg$currPos
|
|
3403
|
+
if (input.substr(peg$currPos, 5) === peg$c23) {
|
|
3404
|
+
s1 = peg$c23;
|
|
3405
|
+
peg$currPos += 5;
|
|
3516
3406
|
} else {
|
|
3517
3407
|
s1 = peg$FAILED;
|
|
3518
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3408
|
+
if (peg$silentFails === 0) { peg$fail(peg$e41); }
|
|
3519
3409
|
}
|
|
3520
3410
|
if (s1 !== peg$FAILED) {
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
s3 = peg$c24;
|
|
3525
|
-
peg$currPos += 5;
|
|
3526
|
-
} else {
|
|
3527
|
-
s3 = peg$FAILED;
|
|
3528
|
-
if (peg$silentFails === 0) { peg$fail(peg$e43); }
|
|
3529
|
-
}
|
|
3530
|
-
peg$silentFails--;
|
|
3531
|
-
if (s3 === peg$FAILED) {
|
|
3532
|
-
s2 = undefined;
|
|
3411
|
+
if (input.length > peg$currPos) {
|
|
3412
|
+
s2 = input.charAt(peg$currPos);
|
|
3413
|
+
peg$currPos++;
|
|
3533
3414
|
} else {
|
|
3534
|
-
peg$currPos = s2;
|
|
3535
3415
|
s2 = peg$FAILED;
|
|
3416
|
+
if (peg$silentFails === 0) { peg$fail(peg$e42); }
|
|
3536
3417
|
}
|
|
3537
3418
|
if (s2 !== peg$FAILED) {
|
|
3538
|
-
|
|
3539
|
-
peg$
|
|
3540
|
-
if (
|
|
3541
|
-
s4 = peg$c25;
|
|
3542
|
-
peg$currPos += 3;
|
|
3543
|
-
} else {
|
|
3544
|
-
s4 = peg$FAILED;
|
|
3545
|
-
if (peg$silentFails === 0) { peg$fail(peg$e44); }
|
|
3546
|
-
}
|
|
3547
|
-
peg$silentFails--;
|
|
3548
|
-
if (s4 === peg$FAILED) {
|
|
3419
|
+
peg$savedPos = peg$currPos;
|
|
3420
|
+
s3 = peg$f52(s2);
|
|
3421
|
+
if (s3) {
|
|
3549
3422
|
s3 = undefined;
|
|
3550
3423
|
} else {
|
|
3551
|
-
peg$currPos = s3;
|
|
3552
3424
|
s3 = peg$FAILED;
|
|
3553
3425
|
}
|
|
3554
3426
|
if (s3 !== peg$FAILED) {
|
|
3555
|
-
s4 =
|
|
3556
|
-
s5 =
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
peg$
|
|
3560
|
-
} else {
|
|
3561
|
-
s6 = peg$FAILED;
|
|
3562
|
-
if (peg$silentFails === 0) { peg$fail(peg$e45); }
|
|
3427
|
+
s4 = [];
|
|
3428
|
+
s5 = peg$parseVerbatimChar();
|
|
3429
|
+
while (s5 !== peg$FAILED) {
|
|
3430
|
+
s4.push(s5);
|
|
3431
|
+
s5 = peg$parseVerbatimChar();
|
|
3563
3432
|
}
|
|
3564
|
-
if (
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
if (peg$r19.test(input.charAt(peg$currPos))) {
|
|
3568
|
-
s6 = input.charAt(peg$currPos);
|
|
3569
|
-
peg$currPos++;
|
|
3570
|
-
} else {
|
|
3571
|
-
s6 = peg$FAILED;
|
|
3572
|
-
if (peg$silentFails === 0) { peg$fail(peg$e45); }
|
|
3573
|
-
}
|
|
3574
|
-
}
|
|
3433
|
+
if (input.length > peg$currPos) {
|
|
3434
|
+
s5 = input.charAt(peg$currPos);
|
|
3435
|
+
peg$currPos++;
|
|
3575
3436
|
} else {
|
|
3576
3437
|
s5 = peg$FAILED;
|
|
3438
|
+
if (peg$silentFails === 0) { peg$fail(peg$e42); }
|
|
3577
3439
|
}
|
|
3578
3440
|
if (s5 !== peg$FAILED) {
|
|
3579
|
-
s4 = input.substring(s4, peg$currPos);
|
|
3580
|
-
} else {
|
|
3581
|
-
s4 = s5;
|
|
3582
|
-
}
|
|
3583
|
-
if (s4 !== peg$FAILED) {
|
|
3584
3441
|
peg$savedPos = peg$currPos;
|
|
3585
|
-
|
|
3586
|
-
if (
|
|
3587
|
-
|
|
3442
|
+
s6 = peg$f53(s2, s4);
|
|
3443
|
+
if (s6) {
|
|
3444
|
+
s6 = undefined;
|
|
3588
3445
|
} else {
|
|
3589
|
-
|
|
3446
|
+
s6 = peg$FAILED;
|
|
3590
3447
|
}
|
|
3591
|
-
if (
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
while (s7 !== peg$FAILED) {
|
|
3595
|
-
s6.push(s7);
|
|
3596
|
-
s7 = peg$parseOptionalArgument();
|
|
3597
|
-
}
|
|
3598
|
-
s7 = peg$parse__h();
|
|
3599
|
-
s8 = peg$currPos;
|
|
3600
|
-
peg$silentFails++;
|
|
3601
|
-
if (input.charCodeAt(peg$currPos) === 123) {
|
|
3602
|
-
s9 = peg$c2;
|
|
3603
|
-
peg$currPos++;
|
|
3604
|
-
} else {
|
|
3605
|
-
s9 = peg$FAILED;
|
|
3606
|
-
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
3607
|
-
}
|
|
3608
|
-
peg$silentFails--;
|
|
3609
|
-
if (s9 !== peg$FAILED) {
|
|
3610
|
-
peg$currPos = s8;
|
|
3611
|
-
s8 = undefined;
|
|
3612
|
-
} else {
|
|
3613
|
-
s8 = peg$FAILED;
|
|
3614
|
-
}
|
|
3615
|
-
if (s8 !== peg$FAILED) {
|
|
3616
|
-
s9 = peg$parseVerbatimFieldValue();
|
|
3617
|
-
if (s9 !== peg$FAILED) {
|
|
3618
|
-
s10 = peg$parseVerbatimFieldValue();
|
|
3619
|
-
if (s10 !== peg$FAILED) {
|
|
3620
|
-
peg$savedPos = s0;
|
|
3621
|
-
s0 = peg$f55(s4, s6, s9, s10);
|
|
3622
|
-
} else {
|
|
3623
|
-
peg$currPos = s0;
|
|
3624
|
-
s0 = peg$FAILED;
|
|
3625
|
-
}
|
|
3626
|
-
} else {
|
|
3627
|
-
peg$currPos = s0;
|
|
3628
|
-
s0 = peg$FAILED;
|
|
3629
|
-
}
|
|
3630
|
-
} else {
|
|
3631
|
-
peg$currPos = s0;
|
|
3632
|
-
s0 = peg$FAILED;
|
|
3633
|
-
}
|
|
3448
|
+
if (s6 !== peg$FAILED) {
|
|
3449
|
+
peg$savedPos = s0;
|
|
3450
|
+
s0 = peg$f54(s2, s4);
|
|
3634
3451
|
} else {
|
|
3635
3452
|
peg$currPos = s0;
|
|
3636
3453
|
s0 = peg$FAILED;
|
|
@@ -3654,11 +3471,11 @@ function peg$parse(input, options) {
|
|
|
3654
3471
|
if (s0 === peg$FAILED) {
|
|
3655
3472
|
s0 = peg$currPos;
|
|
3656
3473
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3657
|
-
s1 = peg$
|
|
3474
|
+
s1 = peg$c11;
|
|
3658
3475
|
peg$currPos++;
|
|
3659
3476
|
} else {
|
|
3660
3477
|
s1 = peg$FAILED;
|
|
3661
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3478
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3662
3479
|
}
|
|
3663
3480
|
if (s1 !== peg$FAILED) {
|
|
3664
3481
|
s2 = peg$currPos;
|
|
@@ -3697,7 +3514,7 @@ function peg$parse(input, options) {
|
|
|
3697
3514
|
if (s3 !== peg$FAILED) {
|
|
3698
3515
|
s4 = peg$currPos;
|
|
3699
3516
|
s5 = [];
|
|
3700
|
-
if (peg$
|
|
3517
|
+
if (peg$r18.test(input.charAt(peg$currPos))) {
|
|
3701
3518
|
s6 = input.charAt(peg$currPos);
|
|
3702
3519
|
peg$currPos++;
|
|
3703
3520
|
} else {
|
|
@@ -3707,7 +3524,7 @@ function peg$parse(input, options) {
|
|
|
3707
3524
|
if (s6 !== peg$FAILED) {
|
|
3708
3525
|
while (s6 !== peg$FAILED) {
|
|
3709
3526
|
s5.push(s6);
|
|
3710
|
-
if (peg$
|
|
3527
|
+
if (peg$r18.test(input.charAt(peg$currPos))) {
|
|
3711
3528
|
s6 = input.charAt(peg$currPos);
|
|
3712
3529
|
peg$currPos++;
|
|
3713
3530
|
} else {
|
|
@@ -3725,7 +3542,7 @@ function peg$parse(input, options) {
|
|
|
3725
3542
|
}
|
|
3726
3543
|
if (s4 !== peg$FAILED) {
|
|
3727
3544
|
peg$savedPos = peg$currPos;
|
|
3728
|
-
s5 = peg$
|
|
3545
|
+
s5 = peg$f55(s4);
|
|
3729
3546
|
if (s5) {
|
|
3730
3547
|
s5 = undefined;
|
|
3731
3548
|
} else {
|
|
@@ -3758,8 +3575,14 @@ function peg$parse(input, options) {
|
|
|
3758
3575
|
if (s8 !== peg$FAILED) {
|
|
3759
3576
|
s9 = peg$parseVerbatimFieldValue();
|
|
3760
3577
|
if (s9 !== peg$FAILED) {
|
|
3761
|
-
|
|
3762
|
-
|
|
3578
|
+
s10 = peg$parseVerbatimFieldValue();
|
|
3579
|
+
if (s10 !== peg$FAILED) {
|
|
3580
|
+
peg$savedPos = s0;
|
|
3581
|
+
s0 = peg$f56(s4, s6, s9, s10);
|
|
3582
|
+
} else {
|
|
3583
|
+
peg$currPos = s0;
|
|
3584
|
+
s0 = peg$FAILED;
|
|
3585
|
+
}
|
|
3763
3586
|
} else {
|
|
3764
3587
|
peg$currPos = s0;
|
|
3765
3588
|
s0 = peg$FAILED;
|
|
@@ -3791,11 +3614,11 @@ function peg$parse(input, options) {
|
|
|
3791
3614
|
if (s0 === peg$FAILED) {
|
|
3792
3615
|
s0 = peg$currPos;
|
|
3793
3616
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3794
|
-
s1 = peg$
|
|
3617
|
+
s1 = peg$c11;
|
|
3795
3618
|
peg$currPos++;
|
|
3796
3619
|
} else {
|
|
3797
3620
|
s1 = peg$FAILED;
|
|
3798
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3621
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3799
3622
|
}
|
|
3800
3623
|
if (s1 !== peg$FAILED) {
|
|
3801
3624
|
s2 = peg$currPos;
|
|
@@ -3834,7 +3657,7 @@ function peg$parse(input, options) {
|
|
|
3834
3657
|
if (s3 !== peg$FAILED) {
|
|
3835
3658
|
s4 = peg$currPos;
|
|
3836
3659
|
s5 = [];
|
|
3837
|
-
if (peg$
|
|
3660
|
+
if (peg$r18.test(input.charAt(peg$currPos))) {
|
|
3838
3661
|
s6 = input.charAt(peg$currPos);
|
|
3839
3662
|
peg$currPos++;
|
|
3840
3663
|
} else {
|
|
@@ -3844,7 +3667,7 @@ function peg$parse(input, options) {
|
|
|
3844
3667
|
if (s6 !== peg$FAILED) {
|
|
3845
3668
|
while (s6 !== peg$FAILED) {
|
|
3846
3669
|
s5.push(s6);
|
|
3847
|
-
if (peg$
|
|
3670
|
+
if (peg$r18.test(input.charAt(peg$currPos))) {
|
|
3848
3671
|
s6 = input.charAt(peg$currPos);
|
|
3849
3672
|
peg$currPos++;
|
|
3850
3673
|
} else {
|
|
@@ -3862,7 +3685,7 @@ function peg$parse(input, options) {
|
|
|
3862
3685
|
}
|
|
3863
3686
|
if (s4 !== peg$FAILED) {
|
|
3864
3687
|
peg$savedPos = peg$currPos;
|
|
3865
|
-
s5 = peg$
|
|
3688
|
+
s5 = peg$f57(s4);
|
|
3866
3689
|
if (s5) {
|
|
3867
3690
|
s5 = undefined;
|
|
3868
3691
|
} else {
|
|
@@ -3876,12 +3699,27 @@ function peg$parse(input, options) {
|
|
|
3876
3699
|
s7 = peg$parseOptionalArgument();
|
|
3877
3700
|
}
|
|
3878
3701
|
s7 = peg$parse__h();
|
|
3879
|
-
s8 = peg$
|
|
3702
|
+
s8 = peg$currPos;
|
|
3703
|
+
peg$silentFails++;
|
|
3704
|
+
if (input.charCodeAt(peg$currPos) === 123) {
|
|
3705
|
+
s9 = peg$c2;
|
|
3706
|
+
peg$currPos++;
|
|
3707
|
+
} else {
|
|
3708
|
+
s9 = peg$FAILED;
|
|
3709
|
+
if (peg$silentFails === 0) { peg$fail(peg$e5); }
|
|
3710
|
+
}
|
|
3711
|
+
peg$silentFails--;
|
|
3712
|
+
if (s9 !== peg$FAILED) {
|
|
3713
|
+
peg$currPos = s8;
|
|
3714
|
+
s8 = undefined;
|
|
3715
|
+
} else {
|
|
3716
|
+
s8 = peg$FAILED;
|
|
3717
|
+
}
|
|
3880
3718
|
if (s8 !== peg$FAILED) {
|
|
3881
|
-
s9 = peg$
|
|
3719
|
+
s9 = peg$parseVerbatimFieldValue();
|
|
3882
3720
|
if (s9 !== peg$FAILED) {
|
|
3883
3721
|
peg$savedPos = s0;
|
|
3884
|
-
s0 = peg$
|
|
3722
|
+
s0 = peg$f58(s4, s6, s9);
|
|
3885
3723
|
} else {
|
|
3886
3724
|
peg$currPos = s0;
|
|
3887
3725
|
s0 = peg$FAILED;
|
|
@@ -3913,11 +3751,11 @@ function peg$parse(input, options) {
|
|
|
3913
3751
|
if (s0 === peg$FAILED) {
|
|
3914
3752
|
s0 = peg$currPos;
|
|
3915
3753
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3916
|
-
s1 = peg$
|
|
3754
|
+
s1 = peg$c11;
|
|
3917
3755
|
peg$currPos++;
|
|
3918
3756
|
} else {
|
|
3919
3757
|
s1 = peg$FAILED;
|
|
3920
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3758
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3921
3759
|
}
|
|
3922
3760
|
if (s1 !== peg$FAILED) {
|
|
3923
3761
|
s2 = peg$currPos;
|
|
@@ -3956,7 +3794,7 @@ function peg$parse(input, options) {
|
|
|
3956
3794
|
if (s3 !== peg$FAILED) {
|
|
3957
3795
|
s4 = peg$currPos;
|
|
3958
3796
|
s5 = [];
|
|
3959
|
-
if (peg$
|
|
3797
|
+
if (peg$r18.test(input.charAt(peg$currPos))) {
|
|
3960
3798
|
s6 = input.charAt(peg$currPos);
|
|
3961
3799
|
peg$currPos++;
|
|
3962
3800
|
} else {
|
|
@@ -3966,7 +3804,7 @@ function peg$parse(input, options) {
|
|
|
3966
3804
|
if (s6 !== peg$FAILED) {
|
|
3967
3805
|
while (s6 !== peg$FAILED) {
|
|
3968
3806
|
s5.push(s6);
|
|
3969
|
-
if (peg$
|
|
3807
|
+
if (peg$r18.test(input.charAt(peg$currPos))) {
|
|
3970
3808
|
s6 = input.charAt(peg$currPos);
|
|
3971
3809
|
peg$currPos++;
|
|
3972
3810
|
} else {
|
|
@@ -3984,7 +3822,7 @@ function peg$parse(input, options) {
|
|
|
3984
3822
|
}
|
|
3985
3823
|
if (s4 !== peg$FAILED) {
|
|
3986
3824
|
peg$savedPos = peg$currPos;
|
|
3987
|
-
s5 = peg$
|
|
3825
|
+
s5 = peg$f59(s4);
|
|
3988
3826
|
if (s5) {
|
|
3989
3827
|
s5 = undefined;
|
|
3990
3828
|
} else {
|
|
@@ -4000,8 +3838,14 @@ function peg$parse(input, options) {
|
|
|
4000
3838
|
s7 = peg$parse__h();
|
|
4001
3839
|
s8 = peg$parseArgument();
|
|
4002
3840
|
if (s8 !== peg$FAILED) {
|
|
4003
|
-
|
|
4004
|
-
|
|
3841
|
+
s9 = peg$parseArgument();
|
|
3842
|
+
if (s9 !== peg$FAILED) {
|
|
3843
|
+
peg$savedPos = s0;
|
|
3844
|
+
s0 = peg$f60(s4, s6, s8, s9);
|
|
3845
|
+
} else {
|
|
3846
|
+
peg$currPos = s0;
|
|
3847
|
+
s0 = peg$FAILED;
|
|
3848
|
+
}
|
|
4005
3849
|
} else {
|
|
4006
3850
|
peg$currPos = s0;
|
|
4007
3851
|
s0 = peg$FAILED;
|
|
@@ -4029,11 +3873,11 @@ function peg$parse(input, options) {
|
|
|
4029
3873
|
if (s0 === peg$FAILED) {
|
|
4030
3874
|
s0 = peg$currPos;
|
|
4031
3875
|
if (input.charCodeAt(peg$currPos) === 92) {
|
|
4032
|
-
s1 = peg$
|
|
3876
|
+
s1 = peg$c11;
|
|
4033
3877
|
peg$currPos++;
|
|
4034
3878
|
} else {
|
|
4035
3879
|
s1 = peg$FAILED;
|
|
4036
|
-
if (peg$silentFails === 0) { peg$fail(peg$
|
|
3880
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
4037
3881
|
}
|
|
4038
3882
|
if (s1 !== peg$FAILED) {
|
|
4039
3883
|
s2 = peg$currPos;
|
|
@@ -4072,7 +3916,7 @@ function peg$parse(input, options) {
|
|
|
4072
3916
|
if (s3 !== peg$FAILED) {
|
|
4073
3917
|
s4 = peg$currPos;
|
|
4074
3918
|
s5 = [];
|
|
4075
|
-
if (peg$
|
|
3919
|
+
if (peg$r18.test(input.charAt(peg$currPos))) {
|
|
4076
3920
|
s6 = input.charAt(peg$currPos);
|
|
4077
3921
|
peg$currPos++;
|
|
4078
3922
|
} else {
|
|
@@ -4082,7 +3926,7 @@ function peg$parse(input, options) {
|
|
|
4082
3926
|
if (s6 !== peg$FAILED) {
|
|
4083
3927
|
while (s6 !== peg$FAILED) {
|
|
4084
3928
|
s5.push(s6);
|
|
4085
|
-
if (peg$
|
|
3929
|
+
if (peg$r18.test(input.charAt(peg$currPos))) {
|
|
4086
3930
|
s6 = input.charAt(peg$currPos);
|
|
4087
3931
|
peg$currPos++;
|
|
4088
3932
|
} else {
|
|
@@ -4099,15 +3943,33 @@ function peg$parse(input, options) {
|
|
|
4099
3943
|
s4 = s5;
|
|
4100
3944
|
}
|
|
4101
3945
|
if (s4 !== peg$FAILED) {
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
s5
|
|
4106
|
-
|
|
3946
|
+
peg$savedPos = peg$currPos;
|
|
3947
|
+
s5 = peg$f61(s4);
|
|
3948
|
+
if (s5) {
|
|
3949
|
+
s5 = undefined;
|
|
3950
|
+
} else {
|
|
3951
|
+
s5 = peg$FAILED;
|
|
3952
|
+
}
|
|
3953
|
+
if (s5 !== peg$FAILED) {
|
|
3954
|
+
s6 = [];
|
|
3955
|
+
s7 = peg$parseOptionalArgument();
|
|
3956
|
+
while (s7 !== peg$FAILED) {
|
|
3957
|
+
s6.push(s7);
|
|
3958
|
+
s7 = peg$parseOptionalArgument();
|
|
3959
|
+
}
|
|
3960
|
+
s7 = peg$parse__h();
|
|
3961
|
+
s8 = peg$parseArgument();
|
|
3962
|
+
if (s8 !== peg$FAILED) {
|
|
3963
|
+
peg$savedPos = s0;
|
|
3964
|
+
s0 = peg$f62(s4, s6, s8);
|
|
3965
|
+
} else {
|
|
3966
|
+
peg$currPos = s0;
|
|
3967
|
+
s0 = peg$FAILED;
|
|
3968
|
+
}
|
|
3969
|
+
} else {
|
|
3970
|
+
peg$currPos = s0;
|
|
3971
|
+
s0 = peg$FAILED;
|
|
4107
3972
|
}
|
|
4108
|
-
s6 = peg$parse__();
|
|
4109
|
-
peg$savedPos = s0;
|
|
4110
|
-
s0 = peg$f62(s4, s5);
|
|
4111
3973
|
} else {
|
|
4112
3974
|
peg$currPos = s0;
|
|
4113
3975
|
s0 = peg$FAILED;
|
|
@@ -4124,6 +3986,105 @@ function peg$parse(input, options) {
|
|
|
4124
3986
|
peg$currPos = s0;
|
|
4125
3987
|
s0 = peg$FAILED;
|
|
4126
3988
|
}
|
|
3989
|
+
if (s0 === peg$FAILED) {
|
|
3990
|
+
s0 = peg$currPos;
|
|
3991
|
+
if (input.charCodeAt(peg$currPos) === 92) {
|
|
3992
|
+
s1 = peg$c11;
|
|
3993
|
+
peg$currPos++;
|
|
3994
|
+
} else {
|
|
3995
|
+
s1 = peg$FAILED;
|
|
3996
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
3997
|
+
}
|
|
3998
|
+
if (s1 !== peg$FAILED) {
|
|
3999
|
+
s2 = peg$currPos;
|
|
4000
|
+
peg$silentFails++;
|
|
4001
|
+
if (input.substr(peg$currPos, 5) === peg$c24) {
|
|
4002
|
+
s3 = peg$c24;
|
|
4003
|
+
peg$currPos += 5;
|
|
4004
|
+
} else {
|
|
4005
|
+
s3 = peg$FAILED;
|
|
4006
|
+
if (peg$silentFails === 0) { peg$fail(peg$e43); }
|
|
4007
|
+
}
|
|
4008
|
+
peg$silentFails--;
|
|
4009
|
+
if (s3 === peg$FAILED) {
|
|
4010
|
+
s2 = undefined;
|
|
4011
|
+
} else {
|
|
4012
|
+
peg$currPos = s2;
|
|
4013
|
+
s2 = peg$FAILED;
|
|
4014
|
+
}
|
|
4015
|
+
if (s2 !== peg$FAILED) {
|
|
4016
|
+
s3 = peg$currPos;
|
|
4017
|
+
peg$silentFails++;
|
|
4018
|
+
if (input.substr(peg$currPos, 3) === peg$c25) {
|
|
4019
|
+
s4 = peg$c25;
|
|
4020
|
+
peg$currPos += 3;
|
|
4021
|
+
} else {
|
|
4022
|
+
s4 = peg$FAILED;
|
|
4023
|
+
if (peg$silentFails === 0) { peg$fail(peg$e44); }
|
|
4024
|
+
}
|
|
4025
|
+
peg$silentFails--;
|
|
4026
|
+
if (s4 === peg$FAILED) {
|
|
4027
|
+
s3 = undefined;
|
|
4028
|
+
} else {
|
|
4029
|
+
peg$currPos = s3;
|
|
4030
|
+
s3 = peg$FAILED;
|
|
4031
|
+
}
|
|
4032
|
+
if (s3 !== peg$FAILED) {
|
|
4033
|
+
s4 = peg$currPos;
|
|
4034
|
+
s5 = [];
|
|
4035
|
+
if (peg$r18.test(input.charAt(peg$currPos))) {
|
|
4036
|
+
s6 = input.charAt(peg$currPos);
|
|
4037
|
+
peg$currPos++;
|
|
4038
|
+
} else {
|
|
4039
|
+
s6 = peg$FAILED;
|
|
4040
|
+
if (peg$silentFails === 0) { peg$fail(peg$e45); }
|
|
4041
|
+
}
|
|
4042
|
+
if (s6 !== peg$FAILED) {
|
|
4043
|
+
while (s6 !== peg$FAILED) {
|
|
4044
|
+
s5.push(s6);
|
|
4045
|
+
if (peg$r18.test(input.charAt(peg$currPos))) {
|
|
4046
|
+
s6 = input.charAt(peg$currPos);
|
|
4047
|
+
peg$currPos++;
|
|
4048
|
+
} else {
|
|
4049
|
+
s6 = peg$FAILED;
|
|
4050
|
+
if (peg$silentFails === 0) { peg$fail(peg$e45); }
|
|
4051
|
+
}
|
|
4052
|
+
}
|
|
4053
|
+
} else {
|
|
4054
|
+
s5 = peg$FAILED;
|
|
4055
|
+
}
|
|
4056
|
+
if (s5 !== peg$FAILED) {
|
|
4057
|
+
s4 = input.substring(s4, peg$currPos);
|
|
4058
|
+
} else {
|
|
4059
|
+
s4 = s5;
|
|
4060
|
+
}
|
|
4061
|
+
if (s4 !== peg$FAILED) {
|
|
4062
|
+
s5 = [];
|
|
4063
|
+
s6 = peg$parseOptionalArgument();
|
|
4064
|
+
while (s6 !== peg$FAILED) {
|
|
4065
|
+
s5.push(s6);
|
|
4066
|
+
s6 = peg$parseOptionalArgument();
|
|
4067
|
+
}
|
|
4068
|
+
s6 = peg$parse__();
|
|
4069
|
+
peg$savedPos = s0;
|
|
4070
|
+
s0 = peg$f63(s4, s5);
|
|
4071
|
+
} else {
|
|
4072
|
+
peg$currPos = s0;
|
|
4073
|
+
s0 = peg$FAILED;
|
|
4074
|
+
}
|
|
4075
|
+
} else {
|
|
4076
|
+
peg$currPos = s0;
|
|
4077
|
+
s0 = peg$FAILED;
|
|
4078
|
+
}
|
|
4079
|
+
} else {
|
|
4080
|
+
peg$currPos = s0;
|
|
4081
|
+
s0 = peg$FAILED;
|
|
4082
|
+
}
|
|
4083
|
+
} else {
|
|
4084
|
+
peg$currPos = s0;
|
|
4085
|
+
s0 = peg$FAILED;
|
|
4086
|
+
}
|
|
4087
|
+
}
|
|
4127
4088
|
}
|
|
4128
4089
|
}
|
|
4129
4090
|
}
|
|
@@ -4135,6 +4096,117 @@ function peg$parse(input, options) {
|
|
|
4135
4096
|
return s0;
|
|
4136
4097
|
}
|
|
4137
4098
|
|
|
4099
|
+
function peg$parseVerbatimChar() {
|
|
4100
|
+
var s0, s1, s2;
|
|
4101
|
+
|
|
4102
|
+
s0 = peg$currPos;
|
|
4103
|
+
if (input.length > peg$currPos) {
|
|
4104
|
+
s1 = input.charAt(peg$currPos);
|
|
4105
|
+
peg$currPos++;
|
|
4106
|
+
} else {
|
|
4107
|
+
s1 = peg$FAILED;
|
|
4108
|
+
if (peg$silentFails === 0) { peg$fail(peg$e42); }
|
|
4109
|
+
}
|
|
4110
|
+
if (s1 !== peg$FAILED) {
|
|
4111
|
+
peg$savedPos = peg$currPos;
|
|
4112
|
+
s2 = peg$f64(s1);
|
|
4113
|
+
if (s2) {
|
|
4114
|
+
s2 = undefined;
|
|
4115
|
+
} else {
|
|
4116
|
+
s2 = peg$FAILED;
|
|
4117
|
+
}
|
|
4118
|
+
if (s2 !== peg$FAILED) {
|
|
4119
|
+
peg$savedPos = s0;
|
|
4120
|
+
s0 = peg$f65(s1);
|
|
4121
|
+
} else {
|
|
4122
|
+
peg$currPos = s0;
|
|
4123
|
+
s0 = peg$FAILED;
|
|
4124
|
+
}
|
|
4125
|
+
} else {
|
|
4126
|
+
peg$currPos = s0;
|
|
4127
|
+
s0 = peg$FAILED;
|
|
4128
|
+
}
|
|
4129
|
+
|
|
4130
|
+
return s0;
|
|
4131
|
+
}
|
|
4132
|
+
|
|
4133
|
+
function peg$parseInvalidCommand() {
|
|
4134
|
+
var s0, s1, s2, s3, s4, s5;
|
|
4135
|
+
|
|
4136
|
+
s0 = peg$currPos;
|
|
4137
|
+
if (input.charCodeAt(peg$currPos) === 92) {
|
|
4138
|
+
s1 = peg$c11;
|
|
4139
|
+
peg$currPos++;
|
|
4140
|
+
} else {
|
|
4141
|
+
s1 = peg$FAILED;
|
|
4142
|
+
if (peg$silentFails === 0) { peg$fail(peg$e25); }
|
|
4143
|
+
}
|
|
4144
|
+
if (s1 !== peg$FAILED) {
|
|
4145
|
+
s2 = peg$currPos;
|
|
4146
|
+
peg$silentFails++;
|
|
4147
|
+
if (input.substr(peg$currPos, 5) === peg$c24) {
|
|
4148
|
+
s3 = peg$c24;
|
|
4149
|
+
peg$currPos += 5;
|
|
4150
|
+
} else {
|
|
4151
|
+
s3 = peg$FAILED;
|
|
4152
|
+
if (peg$silentFails === 0) { peg$fail(peg$e43); }
|
|
4153
|
+
}
|
|
4154
|
+
peg$silentFails--;
|
|
4155
|
+
if (s3 === peg$FAILED) {
|
|
4156
|
+
s2 = undefined;
|
|
4157
|
+
} else {
|
|
4158
|
+
peg$currPos = s2;
|
|
4159
|
+
s2 = peg$FAILED;
|
|
4160
|
+
}
|
|
4161
|
+
if (s2 !== peg$FAILED) {
|
|
4162
|
+
s3 = peg$currPos;
|
|
4163
|
+
peg$silentFails++;
|
|
4164
|
+
if (input.substr(peg$currPos, 3) === peg$c25) {
|
|
4165
|
+
s4 = peg$c25;
|
|
4166
|
+
peg$currPos += 3;
|
|
4167
|
+
} else {
|
|
4168
|
+
s4 = peg$FAILED;
|
|
4169
|
+
if (peg$silentFails === 0) { peg$fail(peg$e44); }
|
|
4170
|
+
}
|
|
4171
|
+
peg$silentFails--;
|
|
4172
|
+
if (s4 === peg$FAILED) {
|
|
4173
|
+
s3 = undefined;
|
|
4174
|
+
} else {
|
|
4175
|
+
peg$currPos = s3;
|
|
4176
|
+
s3 = peg$FAILED;
|
|
4177
|
+
}
|
|
4178
|
+
if (s3 !== peg$FAILED) {
|
|
4179
|
+
if (peg$r12.test(input.charAt(peg$currPos))) {
|
|
4180
|
+
s4 = input.charAt(peg$currPos);
|
|
4181
|
+
peg$currPos++;
|
|
4182
|
+
} else {
|
|
4183
|
+
s4 = peg$FAILED;
|
|
4184
|
+
if (peg$silentFails === 0) { peg$fail(peg$e20); }
|
|
4185
|
+
}
|
|
4186
|
+
if (s4 !== peg$FAILED) {
|
|
4187
|
+
s5 = peg$parse__();
|
|
4188
|
+
peg$savedPos = s0;
|
|
4189
|
+
s0 = peg$f66(s4);
|
|
4190
|
+
} else {
|
|
4191
|
+
peg$currPos = s0;
|
|
4192
|
+
s0 = peg$FAILED;
|
|
4193
|
+
}
|
|
4194
|
+
} else {
|
|
4195
|
+
peg$currPos = s0;
|
|
4196
|
+
s0 = peg$FAILED;
|
|
4197
|
+
}
|
|
4198
|
+
} else {
|
|
4199
|
+
peg$currPos = s0;
|
|
4200
|
+
s0 = peg$FAILED;
|
|
4201
|
+
}
|
|
4202
|
+
} else {
|
|
4203
|
+
peg$currPos = s0;
|
|
4204
|
+
s0 = peg$FAILED;
|
|
4205
|
+
}
|
|
4206
|
+
|
|
4207
|
+
return s0;
|
|
4208
|
+
}
|
|
4209
|
+
|
|
4138
4210
|
function peg$parseOptionalArgument() {
|
|
4139
4211
|
var s0, s1, s2, s3, s4, s5;
|
|
4140
4212
|
|
|
@@ -4150,7 +4222,7 @@ function peg$parse(input, options) {
|
|
|
4150
4222
|
s2 = peg$parse__h();
|
|
4151
4223
|
s3 = peg$currPos;
|
|
4152
4224
|
s4 = [];
|
|
4153
|
-
if (peg$
|
|
4225
|
+
if (peg$r19.test(input.charAt(peg$currPos))) {
|
|
4154
4226
|
s5 = input.charAt(peg$currPos);
|
|
4155
4227
|
peg$currPos++;
|
|
4156
4228
|
} else {
|
|
@@ -4160,7 +4232,7 @@ function peg$parse(input, options) {
|
|
|
4160
4232
|
if (s5 !== peg$FAILED) {
|
|
4161
4233
|
while (s5 !== peg$FAILED) {
|
|
4162
4234
|
s4.push(s5);
|
|
4163
|
-
if (peg$
|
|
4235
|
+
if (peg$r19.test(input.charAt(peg$currPos))) {
|
|
4164
4236
|
s5 = input.charAt(peg$currPos);
|
|
4165
4237
|
peg$currPos++;
|
|
4166
4238
|
} else {
|
|
@@ -4187,7 +4259,7 @@ function peg$parse(input, options) {
|
|
|
4187
4259
|
}
|
|
4188
4260
|
if (s5 !== peg$FAILED) {
|
|
4189
4261
|
peg$savedPos = s0;
|
|
4190
|
-
s0 = peg$
|
|
4262
|
+
s0 = peg$f67(s3);
|
|
4191
4263
|
} else {
|
|
4192
4264
|
peg$currPos = s0;
|
|
4193
4265
|
s0 = peg$FAILED;
|
|
@@ -4209,7 +4281,7 @@ function peg$parse(input, options) {
|
|
|
4209
4281
|
|
|
4210
4282
|
s0 = peg$currPos;
|
|
4211
4283
|
s1 = peg$parse__h();
|
|
4212
|
-
if (peg$
|
|
4284
|
+
if (peg$r20.test(input.charAt(peg$currPos))) {
|
|
4213
4285
|
s2 = input.charAt(peg$currPos);
|
|
4214
4286
|
peg$currPos++;
|
|
4215
4287
|
} else {
|
|
@@ -4218,7 +4290,7 @@ function peg$parse(input, options) {
|
|
|
4218
4290
|
}
|
|
4219
4291
|
if (s2 !== peg$FAILED) {
|
|
4220
4292
|
peg$savedPos = s0;
|
|
4221
|
-
s0 = peg$
|
|
4293
|
+
s0 = peg$f68(s2);
|
|
4222
4294
|
} else {
|
|
4223
4295
|
peg$currPos = s0;
|
|
4224
4296
|
s0 = peg$FAILED;
|
|
@@ -4232,7 +4304,7 @@ function peg$parse(input, options) {
|
|
|
4232
4304
|
}
|
|
4233
4305
|
if (s2 !== peg$FAILED) {
|
|
4234
4306
|
peg$savedPos = s0;
|
|
4235
|
-
s0 = peg$
|
|
4307
|
+
s0 = peg$f69(s2);
|
|
4236
4308
|
} else {
|
|
4237
4309
|
peg$currPos = s0;
|
|
4238
4310
|
s0 = peg$FAILED;
|
|
@@ -4247,7 +4319,7 @@ function peg$parse(input, options) {
|
|
|
4247
4319
|
|
|
4248
4320
|
s0 = peg$currPos;
|
|
4249
4321
|
s1 = peg$currPos;
|
|
4250
|
-
if (peg$
|
|
4322
|
+
if (peg$r21.test(input.charAt(peg$currPos))) {
|
|
4251
4323
|
s2 = input.charAt(peg$currPos);
|
|
4252
4324
|
peg$currPos++;
|
|
4253
4325
|
} else {
|
|
@@ -4256,7 +4328,7 @@ function peg$parse(input, options) {
|
|
|
4256
4328
|
}
|
|
4257
4329
|
if (s2 !== peg$FAILED) {
|
|
4258
4330
|
s3 = [];
|
|
4259
|
-
if (peg$
|
|
4331
|
+
if (peg$r22.test(input.charAt(peg$currPos))) {
|
|
4260
4332
|
s4 = input.charAt(peg$currPos);
|
|
4261
4333
|
peg$currPos++;
|
|
4262
4334
|
} else {
|
|
@@ -4265,7 +4337,7 @@ function peg$parse(input, options) {
|
|
|
4265
4337
|
}
|
|
4266
4338
|
while (s4 !== peg$FAILED) {
|
|
4267
4339
|
s3.push(s4);
|
|
4268
|
-
if (peg$
|
|
4340
|
+
if (peg$r22.test(input.charAt(peg$currPos))) {
|
|
4269
4341
|
s4 = input.charAt(peg$currPos);
|
|
4270
4342
|
peg$currPos++;
|
|
4271
4343
|
} else {
|
|
@@ -4291,7 +4363,7 @@ function peg$parse(input, options) {
|
|
|
4291
4363
|
function peg$parseSimpleDiacritic() {
|
|
4292
4364
|
var s0;
|
|
4293
4365
|
|
|
4294
|
-
if (peg$
|
|
4366
|
+
if (peg$r23.test(input.charAt(peg$currPos))) {
|
|
4295
4367
|
s0 = input.charAt(peg$currPos);
|
|
4296
4368
|
peg$currPos++;
|
|
4297
4369
|
} else {
|
|
@@ -4305,7 +4377,7 @@ function peg$parse(input, options) {
|
|
|
4305
4377
|
function peg$parseExtendedDiacritic() {
|
|
4306
4378
|
var s0;
|
|
4307
4379
|
|
|
4308
|
-
if (peg$
|
|
4380
|
+
if (peg$r24.test(input.charAt(peg$currPos))) {
|
|
4309
4381
|
s0 = input.charAt(peg$currPos);
|
|
4310
4382
|
peg$currPos++;
|
|
4311
4383
|
} else {
|
|
@@ -4387,7 +4459,7 @@ function peg$parse(input, options) {
|
|
|
4387
4459
|
function peg$parseEOL() {
|
|
4388
4460
|
var s0;
|
|
4389
4461
|
|
|
4390
|
-
if (peg$
|
|
4462
|
+
if (peg$r25.test(input.charAt(peg$currPos))) {
|
|
4391
4463
|
s0 = input.charAt(peg$currPos);
|
|
4392
4464
|
peg$currPos++;
|
|
4393
4465
|
} else {
|
|
@@ -4403,7 +4475,7 @@ function peg$parse(input, options) {
|
|
|
4403
4475
|
|
|
4404
4476
|
peg$silentFails++;
|
|
4405
4477
|
s0 = [];
|
|
4406
|
-
if (peg$
|
|
4478
|
+
if (peg$r26.test(input.charAt(peg$currPos))) {
|
|
4407
4479
|
s1 = input.charAt(peg$currPos);
|
|
4408
4480
|
peg$currPos++;
|
|
4409
4481
|
} else {
|
|
@@ -4413,7 +4485,7 @@ function peg$parse(input, options) {
|
|
|
4413
4485
|
if (s1 !== peg$FAILED) {
|
|
4414
4486
|
while (s1 !== peg$FAILED) {
|
|
4415
4487
|
s0.push(s1);
|
|
4416
|
-
if (peg$
|
|
4488
|
+
if (peg$r26.test(input.charAt(peg$currPos))) {
|
|
4417
4489
|
s1 = input.charAt(peg$currPos);
|
|
4418
4490
|
peg$currPos++;
|
|
4419
4491
|
} else {
|
|
@@ -4438,7 +4510,7 @@ function peg$parse(input, options) {
|
|
|
4438
4510
|
|
|
4439
4511
|
peg$silentFails++;
|
|
4440
4512
|
s0 = [];
|
|
4441
|
-
if (peg$
|
|
4513
|
+
if (peg$r26.test(input.charAt(peg$currPos))) {
|
|
4442
4514
|
s1 = input.charAt(peg$currPos);
|
|
4443
4515
|
peg$currPos++;
|
|
4444
4516
|
} else {
|
|
@@ -4447,7 +4519,7 @@ function peg$parse(input, options) {
|
|
|
4447
4519
|
}
|
|
4448
4520
|
while (s1 !== peg$FAILED) {
|
|
4449
4521
|
s0.push(s1);
|
|
4450
|
-
if (peg$
|
|
4522
|
+
if (peg$r26.test(input.charAt(peg$currPos))) {
|
|
4451
4523
|
s1 = input.charAt(peg$currPos);
|
|
4452
4524
|
peg$currPos++;
|
|
4453
4525
|
} else {
|
|
@@ -4467,7 +4539,7 @@ function peg$parse(input, options) {
|
|
|
4467
4539
|
|
|
4468
4540
|
peg$silentFails++;
|
|
4469
4541
|
s0 = [];
|
|
4470
|
-
if (peg$
|
|
4542
|
+
if (peg$r25.test(input.charAt(peg$currPos))) {
|
|
4471
4543
|
s1 = input.charAt(peg$currPos);
|
|
4472
4544
|
peg$currPos++;
|
|
4473
4545
|
} else {
|
|
@@ -4477,7 +4549,7 @@ function peg$parse(input, options) {
|
|
|
4477
4549
|
if (s1 !== peg$FAILED) {
|
|
4478
4550
|
while (s1 !== peg$FAILED) {
|
|
4479
4551
|
s0.push(s1);
|
|
4480
|
-
if (peg$
|
|
4552
|
+
if (peg$r25.test(input.charAt(peg$currPos))) {
|
|
4481
4553
|
s1 = input.charAt(peg$currPos);
|
|
4482
4554
|
peg$currPos++;
|
|
4483
4555
|
} else {
|
|
@@ -4502,7 +4574,7 @@ function peg$parse(input, options) {
|
|
|
4502
4574
|
|
|
4503
4575
|
peg$silentFails++;
|
|
4504
4576
|
s0 = [];
|
|
4505
|
-
if (peg$
|
|
4577
|
+
if (peg$r25.test(input.charAt(peg$currPos))) {
|
|
4506
4578
|
s1 = input.charAt(peg$currPos);
|
|
4507
4579
|
peg$currPos++;
|
|
4508
4580
|
} else {
|
|
@@ -4511,7 +4583,7 @@ function peg$parse(input, options) {
|
|
|
4511
4583
|
}
|
|
4512
4584
|
while (s1 !== peg$FAILED) {
|
|
4513
4585
|
s0.push(s1);
|
|
4514
|
-
if (peg$
|
|
4586
|
+
if (peg$r25.test(input.charAt(peg$currPos))) {
|
|
4515
4587
|
s1 = input.charAt(peg$currPos);
|
|
4516
4588
|
peg$currPos++;
|
|
4517
4589
|
} else {
|
|
@@ -4531,7 +4603,7 @@ function peg$parse(input, options) {
|
|
|
4531
4603
|
|
|
4532
4604
|
peg$silentFails++;
|
|
4533
4605
|
s0 = [];
|
|
4534
|
-
if (peg$
|
|
4606
|
+
if (peg$r27.test(input.charAt(peg$currPos))) {
|
|
4535
4607
|
s1 = input.charAt(peg$currPos);
|
|
4536
4608
|
peg$currPos++;
|
|
4537
4609
|
} else {
|
|
@@ -4541,7 +4613,7 @@ function peg$parse(input, options) {
|
|
|
4541
4613
|
if (s1 !== peg$FAILED) {
|
|
4542
4614
|
while (s1 !== peg$FAILED) {
|
|
4543
4615
|
s0.push(s1);
|
|
4544
|
-
if (peg$
|
|
4616
|
+
if (peg$r27.test(input.charAt(peg$currPos))) {
|
|
4545
4617
|
s1 = input.charAt(peg$currPos);
|
|
4546
4618
|
peg$currPos++;
|
|
4547
4619
|
} else {
|
|
@@ -4566,7 +4638,7 @@ function peg$parse(input, options) {
|
|
|
4566
4638
|
|
|
4567
4639
|
peg$silentFails++;
|
|
4568
4640
|
s0 = [];
|
|
4569
|
-
if (peg$
|
|
4641
|
+
if (peg$r27.test(input.charAt(peg$currPos))) {
|
|
4570
4642
|
s1 = input.charAt(peg$currPos);
|
|
4571
4643
|
peg$currPos++;
|
|
4572
4644
|
} else {
|
|
@@ -4575,7 +4647,7 @@ function peg$parse(input, options) {
|
|
|
4575
4647
|
}
|
|
4576
4648
|
while (s1 !== peg$FAILED) {
|
|
4577
4649
|
s0.push(s1);
|
|
4578
|
-
if (peg$
|
|
4650
|
+
if (peg$r27.test(input.charAt(peg$currPos))) {
|
|
4579
4651
|
s1 = input.charAt(peg$currPos);
|
|
4580
4652
|
peg$currPos++;
|
|
4581
4653
|
} else {
|
|
@@ -4636,7 +4708,7 @@ function peg$parse(input, options) {
|
|
|
4636
4708
|
|
|
4637
4709
|
const unnestFields = (options.unnestFields || []).map(field => field.toLowerCase())
|
|
4638
4710
|
const verbatimFields = (options.verbatimFields || [ 'urlraw', 'url', 'doi', 'file', 'files', 'eprint', 'verba', 'verbb', 'verbc' ]).map(field => typeof field === 'string' ? field.toLowerCase() : field)
|
|
4639
|
-
const verbatimCommands = (options.verbatimCommands || [ '
|
|
4711
|
+
const verbatimCommands = (options.verbatimCommands || [ 'url' ])
|
|
4640
4712
|
|
|
4641
4713
|
function isVerbatimField(name) {
|
|
4642
4714
|
return verbatimFields.find(p => (typeof p === 'string') ? name === p : name.match(p))
|
|
@@ -4703,8 +4775,8 @@ function peg$parse(input, options) {
|
|
|
4703
4775
|
vspace: 1,
|
|
4704
4776
|
}
|
|
4705
4777
|
|
|
4706
|
-
if (options.
|
|
4707
|
-
for (const cmd of options.
|
|
4778
|
+
if (options.combining) {
|
|
4779
|
+
for (const cmd of options.combining) {
|
|
4708
4780
|
has_arguments[cmd] = 1
|
|
4709
4781
|
}
|
|
4710
4782
|
}
|
|
@@ -4727,6 +4799,15 @@ function peg$parse(input, options) {
|
|
|
4727
4799
|
}
|
|
4728
4800
|
}
|
|
4729
4801
|
|
|
4802
|
+
const verbatim = {
|
|
4803
|
+
delim: '',
|
|
4804
|
+
|
|
4805
|
+
set: function(delim) {
|
|
4806
|
+
this.delim = delim
|
|
4807
|
+
return true
|
|
4808
|
+
}
|
|
4809
|
+
}
|
|
4810
|
+
|
|
4730
4811
|
function basicTextConversions(node) {
|
|
4731
4812
|
if (node.kind !== 'Text') throw new Error(node.kind + ' is not a Text node')
|
|
4732
4813
|
|