@podlite/schema 0.0.10 → 0.0.12

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