@ts-graphviz/ast 0.0.0-next-20240301111950

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/ast.cjs ADDED
@@ -0,0 +1,3917 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const common = require("@ts-graphviz/common");
4
+ class Builder {
5
+ /**
6
+ * Constructor of Builder
7
+ * @param options - Options to initialize Builder
8
+ */
9
+ constructor(options) {
10
+ this.options = options;
11
+ }
12
+ /**
13
+ * Get the current file range or null
14
+ * @internal
15
+ */
16
+ getLocation() {
17
+ return this.options?.locationFunction?.() ?? null;
18
+ }
19
+ /**
20
+ * Create an {@link ASTNode} of the specified type
21
+ *
22
+ * @param type - Type of the {@link ASTNode}
23
+ * @param props - Properties of the {@link ASTNode}
24
+ * @param children - Children of the {@link ASTNode}
25
+ * @returns An {@link ASTNode}
26
+ */
27
+ createElement(type, props, children = []) {
28
+ return {
29
+ location: this.getLocation(),
30
+ ...props,
31
+ type,
32
+ children
33
+ };
34
+ }
35
+ }
36
+ const createElement = Builder.prototype.createElement.bind(new Builder());
37
+ const EOL = /\r?\n/;
38
+ function joinBy(sep) {
39
+ return (value) => value.join(sep);
40
+ }
41
+ function wrapWith(wrapper) {
42
+ return (value) => wrapper + value + wrapper;
43
+ }
44
+ function wrapByPair(l, r) {
45
+ return (value) => l + value + r;
46
+ }
47
+ function leftPadWith(left) {
48
+ return (value) => left + value;
49
+ }
50
+ const escape = (value) => value.replace(/\\/g, "\\\\").replace(/\r/g, "\\r").replace(/\n/g, "\\n").replace(/"/g, '\\"');
51
+ const splitByLine = (value) => value.split(EOL);
52
+ const indent = (style, size, eol) => common.pipe(
53
+ splitByLine,
54
+ common.map(leftPadWith(style === "space" ? " ".repeat(size) : "\n")),
55
+ joinBy(eol)
56
+ );
57
+ const endOfLine = (eol) => {
58
+ switch (eol) {
59
+ case "crlf":
60
+ return "\r\n";
61
+ case "lf":
62
+ return "\n";
63
+ }
64
+ };
65
+ const AttributeListPrintPlugin = {
66
+ match(ast) {
67
+ return ast.type === "AttributeList";
68
+ },
69
+ print(context, ast) {
70
+ if (ast.children.length === 0) {
71
+ return `${ast.kind.toLocaleLowerCase()} [];`;
72
+ }
73
+ const eol = endOfLine(context.endOfLine);
74
+ return common.pipe(
75
+ common.map(context.print),
76
+ joinBy(eol),
77
+ indent(context.indentStyle, context.indentSize, eol),
78
+ wrapByPair(`${ast.kind.toLocaleLowerCase()} [${eol}`, `${eol}];`)
79
+ )(ast.children);
80
+ }
81
+ };
82
+ const AttributePrintPlugin = {
83
+ match(ast) {
84
+ return ast.type === "Attribute";
85
+ },
86
+ print(context, ast) {
87
+ return `${context.print(ast.key)} = ${context.print(ast.value)};`;
88
+ }
89
+ };
90
+ const CommentPrintPlugin = {
91
+ match(ast) {
92
+ return ast.type === "Comment";
93
+ },
94
+ print(context, ast) {
95
+ const eol = endOfLine(context.endOfLine);
96
+ switch (ast.kind) {
97
+ case "Block":
98
+ return common.pipe(
99
+ splitByLine,
100
+ common.map(leftPadWith(" * ")),
101
+ joinBy(eol),
102
+ wrapByPair(`/**${eol}`, `${eol} */`)
103
+ )(ast.value);
104
+ case "Macro":
105
+ return common.pipe(
106
+ splitByLine,
107
+ common.map(leftPadWith("# ")),
108
+ joinBy(eol)
109
+ )(ast.value);
110
+ default:
111
+ return common.pipe(
112
+ splitByLine,
113
+ common.map(leftPadWith("// ")),
114
+ joinBy(eol)
115
+ )(ast.value);
116
+ }
117
+ }
118
+ };
119
+ const DotPrintPlugin = {
120
+ match(ast) {
121
+ return ast.type === "Dot";
122
+ },
123
+ print(context, ast) {
124
+ return ast.children.map(context.print).join(endOfLine(context.endOfLine));
125
+ }
126
+ };
127
+ const EdgePrintPlugin = {
128
+ match(ast) {
129
+ return ast.type === "Edge";
130
+ },
131
+ print(context, ast) {
132
+ const targets = common.pipe(
133
+ common.map(context.print),
134
+ joinBy(context.directed ? " -> " : " -- ")
135
+ )(ast.targets);
136
+ if (ast.children.length === 0) {
137
+ return `${targets};`;
138
+ }
139
+ const eol = endOfLine(context.endOfLine);
140
+ const contents = common.pipe(
141
+ common.map(context.print),
142
+ joinBy(eol),
143
+ indent(context.indentStyle, context.indentSize, eol),
144
+ wrapByPair(`[${eol}`, `${eol}];`)
145
+ )(ast.children);
146
+ return `${targets} ${contents}`;
147
+ }
148
+ };
149
+ const GraphPrintPlugin = {
150
+ match(ast) {
151
+ return ast.type === "Graph";
152
+ },
153
+ print(context, ast) {
154
+ context.directed = ast.directed;
155
+ const parts = [];
156
+ if (ast.strict) {
157
+ parts.push("strict");
158
+ }
159
+ parts.push(ast.directed ? "digraph" : "graph");
160
+ if (ast.id) {
161
+ parts.push(context.print(ast.id));
162
+ }
163
+ if (ast.children.length === 0) {
164
+ return `${parts.join(" ")} {}`;
165
+ }
166
+ const eol = endOfLine(context.endOfLine);
167
+ const contents = common.pipe(
168
+ common.map(context.print),
169
+ joinBy(eol),
170
+ indent(context.indentStyle, context.indentSize, eol),
171
+ wrapByPair(`{${eol}`, `${eol}}`)
172
+ )(ast.children);
173
+ return `${parts.join(" ")} ${contents}`;
174
+ }
175
+ };
176
+ const quoteLiteralValue = common.pipe(escape, wrapWith('"'));
177
+ const quoteHTMLLikeLiteralValue = wrapByPair("<", ">");
178
+ const LiteralPrintPlugin = {
179
+ match(ast) {
180
+ return ast.type === "Literal";
181
+ },
182
+ print(context, ast) {
183
+ switch (ast.quoted) {
184
+ case "html":
185
+ return quoteHTMLLikeLiteralValue(ast.value);
186
+ case true:
187
+ return quoteLiteralValue(ast.value);
188
+ default:
189
+ return escape(ast.value);
190
+ }
191
+ }
192
+ };
193
+ const NodePrintPlugin = {
194
+ match(ast) {
195
+ return ast.type === "Node";
196
+ },
197
+ print(context, ast) {
198
+ const id = context.print(ast.id);
199
+ if (ast.children.length === 0) {
200
+ return `${id};`;
201
+ }
202
+ const eol = endOfLine(context.endOfLine);
203
+ const contents = common.pipe(
204
+ common.map(context.print),
205
+ joinBy(eol),
206
+ indent(context.indentStyle, context.indentSize, eol),
207
+ wrapByPair(`[${eol}`, `${eol}];`)
208
+ )(ast.children);
209
+ return `${id} ${contents}`;
210
+ }
211
+ };
212
+ const NodeRefGroupPrintPlugin = {
213
+ match(ast) {
214
+ return ast.type === "NodeRefGroup";
215
+ },
216
+ print(context, ast) {
217
+ return common.pipe(
218
+ common.map(context.print),
219
+ joinBy(" "),
220
+ wrapByPair("{", "}")
221
+ )(ast.children);
222
+ }
223
+ };
224
+ const NodeRefPrintPlugin = {
225
+ match(ast) {
226
+ return ast.type === "NodeRef";
227
+ },
228
+ print(context, ast) {
229
+ const parts = [context.print(ast.id)];
230
+ if (ast.port) {
231
+ parts.push(context.print(ast.port));
232
+ }
233
+ if (ast.compass) {
234
+ parts.push(context.print(ast.compass));
235
+ }
236
+ return parts.join(":");
237
+ }
238
+ };
239
+ const SubgraphPrintPlugin = {
240
+ match(ast) {
241
+ return ast.type === "Subgraph";
242
+ },
243
+ print(context, ast) {
244
+ const parts = ["subgraph"];
245
+ if (ast.id) {
246
+ parts.push(context.print(ast.id));
247
+ }
248
+ if (ast.children.length === 0) {
249
+ return `${parts.join(" ")} {}`;
250
+ }
251
+ const eol = endOfLine(context.endOfLine);
252
+ const contents = common.pipe(
253
+ common.map(context.print),
254
+ joinBy(eol),
255
+ indent(context.indentStyle, context.indentSize, eol),
256
+ wrapByPair(`{${eol}`, `${eol}}`)
257
+ )(ast.children);
258
+ return `${parts.join(" ")} ${contents}`;
259
+ }
260
+ };
261
+ const defaultPlugins$2 = [
262
+ AttributeListPrintPlugin,
263
+ AttributePrintPlugin,
264
+ CommentPrintPlugin,
265
+ DotPrintPlugin,
266
+ EdgePrintPlugin,
267
+ GraphPrintPlugin,
268
+ LiteralPrintPlugin,
269
+ NodePrintPlugin,
270
+ NodeRefGroupPrintPlugin,
271
+ NodeRefPrintPlugin,
272
+ SubgraphPrintPlugin
273
+ ];
274
+ class Printer {
275
+ /**
276
+ * @param options Options to be used when generating the DOT string.
277
+ */
278
+ constructor(options = {}) {
279
+ this.options = options;
280
+ }
281
+ /** @internal */
282
+ #plugins = [...defaultPlugins$2];
283
+ /**
284
+ * Generates a DOT string from an ASTNode.
285
+ * @param ast The ASTNode to be converted into a DOT string.
286
+ * @returns The DOT string generated from the ASTNode.
287
+ */
288
+ print(ast) {
289
+ const plugins = [...this.#plugins];
290
+ const {
291
+ indentSize = 2,
292
+ indentStyle = "space",
293
+ endOfLine: endOfLine2 = "lf"
294
+ } = this.options;
295
+ const context = {
296
+ directed: true,
297
+ indentSize,
298
+ indentStyle,
299
+ endOfLine: endOfLine2,
300
+ print(a) {
301
+ for (const plugin of plugins) {
302
+ if (plugin.match(a)) {
303
+ return plugin.print(context, a);
304
+ }
305
+ }
306
+ throw Error();
307
+ }
308
+ };
309
+ return context.print(ast);
310
+ }
311
+ }
312
+ function stringify(ast, options) {
313
+ const result = new Printer(options).print(ast);
314
+ if (!result) {
315
+ throw new Error();
316
+ }
317
+ return result;
318
+ }
319
+ const peggyParser = (
320
+ // Generated by Peggy 3.0.2.
321
+ //
322
+ // https://peggyjs.org/
323
+ // @ts-ignore
324
+ function() {
325
+ function peg$subclass(child, parent) {
326
+ function C() {
327
+ this.constructor = child;
328
+ }
329
+ C.prototype = parent.prototype;
330
+ child.prototype = new C();
331
+ }
332
+ function peg$SyntaxError(message, expected, found, location) {
333
+ var self = Error.call(this, message);
334
+ if (Object.setPrototypeOf) {
335
+ Object.setPrototypeOf(self, peg$SyntaxError.prototype);
336
+ }
337
+ self.expected = expected;
338
+ self.found = found;
339
+ self.location = location;
340
+ self.name = "SyntaxError";
341
+ return self;
342
+ }
343
+ peg$subclass(peg$SyntaxError, Error);
344
+ function peg$padEnd(str, targetLength, padString) {
345
+ padString = padString || " ";
346
+ if (str.length > targetLength) {
347
+ return str;
348
+ }
349
+ targetLength -= str.length;
350
+ padString += padString.repeat(targetLength);
351
+ return str + padString.slice(0, targetLength);
352
+ }
353
+ peg$SyntaxError.prototype.format = function(sources) {
354
+ var str = "Error: " + this.message;
355
+ if (this.location) {
356
+ var src = null;
357
+ var k;
358
+ for (k = 0; k < sources.length; k++) {
359
+ if (sources[k].source === this.location.source) {
360
+ src = sources[k].text.split(/\r\n|\n|\r/g);
361
+ break;
362
+ }
363
+ }
364
+ var s = this.location.start;
365
+ var offset_s = this.location.source && typeof this.location.source.offset === "function" ? this.location.source.offset(s) : s;
366
+ var loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column;
367
+ if (src) {
368
+ var e = this.location.end;
369
+ var filler = peg$padEnd("", offset_s.line.toString().length, " ");
370
+ var line = src[s.line - 1];
371
+ var last = s.line === e.line ? e.column : line.length + 1;
372
+ var hatLen = last - s.column || 1;
373
+ str += "\n --> " + loc + "\n" + filler + " |\n" + offset_s.line + " | " + line + "\n" + filler + " | " + peg$padEnd("", s.column - 1, " ") + peg$padEnd("", hatLen, "^");
374
+ } else {
375
+ str += "\n at " + loc;
376
+ }
377
+ }
378
+ return str;
379
+ };
380
+ peg$SyntaxError.buildMessage = function(expected, found) {
381
+ var DESCRIBE_EXPECTATION_FNS = {
382
+ // @ts-ignore
383
+ literal: function(expectation) {
384
+ return '"' + literalEscape(expectation.text) + '"';
385
+ },
386
+ // @ts-ignore
387
+ class: function(expectation) {
388
+ var escapedParts = expectation.parts.map(function(part) {
389
+ return Array.isArray(part) ? classEscape(part[0]) + "-" + classEscape(part[1]) : classEscape(part);
390
+ });
391
+ return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]";
392
+ },
393
+ // @ts-ignore
394
+ any: function() {
395
+ return "any character";
396
+ },
397
+ // @ts-ignore
398
+ end: function() {
399
+ return "end of input";
400
+ },
401
+ // @ts-ignore
402
+ other: function(expectation) {
403
+ return expectation.description;
404
+ }
405
+ };
406
+ function hex(ch) {
407
+ return ch.charCodeAt(0).toString(16).toUpperCase();
408
+ }
409
+ function literalEscape(s) {
410
+ return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) {
411
+ return "\\x0" + hex(ch);
412
+ }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) {
413
+ return "\\x" + hex(ch);
414
+ });
415
+ }
416
+ function classEscape(s) {
417
+ return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) {
418
+ return "\\x0" + hex(ch);
419
+ }).replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) {
420
+ return "\\x" + hex(ch);
421
+ });
422
+ }
423
+ function describeExpectation(expectation) {
424
+ return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
425
+ }
426
+ function describeExpected(expected2) {
427
+ var descriptions = expected2.map(describeExpectation);
428
+ var i, j;
429
+ descriptions.sort();
430
+ if (descriptions.length > 0) {
431
+ for (i = 1, j = 1; i < descriptions.length; i++) {
432
+ if (descriptions[i - 1] !== descriptions[i]) {
433
+ descriptions[j] = descriptions[i];
434
+ j++;
435
+ }
436
+ }
437
+ descriptions.length = j;
438
+ }
439
+ switch (descriptions.length) {
440
+ case 1:
441
+ return descriptions[0];
442
+ case 2:
443
+ return descriptions[0] + " or " + descriptions[1];
444
+ default:
445
+ return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1];
446
+ }
447
+ }
448
+ function describeFound(found2) {
449
+ return found2 ? '"' + literalEscape(found2) + '"' : "end of input";
450
+ }
451
+ return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
452
+ };
453
+ function peg$parse(input, options) {
454
+ options = options !== void 0 ? options : {};
455
+ var peg$FAILED = {};
456
+ var peg$source = options.grammarSource;
457
+ var peg$startRuleFunctions = { Dot: peg$parseDot, Graph: peg$parseGraph, Subgraph: peg$parseSubgraph, Node: peg$parseNode, Edge: peg$parseEdge, AttributeList: peg$parseAttributeList, Attribute: peg$parseAttribute, ClusterStatements: peg$parseClusterStatements };
458
+ var peg$startRuleFunction = peg$parseDot;
459
+ var peg$c0 = "strict";
460
+ var peg$c1 = "graph";
461
+ var peg$c2 = "digraph";
462
+ var peg$c3 = "{";
463
+ var peg$c4 = "}";
464
+ var peg$c5 = ";";
465
+ var peg$c6 = "node";
466
+ var peg$c7 = "edge";
467
+ var peg$c8 = "=";
468
+ var peg$c9 = ",";
469
+ var peg$c10 = "[";
470
+ var peg$c11 = "]";
471
+ var peg$c12 = "->";
472
+ var peg$c13 = "--";
473
+ var peg$c14 = ":";
474
+ var peg$c15 = "subgraph";
475
+ var peg$c16 = "n";
476
+ var peg$c17 = "ne";
477
+ var peg$c18 = "e";
478
+ var peg$c19 = "se";
479
+ var peg$c20 = "s";
480
+ var peg$c21 = "sw";
481
+ var peg$c22 = "w";
482
+ var peg$c23 = "nw";
483
+ var peg$c24 = '"';
484
+ var peg$c25 = "/*";
485
+ var peg$c26 = "*/";
486
+ var peg$c27 = "//";
487
+ var peg$c28 = "#";
488
+ var peg$c29 = "$";
489
+ var peg$c30 = "_";
490
+ var peg$c31 = "-";
491
+ var peg$c32 = ".";
492
+ var peg$c33 = "<";
493
+ var peg$c34 = ">";
494
+ var peg$c35 = "\\";
495
+ var peg$c36 = "\n";
496
+ var peg$c37 = "\r\n";
497
+ var peg$c38 = "\r";
498
+ var peg$c39 = "\u2028";
499
+ var peg$c40 = "\u2029";
500
+ var peg$r0 = /^[0-9]/;
501
+ var peg$r1 = /^[\n\r\u2028\u2029]/;
502
+ var peg$r3 = /^[\n\r]/;
503
+ var peg$r4 = /^[ \t]/;
504
+ var peg$r5 = /^[a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137-\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148-\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C-\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA-\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9-\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC-\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF-\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F-\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0-\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB-\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE-\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0561-\u0587\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6-\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FC7\u1FD0-\u1FD3\u1FD6-\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6-\u1FF7\u210A\u210E-\u210F\u2113\u212F\u2134\u2139\u213C-\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65-\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73-\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3-\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7FA\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A]/;
505
+ var peg$r6 = /^[\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5-\u06E6\u07F4-\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C-\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D-\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA717-\uA71F\uA770\uA788\uA7F8-\uA7F9\uA9CF\uAA70\uAADD\uAAF3-\uAAF4\uFF70\uFF9E-\uFF9F]/;
506
+ var peg$r7 = /^[\xAA\xBA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05F0-\u05F2\u0620-\u063F\u0641-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0977\u0979-\u097F\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58-\u0C59\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0-\u0CE1\u0CF1-\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E45\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10D0-\u10FA\u10FD-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE-\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5-\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A-\uA62B\uA66E\uA6A0-\uA6E5\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/;
507
+ var peg$r8 = /^[\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC]/;
508
+ var peg$r9 = /^[A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178-\u0179\u017B\u017D\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018B\u018E-\u0191\u0193-\u0194\u0196-\u0198\u019C-\u019D\u019F-\u01A0\u01A2\u01A4\u01A6-\u01A7\u01A9\u01AC\u01AE-\u01AF\u01B1-\u01B3\u01B5\u01B7-\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A-\u023B\u023D-\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u0386\u0388-\u038A\u038C\u038E-\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9-\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0-\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E-\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D-\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA\uFF21-\uFF3A]/;
509
+ var peg$r10 = /^[\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF]/;
510
+ var peg$r11 = /^[0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]/;
511
+ var peg$e0 = peg$literalExpectation("strict", true);
512
+ var peg$e1 = peg$literalExpectation("graph", true);
513
+ var peg$e2 = peg$literalExpectation("digraph", true);
514
+ var peg$e3 = peg$literalExpectation("{", false);
515
+ var peg$e4 = peg$literalExpectation("}", false);
516
+ var peg$e5 = peg$literalExpectation(";", false);
517
+ var peg$e6 = peg$literalExpectation("node", true);
518
+ var peg$e7 = peg$literalExpectation("edge", true);
519
+ var peg$e8 = peg$literalExpectation("=", false);
520
+ var peg$e9 = peg$literalExpectation(",", false);
521
+ var peg$e10 = peg$literalExpectation("[", false);
522
+ var peg$e11 = peg$literalExpectation("]", false);
523
+ var peg$e12 = peg$literalExpectation("->", false);
524
+ var peg$e13 = peg$literalExpectation("--", false);
525
+ var peg$e14 = peg$otherExpectation("port");
526
+ var peg$e15 = peg$literalExpectation(":", false);
527
+ var peg$e16 = peg$literalExpectation("subgraph", true);
528
+ var peg$e17 = peg$literalExpectation("n", false);
529
+ var peg$e18 = peg$literalExpectation("ne", false);
530
+ var peg$e19 = peg$literalExpectation("e", false);
531
+ var peg$e20 = peg$literalExpectation("se", false);
532
+ var peg$e21 = peg$literalExpectation("s", false);
533
+ var peg$e22 = peg$literalExpectation("sw", false);
534
+ var peg$e23 = peg$literalExpectation("w", false);
535
+ var peg$e24 = peg$literalExpectation("nw", false);
536
+ var peg$e25 = peg$literalExpectation('"', false);
537
+ var peg$e26 = peg$literalExpectation("/*", false);
538
+ var peg$e27 = peg$literalExpectation("*/", false);
539
+ var peg$e28 = peg$anyExpectation();
540
+ var peg$e29 = peg$literalExpectation("//", false);
541
+ var peg$e30 = peg$literalExpectation("#", false);
542
+ var peg$e31 = peg$otherExpectation("UNICODE_STRING");
543
+ var peg$e32 = peg$literalExpectation("$", false);
544
+ var peg$e33 = peg$literalExpectation("_", false);
545
+ var peg$e34 = peg$otherExpectation("NUMBER");
546
+ var peg$e35 = peg$literalExpectation("-", false);
547
+ var peg$e36 = peg$literalExpectation(".", false);
548
+ var peg$e37 = peg$classExpectation([["0", "9"]], false, false);
549
+ var peg$e38 = peg$literalExpectation("<", false);
550
+ var peg$e39 = peg$literalExpectation(">", false);
551
+ var peg$e40 = peg$literalExpectation("\\", false);
552
+ var peg$e41 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], false, false);
553
+ var peg$e42 = peg$otherExpectation("end of line");
554
+ var peg$e43 = peg$literalExpectation("\n", false);
555
+ var peg$e44 = peg$literalExpectation("\r\n", false);
556
+ var peg$e45 = peg$literalExpectation("\r", false);
557
+ var peg$e46 = peg$literalExpectation("\u2028", false);
558
+ var peg$e47 = peg$literalExpectation("\u2029", false);
559
+ var peg$e50 = peg$otherExpectation("whitespace");
560
+ var peg$e51 = peg$otherExpectation("WHITESPACE");
561
+ var peg$e52 = peg$classExpectation(["\n", "\r"], false, false);
562
+ var peg$e53 = peg$classExpectation([" ", " "], false, false);
563
+ var peg$e54 = peg$classExpectation([["a", "z"], "µ", ["ß", "ö"], ["ø", "ÿ"], "ā", "ă", "ą", "ć", "ĉ", "ċ", "č", "ď", "đ", "ē", "ĕ", "ė", "ę", "ě", "ĝ", "ğ", "ġ", "ģ", "ĥ", "ħ", "ĩ", "ī", "ĭ", "į", "ı", "ij", "ĵ", ["ķ", "ĸ"], "ĺ", "ļ", "ľ", "ŀ", "ł", "ń", "ņ", ["ň", "ʼn"], "ŋ", "ō", "ŏ", "ő", "œ", "ŕ", "ŗ", "ř", "ś", "ŝ", "ş", "š", "ţ", "ť", "ŧ", "ũ", "ū", "ŭ", "ů", "ű", "ų", "ŵ", "ŷ", "ź", "ż", ["ž", "ƀ"], "ƃ", "ƅ", "ƈ", ["ƌ", "ƍ"], "ƒ", "ƕ", ["ƙ", "ƛ"], "ƞ", "ơ", "ƣ", "ƥ", "ƨ", ["ƪ", "ƫ"], "ƭ", "ư", "ƴ", "ƶ", ["ƹ", "ƺ"], ["ƽ", "ƿ"], "dž", "lj", "nj", "ǎ", "ǐ", "ǒ", "ǔ", "ǖ", "ǘ", "ǚ", ["ǜ", "ǝ"], "ǟ", "ǡ", "ǣ", "ǥ", "ǧ", "ǩ", "ǫ", "ǭ", ["ǯ", "ǰ"], "dz", "ǵ", "ǹ", "ǻ", "ǽ", "ǿ", "ȁ", "ȃ", "ȅ", "ȇ", "ȉ", "ȋ", "ȍ", "ȏ", "ȑ", "ȓ", "ȕ", "ȗ", "ș", "ț", "ȝ", "ȟ", "ȡ", "ȣ", "ȥ", "ȧ", "ȩ", "ȫ", "ȭ", "ȯ", "ȱ", ["ȳ", "ȹ"], "ȼ", ["ȿ", "ɀ"], "ɂ", "ɇ", "ɉ", "ɋ", "ɍ", ["ɏ", "ʓ"], ["ʕ", "ʯ"], "ͱ", "ͳ", "ͷ", ["ͻ", "ͽ"], "ΐ", ["ά", "ώ"], ["ϐ", "ϑ"], ["ϕ", "ϗ"], "ϙ", "ϛ", "ϝ", "ϟ", "ϡ", "ϣ", "ϥ", "ϧ", "ϩ", "ϫ", "ϭ", ["ϯ", "ϳ"], "ϵ", "ϸ", ["ϻ", "ϼ"], ["а", "џ"], "ѡ", "ѣ", "ѥ", "ѧ", "ѩ", "ѫ", "ѭ", "ѯ", "ѱ", "ѳ", "ѵ", "ѷ", "ѹ", "ѻ", "ѽ", "ѿ", "ҁ", "ҋ", "ҍ", "ҏ", "ґ", "ғ", "ҕ", "җ", "ҙ", "қ", "ҝ", "ҟ", "ҡ", "ң", "ҥ", "ҧ", "ҩ", "ҫ", "ҭ", "ү", "ұ", "ҳ", "ҵ", "ҷ", "ҹ", "һ", "ҽ", "ҿ", "ӂ", "ӄ", "ӆ", "ӈ", "ӊ", "ӌ", ["ӎ", "ӏ"], "ӑ", "ӓ", "ӕ", "ӗ", "ә", "ӛ", "ӝ", "ӟ", "ӡ", "ӣ", "ӥ", "ӧ", "ө", "ӫ", "ӭ", "ӯ", "ӱ", "ӳ", "ӵ", "ӷ", "ӹ", "ӻ", "ӽ", "ӿ", "ԁ", "ԃ", "ԅ", "ԇ", "ԉ", "ԋ", "ԍ", "ԏ", "ԑ", "ԓ", "ԕ", "ԗ", "ԙ", "ԛ", "ԝ", "ԟ", "ԡ", "ԣ", "ԥ", "ԧ", ["ա", "և"], ["ᴀ", "ᴫ"], ["ᵫ", "ᵷ"], ["ᵹ", "ᶚ"], "ḁ", "ḃ", "ḅ", "ḇ", "ḉ", "ḋ", "ḍ", "ḏ", "ḑ", "ḓ", "ḕ", "ḗ", "ḙ", "ḛ", "ḝ", "ḟ", "ḡ", "ḣ", "ḥ", "ḧ", "ḩ", "ḫ", "ḭ", "ḯ", "ḱ", "ḳ", "ḵ", "ḷ", "ḹ", "ḻ", "ḽ", "ḿ", "ṁ", "ṃ", "ṅ", "ṇ", "ṉ", "ṋ", "ṍ", "ṏ", "ṑ", "ṓ", "ṕ", "ṗ", "ṙ", "ṛ", "ṝ", "ṟ", "ṡ", "ṣ", "ṥ", "ṧ", "ṩ", "ṫ", "ṭ", "ṯ", "ṱ", "ṳ", "ṵ", "ṷ", "ṹ", "ṻ", "ṽ", "ṿ", "ẁ", "ẃ", "ẅ", "ẇ", "ẉ", "ẋ", "ẍ", "ẏ", "ẑ", "ẓ", ["ẕ", "ẝ"], "ẟ", "ạ", "ả", "ấ", "ầ", "ẩ", "ẫ", "ậ", "ắ", "ằ", "ẳ", "ẵ", "ặ", "ẹ", "ẻ", "ẽ", "ế", "ề", "ể", "ễ", "ệ", "ỉ", "ị", "ọ", "ỏ", "ố", "ồ", "ổ", "ỗ", "ộ", "ớ", "ờ", "ở", "ỡ", "ợ", "ụ", "ủ", "ứ", "ừ", "ử", "ữ", "ự", "ỳ", "ỵ", "ỷ", "ỹ", "ỻ", "ỽ", ["ỿ", "ἇ"], ["ἐ", "ἕ"], ["ἠ", "ἧ"], ["ἰ", "ἷ"], ["ὀ", "ὅ"], ["ὐ", "ὗ"], ["ὠ", "ὧ"], ["ὰ", "ώ"], ["ᾀ", "ᾇ"], ["ᾐ", "ᾗ"], ["ᾠ", "ᾧ"], ["ᾰ", "ᾴ"], ["ᾶ", "ᾷ"], "ι", ["ῂ", "ῄ"], ["ῆ", "ῇ"], ["ῐ", "ΐ"], ["ῖ", "ῗ"], ["ῠ", "ῧ"], ["ῲ", "ῴ"], ["ῶ", "ῷ"], "ℊ", ["ℎ", "ℏ"], "ℓ", "ℯ", "ℴ", "ℹ", ["ℼ", "ℽ"], ["ⅆ", "ⅉ"], "ⅎ", "ↄ", ["ⰰ", "ⱞ"], "ⱡ", ["ⱥ", "ⱦ"], "ⱨ", "ⱪ", "ⱬ", "ⱱ", ["ⱳ", "ⱴ"], ["ⱶ", "ⱻ"], "ⲁ", "ⲃ", "ⲅ", "ⲇ", "ⲉ", "ⲋ", "ⲍ", "ⲏ", "ⲑ", "ⲓ", "ⲕ", "ⲗ", "ⲙ", "ⲛ", "ⲝ", "ⲟ", "ⲡ", "ⲣ", "ⲥ", "ⲧ", "ⲩ", "ⲫ", "ⲭ", "ⲯ", "ⲱ", "ⲳ", "ⲵ", "ⲷ", "ⲹ", "ⲻ", "ⲽ", "ⲿ", "ⳁ", "ⳃ", "ⳅ", "ⳇ", "ⳉ", "ⳋ", "ⳍ", "ⳏ", "ⳑ", "ⳓ", "ⳕ", "ⳗ", "ⳙ", "ⳛ", "ⳝ", "ⳟ", "ⳡ", ["ⳣ", "ⳤ"], "ⳬ", "ⳮ", "ⳳ", ["ⴀ", "ⴥ"], "ⴧ", "ⴭ", "ꙁ", "ꙃ", "ꙅ", "ꙇ", "ꙉ", "ꙋ", "ꙍ", "ꙏ", "ꙑ", "ꙓ", "ꙕ", "ꙗ", "ꙙ", "ꙛ", "ꙝ", "ꙟ", "ꙡ", "ꙣ", "ꙥ", "ꙧ", "ꙩ", "ꙫ", "ꙭ", "ꚁ", "ꚃ", "ꚅ", "ꚇ", "ꚉ", "ꚋ", "ꚍ", "ꚏ", "ꚑ", "ꚓ", "ꚕ", "ꚗ", "ꜣ", "ꜥ", "ꜧ", "ꜩ", "ꜫ", "ꜭ", ["ꜯ", "ꜱ"], "ꜳ", "ꜵ", "ꜷ", "ꜹ", "ꜻ", "ꜽ", "ꜿ", "ꝁ", "ꝃ", "ꝅ", "ꝇ", "ꝉ", "ꝋ", "ꝍ", "ꝏ", "ꝑ", "ꝓ", "ꝕ", "ꝗ", "ꝙ", "ꝛ", "ꝝ", "ꝟ", "ꝡ", "ꝣ", "ꝥ", "ꝧ", "ꝩ", "ꝫ", "ꝭ", "ꝯ", ["ꝱ", "ꝸ"], "ꝺ", "ꝼ", "ꝿ", "ꞁ", "ꞃ", "ꞅ", "ꞇ", "ꞌ", "ꞎ", "ꞑ", "ꞓ", "ꞡ", "ꞣ", "ꞥ", "ꞧ", "ꞩ", "ꟺ", ["ff", "st"], ["ﬓ", "ﬗ"], ["a", "z"]], false, false);
564
+ var peg$e55 = peg$classExpectation([["ʰ", "ˁ"], ["ˆ", "ˑ"], ["ˠ", "ˤ"], "ˬ", "ˮ", "ʹ", "ͺ", "ՙ", "ـ", ["ۥ", "ۦ"], ["ߴ", "ߵ"], "ߺ", "ࠚ", "ࠤ", "ࠨ", "ॱ", "ๆ", "ໆ", "ჼ", "ៗ", "ᡃ", "ᪧ", ["ᱸ", "ᱽ"], ["ᴬ", "ᵪ"], "ᵸ", ["ᶛ", "ᶿ"], "ⁱ", "ⁿ", ["ₐ", "ₜ"], ["ⱼ", "ⱽ"], "ⵯ", "ⸯ", "々", ["〱", "〵"], "〻", ["ゝ", "ゞ"], ["ー", "ヾ"], "ꀕ", ["ꓸ", "ꓽ"], "ꘌ", "ꙿ", ["ꜗ", "ꜟ"], "ꝰ", "ꞈ", ["ꟸ", "ꟹ"], "ꧏ", "ꩰ", "ꫝ", ["ꫳ", "ꫴ"], "ー", ["゙", "゚"]], false, false);
565
+ var peg$e56 = peg$classExpectation(["ª", "º", "ƻ", ["ǀ", "ǃ"], "ʔ", ["א", "ת"], ["װ", "ײ"], ["ؠ", "ؿ"], ["ف", "ي"], ["ٮ", "ٯ"], ["ٱ", "ۓ"], "ە", ["ۮ", "ۯ"], ["ۺ", "ۼ"], "ۿ", "ܐ", ["ܒ", "ܯ"], ["ݍ", "ޥ"], "ޱ", ["ߊ", "ߪ"], ["ࠀ", "ࠕ"], ["ࡀ", "ࡘ"], "ࢠ", ["ࢢ", "ࢬ"], ["ऄ", "ह"], "ऽ", "ॐ", ["क़", "ॡ"], ["ॲ", "ॷ"], ["ॹ", "ॿ"], ["অ", "ঌ"], ["এ", "ঐ"], ["ও", "ন"], ["প", "র"], "ল", ["শ", "হ"], "ঽ", "ৎ", ["ড়", "ঢ়"], ["য়", "ৡ"], ["ৰ", "ৱ"], ["ਅ", "ਊ"], ["ਏ", "ਐ"], ["ਓ", "ਨ"], ["ਪ", "ਰ"], ["ਲ", "ਲ਼"], ["ਵ", "ਸ਼"], ["ਸ", "ਹ"], ["ਖ਼", "ੜ"], "ਫ਼", ["ੲ", "ੴ"], ["અ", "ઍ"], ["એ", "ઑ"], ["ઓ", "ન"], ["પ", "ર"], ["લ", "ળ"], ["વ", "હ"], "ઽ", "ૐ", ["ૠ", "ૡ"], ["ଅ", "ଌ"], ["ଏ", "ଐ"], ["ଓ", "ନ"], ["ପ", "ର"], ["ଲ", "ଳ"], ["ଵ", "ହ"], "ଽ", ["ଡ଼", "ଢ଼"], ["ୟ", "ୡ"], "ୱ", "ஃ", ["அ", "ஊ"], ["எ", "ஐ"], ["ஒ", "க"], ["ங", "ச"], "ஜ", ["ஞ", "ட"], ["ண", "த"], ["ந", "ப"], ["ம", "ஹ"], "ௐ", ["అ", "ఌ"], ["ఎ", "ఐ"], ["ఒ", "న"], ["ప", "ళ"], ["వ", "హ"], "ఽ", ["ౘ", "ౙ"], ["ౠ", "ౡ"], ["ಅ", "ಌ"], ["ಎ", "ಐ"], ["ಒ", "ನ"], ["ಪ", "ಳ"], ["ವ", "ಹ"], "ಽ", "ೞ", ["ೠ", "ೡ"], ["ೱ", "ೲ"], ["അ", "ഌ"], ["എ", "ഐ"], ["ഒ", "ഺ"], "ഽ", "ൎ", ["ൠ", "ൡ"], ["ൺ", "ൿ"], ["අ", "ඖ"], ["ක", "න"], ["ඳ", "ර"], "ල", ["ව", "ෆ"], ["ก", "ะ"], ["า", "ำ"], ["เ", "ๅ"], ["ກ", "ຂ"], "ຄ", ["ງ", "ຈ"], "ຊ", "ຍ", ["ດ", "ທ"], ["ນ", "ຟ"], ["ມ", "ຣ"], "ລ", "ວ", ["ສ", "ຫ"], ["ອ", "ະ"], ["າ", "ຳ"], "ຽ", ["ເ", "ໄ"], ["ໜ", "ໟ"], "ༀ", ["ཀ", "ཇ"], ["ཉ", "ཬ"], ["ྈ", "ྌ"], ["က", "ဪ"], "ဿ", ["ၐ", "ၕ"], ["ၚ", "ၝ"], "ၡ", ["ၥ", "ၦ"], ["ၮ", "ၰ"], ["ၵ", "ႁ"], "ႎ", ["ა", "ჺ"], ["ჽ", "ቈ"], ["ቊ", "ቍ"], ["ቐ", "ቖ"], "ቘ", ["ቚ", "ቝ"], ["በ", "ኈ"], ["ኊ", "ኍ"], ["ነ", "ኰ"], ["ኲ", "ኵ"], ["ኸ", "ኾ"], "ዀ", ["ዂ", "ዅ"], ["ወ", "ዖ"], ["ዘ", "ጐ"], ["ጒ", "ጕ"], ["ጘ", "ፚ"], ["ᎀ", "ᎏ"], ["Ꭰ", "Ᏼ"], ["ᐁ", "ᙬ"], ["ᙯ", "ᙿ"], ["ᚁ", "ᚚ"], ["ᚠ", "ᛪ"], ["ᜀ", "ᜌ"], ["ᜎ", "ᜑ"], ["ᜠ", "ᜱ"], ["ᝀ", "ᝑ"], ["ᝠ", "ᝬ"], ["ᝮ", "ᝰ"], ["ក", "ឳ"], "ៜ", ["ᠠ", "ᡂ"], ["ᡄ", "ᡷ"], ["ᢀ", "ᢨ"], "ᢪ", ["ᢰ", "ᣵ"], ["ᤀ", "ᤜ"], ["ᥐ", "ᥭ"], ["ᥰ", "ᥴ"], ["ᦀ", "ᦫ"], ["ᧁ", "ᧇ"], ["ᨀ", "ᨖ"], ["ᨠ", "ᩔ"], ["ᬅ", "ᬳ"], ["ᭅ", "ᭋ"], ["ᮃ", "ᮠ"], ["ᮮ", "ᮯ"], ["ᮺ", "ᯥ"], ["ᰀ", "ᰣ"], ["ᱍ", "ᱏ"], ["ᱚ", "ᱷ"], ["ᳩ", "ᳬ"], ["ᳮ", "ᳱ"], ["ᳵ", "ᳶ"], ["ℵ", "ℸ"], ["ⴰ", "ⵧ"], ["ⶀ", "ⶖ"], ["ⶠ", "ⶦ"], ["ⶨ", "ⶮ"], ["ⶰ", "ⶶ"], ["ⶸ", "ⶾ"], ["ⷀ", "ⷆ"], ["ⷈ", "ⷎ"], ["ⷐ", "ⷖ"], ["ⷘ", "ⷞ"], "〆", "〼", ["ぁ", "ゖ"], "ゟ", ["ァ", "ヺ"], "ヿ", ["ㄅ", "ㄭ"], ["ㄱ", "ㆎ"], ["ㆠ", "ㆺ"], ["ㇰ", "ㇿ"], ["㐀", "䶵"], ["一", "鿌"], ["ꀀ", "ꀔ"], ["ꀖ", "ꒌ"], ["ꓐ", "ꓷ"], ["ꔀ", "ꘋ"], ["ꘐ", "ꘟ"], ["ꘪ", "ꘫ"], "ꙮ", ["ꚠ", "ꛥ"], ["ꟻ", "ꠁ"], ["ꠃ", "ꠅ"], ["ꠇ", "ꠊ"], ["ꠌ", "ꠢ"], ["ꡀ", "ꡳ"], ["ꢂ", "ꢳ"], ["ꣲ", "ꣷ"], "ꣻ", ["ꤊ", "ꤥ"], ["ꤰ", "ꥆ"], ["ꥠ", "ꥼ"], ["ꦄ", "ꦲ"], ["ꨀ", "ꨨ"], ["ꩀ", "ꩂ"], ["ꩄ", "ꩋ"], ["ꩠ", "ꩯ"], ["ꩱ", "ꩶ"], "ꩺ", ["ꪀ", "ꪯ"], "ꪱ", ["ꪵ", "ꪶ"], ["ꪹ", "ꪽ"], "ꫀ", "ꫂ", ["ꫛ", "ꫜ"], ["ꫠ", "ꫪ"], "ꫲ", ["ꬁ", "ꬆ"], ["ꬉ", "ꬎ"], ["ꬑ", "ꬖ"], ["ꬠ", "ꬦ"], ["ꬨ", "ꬮ"], ["ꯀ", "ꯢ"], ["가", "힣"], ["ힰ", "ퟆ"], ["ퟋ", "ퟻ"], ["豈", "舘"], ["並", "龎"], "יִ", ["ײַ", "ﬨ"], ["שׁ", "זּ"], ["טּ", "לּ"], "מּ", ["נּ", "סּ"], ["ףּ", "פּ"], ["צּ", "ﮱ"], ["ﯓ", "ﴽ"], ["ﵐ", "ﶏ"], ["ﶒ", "ﷇ"], ["ﷰ", "ﷻ"], ["ﹰ", "ﹴ"], ["ﹶ", "ﻼ"], ["ヲ", "ッ"], ["ア", "ン"], ["ᅠ", "ᄒ"], ["ᅡ", "ᅦ"], ["ᅧ", "ᅬ"], ["ᅭ", "ᅲ"], ["ᅳ", "ᅵ"]], false, false);
566
+ var peg$e57 = peg$classExpectation(["Dž", "Lj", "Nj", "Dz", ["ᾈ", "ᾏ"], ["ᾘ", "ᾟ"], ["ᾨ", "ᾯ"], "ᾼ", "ῌ", "ῼ"], false, false);
567
+ var peg$e58 = peg$classExpectation([["A", "Z"], ["À", "Ö"], ["Ø", "Þ"], "Ā", "Ă", "Ą", "Ć", "Ĉ", "Ċ", "Č", "Ď", "Đ", "Ē", "Ĕ", "Ė", "Ę", "Ě", "Ĝ", "Ğ", "Ġ", "Ģ", "Ĥ", "Ħ", "Ĩ", "Ī", "Ĭ", "Į", "İ", "IJ", "Ĵ", "Ķ", "Ĺ", "Ļ", "Ľ", "Ŀ", "Ł", "Ń", "Ņ", "Ň", "Ŋ", "Ō", "Ŏ", "Ő", "Œ", "Ŕ", "Ŗ", "Ř", "Ś", "Ŝ", "Ş", "Š", "Ţ", "Ť", "Ŧ", "Ũ", "Ū", "Ŭ", "Ů", "Ű", "Ų", "Ŵ", "Ŷ", ["Ÿ", "Ź"], "Ż", "Ž", ["Ɓ", "Ƃ"], "Ƅ", ["Ɔ", "Ƈ"], ["Ɖ", "Ƌ"], ["Ǝ", "Ƒ"], ["Ɠ", "Ɣ"], ["Ɩ", "Ƙ"], ["Ɯ", "Ɲ"], ["Ɵ", "Ơ"], "Ƣ", "Ƥ", ["Ʀ", "Ƨ"], "Ʃ", "Ƭ", ["Ʈ", "Ư"], ["Ʊ", "Ƴ"], "Ƶ", ["Ʒ", "Ƹ"], "Ƽ", "DŽ", "LJ", "NJ", "Ǎ", "Ǐ", "Ǒ", "Ǔ", "Ǖ", "Ǘ", "Ǚ", "Ǜ", "Ǟ", "Ǡ", "Ǣ", "Ǥ", "Ǧ", "Ǩ", "Ǫ", "Ǭ", "Ǯ", "DZ", "Ǵ", ["Ƕ", "Ǹ"], "Ǻ", "Ǽ", "Ǿ", "Ȁ", "Ȃ", "Ȅ", "Ȇ", "Ȉ", "Ȋ", "Ȍ", "Ȏ", "Ȑ", "Ȓ", "Ȕ", "Ȗ", "Ș", "Ț", "Ȝ", "Ȟ", "Ƞ", "Ȣ", "Ȥ", "Ȧ", "Ȩ", "Ȫ", "Ȭ", "Ȯ", "Ȱ", "Ȳ", ["Ⱥ", "Ȼ"], ["Ƚ", "Ⱦ"], "Ɂ", ["Ƀ", "Ɇ"], "Ɉ", "Ɋ", "Ɍ", "Ɏ", "Ͱ", "Ͳ", "Ͷ", "Ά", ["Έ", "Ί"], "Ό", ["Ύ", "Ώ"], ["Α", "Ρ"], ["Σ", "Ϋ"], "Ϗ", ["ϒ", "ϔ"], "Ϙ", "Ϛ", "Ϝ", "Ϟ", "Ϡ", "Ϣ", "Ϥ", "Ϧ", "Ϩ", "Ϫ", "Ϭ", "Ϯ", "ϴ", "Ϸ", ["Ϲ", "Ϻ"], ["Ͻ", "Я"], "Ѡ", "Ѣ", "Ѥ", "Ѧ", "Ѩ", "Ѫ", "Ѭ", "Ѯ", "Ѱ", "Ѳ", "Ѵ", "Ѷ", "Ѹ", "Ѻ", "Ѽ", "Ѿ", "Ҁ", "Ҋ", "Ҍ", "Ҏ", "Ґ", "Ғ", "Ҕ", "Җ", "Ҙ", "Қ", "Ҝ", "Ҟ", "Ҡ", "Ң", "Ҥ", "Ҧ", "Ҩ", "Ҫ", "Ҭ", "Ү", "Ұ", "Ҳ", "Ҵ", "Ҷ", "Ҹ", "Һ", "Ҽ", "Ҿ", ["Ӏ", "Ӂ"], "Ӄ", "Ӆ", "Ӈ", "Ӊ", "Ӌ", "Ӎ", "Ӑ", "Ӓ", "Ӕ", "Ӗ", "Ә", "Ӛ", "Ӝ", "Ӟ", "Ӡ", "Ӣ", "Ӥ", "Ӧ", "Ө", "Ӫ", "Ӭ", "Ӯ", "Ӱ", "Ӳ", "Ӵ", "Ӷ", "Ӹ", "Ӻ", "Ӽ", "Ӿ", "Ԁ", "Ԃ", "Ԅ", "Ԇ", "Ԉ", "Ԋ", "Ԍ", "Ԏ", "Ԑ", "Ԓ", "Ԕ", "Ԗ", "Ԙ", "Ԛ", "Ԝ", "Ԟ", "Ԡ", "Ԣ", "Ԥ", "Ԧ", ["Ա", "Ֆ"], ["Ⴀ", "Ⴥ"], "Ⴧ", "Ⴭ", "Ḁ", "Ḃ", "Ḅ", "Ḇ", "Ḉ", "Ḋ", "Ḍ", "Ḏ", "Ḑ", "Ḓ", "Ḕ", "Ḗ", "Ḙ", "Ḛ", "Ḝ", "Ḟ", "Ḡ", "Ḣ", "Ḥ", "Ḧ", "Ḩ", "Ḫ", "Ḭ", "Ḯ", "Ḱ", "Ḳ", "Ḵ", "Ḷ", "Ḹ", "Ḻ", "Ḽ", "Ḿ", "Ṁ", "Ṃ", "Ṅ", "Ṇ", "Ṉ", "Ṋ", "Ṍ", "Ṏ", "Ṑ", "Ṓ", "Ṕ", "Ṗ", "Ṙ", "Ṛ", "Ṝ", "Ṟ", "Ṡ", "Ṣ", "Ṥ", "Ṧ", "Ṩ", "Ṫ", "Ṭ", "Ṯ", "Ṱ", "Ṳ", "Ṵ", "Ṷ", "Ṹ", "Ṻ", "Ṽ", "Ṿ", "Ẁ", "Ẃ", "Ẅ", "Ẇ", "Ẉ", "Ẋ", "Ẍ", "Ẏ", "Ẑ", "Ẓ", "Ẕ", "ẞ", "Ạ", "Ả", "Ấ", "Ầ", "Ẩ", "Ẫ", "Ậ", "Ắ", "Ằ", "Ẳ", "Ẵ", "Ặ", "Ẹ", "Ẻ", "Ẽ", "Ế", "Ề", "Ể", "Ễ", "Ệ", "Ỉ", "Ị", "Ọ", "Ỏ", "Ố", "Ồ", "Ổ", "Ỗ", "Ộ", "Ớ", "Ờ", "Ở", "Ỡ", "Ợ", "Ụ", "Ủ", "Ứ", "Ừ", "Ử", "Ữ", "Ự", "Ỳ", "Ỵ", "Ỷ", "Ỹ", "Ỻ", "Ỽ", "Ỿ", ["Ἀ", "Ἇ"], ["Ἐ", "Ἕ"], ["Ἠ", "Ἧ"], ["Ἰ", "Ἷ"], ["Ὀ", "Ὅ"], "Ὑ", "Ὓ", "Ὕ", "Ὗ", ["Ὠ", "Ὧ"], ["Ᾰ", "Ά"], ["Ὲ", "Ή"], ["Ῐ", "Ί"], ["Ῠ", "Ῥ"], ["Ὸ", "Ώ"], "ℂ", "ℇ", ["ℋ", "ℍ"], ["ℐ", "ℒ"], "ℕ", ["ℙ", "ℝ"], "ℤ", "Ω", "ℨ", ["K", "ℭ"], ["ℰ", "ℳ"], ["ℾ", "ℿ"], "ⅅ", "Ↄ", ["Ⰰ", "Ⱞ"], "Ⱡ", ["Ɫ", "Ɽ"], "Ⱨ", "Ⱪ", "Ⱬ", ["Ɑ", "Ɒ"], "Ⱳ", "Ⱶ", ["Ȿ", "Ⲁ"], "Ⲃ", "Ⲅ", "Ⲇ", "Ⲉ", "Ⲋ", "Ⲍ", "Ⲏ", "Ⲑ", "Ⲓ", "Ⲕ", "Ⲗ", "Ⲙ", "Ⲛ", "Ⲝ", "Ⲟ", "Ⲡ", "Ⲣ", "Ⲥ", "Ⲧ", "Ⲩ", "Ⲫ", "Ⲭ", "Ⲯ", "Ⲱ", "Ⲳ", "Ⲵ", "Ⲷ", "Ⲹ", "Ⲻ", "Ⲽ", "Ⲿ", "Ⳁ", "Ⳃ", "Ⳅ", "Ⳇ", "Ⳉ", "Ⳋ", "Ⳍ", "Ⳏ", "Ⳑ", "Ⳓ", "Ⳕ", "Ⳗ", "Ⳙ", "Ⳛ", "Ⳝ", "Ⳟ", "Ⳡ", "Ⳣ", "Ⳬ", "Ⳮ", "Ⳳ", "Ꙁ", "Ꙃ", "Ꙅ", "Ꙇ", "Ꙉ", "Ꙋ", "Ꙍ", "Ꙏ", "Ꙑ", "Ꙓ", "Ꙕ", "Ꙗ", "Ꙙ", "Ꙛ", "Ꙝ", "Ꙟ", "Ꙡ", "Ꙣ", "Ꙥ", "Ꙧ", "Ꙩ", "Ꙫ", "Ꙭ", "Ꚁ", "Ꚃ", "Ꚅ", "Ꚇ", "Ꚉ", "Ꚋ", "Ꚍ", "Ꚏ", "Ꚑ", "Ꚓ", "Ꚕ", "Ꚗ", "Ꜣ", "Ꜥ", "Ꜧ", "Ꜩ", "Ꜫ", "Ꜭ", "Ꜯ", "Ꜳ", "Ꜵ", "Ꜷ", "Ꜹ", "Ꜻ", "Ꜽ", "Ꜿ", "Ꝁ", "Ꝃ", "Ꝅ", "Ꝇ", "Ꝉ", "Ꝋ", "Ꝍ", "Ꝏ", "Ꝑ", "Ꝓ", "Ꝕ", "Ꝗ", "Ꝙ", "Ꝛ", "Ꝝ", "Ꝟ", "Ꝡ", "Ꝣ", "Ꝥ", "Ꝧ", "Ꝩ", "Ꝫ", "Ꝭ", "Ꝯ", "Ꝺ", "Ꝼ", ["Ᵹ", "Ꝿ"], "Ꞁ", "Ꞃ", "Ꞅ", "Ꞇ", "Ꞌ", "Ɥ", "Ꞑ", "Ꞓ", "Ꞡ", "Ꞣ", "Ꞥ", "Ꞧ", "Ꞩ", "Ɦ", ["A", "Z"]], false, false);
568
+ var peg$e59 = peg$classExpectation([["ᛮ", "ᛰ"], ["Ⅰ", "ↂ"], ["ↅ", "ↈ"], "〇", ["〡", "〩"], ["〸", "〺"], ["ꛦ", "ꛯ"]], false, false);
569
+ var peg$e60 = peg$classExpectation([["0", "9"], ["٠", "٩"], ["۰", "۹"], ["߀", "߉"], ["०", "९"], ["০", "৯"], ["੦", "੯"], ["૦", "૯"], ["୦", "୯"], ["௦", "௯"], ["౦", "౯"], ["೦", "೯"], ["൦", "൯"], ["๐", "๙"], ["໐", "໙"], ["༠", "༩"], ["၀", "၉"], ["႐", "႙"], ["០", "៩"], ["᠐", "᠙"], ["᥆", "᥏"], ["᧐", "᧙"], ["᪀", "᪉"], ["᪐", "᪙"], ["᭐", "᭙"], ["᮰", "᮹"], ["᱀", "᱉"], ["᱐", "᱙"], ["꘠", "꘩"], ["꣐", "꣙"], ["꤀", "꤉"], ["꧐", "꧙"], ["꩐", "꩙"], ["꯰", "꯹"], ["0", "9"]], false, false);
570
+ var peg$f0 = function(v) {
571
+ return v;
572
+ };
573
+ var peg$f1 = function(v) {
574
+ return v;
575
+ };
576
+ var peg$f2 = function(v) {
577
+ return v;
578
+ };
579
+ var peg$f3 = function(v) {
580
+ return v;
581
+ };
582
+ var peg$f4 = function(v) {
583
+ return v;
584
+ };
585
+ var peg$f5 = function(v) {
586
+ return v;
587
+ };
588
+ var peg$f6 = function(v) {
589
+ return v;
590
+ };
591
+ var peg$f7 = function(v) {
592
+ return v;
593
+ };
594
+ var peg$f8 = function(v) {
595
+ return v;
596
+ };
597
+ var peg$f9 = function(v) {
598
+ return v;
599
+ };
600
+ var peg$f10 = function(c1, graph, c2) {
601
+ return b.createElement("Dot", {}, [...c1, graph, ...c2]);
602
+ };
603
+ var peg$f11 = function(_strict, _kind, id, children) {
604
+ const strict = !!_strict;
605
+ const kind = _kind.toLowerCase();
606
+ const directed = kind === "digraph";
607
+ for (const edgeop of edgeops) {
608
+ if (directed) {
609
+ if (edgeop.operator !== "->") {
610
+ error(`In digraph, it's necessary to describe with "->" operator to create edge.`, edgeop.location);
611
+ }
612
+ } else {
613
+ if (edgeop.operator !== "--") {
614
+ error(`In graph, it's necessary to describe with "--" operator to create edge.`, edgeop.location);
615
+ }
616
+ }
617
+ }
618
+ return b.createElement(
619
+ // @ts-ignore
620
+ "Graph",
621
+ // @ts-ignore
622
+ id !== null ? {
623
+ // @ts-ignore
624
+ id,
625
+ // @ts-ignore
626
+ directed,
627
+ // @ts-ignore
628
+ strict
629
+ } : {
630
+ // @ts-ignore
631
+ directed,
632
+ // @ts-ignore
633
+ strict
634
+ },
635
+ // @ts-ignore
636
+ children
637
+ );
638
+ };
639
+ var peg$f12 = function(keyValue) {
640
+ return b.createElement(
641
+ // @ts-ignore
642
+ "Attribute",
643
+ {
644
+ // @ts-ignore
645
+ ...keyValue
646
+ },
647
+ []
648
+ );
649
+ };
650
+ var peg$f13 = function(_kind, children) {
651
+ return b.createElement(
652
+ // @ts-ignore
653
+ "AttributeList",
654
+ {
655
+ // @ts-ignore
656
+ kind: `${_kind.slice(0, 1).toUpperCase()}${_kind.slice(1).toLowerCase()}`
657
+ },
658
+ // @ts-ignore
659
+ children
660
+ );
661
+ };
662
+ var peg$f14 = function(id, rhs, _children) {
663
+ return b.createElement(
664
+ // @ts-ignore
665
+ // @ts-ignore
666
+ "Edge",
667
+ {
668
+ // @ts-ignore
669
+ targets: [id, ...rhs]
670
+ },
671
+ // @ts-ignore
672
+ _children ?? []
673
+ );
674
+ };
675
+ var peg$f15 = function(id, _children) {
676
+ return b.createElement(
677
+ // @ts-ignore
678
+ "Node",
679
+ {
680
+ // @ts-ignore
681
+ id
682
+ },
683
+ // @ts-ignore
684
+ _children ?? []
685
+ );
686
+ };
687
+ var peg$f16 = function(key, value) {
688
+ return { key, value };
689
+ };
690
+ var peg$f17 = function(kv) {
691
+ return b.createElement(
692
+ // @ts-ignore
693
+ "Attribute",
694
+ {
695
+ // @ts-ignore
696
+ ...kv,
697
+ // @ts-ignore
698
+ location: location()
699
+ },
700
+ []
701
+ );
702
+ };
703
+ var peg$f18 = function(list) {
704
+ return list;
705
+ };
706
+ var peg$f19 = function(id, v) {
707
+ return v;
708
+ };
709
+ var peg$f20 = function(id, rest) {
710
+ return b.createElement("NodeRefGroup", {}, [id, ...rest]);
711
+ };
712
+ var peg$f21 = function(operator) {
713
+ return { operator, location: location() };
714
+ };
715
+ var peg$f22 = function(edgeop, id, rest) {
716
+ edgeops.push(edgeop);
717
+ return [id].concat(rest || []);
718
+ };
719
+ var peg$f23 = function(id, port) {
720
+ return b.createElement(
721
+ // @ts-ignore
722
+ "NodeRef",
723
+ {
724
+ // @ts-ignore
725
+ id,
726
+ // @ts-ignore
727
+ ...port
728
+ },
729
+ []
730
+ );
731
+ };
732
+ var peg$f24 = function(port, compass) {
733
+ return compass;
734
+ };
735
+ var peg$f25 = function(port, compass) {
736
+ if (["n", "ne", "e", "se", "s", "sw", "w", "nw"].includes(port)) {
737
+ return { compass: port };
738
+ } else if (compass) {
739
+ return { port, compass };
740
+ }
741
+ return { port };
742
+ };
743
+ var peg$f26 = function(id) {
744
+ return id;
745
+ };
746
+ var peg$f27 = function(id, _children) {
747
+ const children = _children ?? [];
748
+ return b.createElement("Subgraph", id ? { id } : {}, children);
749
+ };
750
+ var peg$f28 = function(value) {
751
+ return { value, quoted: false };
752
+ };
753
+ var peg$f29 = function(value) {
754
+ return { value, quoted: true };
755
+ };
756
+ var peg$f30 = function(v) {
757
+ return b.createElement(
758
+ // @ts-ignore
759
+ "Literal",
760
+ {
761
+ // @ts-ignore
762
+ ...v
763
+ },
764
+ []
765
+ );
766
+ };
767
+ var peg$f31 = function(value) {
768
+ return b.createElement(
769
+ // @ts-ignore
770
+ "Literal",
771
+ {
772
+ // @ts-ignore
773
+ value,
774
+ // @ts-ignore
775
+ quoted: false
776
+ },
777
+ []
778
+ );
779
+ };
780
+ var peg$f32 = function(v) {
781
+ return v;
782
+ };
783
+ var peg$f33 = function(v) {
784
+ return b.createElement(
785
+ // @ts-ignore
786
+ "Comment",
787
+ {
788
+ // @ts-ignore
789
+ kind: "Block",
790
+ // @ts-ignore
791
+ value: dedent(v.join("").replace(/[ \t]*\*/g, ""))
792
+ },
793
+ []
794
+ );
795
+ };
796
+ var peg$f34 = function(lines) {
797
+ return b.createElement(
798
+ // @ts-ignore
799
+ "Comment",
800
+ {
801
+ // @ts-ignore
802
+ kind: "Slash",
803
+ // @ts-ignore
804
+ value: dedent(lines.join("\n"))
805
+ },
806
+ []
807
+ );
808
+ };
809
+ var peg$f35 = function(v) {
810
+ return v;
811
+ };
812
+ var peg$f36 = function(v) {
813
+ return v.join("");
814
+ };
815
+ var peg$f37 = function(lines) {
816
+ return b.createElement(
817
+ // @ts-ignore
818
+ "Comment",
819
+ {
820
+ // @ts-ignore
821
+ kind: "Macro",
822
+ // @ts-ignore
823
+ value: dedent(lines.join("\n"))
824
+ },
825
+ []
826
+ );
827
+ };
828
+ var peg$f38 = function(v) {
829
+ return v;
830
+ };
831
+ var peg$f39 = function(v) {
832
+ return v.join("");
833
+ };
834
+ var peg$f40 = function(first, rest) {
835
+ return first + rest.join("");
836
+ };
837
+ var peg$f41 = function(first, rest) {
838
+ return first + rest;
839
+ };
840
+ var peg$f42 = function(n) {
841
+ return text();
842
+ };
843
+ var peg$f43 = function(v) {
844
+ return b.createElement(
845
+ // @ts-ignore
846
+ "Literal",
847
+ {
848
+ // @ts-ignore
849
+ value: v.slice(1, v.length - 1),
850
+ // @ts-ignore
851
+ quoted: "html"
852
+ },
853
+ []
854
+ );
855
+ };
856
+ var peg$f44 = function(v) {
857
+ return "<" + v.join("") + ">";
858
+ };
859
+ var peg$f45 = function(v) {
860
+ return v;
861
+ };
862
+ var peg$f46 = function(v) {
863
+ return v.join("");
864
+ };
865
+ var peg$f47 = function(chars) {
866
+ return b.createElement(
867
+ // @ts-ignore
868
+ "Literal",
869
+ {
870
+ // @ts-ignore
871
+ value: chars.join(""),
872
+ // @ts-ignore
873
+ quoted: true
874
+ },
875
+ []
876
+ );
877
+ };
878
+ var peg$f48 = function() {
879
+ return text();
880
+ };
881
+ var peg$f49 = function(v) {
882
+ return v[1] === '"' ? '"' : v[0] + v[1];
883
+ };
884
+ var peg$f50 = function() {
885
+ return "";
886
+ };
887
+ var peg$currPos = 0;
888
+ var peg$savedPos = 0;
889
+ var peg$posDetailsCache = [{ line: 1, column: 1 }];
890
+ var peg$maxFailPos = 0;
891
+ var peg$maxFailExpected = [];
892
+ var peg$silentFails = 0;
893
+ var peg$result;
894
+ if ("startRule" in options) {
895
+ if (!(options.startRule in peg$startRuleFunctions)) {
896
+ throw new Error(`Can't start parsing from rule "` + options.startRule + '".');
897
+ }
898
+ peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
899
+ }
900
+ function text() {
901
+ return input.substring(peg$savedPos, peg$currPos);
902
+ }
903
+ function location() {
904
+ return peg$computeLocation(peg$savedPos, peg$currPos);
905
+ }
906
+ function error(message, location2) {
907
+ location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos);
908
+ throw peg$buildSimpleError(message, location2);
909
+ }
910
+ function peg$literalExpectation(text2, ignoreCase) {
911
+ return { type: "literal", text: text2, ignoreCase };
912
+ }
913
+ function peg$classExpectation(parts, inverted, ignoreCase) {
914
+ return { type: "class", parts, inverted, ignoreCase };
915
+ }
916
+ function peg$anyExpectation() {
917
+ return { type: "any" };
918
+ }
919
+ function peg$endExpectation() {
920
+ return { type: "end" };
921
+ }
922
+ function peg$otherExpectation(description) {
923
+ return { type: "other", description };
924
+ }
925
+ function peg$computePosDetails(pos) {
926
+ var details = peg$posDetailsCache[pos];
927
+ var p;
928
+ if (details) {
929
+ return details;
930
+ } else {
931
+ p = pos - 1;
932
+ while (!peg$posDetailsCache[p]) {
933
+ p--;
934
+ }
935
+ details = peg$posDetailsCache[p];
936
+ details = {
937
+ // @ts-ignore
938
+ line: details.line,
939
+ // @ts-ignore
940
+ column: details.column
941
+ };
942
+ while (p < pos) {
943
+ if (input.charCodeAt(p) === 10) {
944
+ details.line++;
945
+ details.column = 1;
946
+ } else {
947
+ details.column++;
948
+ }
949
+ p++;
950
+ }
951
+ peg$posDetailsCache[pos] = details;
952
+ return details;
953
+ }
954
+ }
955
+ function peg$computeLocation(startPos, endPos, offset2) {
956
+ var startPosDetails = peg$computePosDetails(startPos);
957
+ var endPosDetails = peg$computePosDetails(endPos);
958
+ var res = {
959
+ // @ts-ignore
960
+ source: peg$source,
961
+ // @ts-ignore
962
+ start: {
963
+ // @ts-ignore
964
+ offset: startPos,
965
+ // @ts-ignore
966
+ line: startPosDetails.line,
967
+ // @ts-ignore
968
+ column: startPosDetails.column
969
+ },
970
+ // @ts-ignore
971
+ end: {
972
+ // @ts-ignore
973
+ offset: endPos,
974
+ // @ts-ignore
975
+ line: endPosDetails.line,
976
+ // @ts-ignore
977
+ column: endPosDetails.column
978
+ }
979
+ };
980
+ if (offset2 && peg$source && typeof peg$source.offset === "function") {
981
+ res.start = peg$source.offset(res.start);
982
+ res.end = peg$source.offset(res.end);
983
+ }
984
+ return res;
985
+ }
986
+ function peg$fail(expected2) {
987
+ if (peg$currPos < peg$maxFailPos) {
988
+ return;
989
+ }
990
+ if (peg$currPos > peg$maxFailPos) {
991
+ peg$maxFailPos = peg$currPos;
992
+ peg$maxFailExpected = [];
993
+ }
994
+ peg$maxFailExpected.push(expected2);
995
+ }
996
+ function peg$buildSimpleError(message, location2) {
997
+ return new peg$SyntaxError(message, null, null, location2);
998
+ }
999
+ function peg$buildStructuredError(expected2, found, location2) {
1000
+ return new peg$SyntaxError(
1001
+ // @ts-ignore
1002
+ peg$SyntaxError.buildMessage(expected2, found),
1003
+ // @ts-ignore
1004
+ expected2,
1005
+ // @ts-ignore
1006
+ found,
1007
+ // @ts-ignore
1008
+ location2
1009
+ );
1010
+ }
1011
+ function peg$parseDot() {
1012
+ var s0, s2;
1013
+ s0 = peg$currPos;
1014
+ peg$parse__();
1015
+ s2 = peg$parse_dot();
1016
+ if (s2 !== peg$FAILED) {
1017
+ peg$parse__();
1018
+ peg$savedPos = s0;
1019
+ s0 = peg$f0(s2);
1020
+ } else {
1021
+ peg$currPos = s0;
1022
+ s0 = peg$FAILED;
1023
+ }
1024
+ return s0;
1025
+ }
1026
+ function peg$parseGraph() {
1027
+ var s0, s2;
1028
+ s0 = peg$currPos;
1029
+ peg$parse__();
1030
+ s2 = peg$parse_graph();
1031
+ if (s2 !== peg$FAILED) {
1032
+ peg$parse__();
1033
+ peg$savedPos = s0;
1034
+ s0 = peg$f1(s2);
1035
+ } else {
1036
+ peg$currPos = s0;
1037
+ s0 = peg$FAILED;
1038
+ }
1039
+ return s0;
1040
+ }
1041
+ function peg$parseNode() {
1042
+ var s0, s2;
1043
+ s0 = peg$currPos;
1044
+ peg$parse__();
1045
+ s2 = peg$parse_node();
1046
+ if (s2 !== peg$FAILED) {
1047
+ peg$parse__();
1048
+ peg$savedPos = s0;
1049
+ s0 = peg$f2(s2);
1050
+ } else {
1051
+ peg$currPos = s0;
1052
+ s0 = peg$FAILED;
1053
+ }
1054
+ return s0;
1055
+ }
1056
+ function peg$parseAttributeList() {
1057
+ var s0, s2;
1058
+ s0 = peg$currPos;
1059
+ peg$parse__();
1060
+ s2 = peg$parse_attributes();
1061
+ if (s2 !== peg$FAILED) {
1062
+ peg$parse__();
1063
+ peg$savedPos = s0;
1064
+ s0 = peg$f3(s2);
1065
+ } else {
1066
+ peg$currPos = s0;
1067
+ s0 = peg$FAILED;
1068
+ }
1069
+ return s0;
1070
+ }
1071
+ function peg$parseAttribute() {
1072
+ var s0, s2;
1073
+ s0 = peg$currPos;
1074
+ peg$parse__();
1075
+ s2 = peg$parse_attribute();
1076
+ if (s2 !== peg$FAILED) {
1077
+ peg$parse__();
1078
+ peg$savedPos = s0;
1079
+ s0 = peg$f4(s2);
1080
+ } else {
1081
+ peg$currPos = s0;
1082
+ s0 = peg$FAILED;
1083
+ }
1084
+ return s0;
1085
+ }
1086
+ function peg$parseEdge() {
1087
+ var s0, s2;
1088
+ s0 = peg$currPos;
1089
+ peg$parse__();
1090
+ s2 = peg$parse_edge();
1091
+ if (s2 !== peg$FAILED) {
1092
+ peg$parse__();
1093
+ peg$savedPos = s0;
1094
+ s0 = peg$f5(s2);
1095
+ } else {
1096
+ peg$currPos = s0;
1097
+ s0 = peg$FAILED;
1098
+ }
1099
+ return s0;
1100
+ }
1101
+ function peg$parseSubgraph() {
1102
+ var s0, s2;
1103
+ s0 = peg$currPos;
1104
+ peg$parse__();
1105
+ s2 = peg$parse_subgraph();
1106
+ if (s2 !== peg$FAILED) {
1107
+ peg$parse__();
1108
+ peg$savedPos = s0;
1109
+ s0 = peg$f6(s2);
1110
+ } else {
1111
+ peg$currPos = s0;
1112
+ s0 = peg$FAILED;
1113
+ }
1114
+ return s0;
1115
+ }
1116
+ function peg$parseNodeRef() {
1117
+ var s0, s2;
1118
+ s0 = peg$currPos;
1119
+ peg$parse__();
1120
+ s2 = peg$parse_node_ref();
1121
+ if (s2 !== peg$FAILED) {
1122
+ peg$parse__();
1123
+ peg$savedPos = s0;
1124
+ s0 = peg$f7(s2);
1125
+ } else {
1126
+ peg$currPos = s0;
1127
+ s0 = peg$FAILED;
1128
+ }
1129
+ return s0;
1130
+ }
1131
+ function peg$parseAttibutesItem() {
1132
+ var s0, s2;
1133
+ s0 = peg$currPos;
1134
+ peg$parse__();
1135
+ s2 = peg$parse_attibutes_item();
1136
+ if (s2 !== peg$FAILED) {
1137
+ peg$parse__();
1138
+ peg$savedPos = s0;
1139
+ s0 = peg$f8(s2);
1140
+ } else {
1141
+ peg$currPos = s0;
1142
+ s0 = peg$FAILED;
1143
+ }
1144
+ return s0;
1145
+ }
1146
+ function peg$parseComment() {
1147
+ var s0, s2;
1148
+ s0 = peg$currPos;
1149
+ peg$parse__();
1150
+ s2 = peg$parse_comment();
1151
+ if (s2 !== peg$FAILED) {
1152
+ peg$parse__();
1153
+ peg$savedPos = s0;
1154
+ s0 = peg$f9(s2);
1155
+ } else {
1156
+ peg$currPos = s0;
1157
+ s0 = peg$FAILED;
1158
+ }
1159
+ return s0;
1160
+ }
1161
+ function peg$parseClusterStatements() {
1162
+ var s0, s1;
1163
+ s0 = [];
1164
+ s1 = peg$parseAttribute();
1165
+ if (s1 === peg$FAILED) {
1166
+ s1 = peg$parseAttributeList();
1167
+ if (s1 === peg$FAILED) {
1168
+ s1 = peg$parseEdge();
1169
+ if (s1 === peg$FAILED) {
1170
+ s1 = peg$parseSubgraph();
1171
+ if (s1 === peg$FAILED) {
1172
+ s1 = peg$parseNode();
1173
+ if (s1 === peg$FAILED) {
1174
+ s1 = peg$parseComment();
1175
+ }
1176
+ }
1177
+ }
1178
+ }
1179
+ }
1180
+ while (s1 !== peg$FAILED) {
1181
+ s0.push(s1);
1182
+ s1 = peg$parseAttribute();
1183
+ if (s1 === peg$FAILED) {
1184
+ s1 = peg$parseAttributeList();
1185
+ if (s1 === peg$FAILED) {
1186
+ s1 = peg$parseEdge();
1187
+ if (s1 === peg$FAILED) {
1188
+ s1 = peg$parseSubgraph();
1189
+ if (s1 === peg$FAILED) {
1190
+ s1 = peg$parseNode();
1191
+ if (s1 === peg$FAILED) {
1192
+ s1 = peg$parseComment();
1193
+ }
1194
+ }
1195
+ }
1196
+ }
1197
+ }
1198
+ }
1199
+ return s0;
1200
+ }
1201
+ function peg$parse_dot() {
1202
+ var s0, s1, s2, s3, s4;
1203
+ s0 = peg$currPos;
1204
+ s1 = [];
1205
+ s2 = peg$parseComment();
1206
+ while (s2 !== peg$FAILED) {
1207
+ s1.push(s2);
1208
+ s2 = peg$parseComment();
1209
+ }
1210
+ s2 = peg$parseGraph();
1211
+ if (s2 !== peg$FAILED) {
1212
+ s3 = [];
1213
+ s4 = peg$parseComment();
1214
+ while (s4 !== peg$FAILED) {
1215
+ s3.push(s4);
1216
+ s4 = peg$parseComment();
1217
+ }
1218
+ peg$savedPos = s0;
1219
+ s0 = peg$f10(s1, s2, s3);
1220
+ } else {
1221
+ peg$currPos = s0;
1222
+ s0 = peg$FAILED;
1223
+ }
1224
+ return s0;
1225
+ }
1226
+ function peg$parse_graph() {
1227
+ var s0, s1, s3, s5, s7, s8, s10;
1228
+ s0 = peg$currPos;
1229
+ if (input.substr(peg$currPos, 6).toLowerCase() === peg$c0) {
1230
+ s1 = input.substr(peg$currPos, 6);
1231
+ peg$currPos += 6;
1232
+ } else {
1233
+ s1 = peg$FAILED;
1234
+ if (peg$silentFails === 0) {
1235
+ peg$fail(peg$e0);
1236
+ }
1237
+ }
1238
+ if (s1 === peg$FAILED) {
1239
+ s1 = null;
1240
+ }
1241
+ peg$parse_();
1242
+ if (input.substr(peg$currPos, 5).toLowerCase() === peg$c1) {
1243
+ s3 = input.substr(peg$currPos, 5);
1244
+ peg$currPos += 5;
1245
+ } else {
1246
+ s3 = peg$FAILED;
1247
+ if (peg$silentFails === 0) {
1248
+ peg$fail(peg$e1);
1249
+ }
1250
+ }
1251
+ if (s3 === peg$FAILED) {
1252
+ if (input.substr(peg$currPos, 7).toLowerCase() === peg$c2) {
1253
+ s3 = input.substr(peg$currPos, 7);
1254
+ peg$currPos += 7;
1255
+ } else {
1256
+ s3 = peg$FAILED;
1257
+ if (peg$silentFails === 0) {
1258
+ peg$fail(peg$e2);
1259
+ }
1260
+ }
1261
+ }
1262
+ if (s3 !== peg$FAILED) {
1263
+ peg$parse_();
1264
+ s5 = peg$parse_literal();
1265
+ if (s5 === peg$FAILED) {
1266
+ s5 = null;
1267
+ }
1268
+ peg$parse__();
1269
+ if (input.charCodeAt(peg$currPos) === 123) {
1270
+ s7 = peg$c3;
1271
+ peg$currPos++;
1272
+ } else {
1273
+ s7 = peg$FAILED;
1274
+ if (peg$silentFails === 0) {
1275
+ peg$fail(peg$e3);
1276
+ }
1277
+ }
1278
+ if (s7 !== peg$FAILED) {
1279
+ s8 = peg$parseClusterStatements();
1280
+ peg$parse__();
1281
+ if (input.charCodeAt(peg$currPos) === 125) {
1282
+ s10 = peg$c4;
1283
+ peg$currPos++;
1284
+ } else {
1285
+ s10 = peg$FAILED;
1286
+ if (peg$silentFails === 0) {
1287
+ peg$fail(peg$e4);
1288
+ }
1289
+ }
1290
+ if (s10 !== peg$FAILED) {
1291
+ peg$savedPos = s0;
1292
+ s0 = peg$f11(s1, s3, s5, s8);
1293
+ } else {
1294
+ peg$currPos = s0;
1295
+ s0 = peg$FAILED;
1296
+ }
1297
+ } else {
1298
+ peg$currPos = s0;
1299
+ s0 = peg$FAILED;
1300
+ }
1301
+ } else {
1302
+ peg$currPos = s0;
1303
+ s0 = peg$FAILED;
1304
+ }
1305
+ return s0;
1306
+ }
1307
+ function peg$parse_attribute() {
1308
+ var s0, s1;
1309
+ s0 = peg$currPos;
1310
+ s1 = peg$parse_key_value();
1311
+ if (s1 !== peg$FAILED) {
1312
+ peg$parse_();
1313
+ if (input.charCodeAt(peg$currPos) === 59) {
1314
+ peg$currPos++;
1315
+ } else {
1316
+ if (peg$silentFails === 0) {
1317
+ peg$fail(peg$e5);
1318
+ }
1319
+ }
1320
+ peg$savedPos = s0;
1321
+ s0 = peg$f12(s1);
1322
+ } else {
1323
+ peg$currPos = s0;
1324
+ s0 = peg$FAILED;
1325
+ }
1326
+ return s0;
1327
+ }
1328
+ function peg$parse_attributes() {
1329
+ var s0, s1, s2;
1330
+ s0 = peg$currPos;
1331
+ if (input.substr(peg$currPos, 5).toLowerCase() === peg$c1) {
1332
+ s1 = input.substr(peg$currPos, 5);
1333
+ peg$currPos += 5;
1334
+ } else {
1335
+ s1 = peg$FAILED;
1336
+ if (peg$silentFails === 0) {
1337
+ peg$fail(peg$e1);
1338
+ }
1339
+ }
1340
+ if (s1 === peg$FAILED) {
1341
+ if (input.substr(peg$currPos, 4).toLowerCase() === peg$c6) {
1342
+ s1 = input.substr(peg$currPos, 4);
1343
+ peg$currPos += 4;
1344
+ } else {
1345
+ s1 = peg$FAILED;
1346
+ if (peg$silentFails === 0) {
1347
+ peg$fail(peg$e6);
1348
+ }
1349
+ }
1350
+ if (s1 === peg$FAILED) {
1351
+ if (input.substr(peg$currPos, 4).toLowerCase() === peg$c7) {
1352
+ s1 = input.substr(peg$currPos, 4);
1353
+ peg$currPos += 4;
1354
+ } else {
1355
+ s1 = peg$FAILED;
1356
+ if (peg$silentFails === 0) {
1357
+ peg$fail(peg$e7);
1358
+ }
1359
+ }
1360
+ }
1361
+ }
1362
+ if (s1 !== peg$FAILED) {
1363
+ s2 = peg$parse_attribute_list();
1364
+ if (s2 !== peg$FAILED) {
1365
+ peg$parse_();
1366
+ if (input.charCodeAt(peg$currPos) === 59) {
1367
+ peg$currPos++;
1368
+ } else {
1369
+ if (peg$silentFails === 0) {
1370
+ peg$fail(peg$e5);
1371
+ }
1372
+ }
1373
+ peg$savedPos = s0;
1374
+ s0 = peg$f13(s1, s2);
1375
+ } else {
1376
+ peg$currPos = s0;
1377
+ s0 = peg$FAILED;
1378
+ }
1379
+ } else {
1380
+ peg$currPos = s0;
1381
+ s0 = peg$FAILED;
1382
+ }
1383
+ return s0;
1384
+ }
1385
+ function peg$parse_edge() {
1386
+ var s0, s1, s2, s3;
1387
+ s0 = peg$currPos;
1388
+ s1 = peg$parse_edge_target();
1389
+ if (s1 !== peg$FAILED) {
1390
+ s2 = peg$parse_edge_rhs();
1391
+ if (s2 !== peg$FAILED) {
1392
+ s3 = peg$parse_attribute_list();
1393
+ if (s3 === peg$FAILED) {
1394
+ s3 = null;
1395
+ }
1396
+ peg$parse_();
1397
+ if (input.charCodeAt(peg$currPos) === 59) {
1398
+ peg$currPos++;
1399
+ } else {
1400
+ if (peg$silentFails === 0) {
1401
+ peg$fail(peg$e5);
1402
+ }
1403
+ }
1404
+ peg$savedPos = s0;
1405
+ s0 = peg$f14(s1, s2, s3);
1406
+ } else {
1407
+ peg$currPos = s0;
1408
+ s0 = peg$FAILED;
1409
+ }
1410
+ } else {
1411
+ peg$currPos = s0;
1412
+ s0 = peg$FAILED;
1413
+ }
1414
+ return s0;
1415
+ }
1416
+ function peg$parse_node() {
1417
+ var s0, s1, s3;
1418
+ s0 = peg$currPos;
1419
+ s1 = peg$parse_literal();
1420
+ if (s1 !== peg$FAILED) {
1421
+ peg$parse_();
1422
+ s3 = peg$parse_attribute_list();
1423
+ if (s3 === peg$FAILED) {
1424
+ s3 = null;
1425
+ }
1426
+ peg$parse_();
1427
+ if (input.charCodeAt(peg$currPos) === 59) {
1428
+ peg$currPos++;
1429
+ } else {
1430
+ if (peg$silentFails === 0) {
1431
+ peg$fail(peg$e5);
1432
+ }
1433
+ }
1434
+ peg$savedPos = s0;
1435
+ s0 = peg$f15(s1, s3);
1436
+ } else {
1437
+ peg$currPos = s0;
1438
+ s0 = peg$FAILED;
1439
+ }
1440
+ return s0;
1441
+ }
1442
+ function peg$parse_key_value() {
1443
+ var s0, s1, s3, s5;
1444
+ s0 = peg$currPos;
1445
+ s1 = peg$parse_literal();
1446
+ if (s1 !== peg$FAILED) {
1447
+ peg$parse_();
1448
+ if (input.charCodeAt(peg$currPos) === 61) {
1449
+ s3 = peg$c8;
1450
+ peg$currPos++;
1451
+ } else {
1452
+ s3 = peg$FAILED;
1453
+ if (peg$silentFails === 0) {
1454
+ peg$fail(peg$e8);
1455
+ }
1456
+ }
1457
+ if (s3 !== peg$FAILED) {
1458
+ peg$parse_();
1459
+ s5 = peg$parse_literal();
1460
+ if (s5 !== peg$FAILED) {
1461
+ peg$savedPos = s0;
1462
+ s0 = peg$f16(s1, s5);
1463
+ } else {
1464
+ peg$currPos = s0;
1465
+ s0 = peg$FAILED;
1466
+ }
1467
+ } else {
1468
+ peg$currPos = s0;
1469
+ s0 = peg$FAILED;
1470
+ }
1471
+ } else {
1472
+ peg$currPos = s0;
1473
+ s0 = peg$FAILED;
1474
+ }
1475
+ return s0;
1476
+ }
1477
+ function peg$parse_attibutes_item() {
1478
+ var s0, s1, s3;
1479
+ s0 = peg$currPos;
1480
+ s1 = peg$parse_key_value();
1481
+ if (s1 !== peg$FAILED) {
1482
+ peg$parse_();
1483
+ if (input.charCodeAt(peg$currPos) === 44) {
1484
+ s3 = peg$c9;
1485
+ peg$currPos++;
1486
+ } else {
1487
+ s3 = peg$FAILED;
1488
+ if (peg$silentFails === 0) {
1489
+ peg$fail(peg$e9);
1490
+ }
1491
+ }
1492
+ if (s3 === peg$FAILED) {
1493
+ if (input.charCodeAt(peg$currPos) === 59) {
1494
+ s3 = peg$c5;
1495
+ peg$currPos++;
1496
+ } else {
1497
+ s3 = peg$FAILED;
1498
+ if (peg$silentFails === 0) {
1499
+ peg$fail(peg$e5);
1500
+ }
1501
+ }
1502
+ }
1503
+ if (s3 === peg$FAILED) {
1504
+ s3 = null;
1505
+ }
1506
+ peg$savedPos = s0;
1507
+ s0 = peg$f17(s1);
1508
+ } else {
1509
+ peg$currPos = s0;
1510
+ s0 = peg$FAILED;
1511
+ }
1512
+ return s0;
1513
+ }
1514
+ function peg$parse_attribute_list() {
1515
+ var s0, s2, s3, s4, s5;
1516
+ s0 = peg$currPos;
1517
+ peg$parse_();
1518
+ if (input.charCodeAt(peg$currPos) === 91) {
1519
+ s2 = peg$c10;
1520
+ peg$currPos++;
1521
+ } else {
1522
+ s2 = peg$FAILED;
1523
+ if (peg$silentFails === 0) {
1524
+ peg$fail(peg$e10);
1525
+ }
1526
+ }
1527
+ if (s2 !== peg$FAILED) {
1528
+ s3 = [];
1529
+ s4 = peg$parseAttibutesItem();
1530
+ if (s4 === peg$FAILED) {
1531
+ s4 = peg$parseComment();
1532
+ }
1533
+ while (s4 !== peg$FAILED) {
1534
+ s3.push(s4);
1535
+ s4 = peg$parseAttibutesItem();
1536
+ if (s4 === peg$FAILED) {
1537
+ s4 = peg$parseComment();
1538
+ }
1539
+ }
1540
+ s4 = peg$parse__();
1541
+ if (input.charCodeAt(peg$currPos) === 93) {
1542
+ s5 = peg$c11;
1543
+ peg$currPos++;
1544
+ } else {
1545
+ s5 = peg$FAILED;
1546
+ if (peg$silentFails === 0) {
1547
+ peg$fail(peg$e11);
1548
+ }
1549
+ }
1550
+ if (s5 !== peg$FAILED) {
1551
+ peg$savedPos = s0;
1552
+ s0 = peg$f18(s3);
1553
+ } else {
1554
+ peg$currPos = s0;
1555
+ s0 = peg$FAILED;
1556
+ }
1557
+ } else {
1558
+ peg$currPos = s0;
1559
+ s0 = peg$FAILED;
1560
+ }
1561
+ return s0;
1562
+ }
1563
+ function peg$parse_edge_target_group() {
1564
+ var s0, s1, s2, s3, s4, s5, s6;
1565
+ s0 = peg$currPos;
1566
+ if (input.charCodeAt(peg$currPos) === 123) {
1567
+ s1 = peg$c3;
1568
+ peg$currPos++;
1569
+ } else {
1570
+ s1 = peg$FAILED;
1571
+ if (peg$silentFails === 0) {
1572
+ peg$fail(peg$e3);
1573
+ }
1574
+ }
1575
+ if (s1 !== peg$FAILED) {
1576
+ s2 = peg$parseNodeRef();
1577
+ if (s2 !== peg$FAILED) {
1578
+ s3 = [];
1579
+ s4 = peg$currPos;
1580
+ if (input.charCodeAt(peg$currPos) === 44) {
1581
+ s5 = peg$c9;
1582
+ peg$currPos++;
1583
+ } else {
1584
+ s5 = peg$FAILED;
1585
+ if (peg$silentFails === 0) {
1586
+ peg$fail(peg$e9);
1587
+ }
1588
+ }
1589
+ if (s5 === peg$FAILED) {
1590
+ if (input.charCodeAt(peg$currPos) === 59) {
1591
+ s5 = peg$c5;
1592
+ peg$currPos++;
1593
+ } else {
1594
+ s5 = peg$FAILED;
1595
+ if (peg$silentFails === 0) {
1596
+ peg$fail(peg$e5);
1597
+ }
1598
+ }
1599
+ }
1600
+ if (s5 === peg$FAILED) {
1601
+ s5 = null;
1602
+ }
1603
+ s6 = peg$parseNodeRef();
1604
+ if (s6 !== peg$FAILED) {
1605
+ peg$savedPos = s4;
1606
+ s4 = peg$f19(s2, s6);
1607
+ } else {
1608
+ peg$currPos = s4;
1609
+ s4 = peg$FAILED;
1610
+ }
1611
+ while (s4 !== peg$FAILED) {
1612
+ s3.push(s4);
1613
+ s4 = peg$currPos;
1614
+ if (input.charCodeAt(peg$currPos) === 44) {
1615
+ s5 = peg$c9;
1616
+ peg$currPos++;
1617
+ } else {
1618
+ s5 = peg$FAILED;
1619
+ if (peg$silentFails === 0) {
1620
+ peg$fail(peg$e9);
1621
+ }
1622
+ }
1623
+ if (s5 === peg$FAILED) {
1624
+ if (input.charCodeAt(peg$currPos) === 59) {
1625
+ s5 = peg$c5;
1626
+ peg$currPos++;
1627
+ } else {
1628
+ s5 = peg$FAILED;
1629
+ if (peg$silentFails === 0) {
1630
+ peg$fail(peg$e5);
1631
+ }
1632
+ }
1633
+ }
1634
+ if (s5 === peg$FAILED) {
1635
+ s5 = null;
1636
+ }
1637
+ s6 = peg$parseNodeRef();
1638
+ if (s6 !== peg$FAILED) {
1639
+ peg$savedPos = s4;
1640
+ s4 = peg$f19(s2, s6);
1641
+ } else {
1642
+ peg$currPos = s4;
1643
+ s4 = peg$FAILED;
1644
+ }
1645
+ }
1646
+ if (input.charCodeAt(peg$currPos) === 44) {
1647
+ s4 = peg$c9;
1648
+ peg$currPos++;
1649
+ } else {
1650
+ s4 = peg$FAILED;
1651
+ if (peg$silentFails === 0) {
1652
+ peg$fail(peg$e9);
1653
+ }
1654
+ }
1655
+ if (s4 === peg$FAILED) {
1656
+ if (input.charCodeAt(peg$currPos) === 59) {
1657
+ s4 = peg$c5;
1658
+ peg$currPos++;
1659
+ } else {
1660
+ s4 = peg$FAILED;
1661
+ if (peg$silentFails === 0) {
1662
+ peg$fail(peg$e5);
1663
+ }
1664
+ }
1665
+ }
1666
+ if (s4 === peg$FAILED) {
1667
+ s4 = null;
1668
+ }
1669
+ s5 = peg$parse__();
1670
+ if (input.charCodeAt(peg$currPos) === 125) {
1671
+ s6 = peg$c4;
1672
+ peg$currPos++;
1673
+ } else {
1674
+ s6 = peg$FAILED;
1675
+ if (peg$silentFails === 0) {
1676
+ peg$fail(peg$e4);
1677
+ }
1678
+ }
1679
+ if (s6 !== peg$FAILED) {
1680
+ peg$savedPos = s0;
1681
+ s0 = peg$f20(s2, s3);
1682
+ } else {
1683
+ peg$currPos = s0;
1684
+ s0 = peg$FAILED;
1685
+ }
1686
+ } else {
1687
+ peg$currPos = s0;
1688
+ s0 = peg$FAILED;
1689
+ }
1690
+ } else {
1691
+ peg$currPos = s0;
1692
+ s0 = peg$FAILED;
1693
+ }
1694
+ return s0;
1695
+ }
1696
+ function peg$parse_edge_target() {
1697
+ var s0;
1698
+ s0 = peg$parse_edge_target_group();
1699
+ if (s0 === peg$FAILED) {
1700
+ s0 = peg$parseNodeRef();
1701
+ }
1702
+ return s0;
1703
+ }
1704
+ function peg$parse_edge_operator() {
1705
+ var s0, s1;
1706
+ s0 = peg$currPos;
1707
+ if (input.substr(peg$currPos, 2) === peg$c12) {
1708
+ s1 = peg$c12;
1709
+ peg$currPos += 2;
1710
+ } else {
1711
+ s1 = peg$FAILED;
1712
+ if (peg$silentFails === 0) {
1713
+ peg$fail(peg$e12);
1714
+ }
1715
+ }
1716
+ if (s1 === peg$FAILED) {
1717
+ if (input.substr(peg$currPos, 2) === peg$c13) {
1718
+ s1 = peg$c13;
1719
+ peg$currPos += 2;
1720
+ } else {
1721
+ s1 = peg$FAILED;
1722
+ if (peg$silentFails === 0) {
1723
+ peg$fail(peg$e13);
1724
+ }
1725
+ }
1726
+ }
1727
+ if (s1 !== peg$FAILED) {
1728
+ peg$savedPos = s0;
1729
+ s1 = peg$f21(s1);
1730
+ }
1731
+ s0 = s1;
1732
+ return s0;
1733
+ }
1734
+ function peg$parse_edge_rhs() {
1735
+ var s0, s2, s4, s6;
1736
+ s0 = peg$currPos;
1737
+ peg$parse_();
1738
+ s2 = peg$parse_edge_operator();
1739
+ if (s2 !== peg$FAILED) {
1740
+ peg$parse_();
1741
+ s4 = peg$parse_edge_target();
1742
+ if (s4 !== peg$FAILED) {
1743
+ peg$parse_();
1744
+ s6 = peg$parse_edge_rhs();
1745
+ if (s6 === peg$FAILED) {
1746
+ s6 = null;
1747
+ }
1748
+ peg$savedPos = s0;
1749
+ s0 = peg$f22(s2, s4, s6);
1750
+ } else {
1751
+ peg$currPos = s0;
1752
+ s0 = peg$FAILED;
1753
+ }
1754
+ } else {
1755
+ peg$currPos = s0;
1756
+ s0 = peg$FAILED;
1757
+ }
1758
+ return s0;
1759
+ }
1760
+ function peg$parse_node_ref() {
1761
+ var s0, s1, s2;
1762
+ s0 = peg$currPos;
1763
+ s1 = peg$parse_literal();
1764
+ if (s1 !== peg$FAILED) {
1765
+ s2 = peg$parse_port();
1766
+ if (s2 === peg$FAILED) {
1767
+ s2 = null;
1768
+ }
1769
+ peg$savedPos = s0;
1770
+ s0 = peg$f23(s1, s2);
1771
+ } else {
1772
+ peg$currPos = s0;
1773
+ s0 = peg$FAILED;
1774
+ }
1775
+ return s0;
1776
+ }
1777
+ function peg$parse_port() {
1778
+ var s0, s1, s2, s3, s4, s5;
1779
+ peg$silentFails++;
1780
+ s0 = peg$currPos;
1781
+ if (input.charCodeAt(peg$currPos) === 58) {
1782
+ s1 = peg$c14;
1783
+ peg$currPos++;
1784
+ } else {
1785
+ s1 = peg$FAILED;
1786
+ if (peg$silentFails === 0) {
1787
+ peg$fail(peg$e15);
1788
+ }
1789
+ }
1790
+ if (s1 !== peg$FAILED) {
1791
+ s2 = peg$parse_literal();
1792
+ if (s2 !== peg$FAILED) {
1793
+ s3 = peg$currPos;
1794
+ if (input.charCodeAt(peg$currPos) === 58) {
1795
+ s4 = peg$c14;
1796
+ peg$currPos++;
1797
+ } else {
1798
+ s4 = peg$FAILED;
1799
+ if (peg$silentFails === 0) {
1800
+ peg$fail(peg$e15);
1801
+ }
1802
+ }
1803
+ if (s4 !== peg$FAILED) {
1804
+ s5 = peg$parse_compass();
1805
+ if (s5 !== peg$FAILED) {
1806
+ peg$savedPos = s3;
1807
+ s3 = peg$f24(s2, s5);
1808
+ } else {
1809
+ peg$currPos = s3;
1810
+ s3 = peg$FAILED;
1811
+ }
1812
+ } else {
1813
+ peg$currPos = s3;
1814
+ s3 = peg$FAILED;
1815
+ }
1816
+ if (s3 === peg$FAILED) {
1817
+ s3 = null;
1818
+ }
1819
+ peg$savedPos = s0;
1820
+ s0 = peg$f25(s2, s3);
1821
+ } else {
1822
+ peg$currPos = s0;
1823
+ s0 = peg$FAILED;
1824
+ }
1825
+ } else {
1826
+ peg$currPos = s0;
1827
+ s0 = peg$FAILED;
1828
+ }
1829
+ peg$silentFails--;
1830
+ if (s0 === peg$FAILED) {
1831
+ s1 = peg$FAILED;
1832
+ if (peg$silentFails === 0) {
1833
+ peg$fail(peg$e14);
1834
+ }
1835
+ }
1836
+ return s0;
1837
+ }
1838
+ function peg$parse_subgraph_id() {
1839
+ var s0, s1, s3;
1840
+ s0 = peg$currPos;
1841
+ if (input.substr(peg$currPos, 8).toLowerCase() === peg$c15) {
1842
+ s1 = input.substr(peg$currPos, 8);
1843
+ peg$currPos += 8;
1844
+ } else {
1845
+ s1 = peg$FAILED;
1846
+ if (peg$silentFails === 0) {
1847
+ peg$fail(peg$e16);
1848
+ }
1849
+ }
1850
+ if (s1 !== peg$FAILED) {
1851
+ peg$parse_();
1852
+ s3 = peg$parse_literal();
1853
+ if (s3 === peg$FAILED) {
1854
+ s3 = null;
1855
+ }
1856
+ peg$parse_();
1857
+ peg$savedPos = s0;
1858
+ s0 = peg$f26(s3);
1859
+ } else {
1860
+ peg$currPos = s0;
1861
+ s0 = peg$FAILED;
1862
+ }
1863
+ return s0;
1864
+ }
1865
+ function peg$parse_subgraph() {
1866
+ var s0, s1, s2, s3, s5;
1867
+ s0 = peg$currPos;
1868
+ s1 = peg$parse_subgraph_id();
1869
+ if (s1 === peg$FAILED) {
1870
+ s1 = null;
1871
+ }
1872
+ if (input.charCodeAt(peg$currPos) === 123) {
1873
+ s2 = peg$c3;
1874
+ peg$currPos++;
1875
+ } else {
1876
+ s2 = peg$FAILED;
1877
+ if (peg$silentFails === 0) {
1878
+ peg$fail(peg$e3);
1879
+ }
1880
+ }
1881
+ if (s2 !== peg$FAILED) {
1882
+ s3 = peg$parseClusterStatements();
1883
+ if (s3 === peg$FAILED) {
1884
+ s3 = null;
1885
+ }
1886
+ peg$parse__();
1887
+ if (input.charCodeAt(peg$currPos) === 125) {
1888
+ s5 = peg$c4;
1889
+ peg$currPos++;
1890
+ } else {
1891
+ s5 = peg$FAILED;
1892
+ if (peg$silentFails === 0) {
1893
+ peg$fail(peg$e4);
1894
+ }
1895
+ }
1896
+ if (s5 !== peg$FAILED) {
1897
+ peg$savedPos = s0;
1898
+ s0 = peg$f27(s1, s3);
1899
+ } else {
1900
+ peg$currPos = s0;
1901
+ s0 = peg$FAILED;
1902
+ }
1903
+ } else {
1904
+ peg$currPos = s0;
1905
+ s0 = peg$FAILED;
1906
+ }
1907
+ return s0;
1908
+ }
1909
+ function peg$parse_compass_keyword() {
1910
+ var s0;
1911
+ if (input.charCodeAt(peg$currPos) === 110) {
1912
+ s0 = peg$c16;
1913
+ peg$currPos++;
1914
+ } else {
1915
+ s0 = peg$FAILED;
1916
+ if (peg$silentFails === 0) {
1917
+ peg$fail(peg$e17);
1918
+ }
1919
+ }
1920
+ if (s0 === peg$FAILED) {
1921
+ if (input.substr(peg$currPos, 2) === peg$c17) {
1922
+ s0 = peg$c17;
1923
+ peg$currPos += 2;
1924
+ } else {
1925
+ s0 = peg$FAILED;
1926
+ if (peg$silentFails === 0) {
1927
+ peg$fail(peg$e18);
1928
+ }
1929
+ }
1930
+ if (s0 === peg$FAILED) {
1931
+ if (input.charCodeAt(peg$currPos) === 101) {
1932
+ s0 = peg$c18;
1933
+ peg$currPos++;
1934
+ } else {
1935
+ s0 = peg$FAILED;
1936
+ if (peg$silentFails === 0) {
1937
+ peg$fail(peg$e19);
1938
+ }
1939
+ }
1940
+ if (s0 === peg$FAILED) {
1941
+ if (input.substr(peg$currPos, 2) === peg$c19) {
1942
+ s0 = peg$c19;
1943
+ peg$currPos += 2;
1944
+ } else {
1945
+ s0 = peg$FAILED;
1946
+ if (peg$silentFails === 0) {
1947
+ peg$fail(peg$e20);
1948
+ }
1949
+ }
1950
+ if (s0 === peg$FAILED) {
1951
+ if (input.charCodeAt(peg$currPos) === 115) {
1952
+ s0 = peg$c20;
1953
+ peg$currPos++;
1954
+ } else {
1955
+ s0 = peg$FAILED;
1956
+ if (peg$silentFails === 0) {
1957
+ peg$fail(peg$e21);
1958
+ }
1959
+ }
1960
+ if (s0 === peg$FAILED) {
1961
+ if (input.substr(peg$currPos, 2) === peg$c21) {
1962
+ s0 = peg$c21;
1963
+ peg$currPos += 2;
1964
+ } else {
1965
+ s0 = peg$FAILED;
1966
+ if (peg$silentFails === 0) {
1967
+ peg$fail(peg$e22);
1968
+ }
1969
+ }
1970
+ if (s0 === peg$FAILED) {
1971
+ if (input.charCodeAt(peg$currPos) === 119) {
1972
+ s0 = peg$c22;
1973
+ peg$currPos++;
1974
+ } else {
1975
+ s0 = peg$FAILED;
1976
+ if (peg$silentFails === 0) {
1977
+ peg$fail(peg$e23);
1978
+ }
1979
+ }
1980
+ if (s0 === peg$FAILED) {
1981
+ if (input.substr(peg$currPos, 2) === peg$c23) {
1982
+ s0 = peg$c23;
1983
+ peg$currPos += 2;
1984
+ } else {
1985
+ s0 = peg$FAILED;
1986
+ if (peg$silentFails === 0) {
1987
+ peg$fail(peg$e24);
1988
+ }
1989
+ }
1990
+ }
1991
+ }
1992
+ }
1993
+ }
1994
+ }
1995
+ }
1996
+ }
1997
+ return s0;
1998
+ }
1999
+ function peg$parse_compass() {
2000
+ var s0, s1, s2, s3, s4;
2001
+ s0 = peg$currPos;
2002
+ s1 = peg$currPos;
2003
+ s2 = peg$parse_compass_keyword();
2004
+ if (s2 !== peg$FAILED) {
2005
+ peg$savedPos = s1;
2006
+ s2 = peg$f28(s2);
2007
+ }
2008
+ s1 = s2;
2009
+ if (s1 === peg$FAILED) {
2010
+ s1 = peg$currPos;
2011
+ if (input.charCodeAt(peg$currPos) === 34) {
2012
+ s2 = peg$c24;
2013
+ peg$currPos++;
2014
+ } else {
2015
+ s2 = peg$FAILED;
2016
+ if (peg$silentFails === 0) {
2017
+ peg$fail(peg$e25);
2018
+ }
2019
+ }
2020
+ if (s2 !== peg$FAILED) {
2021
+ s3 = peg$parse_compass_keyword();
2022
+ if (s3 !== peg$FAILED) {
2023
+ if (input.charCodeAt(peg$currPos) === 34) {
2024
+ s4 = peg$c24;
2025
+ peg$currPos++;
2026
+ } else {
2027
+ s4 = peg$FAILED;
2028
+ if (peg$silentFails === 0) {
2029
+ peg$fail(peg$e25);
2030
+ }
2031
+ }
2032
+ if (s4 !== peg$FAILED) {
2033
+ peg$savedPos = s1;
2034
+ s1 = peg$f29(s3);
2035
+ } else {
2036
+ peg$currPos = s1;
2037
+ s1 = peg$FAILED;
2038
+ }
2039
+ } else {
2040
+ peg$currPos = s1;
2041
+ s1 = peg$FAILED;
2042
+ }
2043
+ } else {
2044
+ peg$currPos = s1;
2045
+ s1 = peg$FAILED;
2046
+ }
2047
+ }
2048
+ if (s1 !== peg$FAILED) {
2049
+ peg$savedPos = s0;
2050
+ s1 = peg$f30(s1);
2051
+ }
2052
+ s0 = s1;
2053
+ return s0;
2054
+ }
2055
+ function peg$parse_literal() {
2056
+ var s0, s1;
2057
+ s0 = peg$parseQUOTED_STRING();
2058
+ if (s0 === peg$FAILED) {
2059
+ s0 = peg$parseHTML_STRING();
2060
+ if (s0 === peg$FAILED) {
2061
+ s0 = peg$currPos;
2062
+ s1 = peg$parseSTRING();
2063
+ if (s1 === peg$FAILED) {
2064
+ s1 = peg$parseNUMBER_STRING();
2065
+ if (s1 === peg$FAILED) {
2066
+ s1 = peg$parseNUMBER();
2067
+ }
2068
+ }
2069
+ if (s1 !== peg$FAILED) {
2070
+ peg$savedPos = s0;
2071
+ s1 = peg$f31(s1);
2072
+ }
2073
+ s0 = s1;
2074
+ }
2075
+ }
2076
+ return s0;
2077
+ }
2078
+ function peg$parse_comment() {
2079
+ var s0;
2080
+ s0 = peg$parse_block_comment();
2081
+ if (s0 === peg$FAILED) {
2082
+ s0 = peg$parse_slash_comment();
2083
+ if (s0 === peg$FAILED) {
2084
+ s0 = peg$parse_macro_comment();
2085
+ }
2086
+ }
2087
+ return s0;
2088
+ }
2089
+ function peg$parse_block_comment() {
2090
+ var s0, s1, s2, s3, s4, s5;
2091
+ s0 = peg$currPos;
2092
+ if (input.substr(peg$currPos, 2) === peg$c25) {
2093
+ s1 = peg$c25;
2094
+ peg$currPos += 2;
2095
+ } else {
2096
+ s1 = peg$FAILED;
2097
+ if (peg$silentFails === 0) {
2098
+ peg$fail(peg$e26);
2099
+ }
2100
+ }
2101
+ if (s1 !== peg$FAILED) {
2102
+ s2 = [];
2103
+ s3 = peg$currPos;
2104
+ s4 = peg$currPos;
2105
+ peg$silentFails++;
2106
+ if (input.substr(peg$currPos, 2) === peg$c26) {
2107
+ s5 = peg$c26;
2108
+ peg$currPos += 2;
2109
+ } else {
2110
+ s5 = peg$FAILED;
2111
+ if (peg$silentFails === 0) {
2112
+ peg$fail(peg$e27);
2113
+ }
2114
+ }
2115
+ peg$silentFails--;
2116
+ if (s5 === peg$FAILED) {
2117
+ s4 = void 0;
2118
+ } else {
2119
+ peg$currPos = s4;
2120
+ s4 = peg$FAILED;
2121
+ }
2122
+ if (s4 !== peg$FAILED) {
2123
+ if (input.length > peg$currPos) {
2124
+ s5 = input.charAt(peg$currPos);
2125
+ peg$currPos++;
2126
+ } else {
2127
+ s5 = peg$FAILED;
2128
+ if (peg$silentFails === 0) {
2129
+ peg$fail(peg$e28);
2130
+ }
2131
+ }
2132
+ if (s5 !== peg$FAILED) {
2133
+ peg$savedPos = s3;
2134
+ s3 = peg$f32(s5);
2135
+ } else {
2136
+ peg$currPos = s3;
2137
+ s3 = peg$FAILED;
2138
+ }
2139
+ } else {
2140
+ peg$currPos = s3;
2141
+ s3 = peg$FAILED;
2142
+ }
2143
+ while (s3 !== peg$FAILED) {
2144
+ s2.push(s3);
2145
+ s3 = peg$currPos;
2146
+ s4 = peg$currPos;
2147
+ peg$silentFails++;
2148
+ if (input.substr(peg$currPos, 2) === peg$c26) {
2149
+ s5 = peg$c26;
2150
+ peg$currPos += 2;
2151
+ } else {
2152
+ s5 = peg$FAILED;
2153
+ if (peg$silentFails === 0) {
2154
+ peg$fail(peg$e27);
2155
+ }
2156
+ }
2157
+ peg$silentFails--;
2158
+ if (s5 === peg$FAILED) {
2159
+ s4 = void 0;
2160
+ } else {
2161
+ peg$currPos = s4;
2162
+ s4 = peg$FAILED;
2163
+ }
2164
+ if (s4 !== peg$FAILED) {
2165
+ if (input.length > peg$currPos) {
2166
+ s5 = input.charAt(peg$currPos);
2167
+ peg$currPos++;
2168
+ } else {
2169
+ s5 = peg$FAILED;
2170
+ if (peg$silentFails === 0) {
2171
+ peg$fail(peg$e28);
2172
+ }
2173
+ }
2174
+ if (s5 !== peg$FAILED) {
2175
+ peg$savedPos = s3;
2176
+ s3 = peg$f32(s5);
2177
+ } else {
2178
+ peg$currPos = s3;
2179
+ s3 = peg$FAILED;
2180
+ }
2181
+ } else {
2182
+ peg$currPos = s3;
2183
+ s3 = peg$FAILED;
2184
+ }
2185
+ }
2186
+ if (input.substr(peg$currPos, 2) === peg$c26) {
2187
+ s3 = peg$c26;
2188
+ peg$currPos += 2;
2189
+ } else {
2190
+ s3 = peg$FAILED;
2191
+ if (peg$silentFails === 0) {
2192
+ peg$fail(peg$e27);
2193
+ }
2194
+ }
2195
+ if (s3 !== peg$FAILED) {
2196
+ peg$savedPos = s0;
2197
+ s0 = peg$f33(s2);
2198
+ } else {
2199
+ peg$currPos = s0;
2200
+ s0 = peg$FAILED;
2201
+ }
2202
+ } else {
2203
+ peg$currPos = s0;
2204
+ s0 = peg$FAILED;
2205
+ }
2206
+ return s0;
2207
+ }
2208
+ function peg$parse_slash_comment() {
2209
+ var s0, s1, s2;
2210
+ s0 = peg$currPos;
2211
+ s1 = [];
2212
+ s2 = peg$parse_slash_comment_line();
2213
+ if (s2 !== peg$FAILED) {
2214
+ while (s2 !== peg$FAILED) {
2215
+ s1.push(s2);
2216
+ s2 = peg$parse_slash_comment_line();
2217
+ }
2218
+ } else {
2219
+ s1 = peg$FAILED;
2220
+ }
2221
+ if (s1 !== peg$FAILED) {
2222
+ peg$savedPos = s0;
2223
+ s1 = peg$f34(s1);
2224
+ }
2225
+ s0 = s1;
2226
+ return s0;
2227
+ }
2228
+ function peg$parse_slash_comment_line() {
2229
+ var s0, s2, s3, s4, s5, s6;
2230
+ s0 = peg$currPos;
2231
+ peg$parse_();
2232
+ if (input.substr(peg$currPos, 2) === peg$c27) {
2233
+ s2 = peg$c27;
2234
+ peg$currPos += 2;
2235
+ } else {
2236
+ s2 = peg$FAILED;
2237
+ if (peg$silentFails === 0) {
2238
+ peg$fail(peg$e29);
2239
+ }
2240
+ }
2241
+ if (s2 !== peg$FAILED) {
2242
+ s3 = [];
2243
+ s4 = peg$currPos;
2244
+ s5 = peg$currPos;
2245
+ peg$silentFails++;
2246
+ s6 = peg$parse_newline();
2247
+ peg$silentFails--;
2248
+ if (s6 === peg$FAILED) {
2249
+ s5 = void 0;
2250
+ } else {
2251
+ peg$currPos = s5;
2252
+ s5 = peg$FAILED;
2253
+ }
2254
+ if (s5 !== peg$FAILED) {
2255
+ if (input.length > peg$currPos) {
2256
+ s6 = input.charAt(peg$currPos);
2257
+ peg$currPos++;
2258
+ } else {
2259
+ s6 = peg$FAILED;
2260
+ if (peg$silentFails === 0) {
2261
+ peg$fail(peg$e28);
2262
+ }
2263
+ }
2264
+ if (s6 !== peg$FAILED) {
2265
+ peg$savedPos = s4;
2266
+ s4 = peg$f35(s6);
2267
+ } else {
2268
+ peg$currPos = s4;
2269
+ s4 = peg$FAILED;
2270
+ }
2271
+ } else {
2272
+ peg$currPos = s4;
2273
+ s4 = peg$FAILED;
2274
+ }
2275
+ while (s4 !== peg$FAILED) {
2276
+ s3.push(s4);
2277
+ s4 = peg$currPos;
2278
+ s5 = peg$currPos;
2279
+ peg$silentFails++;
2280
+ s6 = peg$parse_newline();
2281
+ peg$silentFails--;
2282
+ if (s6 === peg$FAILED) {
2283
+ s5 = void 0;
2284
+ } else {
2285
+ peg$currPos = s5;
2286
+ s5 = peg$FAILED;
2287
+ }
2288
+ if (s5 !== peg$FAILED) {
2289
+ if (input.length > peg$currPos) {
2290
+ s6 = input.charAt(peg$currPos);
2291
+ peg$currPos++;
2292
+ } else {
2293
+ s6 = peg$FAILED;
2294
+ if (peg$silentFails === 0) {
2295
+ peg$fail(peg$e28);
2296
+ }
2297
+ }
2298
+ if (s6 !== peg$FAILED) {
2299
+ peg$savedPos = s4;
2300
+ s4 = peg$f35(s6);
2301
+ } else {
2302
+ peg$currPos = s4;
2303
+ s4 = peg$FAILED;
2304
+ }
2305
+ } else {
2306
+ peg$currPos = s4;
2307
+ s4 = peg$FAILED;
2308
+ }
2309
+ }
2310
+ s4 = peg$parse_newline();
2311
+ if (s4 === peg$FAILED) {
2312
+ s4 = null;
2313
+ }
2314
+ peg$savedPos = s0;
2315
+ s0 = peg$f36(s3);
2316
+ } else {
2317
+ peg$currPos = s0;
2318
+ s0 = peg$FAILED;
2319
+ }
2320
+ return s0;
2321
+ }
2322
+ function peg$parse_macro_comment() {
2323
+ var s0, s1, s2;
2324
+ s0 = peg$currPos;
2325
+ s1 = [];
2326
+ s2 = peg$parse_macro_comment_line();
2327
+ if (s2 !== peg$FAILED) {
2328
+ while (s2 !== peg$FAILED) {
2329
+ s1.push(s2);
2330
+ s2 = peg$parse_macro_comment_line();
2331
+ }
2332
+ } else {
2333
+ s1 = peg$FAILED;
2334
+ }
2335
+ if (s1 !== peg$FAILED) {
2336
+ peg$savedPos = s0;
2337
+ s1 = peg$f37(s1);
2338
+ }
2339
+ s0 = s1;
2340
+ return s0;
2341
+ }
2342
+ function peg$parse_macro_comment_line() {
2343
+ var s0, s2, s3, s4, s5, s6;
2344
+ s0 = peg$currPos;
2345
+ peg$parse_();
2346
+ if (input.charCodeAt(peg$currPos) === 35) {
2347
+ s2 = peg$c28;
2348
+ peg$currPos++;
2349
+ } else {
2350
+ s2 = peg$FAILED;
2351
+ if (peg$silentFails === 0) {
2352
+ peg$fail(peg$e30);
2353
+ }
2354
+ }
2355
+ if (s2 !== peg$FAILED) {
2356
+ s3 = [];
2357
+ s4 = peg$currPos;
2358
+ s5 = peg$currPos;
2359
+ peg$silentFails++;
2360
+ s6 = peg$parse_newline();
2361
+ peg$silentFails--;
2362
+ if (s6 === peg$FAILED) {
2363
+ s5 = void 0;
2364
+ } else {
2365
+ peg$currPos = s5;
2366
+ s5 = peg$FAILED;
2367
+ }
2368
+ if (s5 !== peg$FAILED) {
2369
+ if (input.length > peg$currPos) {
2370
+ s6 = input.charAt(peg$currPos);
2371
+ peg$currPos++;
2372
+ } else {
2373
+ s6 = peg$FAILED;
2374
+ if (peg$silentFails === 0) {
2375
+ peg$fail(peg$e28);
2376
+ }
2377
+ }
2378
+ if (s6 !== peg$FAILED) {
2379
+ peg$savedPos = s4;
2380
+ s4 = peg$f38(s6);
2381
+ } else {
2382
+ peg$currPos = s4;
2383
+ s4 = peg$FAILED;
2384
+ }
2385
+ } else {
2386
+ peg$currPos = s4;
2387
+ s4 = peg$FAILED;
2388
+ }
2389
+ while (s4 !== peg$FAILED) {
2390
+ s3.push(s4);
2391
+ s4 = peg$currPos;
2392
+ s5 = peg$currPos;
2393
+ peg$silentFails++;
2394
+ s6 = peg$parse_newline();
2395
+ peg$silentFails--;
2396
+ if (s6 === peg$FAILED) {
2397
+ s5 = void 0;
2398
+ } else {
2399
+ peg$currPos = s5;
2400
+ s5 = peg$FAILED;
2401
+ }
2402
+ if (s5 !== peg$FAILED) {
2403
+ if (input.length > peg$currPos) {
2404
+ s6 = input.charAt(peg$currPos);
2405
+ peg$currPos++;
2406
+ } else {
2407
+ s6 = peg$FAILED;
2408
+ if (peg$silentFails === 0) {
2409
+ peg$fail(peg$e28);
2410
+ }
2411
+ }
2412
+ if (s6 !== peg$FAILED) {
2413
+ peg$savedPos = s4;
2414
+ s4 = peg$f38(s6);
2415
+ } else {
2416
+ peg$currPos = s4;
2417
+ s4 = peg$FAILED;
2418
+ }
2419
+ } else {
2420
+ peg$currPos = s4;
2421
+ s4 = peg$FAILED;
2422
+ }
2423
+ }
2424
+ s4 = peg$parse_newline();
2425
+ if (s4 === peg$FAILED) {
2426
+ s4 = null;
2427
+ }
2428
+ peg$savedPos = s0;
2429
+ s0 = peg$f39(s3);
2430
+ } else {
2431
+ peg$currPos = s0;
2432
+ s0 = peg$FAILED;
2433
+ }
2434
+ return s0;
2435
+ }
2436
+ function peg$parseSTRING() {
2437
+ var s0, s1, s2, s3;
2438
+ peg$silentFails++;
2439
+ s0 = peg$currPos;
2440
+ s1 = peg$parseStringStart();
2441
+ if (s1 !== peg$FAILED) {
2442
+ s2 = [];
2443
+ s3 = peg$parseStringPart();
2444
+ while (s3 !== peg$FAILED) {
2445
+ s2.push(s3);
2446
+ s3 = peg$parseStringPart();
2447
+ }
2448
+ peg$savedPos = s0;
2449
+ s0 = peg$f40(s1, s2);
2450
+ } else {
2451
+ peg$currPos = s0;
2452
+ s0 = peg$FAILED;
2453
+ }
2454
+ peg$silentFails--;
2455
+ if (s0 === peg$FAILED) {
2456
+ s1 = peg$FAILED;
2457
+ if (peg$silentFails === 0) {
2458
+ peg$fail(peg$e31);
2459
+ }
2460
+ }
2461
+ return s0;
2462
+ }
2463
+ function peg$parseNUMBER_STRING() {
2464
+ var s0, s1, s2;
2465
+ s0 = peg$currPos;
2466
+ s1 = peg$parseNUMBER();
2467
+ if (s1 !== peg$FAILED) {
2468
+ s2 = peg$parseSTRING();
2469
+ if (s2 !== peg$FAILED) {
2470
+ peg$savedPos = s0;
2471
+ s0 = peg$f41(s1, s2);
2472
+ } else {
2473
+ peg$currPos = s0;
2474
+ s0 = peg$FAILED;
2475
+ }
2476
+ } else {
2477
+ peg$currPos = s0;
2478
+ s0 = peg$FAILED;
2479
+ }
2480
+ return s0;
2481
+ }
2482
+ function peg$parseStringStart() {
2483
+ var s0;
2484
+ s0 = peg$parseUnicodeLetter();
2485
+ if (s0 === peg$FAILED) {
2486
+ if (input.charCodeAt(peg$currPos) === 36) {
2487
+ s0 = peg$c29;
2488
+ peg$currPos++;
2489
+ } else {
2490
+ s0 = peg$FAILED;
2491
+ if (peg$silentFails === 0) {
2492
+ peg$fail(peg$e32);
2493
+ }
2494
+ }
2495
+ if (s0 === peg$FAILED) {
2496
+ if (input.charCodeAt(peg$currPos) === 95) {
2497
+ s0 = peg$c30;
2498
+ peg$currPos++;
2499
+ } else {
2500
+ s0 = peg$FAILED;
2501
+ if (peg$silentFails === 0) {
2502
+ peg$fail(peg$e33);
2503
+ }
2504
+ }
2505
+ }
2506
+ }
2507
+ return s0;
2508
+ }
2509
+ function peg$parseStringPart() {
2510
+ var s0;
2511
+ s0 = peg$parseStringStart();
2512
+ if (s0 === peg$FAILED) {
2513
+ s0 = peg$parseNd();
2514
+ }
2515
+ return s0;
2516
+ }
2517
+ function peg$parseNUMBER() {
2518
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8;
2519
+ peg$silentFails++;
2520
+ s0 = peg$currPos;
2521
+ s1 = peg$currPos;
2522
+ if (input.charCodeAt(peg$currPos) === 45) {
2523
+ s2 = peg$c31;
2524
+ peg$currPos++;
2525
+ } else {
2526
+ s2 = peg$FAILED;
2527
+ if (peg$silentFails === 0) {
2528
+ peg$fail(peg$e35);
2529
+ }
2530
+ }
2531
+ if (s2 === peg$FAILED) {
2532
+ s2 = null;
2533
+ }
2534
+ s3 = peg$currPos;
2535
+ if (input.charCodeAt(peg$currPos) === 46) {
2536
+ s4 = peg$c32;
2537
+ peg$currPos++;
2538
+ } else {
2539
+ s4 = peg$FAILED;
2540
+ if (peg$silentFails === 0) {
2541
+ peg$fail(peg$e36);
2542
+ }
2543
+ }
2544
+ if (s4 !== peg$FAILED) {
2545
+ s5 = [];
2546
+ if (peg$r0.test(input.charAt(peg$currPos))) {
2547
+ s6 = input.charAt(peg$currPos);
2548
+ peg$currPos++;
2549
+ } else {
2550
+ s6 = peg$FAILED;
2551
+ if (peg$silentFails === 0) {
2552
+ peg$fail(peg$e37);
2553
+ }
2554
+ }
2555
+ if (s6 !== peg$FAILED) {
2556
+ while (s6 !== peg$FAILED) {
2557
+ s5.push(s6);
2558
+ if (peg$r0.test(input.charAt(peg$currPos))) {
2559
+ s6 = input.charAt(peg$currPos);
2560
+ peg$currPos++;
2561
+ } else {
2562
+ s6 = peg$FAILED;
2563
+ if (peg$silentFails === 0) {
2564
+ peg$fail(peg$e37);
2565
+ }
2566
+ }
2567
+ }
2568
+ } else {
2569
+ s5 = peg$FAILED;
2570
+ }
2571
+ if (s5 !== peg$FAILED) {
2572
+ s4 = [s4, s5];
2573
+ s3 = s4;
2574
+ } else {
2575
+ peg$currPos = s3;
2576
+ s3 = peg$FAILED;
2577
+ }
2578
+ } else {
2579
+ peg$currPos = s3;
2580
+ s3 = peg$FAILED;
2581
+ }
2582
+ if (s3 === peg$FAILED) {
2583
+ s3 = peg$currPos;
2584
+ s4 = [];
2585
+ if (peg$r0.test(input.charAt(peg$currPos))) {
2586
+ s5 = input.charAt(peg$currPos);
2587
+ peg$currPos++;
2588
+ } else {
2589
+ s5 = peg$FAILED;
2590
+ if (peg$silentFails === 0) {
2591
+ peg$fail(peg$e37);
2592
+ }
2593
+ }
2594
+ if (s5 !== peg$FAILED) {
2595
+ while (s5 !== peg$FAILED) {
2596
+ s4.push(s5);
2597
+ if (peg$r0.test(input.charAt(peg$currPos))) {
2598
+ s5 = input.charAt(peg$currPos);
2599
+ peg$currPos++;
2600
+ } else {
2601
+ s5 = peg$FAILED;
2602
+ if (peg$silentFails === 0) {
2603
+ peg$fail(peg$e37);
2604
+ }
2605
+ }
2606
+ }
2607
+ } else {
2608
+ s4 = peg$FAILED;
2609
+ }
2610
+ if (s4 !== peg$FAILED) {
2611
+ s5 = peg$currPos;
2612
+ if (input.charCodeAt(peg$currPos) === 46) {
2613
+ s6 = peg$c32;
2614
+ peg$currPos++;
2615
+ } else {
2616
+ s6 = peg$FAILED;
2617
+ if (peg$silentFails === 0) {
2618
+ peg$fail(peg$e36);
2619
+ }
2620
+ }
2621
+ if (s6 !== peg$FAILED) {
2622
+ s7 = [];
2623
+ if (peg$r0.test(input.charAt(peg$currPos))) {
2624
+ s8 = input.charAt(peg$currPos);
2625
+ peg$currPos++;
2626
+ } else {
2627
+ s8 = peg$FAILED;
2628
+ if (peg$silentFails === 0) {
2629
+ peg$fail(peg$e37);
2630
+ }
2631
+ }
2632
+ while (s8 !== peg$FAILED) {
2633
+ s7.push(s8);
2634
+ if (peg$r0.test(input.charAt(peg$currPos))) {
2635
+ s8 = input.charAt(peg$currPos);
2636
+ peg$currPos++;
2637
+ } else {
2638
+ s8 = peg$FAILED;
2639
+ if (peg$silentFails === 0) {
2640
+ peg$fail(peg$e37);
2641
+ }
2642
+ }
2643
+ }
2644
+ s6 = [s6, s7];
2645
+ s5 = s6;
2646
+ } else {
2647
+ peg$currPos = s5;
2648
+ s5 = peg$FAILED;
2649
+ }
2650
+ if (s5 === peg$FAILED) {
2651
+ s5 = null;
2652
+ }
2653
+ s4 = [s4, s5];
2654
+ s3 = s4;
2655
+ } else {
2656
+ peg$currPos = s3;
2657
+ s3 = peg$FAILED;
2658
+ }
2659
+ }
2660
+ if (s3 !== peg$FAILED) {
2661
+ s2 = [s2, s3];
2662
+ s1 = s2;
2663
+ } else {
2664
+ peg$currPos = s1;
2665
+ s1 = peg$FAILED;
2666
+ }
2667
+ if (s1 !== peg$FAILED) {
2668
+ peg$savedPos = s0;
2669
+ s1 = peg$f42();
2670
+ }
2671
+ s0 = s1;
2672
+ peg$silentFails--;
2673
+ if (s0 === peg$FAILED) {
2674
+ s1 = peg$FAILED;
2675
+ if (peg$silentFails === 0) {
2676
+ peg$fail(peg$e34);
2677
+ }
2678
+ }
2679
+ return s0;
2680
+ }
2681
+ function peg$parseHTML_STRING() {
2682
+ var s0, s1;
2683
+ s0 = peg$currPos;
2684
+ s1 = peg$parsehtml_raw_string();
2685
+ if (s1 !== peg$FAILED) {
2686
+ peg$savedPos = s0;
2687
+ s1 = peg$f43(s1);
2688
+ }
2689
+ s0 = s1;
2690
+ return s0;
2691
+ }
2692
+ function peg$parsehtml_raw_string() {
2693
+ var s0, s1, s2, s3;
2694
+ s0 = peg$currPos;
2695
+ if (input.charCodeAt(peg$currPos) === 60) {
2696
+ s1 = peg$c33;
2697
+ peg$currPos++;
2698
+ } else {
2699
+ s1 = peg$FAILED;
2700
+ if (peg$silentFails === 0) {
2701
+ peg$fail(peg$e38);
2702
+ }
2703
+ }
2704
+ if (s1 !== peg$FAILED) {
2705
+ s2 = [];
2706
+ s3 = peg$parsehtml_char();
2707
+ if (s3 === peg$FAILED) {
2708
+ s3 = peg$parsehtml_raw_string();
2709
+ }
2710
+ while (s3 !== peg$FAILED) {
2711
+ s2.push(s3);
2712
+ s3 = peg$parsehtml_char();
2713
+ if (s3 === peg$FAILED) {
2714
+ s3 = peg$parsehtml_raw_string();
2715
+ }
2716
+ }
2717
+ if (input.charCodeAt(peg$currPos) === 62) {
2718
+ s3 = peg$c34;
2719
+ peg$currPos++;
2720
+ } else {
2721
+ s3 = peg$FAILED;
2722
+ if (peg$silentFails === 0) {
2723
+ peg$fail(peg$e39);
2724
+ }
2725
+ }
2726
+ if (s3 !== peg$FAILED) {
2727
+ peg$savedPos = s0;
2728
+ s0 = peg$f44(s2);
2729
+ } else {
2730
+ peg$currPos = s0;
2731
+ s0 = peg$FAILED;
2732
+ }
2733
+ } else {
2734
+ peg$currPos = s0;
2735
+ s0 = peg$FAILED;
2736
+ }
2737
+ return s0;
2738
+ }
2739
+ function peg$parsehtml_char() {
2740
+ var s0, s1, s2, s3, s4;
2741
+ s0 = peg$currPos;
2742
+ s1 = [];
2743
+ s2 = peg$currPos;
2744
+ s3 = peg$currPos;
2745
+ peg$silentFails++;
2746
+ if (input.charCodeAt(peg$currPos) === 62) {
2747
+ s4 = peg$c34;
2748
+ peg$currPos++;
2749
+ } else {
2750
+ s4 = peg$FAILED;
2751
+ if (peg$silentFails === 0) {
2752
+ peg$fail(peg$e39);
2753
+ }
2754
+ }
2755
+ if (s4 === peg$FAILED) {
2756
+ if (input.charCodeAt(peg$currPos) === 60) {
2757
+ s4 = peg$c33;
2758
+ peg$currPos++;
2759
+ } else {
2760
+ s4 = peg$FAILED;
2761
+ if (peg$silentFails === 0) {
2762
+ peg$fail(peg$e38);
2763
+ }
2764
+ }
2765
+ }
2766
+ peg$silentFails--;
2767
+ if (s4 === peg$FAILED) {
2768
+ s3 = void 0;
2769
+ } else {
2770
+ peg$currPos = s3;
2771
+ s3 = peg$FAILED;
2772
+ }
2773
+ if (s3 !== peg$FAILED) {
2774
+ if (input.length > peg$currPos) {
2775
+ s4 = input.charAt(peg$currPos);
2776
+ peg$currPos++;
2777
+ } else {
2778
+ s4 = peg$FAILED;
2779
+ if (peg$silentFails === 0) {
2780
+ peg$fail(peg$e28);
2781
+ }
2782
+ }
2783
+ if (s4 !== peg$FAILED) {
2784
+ peg$savedPos = s2;
2785
+ s2 = peg$f45(s4);
2786
+ } else {
2787
+ peg$currPos = s2;
2788
+ s2 = peg$FAILED;
2789
+ }
2790
+ } else {
2791
+ peg$currPos = s2;
2792
+ s2 = peg$FAILED;
2793
+ }
2794
+ if (s2 !== peg$FAILED) {
2795
+ while (s2 !== peg$FAILED) {
2796
+ s1.push(s2);
2797
+ s2 = peg$currPos;
2798
+ s3 = peg$currPos;
2799
+ peg$silentFails++;
2800
+ if (input.charCodeAt(peg$currPos) === 62) {
2801
+ s4 = peg$c34;
2802
+ peg$currPos++;
2803
+ } else {
2804
+ s4 = peg$FAILED;
2805
+ if (peg$silentFails === 0) {
2806
+ peg$fail(peg$e39);
2807
+ }
2808
+ }
2809
+ if (s4 === peg$FAILED) {
2810
+ if (input.charCodeAt(peg$currPos) === 60) {
2811
+ s4 = peg$c33;
2812
+ peg$currPos++;
2813
+ } else {
2814
+ s4 = peg$FAILED;
2815
+ if (peg$silentFails === 0) {
2816
+ peg$fail(peg$e38);
2817
+ }
2818
+ }
2819
+ }
2820
+ peg$silentFails--;
2821
+ if (s4 === peg$FAILED) {
2822
+ s3 = void 0;
2823
+ } else {
2824
+ peg$currPos = s3;
2825
+ s3 = peg$FAILED;
2826
+ }
2827
+ if (s3 !== peg$FAILED) {
2828
+ if (input.length > peg$currPos) {
2829
+ s4 = input.charAt(peg$currPos);
2830
+ peg$currPos++;
2831
+ } else {
2832
+ s4 = peg$FAILED;
2833
+ if (peg$silentFails === 0) {
2834
+ peg$fail(peg$e28);
2835
+ }
2836
+ }
2837
+ if (s4 !== peg$FAILED) {
2838
+ peg$savedPos = s2;
2839
+ s2 = peg$f45(s4);
2840
+ } else {
2841
+ peg$currPos = s2;
2842
+ s2 = peg$FAILED;
2843
+ }
2844
+ } else {
2845
+ peg$currPos = s2;
2846
+ s2 = peg$FAILED;
2847
+ }
2848
+ }
2849
+ } else {
2850
+ s1 = peg$FAILED;
2851
+ }
2852
+ if (s1 !== peg$FAILED) {
2853
+ peg$savedPos = s0;
2854
+ s1 = peg$f46(s1);
2855
+ }
2856
+ s0 = s1;
2857
+ return s0;
2858
+ }
2859
+ function peg$parseQUOTED_STRING() {
2860
+ var s0, s1, s2, s3;
2861
+ s0 = peg$currPos;
2862
+ if (input.charCodeAt(peg$currPos) === 34) {
2863
+ s1 = peg$c24;
2864
+ peg$currPos++;
2865
+ } else {
2866
+ s1 = peg$FAILED;
2867
+ if (peg$silentFails === 0) {
2868
+ peg$fail(peg$e25);
2869
+ }
2870
+ }
2871
+ if (s1 !== peg$FAILED) {
2872
+ s2 = [];
2873
+ s3 = peg$parseDoubleStringCharacter();
2874
+ while (s3 !== peg$FAILED) {
2875
+ s2.push(s3);
2876
+ s3 = peg$parseDoubleStringCharacter();
2877
+ }
2878
+ if (input.charCodeAt(peg$currPos) === 34) {
2879
+ s3 = peg$c24;
2880
+ peg$currPos++;
2881
+ } else {
2882
+ s3 = peg$FAILED;
2883
+ if (peg$silentFails === 0) {
2884
+ peg$fail(peg$e25);
2885
+ }
2886
+ }
2887
+ if (s3 !== peg$FAILED) {
2888
+ peg$savedPos = s0;
2889
+ s0 = peg$f47(s2);
2890
+ } else {
2891
+ peg$currPos = s0;
2892
+ s0 = peg$FAILED;
2893
+ }
2894
+ } else {
2895
+ peg$currPos = s0;
2896
+ s0 = peg$FAILED;
2897
+ }
2898
+ return s0;
2899
+ }
2900
+ function peg$parseDoubleStringCharacter() {
2901
+ var s0, s1, s2;
2902
+ s0 = peg$parseQuoteEscape();
2903
+ if (s0 === peg$FAILED) {
2904
+ s0 = peg$currPos;
2905
+ s1 = peg$currPos;
2906
+ peg$silentFails++;
2907
+ if (input.charCodeAt(peg$currPos) === 34) {
2908
+ s2 = peg$c24;
2909
+ peg$currPos++;
2910
+ } else {
2911
+ s2 = peg$FAILED;
2912
+ if (peg$silentFails === 0) {
2913
+ peg$fail(peg$e25);
2914
+ }
2915
+ }
2916
+ if (s2 === peg$FAILED) {
2917
+ s2 = peg$parseLineTerminator();
2918
+ }
2919
+ peg$silentFails--;
2920
+ if (s2 === peg$FAILED) {
2921
+ s1 = void 0;
2922
+ } else {
2923
+ peg$currPos = s1;
2924
+ s1 = peg$FAILED;
2925
+ }
2926
+ if (s1 !== peg$FAILED) {
2927
+ s2 = peg$parseSourceCharacter();
2928
+ if (s2 !== peg$FAILED) {
2929
+ peg$savedPos = s0;
2930
+ s0 = peg$f48();
2931
+ } else {
2932
+ peg$currPos = s0;
2933
+ s0 = peg$FAILED;
2934
+ }
2935
+ } else {
2936
+ peg$currPos = s0;
2937
+ s0 = peg$FAILED;
2938
+ }
2939
+ if (s0 === peg$FAILED) {
2940
+ s0 = peg$parseLineContinuation();
2941
+ }
2942
+ }
2943
+ return s0;
2944
+ }
2945
+ function peg$parseQuoteEscape() {
2946
+ var s0, s1, s2, s3;
2947
+ s0 = peg$currPos;
2948
+ s1 = peg$currPos;
2949
+ if (input.charCodeAt(peg$currPos) === 92) {
2950
+ s2 = peg$c35;
2951
+ peg$currPos++;
2952
+ } else {
2953
+ s2 = peg$FAILED;
2954
+ if (peg$silentFails === 0) {
2955
+ peg$fail(peg$e40);
2956
+ }
2957
+ }
2958
+ if (s2 !== peg$FAILED) {
2959
+ if (input.length > peg$currPos) {
2960
+ s3 = input.charAt(peg$currPos);
2961
+ peg$currPos++;
2962
+ } else {
2963
+ s3 = peg$FAILED;
2964
+ if (peg$silentFails === 0) {
2965
+ peg$fail(peg$e28);
2966
+ }
2967
+ }
2968
+ if (s3 !== peg$FAILED) {
2969
+ s2 = [s2, s3];
2970
+ s1 = s2;
2971
+ } else {
2972
+ peg$currPos = s1;
2973
+ s1 = peg$FAILED;
2974
+ }
2975
+ } else {
2976
+ peg$currPos = s1;
2977
+ s1 = peg$FAILED;
2978
+ }
2979
+ if (s1 !== peg$FAILED) {
2980
+ peg$savedPos = s0;
2981
+ s1 = peg$f49(s1);
2982
+ }
2983
+ s0 = s1;
2984
+ return s0;
2985
+ }
2986
+ function peg$parseLineContinuation() {
2987
+ var s0, s1, s2;
2988
+ s0 = peg$currPos;
2989
+ if (input.charCodeAt(peg$currPos) === 92) {
2990
+ s1 = peg$c35;
2991
+ peg$currPos++;
2992
+ } else {
2993
+ s1 = peg$FAILED;
2994
+ if (peg$silentFails === 0) {
2995
+ peg$fail(peg$e40);
2996
+ }
2997
+ }
2998
+ if (s1 !== peg$FAILED) {
2999
+ s2 = peg$parseLineTerminatorSequence();
3000
+ if (s2 !== peg$FAILED) {
3001
+ peg$savedPos = s0;
3002
+ s0 = peg$f50();
3003
+ } else {
3004
+ peg$currPos = s0;
3005
+ s0 = peg$FAILED;
3006
+ }
3007
+ } else {
3008
+ peg$currPos = s0;
3009
+ s0 = peg$FAILED;
3010
+ }
3011
+ return s0;
3012
+ }
3013
+ function peg$parseLineTerminator() {
3014
+ var s0;
3015
+ if (peg$r1.test(input.charAt(peg$currPos))) {
3016
+ s0 = input.charAt(peg$currPos);
3017
+ peg$currPos++;
3018
+ } else {
3019
+ s0 = peg$FAILED;
3020
+ if (peg$silentFails === 0) {
3021
+ peg$fail(peg$e41);
3022
+ }
3023
+ }
3024
+ return s0;
3025
+ }
3026
+ function peg$parseLineTerminatorSequence() {
3027
+ var s0;
3028
+ peg$silentFails++;
3029
+ if (input.charCodeAt(peg$currPos) === 10) {
3030
+ s0 = peg$c36;
3031
+ peg$currPos++;
3032
+ } else {
3033
+ s0 = peg$FAILED;
3034
+ if (peg$silentFails === 0) {
3035
+ peg$fail(peg$e43);
3036
+ }
3037
+ }
3038
+ if (s0 === peg$FAILED) {
3039
+ if (input.substr(peg$currPos, 2) === peg$c37) {
3040
+ s0 = peg$c37;
3041
+ peg$currPos += 2;
3042
+ } else {
3043
+ s0 = peg$FAILED;
3044
+ if (peg$silentFails === 0) {
3045
+ peg$fail(peg$e44);
3046
+ }
3047
+ }
3048
+ if (s0 === peg$FAILED) {
3049
+ if (input.charCodeAt(peg$currPos) === 13) {
3050
+ s0 = peg$c38;
3051
+ peg$currPos++;
3052
+ } else {
3053
+ s0 = peg$FAILED;
3054
+ if (peg$silentFails === 0) {
3055
+ peg$fail(peg$e45);
3056
+ }
3057
+ }
3058
+ if (s0 === peg$FAILED) {
3059
+ if (input.charCodeAt(peg$currPos) === 8232) {
3060
+ s0 = peg$c39;
3061
+ peg$currPos++;
3062
+ } else {
3063
+ s0 = peg$FAILED;
3064
+ if (peg$silentFails === 0) {
3065
+ peg$fail(peg$e46);
3066
+ }
3067
+ }
3068
+ if (s0 === peg$FAILED) {
3069
+ if (input.charCodeAt(peg$currPos) === 8233) {
3070
+ s0 = peg$c40;
3071
+ peg$currPos++;
3072
+ } else {
3073
+ s0 = peg$FAILED;
3074
+ if (peg$silentFails === 0) {
3075
+ peg$fail(peg$e47);
3076
+ }
3077
+ }
3078
+ }
3079
+ }
3080
+ }
3081
+ }
3082
+ peg$silentFails--;
3083
+ if (s0 === peg$FAILED) {
3084
+ if (peg$silentFails === 0) {
3085
+ peg$fail(peg$e42);
3086
+ }
3087
+ }
3088
+ return s0;
3089
+ }
3090
+ function peg$parseSourceCharacter() {
3091
+ var s0;
3092
+ if (input.length > peg$currPos) {
3093
+ s0 = input.charAt(peg$currPos);
3094
+ peg$currPos++;
3095
+ } else {
3096
+ s0 = peg$FAILED;
3097
+ if (peg$silentFails === 0) {
3098
+ peg$fail(peg$e28);
3099
+ }
3100
+ }
3101
+ return s0;
3102
+ }
3103
+ function peg$parse_() {
3104
+ var s0, s1;
3105
+ peg$silentFails++;
3106
+ s0 = [];
3107
+ s1 = peg$parse_whitespace();
3108
+ while (s1 !== peg$FAILED) {
3109
+ s0.push(s1);
3110
+ s1 = peg$parse_whitespace();
3111
+ }
3112
+ peg$silentFails--;
3113
+ s1 = peg$FAILED;
3114
+ if (peg$silentFails === 0) {
3115
+ peg$fail(peg$e50);
3116
+ }
3117
+ return s0;
3118
+ }
3119
+ function peg$parse__() {
3120
+ var s0, s1;
3121
+ peg$silentFails++;
3122
+ s0 = [];
3123
+ s1 = peg$parse_whitespace();
3124
+ if (s1 === peg$FAILED) {
3125
+ s1 = peg$parse_newline();
3126
+ }
3127
+ while (s1 !== peg$FAILED) {
3128
+ s0.push(s1);
3129
+ s1 = peg$parse_whitespace();
3130
+ if (s1 === peg$FAILED) {
3131
+ s1 = peg$parse_newline();
3132
+ }
3133
+ }
3134
+ peg$silentFails--;
3135
+ s1 = peg$FAILED;
3136
+ if (peg$silentFails === 0) {
3137
+ peg$fail(peg$e51);
3138
+ }
3139
+ return s0;
3140
+ }
3141
+ function peg$parse_newline() {
3142
+ var s0;
3143
+ if (peg$r3.test(input.charAt(peg$currPos))) {
3144
+ s0 = input.charAt(peg$currPos);
3145
+ peg$currPos++;
3146
+ } else {
3147
+ s0 = peg$FAILED;
3148
+ if (peg$silentFails === 0) {
3149
+ peg$fail(peg$e52);
3150
+ }
3151
+ }
3152
+ return s0;
3153
+ }
3154
+ function peg$parse_whitespace() {
3155
+ var s0;
3156
+ if (peg$r4.test(input.charAt(peg$currPos))) {
3157
+ s0 = input.charAt(peg$currPos);
3158
+ peg$currPos++;
3159
+ } else {
3160
+ s0 = peg$FAILED;
3161
+ if (peg$silentFails === 0) {
3162
+ peg$fail(peg$e53);
3163
+ }
3164
+ }
3165
+ return s0;
3166
+ }
3167
+ function peg$parseUnicodeLetter() {
3168
+ var s0;
3169
+ s0 = peg$parseLu();
3170
+ if (s0 === peg$FAILED) {
3171
+ s0 = peg$parseLl();
3172
+ if (s0 === peg$FAILED) {
3173
+ s0 = peg$parseLt();
3174
+ if (s0 === peg$FAILED) {
3175
+ s0 = peg$parseLm();
3176
+ if (s0 === peg$FAILED) {
3177
+ s0 = peg$parseLo();
3178
+ if (s0 === peg$FAILED) {
3179
+ s0 = peg$parseNl();
3180
+ }
3181
+ }
3182
+ }
3183
+ }
3184
+ }
3185
+ return s0;
3186
+ }
3187
+ function peg$parseLl() {
3188
+ var s0;
3189
+ if (peg$r5.test(input.charAt(peg$currPos))) {
3190
+ s0 = input.charAt(peg$currPos);
3191
+ peg$currPos++;
3192
+ } else {
3193
+ s0 = peg$FAILED;
3194
+ if (peg$silentFails === 0) {
3195
+ peg$fail(peg$e54);
3196
+ }
3197
+ }
3198
+ return s0;
3199
+ }
3200
+ function peg$parseLm() {
3201
+ var s0;
3202
+ if (peg$r6.test(input.charAt(peg$currPos))) {
3203
+ s0 = input.charAt(peg$currPos);
3204
+ peg$currPos++;
3205
+ } else {
3206
+ s0 = peg$FAILED;
3207
+ if (peg$silentFails === 0) {
3208
+ peg$fail(peg$e55);
3209
+ }
3210
+ }
3211
+ return s0;
3212
+ }
3213
+ function peg$parseLo() {
3214
+ var s0;
3215
+ if (peg$r7.test(input.charAt(peg$currPos))) {
3216
+ s0 = input.charAt(peg$currPos);
3217
+ peg$currPos++;
3218
+ } else {
3219
+ s0 = peg$FAILED;
3220
+ if (peg$silentFails === 0) {
3221
+ peg$fail(peg$e56);
3222
+ }
3223
+ }
3224
+ return s0;
3225
+ }
3226
+ function peg$parseLt() {
3227
+ var s0;
3228
+ if (peg$r8.test(input.charAt(peg$currPos))) {
3229
+ s0 = input.charAt(peg$currPos);
3230
+ peg$currPos++;
3231
+ } else {
3232
+ s0 = peg$FAILED;
3233
+ if (peg$silentFails === 0) {
3234
+ peg$fail(peg$e57);
3235
+ }
3236
+ }
3237
+ return s0;
3238
+ }
3239
+ function peg$parseLu() {
3240
+ var s0;
3241
+ if (peg$r9.test(input.charAt(peg$currPos))) {
3242
+ s0 = input.charAt(peg$currPos);
3243
+ peg$currPos++;
3244
+ } else {
3245
+ s0 = peg$FAILED;
3246
+ if (peg$silentFails === 0) {
3247
+ peg$fail(peg$e58);
3248
+ }
3249
+ }
3250
+ return s0;
3251
+ }
3252
+ function peg$parseNl() {
3253
+ var s0;
3254
+ if (peg$r10.test(input.charAt(peg$currPos))) {
3255
+ s0 = input.charAt(peg$currPos);
3256
+ peg$currPos++;
3257
+ } else {
3258
+ s0 = peg$FAILED;
3259
+ if (peg$silentFails === 0) {
3260
+ peg$fail(peg$e59);
3261
+ }
3262
+ }
3263
+ return s0;
3264
+ }
3265
+ function peg$parseNd() {
3266
+ var s0;
3267
+ if (peg$r11.test(input.charAt(peg$currPos))) {
3268
+ s0 = input.charAt(peg$currPos);
3269
+ peg$currPos++;
3270
+ } else {
3271
+ s0 = peg$FAILED;
3272
+ if (peg$silentFails === 0) {
3273
+ peg$fail(peg$e60);
3274
+ }
3275
+ }
3276
+ return s0;
3277
+ }
3278
+ function dedent(value) {
3279
+ const str = value.trim();
3280
+ const matches = str.match(/\n([\t ]+|(?!\s).)/g);
3281
+ if (matches) {
3282
+ const indentLengths = matches.map((match) => match.match(/[\t ]/g)?.length ?? 0);
3283
+ const pattern = new RegExp(`
3284
+ [ ]{${Math.min(...indentLengths)}}`, "g");
3285
+ return str.replace(pattern, "\n");
3286
+ }
3287
+ return str;
3288
+ }
3289
+ const edgeops = [];
3290
+ const b = new Builder({
3291
+ // @ts-ignore
3292
+ locationFunction: location
3293
+ });
3294
+ peg$result = peg$startRuleFunction();
3295
+ if (peg$result !== peg$FAILED && peg$currPos === input.length) {
3296
+ return peg$result;
3297
+ } else {
3298
+ if (peg$result !== peg$FAILED && peg$currPos < input.length) {
3299
+ peg$fail(peg$endExpectation());
3300
+ }
3301
+ throw peg$buildStructuredError(
3302
+ // @ts-ignore
3303
+ peg$maxFailExpected,
3304
+ // @ts-ignore
3305
+ peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,
3306
+ // @ts-ignore
3307
+ peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
3308
+ );
3309
+ }
3310
+ }
3311
+ return {
3312
+ SyntaxError: peg$SyntaxError,
3313
+ parse: peg$parse
3314
+ };
3315
+ }()
3316
+ );
3317
+ peggyParser.SyntaxError.prototype.name = "PeggySyntaxError";
3318
+ const parse$1 = peggyParser.parse;
3319
+ const PeggySyntaxError = peggyParser.SyntaxError;
3320
+ function parse(input, options) {
3321
+ try {
3322
+ return parse$1(input, options);
3323
+ } catch (e) {
3324
+ if (e instanceof PeggySyntaxError) {
3325
+ throw new DotSyntaxError(e.message, e.expected, e.found, e.location);
3326
+ }
3327
+ throw e;
3328
+ }
3329
+ }
3330
+ class DotSyntaxError extends PeggySyntaxError {
3331
+ constructor(...args) {
3332
+ super(...args);
3333
+ this.name = "DotSyntaxError";
3334
+ }
3335
+ }
3336
+ function convertAttribute(key, value) {
3337
+ if (typeof value === "string") {
3338
+ const trimmed = value.trim();
3339
+ const isHTMLLike = /^<.+>$/ms.test(trimmed);
3340
+ if (isHTMLLike) {
3341
+ return createElement(
3342
+ "Attribute",
3343
+ {
3344
+ key: createElement("Literal", { value: key, quoted: false }, []),
3345
+ value: createElement(
3346
+ "Literal",
3347
+ { value: trimmed.slice(1, trimmed.length - 1), quoted: "html" },
3348
+ []
3349
+ )
3350
+ },
3351
+ []
3352
+ );
3353
+ }
3354
+ return createElement(
3355
+ "Attribute",
3356
+ {
3357
+ key: createElement("Literal", { value: key, quoted: false }, []),
3358
+ value: createElement("Literal", { value, quoted: true }, [])
3359
+ },
3360
+ []
3361
+ );
3362
+ }
3363
+ return createElement(
3364
+ "Attribute",
3365
+ {
3366
+ key: createElement("Literal", { value: key, quoted: false }, []),
3367
+ value: createElement(
3368
+ "Literal",
3369
+ { value: String(value), quoted: false },
3370
+ []
3371
+ )
3372
+ },
3373
+ []
3374
+ );
3375
+ }
3376
+ function convertComment(value, kind) {
3377
+ return createElement(
3378
+ "Comment",
3379
+ {
3380
+ kind,
3381
+ value
3382
+ },
3383
+ []
3384
+ );
3385
+ }
3386
+ function convertClusterChildren(context, model) {
3387
+ return Array.from(
3388
+ function* () {
3389
+ for (const [key, value] of model.values) {
3390
+ yield convertAttribute(key, value);
3391
+ }
3392
+ for (const attrs of Object.values(model.attributes)) {
3393
+ if (attrs.size > 0) {
3394
+ if (attrs.comment) {
3395
+ yield convertComment(attrs.comment, context.commentKind);
3396
+ }
3397
+ yield context.convert(attrs);
3398
+ }
3399
+ }
3400
+ for (const node of model.nodes) {
3401
+ if (node.comment) {
3402
+ yield convertComment(node.comment, context.commentKind);
3403
+ }
3404
+ yield context.convert(node);
3405
+ }
3406
+ for (const subgraph of model.subgraphs) {
3407
+ if (subgraph.comment) {
3408
+ yield convertComment(subgraph.comment, context.commentKind);
3409
+ }
3410
+ yield context.convert(subgraph);
3411
+ }
3412
+ for (const edge of model.edges) {
3413
+ if (edge.comment) {
3414
+ yield convertComment(edge.comment, context.commentKind);
3415
+ }
3416
+ yield context.convert(edge);
3417
+ }
3418
+ }()
3419
+ );
3420
+ }
3421
+ const AttributeListPlugin = {
3422
+ match(model) {
3423
+ return model.$$type === "AttributeList";
3424
+ },
3425
+ convert(context, model) {
3426
+ return createElement(
3427
+ "AttributeList",
3428
+ {
3429
+ kind: model.$$kind
3430
+ },
3431
+ model.values.map(([key, value]) => convertAttribute(key, value))
3432
+ );
3433
+ }
3434
+ };
3435
+ const EdgePlugin$1 = {
3436
+ match(model) {
3437
+ return model.$$type === "Edge";
3438
+ },
3439
+ convert(context, model) {
3440
+ return createElement(
3441
+ "Edge",
3442
+ {
3443
+ targets: model.targets.map((target) => {
3444
+ if (common.isNodeModel(target)) {
3445
+ return createElement(
3446
+ "NodeRef",
3447
+ {
3448
+ id: createElement(
3449
+ "Literal",
3450
+ {
3451
+ value: target.id,
3452
+ quoted: true
3453
+ },
3454
+ []
3455
+ )
3456
+ },
3457
+ []
3458
+ );
3459
+ }
3460
+ if (common.isForwardRefNode(target)) {
3461
+ return createElement(
3462
+ "NodeRef",
3463
+ {
3464
+ id: createElement(
3465
+ "Literal",
3466
+ {
3467
+ value: target.id,
3468
+ quoted: true
3469
+ },
3470
+ []
3471
+ ),
3472
+ port: target.port ? createElement(
3473
+ "Literal",
3474
+ {
3475
+ value: target.port,
3476
+ quoted: true
3477
+ },
3478
+ []
3479
+ ) : void 0,
3480
+ compass: target.compass ? createElement(
3481
+ "Literal",
3482
+ {
3483
+ value: target.compass,
3484
+ quoted: true
3485
+ },
3486
+ []
3487
+ ) : void 0
3488
+ },
3489
+ []
3490
+ );
3491
+ }
3492
+ return createElement(
3493
+ "NodeRefGroup",
3494
+ {},
3495
+ target.map((n) => {
3496
+ if (common.isNodeModel(n)) {
3497
+ return createElement(
3498
+ "NodeRef",
3499
+ {
3500
+ id: createElement(
3501
+ "Literal",
3502
+ {
3503
+ value: n.id,
3504
+ quoted: true
3505
+ },
3506
+ []
3507
+ )
3508
+ },
3509
+ []
3510
+ );
3511
+ }
3512
+ return createElement(
3513
+ "NodeRef",
3514
+ {
3515
+ id: createElement(
3516
+ "Literal",
3517
+ {
3518
+ value: n.id,
3519
+ quoted: true
3520
+ },
3521
+ []
3522
+ ),
3523
+ port: n.port ? createElement(
3524
+ "Literal",
3525
+ {
3526
+ value: n.port,
3527
+ quoted: true
3528
+ },
3529
+ []
3530
+ ) : void 0,
3531
+ compass: n.compass ? createElement(
3532
+ "Literal",
3533
+ {
3534
+ value: n.compass,
3535
+ quoted: true
3536
+ },
3537
+ []
3538
+ ) : void 0
3539
+ },
3540
+ []
3541
+ );
3542
+ })
3543
+ );
3544
+ })
3545
+ },
3546
+ [
3547
+ ...model.attributes.comment ? [convertComment(model.attributes.comment, context.commentKind)] : [],
3548
+ ...model.attributes.values.map(
3549
+ ([key, value]) => convertAttribute(key, value)
3550
+ )
3551
+ ]
3552
+ );
3553
+ }
3554
+ };
3555
+ const GraphPlugin$1 = {
3556
+ match(model) {
3557
+ return model.$$type === "Graph";
3558
+ },
3559
+ convert(context, model) {
3560
+ return createElement("Dot", {}, [
3561
+ ...model.comment ? [convertComment(model.comment, context.commentKind)] : [],
3562
+ createElement(
3563
+ "Graph",
3564
+ {
3565
+ directed: model.directed,
3566
+ strict: model.strict,
3567
+ id: model.id ? createElement(
3568
+ "Literal",
3569
+ {
3570
+ value: model.id,
3571
+ quoted: true
3572
+ },
3573
+ []
3574
+ ) : void 0
3575
+ },
3576
+ convertClusterChildren(context, model)
3577
+ )
3578
+ ]);
3579
+ }
3580
+ };
3581
+ const NodePlugin$1 = {
3582
+ match(model) {
3583
+ return model.$$type === "Node";
3584
+ },
3585
+ convert(context, model) {
3586
+ return createElement(
3587
+ "Node",
3588
+ {
3589
+ id: createElement(
3590
+ "Literal",
3591
+ {
3592
+ value: model.id,
3593
+ quoted: true
3594
+ },
3595
+ []
3596
+ )
3597
+ },
3598
+ [
3599
+ ...model.attributes.comment ? [convertComment(model.attributes.comment, context.commentKind)] : [],
3600
+ ...model.attributes.values.map(
3601
+ ([key, value]) => convertAttribute(key, value)
3602
+ )
3603
+ ]
3604
+ );
3605
+ }
3606
+ };
3607
+ const SubgraphPlugin$1 = {
3608
+ match(model) {
3609
+ return model.$$type === "Subgraph";
3610
+ },
3611
+ convert(context, model) {
3612
+ return createElement(
3613
+ "Subgraph",
3614
+ {
3615
+ id: model.id ? createElement(
3616
+ "Literal",
3617
+ {
3618
+ value: model.id,
3619
+ quoted: true
3620
+ },
3621
+ []
3622
+ ) : void 0
3623
+ },
3624
+ convertClusterChildren(context, model)
3625
+ );
3626
+ }
3627
+ };
3628
+ const defaultPlugins$1 = [
3629
+ AttributeListPlugin,
3630
+ EdgePlugin$1,
3631
+ NodePlugin$1,
3632
+ GraphPlugin$1,
3633
+ SubgraphPlugin$1
3634
+ ];
3635
+ class FromModelConverter {
3636
+ constructor(options = {}) {
3637
+ this.options = options;
3638
+ }
3639
+ /** @hidden */
3640
+ #plugins = [...defaultPlugins$1];
3641
+ /**
3642
+ * Converts a DotObjectModel into an AST.
3643
+ *
3644
+ * @param model The {@link DotObjectModel} to be converted.
3645
+ * @returns The AST generated from the model.
3646
+ */
3647
+ convert(model) {
3648
+ const plugins = [...this.#plugins];
3649
+ const { commentKind = "Slash" } = this.options;
3650
+ const context = {
3651
+ commentKind,
3652
+ convert(m) {
3653
+ for (const plugin of plugins) {
3654
+ if (plugin.match(m)) {
3655
+ return plugin.convert(context, m);
3656
+ }
3657
+ }
3658
+ throw Error();
3659
+ }
3660
+ };
3661
+ return context.convert(model);
3662
+ }
3663
+ }
3664
+ function fromModel(model, options) {
3665
+ return new FromModelConverter(options).convert(model);
3666
+ }
3667
+ class CommentHolder {
3668
+ comment = null;
3669
+ set(comment) {
3670
+ this.comment = comment;
3671
+ }
3672
+ reset() {
3673
+ this.comment = null;
3674
+ }
3675
+ apply(model, location) {
3676
+ if (location && this.comment?.location) {
3677
+ if (this.comment?.kind === "Block") {
3678
+ if (this.comment.location.end.line === location.start.line - 1) {
3679
+ model.comment = this.comment.value;
3680
+ }
3681
+ } else {
3682
+ if (this.comment.location.end.line === location.start.line) {
3683
+ model.comment = this.comment.value;
3684
+ }
3685
+ }
3686
+ } else {
3687
+ model.comment = this.comment?.value;
3688
+ }
3689
+ this.reset();
3690
+ }
3691
+ }
3692
+ const DotPlugin = {
3693
+ match(ast) {
3694
+ return ast.type === "Dot";
3695
+ },
3696
+ convert(context, ast) {
3697
+ const commentHolder = new CommentHolder();
3698
+ for (const stmt of ast.children) {
3699
+ switch (stmt.type) {
3700
+ case "Comment":
3701
+ commentHolder.set(stmt);
3702
+ break;
3703
+ case "Graph": {
3704
+ const graph = context.convert(stmt);
3705
+ commentHolder.apply(graph, stmt.location);
3706
+ return graph;
3707
+ }
3708
+ }
3709
+ }
3710
+ throw Error();
3711
+ }
3712
+ };
3713
+ function convertToEdgeTargetTuple(edge) {
3714
+ return edge.targets.map((t) => {
3715
+ switch (t.type) {
3716
+ case "NodeRef":
3717
+ return {
3718
+ id: t.id.value,
3719
+ port: t.port?.value,
3720
+ compass: t.compass?.value
3721
+ };
3722
+ case "NodeRefGroup":
3723
+ return t.children.map((t2) => ({
3724
+ id: t2.id.value,
3725
+ port: t2.port?.value,
3726
+ compass: t2.compass?.value
3727
+ }));
3728
+ }
3729
+ });
3730
+ }
3731
+ const EdgePlugin = {
3732
+ match(ast) {
3733
+ return ast.type === "Edge";
3734
+ },
3735
+ convert(context, ast) {
3736
+ const edge = new context.models.Edge(
3737
+ convertToEdgeTargetTuple(ast),
3738
+ ast.children.filter(
3739
+ (v) => v.type === "Attribute"
3740
+ ).reduce(
3741
+ (acc, curr) => {
3742
+ acc[curr.key.value] = curr.value.value;
3743
+ return acc;
3744
+ },
3745
+ {}
3746
+ )
3747
+ );
3748
+ return edge;
3749
+ }
3750
+ };
3751
+ function applyStatements(graph, statements) {
3752
+ const commentHolder = new CommentHolder();
3753
+ for (const stmt of statements) {
3754
+ switch (stmt.type) {
3755
+ case "Subgraph": {
3756
+ const subgraph = stmt.id ? graph.subgraph(stmt.id.value) : graph.subgraph();
3757
+ applyStatements(subgraph, stmt.children);
3758
+ commentHolder.apply(subgraph, stmt.location);
3759
+ break;
3760
+ }
3761
+ case "Attribute":
3762
+ graph.set(stmt.key.value, stmt.value.value);
3763
+ commentHolder.reset();
3764
+ break;
3765
+ case "Node":
3766
+ commentHolder.apply(
3767
+ graph.node(
3768
+ stmt.id.value,
3769
+ stmt.children.filter(
3770
+ (v) => v.type === "Attribute"
3771
+ ).reduce(
3772
+ (acc, curr) => {
3773
+ acc[curr.key.value] = curr.value.value;
3774
+ return acc;
3775
+ },
3776
+ {}
3777
+ )
3778
+ ),
3779
+ stmt.location
3780
+ );
3781
+ break;
3782
+ case "Edge":
3783
+ commentHolder.apply(
3784
+ graph.edge(
3785
+ convertToEdgeTargetTuple(stmt),
3786
+ stmt.children.filter(
3787
+ (v) => v.type === "Attribute"
3788
+ ).reduce(
3789
+ (acc, curr) => {
3790
+ acc[curr.key.value] = curr.value.value;
3791
+ return acc;
3792
+ },
3793
+ {}
3794
+ )
3795
+ ),
3796
+ stmt.location
3797
+ );
3798
+ break;
3799
+ case "AttributeList": {
3800
+ const attrs = stmt.children.filter(
3801
+ (v) => v.type === "Attribute"
3802
+ ).reduce(
3803
+ (acc, curr) => {
3804
+ acc[curr.key.value] = curr.value.value;
3805
+ return acc;
3806
+ },
3807
+ {}
3808
+ );
3809
+ switch (stmt.kind) {
3810
+ case "Edge":
3811
+ graph.edge(attrs);
3812
+ break;
3813
+ case "Node":
3814
+ graph.node(attrs);
3815
+ break;
3816
+ case "Graph":
3817
+ graph.graph(attrs);
3818
+ break;
3819
+ }
3820
+ commentHolder.reset();
3821
+ break;
3822
+ }
3823
+ case "Comment":
3824
+ commentHolder.set(stmt);
3825
+ }
3826
+ }
3827
+ }
3828
+ const GraphPlugin = {
3829
+ match(ast) {
3830
+ return ast.type === "Graph";
3831
+ },
3832
+ convert(context, ast) {
3833
+ const G = ast.directed ? context.models.Digraph : context.models.Graph;
3834
+ const graph = new G(ast.id?.value, ast.strict);
3835
+ applyStatements(graph, ast.children);
3836
+ return graph;
3837
+ }
3838
+ };
3839
+ const NodePlugin = {
3840
+ match(ast) {
3841
+ return ast.type === "Node";
3842
+ },
3843
+ convert(context, ast) {
3844
+ const node = new context.models.Node(
3845
+ ast.id.value,
3846
+ ast.children.filter(
3847
+ (v) => v.type === "Attribute"
3848
+ ).reduce(
3849
+ (acc, curr) => {
3850
+ acc[curr.key.value] = curr.value.value;
3851
+ return acc;
3852
+ },
3853
+ {}
3854
+ )
3855
+ );
3856
+ return node;
3857
+ }
3858
+ };
3859
+ const SubgraphPlugin = {
3860
+ match(ast) {
3861
+ return ast.type === "Subgraph";
3862
+ },
3863
+ convert(context, ast) {
3864
+ const subgraph = new context.models.Subgraph(ast.id?.value);
3865
+ applyStatements(subgraph, ast.children);
3866
+ return subgraph;
3867
+ }
3868
+ };
3869
+ const defaultPlugins = [
3870
+ NodePlugin,
3871
+ EdgePlugin,
3872
+ SubgraphPlugin,
3873
+ GraphPlugin,
3874
+ DotPlugin
3875
+ ];
3876
+ class ToModelConverter {
3877
+ constructor(options = {}) {
3878
+ this.options = options;
3879
+ }
3880
+ /** @hidden */
3881
+ plugins = [
3882
+ ...defaultPlugins
3883
+ ];
3884
+ /**
3885
+ * Convert AST to Model.
3886
+ *
3887
+ * @param ast AST node.
3888
+ */
3889
+ convert(ast) {
3890
+ const plugins = [...this.plugins];
3891
+ const context = {
3892
+ models: common.createModelsContext(this.options.models ?? {}),
3893
+ convert(m) {
3894
+ for (const plugin of plugins) {
3895
+ if (plugin.match(m)) {
3896
+ return plugin.convert(context, m);
3897
+ }
3898
+ }
3899
+ throw Error();
3900
+ }
3901
+ };
3902
+ return context.convert(ast);
3903
+ }
3904
+ }
3905
+ function toModel(ast, options) {
3906
+ return new ToModelConverter(options).convert(ast);
3907
+ }
3908
+ exports.Builder = Builder;
3909
+ exports.DotSyntaxError = DotSyntaxError;
3910
+ exports.FromModelConverter = FromModelConverter;
3911
+ exports.Printer = Printer;
3912
+ exports.ToModelConverter = ToModelConverter;
3913
+ exports.createElement = createElement;
3914
+ exports.fromModel = fromModel;
3915
+ exports.parse = parse;
3916
+ exports.stringify = stringify;
3917
+ exports.toModel = toModel;