@leafo/lml 0.1.1 → 0.3.0

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/dist/grammar.js CHANGED
@@ -136,79 +136,116 @@ function peg$parse(input, options) {
136
136
  const peg$source = options.grammarSource;
137
137
  const peg$startRuleFunctions = {
138
138
  start: peg$parsestart,
139
+ note: peg$parsenote,
139
140
  };
140
141
  let peg$startRuleFunction = peg$parsestart;
141
- const peg$c0 = "ks";
142
- const peg$c1 = "-";
143
- const peg$c2 = "ts";
144
- const peg$c3 = "/";
145
- const peg$c4 = "t";
146
- const peg$c5 = "$";
147
- const peg$c6 = "|";
148
- const peg$c7 = ".";
149
- const peg$c8 = "ht";
150
- const peg$c9 = "dt";
151
- const peg$c10 = "tt";
152
- const peg$c11 = "m";
153
- const peg$c12 = "{";
154
- const peg$c13 = "}";
155
- const peg$c14 = "#";
156
- const peg$r0 = /^[0-9]/;
157
- const peg$r1 = /^[gcfGCF]/;
142
+ const peg$c0 = "#";
143
+ const peg$c1 = ":";
144
+ const peg$c2 = "\n";
145
+ const peg$c3 = "ks";
146
+ const peg$c4 = "-";
147
+ const peg$c5 = "ts";
148
+ const peg$c6 = "/";
149
+ const peg$c7 = "t";
150
+ const peg$c8 = "$";
151
+ const peg$c9 = "|";
152
+ const peg$c10 = "*";
153
+ const peg$c11 = ".";
154
+ const peg$c12 = "@";
155
+ const peg$c13 = "ht";
156
+ const peg$c14 = "dt";
157
+ const peg$c15 = "tt";
158
+ const peg$c16 = "m";
159
+ const peg$c17 = "{";
160
+ const peg$c18 = "}";
161
+ const peg$c19 = "\"";
162
+ const peg$c20 = "'";
163
+ const peg$c21 = "\\";
164
+ const peg$c22 = "n";
165
+ const peg$r0 = /^[ \t]/;
166
+ const peg$r1 = /^[a-zA-Z_]/;
158
167
  const peg$r2 = /^[a-zA-Z0-9_]/;
159
- const peg$r3 = /^[a-gA-G]/;
160
- const peg$r4 = /^[+=\-]/;
161
- const peg$r5 = /^[rR]/;
162
- const peg$r6 = /^[^\n]/;
163
- const peg$r7 = /^[\t\r\n ]/;
164
- const peg$e0 = peg$literalExpectation("ks", false);
165
- const peg$e1 = peg$literalExpectation("-", false);
166
- const peg$e2 = peg$classExpectation([["0", "9"]], false, false, false);
167
- const peg$e3 = peg$literalExpectation("ts", false);
168
- const peg$e4 = peg$literalExpectation("/", false);
169
- const peg$e5 = peg$literalExpectation("t", false);
170
- const peg$e6 = peg$classExpectation(["g", "c", "f", "G", "C", "F"], false, false, false);
171
- const peg$e7 = peg$literalExpectation("$", false);
172
- const peg$e8 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false, false);
173
- const peg$e9 = peg$literalExpectation("|", false);
174
- const peg$e10 = peg$classExpectation([["a", "g"], ["A", "G"]], false, false, false);
175
- const peg$e11 = peg$classExpectation(["+", "=", "-"], false, false, false);
176
- const peg$e12 = peg$literalExpectation(".", false);
177
- const peg$e13 = peg$classExpectation(["r", "R"], false, false, false);
178
- const peg$e14 = peg$literalExpectation("ht", false);
179
- const peg$e15 = peg$literalExpectation("dt", false);
180
- const peg$e16 = peg$literalExpectation("tt", false);
181
- const peg$e17 = peg$literalExpectation("m", false);
182
- const peg$e18 = peg$literalExpectation("{", false);
183
- const peg$e19 = peg$literalExpectation("}", false);
184
- const peg$e20 = peg$literalExpectation("#", false);
185
- const peg$e21 = peg$classExpectation(["\n"], true, false, false);
186
- const peg$e22 = peg$classExpectation(["\t", "\r", "\n", " "], false, false, false);
187
- function peg$f0(head, rest) {
168
+ const peg$r3 = /^[^\n]/;
169
+ const peg$r4 = /^[0-9]/;
170
+ const peg$r5 = /^[gcfGCF]/;
171
+ const peg$r6 = /^[a-gA-G]/;
172
+ const peg$r7 = /^[+=\-]/;
173
+ const peg$r8 = /^[rR_]/;
174
+ const peg$r9 = /^[\t\r\n ]/;
175
+ const peg$r10 = /^["\\]/;
176
+ const peg$r11 = /^['\\]/;
177
+ const peg$e0 = peg$literalExpectation("#", false);
178
+ const peg$e1 = peg$classExpectation([" ", "\t"], false, false, false);
179
+ const peg$e2 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false, false);
180
+ const peg$e3 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false, false);
181
+ const peg$e4 = peg$literalExpectation(":", false);
182
+ const peg$e5 = peg$classExpectation(["\n"], true, false, false);
183
+ const peg$e6 = peg$literalExpectation("\n", false);
184
+ const peg$e7 = peg$literalExpectation("ks", false);
185
+ const peg$e8 = peg$literalExpectation("-", false);
186
+ const peg$e9 = peg$classExpectation([["0", "9"]], false, false, false);
187
+ const peg$e10 = peg$literalExpectation("ts", false);
188
+ const peg$e11 = peg$literalExpectation("/", false);
189
+ const peg$e12 = peg$literalExpectation("t", false);
190
+ const peg$e13 = peg$classExpectation(["g", "c", "f", "G", "C", "F"], false, false, false);
191
+ const peg$e14 = peg$literalExpectation("$", false);
192
+ const peg$e15 = peg$literalExpectation("|", false);
193
+ const peg$e16 = peg$classExpectation([["a", "g"], ["A", "G"]], false, false, false);
194
+ const peg$e17 = peg$classExpectation(["+", "=", "-"], false, false, false);
195
+ const peg$e18 = peg$classExpectation(["r", "R", "_"], false, false, false);
196
+ const peg$e19 = peg$literalExpectation("*", false);
197
+ const peg$e20 = peg$literalExpectation(".", false);
198
+ const peg$e21 = peg$literalExpectation("@", false);
199
+ const peg$e22 = peg$literalExpectation("ht", false);
200
+ const peg$e23 = peg$literalExpectation("dt", false);
201
+ const peg$e24 = peg$literalExpectation("tt", false);
202
+ const peg$e25 = peg$literalExpectation("m", false);
203
+ const peg$e26 = peg$literalExpectation("{", false);
204
+ const peg$e27 = peg$literalExpectation("}", false);
205
+ const peg$e28 = peg$classExpectation(["\t", "\r", "\n", " "], false, false, false);
206
+ const peg$e29 = peg$literalExpectation("\"", false);
207
+ const peg$e30 = peg$literalExpectation("'", false);
208
+ const peg$e31 = peg$classExpectation(["\"", "\\"], false, false, false);
209
+ const peg$e32 = peg$anyExpectation();
210
+ const peg$e33 = peg$literalExpectation("\\", false);
211
+ const peg$e34 = peg$classExpectation(["'", "\\"], false, false, false);
212
+ const peg$e35 = peg$literalExpectation("n", false);
213
+ function peg$f0(frontmatter, commands) {
214
+ return frontmatter.concat(commands);
215
+ }
216
+ function peg$f1(key, value) {
217
+ return ["frontmatter", key, value.trim()];
218
+ }
219
+ function peg$f2(head, rest) {
188
220
  return [head].concat(rest.map((m) => m[1]));
189
221
  }
190
- function peg$f1(mod) {
191
- return ["keySignature", +mod];
222
+ function peg$f3() {
223
+ return [];
192
224
  }
193
- function peg$f2(upper, lower) {
225
+ function peg$f4(mod) {
226
+ let loc = location();
227
+ return ["keySignature", +mod, [loc.start.offset, loc.end.offset]];
228
+ }
229
+ function peg$f5(upper, lower) {
194
230
  return ["timeSignature", +upper, +lower];
195
231
  }
196
- function peg$f3(track) {
232
+ function peg$f6(track) {
197
233
  return ["setTrack", +track];
198
234
  }
199
- function peg$f4(clef) {
235
+ function peg$f7(clef) {
200
236
  return ["clef", clef.toLowerCase()];
201
237
  }
202
- function peg$f5(name) {
238
+ function peg$f8(name) {
203
239
  return ["macro", name.join("")];
204
240
  }
205
- function peg$f6() {
241
+ function peg$f9() {
206
242
  return ["restoreStartPosition"];
207
243
  }
208
- function peg$f7(name, accidental, octave, t) { return t; }
209
- function peg$f8(name, accidental, octave, timing) {
244
+ function peg$f10(name, accidental, octave, timing) {
245
+ let loc = location();
210
246
  let opts = {
211
- ...timing
247
+ ...timing,
248
+ location: [loc.start.offset, loc.end.offset]
212
249
  };
213
250
  if (accidental == "+") {
214
251
  opts.sharp = true;
@@ -219,39 +256,65 @@ function peg$parse(input, options) {
219
256
  else if (accidental == "=") {
220
257
  opts.natural = true;
221
258
  }
222
- let note = ["note", `${name.toUpperCase()}${octave}`];
223
- if (timing || accidental) {
224
- note.push(opts);
225
- }
226
- return note;
259
+ return ["note", `${name.toUpperCase()}${octave ?? ""}`, opts];
227
260
  }
228
- function peg$f9(timing) {
261
+ function peg$f11(timing) {
229
262
  let rest = ["rest"];
230
263
  if (timing) {
231
264
  rest.push(timing);
232
265
  }
233
266
  return rest;
234
267
  }
235
- function peg$f10(duration, s) { return s; }
236
- function peg$f11(duration, start) {
268
+ function peg$f12(d) { return +d; }
269
+ function peg$f13(d) { return 1 / +d; }
270
+ function peg$f14(duration, dots, s) { return +s; }
271
+ function peg$f15(duration, dots, start) { return duration !== null || dots || start !== null; }
272
+ function peg$f16(duration, dots, start) {
237
273
  let timing = {};
238
- if (duration) {
239
- timing.duration = +duration;
240
- }
241
- if (start) {
242
- timing.start = +start;
243
- }
274
+ if (duration !== null)
275
+ timing.duration = duration;
276
+ if (dots)
277
+ timing.dots = dots.length;
278
+ if (start !== null)
279
+ timing.start = start;
244
280
  return timing;
245
281
  }
246
- function peg$f12() { return ["halfTime"]; }
247
- function peg$f13() { return ["doubleTime"]; }
248
- function peg$f14() { return ["tripleTime"]; }
249
- function peg$f15(measure) {
250
- return ["measure", +measure];
282
+ function peg$f17(d) { return +d; }
283
+ function peg$f18(d) { return 1 / +d; }
284
+ function peg$f19(duration, dots, s) { return +s; }
285
+ function peg$f20(duration, dots, start) { return duration !== null || dots || start !== null; }
286
+ function peg$f21(duration, dots, start) {
287
+ let timing = {};
288
+ if (duration !== null)
289
+ timing.duration = duration;
290
+ if (dots)
291
+ timing.dots = dots.length;
292
+ if (start !== null)
293
+ timing.start = start;
294
+ return timing;
251
295
  }
252
- function peg$f16(commands) {
296
+ function peg$f22(count) { return count ? ["halfTime", +count] : ["halfTime"]; }
297
+ function peg$f23(count) { return count ? ["doubleTime", +count] : ["doubleTime"]; }
298
+ function peg$f24(count) { return count ? ["tripleTime", +count] : ["tripleTime"]; }
299
+ function peg$f25(measure) { return ["measure", +measure]; }
300
+ function peg$f26() { return ["measure"]; }
301
+ function peg$f27(commands) {
253
302
  return ["block", commands];
254
303
  }
304
+ function peg$f28(chars) {
305
+ return ["string", chars.join("")];
306
+ }
307
+ function peg$f29(chars) {
308
+ return ["string", chars.join("")];
309
+ }
310
+ function peg$f30(char) { return char; }
311
+ function peg$f31(escape) { return escape; }
312
+ function peg$f32(char) { return char; }
313
+ function peg$f33(escape) { return escape; }
314
+ function peg$f34() { return '"'; }
315
+ function peg$f35() { return "'"; }
316
+ function peg$f36() { return "\\"; }
317
+ function peg$f37() { return "\n"; }
255
318
  let peg$currPos = options.peg$currPos | 0;
256
319
  let peg$savedPos = peg$currPos;
257
320
  const peg$posDetailsCache = [{ line: 1, column: 1 }];
@@ -387,8 +450,208 @@ function peg$parse(input, options) {
387
450
  return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location);
388
451
  }
389
452
  function peg$parsestart() {
390
- let s0;
391
- s0 = peg$parsecommands();
453
+ let s0, s1, s2;
454
+ s0 = peg$currPos;
455
+ s1 = [];
456
+ s2 = peg$parsefrontmatterLine();
457
+ while (s2 !== peg$FAILED) {
458
+ s1.push(s2);
459
+ s2 = peg$parsefrontmatterLine();
460
+ }
461
+ s2 = peg$parsecommands();
462
+ if (s2 !== peg$FAILED) {
463
+ peg$savedPos = s0;
464
+ s0 = peg$f0(s1, s2);
465
+ }
466
+ else {
467
+ peg$currPos = s0;
468
+ s0 = peg$FAILED;
469
+ }
470
+ return s0;
471
+ }
472
+ function peg$parsefrontmatterLine() {
473
+ let s0, s1, s2, s3, s4, s5, s6, s7, s8;
474
+ s0 = peg$currPos;
475
+ if (input.charCodeAt(peg$currPos) === 35) {
476
+ s1 = peg$c0;
477
+ peg$currPos++;
478
+ }
479
+ else {
480
+ s1 = peg$FAILED;
481
+ if (peg$silentFails === 0) {
482
+ peg$fail(peg$e0);
483
+ }
484
+ }
485
+ if (s1 !== peg$FAILED) {
486
+ s2 = [];
487
+ s3 = input.charAt(peg$currPos);
488
+ if (peg$r0.test(s3)) {
489
+ peg$currPos++;
490
+ }
491
+ else {
492
+ s3 = peg$FAILED;
493
+ if (peg$silentFails === 0) {
494
+ peg$fail(peg$e1);
495
+ }
496
+ }
497
+ while (s3 !== peg$FAILED) {
498
+ s2.push(s3);
499
+ s3 = input.charAt(peg$currPos);
500
+ if (peg$r0.test(s3)) {
501
+ peg$currPos++;
502
+ }
503
+ else {
504
+ s3 = peg$FAILED;
505
+ if (peg$silentFails === 0) {
506
+ peg$fail(peg$e1);
507
+ }
508
+ }
509
+ }
510
+ s3 = peg$currPos;
511
+ s4 = peg$currPos;
512
+ s5 = input.charAt(peg$currPos);
513
+ if (peg$r1.test(s5)) {
514
+ peg$currPos++;
515
+ }
516
+ else {
517
+ s5 = peg$FAILED;
518
+ if (peg$silentFails === 0) {
519
+ peg$fail(peg$e2);
520
+ }
521
+ }
522
+ if (s5 !== peg$FAILED) {
523
+ s6 = [];
524
+ s7 = input.charAt(peg$currPos);
525
+ if (peg$r2.test(s7)) {
526
+ peg$currPos++;
527
+ }
528
+ else {
529
+ s7 = peg$FAILED;
530
+ if (peg$silentFails === 0) {
531
+ peg$fail(peg$e3);
532
+ }
533
+ }
534
+ while (s7 !== peg$FAILED) {
535
+ s6.push(s7);
536
+ s7 = input.charAt(peg$currPos);
537
+ if (peg$r2.test(s7)) {
538
+ peg$currPos++;
539
+ }
540
+ else {
541
+ s7 = peg$FAILED;
542
+ if (peg$silentFails === 0) {
543
+ peg$fail(peg$e3);
544
+ }
545
+ }
546
+ }
547
+ s5 = [s5, s6];
548
+ s4 = s5;
549
+ }
550
+ else {
551
+ peg$currPos = s4;
552
+ s4 = peg$FAILED;
553
+ }
554
+ if (s4 !== peg$FAILED) {
555
+ s3 = input.substring(s3, peg$currPos);
556
+ }
557
+ else {
558
+ s3 = s4;
559
+ }
560
+ if (s3 !== peg$FAILED) {
561
+ s4 = [];
562
+ s5 = input.charAt(peg$currPos);
563
+ if (peg$r0.test(s5)) {
564
+ peg$currPos++;
565
+ }
566
+ else {
567
+ s5 = peg$FAILED;
568
+ if (peg$silentFails === 0) {
569
+ peg$fail(peg$e1);
570
+ }
571
+ }
572
+ while (s5 !== peg$FAILED) {
573
+ s4.push(s5);
574
+ s5 = input.charAt(peg$currPos);
575
+ if (peg$r0.test(s5)) {
576
+ peg$currPos++;
577
+ }
578
+ else {
579
+ s5 = peg$FAILED;
580
+ if (peg$silentFails === 0) {
581
+ peg$fail(peg$e1);
582
+ }
583
+ }
584
+ }
585
+ if (input.charCodeAt(peg$currPos) === 58) {
586
+ s5 = peg$c1;
587
+ peg$currPos++;
588
+ }
589
+ else {
590
+ s5 = peg$FAILED;
591
+ if (peg$silentFails === 0) {
592
+ peg$fail(peg$e4);
593
+ }
594
+ }
595
+ if (s5 !== peg$FAILED) {
596
+ s6 = peg$currPos;
597
+ s7 = [];
598
+ s8 = input.charAt(peg$currPos);
599
+ if (peg$r3.test(s8)) {
600
+ peg$currPos++;
601
+ }
602
+ else {
603
+ s8 = peg$FAILED;
604
+ if (peg$silentFails === 0) {
605
+ peg$fail(peg$e5);
606
+ }
607
+ }
608
+ while (s8 !== peg$FAILED) {
609
+ s7.push(s8);
610
+ s8 = input.charAt(peg$currPos);
611
+ if (peg$r3.test(s8)) {
612
+ peg$currPos++;
613
+ }
614
+ else {
615
+ s8 = peg$FAILED;
616
+ if (peg$silentFails === 0) {
617
+ peg$fail(peg$e5);
618
+ }
619
+ }
620
+ }
621
+ s6 = input.substring(s6, peg$currPos);
622
+ if (input.charCodeAt(peg$currPos) === 10) {
623
+ s7 = peg$c2;
624
+ peg$currPos++;
625
+ }
626
+ else {
627
+ s7 = peg$FAILED;
628
+ if (peg$silentFails === 0) {
629
+ peg$fail(peg$e6);
630
+ }
631
+ }
632
+ if (s7 !== peg$FAILED) {
633
+ peg$savedPos = s0;
634
+ s0 = peg$f1(s3, s6);
635
+ }
636
+ else {
637
+ peg$currPos = s0;
638
+ s0 = peg$FAILED;
639
+ }
640
+ }
641
+ else {
642
+ peg$currPos = s0;
643
+ s0 = peg$FAILED;
644
+ }
645
+ }
646
+ else {
647
+ peg$currPos = s0;
648
+ s0 = peg$FAILED;
649
+ }
650
+ }
651
+ else {
652
+ peg$currPos = s0;
653
+ s0 = peg$FAILED;
654
+ }
392
655
  return s0;
393
656
  }
394
657
  function peg$parsecommands() {
@@ -443,41 +706,54 @@ function peg$parse(input, options) {
443
706
  s4 = null;
444
707
  }
445
708
  peg$savedPos = s0;
446
- s0 = peg$f0(s2, s3);
709
+ s0 = peg$f2(s2, s3);
447
710
  }
448
711
  else {
449
712
  peg$currPos = s0;
450
713
  s0 = peg$FAILED;
451
714
  }
715
+ if (s0 === peg$FAILED) {
716
+ s0 = peg$currPos;
717
+ s1 = peg$parsewhite();
718
+ if (s1 === peg$FAILED) {
719
+ s1 = null;
720
+ }
721
+ peg$savedPos = s0;
722
+ s1 = peg$f3();
723
+ s0 = s1;
724
+ }
452
725
  return s0;
453
726
  }
454
727
  function peg$parsecommand() {
455
728
  let s0;
456
- s0 = peg$parsenote();
729
+ s0 = peg$parsekeySignature();
457
730
  if (s0 === peg$FAILED) {
458
- s0 = peg$parserest();
731
+ s0 = peg$parsetimeSignature();
459
732
  if (s0 === peg$FAILED) {
460
- s0 = peg$parsekeySignature();
733
+ s0 = peg$parsehalfTime();
461
734
  if (s0 === peg$FAILED) {
462
- s0 = peg$parsetimeSignature();
735
+ s0 = peg$parsedoubleTime();
463
736
  if (s0 === peg$FAILED) {
464
- s0 = peg$parsehalfTime();
737
+ s0 = peg$parsetripleTime();
465
738
  if (s0 === peg$FAILED) {
466
- s0 = peg$parsedoubleTime();
739
+ s0 = peg$parsemeasure();
467
740
  if (s0 === peg$FAILED) {
468
- s0 = peg$parsetripleTime();
741
+ s0 = peg$parseblock();
469
742
  if (s0 === peg$FAILED) {
470
- s0 = peg$parsemeasure();
743
+ s0 = peg$parserestoreStartPosition();
471
744
  if (s0 === peg$FAILED) {
472
- s0 = peg$parseblock();
745
+ s0 = peg$parsesetTrack();
473
746
  if (s0 === peg$FAILED) {
474
- s0 = peg$parserestoreStartPosition();
747
+ s0 = peg$parsemacro();
475
748
  if (s0 === peg$FAILED) {
476
- s0 = peg$parsesetTrack();
749
+ s0 = peg$parsesetClef();
477
750
  if (s0 === peg$FAILED) {
478
- s0 = peg$parsemacro();
751
+ s0 = peg$parsestring();
479
752
  if (s0 === peg$FAILED) {
480
- s0 = peg$parsesetClef();
753
+ s0 = peg$parsenote();
754
+ if (s0 === peg$FAILED) {
755
+ s0 = peg$parserest();
756
+ }
481
757
  }
482
758
  }
483
759
  }
@@ -495,27 +771,27 @@ function peg$parse(input, options) {
495
771
  function peg$parsekeySignature() {
496
772
  let s0, s1, s2, s3, s4, s5, s6;
497
773
  s0 = peg$currPos;
498
- if (input.substr(peg$currPos, 2) === peg$c0) {
499
- s1 = peg$c0;
774
+ if (input.substr(peg$currPos, 2) === peg$c3) {
775
+ s1 = peg$c3;
500
776
  peg$currPos += 2;
501
777
  }
502
778
  else {
503
779
  s1 = peg$FAILED;
504
780
  if (peg$silentFails === 0) {
505
- peg$fail(peg$e0);
781
+ peg$fail(peg$e7);
506
782
  }
507
783
  }
508
784
  if (s1 !== peg$FAILED) {
509
785
  s2 = peg$currPos;
510
786
  s3 = peg$currPos;
511
787
  if (input.charCodeAt(peg$currPos) === 45) {
512
- s4 = peg$c1;
788
+ s4 = peg$c4;
513
789
  peg$currPos++;
514
790
  }
515
791
  else {
516
792
  s4 = peg$FAILED;
517
793
  if (peg$silentFails === 0) {
518
- peg$fail(peg$e1);
794
+ peg$fail(peg$e8);
519
795
  }
520
796
  }
521
797
  if (s4 === peg$FAILED) {
@@ -523,26 +799,26 @@ function peg$parse(input, options) {
523
799
  }
524
800
  s5 = [];
525
801
  s6 = input.charAt(peg$currPos);
526
- if (peg$r0.test(s6)) {
802
+ if (peg$r4.test(s6)) {
527
803
  peg$currPos++;
528
804
  }
529
805
  else {
530
806
  s6 = peg$FAILED;
531
807
  if (peg$silentFails === 0) {
532
- peg$fail(peg$e2);
808
+ peg$fail(peg$e9);
533
809
  }
534
810
  }
535
811
  if (s6 !== peg$FAILED) {
536
812
  while (s6 !== peg$FAILED) {
537
813
  s5.push(s6);
538
814
  s6 = input.charAt(peg$currPos);
539
- if (peg$r0.test(s6)) {
815
+ if (peg$r4.test(s6)) {
540
816
  peg$currPos++;
541
817
  }
542
818
  else {
543
819
  s6 = peg$FAILED;
544
820
  if (peg$silentFails === 0) {
545
- peg$fail(peg$e2);
821
+ peg$fail(peg$e9);
546
822
  }
547
823
  }
548
824
  }
@@ -566,7 +842,7 @@ function peg$parse(input, options) {
566
842
  }
567
843
  if (s2 !== peg$FAILED) {
568
844
  peg$savedPos = s0;
569
- s0 = peg$f1(s2);
845
+ s0 = peg$f4(s2);
570
846
  }
571
847
  else {
572
848
  peg$currPos = s0;
@@ -582,40 +858,40 @@ function peg$parse(input, options) {
582
858
  function peg$parsetimeSignature() {
583
859
  let s0, s1, s2, s3, s4, s5, s6;
584
860
  s0 = peg$currPos;
585
- if (input.substr(peg$currPos, 2) === peg$c2) {
586
- s1 = peg$c2;
861
+ if (input.substr(peg$currPos, 2) === peg$c5) {
862
+ s1 = peg$c5;
587
863
  peg$currPos += 2;
588
864
  }
589
865
  else {
590
866
  s1 = peg$FAILED;
591
867
  if (peg$silentFails === 0) {
592
- peg$fail(peg$e3);
868
+ peg$fail(peg$e10);
593
869
  }
594
870
  }
595
871
  if (s1 !== peg$FAILED) {
596
872
  s2 = peg$currPos;
597
873
  s3 = [];
598
874
  s4 = input.charAt(peg$currPos);
599
- if (peg$r0.test(s4)) {
875
+ if (peg$r4.test(s4)) {
600
876
  peg$currPos++;
601
877
  }
602
878
  else {
603
879
  s4 = peg$FAILED;
604
880
  if (peg$silentFails === 0) {
605
- peg$fail(peg$e2);
881
+ peg$fail(peg$e9);
606
882
  }
607
883
  }
608
884
  if (s4 !== peg$FAILED) {
609
885
  while (s4 !== peg$FAILED) {
610
886
  s3.push(s4);
611
887
  s4 = input.charAt(peg$currPos);
612
- if (peg$r0.test(s4)) {
888
+ if (peg$r4.test(s4)) {
613
889
  peg$currPos++;
614
890
  }
615
891
  else {
616
892
  s4 = peg$FAILED;
617
893
  if (peg$silentFails === 0) {
618
- peg$fail(peg$e2);
894
+ peg$fail(peg$e9);
619
895
  }
620
896
  }
621
897
  }
@@ -631,39 +907,39 @@ function peg$parse(input, options) {
631
907
  }
632
908
  if (s2 !== peg$FAILED) {
633
909
  if (input.charCodeAt(peg$currPos) === 47) {
634
- s3 = peg$c3;
910
+ s3 = peg$c6;
635
911
  peg$currPos++;
636
912
  }
637
913
  else {
638
914
  s3 = peg$FAILED;
639
915
  if (peg$silentFails === 0) {
640
- peg$fail(peg$e4);
916
+ peg$fail(peg$e11);
641
917
  }
642
918
  }
643
919
  if (s3 !== peg$FAILED) {
644
920
  s4 = peg$currPos;
645
921
  s5 = [];
646
922
  s6 = input.charAt(peg$currPos);
647
- if (peg$r0.test(s6)) {
923
+ if (peg$r4.test(s6)) {
648
924
  peg$currPos++;
649
925
  }
650
926
  else {
651
927
  s6 = peg$FAILED;
652
928
  if (peg$silentFails === 0) {
653
- peg$fail(peg$e2);
929
+ peg$fail(peg$e9);
654
930
  }
655
931
  }
656
932
  if (s6 !== peg$FAILED) {
657
933
  while (s6 !== peg$FAILED) {
658
934
  s5.push(s6);
659
935
  s6 = input.charAt(peg$currPos);
660
- if (peg$r0.test(s6)) {
936
+ if (peg$r4.test(s6)) {
661
937
  peg$currPos++;
662
938
  }
663
939
  else {
664
940
  s6 = peg$FAILED;
665
941
  if (peg$silentFails === 0) {
666
- peg$fail(peg$e2);
942
+ peg$fail(peg$e9);
667
943
  }
668
944
  }
669
945
  }
@@ -679,7 +955,7 @@ function peg$parse(input, options) {
679
955
  }
680
956
  if (s4 !== peg$FAILED) {
681
957
  peg$savedPos = s0;
682
- s0 = peg$f2(s2, s4);
958
+ s0 = peg$f5(s2, s4);
683
959
  }
684
960
  else {
685
961
  peg$currPos = s0;
@@ -706,39 +982,39 @@ function peg$parse(input, options) {
706
982
  let s0, s1, s2, s3, s4;
707
983
  s0 = peg$currPos;
708
984
  if (input.charCodeAt(peg$currPos) === 116) {
709
- s1 = peg$c4;
985
+ s1 = peg$c7;
710
986
  peg$currPos++;
711
987
  }
712
988
  else {
713
989
  s1 = peg$FAILED;
714
990
  if (peg$silentFails === 0) {
715
- peg$fail(peg$e5);
991
+ peg$fail(peg$e12);
716
992
  }
717
993
  }
718
994
  if (s1 !== peg$FAILED) {
719
995
  s2 = peg$currPos;
720
996
  s3 = [];
721
997
  s4 = input.charAt(peg$currPos);
722
- if (peg$r0.test(s4)) {
998
+ if (peg$r4.test(s4)) {
723
999
  peg$currPos++;
724
1000
  }
725
1001
  else {
726
1002
  s4 = peg$FAILED;
727
1003
  if (peg$silentFails === 0) {
728
- peg$fail(peg$e2);
1004
+ peg$fail(peg$e9);
729
1005
  }
730
1006
  }
731
1007
  if (s4 !== peg$FAILED) {
732
1008
  while (s4 !== peg$FAILED) {
733
1009
  s3.push(s4);
734
1010
  s4 = input.charAt(peg$currPos);
735
- if (peg$r0.test(s4)) {
1011
+ if (peg$r4.test(s4)) {
736
1012
  peg$currPos++;
737
1013
  }
738
1014
  else {
739
1015
  s4 = peg$FAILED;
740
1016
  if (peg$silentFails === 0) {
741
- peg$fail(peg$e2);
1017
+ peg$fail(peg$e9);
742
1018
  }
743
1019
  }
744
1020
  }
@@ -754,7 +1030,7 @@ function peg$parse(input, options) {
754
1030
  }
755
1031
  if (s2 !== peg$FAILED) {
756
1032
  peg$savedPos = s0;
757
- s0 = peg$f3(s2);
1033
+ s0 = peg$f6(s2);
758
1034
  }
759
1035
  else {
760
1036
  peg$currPos = s0;
@@ -771,29 +1047,29 @@ function peg$parse(input, options) {
771
1047
  let s0, s1, s2;
772
1048
  s0 = peg$currPos;
773
1049
  if (input.charCodeAt(peg$currPos) === 47) {
774
- s1 = peg$c3;
1050
+ s1 = peg$c6;
775
1051
  peg$currPos++;
776
1052
  }
777
1053
  else {
778
1054
  s1 = peg$FAILED;
779
1055
  if (peg$silentFails === 0) {
780
- peg$fail(peg$e4);
1056
+ peg$fail(peg$e11);
781
1057
  }
782
1058
  }
783
1059
  if (s1 !== peg$FAILED) {
784
1060
  s2 = input.charAt(peg$currPos);
785
- if (peg$r1.test(s2)) {
1061
+ if (peg$r5.test(s2)) {
786
1062
  peg$currPos++;
787
1063
  }
788
1064
  else {
789
1065
  s2 = peg$FAILED;
790
1066
  if (peg$silentFails === 0) {
791
- peg$fail(peg$e6);
1067
+ peg$fail(peg$e13);
792
1068
  }
793
1069
  }
794
1070
  if (s2 !== peg$FAILED) {
795
1071
  peg$savedPos = s0;
796
- s0 = peg$f4(s2);
1072
+ s0 = peg$f7(s2);
797
1073
  }
798
1074
  else {
799
1075
  peg$currPos = s0;
@@ -810,13 +1086,13 @@ function peg$parse(input, options) {
810
1086
  let s0, s1, s2, s3;
811
1087
  s0 = peg$currPos;
812
1088
  if (input.charCodeAt(peg$currPos) === 36) {
813
- s1 = peg$c5;
1089
+ s1 = peg$c8;
814
1090
  peg$currPos++;
815
1091
  }
816
1092
  else {
817
1093
  s1 = peg$FAILED;
818
1094
  if (peg$silentFails === 0) {
819
- peg$fail(peg$e7);
1095
+ peg$fail(peg$e14);
820
1096
  }
821
1097
  }
822
1098
  if (s1 !== peg$FAILED) {
@@ -828,7 +1104,7 @@ function peg$parse(input, options) {
828
1104
  else {
829
1105
  s3 = peg$FAILED;
830
1106
  if (peg$silentFails === 0) {
831
- peg$fail(peg$e8);
1107
+ peg$fail(peg$e3);
832
1108
  }
833
1109
  }
834
1110
  if (s3 !== peg$FAILED) {
@@ -841,7 +1117,7 @@ function peg$parse(input, options) {
841
1117
  else {
842
1118
  s3 = peg$FAILED;
843
1119
  if (peg$silentFails === 0) {
844
- peg$fail(peg$e8);
1120
+ peg$fail(peg$e3);
845
1121
  }
846
1122
  }
847
1123
  }
@@ -851,7 +1127,7 @@ function peg$parse(input, options) {
851
1127
  }
852
1128
  if (s2 !== peg$FAILED) {
853
1129
  peg$savedPos = s0;
854
- s0 = peg$f5(s2);
1130
+ s0 = peg$f8(s2);
855
1131
  }
856
1132
  else {
857
1133
  peg$currPos = s0;
@@ -868,96 +1144,68 @@ function peg$parse(input, options) {
868
1144
  let s0, s1;
869
1145
  s0 = peg$currPos;
870
1146
  if (input.charCodeAt(peg$currPos) === 124) {
871
- s1 = peg$c6;
1147
+ s1 = peg$c9;
872
1148
  peg$currPos++;
873
1149
  }
874
1150
  else {
875
1151
  s1 = peg$FAILED;
876
1152
  if (peg$silentFails === 0) {
877
- peg$fail(peg$e9);
1153
+ peg$fail(peg$e15);
878
1154
  }
879
1155
  }
880
1156
  if (s1 !== peg$FAILED) {
881
1157
  peg$savedPos = s0;
882
- s1 = peg$f6();
1158
+ s1 = peg$f9();
883
1159
  }
884
1160
  s0 = s1;
885
1161
  return s0;
886
1162
  }
887
1163
  function peg$parsenote() {
888
- let s0, s1, s2, s3, s4, s5, s6;
1164
+ let s0, s1, s2, s3, s4;
889
1165
  s0 = peg$currPos;
890
1166
  s1 = input.charAt(peg$currPos);
891
- if (peg$r3.test(s1)) {
1167
+ if (peg$r6.test(s1)) {
892
1168
  peg$currPos++;
893
1169
  }
894
1170
  else {
895
1171
  s1 = peg$FAILED;
896
1172
  if (peg$silentFails === 0) {
897
- peg$fail(peg$e10);
1173
+ peg$fail(peg$e16);
898
1174
  }
899
1175
  }
900
1176
  if (s1 !== peg$FAILED) {
901
1177
  s2 = input.charAt(peg$currPos);
902
- if (peg$r4.test(s2)) {
1178
+ if (peg$r7.test(s2)) {
903
1179
  peg$currPos++;
904
1180
  }
905
1181
  else {
906
1182
  s2 = peg$FAILED;
907
1183
  if (peg$silentFails === 0) {
908
- peg$fail(peg$e11);
1184
+ peg$fail(peg$e17);
909
1185
  }
910
1186
  }
911
1187
  if (s2 === peg$FAILED) {
912
1188
  s2 = null;
913
1189
  }
914
1190
  s3 = input.charAt(peg$currPos);
915
- if (peg$r0.test(s3)) {
1191
+ if (peg$r4.test(s3)) {
916
1192
  peg$currPos++;
917
1193
  }
918
1194
  else {
919
1195
  s3 = peg$FAILED;
920
1196
  if (peg$silentFails === 0) {
921
- peg$fail(peg$e2);
1197
+ peg$fail(peg$e9);
922
1198
  }
923
1199
  }
924
- if (s3 !== peg$FAILED) {
925
- s4 = peg$currPos;
926
- if (input.charCodeAt(peg$currPos) === 46) {
927
- s5 = peg$c7;
928
- peg$currPos++;
929
- }
930
- else {
931
- s5 = peg$FAILED;
932
- if (peg$silentFails === 0) {
933
- peg$fail(peg$e12);
934
- }
935
- }
936
- if (s5 !== peg$FAILED) {
937
- s6 = peg$parsenoteTiming();
938
- if (s6 !== peg$FAILED) {
939
- peg$savedPos = s4;
940
- s4 = peg$f7(s1, s2, s3, s6);
941
- }
942
- else {
943
- peg$currPos = s4;
944
- s4 = peg$FAILED;
945
- }
946
- }
947
- else {
948
- peg$currPos = s4;
949
- s4 = peg$FAILED;
950
- }
951
- if (s4 === peg$FAILED) {
952
- s4 = null;
953
- }
954
- peg$savedPos = s0;
955
- s0 = peg$f8(s1, s2, s3, s4);
1200
+ if (s3 === peg$FAILED) {
1201
+ s3 = null;
956
1202
  }
957
- else {
958
- peg$currPos = s0;
959
- s0 = peg$FAILED;
1203
+ s4 = peg$parsenoteTiming();
1204
+ if (s4 === peg$FAILED) {
1205
+ s4 = null;
960
1206
  }
1207
+ peg$savedPos = s0;
1208
+ s0 = peg$f10(s1, s2, s3, s4);
961
1209
  }
962
1210
  else {
963
1211
  peg$currPos = s0;
@@ -969,22 +1217,22 @@ function peg$parse(input, options) {
969
1217
  let s0, s1, s2;
970
1218
  s0 = peg$currPos;
971
1219
  s1 = input.charAt(peg$currPos);
972
- if (peg$r5.test(s1)) {
1220
+ if (peg$r8.test(s1)) {
973
1221
  peg$currPos++;
974
1222
  }
975
1223
  else {
976
1224
  s1 = peg$FAILED;
977
1225
  if (peg$silentFails === 0) {
978
- peg$fail(peg$e13);
1226
+ peg$fail(peg$e18);
979
1227
  }
980
1228
  }
981
1229
  if (s1 !== peg$FAILED) {
982
- s2 = peg$parsenoteTiming();
1230
+ s2 = peg$parserestTiming();
983
1231
  if (s2 === peg$FAILED) {
984
1232
  s2 = null;
985
1233
  }
986
1234
  peg$savedPos = s0;
987
- s0 = peg$f9(s2);
1235
+ s0 = peg$f11(s2);
988
1236
  }
989
1237
  else {
990
1238
  peg$currPos = s0;
@@ -993,111 +1241,529 @@ function peg$parse(input, options) {
993
1241
  return s0;
994
1242
  }
995
1243
  function peg$parsenoteTiming() {
996
- let s0, s1, s2, s3, s4, s5, s6;
1244
+ let s0, s1, s2, s3, s4, s5, s6, s7;
997
1245
  s0 = peg$currPos;
998
1246
  s1 = peg$currPos;
999
- s2 = [];
1000
- s3 = input.charAt(peg$currPos);
1001
- if (peg$r0.test(s3)) {
1247
+ if (input.charCodeAt(peg$currPos) === 42) {
1248
+ s2 = peg$c10;
1002
1249
  peg$currPos++;
1003
1250
  }
1004
1251
  else {
1005
- s3 = peg$FAILED;
1252
+ s2 = peg$FAILED;
1006
1253
  if (peg$silentFails === 0) {
1007
- peg$fail(peg$e2);
1008
- }
1009
- }
1010
- if (s3 !== peg$FAILED) {
1011
- while (s3 !== peg$FAILED) {
1012
- s2.push(s3);
1013
- s3 = input.charAt(peg$currPos);
1014
- if (peg$r0.test(s3)) {
1015
- peg$currPos++;
1016
- }
1017
- else {
1018
- s3 = peg$FAILED;
1019
- if (peg$silentFails === 0) {
1020
- peg$fail(peg$e2);
1021
- }
1022
- }
1254
+ peg$fail(peg$e19);
1023
1255
  }
1024
1256
  }
1025
- else {
1026
- s2 = peg$FAILED;
1027
- }
1028
1257
  if (s2 !== peg$FAILED) {
1029
- s1 = input.substring(s1, peg$currPos);
1030
- }
1031
- else {
1032
- s1 = s2;
1033
- }
1034
- if (s1 !== peg$FAILED) {
1035
- s2 = peg$currPos;
1036
- if (input.charCodeAt(peg$currPos) === 46) {
1037
- s3 = peg$c7;
1258
+ s3 = peg$currPos;
1259
+ s4 = peg$currPos;
1260
+ s5 = [];
1261
+ s6 = input.charAt(peg$currPos);
1262
+ if (peg$r4.test(s6)) {
1038
1263
  peg$currPos++;
1039
1264
  }
1040
1265
  else {
1041
- s3 = peg$FAILED;
1266
+ s6 = peg$FAILED;
1042
1267
  if (peg$silentFails === 0) {
1043
- peg$fail(peg$e12);
1268
+ peg$fail(peg$e9);
1044
1269
  }
1045
1270
  }
1271
+ while (s6 !== peg$FAILED) {
1272
+ s5.push(s6);
1273
+ if (s5.length >= 3) {
1274
+ s6 = peg$FAILED;
1275
+ }
1276
+ else {
1277
+ s6 = input.charAt(peg$currPos);
1278
+ if (peg$r4.test(s6)) {
1279
+ peg$currPos++;
1280
+ }
1281
+ else {
1282
+ s6 = peg$FAILED;
1283
+ if (peg$silentFails === 0) {
1284
+ peg$fail(peg$e9);
1285
+ }
1286
+ }
1287
+ }
1288
+ }
1289
+ if (s5.length < 1) {
1290
+ peg$currPos = s4;
1291
+ s4 = peg$FAILED;
1292
+ }
1293
+ else {
1294
+ s4 = s5;
1295
+ }
1296
+ if (s4 !== peg$FAILED) {
1297
+ s3 = input.substring(s3, peg$currPos);
1298
+ }
1299
+ else {
1300
+ s3 = s4;
1301
+ }
1046
1302
  if (s3 !== peg$FAILED) {
1303
+ peg$savedPos = s1;
1304
+ s1 = peg$f12(s3);
1305
+ }
1306
+ else {
1307
+ peg$currPos = s1;
1308
+ s1 = peg$FAILED;
1309
+ }
1310
+ }
1311
+ else {
1312
+ peg$currPos = s1;
1313
+ s1 = peg$FAILED;
1314
+ }
1315
+ if (s1 === peg$FAILED) {
1316
+ s1 = peg$currPos;
1317
+ if (input.charCodeAt(peg$currPos) === 47) {
1318
+ s2 = peg$c6;
1319
+ peg$currPos++;
1320
+ }
1321
+ else {
1322
+ s2 = peg$FAILED;
1323
+ if (peg$silentFails === 0) {
1324
+ peg$fail(peg$e11);
1325
+ }
1326
+ }
1327
+ if (s2 !== peg$FAILED) {
1328
+ s3 = peg$currPos;
1047
1329
  s4 = peg$currPos;
1048
1330
  s5 = [];
1049
1331
  s6 = input.charAt(peg$currPos);
1050
- if (peg$r0.test(s6)) {
1332
+ if (peg$r4.test(s6)) {
1051
1333
  peg$currPos++;
1052
1334
  }
1053
1335
  else {
1054
1336
  s6 = peg$FAILED;
1055
1337
  if (peg$silentFails === 0) {
1056
- peg$fail(peg$e2);
1338
+ peg$fail(peg$e9);
1057
1339
  }
1058
1340
  }
1059
- if (s6 !== peg$FAILED) {
1060
- while (s6 !== peg$FAILED) {
1061
- s5.push(s6);
1341
+ while (s6 !== peg$FAILED) {
1342
+ s5.push(s6);
1343
+ if (s5.length >= 3) {
1344
+ s6 = peg$FAILED;
1345
+ }
1346
+ else {
1062
1347
  s6 = input.charAt(peg$currPos);
1063
- if (peg$r0.test(s6)) {
1348
+ if (peg$r4.test(s6)) {
1064
1349
  peg$currPos++;
1065
1350
  }
1066
1351
  else {
1067
1352
  s6 = peg$FAILED;
1068
1353
  if (peg$silentFails === 0) {
1069
- peg$fail(peg$e2);
1354
+ peg$fail(peg$e9);
1070
1355
  }
1071
1356
  }
1072
1357
  }
1073
1358
  }
1359
+ if (s5.length < 1) {
1360
+ peg$currPos = s4;
1361
+ s4 = peg$FAILED;
1362
+ }
1074
1363
  else {
1075
- s5 = peg$FAILED;
1364
+ s4 = s5;
1076
1365
  }
1077
- if (s5 !== peg$FAILED) {
1078
- s4 = input.substring(s4, peg$currPos);
1366
+ if (s4 !== peg$FAILED) {
1367
+ s3 = input.substring(s3, peg$currPos);
1368
+ }
1369
+ else {
1370
+ s3 = s4;
1371
+ }
1372
+ if (s3 !== peg$FAILED) {
1373
+ peg$savedPos = s1;
1374
+ s1 = peg$f13(s3);
1375
+ }
1376
+ else {
1377
+ peg$currPos = s1;
1378
+ s1 = peg$FAILED;
1379
+ }
1380
+ }
1381
+ else {
1382
+ peg$currPos = s1;
1383
+ s1 = peg$FAILED;
1384
+ }
1385
+ }
1386
+ if (s1 === peg$FAILED) {
1387
+ s1 = null;
1388
+ }
1389
+ s2 = peg$currPos;
1390
+ s3 = [];
1391
+ if (input.charCodeAt(peg$currPos) === 46) {
1392
+ s4 = peg$c11;
1393
+ peg$currPos++;
1394
+ }
1395
+ else {
1396
+ s4 = peg$FAILED;
1397
+ if (peg$silentFails === 0) {
1398
+ peg$fail(peg$e20);
1399
+ }
1400
+ }
1401
+ if (s4 !== peg$FAILED) {
1402
+ while (s4 !== peg$FAILED) {
1403
+ s3.push(s4);
1404
+ if (input.charCodeAt(peg$currPos) === 46) {
1405
+ s4 = peg$c11;
1406
+ peg$currPos++;
1407
+ }
1408
+ else {
1409
+ s4 = peg$FAILED;
1410
+ if (peg$silentFails === 0) {
1411
+ peg$fail(peg$e20);
1412
+ }
1413
+ }
1414
+ }
1415
+ }
1416
+ else {
1417
+ s3 = peg$FAILED;
1418
+ }
1419
+ if (s3 !== peg$FAILED) {
1420
+ s2 = input.substring(s2, peg$currPos);
1421
+ }
1422
+ else {
1423
+ s2 = s3;
1424
+ }
1425
+ if (s2 === peg$FAILED) {
1426
+ s2 = null;
1427
+ }
1428
+ s3 = peg$currPos;
1429
+ if (input.charCodeAt(peg$currPos) === 64) {
1430
+ s4 = peg$c12;
1431
+ peg$currPos++;
1432
+ }
1433
+ else {
1434
+ s4 = peg$FAILED;
1435
+ if (peg$silentFails === 0) {
1436
+ peg$fail(peg$e21);
1437
+ }
1438
+ }
1439
+ if (s4 !== peg$FAILED) {
1440
+ s5 = peg$currPos;
1441
+ s6 = [];
1442
+ s7 = input.charAt(peg$currPos);
1443
+ if (peg$r4.test(s7)) {
1444
+ peg$currPos++;
1445
+ }
1446
+ else {
1447
+ s7 = peg$FAILED;
1448
+ if (peg$silentFails === 0) {
1449
+ peg$fail(peg$e9);
1450
+ }
1451
+ }
1452
+ if (s7 !== peg$FAILED) {
1453
+ while (s7 !== peg$FAILED) {
1454
+ s6.push(s7);
1455
+ s7 = input.charAt(peg$currPos);
1456
+ if (peg$r4.test(s7)) {
1457
+ peg$currPos++;
1458
+ }
1459
+ else {
1460
+ s7 = peg$FAILED;
1461
+ if (peg$silentFails === 0) {
1462
+ peg$fail(peg$e9);
1463
+ }
1464
+ }
1465
+ }
1466
+ }
1467
+ else {
1468
+ s6 = peg$FAILED;
1469
+ }
1470
+ if (s6 !== peg$FAILED) {
1471
+ s5 = input.substring(s5, peg$currPos);
1472
+ }
1473
+ else {
1474
+ s5 = s6;
1475
+ }
1476
+ if (s5 !== peg$FAILED) {
1477
+ peg$savedPos = s3;
1478
+ s3 = peg$f14(s1, s2, s5);
1479
+ }
1480
+ else {
1481
+ peg$currPos = s3;
1482
+ s3 = peg$FAILED;
1483
+ }
1484
+ }
1485
+ else {
1486
+ peg$currPos = s3;
1487
+ s3 = peg$FAILED;
1488
+ }
1489
+ if (s3 === peg$FAILED) {
1490
+ s3 = null;
1491
+ }
1492
+ peg$savedPos = peg$currPos;
1493
+ s4 = peg$f15(s1, s2, s3);
1494
+ if (s4) {
1495
+ s4 = undefined;
1496
+ }
1497
+ else {
1498
+ s4 = peg$FAILED;
1499
+ }
1500
+ if (s4 !== peg$FAILED) {
1501
+ peg$savedPos = s0;
1502
+ s0 = peg$f16(s1, s2, s3);
1503
+ }
1504
+ else {
1505
+ peg$currPos = s0;
1506
+ s0 = peg$FAILED;
1507
+ }
1508
+ return s0;
1509
+ }
1510
+ function peg$parserestTiming() {
1511
+ let s0, s1, s2, s3, s4, s5, s6, s7;
1512
+ s0 = peg$currPos;
1513
+ s1 = peg$currPos;
1514
+ if (input.charCodeAt(peg$currPos) === 42) {
1515
+ s2 = peg$c10;
1516
+ peg$currPos++;
1517
+ }
1518
+ else {
1519
+ s2 = peg$FAILED;
1520
+ if (peg$silentFails === 0) {
1521
+ peg$fail(peg$e19);
1522
+ }
1523
+ }
1524
+ if (s2 === peg$FAILED) {
1525
+ s2 = null;
1526
+ }
1527
+ s3 = peg$currPos;
1528
+ s4 = peg$currPos;
1529
+ s5 = [];
1530
+ s6 = input.charAt(peg$currPos);
1531
+ if (peg$r4.test(s6)) {
1532
+ peg$currPos++;
1533
+ }
1534
+ else {
1535
+ s6 = peg$FAILED;
1536
+ if (peg$silentFails === 0) {
1537
+ peg$fail(peg$e9);
1538
+ }
1539
+ }
1540
+ while (s6 !== peg$FAILED) {
1541
+ s5.push(s6);
1542
+ if (s5.length >= 3) {
1543
+ s6 = peg$FAILED;
1544
+ }
1545
+ else {
1546
+ s6 = input.charAt(peg$currPos);
1547
+ if (peg$r4.test(s6)) {
1548
+ peg$currPos++;
1549
+ }
1550
+ else {
1551
+ s6 = peg$FAILED;
1552
+ if (peg$silentFails === 0) {
1553
+ peg$fail(peg$e9);
1554
+ }
1555
+ }
1556
+ }
1557
+ }
1558
+ if (s5.length < 1) {
1559
+ peg$currPos = s4;
1560
+ s4 = peg$FAILED;
1561
+ }
1562
+ else {
1563
+ s4 = s5;
1564
+ }
1565
+ if (s4 !== peg$FAILED) {
1566
+ s3 = input.substring(s3, peg$currPos);
1567
+ }
1568
+ else {
1569
+ s3 = s4;
1570
+ }
1571
+ if (s3 !== peg$FAILED) {
1572
+ peg$savedPos = s1;
1573
+ s1 = peg$f17(s3);
1574
+ }
1575
+ else {
1576
+ peg$currPos = s1;
1577
+ s1 = peg$FAILED;
1578
+ }
1579
+ if (s1 === peg$FAILED) {
1580
+ s1 = peg$currPos;
1581
+ if (input.charCodeAt(peg$currPos) === 47) {
1582
+ s2 = peg$c6;
1583
+ peg$currPos++;
1584
+ }
1585
+ else {
1586
+ s2 = peg$FAILED;
1587
+ if (peg$silentFails === 0) {
1588
+ peg$fail(peg$e11);
1589
+ }
1590
+ }
1591
+ if (s2 !== peg$FAILED) {
1592
+ s3 = peg$currPos;
1593
+ s4 = peg$currPos;
1594
+ s5 = [];
1595
+ s6 = input.charAt(peg$currPos);
1596
+ if (peg$r4.test(s6)) {
1597
+ peg$currPos++;
1598
+ }
1599
+ else {
1600
+ s6 = peg$FAILED;
1601
+ if (peg$silentFails === 0) {
1602
+ peg$fail(peg$e9);
1603
+ }
1604
+ }
1605
+ while (s6 !== peg$FAILED) {
1606
+ s5.push(s6);
1607
+ if (s5.length >= 3) {
1608
+ s6 = peg$FAILED;
1609
+ }
1610
+ else {
1611
+ s6 = input.charAt(peg$currPos);
1612
+ if (peg$r4.test(s6)) {
1613
+ peg$currPos++;
1614
+ }
1615
+ else {
1616
+ s6 = peg$FAILED;
1617
+ if (peg$silentFails === 0) {
1618
+ peg$fail(peg$e9);
1619
+ }
1620
+ }
1621
+ }
1622
+ }
1623
+ if (s5.length < 1) {
1624
+ peg$currPos = s4;
1625
+ s4 = peg$FAILED;
1079
1626
  }
1080
1627
  else {
1081
1628
  s4 = s5;
1082
1629
  }
1083
1630
  if (s4 !== peg$FAILED) {
1084
- peg$savedPos = s2;
1085
- s2 = peg$f10(s1, s4);
1631
+ s3 = input.substring(s3, peg$currPos);
1086
1632
  }
1087
1633
  else {
1088
- peg$currPos = s2;
1089
- s2 = peg$FAILED;
1634
+ s3 = s4;
1635
+ }
1636
+ if (s3 !== peg$FAILED) {
1637
+ peg$savedPos = s1;
1638
+ s1 = peg$f18(s3);
1639
+ }
1640
+ else {
1641
+ peg$currPos = s1;
1642
+ s1 = peg$FAILED;
1090
1643
  }
1091
1644
  }
1092
1645
  else {
1093
- peg$currPos = s2;
1094
- s2 = peg$FAILED;
1646
+ peg$currPos = s1;
1647
+ s1 = peg$FAILED;
1095
1648
  }
1096
- if (s2 === peg$FAILED) {
1097
- s2 = null;
1649
+ }
1650
+ if (s1 === peg$FAILED) {
1651
+ s1 = null;
1652
+ }
1653
+ s2 = peg$currPos;
1654
+ s3 = [];
1655
+ if (input.charCodeAt(peg$currPos) === 46) {
1656
+ s4 = peg$c11;
1657
+ peg$currPos++;
1658
+ }
1659
+ else {
1660
+ s4 = peg$FAILED;
1661
+ if (peg$silentFails === 0) {
1662
+ peg$fail(peg$e20);
1663
+ }
1664
+ }
1665
+ if (s4 !== peg$FAILED) {
1666
+ while (s4 !== peg$FAILED) {
1667
+ s3.push(s4);
1668
+ if (input.charCodeAt(peg$currPos) === 46) {
1669
+ s4 = peg$c11;
1670
+ peg$currPos++;
1671
+ }
1672
+ else {
1673
+ s4 = peg$FAILED;
1674
+ if (peg$silentFails === 0) {
1675
+ peg$fail(peg$e20);
1676
+ }
1677
+ }
1678
+ }
1679
+ }
1680
+ else {
1681
+ s3 = peg$FAILED;
1682
+ }
1683
+ if (s3 !== peg$FAILED) {
1684
+ s2 = input.substring(s2, peg$currPos);
1685
+ }
1686
+ else {
1687
+ s2 = s3;
1688
+ }
1689
+ if (s2 === peg$FAILED) {
1690
+ s2 = null;
1691
+ }
1692
+ s3 = peg$currPos;
1693
+ if (input.charCodeAt(peg$currPos) === 64) {
1694
+ s4 = peg$c12;
1695
+ peg$currPos++;
1696
+ }
1697
+ else {
1698
+ s4 = peg$FAILED;
1699
+ if (peg$silentFails === 0) {
1700
+ peg$fail(peg$e21);
1701
+ }
1702
+ }
1703
+ if (s4 !== peg$FAILED) {
1704
+ s5 = peg$currPos;
1705
+ s6 = [];
1706
+ s7 = input.charAt(peg$currPos);
1707
+ if (peg$r4.test(s7)) {
1708
+ peg$currPos++;
1709
+ }
1710
+ else {
1711
+ s7 = peg$FAILED;
1712
+ if (peg$silentFails === 0) {
1713
+ peg$fail(peg$e9);
1714
+ }
1715
+ }
1716
+ if (s7 !== peg$FAILED) {
1717
+ while (s7 !== peg$FAILED) {
1718
+ s6.push(s7);
1719
+ s7 = input.charAt(peg$currPos);
1720
+ if (peg$r4.test(s7)) {
1721
+ peg$currPos++;
1722
+ }
1723
+ else {
1724
+ s7 = peg$FAILED;
1725
+ if (peg$silentFails === 0) {
1726
+ peg$fail(peg$e9);
1727
+ }
1728
+ }
1729
+ }
1730
+ }
1731
+ else {
1732
+ s6 = peg$FAILED;
1733
+ }
1734
+ if (s6 !== peg$FAILED) {
1735
+ s5 = input.substring(s5, peg$currPos);
1736
+ }
1737
+ else {
1738
+ s5 = s6;
1098
1739
  }
1740
+ if (s5 !== peg$FAILED) {
1741
+ peg$savedPos = s3;
1742
+ s3 = peg$f19(s1, s2, s5);
1743
+ }
1744
+ else {
1745
+ peg$currPos = s3;
1746
+ s3 = peg$FAILED;
1747
+ }
1748
+ }
1749
+ else {
1750
+ peg$currPos = s3;
1751
+ s3 = peg$FAILED;
1752
+ }
1753
+ if (s3 === peg$FAILED) {
1754
+ s3 = null;
1755
+ }
1756
+ peg$savedPos = peg$currPos;
1757
+ s4 = peg$f20(s1, s2, s3);
1758
+ if (s4) {
1759
+ s4 = undefined;
1760
+ }
1761
+ else {
1762
+ s4 = peg$FAILED;
1763
+ }
1764
+ if (s4 !== peg$FAILED) {
1099
1765
  peg$savedPos = s0;
1100
- s0 = peg$f11(s1, s2);
1766
+ s0 = peg$f21(s1, s2, s3);
1101
1767
  }
1102
1768
  else {
1103
1769
  peg$currPos = s0;
@@ -1106,102 +1772,189 @@ function peg$parse(input, options) {
1106
1772
  return s0;
1107
1773
  }
1108
1774
  function peg$parsehalfTime() {
1109
- let s0, s1;
1775
+ let s0, s1, s2, s3, s4;
1110
1776
  s0 = peg$currPos;
1111
- if (input.substr(peg$currPos, 2) === peg$c8) {
1112
- s1 = peg$c8;
1777
+ if (input.substr(peg$currPos, 2) === peg$c13) {
1778
+ s1 = peg$c13;
1113
1779
  peg$currPos += 2;
1114
1780
  }
1115
1781
  else {
1116
1782
  s1 = peg$FAILED;
1117
1783
  if (peg$silentFails === 0) {
1118
- peg$fail(peg$e14);
1784
+ peg$fail(peg$e22);
1119
1785
  }
1120
1786
  }
1121
1787
  if (s1 !== peg$FAILED) {
1788
+ s2 = peg$currPos;
1789
+ s3 = [];
1790
+ s4 = input.charAt(peg$currPos);
1791
+ if (peg$r4.test(s4)) {
1792
+ peg$currPos++;
1793
+ }
1794
+ else {
1795
+ s4 = peg$FAILED;
1796
+ if (peg$silentFails === 0) {
1797
+ peg$fail(peg$e9);
1798
+ }
1799
+ }
1800
+ while (s4 !== peg$FAILED) {
1801
+ s3.push(s4);
1802
+ s4 = input.charAt(peg$currPos);
1803
+ if (peg$r4.test(s4)) {
1804
+ peg$currPos++;
1805
+ }
1806
+ else {
1807
+ s4 = peg$FAILED;
1808
+ if (peg$silentFails === 0) {
1809
+ peg$fail(peg$e9);
1810
+ }
1811
+ }
1812
+ }
1813
+ s2 = input.substring(s2, peg$currPos);
1122
1814
  peg$savedPos = s0;
1123
- s1 = peg$f12();
1815
+ s0 = peg$f22(s2);
1816
+ }
1817
+ else {
1818
+ peg$currPos = s0;
1819
+ s0 = peg$FAILED;
1124
1820
  }
1125
- s0 = s1;
1126
1821
  return s0;
1127
1822
  }
1128
1823
  function peg$parsedoubleTime() {
1129
- let s0, s1;
1824
+ let s0, s1, s2, s3, s4;
1130
1825
  s0 = peg$currPos;
1131
- if (input.substr(peg$currPos, 2) === peg$c9) {
1132
- s1 = peg$c9;
1826
+ if (input.substr(peg$currPos, 2) === peg$c14) {
1827
+ s1 = peg$c14;
1133
1828
  peg$currPos += 2;
1134
1829
  }
1135
1830
  else {
1136
1831
  s1 = peg$FAILED;
1137
1832
  if (peg$silentFails === 0) {
1138
- peg$fail(peg$e15);
1833
+ peg$fail(peg$e23);
1139
1834
  }
1140
1835
  }
1141
1836
  if (s1 !== peg$FAILED) {
1837
+ s2 = peg$currPos;
1838
+ s3 = [];
1839
+ s4 = input.charAt(peg$currPos);
1840
+ if (peg$r4.test(s4)) {
1841
+ peg$currPos++;
1842
+ }
1843
+ else {
1844
+ s4 = peg$FAILED;
1845
+ if (peg$silentFails === 0) {
1846
+ peg$fail(peg$e9);
1847
+ }
1848
+ }
1849
+ while (s4 !== peg$FAILED) {
1850
+ s3.push(s4);
1851
+ s4 = input.charAt(peg$currPos);
1852
+ if (peg$r4.test(s4)) {
1853
+ peg$currPos++;
1854
+ }
1855
+ else {
1856
+ s4 = peg$FAILED;
1857
+ if (peg$silentFails === 0) {
1858
+ peg$fail(peg$e9);
1859
+ }
1860
+ }
1861
+ }
1862
+ s2 = input.substring(s2, peg$currPos);
1142
1863
  peg$savedPos = s0;
1143
- s1 = peg$f13();
1864
+ s0 = peg$f23(s2);
1865
+ }
1866
+ else {
1867
+ peg$currPos = s0;
1868
+ s0 = peg$FAILED;
1144
1869
  }
1145
- s0 = s1;
1146
1870
  return s0;
1147
1871
  }
1148
1872
  function peg$parsetripleTime() {
1149
- let s0, s1;
1873
+ let s0, s1, s2, s3, s4;
1150
1874
  s0 = peg$currPos;
1151
- if (input.substr(peg$currPos, 2) === peg$c10) {
1152
- s1 = peg$c10;
1875
+ if (input.substr(peg$currPos, 2) === peg$c15) {
1876
+ s1 = peg$c15;
1153
1877
  peg$currPos += 2;
1154
1878
  }
1155
1879
  else {
1156
1880
  s1 = peg$FAILED;
1157
1881
  if (peg$silentFails === 0) {
1158
- peg$fail(peg$e16);
1882
+ peg$fail(peg$e24);
1883
+ }
1884
+ }
1885
+ if (s1 !== peg$FAILED) {
1886
+ s2 = peg$currPos;
1887
+ s3 = [];
1888
+ s4 = input.charAt(peg$currPos);
1889
+ if (peg$r4.test(s4)) {
1890
+ peg$currPos++;
1891
+ }
1892
+ else {
1893
+ s4 = peg$FAILED;
1894
+ if (peg$silentFails === 0) {
1895
+ peg$fail(peg$e9);
1896
+ }
1897
+ }
1898
+ while (s4 !== peg$FAILED) {
1899
+ s3.push(s4);
1900
+ s4 = input.charAt(peg$currPos);
1901
+ if (peg$r4.test(s4)) {
1902
+ peg$currPos++;
1903
+ }
1904
+ else {
1905
+ s4 = peg$FAILED;
1906
+ if (peg$silentFails === 0) {
1907
+ peg$fail(peg$e9);
1908
+ }
1909
+ }
1159
1910
  }
1160
- }
1161
- if (s1 !== peg$FAILED) {
1911
+ s2 = input.substring(s2, peg$currPos);
1162
1912
  peg$savedPos = s0;
1163
- s1 = peg$f14();
1913
+ s0 = peg$f24(s2);
1914
+ }
1915
+ else {
1916
+ peg$currPos = s0;
1917
+ s0 = peg$FAILED;
1164
1918
  }
1165
- s0 = s1;
1166
1919
  return s0;
1167
1920
  }
1168
1921
  function peg$parsemeasure() {
1169
1922
  let s0, s1, s2, s3, s4;
1170
1923
  s0 = peg$currPos;
1171
1924
  if (input.charCodeAt(peg$currPos) === 109) {
1172
- s1 = peg$c11;
1925
+ s1 = peg$c16;
1173
1926
  peg$currPos++;
1174
1927
  }
1175
1928
  else {
1176
1929
  s1 = peg$FAILED;
1177
1930
  if (peg$silentFails === 0) {
1178
- peg$fail(peg$e17);
1931
+ peg$fail(peg$e25);
1179
1932
  }
1180
1933
  }
1181
1934
  if (s1 !== peg$FAILED) {
1182
1935
  s2 = peg$currPos;
1183
1936
  s3 = [];
1184
1937
  s4 = input.charAt(peg$currPos);
1185
- if (peg$r0.test(s4)) {
1938
+ if (peg$r4.test(s4)) {
1186
1939
  peg$currPos++;
1187
1940
  }
1188
1941
  else {
1189
1942
  s4 = peg$FAILED;
1190
1943
  if (peg$silentFails === 0) {
1191
- peg$fail(peg$e2);
1944
+ peg$fail(peg$e9);
1192
1945
  }
1193
1946
  }
1194
1947
  if (s4 !== peg$FAILED) {
1195
1948
  while (s4 !== peg$FAILED) {
1196
1949
  s3.push(s4);
1197
1950
  s4 = input.charAt(peg$currPos);
1198
- if (peg$r0.test(s4)) {
1951
+ if (peg$r4.test(s4)) {
1199
1952
  peg$currPos++;
1200
1953
  }
1201
1954
  else {
1202
1955
  s4 = peg$FAILED;
1203
1956
  if (peg$silentFails === 0) {
1204
- peg$fail(peg$e2);
1957
+ peg$fail(peg$e9);
1205
1958
  }
1206
1959
  }
1207
1960
  }
@@ -1217,7 +1970,7 @@ function peg$parse(input, options) {
1217
1970
  }
1218
1971
  if (s2 !== peg$FAILED) {
1219
1972
  peg$savedPos = s0;
1220
- s0 = peg$f15(s2);
1973
+ s0 = peg$f25(s2);
1221
1974
  }
1222
1975
  else {
1223
1976
  peg$currPos = s0;
@@ -1228,37 +1981,55 @@ function peg$parse(input, options) {
1228
1981
  peg$currPos = s0;
1229
1982
  s0 = peg$FAILED;
1230
1983
  }
1984
+ if (s0 === peg$FAILED) {
1985
+ s0 = peg$currPos;
1986
+ if (input.charCodeAt(peg$currPos) === 109) {
1987
+ s1 = peg$c16;
1988
+ peg$currPos++;
1989
+ }
1990
+ else {
1991
+ s1 = peg$FAILED;
1992
+ if (peg$silentFails === 0) {
1993
+ peg$fail(peg$e25);
1994
+ }
1995
+ }
1996
+ if (s1 !== peg$FAILED) {
1997
+ peg$savedPos = s0;
1998
+ s1 = peg$f26();
1999
+ }
2000
+ s0 = s1;
2001
+ }
1231
2002
  return s0;
1232
2003
  }
1233
2004
  function peg$parseblock() {
1234
2005
  let s0, s1, s2, s3;
1235
2006
  s0 = peg$currPos;
1236
2007
  if (input.charCodeAt(peg$currPos) === 123) {
1237
- s1 = peg$c12;
2008
+ s1 = peg$c17;
1238
2009
  peg$currPos++;
1239
2010
  }
1240
2011
  else {
1241
2012
  s1 = peg$FAILED;
1242
2013
  if (peg$silentFails === 0) {
1243
- peg$fail(peg$e18);
2014
+ peg$fail(peg$e26);
1244
2015
  }
1245
2016
  }
1246
2017
  if (s1 !== peg$FAILED) {
1247
2018
  s2 = peg$parsecommands();
1248
2019
  if (s2 !== peg$FAILED) {
1249
2020
  if (input.charCodeAt(peg$currPos) === 125) {
1250
- s3 = peg$c13;
2021
+ s3 = peg$c18;
1251
2022
  peg$currPos++;
1252
2023
  }
1253
2024
  else {
1254
2025
  s3 = peg$FAILED;
1255
2026
  if (peg$silentFails === 0) {
1256
- peg$fail(peg$e19);
2027
+ peg$fail(peg$e27);
1257
2028
  }
1258
2029
  }
1259
2030
  if (s3 !== peg$FAILED) {
1260
2031
  peg$savedPos = s0;
1261
- s0 = peg$f16(s2);
2032
+ s0 = peg$f27(s2);
1262
2033
  }
1263
2034
  else {
1264
2035
  peg$currPos = s0;
@@ -1280,38 +2051,38 @@ function peg$parse(input, options) {
1280
2051
  let s0, s1, s2, s3;
1281
2052
  s0 = peg$currPos;
1282
2053
  if (input.charCodeAt(peg$currPos) === 35) {
1283
- s1 = peg$c14;
2054
+ s1 = peg$c0;
1284
2055
  peg$currPos++;
1285
2056
  }
1286
2057
  else {
1287
2058
  s1 = peg$FAILED;
1288
2059
  if (peg$silentFails === 0) {
1289
- peg$fail(peg$e20);
2060
+ peg$fail(peg$e0);
1290
2061
  }
1291
2062
  }
1292
2063
  if (s1 !== peg$FAILED) {
1293
2064
  s2 = [];
1294
2065
  s3 = input.charAt(peg$currPos);
1295
- if (peg$r6.test(s3)) {
2066
+ if (peg$r3.test(s3)) {
1296
2067
  peg$currPos++;
1297
2068
  }
1298
2069
  else {
1299
2070
  s3 = peg$FAILED;
1300
2071
  if (peg$silentFails === 0) {
1301
- peg$fail(peg$e21);
2072
+ peg$fail(peg$e5);
1302
2073
  }
1303
2074
  }
1304
2075
  if (s3 !== peg$FAILED) {
1305
2076
  while (s3 !== peg$FAILED) {
1306
2077
  s2.push(s3);
1307
2078
  s3 = input.charAt(peg$currPos);
1308
- if (peg$r6.test(s3)) {
2079
+ if (peg$r3.test(s3)) {
1309
2080
  peg$currPos++;
1310
2081
  }
1311
2082
  else {
1312
2083
  s3 = peg$FAILED;
1313
2084
  if (peg$silentFails === 0) {
1314
- peg$fail(peg$e21);
2085
+ peg$fail(peg$e5);
1315
2086
  }
1316
2087
  }
1317
2088
  }
@@ -1339,26 +2110,26 @@ function peg$parse(input, options) {
1339
2110
  s0 = [];
1340
2111
  s1 = [];
1341
2112
  s2 = input.charAt(peg$currPos);
1342
- if (peg$r7.test(s2)) {
2113
+ if (peg$r9.test(s2)) {
1343
2114
  peg$currPos++;
1344
2115
  }
1345
2116
  else {
1346
2117
  s2 = peg$FAILED;
1347
2118
  if (peg$silentFails === 0) {
1348
- peg$fail(peg$e22);
2119
+ peg$fail(peg$e28);
1349
2120
  }
1350
2121
  }
1351
2122
  if (s2 !== peg$FAILED) {
1352
2123
  while (s2 !== peg$FAILED) {
1353
2124
  s1.push(s2);
1354
2125
  s2 = input.charAt(peg$currPos);
1355
- if (peg$r7.test(s2)) {
2126
+ if (peg$r9.test(s2)) {
1356
2127
  peg$currPos++;
1357
2128
  }
1358
2129
  else {
1359
2130
  s2 = peg$FAILED;
1360
2131
  if (peg$silentFails === 0) {
1361
- peg$fail(peg$e22);
2132
+ peg$fail(peg$e28);
1362
2133
  }
1363
2134
  }
1364
2135
  }
@@ -1374,26 +2145,26 @@ function peg$parse(input, options) {
1374
2145
  s0.push(s1);
1375
2146
  s1 = [];
1376
2147
  s2 = input.charAt(peg$currPos);
1377
- if (peg$r7.test(s2)) {
2148
+ if (peg$r9.test(s2)) {
1378
2149
  peg$currPos++;
1379
2150
  }
1380
2151
  else {
1381
2152
  s2 = peg$FAILED;
1382
2153
  if (peg$silentFails === 0) {
1383
- peg$fail(peg$e22);
2154
+ peg$fail(peg$e28);
1384
2155
  }
1385
2156
  }
1386
2157
  if (s2 !== peg$FAILED) {
1387
2158
  while (s2 !== peg$FAILED) {
1388
2159
  s1.push(s2);
1389
2160
  s2 = input.charAt(peg$currPos);
1390
- if (peg$r7.test(s2)) {
2161
+ if (peg$r9.test(s2)) {
1391
2162
  peg$currPos++;
1392
2163
  }
1393
2164
  else {
1394
2165
  s2 = peg$FAILED;
1395
2166
  if (peg$silentFails === 0) {
1396
- peg$fail(peg$e22);
2167
+ peg$fail(peg$e28);
1397
2168
  }
1398
2169
  }
1399
2170
  }
@@ -1411,6 +2182,322 @@ function peg$parse(input, options) {
1411
2182
  }
1412
2183
  return s0;
1413
2184
  }
2185
+ function peg$parsestring() {
2186
+ let s0, s1, s2, s3;
2187
+ s0 = peg$currPos;
2188
+ if (input.charCodeAt(peg$currPos) === 34) {
2189
+ s1 = peg$c19;
2190
+ peg$currPos++;
2191
+ }
2192
+ else {
2193
+ s1 = peg$FAILED;
2194
+ if (peg$silentFails === 0) {
2195
+ peg$fail(peg$e29);
2196
+ }
2197
+ }
2198
+ if (s1 !== peg$FAILED) {
2199
+ s2 = [];
2200
+ s3 = peg$parsedoubleStringChar();
2201
+ while (s3 !== peg$FAILED) {
2202
+ s2.push(s3);
2203
+ s3 = peg$parsedoubleStringChar();
2204
+ }
2205
+ if (input.charCodeAt(peg$currPos) === 34) {
2206
+ s3 = peg$c19;
2207
+ peg$currPos++;
2208
+ }
2209
+ else {
2210
+ s3 = peg$FAILED;
2211
+ if (peg$silentFails === 0) {
2212
+ peg$fail(peg$e29);
2213
+ }
2214
+ }
2215
+ if (s3 !== peg$FAILED) {
2216
+ peg$savedPos = s0;
2217
+ s0 = peg$f28(s2);
2218
+ }
2219
+ else {
2220
+ peg$currPos = s0;
2221
+ s0 = peg$FAILED;
2222
+ }
2223
+ }
2224
+ else {
2225
+ peg$currPos = s0;
2226
+ s0 = peg$FAILED;
2227
+ }
2228
+ if (s0 === peg$FAILED) {
2229
+ s0 = peg$currPos;
2230
+ if (input.charCodeAt(peg$currPos) === 39) {
2231
+ s1 = peg$c20;
2232
+ peg$currPos++;
2233
+ }
2234
+ else {
2235
+ s1 = peg$FAILED;
2236
+ if (peg$silentFails === 0) {
2237
+ peg$fail(peg$e30);
2238
+ }
2239
+ }
2240
+ if (s1 !== peg$FAILED) {
2241
+ s2 = [];
2242
+ s3 = peg$parsesingleStringChar();
2243
+ while (s3 !== peg$FAILED) {
2244
+ s2.push(s3);
2245
+ s3 = peg$parsesingleStringChar();
2246
+ }
2247
+ if (input.charCodeAt(peg$currPos) === 39) {
2248
+ s3 = peg$c20;
2249
+ peg$currPos++;
2250
+ }
2251
+ else {
2252
+ s3 = peg$FAILED;
2253
+ if (peg$silentFails === 0) {
2254
+ peg$fail(peg$e30);
2255
+ }
2256
+ }
2257
+ if (s3 !== peg$FAILED) {
2258
+ peg$savedPos = s0;
2259
+ s0 = peg$f29(s2);
2260
+ }
2261
+ else {
2262
+ peg$currPos = s0;
2263
+ s0 = peg$FAILED;
2264
+ }
2265
+ }
2266
+ else {
2267
+ peg$currPos = s0;
2268
+ s0 = peg$FAILED;
2269
+ }
2270
+ }
2271
+ return s0;
2272
+ }
2273
+ function peg$parsedoubleStringChar() {
2274
+ let s0, s1, s2;
2275
+ s0 = peg$currPos;
2276
+ s1 = peg$currPos;
2277
+ peg$silentFails++;
2278
+ s2 = input.charAt(peg$currPos);
2279
+ if (peg$r10.test(s2)) {
2280
+ peg$currPos++;
2281
+ }
2282
+ else {
2283
+ s2 = peg$FAILED;
2284
+ if (peg$silentFails === 0) {
2285
+ peg$fail(peg$e31);
2286
+ }
2287
+ }
2288
+ peg$silentFails--;
2289
+ if (s2 === peg$FAILED) {
2290
+ s1 = undefined;
2291
+ }
2292
+ else {
2293
+ peg$currPos = s1;
2294
+ s1 = peg$FAILED;
2295
+ }
2296
+ if (s1 !== peg$FAILED) {
2297
+ if (input.length > peg$currPos) {
2298
+ s2 = input.charAt(peg$currPos);
2299
+ peg$currPos++;
2300
+ }
2301
+ else {
2302
+ s2 = peg$FAILED;
2303
+ if (peg$silentFails === 0) {
2304
+ peg$fail(peg$e32);
2305
+ }
2306
+ }
2307
+ if (s2 !== peg$FAILED) {
2308
+ peg$savedPos = s0;
2309
+ s0 = peg$f30(s2);
2310
+ }
2311
+ else {
2312
+ peg$currPos = s0;
2313
+ s0 = peg$FAILED;
2314
+ }
2315
+ }
2316
+ else {
2317
+ peg$currPos = s0;
2318
+ s0 = peg$FAILED;
2319
+ }
2320
+ if (s0 === peg$FAILED) {
2321
+ s0 = peg$currPos;
2322
+ if (input.charCodeAt(peg$currPos) === 92) {
2323
+ s1 = peg$c21;
2324
+ peg$currPos++;
2325
+ }
2326
+ else {
2327
+ s1 = peg$FAILED;
2328
+ if (peg$silentFails === 0) {
2329
+ peg$fail(peg$e33);
2330
+ }
2331
+ }
2332
+ if (s1 !== peg$FAILED) {
2333
+ s2 = peg$parseescapeChar();
2334
+ if (s2 !== peg$FAILED) {
2335
+ peg$savedPos = s0;
2336
+ s0 = peg$f31(s2);
2337
+ }
2338
+ else {
2339
+ peg$currPos = s0;
2340
+ s0 = peg$FAILED;
2341
+ }
2342
+ }
2343
+ else {
2344
+ peg$currPos = s0;
2345
+ s0 = peg$FAILED;
2346
+ }
2347
+ }
2348
+ return s0;
2349
+ }
2350
+ function peg$parsesingleStringChar() {
2351
+ let s0, s1, s2;
2352
+ s0 = peg$currPos;
2353
+ s1 = peg$currPos;
2354
+ peg$silentFails++;
2355
+ s2 = input.charAt(peg$currPos);
2356
+ if (peg$r11.test(s2)) {
2357
+ peg$currPos++;
2358
+ }
2359
+ else {
2360
+ s2 = peg$FAILED;
2361
+ if (peg$silentFails === 0) {
2362
+ peg$fail(peg$e34);
2363
+ }
2364
+ }
2365
+ peg$silentFails--;
2366
+ if (s2 === peg$FAILED) {
2367
+ s1 = undefined;
2368
+ }
2369
+ else {
2370
+ peg$currPos = s1;
2371
+ s1 = peg$FAILED;
2372
+ }
2373
+ if (s1 !== peg$FAILED) {
2374
+ if (input.length > peg$currPos) {
2375
+ s2 = input.charAt(peg$currPos);
2376
+ peg$currPos++;
2377
+ }
2378
+ else {
2379
+ s2 = peg$FAILED;
2380
+ if (peg$silentFails === 0) {
2381
+ peg$fail(peg$e32);
2382
+ }
2383
+ }
2384
+ if (s2 !== peg$FAILED) {
2385
+ peg$savedPos = s0;
2386
+ s0 = peg$f32(s2);
2387
+ }
2388
+ else {
2389
+ peg$currPos = s0;
2390
+ s0 = peg$FAILED;
2391
+ }
2392
+ }
2393
+ else {
2394
+ peg$currPos = s0;
2395
+ s0 = peg$FAILED;
2396
+ }
2397
+ if (s0 === peg$FAILED) {
2398
+ s0 = peg$currPos;
2399
+ if (input.charCodeAt(peg$currPos) === 92) {
2400
+ s1 = peg$c21;
2401
+ peg$currPos++;
2402
+ }
2403
+ else {
2404
+ s1 = peg$FAILED;
2405
+ if (peg$silentFails === 0) {
2406
+ peg$fail(peg$e33);
2407
+ }
2408
+ }
2409
+ if (s1 !== peg$FAILED) {
2410
+ s2 = peg$parseescapeChar();
2411
+ if (s2 !== peg$FAILED) {
2412
+ peg$savedPos = s0;
2413
+ s0 = peg$f33(s2);
2414
+ }
2415
+ else {
2416
+ peg$currPos = s0;
2417
+ s0 = peg$FAILED;
2418
+ }
2419
+ }
2420
+ else {
2421
+ peg$currPos = s0;
2422
+ s0 = peg$FAILED;
2423
+ }
2424
+ }
2425
+ return s0;
2426
+ }
2427
+ function peg$parseescapeChar() {
2428
+ let s0, s1;
2429
+ s0 = peg$currPos;
2430
+ if (input.charCodeAt(peg$currPos) === 34) {
2431
+ s1 = peg$c19;
2432
+ peg$currPos++;
2433
+ }
2434
+ else {
2435
+ s1 = peg$FAILED;
2436
+ if (peg$silentFails === 0) {
2437
+ peg$fail(peg$e29);
2438
+ }
2439
+ }
2440
+ if (s1 !== peg$FAILED) {
2441
+ peg$savedPos = s0;
2442
+ s1 = peg$f34();
2443
+ }
2444
+ s0 = s1;
2445
+ if (s0 === peg$FAILED) {
2446
+ s0 = peg$currPos;
2447
+ if (input.charCodeAt(peg$currPos) === 39) {
2448
+ s1 = peg$c20;
2449
+ peg$currPos++;
2450
+ }
2451
+ else {
2452
+ s1 = peg$FAILED;
2453
+ if (peg$silentFails === 0) {
2454
+ peg$fail(peg$e30);
2455
+ }
2456
+ }
2457
+ if (s1 !== peg$FAILED) {
2458
+ peg$savedPos = s0;
2459
+ s1 = peg$f35();
2460
+ }
2461
+ s0 = s1;
2462
+ if (s0 === peg$FAILED) {
2463
+ s0 = peg$currPos;
2464
+ if (input.charCodeAt(peg$currPos) === 92) {
2465
+ s1 = peg$c21;
2466
+ peg$currPos++;
2467
+ }
2468
+ else {
2469
+ s1 = peg$FAILED;
2470
+ if (peg$silentFails === 0) {
2471
+ peg$fail(peg$e33);
2472
+ }
2473
+ }
2474
+ if (s1 !== peg$FAILED) {
2475
+ peg$savedPos = s0;
2476
+ s1 = peg$f36();
2477
+ }
2478
+ s0 = s1;
2479
+ if (s0 === peg$FAILED) {
2480
+ s0 = peg$currPos;
2481
+ if (input.charCodeAt(peg$currPos) === 110) {
2482
+ s1 = peg$c22;
2483
+ peg$currPos++;
2484
+ }
2485
+ else {
2486
+ s1 = peg$FAILED;
2487
+ if (peg$silentFails === 0) {
2488
+ peg$fail(peg$e35);
2489
+ }
2490
+ }
2491
+ if (s1 !== peg$FAILED) {
2492
+ peg$savedPos = s0;
2493
+ s1 = peg$f37();
2494
+ }
2495
+ s0 = s1;
2496
+ }
2497
+ }
2498
+ }
2499
+ return s0;
2500
+ }
1414
2501
  peg$result = peg$startRuleFunction();
1415
2502
  const peg$success = (peg$result !== peg$FAILED && peg$currPos === input.length);
1416
2503
  function peg$throw() {
@@ -1440,7 +2527,8 @@ function peg$parse(input, options) {
1440
2527
  }
1441
2528
  }
1442
2529
  const peg$allowedStartRules = [
1443
- "start"
2530
+ "start",
2531
+ "note"
1444
2532
  ];
1445
2533
  export { peg$allowedStartRules as StartRules, peg$SyntaxError as SyntaxError, peg$parse as parse };
1446
2534
  //# sourceMappingURL=grammar.js.map