@wscytz/dsl 0.0.0-stage → 0.1.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.
@@ -0,0 +1,3365 @@
1
+ // @generated by Peggy 5.1.0.
2
+ //
3
+ // https://peggyjs.org/
4
+
5
+
6
+ class peg$SyntaxError extends SyntaxError {
7
+ constructor(message, expected, found, location) {
8
+ super(message);
9
+ this.expected = expected;
10
+ this.found = found;
11
+ this.location = location;
12
+ this.name = "SyntaxError";
13
+ }
14
+
15
+ format(sources) {
16
+ let str = "Error: " + this.message;
17
+ if (this.location) {
18
+ let src = null;
19
+ const st = sources.find(s => s.source === this.location.source);
20
+ if (st) {
21
+ src = st.text.split(/\r\n|\n|\r/g);
22
+ }
23
+ const s = this.location.start;
24
+ const offset_s = (this.location.source && (typeof this.location.source.offset === "function"))
25
+ ? this.location.source.offset(s)
26
+ : s;
27
+ const loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column;
28
+ if (src) {
29
+ const e = this.location.end;
30
+ const filler = "".padEnd(offset_s.line.toString().length, " ");
31
+ const line = src[s.line - 1];
32
+ const last = s.line === e.line ? e.column : line.length + 1;
33
+ const hatLen = (last - s.column) || 1;
34
+ str += "\n --> " + loc + "\n"
35
+ + filler + " |\n"
36
+ + offset_s.line + " | " + line + "\n"
37
+ + filler + " | " + "".padEnd(s.column - 1, " ")
38
+ + "".padEnd(hatLen, "^");
39
+ } else {
40
+ str += "\n at " + loc;
41
+ }
42
+ }
43
+ return str;
44
+ }
45
+
46
+ static buildMessage(expected, found) {
47
+ function hex(ch) {
48
+ return ch.codePointAt(0).toString(16).toUpperCase();
49
+ }
50
+
51
+ const nonPrintable = Object.prototype.hasOwnProperty.call(RegExp.prototype, "unicode")
52
+ ? new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]", "gu")
53
+ : null;
54
+ function unicodeEscape(s) {
55
+ if (nonPrintable) {
56
+ return s.replace(nonPrintable, ch => "\\u{" + hex(ch) + "}");
57
+ }
58
+ return s;
59
+ }
60
+
61
+ function literalEscape(s) {
62
+ return unicodeEscape(s
63
+ .replace(/\\/g, "\\\\")
64
+ .replace(/"/g, "\\\"")
65
+ .replace(/\0/g, "\\0")
66
+ .replace(/\t/g, "\\t")
67
+ .replace(/\n/g, "\\n")
68
+ .replace(/\r/g, "\\r")
69
+ .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
70
+ .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
71
+ }
72
+
73
+ function classEscape(s) {
74
+ return unicodeEscape(s
75
+ .replace(/\\/g, "\\\\")
76
+ .replace(/\]/g, "\\]")
77
+ .replace(/\^/g, "\\^")
78
+ .replace(/-/g, "\\-")
79
+ .replace(/\0/g, "\\0")
80
+ .replace(/\t/g, "\\t")
81
+ .replace(/\n/g, "\\n")
82
+ .replace(/\r/g, "\\r")
83
+ .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
84
+ .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
85
+ }
86
+
87
+ const DESCRIBE_EXPECTATION_FNS = {
88
+ literal(expectation) {
89
+ return "\"" + literalEscape(expectation.text) + "\"";
90
+ },
91
+
92
+ class(expectation) {
93
+ const escapedParts = expectation.parts.map(
94
+ part => (Array.isArray(part)
95
+ ? classEscape(part[0]) + "-" + classEscape(part[1])
96
+ : classEscape(part))
97
+ );
98
+
99
+ return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]" + (expectation.unicode ? "u" : "");
100
+ },
101
+
102
+ any() {
103
+ return "any character";
104
+ },
105
+
106
+ end() {
107
+ return "end of input";
108
+ },
109
+
110
+ other(expectation) {
111
+ return expectation.description;
112
+ },
113
+ };
114
+
115
+ function describeExpectation(expectation) {
116
+ return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
117
+ }
118
+
119
+ function describeExpected(expected) {
120
+ const descriptions = expected.map(describeExpectation);
121
+ descriptions.sort();
122
+
123
+ if (descriptions.length > 0) {
124
+ let j = 1;
125
+ for (let i = 1; i < descriptions.length; i++) {
126
+ if (descriptions[i - 1] !== descriptions[i]) {
127
+ descriptions[j] = descriptions[i];
128
+ j++;
129
+ }
130
+ }
131
+ descriptions.length = j;
132
+ }
133
+
134
+ switch (descriptions.length) {
135
+ case 1:
136
+ return descriptions[0];
137
+
138
+ case 2:
139
+ return descriptions[0] + " or " + descriptions[1];
140
+
141
+ default:
142
+ return descriptions.slice(0, -1).join(", ")
143
+ + ", or "
144
+ + descriptions[descriptions.length - 1];
145
+ }
146
+ }
147
+
148
+ function describeFound(found) {
149
+ return found ? "\"" + literalEscape(found) + "\"" : "end of input";
150
+ }
151
+
152
+ return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
153
+ }
154
+ }
155
+
156
+ function peg$parse(input, options) {
157
+ options = options !== undefined ? options : {};
158
+
159
+ const peg$FAILED = {};
160
+ const peg$source = options.grammarSource;
161
+
162
+ const peg$startRuleFunctions = {
163
+ Line: peg$parseLine,
164
+ };
165
+ let peg$startRuleFunction = peg$parseLine;
166
+
167
+ const peg$c0 = "[";
168
+ const peg$c1 = "card";
169
+ const peg$c2 = "arrow";
170
+ const peg$c3 = "]";
171
+ const peg$c4 = "rect";
172
+ const peg$c5 = "text";
173
+ const peg$c6 = "frame";
174
+ const peg$c7 = "@pos(";
175
+ const peg$c8 = ",";
176
+ const peg$c9 = ")";
177
+ const peg$c10 = "at";
178
+ const peg$c11 = "(";
179
+ const peg$c12 = "@size(";
180
+ const peg$c13 = "@color(";
181
+ const peg$c14 = "right-of";
182
+ const peg$c15 = "below";
183
+ const peg$c16 = "@";
184
+ const peg$c17 = "\"";
185
+ const peg$c18 = "\\";
186
+ const peg$c19 = "@gap(";
187
+ const peg$c20 = "create";
188
+ const peg$c21 = "from";
189
+ const peg$c22 = "to";
190
+ const peg$c23 = "@label(";
191
+ const peg$c24 = "@text(";
192
+ const peg$c25 = "@title(";
193
+ const peg$c26 = "@content(";
194
+ const peg$c27 = "@dash(";
195
+ const peg$c28 = "@arrowhead(";
196
+ const peg$c29 = "@route(";
197
+ const peg$c30 = "@curve(";
198
+ const peg$c31 = "@elbow(";
199
+ const peg$c32 = "@wikilink";
200
+ const peg$c33 = "@group(";
201
+ const peg$c34 = "@href(";
202
+ const peg$c35 = "@compute(";
203
+ const peg$c36 = "@type(";
204
+ const peg$c37 = "@tags(";
205
+ const peg$c38 = "@links(";
206
+ const peg$c39 = "@code(";
207
+ const peg$c40 = "@quote(";
208
+ const peg$c41 = "-";
209
+ const peg$c42 = ".";
210
+ const peg$c43 = "#";
211
+
212
+ const peg$r0 = /^[^)]/;
213
+ const peg$r1 = /^[^"]/;
214
+ const peg$r2 = /^[\-0-:A-Z_a-z\u4E00-\u9FFF]/;
215
+ const peg$r3 = /^[0-9]/;
216
+ const peg$r4 = /^[^"\\]/;
217
+ const peg$r5 = /^[a-zA-Z0-9_+#.\-]/;
218
+ const peg$r6 = /^[a-zA-Z0-9_:\-]/;
219
+ const peg$r7 = /^[^ \t]/;
220
+ const peg$r8 = /^[ \t]/;
221
+
222
+ const peg$e0 = peg$literalExpectation("[", false);
223
+ const peg$e1 = peg$literalExpectation("card", false);
224
+ const peg$e2 = peg$anyExpectation();
225
+ const peg$e3 = peg$literalExpectation("arrow", false);
226
+ const peg$e4 = peg$literalExpectation("]", false);
227
+ const peg$e5 = peg$literalExpectation("rect", false);
228
+ const peg$e6 = peg$literalExpectation("text", false);
229
+ const peg$e7 = peg$literalExpectation("frame", false);
230
+ const peg$e8 = peg$literalExpectation("@pos(", false);
231
+ const peg$e9 = peg$literalExpectation(",", false);
232
+ const peg$e10 = peg$literalExpectation(")", false);
233
+ const peg$e11 = peg$literalExpectation("at", false);
234
+ const peg$e12 = peg$literalExpectation("(", false);
235
+ const peg$e13 = peg$literalExpectation("@size(", false);
236
+ const peg$e14 = peg$literalExpectation("@color(", false);
237
+ const peg$e15 = peg$classExpectation([")"], true, false, false);
238
+ const peg$e16 = peg$literalExpectation("right-of", false);
239
+ const peg$e17 = peg$literalExpectation("below", false);
240
+ const peg$e18 = peg$literalExpectation("@", false);
241
+ const peg$e19 = peg$literalExpectation("\"", false);
242
+ const peg$e20 = peg$literalExpectation("\\", false);
243
+ const peg$e21 = peg$classExpectation(["\""], true, false, false);
244
+ const peg$e22 = peg$classExpectation(["-", ["0", ":"], ["A", "Z"], "_", ["a", "z"], ["\u4E00", "\u9FFF"]], false, false, false);
245
+ const peg$e23 = peg$literalExpectation("@gap(", false);
246
+ const peg$e24 = peg$literalExpectation("create", false);
247
+ const peg$e25 = peg$literalExpectation("from", false);
248
+ const peg$e26 = peg$literalExpectation("to", false);
249
+ const peg$e27 = peg$literalExpectation("@label(", false);
250
+ const peg$e28 = peg$literalExpectation("@text(", false);
251
+ const peg$e29 = peg$literalExpectation("@title(", false);
252
+ const peg$e30 = peg$literalExpectation("@content(", false);
253
+ const peg$e31 = peg$literalExpectation("@dash(", false);
254
+ const peg$e32 = peg$literalExpectation("@arrowhead(", false);
255
+ const peg$e33 = peg$literalExpectation("@route(", false);
256
+ const peg$e34 = peg$literalExpectation("@curve(", false);
257
+ const peg$e35 = peg$literalExpectation("@elbow(", false);
258
+ const peg$e36 = peg$literalExpectation("@wikilink", false);
259
+ const peg$e37 = peg$literalExpectation("@group(", false);
260
+ const peg$e38 = peg$literalExpectation("@href(", false);
261
+ const peg$e39 = peg$literalExpectation("@compute(", false);
262
+ const peg$e40 = peg$literalExpectation("@type(", false);
263
+ const peg$e41 = peg$literalExpectation("@tags(", false);
264
+ const peg$e42 = peg$literalExpectation("@links(", false);
265
+ const peg$e43 = peg$literalExpectation("@code(", false);
266
+ const peg$e44 = peg$literalExpectation("@quote(", false);
267
+ const peg$e45 = peg$literalExpectation("-", false);
268
+ const peg$e46 = peg$classExpectation([["0", "9"]], false, false, false);
269
+ const peg$e47 = peg$literalExpectation(".", false);
270
+ const peg$e48 = peg$classExpectation(["\"", "\\"], true, false, false);
271
+ const peg$e49 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "+", "#", ".", "-"], false, false, false);
272
+ const peg$e50 = peg$literalExpectation("#", false);
273
+ const peg$e51 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", ":", "-"], false, false, false);
274
+ const peg$e52 = peg$classExpectation([" ", "\t"], true, false, false);
275
+ const peg$e53 = peg$classExpectation([" ", "\t"], false, false, false);
276
+
277
+ function peg$f0(ds) { return { kind: 'card', ds: ds } }
278
+ function peg$f1(d) { return d }
279
+ function peg$f2(ds) { return { kind: 'arrow', ds: ds } }
280
+ function peg$f3(d) { return d }
281
+ function peg$f4(ds) { return { kind: 'rect', ds: ds } }
282
+ function peg$f5(ds) { return { kind: 'text', ds: ds } }
283
+ function peg$f6(ds) { return { kind: 'frame', ds: ds } }
284
+ function peg$f7(d) { return d }
285
+ function peg$f8() { return { kind: 'unknown' } }
286
+ function peg$f9() { return null }
287
+ function peg$f10(id) { return ['id', id] }
288
+ function peg$f11(x, y) { return ['pos', x, y] }
289
+ function peg$f12(x, y) { return ['pos', x, y] }
290
+ function peg$f13(w, h) { return ['size', w, h] }
291
+ function peg$f14(c) { return ['color', c] }
292
+ function peg$f15(dir, anchor) { return ['rel', dir, anchor] }
293
+ function peg$f16(g) { return '@Q' + g }
294
+ function peg$f17(g) { return '@' + g }
295
+ function peg$f18(g) { return ['gap', g] }
296
+ function peg$f19() { return ['create', true] }
297
+ function peg$f20(id) { return ['from', id] }
298
+ function peg$f21(id) { return ['to', id] }
299
+ function peg$f22(v) { return ['label', v] }
300
+ function peg$f23(v) { return ['text', v] }
301
+ function peg$f24(v) { return ['title', v] }
302
+ function peg$f25(v) { return ['content', v] }
303
+ function peg$f26(c) { return ['dash', c] }
304
+ function peg$f27(c) { return ['arrowhead', c] }
305
+ function peg$f28(c) { return ['route', c] }
306
+ function peg$f29(x, y) { return ['curve', x, y] }
307
+ function peg$f30(v) { return ['elbow', v] }
308
+ function peg$f31() { return ['wikilink', true] }
309
+ function peg$f32(v) { return ['group', v] }
310
+ function peg$f33(v) { return ['href', v] }
311
+ function peg$f34(v) { return ['compute', v] }
312
+ function peg$f35(c) { return ['type', c] }
313
+ function peg$f36(v) { return ['tags', v] }
314
+ function peg$f37(v) { return ['links', v] }
315
+ function peg$f38(lang, code, cap) { return ['code', lang, code, cap] }
316
+ function peg$f39(lang, code) { return ['code', lang, code, null] }
317
+ function peg$f40(text, by, url) { return ['quote', text, by, url] }
318
+ function peg$f41(text, by) { return ['quote', text, by, null] }
319
+ function peg$f42(text) { return ['quote', text, null, null] }
320
+ function peg$f43(v) { return v }
321
+ function peg$f44(id) { return id }
322
+ function peg$f45(t) { return t === ']' ? null : t }
323
+ let peg$currPos = options.peg$currPos | 0;
324
+ let peg$savedPos = peg$currPos;
325
+ const peg$posDetailsCache = [{ line: 1, column: 1 }];
326
+ let peg$maxFailPos = peg$currPos;
327
+ let peg$maxFailExpected = options.peg$maxFailExpected || [];
328
+ let peg$silentFails = options.peg$silentFails | 0;
329
+
330
+ let peg$result;
331
+
332
+ if (options.startRule) {
333
+ if (!(options.startRule in peg$startRuleFunctions)) {
334
+ throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
335
+ }
336
+
337
+ peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
338
+ }
339
+
340
+ function text() {
341
+ return input.substring(peg$savedPos, peg$currPos);
342
+ }
343
+
344
+ function offset() {
345
+ return peg$savedPos;
346
+ }
347
+
348
+ function range() {
349
+ return {
350
+ source: peg$source,
351
+ start: peg$savedPos,
352
+ end: peg$currPos,
353
+ };
354
+ }
355
+
356
+ function location() {
357
+ return peg$computeLocation(peg$savedPos, peg$currPos);
358
+ }
359
+
360
+ function expected(description, location) {
361
+ location = location !== undefined
362
+ ? location
363
+ : peg$computeLocation(peg$savedPos, peg$currPos);
364
+
365
+ throw peg$buildStructuredError(
366
+ [peg$otherExpectation(description)],
367
+ input.substring(peg$savedPos, peg$currPos),
368
+ location
369
+ );
370
+ }
371
+
372
+ function error(message, location) {
373
+ location = location !== undefined
374
+ ? location
375
+ : peg$computeLocation(peg$savedPos, peg$currPos);
376
+
377
+ throw peg$buildSimpleError(message, location);
378
+ }
379
+
380
+ function peg$getUnicode(pos = peg$currPos) {
381
+ const cp = input.codePointAt(pos);
382
+ if (cp === undefined) {
383
+ return "";
384
+ }
385
+ return String.fromCodePoint(cp);
386
+ }
387
+
388
+ function peg$literalExpectation(text, ignoreCase) {
389
+ return { type: "literal", text, ignoreCase };
390
+ }
391
+
392
+ function peg$classExpectation(parts, inverted, ignoreCase, unicode) {
393
+ return { type: "class", parts, inverted, ignoreCase, unicode };
394
+ }
395
+
396
+ function peg$anyExpectation() {
397
+ return { type: "any" };
398
+ }
399
+
400
+ function peg$endExpectation() {
401
+ return { type: "end" };
402
+ }
403
+
404
+ function peg$otherExpectation(description) {
405
+ return { type: "other", description };
406
+ }
407
+
408
+ function peg$computePosDetails(pos) {
409
+ let details = peg$posDetailsCache[pos];
410
+ let p;
411
+
412
+ if (details) {
413
+ return details;
414
+ } else {
415
+ if (pos >= peg$posDetailsCache.length) {
416
+ p = peg$posDetailsCache.length - 1;
417
+ } else {
418
+ p = pos;
419
+ while (!peg$posDetailsCache[--p]) {}
420
+ }
421
+
422
+ details = peg$posDetailsCache[p];
423
+ details = {
424
+ line: details.line,
425
+ column: details.column,
426
+ };
427
+
428
+ while (p < pos) {
429
+ if (input.charCodeAt(p) === 10) {
430
+ details.line++;
431
+ details.column = 1;
432
+ } else {
433
+ details.column++;
434
+ }
435
+
436
+ p++;
437
+ }
438
+
439
+ peg$posDetailsCache[pos] = details;
440
+
441
+ return details;
442
+ }
443
+ }
444
+
445
+ function peg$computeLocation(startPos, endPos, offset) {
446
+ const startPosDetails = peg$computePosDetails(startPos);
447
+ const endPosDetails = peg$computePosDetails(endPos);
448
+
449
+ const res = {
450
+ source: peg$source,
451
+ start: {
452
+ offset: startPos,
453
+ line: startPosDetails.line,
454
+ column: startPosDetails.column,
455
+ },
456
+ end: {
457
+ offset: endPos,
458
+ line: endPosDetails.line,
459
+ column: endPosDetails.column,
460
+ },
461
+ };
462
+ if (offset && peg$source && (typeof peg$source.offset === "function")) {
463
+ res.start = peg$source.offset(res.start);
464
+ res.end = peg$source.offset(res.end);
465
+ }
466
+ return res;
467
+ }
468
+
469
+ function peg$fail(expected) {
470
+ if (peg$currPos < peg$maxFailPos) { return; }
471
+
472
+ if (peg$currPos > peg$maxFailPos) {
473
+ peg$maxFailPos = peg$currPos;
474
+ peg$maxFailExpected = [];
475
+ }
476
+
477
+ peg$maxFailExpected.push(expected);
478
+ }
479
+
480
+ function peg$buildSimpleError(message, location) {
481
+ return new peg$SyntaxError(message, null, null, location);
482
+ }
483
+
484
+ function peg$buildStructuredError(expected, found, location) {
485
+ return new peg$SyntaxError(
486
+ peg$SyntaxError.buildMessage(expected, found),
487
+ expected,
488
+ found,
489
+ location
490
+ );
491
+ }
492
+
493
+ function peg$parseLine() {
494
+ let s0;
495
+
496
+ s0 = peg$parsecardLine();
497
+ if (s0 === peg$FAILED) {
498
+ s0 = peg$parsearrowLine();
499
+ if (s0 === peg$FAILED) {
500
+ s0 = peg$parserectLine();
501
+ if (s0 === peg$FAILED) {
502
+ s0 = peg$parsetextLine();
503
+ if (s0 === peg$FAILED) {
504
+ s0 = peg$parseframeLine();
505
+ if (s0 === peg$FAILED) {
506
+ s0 = peg$parsebracketUnknown();
507
+ if (s0 === peg$FAILED) {
508
+ s0 = peg$parseprose();
509
+ }
510
+ }
511
+ }
512
+ }
513
+ }
514
+ }
515
+
516
+ return s0;
517
+ }
518
+
519
+ function peg$parsecardLine() {
520
+ let s0, s1, s2, s3, s4, s5, s6;
521
+
522
+ s0 = peg$currPos;
523
+ if (input.charCodeAt(peg$currPos) === 91) {
524
+ s1 = peg$c0;
525
+ peg$currPos++;
526
+ } else {
527
+ s1 = peg$FAILED;
528
+ if (peg$silentFails === 0) { peg$fail(peg$e0); }
529
+ }
530
+ if (s1 !== peg$FAILED) {
531
+ if (input.substr(peg$currPos, 4) === peg$c1) {
532
+ s2 = peg$c1;
533
+ peg$currPos += 4;
534
+ } else {
535
+ s2 = peg$FAILED;
536
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
537
+ }
538
+ if (s2 !== peg$FAILED) {
539
+ s3 = peg$parsesp();
540
+ if (s3 !== peg$FAILED) {
541
+ s4 = [];
542
+ s5 = peg$parsecardDir();
543
+ while (s5 !== peg$FAILED) {
544
+ s4.push(s5);
545
+ s5 = peg$parsecardDir();
546
+ }
547
+ s5 = [];
548
+ if (input.length > peg$currPos) {
549
+ s6 = input.charAt(peg$currPos);
550
+ peg$currPos++;
551
+ } else {
552
+ s6 = peg$FAILED;
553
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
554
+ }
555
+ while (s6 !== peg$FAILED) {
556
+ s5.push(s6);
557
+ if (input.length > peg$currPos) {
558
+ s6 = input.charAt(peg$currPos);
559
+ peg$currPos++;
560
+ } else {
561
+ s6 = peg$FAILED;
562
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
563
+ }
564
+ }
565
+ peg$savedPos = s0;
566
+ s0 = peg$f0(s4);
567
+ } else {
568
+ peg$currPos = s0;
569
+ s0 = peg$FAILED;
570
+ }
571
+ } else {
572
+ peg$currPos = s0;
573
+ s0 = peg$FAILED;
574
+ }
575
+ } else {
576
+ peg$currPos = s0;
577
+ s0 = peg$FAILED;
578
+ }
579
+
580
+ return s0;
581
+ }
582
+
583
+ function peg$parsecardDir() {
584
+ let s0, s1, s2;
585
+
586
+ s0 = peg$currPos;
587
+ s1 = peg$parsews();
588
+ s2 = peg$parseidDir();
589
+ if (s2 === peg$FAILED) {
590
+ s2 = peg$parseposDir();
591
+ if (s2 === peg$FAILED) {
592
+ s2 = peg$parsesizeDir();
593
+ if (s2 === peg$FAILED) {
594
+ s2 = peg$parsecolorDir();
595
+ if (s2 === peg$FAILED) {
596
+ s2 = peg$parserelationDir();
597
+ if (s2 === peg$FAILED) {
598
+ s2 = peg$parsegapDir();
599
+ if (s2 === peg$FAILED) {
600
+ s2 = peg$parsecreateDir();
601
+ if (s2 === peg$FAILED) {
602
+ s2 = peg$parsetitleDir();
603
+ if (s2 === peg$FAILED) {
604
+ s2 = peg$parsecontentDir();
605
+ if (s2 === peg$FAILED) {
606
+ s2 = peg$parsegroupDir();
607
+ if (s2 === peg$FAILED) {
608
+ s2 = peg$parsehrefDir();
609
+ if (s2 === peg$FAILED) {
610
+ s2 = peg$parsetypeDir();
611
+ if (s2 === peg$FAILED) {
612
+ s2 = peg$parsetagsDir();
613
+ if (s2 === peg$FAILED) {
614
+ s2 = peg$parselinksDir();
615
+ if (s2 === peg$FAILED) {
616
+ s2 = peg$parsecodeDir();
617
+ if (s2 === peg$FAILED) {
618
+ s2 = peg$parsequoteDir();
619
+ if (s2 === peg$FAILED) {
620
+ s2 = peg$parseskipChunk();
621
+ }
622
+ }
623
+ }
624
+ }
625
+ }
626
+ }
627
+ }
628
+ }
629
+ }
630
+ }
631
+ }
632
+ }
633
+ }
634
+ }
635
+ }
636
+ }
637
+ if (s2 !== peg$FAILED) {
638
+ peg$savedPos = s0;
639
+ s0 = peg$f1(s2);
640
+ } else {
641
+ peg$currPos = s0;
642
+ s0 = peg$FAILED;
643
+ }
644
+
645
+ return s0;
646
+ }
647
+
648
+ function peg$parsearrowLine() {
649
+ let s0, s1, s2, s3, s4, s5, s6;
650
+
651
+ s0 = peg$currPos;
652
+ if (input.charCodeAt(peg$currPos) === 91) {
653
+ s1 = peg$c0;
654
+ peg$currPos++;
655
+ } else {
656
+ s1 = peg$FAILED;
657
+ if (peg$silentFails === 0) { peg$fail(peg$e0); }
658
+ }
659
+ if (s1 !== peg$FAILED) {
660
+ if (input.substr(peg$currPos, 5) === peg$c2) {
661
+ s2 = peg$c2;
662
+ peg$currPos += 5;
663
+ } else {
664
+ s2 = peg$FAILED;
665
+ if (peg$silentFails === 0) { peg$fail(peg$e3); }
666
+ }
667
+ if (s2 !== peg$FAILED) {
668
+ s3 = peg$parsesp();
669
+ if (s3 === peg$FAILED) {
670
+ if (input.charCodeAt(peg$currPos) === 93) {
671
+ s3 = peg$c3;
672
+ peg$currPos++;
673
+ } else {
674
+ s3 = peg$FAILED;
675
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
676
+ }
677
+ }
678
+ if (s3 !== peg$FAILED) {
679
+ s4 = [];
680
+ s5 = peg$parsearrowDir();
681
+ while (s5 !== peg$FAILED) {
682
+ s4.push(s5);
683
+ s5 = peg$parsearrowDir();
684
+ }
685
+ s5 = [];
686
+ if (input.length > peg$currPos) {
687
+ s6 = input.charAt(peg$currPos);
688
+ peg$currPos++;
689
+ } else {
690
+ s6 = peg$FAILED;
691
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
692
+ }
693
+ while (s6 !== peg$FAILED) {
694
+ s5.push(s6);
695
+ if (input.length > peg$currPos) {
696
+ s6 = input.charAt(peg$currPos);
697
+ peg$currPos++;
698
+ } else {
699
+ s6 = peg$FAILED;
700
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
701
+ }
702
+ }
703
+ peg$savedPos = s0;
704
+ s0 = peg$f2(s4);
705
+ } else {
706
+ peg$currPos = s0;
707
+ s0 = peg$FAILED;
708
+ }
709
+ } else {
710
+ peg$currPos = s0;
711
+ s0 = peg$FAILED;
712
+ }
713
+ } else {
714
+ peg$currPos = s0;
715
+ s0 = peg$FAILED;
716
+ }
717
+
718
+ return s0;
719
+ }
720
+
721
+ function peg$parsearrowDir() {
722
+ let s0, s1, s2;
723
+
724
+ s0 = peg$currPos;
725
+ s1 = peg$parsews();
726
+ s2 = peg$parseidDir();
727
+ if (s2 === peg$FAILED) {
728
+ s2 = peg$parsefromDir();
729
+ if (s2 === peg$FAILED) {
730
+ s2 = peg$parsetoDir();
731
+ if (s2 === peg$FAILED) {
732
+ s2 = peg$parseposDir();
733
+ if (s2 === peg$FAILED) {
734
+ s2 = peg$parsesizeDir();
735
+ if (s2 === peg$FAILED) {
736
+ s2 = peg$parsecolorDir();
737
+ if (s2 === peg$FAILED) {
738
+ s2 = peg$parselabelDir();
739
+ if (s2 === peg$FAILED) {
740
+ s2 = peg$parsedashDir();
741
+ if (s2 === peg$FAILED) {
742
+ s2 = peg$parsearrowheadDir();
743
+ if (s2 === peg$FAILED) {
744
+ s2 = peg$parsecurveDir();
745
+ if (s2 === peg$FAILED) {
746
+ s2 = peg$parserouteDir();
747
+ if (s2 === peg$FAILED) {
748
+ s2 = peg$parseelbowDir();
749
+ if (s2 === peg$FAILED) {
750
+ s2 = peg$parsewikilinkDir();
751
+ if (s2 === peg$FAILED) {
752
+ s2 = peg$parseskipChunk();
753
+ }
754
+ }
755
+ }
756
+ }
757
+ }
758
+ }
759
+ }
760
+ }
761
+ }
762
+ }
763
+ }
764
+ }
765
+ }
766
+ if (s2 !== peg$FAILED) {
767
+ peg$savedPos = s0;
768
+ s0 = peg$f3(s2);
769
+ } else {
770
+ peg$currPos = s0;
771
+ s0 = peg$FAILED;
772
+ }
773
+
774
+ return s0;
775
+ }
776
+
777
+ function peg$parserectLine() {
778
+ let s0, s1, s2, s3, s4, s5, s6;
779
+
780
+ s0 = peg$currPos;
781
+ if (input.charCodeAt(peg$currPos) === 91) {
782
+ s1 = peg$c0;
783
+ peg$currPos++;
784
+ } else {
785
+ s1 = peg$FAILED;
786
+ if (peg$silentFails === 0) { peg$fail(peg$e0); }
787
+ }
788
+ if (s1 !== peg$FAILED) {
789
+ if (input.substr(peg$currPos, 4) === peg$c4) {
790
+ s2 = peg$c4;
791
+ peg$currPos += 4;
792
+ } else {
793
+ s2 = peg$FAILED;
794
+ if (peg$silentFails === 0) { peg$fail(peg$e5); }
795
+ }
796
+ if (s2 !== peg$FAILED) {
797
+ s3 = peg$parsesp();
798
+ if (s3 !== peg$FAILED) {
799
+ s4 = [];
800
+ s5 = peg$parsefreeDir();
801
+ while (s5 !== peg$FAILED) {
802
+ s4.push(s5);
803
+ s5 = peg$parsefreeDir();
804
+ }
805
+ s5 = [];
806
+ if (input.length > peg$currPos) {
807
+ s6 = input.charAt(peg$currPos);
808
+ peg$currPos++;
809
+ } else {
810
+ s6 = peg$FAILED;
811
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
812
+ }
813
+ while (s6 !== peg$FAILED) {
814
+ s5.push(s6);
815
+ if (input.length > peg$currPos) {
816
+ s6 = input.charAt(peg$currPos);
817
+ peg$currPos++;
818
+ } else {
819
+ s6 = peg$FAILED;
820
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
821
+ }
822
+ }
823
+ peg$savedPos = s0;
824
+ s0 = peg$f4(s4);
825
+ } else {
826
+ peg$currPos = s0;
827
+ s0 = peg$FAILED;
828
+ }
829
+ } else {
830
+ peg$currPos = s0;
831
+ s0 = peg$FAILED;
832
+ }
833
+ } else {
834
+ peg$currPos = s0;
835
+ s0 = peg$FAILED;
836
+ }
837
+
838
+ return s0;
839
+ }
840
+
841
+ function peg$parsetextLine() {
842
+ let s0, s1, s2, s3, s4, s5, s6;
843
+
844
+ s0 = peg$currPos;
845
+ if (input.charCodeAt(peg$currPos) === 91) {
846
+ s1 = peg$c0;
847
+ peg$currPos++;
848
+ } else {
849
+ s1 = peg$FAILED;
850
+ if (peg$silentFails === 0) { peg$fail(peg$e0); }
851
+ }
852
+ if (s1 !== peg$FAILED) {
853
+ if (input.substr(peg$currPos, 4) === peg$c5) {
854
+ s2 = peg$c5;
855
+ peg$currPos += 4;
856
+ } else {
857
+ s2 = peg$FAILED;
858
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
859
+ }
860
+ if (s2 !== peg$FAILED) {
861
+ s3 = peg$parsesp();
862
+ if (s3 !== peg$FAILED) {
863
+ s4 = [];
864
+ s5 = peg$parsefreeDir();
865
+ while (s5 !== peg$FAILED) {
866
+ s4.push(s5);
867
+ s5 = peg$parsefreeDir();
868
+ }
869
+ s5 = [];
870
+ if (input.length > peg$currPos) {
871
+ s6 = input.charAt(peg$currPos);
872
+ peg$currPos++;
873
+ } else {
874
+ s6 = peg$FAILED;
875
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
876
+ }
877
+ while (s6 !== peg$FAILED) {
878
+ s5.push(s6);
879
+ if (input.length > peg$currPos) {
880
+ s6 = input.charAt(peg$currPos);
881
+ peg$currPos++;
882
+ } else {
883
+ s6 = peg$FAILED;
884
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
885
+ }
886
+ }
887
+ peg$savedPos = s0;
888
+ s0 = peg$f5(s4);
889
+ } else {
890
+ peg$currPos = s0;
891
+ s0 = peg$FAILED;
892
+ }
893
+ } else {
894
+ peg$currPos = s0;
895
+ s0 = peg$FAILED;
896
+ }
897
+ } else {
898
+ peg$currPos = s0;
899
+ s0 = peg$FAILED;
900
+ }
901
+
902
+ return s0;
903
+ }
904
+
905
+ function peg$parseframeLine() {
906
+ let s0, s1, s2, s3, s4, s5, s6;
907
+
908
+ s0 = peg$currPos;
909
+ if (input.charCodeAt(peg$currPos) === 91) {
910
+ s1 = peg$c0;
911
+ peg$currPos++;
912
+ } else {
913
+ s1 = peg$FAILED;
914
+ if (peg$silentFails === 0) { peg$fail(peg$e0); }
915
+ }
916
+ if (s1 !== peg$FAILED) {
917
+ if (input.substr(peg$currPos, 5) === peg$c6) {
918
+ s2 = peg$c6;
919
+ peg$currPos += 5;
920
+ } else {
921
+ s2 = peg$FAILED;
922
+ if (peg$silentFails === 0) { peg$fail(peg$e7); }
923
+ }
924
+ if (s2 !== peg$FAILED) {
925
+ s3 = peg$parsesp();
926
+ if (s3 !== peg$FAILED) {
927
+ s4 = [];
928
+ s5 = peg$parsefreeDir();
929
+ while (s5 !== peg$FAILED) {
930
+ s4.push(s5);
931
+ s5 = peg$parsefreeDir();
932
+ }
933
+ s5 = [];
934
+ if (input.length > peg$currPos) {
935
+ s6 = input.charAt(peg$currPos);
936
+ peg$currPos++;
937
+ } else {
938
+ s6 = peg$FAILED;
939
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
940
+ }
941
+ while (s6 !== peg$FAILED) {
942
+ s5.push(s6);
943
+ if (input.length > peg$currPos) {
944
+ s6 = input.charAt(peg$currPos);
945
+ peg$currPos++;
946
+ } else {
947
+ s6 = peg$FAILED;
948
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
949
+ }
950
+ }
951
+ peg$savedPos = s0;
952
+ s0 = peg$f6(s4);
953
+ } else {
954
+ peg$currPos = s0;
955
+ s0 = peg$FAILED;
956
+ }
957
+ } else {
958
+ peg$currPos = s0;
959
+ s0 = peg$FAILED;
960
+ }
961
+ } else {
962
+ peg$currPos = s0;
963
+ s0 = peg$FAILED;
964
+ }
965
+
966
+ return s0;
967
+ }
968
+
969
+ function peg$parsefreeDir() {
970
+ let s0, s1, s2;
971
+
972
+ s0 = peg$currPos;
973
+ s1 = peg$parsews();
974
+ s2 = peg$parseidDir();
975
+ if (s2 === peg$FAILED) {
976
+ s2 = peg$parseposDir();
977
+ if (s2 === peg$FAILED) {
978
+ s2 = peg$parsesizeDir();
979
+ if (s2 === peg$FAILED) {
980
+ s2 = peg$parsecolorDir();
981
+ if (s2 === peg$FAILED) {
982
+ s2 = peg$parsetextDir();
983
+ if (s2 === peg$FAILED) {
984
+ s2 = peg$parsegroupDir();
985
+ if (s2 === peg$FAILED) {
986
+ s2 = peg$parsecomputeDir();
987
+ if (s2 === peg$FAILED) {
988
+ s2 = peg$parseskipChunk();
989
+ }
990
+ }
991
+ }
992
+ }
993
+ }
994
+ }
995
+ }
996
+ if (s2 !== peg$FAILED) {
997
+ peg$savedPos = s0;
998
+ s0 = peg$f7(s2);
999
+ } else {
1000
+ peg$currPos = s0;
1001
+ s0 = peg$FAILED;
1002
+ }
1003
+
1004
+ return s0;
1005
+ }
1006
+
1007
+ function peg$parsebracketUnknown() {
1008
+ let s0, s1, s2, s3;
1009
+
1010
+ s0 = peg$currPos;
1011
+ if (input.charCodeAt(peg$currPos) === 91) {
1012
+ s1 = peg$c0;
1013
+ peg$currPos++;
1014
+ } else {
1015
+ s1 = peg$FAILED;
1016
+ if (peg$silentFails === 0) { peg$fail(peg$e0); }
1017
+ }
1018
+ if (s1 !== peg$FAILED) {
1019
+ s2 = [];
1020
+ if (input.length > peg$currPos) {
1021
+ s3 = input.charAt(peg$currPos);
1022
+ peg$currPos++;
1023
+ } else {
1024
+ s3 = peg$FAILED;
1025
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
1026
+ }
1027
+ while (s3 !== peg$FAILED) {
1028
+ s2.push(s3);
1029
+ if (input.length > peg$currPos) {
1030
+ s3 = input.charAt(peg$currPos);
1031
+ peg$currPos++;
1032
+ } else {
1033
+ s3 = peg$FAILED;
1034
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
1035
+ }
1036
+ }
1037
+ peg$savedPos = s0;
1038
+ s0 = peg$f8();
1039
+ } else {
1040
+ peg$currPos = s0;
1041
+ s0 = peg$FAILED;
1042
+ }
1043
+
1044
+ return s0;
1045
+ }
1046
+
1047
+ function peg$parseprose() {
1048
+ let s0, s1, s2;
1049
+
1050
+ s0 = peg$currPos;
1051
+ s1 = [];
1052
+ if (input.length > peg$currPos) {
1053
+ s2 = input.charAt(peg$currPos);
1054
+ peg$currPos++;
1055
+ } else {
1056
+ s2 = peg$FAILED;
1057
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
1058
+ }
1059
+ while (s2 !== peg$FAILED) {
1060
+ s1.push(s2);
1061
+ if (input.length > peg$currPos) {
1062
+ s2 = input.charAt(peg$currPos);
1063
+ peg$currPos++;
1064
+ } else {
1065
+ s2 = peg$FAILED;
1066
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
1067
+ }
1068
+ }
1069
+ peg$savedPos = s0;
1070
+ s1 = peg$f9();
1071
+ s0 = s1;
1072
+
1073
+ return s0;
1074
+ }
1075
+
1076
+ function peg$parseidDir() {
1077
+ let s0, s1;
1078
+
1079
+ s0 = peg$currPos;
1080
+ s1 = peg$parseidRef();
1081
+ if (s1 !== peg$FAILED) {
1082
+ peg$savedPos = s0;
1083
+ s1 = peg$f10(s1);
1084
+ }
1085
+ s0 = s1;
1086
+
1087
+ return s0;
1088
+ }
1089
+
1090
+ function peg$parseposDir() {
1091
+ let s0, s1, s2, s3, s4, s5, s6, s7, s8;
1092
+
1093
+ s0 = peg$currPos;
1094
+ if (input.substr(peg$currPos, 5) === peg$c7) {
1095
+ s1 = peg$c7;
1096
+ peg$currPos += 5;
1097
+ } else {
1098
+ s1 = peg$FAILED;
1099
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
1100
+ }
1101
+ if (s1 !== peg$FAILED) {
1102
+ s2 = peg$currPos;
1103
+ s3 = peg$parsenum();
1104
+ if (s3 !== peg$FAILED) {
1105
+ s2 = input.substring(s2, peg$currPos);
1106
+ } else {
1107
+ s2 = s3;
1108
+ }
1109
+ if (s2 !== peg$FAILED) {
1110
+ if (input.charCodeAt(peg$currPos) === 44) {
1111
+ s3 = peg$c8;
1112
+ peg$currPos++;
1113
+ } else {
1114
+ s3 = peg$FAILED;
1115
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
1116
+ }
1117
+ if (s3 !== peg$FAILED) {
1118
+ s4 = peg$parsews();
1119
+ s5 = peg$currPos;
1120
+ s6 = peg$parsenum();
1121
+ if (s6 !== peg$FAILED) {
1122
+ s5 = input.substring(s5, peg$currPos);
1123
+ } else {
1124
+ s5 = s6;
1125
+ }
1126
+ if (s5 !== peg$FAILED) {
1127
+ if (input.charCodeAt(peg$currPos) === 41) {
1128
+ s6 = peg$c9;
1129
+ peg$currPos++;
1130
+ } else {
1131
+ s6 = peg$FAILED;
1132
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1133
+ }
1134
+ if (s6 !== peg$FAILED) {
1135
+ peg$savedPos = s0;
1136
+ s0 = peg$f11(s2, s5);
1137
+ } else {
1138
+ peg$currPos = s0;
1139
+ s0 = peg$FAILED;
1140
+ }
1141
+ } else {
1142
+ peg$currPos = s0;
1143
+ s0 = peg$FAILED;
1144
+ }
1145
+ } else {
1146
+ peg$currPos = s0;
1147
+ s0 = peg$FAILED;
1148
+ }
1149
+ } else {
1150
+ peg$currPos = s0;
1151
+ s0 = peg$FAILED;
1152
+ }
1153
+ } else {
1154
+ peg$currPos = s0;
1155
+ s0 = peg$FAILED;
1156
+ }
1157
+ if (s0 === peg$FAILED) {
1158
+ s0 = peg$currPos;
1159
+ if (input.substr(peg$currPos, 2) === peg$c10) {
1160
+ s1 = peg$c10;
1161
+ peg$currPos += 2;
1162
+ } else {
1163
+ s1 = peg$FAILED;
1164
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
1165
+ }
1166
+ if (s1 !== peg$FAILED) {
1167
+ s2 = peg$parsesp();
1168
+ if (s2 !== peg$FAILED) {
1169
+ if (input.charCodeAt(peg$currPos) === 40) {
1170
+ s3 = peg$c11;
1171
+ peg$currPos++;
1172
+ } else {
1173
+ s3 = peg$FAILED;
1174
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
1175
+ }
1176
+ if (s3 !== peg$FAILED) {
1177
+ s4 = peg$currPos;
1178
+ s5 = peg$parsenum();
1179
+ if (s5 !== peg$FAILED) {
1180
+ s4 = input.substring(s4, peg$currPos);
1181
+ } else {
1182
+ s4 = s5;
1183
+ }
1184
+ if (s4 !== peg$FAILED) {
1185
+ if (input.charCodeAt(peg$currPos) === 44) {
1186
+ s5 = peg$c8;
1187
+ peg$currPos++;
1188
+ } else {
1189
+ s5 = peg$FAILED;
1190
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
1191
+ }
1192
+ if (s5 !== peg$FAILED) {
1193
+ s6 = peg$parsews();
1194
+ s7 = peg$currPos;
1195
+ s8 = peg$parsenum();
1196
+ if (s8 !== peg$FAILED) {
1197
+ s7 = input.substring(s7, peg$currPos);
1198
+ } else {
1199
+ s7 = s8;
1200
+ }
1201
+ if (s7 !== peg$FAILED) {
1202
+ if (input.charCodeAt(peg$currPos) === 41) {
1203
+ s8 = peg$c9;
1204
+ peg$currPos++;
1205
+ } else {
1206
+ s8 = peg$FAILED;
1207
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1208
+ }
1209
+ if (s8 !== peg$FAILED) {
1210
+ peg$savedPos = s0;
1211
+ s0 = peg$f12(s4, s7);
1212
+ } else {
1213
+ peg$currPos = s0;
1214
+ s0 = peg$FAILED;
1215
+ }
1216
+ } else {
1217
+ peg$currPos = s0;
1218
+ s0 = peg$FAILED;
1219
+ }
1220
+ } else {
1221
+ peg$currPos = s0;
1222
+ s0 = peg$FAILED;
1223
+ }
1224
+ } else {
1225
+ peg$currPos = s0;
1226
+ s0 = peg$FAILED;
1227
+ }
1228
+ } else {
1229
+ peg$currPos = s0;
1230
+ s0 = peg$FAILED;
1231
+ }
1232
+ } else {
1233
+ peg$currPos = s0;
1234
+ s0 = peg$FAILED;
1235
+ }
1236
+ } else {
1237
+ peg$currPos = s0;
1238
+ s0 = peg$FAILED;
1239
+ }
1240
+ }
1241
+
1242
+ return s0;
1243
+ }
1244
+
1245
+ function peg$parsesizeDir() {
1246
+ let s0, s1, s2, s3, s4, s5, s6;
1247
+
1248
+ s0 = peg$currPos;
1249
+ if (input.substr(peg$currPos, 6) === peg$c12) {
1250
+ s1 = peg$c12;
1251
+ peg$currPos += 6;
1252
+ } else {
1253
+ s1 = peg$FAILED;
1254
+ if (peg$silentFails === 0) { peg$fail(peg$e13); }
1255
+ }
1256
+ if (s1 !== peg$FAILED) {
1257
+ s2 = peg$currPos;
1258
+ s3 = peg$parsenum();
1259
+ if (s3 !== peg$FAILED) {
1260
+ s2 = input.substring(s2, peg$currPos);
1261
+ } else {
1262
+ s2 = s3;
1263
+ }
1264
+ if (s2 !== peg$FAILED) {
1265
+ if (input.charCodeAt(peg$currPos) === 44) {
1266
+ s3 = peg$c8;
1267
+ peg$currPos++;
1268
+ } else {
1269
+ s3 = peg$FAILED;
1270
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
1271
+ }
1272
+ if (s3 !== peg$FAILED) {
1273
+ s4 = peg$parsews();
1274
+ s5 = peg$currPos;
1275
+ s6 = peg$parsenum();
1276
+ if (s6 !== peg$FAILED) {
1277
+ s5 = input.substring(s5, peg$currPos);
1278
+ } else {
1279
+ s5 = s6;
1280
+ }
1281
+ if (s5 !== peg$FAILED) {
1282
+ if (input.charCodeAt(peg$currPos) === 41) {
1283
+ s6 = peg$c9;
1284
+ peg$currPos++;
1285
+ } else {
1286
+ s6 = peg$FAILED;
1287
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1288
+ }
1289
+ if (s6 !== peg$FAILED) {
1290
+ peg$savedPos = s0;
1291
+ s0 = peg$f13(s2, s5);
1292
+ } else {
1293
+ peg$currPos = s0;
1294
+ s0 = peg$FAILED;
1295
+ }
1296
+ } else {
1297
+ peg$currPos = s0;
1298
+ s0 = peg$FAILED;
1299
+ }
1300
+ } else {
1301
+ peg$currPos = s0;
1302
+ s0 = peg$FAILED;
1303
+ }
1304
+ } else {
1305
+ peg$currPos = s0;
1306
+ s0 = peg$FAILED;
1307
+ }
1308
+ } else {
1309
+ peg$currPos = s0;
1310
+ s0 = peg$FAILED;
1311
+ }
1312
+
1313
+ return s0;
1314
+ }
1315
+
1316
+ function peg$parsecolorDir() {
1317
+ let s0, s1, s2, s3, s4;
1318
+
1319
+ s0 = peg$currPos;
1320
+ if (input.substr(peg$currPos, 7) === peg$c13) {
1321
+ s1 = peg$c13;
1322
+ peg$currPos += 7;
1323
+ } else {
1324
+ s1 = peg$FAILED;
1325
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
1326
+ }
1327
+ if (s1 !== peg$FAILED) {
1328
+ s2 = peg$currPos;
1329
+ s3 = [];
1330
+ s4 = input.charAt(peg$currPos);
1331
+ if (peg$r0.test(s4)) {
1332
+ peg$currPos++;
1333
+ } else {
1334
+ s4 = peg$FAILED;
1335
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
1336
+ }
1337
+ if (s4 !== peg$FAILED) {
1338
+ while (s4 !== peg$FAILED) {
1339
+ s3.push(s4);
1340
+ s4 = input.charAt(peg$currPos);
1341
+ if (peg$r0.test(s4)) {
1342
+ peg$currPos++;
1343
+ } else {
1344
+ s4 = peg$FAILED;
1345
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
1346
+ }
1347
+ }
1348
+ } else {
1349
+ s3 = peg$FAILED;
1350
+ }
1351
+ if (s3 !== peg$FAILED) {
1352
+ s2 = input.substring(s2, peg$currPos);
1353
+ } else {
1354
+ s2 = s3;
1355
+ }
1356
+ if (s2 !== peg$FAILED) {
1357
+ if (input.charCodeAt(peg$currPos) === 41) {
1358
+ s3 = peg$c9;
1359
+ peg$currPos++;
1360
+ } else {
1361
+ s3 = peg$FAILED;
1362
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1363
+ }
1364
+ if (s3 !== peg$FAILED) {
1365
+ peg$savedPos = s0;
1366
+ s0 = peg$f14(s2);
1367
+ } else {
1368
+ peg$currPos = s0;
1369
+ s0 = peg$FAILED;
1370
+ }
1371
+ } else {
1372
+ peg$currPos = s0;
1373
+ s0 = peg$FAILED;
1374
+ }
1375
+ } else {
1376
+ peg$currPos = s0;
1377
+ s0 = peg$FAILED;
1378
+ }
1379
+
1380
+ return s0;
1381
+ }
1382
+
1383
+ function peg$parserelationDir() {
1384
+ let s0, s1, s2, s3;
1385
+
1386
+ s0 = peg$currPos;
1387
+ s1 = peg$currPos;
1388
+ if (input.substr(peg$currPos, 8) === peg$c14) {
1389
+ s2 = peg$c14;
1390
+ peg$currPos += 8;
1391
+ } else {
1392
+ s2 = peg$FAILED;
1393
+ if (peg$silentFails === 0) { peg$fail(peg$e16); }
1394
+ }
1395
+ if (s2 === peg$FAILED) {
1396
+ if (input.substr(peg$currPos, 5) === peg$c15) {
1397
+ s2 = peg$c15;
1398
+ peg$currPos += 5;
1399
+ } else {
1400
+ s2 = peg$FAILED;
1401
+ if (peg$silentFails === 0) { peg$fail(peg$e17); }
1402
+ }
1403
+ }
1404
+ if (s2 !== peg$FAILED) {
1405
+ s1 = input.substring(s1, peg$currPos);
1406
+ } else {
1407
+ s1 = s2;
1408
+ }
1409
+ if (s1 !== peg$FAILED) {
1410
+ s2 = peg$parsesp();
1411
+ if (s2 !== peg$FAILED) {
1412
+ s3 = peg$parseidRef();
1413
+ if (s3 === peg$FAILED) {
1414
+ s3 = peg$parsegroupRef();
1415
+ }
1416
+ if (s3 !== peg$FAILED) {
1417
+ peg$savedPos = s0;
1418
+ s0 = peg$f15(s1, s3);
1419
+ } else {
1420
+ peg$currPos = s0;
1421
+ s0 = peg$FAILED;
1422
+ }
1423
+ } else {
1424
+ peg$currPos = s0;
1425
+ s0 = peg$FAILED;
1426
+ }
1427
+ } else {
1428
+ peg$currPos = s0;
1429
+ s0 = peg$FAILED;
1430
+ }
1431
+
1432
+ return s0;
1433
+ }
1434
+
1435
+ function peg$parsegroupRef() {
1436
+ let s0, s1, s2, s3, s4, s5, s6, s7;
1437
+
1438
+ s0 = peg$currPos;
1439
+ if (input.charCodeAt(peg$currPos) === 64) {
1440
+ s1 = peg$c16;
1441
+ peg$currPos++;
1442
+ } else {
1443
+ s1 = peg$FAILED;
1444
+ if (peg$silentFails === 0) { peg$fail(peg$e18); }
1445
+ }
1446
+ if (s1 !== peg$FAILED) {
1447
+ if (input.charCodeAt(peg$currPos) === 34) {
1448
+ s2 = peg$c17;
1449
+ peg$currPos++;
1450
+ } else {
1451
+ s2 = peg$FAILED;
1452
+ if (peg$silentFails === 0) { peg$fail(peg$e19); }
1453
+ }
1454
+ if (s2 !== peg$FAILED) {
1455
+ s3 = peg$currPos;
1456
+ s4 = [];
1457
+ s5 = peg$currPos;
1458
+ if (input.charCodeAt(peg$currPos) === 92) {
1459
+ s6 = peg$c18;
1460
+ peg$currPos++;
1461
+ } else {
1462
+ s6 = peg$FAILED;
1463
+ if (peg$silentFails === 0) { peg$fail(peg$e20); }
1464
+ }
1465
+ if (s6 !== peg$FAILED) {
1466
+ if (input.length > peg$currPos) {
1467
+ s7 = input.charAt(peg$currPos);
1468
+ peg$currPos++;
1469
+ } else {
1470
+ s7 = peg$FAILED;
1471
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
1472
+ }
1473
+ if (s7 !== peg$FAILED) {
1474
+ s6 = [s6, s7];
1475
+ s5 = s6;
1476
+ } else {
1477
+ peg$currPos = s5;
1478
+ s5 = peg$FAILED;
1479
+ }
1480
+ } else {
1481
+ peg$currPos = s5;
1482
+ s5 = peg$FAILED;
1483
+ }
1484
+ if (s5 === peg$FAILED) {
1485
+ s5 = input.charAt(peg$currPos);
1486
+ if (peg$r1.test(s5)) {
1487
+ peg$currPos++;
1488
+ } else {
1489
+ s5 = peg$FAILED;
1490
+ if (peg$silentFails === 0) { peg$fail(peg$e21); }
1491
+ }
1492
+ }
1493
+ while (s5 !== peg$FAILED) {
1494
+ s4.push(s5);
1495
+ s5 = peg$currPos;
1496
+ if (input.charCodeAt(peg$currPos) === 92) {
1497
+ s6 = peg$c18;
1498
+ peg$currPos++;
1499
+ } else {
1500
+ s6 = peg$FAILED;
1501
+ if (peg$silentFails === 0) { peg$fail(peg$e20); }
1502
+ }
1503
+ if (s6 !== peg$FAILED) {
1504
+ if (input.length > peg$currPos) {
1505
+ s7 = input.charAt(peg$currPos);
1506
+ peg$currPos++;
1507
+ } else {
1508
+ s7 = peg$FAILED;
1509
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
1510
+ }
1511
+ if (s7 !== peg$FAILED) {
1512
+ s6 = [s6, s7];
1513
+ s5 = s6;
1514
+ } else {
1515
+ peg$currPos = s5;
1516
+ s5 = peg$FAILED;
1517
+ }
1518
+ } else {
1519
+ peg$currPos = s5;
1520
+ s5 = peg$FAILED;
1521
+ }
1522
+ if (s5 === peg$FAILED) {
1523
+ s5 = input.charAt(peg$currPos);
1524
+ if (peg$r1.test(s5)) {
1525
+ peg$currPos++;
1526
+ } else {
1527
+ s5 = peg$FAILED;
1528
+ if (peg$silentFails === 0) { peg$fail(peg$e21); }
1529
+ }
1530
+ }
1531
+ }
1532
+ s3 = input.substring(s3, peg$currPos);
1533
+ if (input.charCodeAt(peg$currPos) === 34) {
1534
+ s4 = peg$c17;
1535
+ peg$currPos++;
1536
+ } else {
1537
+ s4 = peg$FAILED;
1538
+ if (peg$silentFails === 0) { peg$fail(peg$e19); }
1539
+ }
1540
+ if (s4 !== peg$FAILED) {
1541
+ peg$savedPos = s0;
1542
+ s0 = peg$f16(s3);
1543
+ } else {
1544
+ peg$currPos = s0;
1545
+ s0 = peg$FAILED;
1546
+ }
1547
+ } else {
1548
+ peg$currPos = s0;
1549
+ s0 = peg$FAILED;
1550
+ }
1551
+ } else {
1552
+ peg$currPos = s0;
1553
+ s0 = peg$FAILED;
1554
+ }
1555
+ if (s0 === peg$FAILED) {
1556
+ s0 = peg$currPos;
1557
+ if (input.charCodeAt(peg$currPos) === 64) {
1558
+ s1 = peg$c16;
1559
+ peg$currPos++;
1560
+ } else {
1561
+ s1 = peg$FAILED;
1562
+ if (peg$silentFails === 0) { peg$fail(peg$e18); }
1563
+ }
1564
+ if (s1 !== peg$FAILED) {
1565
+ s2 = peg$currPos;
1566
+ s3 = peg$parsebareGroupName();
1567
+ if (s3 !== peg$FAILED) {
1568
+ s2 = input.substring(s2, peg$currPos);
1569
+ } else {
1570
+ s2 = s3;
1571
+ }
1572
+ if (s2 !== peg$FAILED) {
1573
+ peg$savedPos = s0;
1574
+ s0 = peg$f17(s2);
1575
+ } else {
1576
+ peg$currPos = s0;
1577
+ s0 = peg$FAILED;
1578
+ }
1579
+ } else {
1580
+ peg$currPos = s0;
1581
+ s0 = peg$FAILED;
1582
+ }
1583
+ }
1584
+
1585
+ return s0;
1586
+ }
1587
+
1588
+ function peg$parsebareGroupName() {
1589
+ let s0, s1, s2;
1590
+
1591
+ s0 = peg$currPos;
1592
+ s1 = [];
1593
+ s2 = input.charAt(peg$currPos);
1594
+ if (peg$r2.test(s2)) {
1595
+ peg$currPos++;
1596
+ } else {
1597
+ s2 = peg$FAILED;
1598
+ if (peg$silentFails === 0) { peg$fail(peg$e22); }
1599
+ }
1600
+ if (s2 !== peg$FAILED) {
1601
+ while (s2 !== peg$FAILED) {
1602
+ s1.push(s2);
1603
+ s2 = input.charAt(peg$currPos);
1604
+ if (peg$r2.test(s2)) {
1605
+ peg$currPos++;
1606
+ } else {
1607
+ s2 = peg$FAILED;
1608
+ if (peg$silentFails === 0) { peg$fail(peg$e22); }
1609
+ }
1610
+ }
1611
+ } else {
1612
+ s1 = peg$FAILED;
1613
+ }
1614
+ if (s1 !== peg$FAILED) {
1615
+ s0 = input.substring(s0, peg$currPos);
1616
+ } else {
1617
+ s0 = s1;
1618
+ }
1619
+
1620
+ return s0;
1621
+ }
1622
+
1623
+ function peg$parsegapDir() {
1624
+ let s0, s1, s2, s3;
1625
+
1626
+ s0 = peg$currPos;
1627
+ if (input.substr(peg$currPos, 5) === peg$c19) {
1628
+ s1 = peg$c19;
1629
+ peg$currPos += 5;
1630
+ } else {
1631
+ s1 = peg$FAILED;
1632
+ if (peg$silentFails === 0) { peg$fail(peg$e23); }
1633
+ }
1634
+ if (s1 !== peg$FAILED) {
1635
+ s2 = peg$currPos;
1636
+ s3 = peg$parsenum();
1637
+ if (s3 !== peg$FAILED) {
1638
+ s2 = input.substring(s2, peg$currPos);
1639
+ } else {
1640
+ s2 = s3;
1641
+ }
1642
+ if (s2 !== peg$FAILED) {
1643
+ if (input.charCodeAt(peg$currPos) === 41) {
1644
+ s3 = peg$c9;
1645
+ peg$currPos++;
1646
+ } else {
1647
+ s3 = peg$FAILED;
1648
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1649
+ }
1650
+ if (s3 !== peg$FAILED) {
1651
+ peg$savedPos = s0;
1652
+ s0 = peg$f18(s2);
1653
+ } else {
1654
+ peg$currPos = s0;
1655
+ s0 = peg$FAILED;
1656
+ }
1657
+ } else {
1658
+ peg$currPos = s0;
1659
+ s0 = peg$FAILED;
1660
+ }
1661
+ } else {
1662
+ peg$currPos = s0;
1663
+ s0 = peg$FAILED;
1664
+ }
1665
+
1666
+ return s0;
1667
+ }
1668
+
1669
+ function peg$parsecreateDir() {
1670
+ let s0, s1, s2, s3;
1671
+
1672
+ s0 = peg$currPos;
1673
+ if (input.substr(peg$currPos, 6) === peg$c20) {
1674
+ s1 = peg$c20;
1675
+ peg$currPos += 6;
1676
+ } else {
1677
+ s1 = peg$FAILED;
1678
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
1679
+ }
1680
+ if (s1 !== peg$FAILED) {
1681
+ s2 = peg$currPos;
1682
+ peg$silentFails++;
1683
+ s3 = peg$parseidChar();
1684
+ peg$silentFails--;
1685
+ if (s3 === peg$FAILED) {
1686
+ s2 = undefined;
1687
+ } else {
1688
+ peg$currPos = s2;
1689
+ s2 = peg$FAILED;
1690
+ }
1691
+ if (s2 !== peg$FAILED) {
1692
+ peg$savedPos = s0;
1693
+ s0 = peg$f19();
1694
+ } else {
1695
+ peg$currPos = s0;
1696
+ s0 = peg$FAILED;
1697
+ }
1698
+ } else {
1699
+ peg$currPos = s0;
1700
+ s0 = peg$FAILED;
1701
+ }
1702
+
1703
+ return s0;
1704
+ }
1705
+
1706
+ function peg$parsefromDir() {
1707
+ let s0, s1, s2, s3;
1708
+
1709
+ s0 = peg$currPos;
1710
+ if (input.substr(peg$currPos, 4) === peg$c21) {
1711
+ s1 = peg$c21;
1712
+ peg$currPos += 4;
1713
+ } else {
1714
+ s1 = peg$FAILED;
1715
+ if (peg$silentFails === 0) { peg$fail(peg$e25); }
1716
+ }
1717
+ if (s1 !== peg$FAILED) {
1718
+ s2 = peg$parsesp();
1719
+ if (s2 !== peg$FAILED) {
1720
+ s3 = peg$parseidRef();
1721
+ if (s3 !== peg$FAILED) {
1722
+ peg$savedPos = s0;
1723
+ s0 = peg$f20(s3);
1724
+ } else {
1725
+ peg$currPos = s0;
1726
+ s0 = peg$FAILED;
1727
+ }
1728
+ } else {
1729
+ peg$currPos = s0;
1730
+ s0 = peg$FAILED;
1731
+ }
1732
+ } else {
1733
+ peg$currPos = s0;
1734
+ s0 = peg$FAILED;
1735
+ }
1736
+
1737
+ return s0;
1738
+ }
1739
+
1740
+ function peg$parsetoDir() {
1741
+ let s0, s1, s2, s3;
1742
+
1743
+ s0 = peg$currPos;
1744
+ if (input.substr(peg$currPos, 2) === peg$c22) {
1745
+ s1 = peg$c22;
1746
+ peg$currPos += 2;
1747
+ } else {
1748
+ s1 = peg$FAILED;
1749
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
1750
+ }
1751
+ if (s1 !== peg$FAILED) {
1752
+ s2 = peg$parsesp();
1753
+ if (s2 !== peg$FAILED) {
1754
+ s3 = peg$parseidRef();
1755
+ if (s3 !== peg$FAILED) {
1756
+ peg$savedPos = s0;
1757
+ s0 = peg$f21(s3);
1758
+ } else {
1759
+ peg$currPos = s0;
1760
+ s0 = peg$FAILED;
1761
+ }
1762
+ } else {
1763
+ peg$currPos = s0;
1764
+ s0 = peg$FAILED;
1765
+ }
1766
+ } else {
1767
+ peg$currPos = s0;
1768
+ s0 = peg$FAILED;
1769
+ }
1770
+
1771
+ return s0;
1772
+ }
1773
+
1774
+ function peg$parselabelDir() {
1775
+ let s0, s1, s2, s3;
1776
+
1777
+ s0 = peg$currPos;
1778
+ if (input.substr(peg$currPos, 7) === peg$c23) {
1779
+ s1 = peg$c23;
1780
+ peg$currPos += 7;
1781
+ } else {
1782
+ s1 = peg$FAILED;
1783
+ if (peg$silentFails === 0) { peg$fail(peg$e27); }
1784
+ }
1785
+ if (s1 !== peg$FAILED) {
1786
+ s2 = peg$parsequotedString();
1787
+ if (s2 !== peg$FAILED) {
1788
+ if (input.charCodeAt(peg$currPos) === 41) {
1789
+ s3 = peg$c9;
1790
+ peg$currPos++;
1791
+ } else {
1792
+ s3 = peg$FAILED;
1793
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1794
+ }
1795
+ if (s3 !== peg$FAILED) {
1796
+ peg$savedPos = s0;
1797
+ s0 = peg$f22(s2);
1798
+ } else {
1799
+ peg$currPos = s0;
1800
+ s0 = peg$FAILED;
1801
+ }
1802
+ } else {
1803
+ peg$currPos = s0;
1804
+ s0 = peg$FAILED;
1805
+ }
1806
+ } else {
1807
+ peg$currPos = s0;
1808
+ s0 = peg$FAILED;
1809
+ }
1810
+
1811
+ return s0;
1812
+ }
1813
+
1814
+ function peg$parsetextDir() {
1815
+ let s0, s1, s2, s3;
1816
+
1817
+ s0 = peg$currPos;
1818
+ if (input.substr(peg$currPos, 6) === peg$c24) {
1819
+ s1 = peg$c24;
1820
+ peg$currPos += 6;
1821
+ } else {
1822
+ s1 = peg$FAILED;
1823
+ if (peg$silentFails === 0) { peg$fail(peg$e28); }
1824
+ }
1825
+ if (s1 !== peg$FAILED) {
1826
+ s2 = peg$parsequotedString();
1827
+ if (s2 !== peg$FAILED) {
1828
+ if (input.charCodeAt(peg$currPos) === 41) {
1829
+ s3 = peg$c9;
1830
+ peg$currPos++;
1831
+ } else {
1832
+ s3 = peg$FAILED;
1833
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1834
+ }
1835
+ if (s3 !== peg$FAILED) {
1836
+ peg$savedPos = s0;
1837
+ s0 = peg$f23(s2);
1838
+ } else {
1839
+ peg$currPos = s0;
1840
+ s0 = peg$FAILED;
1841
+ }
1842
+ } else {
1843
+ peg$currPos = s0;
1844
+ s0 = peg$FAILED;
1845
+ }
1846
+ } else {
1847
+ peg$currPos = s0;
1848
+ s0 = peg$FAILED;
1849
+ }
1850
+
1851
+ return s0;
1852
+ }
1853
+
1854
+ function peg$parsetitleDir() {
1855
+ let s0, s1, s2, s3;
1856
+
1857
+ s0 = peg$currPos;
1858
+ if (input.substr(peg$currPos, 7) === peg$c25) {
1859
+ s1 = peg$c25;
1860
+ peg$currPos += 7;
1861
+ } else {
1862
+ s1 = peg$FAILED;
1863
+ if (peg$silentFails === 0) { peg$fail(peg$e29); }
1864
+ }
1865
+ if (s1 !== peg$FAILED) {
1866
+ s2 = peg$parsequotedString();
1867
+ if (s2 !== peg$FAILED) {
1868
+ if (input.charCodeAt(peg$currPos) === 41) {
1869
+ s3 = peg$c9;
1870
+ peg$currPos++;
1871
+ } else {
1872
+ s3 = peg$FAILED;
1873
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1874
+ }
1875
+ if (s3 !== peg$FAILED) {
1876
+ peg$savedPos = s0;
1877
+ s0 = peg$f24(s2);
1878
+ } else {
1879
+ peg$currPos = s0;
1880
+ s0 = peg$FAILED;
1881
+ }
1882
+ } else {
1883
+ peg$currPos = s0;
1884
+ s0 = peg$FAILED;
1885
+ }
1886
+ } else {
1887
+ peg$currPos = s0;
1888
+ s0 = peg$FAILED;
1889
+ }
1890
+
1891
+ return s0;
1892
+ }
1893
+
1894
+ function peg$parsecontentDir() {
1895
+ let s0, s1, s2, s3;
1896
+
1897
+ s0 = peg$currPos;
1898
+ if (input.substr(peg$currPos, 9) === peg$c26) {
1899
+ s1 = peg$c26;
1900
+ peg$currPos += 9;
1901
+ } else {
1902
+ s1 = peg$FAILED;
1903
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
1904
+ }
1905
+ if (s1 !== peg$FAILED) {
1906
+ s2 = peg$parsequotedString();
1907
+ if (s2 !== peg$FAILED) {
1908
+ if (input.charCodeAt(peg$currPos) === 41) {
1909
+ s3 = peg$c9;
1910
+ peg$currPos++;
1911
+ } else {
1912
+ s3 = peg$FAILED;
1913
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1914
+ }
1915
+ if (s3 !== peg$FAILED) {
1916
+ peg$savedPos = s0;
1917
+ s0 = peg$f25(s2);
1918
+ } else {
1919
+ peg$currPos = s0;
1920
+ s0 = peg$FAILED;
1921
+ }
1922
+ } else {
1923
+ peg$currPos = s0;
1924
+ s0 = peg$FAILED;
1925
+ }
1926
+ } else {
1927
+ peg$currPos = s0;
1928
+ s0 = peg$FAILED;
1929
+ }
1930
+
1931
+ return s0;
1932
+ }
1933
+
1934
+ function peg$parsedashDir() {
1935
+ let s0, s1, s2, s3, s4;
1936
+
1937
+ s0 = peg$currPos;
1938
+ if (input.substr(peg$currPos, 6) === peg$c27) {
1939
+ s1 = peg$c27;
1940
+ peg$currPos += 6;
1941
+ } else {
1942
+ s1 = peg$FAILED;
1943
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
1944
+ }
1945
+ if (s1 !== peg$FAILED) {
1946
+ s2 = peg$currPos;
1947
+ s3 = [];
1948
+ s4 = input.charAt(peg$currPos);
1949
+ if (peg$r0.test(s4)) {
1950
+ peg$currPos++;
1951
+ } else {
1952
+ s4 = peg$FAILED;
1953
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
1954
+ }
1955
+ if (s4 !== peg$FAILED) {
1956
+ while (s4 !== peg$FAILED) {
1957
+ s3.push(s4);
1958
+ s4 = input.charAt(peg$currPos);
1959
+ if (peg$r0.test(s4)) {
1960
+ peg$currPos++;
1961
+ } else {
1962
+ s4 = peg$FAILED;
1963
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
1964
+ }
1965
+ }
1966
+ } else {
1967
+ s3 = peg$FAILED;
1968
+ }
1969
+ if (s3 !== peg$FAILED) {
1970
+ s2 = input.substring(s2, peg$currPos);
1971
+ } else {
1972
+ s2 = s3;
1973
+ }
1974
+ if (s2 !== peg$FAILED) {
1975
+ if (input.charCodeAt(peg$currPos) === 41) {
1976
+ s3 = peg$c9;
1977
+ peg$currPos++;
1978
+ } else {
1979
+ s3 = peg$FAILED;
1980
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
1981
+ }
1982
+ if (s3 !== peg$FAILED) {
1983
+ peg$savedPos = s0;
1984
+ s0 = peg$f26(s2);
1985
+ } else {
1986
+ peg$currPos = s0;
1987
+ s0 = peg$FAILED;
1988
+ }
1989
+ } else {
1990
+ peg$currPos = s0;
1991
+ s0 = peg$FAILED;
1992
+ }
1993
+ } else {
1994
+ peg$currPos = s0;
1995
+ s0 = peg$FAILED;
1996
+ }
1997
+
1998
+ return s0;
1999
+ }
2000
+
2001
+ function peg$parsearrowheadDir() {
2002
+ let s0, s1, s2, s3, s4;
2003
+
2004
+ s0 = peg$currPos;
2005
+ if (input.substr(peg$currPos, 11) === peg$c28) {
2006
+ s1 = peg$c28;
2007
+ peg$currPos += 11;
2008
+ } else {
2009
+ s1 = peg$FAILED;
2010
+ if (peg$silentFails === 0) { peg$fail(peg$e32); }
2011
+ }
2012
+ if (s1 !== peg$FAILED) {
2013
+ s2 = peg$currPos;
2014
+ s3 = [];
2015
+ s4 = input.charAt(peg$currPos);
2016
+ if (peg$r0.test(s4)) {
2017
+ peg$currPos++;
2018
+ } else {
2019
+ s4 = peg$FAILED;
2020
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2021
+ }
2022
+ if (s4 !== peg$FAILED) {
2023
+ while (s4 !== peg$FAILED) {
2024
+ s3.push(s4);
2025
+ s4 = input.charAt(peg$currPos);
2026
+ if (peg$r0.test(s4)) {
2027
+ peg$currPos++;
2028
+ } else {
2029
+ s4 = peg$FAILED;
2030
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2031
+ }
2032
+ }
2033
+ } else {
2034
+ s3 = peg$FAILED;
2035
+ }
2036
+ if (s3 !== peg$FAILED) {
2037
+ s2 = input.substring(s2, peg$currPos);
2038
+ } else {
2039
+ s2 = s3;
2040
+ }
2041
+ if (s2 !== peg$FAILED) {
2042
+ if (input.charCodeAt(peg$currPos) === 41) {
2043
+ s3 = peg$c9;
2044
+ peg$currPos++;
2045
+ } else {
2046
+ s3 = peg$FAILED;
2047
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2048
+ }
2049
+ if (s3 !== peg$FAILED) {
2050
+ peg$savedPos = s0;
2051
+ s0 = peg$f27(s2);
2052
+ } else {
2053
+ peg$currPos = s0;
2054
+ s0 = peg$FAILED;
2055
+ }
2056
+ } else {
2057
+ peg$currPos = s0;
2058
+ s0 = peg$FAILED;
2059
+ }
2060
+ } else {
2061
+ peg$currPos = s0;
2062
+ s0 = peg$FAILED;
2063
+ }
2064
+
2065
+ return s0;
2066
+ }
2067
+
2068
+ function peg$parserouteDir() {
2069
+ let s0, s1, s2, s3, s4;
2070
+
2071
+ s0 = peg$currPos;
2072
+ if (input.substr(peg$currPos, 7) === peg$c29) {
2073
+ s1 = peg$c29;
2074
+ peg$currPos += 7;
2075
+ } else {
2076
+ s1 = peg$FAILED;
2077
+ if (peg$silentFails === 0) { peg$fail(peg$e33); }
2078
+ }
2079
+ if (s1 !== peg$FAILED) {
2080
+ s2 = peg$currPos;
2081
+ s3 = [];
2082
+ s4 = input.charAt(peg$currPos);
2083
+ if (peg$r0.test(s4)) {
2084
+ peg$currPos++;
2085
+ } else {
2086
+ s4 = peg$FAILED;
2087
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2088
+ }
2089
+ if (s4 !== peg$FAILED) {
2090
+ while (s4 !== peg$FAILED) {
2091
+ s3.push(s4);
2092
+ s4 = input.charAt(peg$currPos);
2093
+ if (peg$r0.test(s4)) {
2094
+ peg$currPos++;
2095
+ } else {
2096
+ s4 = peg$FAILED;
2097
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2098
+ }
2099
+ }
2100
+ } else {
2101
+ s3 = peg$FAILED;
2102
+ }
2103
+ if (s3 !== peg$FAILED) {
2104
+ s2 = input.substring(s2, peg$currPos);
2105
+ } else {
2106
+ s2 = s3;
2107
+ }
2108
+ if (s2 !== peg$FAILED) {
2109
+ if (input.charCodeAt(peg$currPos) === 41) {
2110
+ s3 = peg$c9;
2111
+ peg$currPos++;
2112
+ } else {
2113
+ s3 = peg$FAILED;
2114
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2115
+ }
2116
+ if (s3 !== peg$FAILED) {
2117
+ peg$savedPos = s0;
2118
+ s0 = peg$f28(s2);
2119
+ } else {
2120
+ peg$currPos = s0;
2121
+ s0 = peg$FAILED;
2122
+ }
2123
+ } else {
2124
+ peg$currPos = s0;
2125
+ s0 = peg$FAILED;
2126
+ }
2127
+ } else {
2128
+ peg$currPos = s0;
2129
+ s0 = peg$FAILED;
2130
+ }
2131
+
2132
+ return s0;
2133
+ }
2134
+
2135
+ function peg$parsecurveDir() {
2136
+ let s0, s1, s2, s3, s4, s5, s6;
2137
+
2138
+ s0 = peg$currPos;
2139
+ if (input.substr(peg$currPos, 7) === peg$c30) {
2140
+ s1 = peg$c30;
2141
+ peg$currPos += 7;
2142
+ } else {
2143
+ s1 = peg$FAILED;
2144
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
2145
+ }
2146
+ if (s1 !== peg$FAILED) {
2147
+ s2 = peg$currPos;
2148
+ s3 = peg$parsenum();
2149
+ if (s3 !== peg$FAILED) {
2150
+ s2 = input.substring(s2, peg$currPos);
2151
+ } else {
2152
+ s2 = s3;
2153
+ }
2154
+ if (s2 !== peg$FAILED) {
2155
+ if (input.charCodeAt(peg$currPos) === 44) {
2156
+ s3 = peg$c8;
2157
+ peg$currPos++;
2158
+ } else {
2159
+ s3 = peg$FAILED;
2160
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
2161
+ }
2162
+ if (s3 !== peg$FAILED) {
2163
+ s4 = peg$parsews();
2164
+ s5 = peg$currPos;
2165
+ s6 = peg$parsenum();
2166
+ if (s6 !== peg$FAILED) {
2167
+ s5 = input.substring(s5, peg$currPos);
2168
+ } else {
2169
+ s5 = s6;
2170
+ }
2171
+ if (s5 !== peg$FAILED) {
2172
+ if (input.charCodeAt(peg$currPos) === 41) {
2173
+ s6 = peg$c9;
2174
+ peg$currPos++;
2175
+ } else {
2176
+ s6 = peg$FAILED;
2177
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2178
+ }
2179
+ if (s6 !== peg$FAILED) {
2180
+ peg$savedPos = s0;
2181
+ s0 = peg$f29(s2, s5);
2182
+ } else {
2183
+ peg$currPos = s0;
2184
+ s0 = peg$FAILED;
2185
+ }
2186
+ } else {
2187
+ peg$currPos = s0;
2188
+ s0 = peg$FAILED;
2189
+ }
2190
+ } else {
2191
+ peg$currPos = s0;
2192
+ s0 = peg$FAILED;
2193
+ }
2194
+ } else {
2195
+ peg$currPos = s0;
2196
+ s0 = peg$FAILED;
2197
+ }
2198
+ } else {
2199
+ peg$currPos = s0;
2200
+ s0 = peg$FAILED;
2201
+ }
2202
+
2203
+ return s0;
2204
+ }
2205
+
2206
+ function peg$parseelbowDir() {
2207
+ let s0, s1, s2, s3, s4;
2208
+
2209
+ s0 = peg$currPos;
2210
+ if (input.substr(peg$currPos, 7) === peg$c31) {
2211
+ s1 = peg$c31;
2212
+ peg$currPos += 7;
2213
+ } else {
2214
+ s1 = peg$FAILED;
2215
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
2216
+ }
2217
+ if (s1 !== peg$FAILED) {
2218
+ s2 = peg$currPos;
2219
+ s3 = [];
2220
+ s4 = input.charAt(peg$currPos);
2221
+ if (peg$r0.test(s4)) {
2222
+ peg$currPos++;
2223
+ } else {
2224
+ s4 = peg$FAILED;
2225
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2226
+ }
2227
+ if (s4 !== peg$FAILED) {
2228
+ while (s4 !== peg$FAILED) {
2229
+ s3.push(s4);
2230
+ s4 = input.charAt(peg$currPos);
2231
+ if (peg$r0.test(s4)) {
2232
+ peg$currPos++;
2233
+ } else {
2234
+ s4 = peg$FAILED;
2235
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2236
+ }
2237
+ }
2238
+ } else {
2239
+ s3 = peg$FAILED;
2240
+ }
2241
+ if (s3 !== peg$FAILED) {
2242
+ s2 = input.substring(s2, peg$currPos);
2243
+ } else {
2244
+ s2 = s3;
2245
+ }
2246
+ if (s2 !== peg$FAILED) {
2247
+ if (input.charCodeAt(peg$currPos) === 41) {
2248
+ s3 = peg$c9;
2249
+ peg$currPos++;
2250
+ } else {
2251
+ s3 = peg$FAILED;
2252
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2253
+ }
2254
+ if (s3 !== peg$FAILED) {
2255
+ peg$savedPos = s0;
2256
+ s0 = peg$f30(s2);
2257
+ } else {
2258
+ peg$currPos = s0;
2259
+ s0 = peg$FAILED;
2260
+ }
2261
+ } else {
2262
+ peg$currPos = s0;
2263
+ s0 = peg$FAILED;
2264
+ }
2265
+ } else {
2266
+ peg$currPos = s0;
2267
+ s0 = peg$FAILED;
2268
+ }
2269
+
2270
+ return s0;
2271
+ }
2272
+
2273
+ function peg$parsewikilinkDir() {
2274
+ let s0, s1, s2, s3;
2275
+
2276
+ s0 = peg$currPos;
2277
+ if (input.substr(peg$currPos, 9) === peg$c32) {
2278
+ s1 = peg$c32;
2279
+ peg$currPos += 9;
2280
+ } else {
2281
+ s1 = peg$FAILED;
2282
+ if (peg$silentFails === 0) { peg$fail(peg$e36); }
2283
+ }
2284
+ if (s1 !== peg$FAILED) {
2285
+ s2 = peg$currPos;
2286
+ peg$silentFails++;
2287
+ s3 = peg$parseidChar();
2288
+ peg$silentFails--;
2289
+ if (s3 === peg$FAILED) {
2290
+ s2 = undefined;
2291
+ } else {
2292
+ peg$currPos = s2;
2293
+ s2 = peg$FAILED;
2294
+ }
2295
+ if (s2 !== peg$FAILED) {
2296
+ peg$savedPos = s0;
2297
+ s0 = peg$f31();
2298
+ } else {
2299
+ peg$currPos = s0;
2300
+ s0 = peg$FAILED;
2301
+ }
2302
+ } else {
2303
+ peg$currPos = s0;
2304
+ s0 = peg$FAILED;
2305
+ }
2306
+
2307
+ return s0;
2308
+ }
2309
+
2310
+ function peg$parsegroupDir() {
2311
+ let s0, s1, s2, s3;
2312
+
2313
+ s0 = peg$currPos;
2314
+ if (input.substr(peg$currPos, 7) === peg$c33) {
2315
+ s1 = peg$c33;
2316
+ peg$currPos += 7;
2317
+ } else {
2318
+ s1 = peg$FAILED;
2319
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
2320
+ }
2321
+ if (s1 !== peg$FAILED) {
2322
+ s2 = peg$parsequotedString();
2323
+ if (s2 !== peg$FAILED) {
2324
+ if (input.charCodeAt(peg$currPos) === 41) {
2325
+ s3 = peg$c9;
2326
+ peg$currPos++;
2327
+ } else {
2328
+ s3 = peg$FAILED;
2329
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2330
+ }
2331
+ if (s3 !== peg$FAILED) {
2332
+ peg$savedPos = s0;
2333
+ s0 = peg$f32(s2);
2334
+ } else {
2335
+ peg$currPos = s0;
2336
+ s0 = peg$FAILED;
2337
+ }
2338
+ } else {
2339
+ peg$currPos = s0;
2340
+ s0 = peg$FAILED;
2341
+ }
2342
+ } else {
2343
+ peg$currPos = s0;
2344
+ s0 = peg$FAILED;
2345
+ }
2346
+
2347
+ return s0;
2348
+ }
2349
+
2350
+ function peg$parsehrefDir() {
2351
+ let s0, s1, s2, s3, s4;
2352
+
2353
+ s0 = peg$currPos;
2354
+ if (input.substr(peg$currPos, 6) === peg$c34) {
2355
+ s1 = peg$c34;
2356
+ peg$currPos += 6;
2357
+ } else {
2358
+ s1 = peg$FAILED;
2359
+ if (peg$silentFails === 0) { peg$fail(peg$e38); }
2360
+ }
2361
+ if (s1 !== peg$FAILED) {
2362
+ s2 = peg$currPos;
2363
+ s3 = [];
2364
+ s4 = input.charAt(peg$currPos);
2365
+ if (peg$r0.test(s4)) {
2366
+ peg$currPos++;
2367
+ } else {
2368
+ s4 = peg$FAILED;
2369
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2370
+ }
2371
+ if (s4 !== peg$FAILED) {
2372
+ while (s4 !== peg$FAILED) {
2373
+ s3.push(s4);
2374
+ s4 = input.charAt(peg$currPos);
2375
+ if (peg$r0.test(s4)) {
2376
+ peg$currPos++;
2377
+ } else {
2378
+ s4 = peg$FAILED;
2379
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2380
+ }
2381
+ }
2382
+ } else {
2383
+ s3 = peg$FAILED;
2384
+ }
2385
+ if (s3 !== peg$FAILED) {
2386
+ s2 = input.substring(s2, peg$currPos);
2387
+ } else {
2388
+ s2 = s3;
2389
+ }
2390
+ if (s2 !== peg$FAILED) {
2391
+ if (input.charCodeAt(peg$currPos) === 41) {
2392
+ s3 = peg$c9;
2393
+ peg$currPos++;
2394
+ } else {
2395
+ s3 = peg$FAILED;
2396
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2397
+ }
2398
+ if (s3 !== peg$FAILED) {
2399
+ peg$savedPos = s0;
2400
+ s0 = peg$f33(s2);
2401
+ } else {
2402
+ peg$currPos = s0;
2403
+ s0 = peg$FAILED;
2404
+ }
2405
+ } else {
2406
+ peg$currPos = s0;
2407
+ s0 = peg$FAILED;
2408
+ }
2409
+ } else {
2410
+ peg$currPos = s0;
2411
+ s0 = peg$FAILED;
2412
+ }
2413
+
2414
+ return s0;
2415
+ }
2416
+
2417
+ function peg$parsecomputeDir() {
2418
+ let s0, s1, s2, s3;
2419
+
2420
+ s0 = peg$currPos;
2421
+ if (input.substr(peg$currPos, 9) === peg$c35) {
2422
+ s1 = peg$c35;
2423
+ peg$currPos += 9;
2424
+ } else {
2425
+ s1 = peg$FAILED;
2426
+ if (peg$silentFails === 0) { peg$fail(peg$e39); }
2427
+ }
2428
+ if (s1 !== peg$FAILED) {
2429
+ s2 = peg$parsequotedString();
2430
+ if (s2 !== peg$FAILED) {
2431
+ if (input.charCodeAt(peg$currPos) === 41) {
2432
+ s3 = peg$c9;
2433
+ peg$currPos++;
2434
+ } else {
2435
+ s3 = peg$FAILED;
2436
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2437
+ }
2438
+ if (s3 !== peg$FAILED) {
2439
+ peg$savedPos = s0;
2440
+ s0 = peg$f34(s2);
2441
+ } else {
2442
+ peg$currPos = s0;
2443
+ s0 = peg$FAILED;
2444
+ }
2445
+ } else {
2446
+ peg$currPos = s0;
2447
+ s0 = peg$FAILED;
2448
+ }
2449
+ } else {
2450
+ peg$currPos = s0;
2451
+ s0 = peg$FAILED;
2452
+ }
2453
+
2454
+ return s0;
2455
+ }
2456
+
2457
+ function peg$parsetypeDir() {
2458
+ let s0, s1, s2, s3, s4;
2459
+
2460
+ s0 = peg$currPos;
2461
+ if (input.substr(peg$currPos, 6) === peg$c36) {
2462
+ s1 = peg$c36;
2463
+ peg$currPos += 6;
2464
+ } else {
2465
+ s1 = peg$FAILED;
2466
+ if (peg$silentFails === 0) { peg$fail(peg$e40); }
2467
+ }
2468
+ if (s1 !== peg$FAILED) {
2469
+ s2 = peg$currPos;
2470
+ s3 = [];
2471
+ s4 = input.charAt(peg$currPos);
2472
+ if (peg$r0.test(s4)) {
2473
+ peg$currPos++;
2474
+ } else {
2475
+ s4 = peg$FAILED;
2476
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2477
+ }
2478
+ if (s4 !== peg$FAILED) {
2479
+ while (s4 !== peg$FAILED) {
2480
+ s3.push(s4);
2481
+ s4 = input.charAt(peg$currPos);
2482
+ if (peg$r0.test(s4)) {
2483
+ peg$currPos++;
2484
+ } else {
2485
+ s4 = peg$FAILED;
2486
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2487
+ }
2488
+ }
2489
+ } else {
2490
+ s3 = peg$FAILED;
2491
+ }
2492
+ if (s3 !== peg$FAILED) {
2493
+ s2 = input.substring(s2, peg$currPos);
2494
+ } else {
2495
+ s2 = s3;
2496
+ }
2497
+ if (s2 !== peg$FAILED) {
2498
+ if (input.charCodeAt(peg$currPos) === 41) {
2499
+ s3 = peg$c9;
2500
+ peg$currPos++;
2501
+ } else {
2502
+ s3 = peg$FAILED;
2503
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2504
+ }
2505
+ if (s3 !== peg$FAILED) {
2506
+ peg$savedPos = s0;
2507
+ s0 = peg$f35(s2);
2508
+ } else {
2509
+ peg$currPos = s0;
2510
+ s0 = peg$FAILED;
2511
+ }
2512
+ } else {
2513
+ peg$currPos = s0;
2514
+ s0 = peg$FAILED;
2515
+ }
2516
+ } else {
2517
+ peg$currPos = s0;
2518
+ s0 = peg$FAILED;
2519
+ }
2520
+
2521
+ return s0;
2522
+ }
2523
+
2524
+ function peg$parsetagsDir() {
2525
+ let s0, s1, s2, s3, s4;
2526
+
2527
+ s0 = peg$currPos;
2528
+ if (input.substr(peg$currPos, 6) === peg$c37) {
2529
+ s1 = peg$c37;
2530
+ peg$currPos += 6;
2531
+ } else {
2532
+ s1 = peg$FAILED;
2533
+ if (peg$silentFails === 0) { peg$fail(peg$e41); }
2534
+ }
2535
+ if (s1 !== peg$FAILED) {
2536
+ s2 = peg$currPos;
2537
+ s3 = [];
2538
+ s4 = input.charAt(peg$currPos);
2539
+ if (peg$r0.test(s4)) {
2540
+ peg$currPos++;
2541
+ } else {
2542
+ s4 = peg$FAILED;
2543
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2544
+ }
2545
+ if (s4 !== peg$FAILED) {
2546
+ while (s4 !== peg$FAILED) {
2547
+ s3.push(s4);
2548
+ s4 = input.charAt(peg$currPos);
2549
+ if (peg$r0.test(s4)) {
2550
+ peg$currPos++;
2551
+ } else {
2552
+ s4 = peg$FAILED;
2553
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2554
+ }
2555
+ }
2556
+ } else {
2557
+ s3 = peg$FAILED;
2558
+ }
2559
+ if (s3 !== peg$FAILED) {
2560
+ s2 = input.substring(s2, peg$currPos);
2561
+ } else {
2562
+ s2 = s3;
2563
+ }
2564
+ if (s2 !== peg$FAILED) {
2565
+ if (input.charCodeAt(peg$currPos) === 41) {
2566
+ s3 = peg$c9;
2567
+ peg$currPos++;
2568
+ } else {
2569
+ s3 = peg$FAILED;
2570
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2571
+ }
2572
+ if (s3 !== peg$FAILED) {
2573
+ peg$savedPos = s0;
2574
+ s0 = peg$f36(s2);
2575
+ } else {
2576
+ peg$currPos = s0;
2577
+ s0 = peg$FAILED;
2578
+ }
2579
+ } else {
2580
+ peg$currPos = s0;
2581
+ s0 = peg$FAILED;
2582
+ }
2583
+ } else {
2584
+ peg$currPos = s0;
2585
+ s0 = peg$FAILED;
2586
+ }
2587
+
2588
+ return s0;
2589
+ }
2590
+
2591
+ function peg$parselinksDir() {
2592
+ let s0, s1, s2, s3, s4;
2593
+
2594
+ s0 = peg$currPos;
2595
+ if (input.substr(peg$currPos, 7) === peg$c38) {
2596
+ s1 = peg$c38;
2597
+ peg$currPos += 7;
2598
+ } else {
2599
+ s1 = peg$FAILED;
2600
+ if (peg$silentFails === 0) { peg$fail(peg$e42); }
2601
+ }
2602
+ if (s1 !== peg$FAILED) {
2603
+ s2 = peg$currPos;
2604
+ s3 = [];
2605
+ s4 = input.charAt(peg$currPos);
2606
+ if (peg$r0.test(s4)) {
2607
+ peg$currPos++;
2608
+ } else {
2609
+ s4 = peg$FAILED;
2610
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2611
+ }
2612
+ if (s4 !== peg$FAILED) {
2613
+ while (s4 !== peg$FAILED) {
2614
+ s3.push(s4);
2615
+ s4 = input.charAt(peg$currPos);
2616
+ if (peg$r0.test(s4)) {
2617
+ peg$currPos++;
2618
+ } else {
2619
+ s4 = peg$FAILED;
2620
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
2621
+ }
2622
+ }
2623
+ } else {
2624
+ s3 = peg$FAILED;
2625
+ }
2626
+ if (s3 !== peg$FAILED) {
2627
+ s2 = input.substring(s2, peg$currPos);
2628
+ } else {
2629
+ s2 = s3;
2630
+ }
2631
+ if (s2 !== peg$FAILED) {
2632
+ if (input.charCodeAt(peg$currPos) === 41) {
2633
+ s3 = peg$c9;
2634
+ peg$currPos++;
2635
+ } else {
2636
+ s3 = peg$FAILED;
2637
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2638
+ }
2639
+ if (s3 !== peg$FAILED) {
2640
+ peg$savedPos = s0;
2641
+ s0 = peg$f37(s2);
2642
+ } else {
2643
+ peg$currPos = s0;
2644
+ s0 = peg$FAILED;
2645
+ }
2646
+ } else {
2647
+ peg$currPos = s0;
2648
+ s0 = peg$FAILED;
2649
+ }
2650
+ } else {
2651
+ peg$currPos = s0;
2652
+ s0 = peg$FAILED;
2653
+ }
2654
+
2655
+ return s0;
2656
+ }
2657
+
2658
+ function peg$parsecodeDir() {
2659
+ let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
2660
+
2661
+ s0 = peg$currPos;
2662
+ if (input.substr(peg$currPos, 6) === peg$c39) {
2663
+ s1 = peg$c39;
2664
+ peg$currPos += 6;
2665
+ } else {
2666
+ s1 = peg$FAILED;
2667
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
2668
+ }
2669
+ if (s1 !== peg$FAILED) {
2670
+ s2 = peg$parsecodeLang();
2671
+ if (input.charCodeAt(peg$currPos) === 44) {
2672
+ s3 = peg$c8;
2673
+ peg$currPos++;
2674
+ } else {
2675
+ s3 = peg$FAILED;
2676
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
2677
+ }
2678
+ if (s3 !== peg$FAILED) {
2679
+ s4 = peg$parsews();
2680
+ s5 = peg$parsequotedString();
2681
+ if (s5 !== peg$FAILED) {
2682
+ if (input.charCodeAt(peg$currPos) === 44) {
2683
+ s6 = peg$c8;
2684
+ peg$currPos++;
2685
+ } else {
2686
+ s6 = peg$FAILED;
2687
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
2688
+ }
2689
+ if (s6 !== peg$FAILED) {
2690
+ s7 = peg$parsews();
2691
+ s8 = peg$parsequotedString();
2692
+ if (s8 !== peg$FAILED) {
2693
+ if (input.charCodeAt(peg$currPos) === 41) {
2694
+ s9 = peg$c9;
2695
+ peg$currPos++;
2696
+ } else {
2697
+ s9 = peg$FAILED;
2698
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2699
+ }
2700
+ if (s9 !== peg$FAILED) {
2701
+ peg$savedPos = s0;
2702
+ s0 = peg$f38(s2, s5, s8);
2703
+ } else {
2704
+ peg$currPos = s0;
2705
+ s0 = peg$FAILED;
2706
+ }
2707
+ } else {
2708
+ peg$currPos = s0;
2709
+ s0 = peg$FAILED;
2710
+ }
2711
+ } else {
2712
+ peg$currPos = s0;
2713
+ s0 = peg$FAILED;
2714
+ }
2715
+ } else {
2716
+ peg$currPos = s0;
2717
+ s0 = peg$FAILED;
2718
+ }
2719
+ } else {
2720
+ peg$currPos = s0;
2721
+ s0 = peg$FAILED;
2722
+ }
2723
+ } else {
2724
+ peg$currPos = s0;
2725
+ s0 = peg$FAILED;
2726
+ }
2727
+ if (s0 === peg$FAILED) {
2728
+ s0 = peg$currPos;
2729
+ if (input.substr(peg$currPos, 6) === peg$c39) {
2730
+ s1 = peg$c39;
2731
+ peg$currPos += 6;
2732
+ } else {
2733
+ s1 = peg$FAILED;
2734
+ if (peg$silentFails === 0) { peg$fail(peg$e43); }
2735
+ }
2736
+ if (s1 !== peg$FAILED) {
2737
+ s2 = peg$parsecodeLang();
2738
+ if (input.charCodeAt(peg$currPos) === 44) {
2739
+ s3 = peg$c8;
2740
+ peg$currPos++;
2741
+ } else {
2742
+ s3 = peg$FAILED;
2743
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
2744
+ }
2745
+ if (s3 !== peg$FAILED) {
2746
+ s4 = peg$parsews();
2747
+ s5 = peg$parsequotedString();
2748
+ if (s5 !== peg$FAILED) {
2749
+ if (input.charCodeAt(peg$currPos) === 41) {
2750
+ s6 = peg$c9;
2751
+ peg$currPos++;
2752
+ } else {
2753
+ s6 = peg$FAILED;
2754
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2755
+ }
2756
+ if (s6 !== peg$FAILED) {
2757
+ peg$savedPos = s0;
2758
+ s0 = peg$f39(s2, s5);
2759
+ } else {
2760
+ peg$currPos = s0;
2761
+ s0 = peg$FAILED;
2762
+ }
2763
+ } else {
2764
+ peg$currPos = s0;
2765
+ s0 = peg$FAILED;
2766
+ }
2767
+ } else {
2768
+ peg$currPos = s0;
2769
+ s0 = peg$FAILED;
2770
+ }
2771
+ } else {
2772
+ peg$currPos = s0;
2773
+ s0 = peg$FAILED;
2774
+ }
2775
+ }
2776
+
2777
+ return s0;
2778
+ }
2779
+
2780
+ function peg$parsequoteDir() {
2781
+ let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
2782
+
2783
+ s0 = peg$currPos;
2784
+ if (input.substr(peg$currPos, 7) === peg$c40) {
2785
+ s1 = peg$c40;
2786
+ peg$currPos += 7;
2787
+ } else {
2788
+ s1 = peg$FAILED;
2789
+ if (peg$silentFails === 0) { peg$fail(peg$e44); }
2790
+ }
2791
+ if (s1 !== peg$FAILED) {
2792
+ s2 = peg$parsequotedString();
2793
+ if (s2 !== peg$FAILED) {
2794
+ if (input.charCodeAt(peg$currPos) === 44) {
2795
+ s3 = peg$c8;
2796
+ peg$currPos++;
2797
+ } else {
2798
+ s3 = peg$FAILED;
2799
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
2800
+ }
2801
+ if (s3 !== peg$FAILED) {
2802
+ s4 = peg$parsews();
2803
+ s5 = peg$parsequotedString();
2804
+ if (s5 !== peg$FAILED) {
2805
+ if (input.charCodeAt(peg$currPos) === 44) {
2806
+ s6 = peg$c8;
2807
+ peg$currPos++;
2808
+ } else {
2809
+ s6 = peg$FAILED;
2810
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
2811
+ }
2812
+ if (s6 !== peg$FAILED) {
2813
+ s7 = peg$parsews();
2814
+ s8 = peg$parsequotedString();
2815
+ if (s8 !== peg$FAILED) {
2816
+ if (input.charCodeAt(peg$currPos) === 41) {
2817
+ s9 = peg$c9;
2818
+ peg$currPos++;
2819
+ } else {
2820
+ s9 = peg$FAILED;
2821
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2822
+ }
2823
+ if (s9 !== peg$FAILED) {
2824
+ peg$savedPos = s0;
2825
+ s0 = peg$f40(s2, s5, s8);
2826
+ } else {
2827
+ peg$currPos = s0;
2828
+ s0 = peg$FAILED;
2829
+ }
2830
+ } else {
2831
+ peg$currPos = s0;
2832
+ s0 = peg$FAILED;
2833
+ }
2834
+ } else {
2835
+ peg$currPos = s0;
2836
+ s0 = peg$FAILED;
2837
+ }
2838
+ } else {
2839
+ peg$currPos = s0;
2840
+ s0 = peg$FAILED;
2841
+ }
2842
+ } else {
2843
+ peg$currPos = s0;
2844
+ s0 = peg$FAILED;
2845
+ }
2846
+ } else {
2847
+ peg$currPos = s0;
2848
+ s0 = peg$FAILED;
2849
+ }
2850
+ } else {
2851
+ peg$currPos = s0;
2852
+ s0 = peg$FAILED;
2853
+ }
2854
+ if (s0 === peg$FAILED) {
2855
+ s0 = peg$currPos;
2856
+ if (input.substr(peg$currPos, 7) === peg$c40) {
2857
+ s1 = peg$c40;
2858
+ peg$currPos += 7;
2859
+ } else {
2860
+ s1 = peg$FAILED;
2861
+ if (peg$silentFails === 0) { peg$fail(peg$e44); }
2862
+ }
2863
+ if (s1 !== peg$FAILED) {
2864
+ s2 = peg$parsequotedString();
2865
+ if (s2 !== peg$FAILED) {
2866
+ if (input.charCodeAt(peg$currPos) === 44) {
2867
+ s3 = peg$c8;
2868
+ peg$currPos++;
2869
+ } else {
2870
+ s3 = peg$FAILED;
2871
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
2872
+ }
2873
+ if (s3 !== peg$FAILED) {
2874
+ s4 = peg$parsews();
2875
+ s5 = peg$parsequotedString();
2876
+ if (s5 !== peg$FAILED) {
2877
+ if (input.charCodeAt(peg$currPos) === 41) {
2878
+ s6 = peg$c9;
2879
+ peg$currPos++;
2880
+ } else {
2881
+ s6 = peg$FAILED;
2882
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2883
+ }
2884
+ if (s6 !== peg$FAILED) {
2885
+ peg$savedPos = s0;
2886
+ s0 = peg$f41(s2, s5);
2887
+ } else {
2888
+ peg$currPos = s0;
2889
+ s0 = peg$FAILED;
2890
+ }
2891
+ } else {
2892
+ peg$currPos = s0;
2893
+ s0 = peg$FAILED;
2894
+ }
2895
+ } else {
2896
+ peg$currPos = s0;
2897
+ s0 = peg$FAILED;
2898
+ }
2899
+ } else {
2900
+ peg$currPos = s0;
2901
+ s0 = peg$FAILED;
2902
+ }
2903
+ } else {
2904
+ peg$currPos = s0;
2905
+ s0 = peg$FAILED;
2906
+ }
2907
+ if (s0 === peg$FAILED) {
2908
+ s0 = peg$currPos;
2909
+ if (input.substr(peg$currPos, 7) === peg$c40) {
2910
+ s1 = peg$c40;
2911
+ peg$currPos += 7;
2912
+ } else {
2913
+ s1 = peg$FAILED;
2914
+ if (peg$silentFails === 0) { peg$fail(peg$e44); }
2915
+ }
2916
+ if (s1 !== peg$FAILED) {
2917
+ s2 = peg$parsequotedString();
2918
+ if (s2 !== peg$FAILED) {
2919
+ if (input.charCodeAt(peg$currPos) === 41) {
2920
+ s3 = peg$c9;
2921
+ peg$currPos++;
2922
+ } else {
2923
+ s3 = peg$FAILED;
2924
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
2925
+ }
2926
+ if (s3 !== peg$FAILED) {
2927
+ peg$savedPos = s0;
2928
+ s0 = peg$f42(s2);
2929
+ } else {
2930
+ peg$currPos = s0;
2931
+ s0 = peg$FAILED;
2932
+ }
2933
+ } else {
2934
+ peg$currPos = s0;
2935
+ s0 = peg$FAILED;
2936
+ }
2937
+ } else {
2938
+ peg$currPos = s0;
2939
+ s0 = peg$FAILED;
2940
+ }
2941
+ }
2942
+ }
2943
+
2944
+ return s0;
2945
+ }
2946
+
2947
+ function peg$parsenum() {
2948
+ let s0, s1, s2, s3, s4, s5, s6;
2949
+
2950
+ s0 = peg$currPos;
2951
+ if (input.charCodeAt(peg$currPos) === 45) {
2952
+ s1 = peg$c41;
2953
+ peg$currPos++;
2954
+ } else {
2955
+ s1 = peg$FAILED;
2956
+ if (peg$silentFails === 0) { peg$fail(peg$e45); }
2957
+ }
2958
+ if (s1 === peg$FAILED) {
2959
+ s1 = null;
2960
+ }
2961
+ s2 = [];
2962
+ s3 = input.charAt(peg$currPos);
2963
+ if (peg$r3.test(s3)) {
2964
+ peg$currPos++;
2965
+ } else {
2966
+ s3 = peg$FAILED;
2967
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
2968
+ }
2969
+ if (s3 !== peg$FAILED) {
2970
+ while (s3 !== peg$FAILED) {
2971
+ s2.push(s3);
2972
+ s3 = input.charAt(peg$currPos);
2973
+ if (peg$r3.test(s3)) {
2974
+ peg$currPos++;
2975
+ } else {
2976
+ s3 = peg$FAILED;
2977
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
2978
+ }
2979
+ }
2980
+ } else {
2981
+ s2 = peg$FAILED;
2982
+ }
2983
+ if (s2 !== peg$FAILED) {
2984
+ s3 = peg$currPos;
2985
+ if (input.charCodeAt(peg$currPos) === 46) {
2986
+ s4 = peg$c42;
2987
+ peg$currPos++;
2988
+ } else {
2989
+ s4 = peg$FAILED;
2990
+ if (peg$silentFails === 0) { peg$fail(peg$e47); }
2991
+ }
2992
+ if (s4 !== peg$FAILED) {
2993
+ s5 = [];
2994
+ s6 = input.charAt(peg$currPos);
2995
+ if (peg$r3.test(s6)) {
2996
+ peg$currPos++;
2997
+ } else {
2998
+ s6 = peg$FAILED;
2999
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
3000
+ }
3001
+ if (s6 !== peg$FAILED) {
3002
+ while (s6 !== peg$FAILED) {
3003
+ s5.push(s6);
3004
+ s6 = input.charAt(peg$currPos);
3005
+ if (peg$r3.test(s6)) {
3006
+ peg$currPos++;
3007
+ } else {
3008
+ s6 = peg$FAILED;
3009
+ if (peg$silentFails === 0) { peg$fail(peg$e46); }
3010
+ }
3011
+ }
3012
+ } else {
3013
+ s5 = peg$FAILED;
3014
+ }
3015
+ if (s5 !== peg$FAILED) {
3016
+ s4 = [s4, s5];
3017
+ s3 = s4;
3018
+ } else {
3019
+ peg$currPos = s3;
3020
+ s3 = peg$FAILED;
3021
+ }
3022
+ } else {
3023
+ peg$currPos = s3;
3024
+ s3 = peg$FAILED;
3025
+ }
3026
+ if (s3 === peg$FAILED) {
3027
+ s3 = null;
3028
+ }
3029
+ s1 = [s1, s2, s3];
3030
+ s0 = s1;
3031
+ } else {
3032
+ peg$currPos = s0;
3033
+ s0 = peg$FAILED;
3034
+ }
3035
+
3036
+ return s0;
3037
+ }
3038
+
3039
+ function peg$parseescChar() {
3040
+ let s0, s1, s2;
3041
+
3042
+ s0 = peg$currPos;
3043
+ if (input.charCodeAt(peg$currPos) === 92) {
3044
+ s1 = peg$c18;
3045
+ peg$currPos++;
3046
+ } else {
3047
+ s1 = peg$FAILED;
3048
+ if (peg$silentFails === 0) { peg$fail(peg$e20); }
3049
+ }
3050
+ if (s1 !== peg$FAILED) {
3051
+ if (input.length > peg$currPos) {
3052
+ s2 = input.charAt(peg$currPos);
3053
+ peg$currPos++;
3054
+ } else {
3055
+ s2 = peg$FAILED;
3056
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
3057
+ }
3058
+ if (s2 !== peg$FAILED) {
3059
+ s1 = [s1, s2];
3060
+ s0 = s1;
3061
+ } else {
3062
+ peg$currPos = s0;
3063
+ s0 = peg$FAILED;
3064
+ }
3065
+ } else {
3066
+ peg$currPos = s0;
3067
+ s0 = peg$FAILED;
3068
+ }
3069
+ if (s0 === peg$FAILED) {
3070
+ s0 = input.charAt(peg$currPos);
3071
+ if (peg$r4.test(s0)) {
3072
+ peg$currPos++;
3073
+ } else {
3074
+ s0 = peg$FAILED;
3075
+ if (peg$silentFails === 0) { peg$fail(peg$e48); }
3076
+ }
3077
+ }
3078
+
3079
+ return s0;
3080
+ }
3081
+
3082
+ function peg$parsequotedString() {
3083
+ let s0, s1, s2, s3, s4;
3084
+
3085
+ s0 = peg$currPos;
3086
+ if (input.charCodeAt(peg$currPos) === 34) {
3087
+ s1 = peg$c17;
3088
+ peg$currPos++;
3089
+ } else {
3090
+ s1 = peg$FAILED;
3091
+ if (peg$silentFails === 0) { peg$fail(peg$e19); }
3092
+ }
3093
+ if (s1 !== peg$FAILED) {
3094
+ s2 = peg$currPos;
3095
+ s3 = [];
3096
+ s4 = peg$parseescChar();
3097
+ while (s4 !== peg$FAILED) {
3098
+ s3.push(s4);
3099
+ s4 = peg$parseescChar();
3100
+ }
3101
+ s2 = input.substring(s2, peg$currPos);
3102
+ if (input.charCodeAt(peg$currPos) === 34) {
3103
+ s3 = peg$c17;
3104
+ peg$currPos++;
3105
+ } else {
3106
+ s3 = peg$FAILED;
3107
+ if (peg$silentFails === 0) { peg$fail(peg$e19); }
3108
+ }
3109
+ if (s3 !== peg$FAILED) {
3110
+ peg$savedPos = s0;
3111
+ s0 = peg$f43(s2);
3112
+ } else {
3113
+ peg$currPos = s0;
3114
+ s0 = peg$FAILED;
3115
+ }
3116
+ } else {
3117
+ peg$currPos = s0;
3118
+ s0 = peg$FAILED;
3119
+ }
3120
+
3121
+ return s0;
3122
+ }
3123
+
3124
+ function peg$parsecodeLang() {
3125
+ let s0, s1, s2;
3126
+
3127
+ s0 = peg$currPos;
3128
+ s1 = [];
3129
+ s2 = input.charAt(peg$currPos);
3130
+ if (peg$r5.test(s2)) {
3131
+ peg$currPos++;
3132
+ } else {
3133
+ s2 = peg$FAILED;
3134
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
3135
+ }
3136
+ while (s2 !== peg$FAILED) {
3137
+ s1.push(s2);
3138
+ s2 = input.charAt(peg$currPos);
3139
+ if (peg$r5.test(s2)) {
3140
+ peg$currPos++;
3141
+ } else {
3142
+ s2 = peg$FAILED;
3143
+ if (peg$silentFails === 0) { peg$fail(peg$e49); }
3144
+ }
3145
+ }
3146
+ s0 = input.substring(s0, peg$currPos);
3147
+
3148
+ return s0;
3149
+ }
3150
+
3151
+ function peg$parseidRef() {
3152
+ let s0, s1, s2, s3;
3153
+
3154
+ s0 = peg$currPos;
3155
+ if (input.charCodeAt(peg$currPos) === 35) {
3156
+ s1 = peg$c43;
3157
+ peg$currPos++;
3158
+ } else {
3159
+ s1 = peg$FAILED;
3160
+ if (peg$silentFails === 0) { peg$fail(peg$e50); }
3161
+ }
3162
+ if (s1 !== peg$FAILED) {
3163
+ s2 = peg$currPos;
3164
+ s3 = peg$parseidChars();
3165
+ if (s3 !== peg$FAILED) {
3166
+ s2 = input.substring(s2, peg$currPos);
3167
+ } else {
3168
+ s2 = s3;
3169
+ }
3170
+ if (s2 !== peg$FAILED) {
3171
+ peg$savedPos = s0;
3172
+ s0 = peg$f44(s2);
3173
+ } else {
3174
+ peg$currPos = s0;
3175
+ s0 = peg$FAILED;
3176
+ }
3177
+ } else {
3178
+ peg$currPos = s0;
3179
+ s0 = peg$FAILED;
3180
+ }
3181
+
3182
+ return s0;
3183
+ }
3184
+
3185
+ function peg$parseidChars() {
3186
+ let s0, s1;
3187
+
3188
+ s0 = [];
3189
+ s1 = input.charAt(peg$currPos);
3190
+ if (peg$r6.test(s1)) {
3191
+ peg$currPos++;
3192
+ } else {
3193
+ s1 = peg$FAILED;
3194
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
3195
+ }
3196
+ if (s1 !== peg$FAILED) {
3197
+ while (s1 !== peg$FAILED) {
3198
+ s0.push(s1);
3199
+ s1 = input.charAt(peg$currPos);
3200
+ if (peg$r6.test(s1)) {
3201
+ peg$currPos++;
3202
+ } else {
3203
+ s1 = peg$FAILED;
3204
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
3205
+ }
3206
+ }
3207
+ } else {
3208
+ s0 = peg$FAILED;
3209
+ }
3210
+
3211
+ return s0;
3212
+ }
3213
+
3214
+ function peg$parseidChar() {
3215
+ let s0;
3216
+
3217
+ s0 = input.charAt(peg$currPos);
3218
+ if (peg$r6.test(s0)) {
3219
+ peg$currPos++;
3220
+ } else {
3221
+ s0 = peg$FAILED;
3222
+ if (peg$silentFails === 0) { peg$fail(peg$e51); }
3223
+ }
3224
+
3225
+ return s0;
3226
+ }
3227
+
3228
+ function peg$parseskipChunk() {
3229
+ let s0, s1, s2, s3;
3230
+
3231
+ s0 = peg$currPos;
3232
+ s1 = peg$currPos;
3233
+ s2 = [];
3234
+ s3 = input.charAt(peg$currPos);
3235
+ if (peg$r7.test(s3)) {
3236
+ peg$currPos++;
3237
+ } else {
3238
+ s3 = peg$FAILED;
3239
+ if (peg$silentFails === 0) { peg$fail(peg$e52); }
3240
+ }
3241
+ if (s3 !== peg$FAILED) {
3242
+ while (s3 !== peg$FAILED) {
3243
+ s2.push(s3);
3244
+ s3 = input.charAt(peg$currPos);
3245
+ if (peg$r7.test(s3)) {
3246
+ peg$currPos++;
3247
+ } else {
3248
+ s3 = peg$FAILED;
3249
+ if (peg$silentFails === 0) { peg$fail(peg$e52); }
3250
+ }
3251
+ }
3252
+ } else {
3253
+ s2 = peg$FAILED;
3254
+ }
3255
+ if (s2 !== peg$FAILED) {
3256
+ s1 = input.substring(s1, peg$currPos);
3257
+ } else {
3258
+ s1 = s2;
3259
+ }
3260
+ if (s1 !== peg$FAILED) {
3261
+ peg$savedPos = s0;
3262
+ s1 = peg$f45(s1);
3263
+ }
3264
+ s0 = s1;
3265
+
3266
+ return s0;
3267
+ }
3268
+
3269
+ function peg$parsews() {
3270
+ let s0, s1;
3271
+
3272
+ s0 = [];
3273
+ s1 = input.charAt(peg$currPos);
3274
+ if (peg$r8.test(s1)) {
3275
+ peg$currPos++;
3276
+ } else {
3277
+ s1 = peg$FAILED;
3278
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
3279
+ }
3280
+ while (s1 !== peg$FAILED) {
3281
+ s0.push(s1);
3282
+ s1 = input.charAt(peg$currPos);
3283
+ if (peg$r8.test(s1)) {
3284
+ peg$currPos++;
3285
+ } else {
3286
+ s1 = peg$FAILED;
3287
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
3288
+ }
3289
+ }
3290
+
3291
+ return s0;
3292
+ }
3293
+
3294
+ function peg$parsesp() {
3295
+ let s0, s1;
3296
+
3297
+ s0 = [];
3298
+ s1 = input.charAt(peg$currPos);
3299
+ if (peg$r8.test(s1)) {
3300
+ peg$currPos++;
3301
+ } else {
3302
+ s1 = peg$FAILED;
3303
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
3304
+ }
3305
+ if (s1 !== peg$FAILED) {
3306
+ while (s1 !== peg$FAILED) {
3307
+ s0.push(s1);
3308
+ s1 = input.charAt(peg$currPos);
3309
+ if (peg$r8.test(s1)) {
3310
+ peg$currPos++;
3311
+ } else {
3312
+ s1 = peg$FAILED;
3313
+ if (peg$silentFails === 0) { peg$fail(peg$e53); }
3314
+ }
3315
+ }
3316
+ } else {
3317
+ s0 = peg$FAILED;
3318
+ }
3319
+
3320
+ return s0;
3321
+ }
3322
+
3323
+ peg$result = peg$startRuleFunction();
3324
+
3325
+ const peg$success = (peg$result !== peg$FAILED && peg$currPos === input.length);
3326
+ function peg$throw() {
3327
+ if (peg$result !== peg$FAILED && peg$currPos < input.length) {
3328
+ peg$fail(peg$endExpectation());
3329
+ }
3330
+
3331
+ throw peg$buildStructuredError(
3332
+ peg$maxFailExpected,
3333
+ peg$maxFailPos < input.length ? peg$getUnicode(peg$maxFailPos) : null,
3334
+ peg$maxFailPos < input.length
3335
+ ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
3336
+ : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
3337
+ );
3338
+ }
3339
+ if (options.peg$library) {
3340
+ return /** @type {any} */ ({
3341
+ peg$result,
3342
+ peg$currPos,
3343
+ peg$FAILED,
3344
+ peg$maxFailExpected,
3345
+ peg$maxFailPos,
3346
+ peg$success,
3347
+ peg$throw: peg$success ? undefined : peg$throw,
3348
+ });
3349
+ }
3350
+ if (peg$success) {
3351
+ return peg$result;
3352
+ } else {
3353
+ peg$throw();
3354
+ }
3355
+ }
3356
+
3357
+ const peg$allowedStartRules = [
3358
+ "Line"
3359
+ ];
3360
+
3361
+ export {
3362
+ peg$allowedStartRules as StartRules,
3363
+ peg$SyntaxError as SyntaxError,
3364
+ peg$parse as parse
3365
+ };