state-machine-cat 10.1.9 → 10.1.10

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.
@@ -1,2744 +0,0 @@
1
- // Generated by Peggy 3.0.0.
2
- //
3
- // https://peggyjs.org/
4
-
5
- import parserHelpers from "../parser-helpers.mjs";
6
-
7
- function peg$subclass(child, parent) {
8
- function C() { this.constructor = child; }
9
- C.prototype = parent.prototype;
10
- child.prototype = new C();
11
- }
12
-
13
- function peg$SyntaxError(message, expected, found, location) {
14
- var self = Error.call(this, message);
15
- // istanbul ignore next Check is a necessary evil to support older environments
16
- if (Object.setPrototypeOf) {
17
- Object.setPrototypeOf(self, peg$SyntaxError.prototype);
18
- }
19
- self.expected = expected;
20
- self.found = found;
21
- self.location = location;
22
- self.name = "SyntaxError";
23
- return self;
24
- }
25
-
26
- peg$subclass(peg$SyntaxError, Error);
27
-
28
- function peg$padEnd(str, targetLength, padString) {
29
- padString = padString || " ";
30
- if (str.length > targetLength) { return str; }
31
- targetLength -= str.length;
32
- padString += padString.repeat(targetLength);
33
- return str + padString.slice(0, targetLength);
34
- }
35
-
36
- peg$SyntaxError.prototype.format = function(sources) {
37
- var str = "Error: " + this.message;
38
- if (this.location) {
39
- var src = null;
40
- var k;
41
- for (k = 0; k < sources.length; k++) {
42
- if (sources[k].source === this.location.source) {
43
- src = sources[k].text.split(/\r\n|\n|\r/g);
44
- break;
45
- }
46
- }
47
- var s = this.location.start;
48
- var offset_s = (this.location.source && (typeof this.location.source.offset === "function"))
49
- ? this.location.source.offset(s)
50
- : s;
51
- var loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column;
52
- if (src) {
53
- var e = this.location.end;
54
- var filler = peg$padEnd("", offset_s.line.toString().length, ' ');
55
- var line = src[s.line - 1];
56
- var last = s.line === e.line ? e.column : line.length + 1;
57
- var hatLen = (last - s.column) || 1;
58
- str += "\n --> " + loc + "\n"
59
- + filler + " |\n"
60
- + offset_s.line + " | " + line + "\n"
61
- + filler + " | " + peg$padEnd("", s.column - 1, ' ')
62
- + peg$padEnd("", hatLen, "^");
63
- } else {
64
- str += "\n at " + loc;
65
- }
66
- }
67
- return str;
68
- };
69
-
70
- peg$SyntaxError.buildMessage = function(expected, found) {
71
- var DESCRIBE_EXPECTATION_FNS = {
72
- literal: function(expectation) {
73
- return "\"" + literalEscape(expectation.text) + "\"";
74
- },
75
-
76
- class: function(expectation) {
77
- var escapedParts = expectation.parts.map(function(part) {
78
- return Array.isArray(part)
79
- ? classEscape(part[0]) + "-" + classEscape(part[1])
80
- : classEscape(part);
81
- });
82
-
83
- return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]";
84
- },
85
-
86
- any: function() {
87
- return "any character";
88
- },
89
-
90
- end: function() {
91
- return "end of input";
92
- },
93
-
94
- other: function(expectation) {
95
- return expectation.description;
96
- }
97
- };
98
-
99
- function hex(ch) {
100
- return ch.charCodeAt(0).toString(16).toUpperCase();
101
- }
102
-
103
- function literalEscape(s) {
104
- return s
105
- .replace(/\\/g, "\\\\")
106
- .replace(/"/g, "\\\"")
107
- .replace(/\0/g, "\\0")
108
- .replace(/\t/g, "\\t")
109
- .replace(/\n/g, "\\n")
110
- .replace(/\r/g, "\\r")
111
- .replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); })
112
- .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); });
113
- }
114
-
115
- function classEscape(s) {
116
- return s
117
- .replace(/\\/g, "\\\\")
118
- .replace(/\]/g, "\\]")
119
- .replace(/\^/g, "\\^")
120
- .replace(/-/g, "\\-")
121
- .replace(/\0/g, "\\0")
122
- .replace(/\t/g, "\\t")
123
- .replace(/\n/g, "\\n")
124
- .replace(/\r/g, "\\r")
125
- .replace(/[\x00-\x0F]/g, function(ch) { return "\\x0" + hex(ch); })
126
- .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return "\\x" + hex(ch); });
127
- }
128
-
129
- function describeExpectation(expectation) {
130
- return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
131
- }
132
-
133
- function describeExpected(expected) {
134
- var descriptions = expected.map(describeExpectation);
135
- var i, j;
136
-
137
- descriptions.sort();
138
-
139
- if (descriptions.length > 0) {
140
- for (i = 1, j = 1; i < descriptions.length; i++) {
141
- if (descriptions[i - 1] !== descriptions[i]) {
142
- descriptions[j] = descriptions[i];
143
- j++;
144
- }
145
- }
146
- descriptions.length = j;
147
- }
148
-
149
- switch (descriptions.length) {
150
- case 1:
151
- return descriptions[0];
152
-
153
- case 2:
154
- return descriptions[0] + " or " + descriptions[1];
155
-
156
- default:
157
- return descriptions.slice(0, -1).join(", ")
158
- + ", or "
159
- + descriptions[descriptions.length - 1];
160
- }
161
- }
162
-
163
- function describeFound(found) {
164
- return found ? "\"" + literalEscape(found) + "\"" : "end of input";
165
- }
166
-
167
- return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
168
- };
169
-
170
- function peg$parse(input, options) {
171
- options = options !== undefined ? options : {};
172
-
173
- var peg$FAILED = {};
174
- var peg$source = options.grammarSource;
175
-
176
- var peg$startRuleFunctions = { program: peg$parseprogram };
177
- var peg$startRuleFunction = peg$parseprogram;
178
-
179
- var peg$c0 = ",";
180
- var peg$c1 = ";";
181
- var peg$c2 = "[";
182
- var peg$c3 = "]";
183
- var peg$c4 = ":";
184
- var peg$c5 = "{";
185
- var peg$c6 = "}";
186
- var peg$c7 = "=";
187
- var peg$c8 = "label";
188
- var peg$c9 = "color";
189
- var peg$c10 = "class";
190
- var peg$c11 = "active";
191
- var peg$c12 = "type";
192
- var peg$c13 = "regular";
193
- var peg$c14 = "initial";
194
- var peg$c15 = "terminate";
195
- var peg$c16 = "final";
196
- var peg$c17 = "parallel";
197
- var peg$c18 = "history";
198
- var peg$c19 = "deephistory";
199
- var peg$c20 = "choice";
200
- var peg$c21 = "forkjoin";
201
- var peg$c22 = "fork";
202
- var peg$c23 = "join";
203
- var peg$c24 = "junction";
204
- var peg$c25 = "width";
205
- var peg$c26 = "external";
206
- var peg$c27 = "internal";
207
- var peg$c28 = "->";
208
- var peg$c29 = "=>>";
209
- var peg$c30 = "=>";
210
- var peg$c31 = ">>";
211
- var peg$c32 = ":>";
212
- var peg$c33 = "--";
213
- var peg$c34 = "==";
214
- var peg$c35 = "<-";
215
- var peg$c36 = "<<=";
216
- var peg$c37 = "<=";
217
- var peg$c38 = "<<";
218
- var peg$c39 = "<:";
219
- var peg$c40 = "#";
220
- var peg$c41 = ".";
221
- var peg$c42 = "\"";
222
- var peg$c43 = "\\\"";
223
- var peg$c44 = "/*";
224
- var peg$c45 = "*/";
225
- var peg$c46 = "//";
226
-
227
- var peg$r0 = /^[0-9]/;
228
- var peg$r1 = /^[a-zA-Z0-9_\- ]/;
229
- var peg$r2 = /^[^;, "\t\n\r=\-><:{[]/;
230
- var peg$r3 = /^[ \t]/;
231
- var peg$r4 = /^[\r\n]/;
232
- var peg$r5 = /^[^\r\n]/;
233
-
234
- var peg$e0 = peg$otherExpectation("statemachine");
235
- var peg$e1 = peg$literalExpectation(",", false);
236
- var peg$e2 = peg$literalExpectation(";", false);
237
- var peg$e3 = peg$otherExpectation("state");
238
- var peg$e4 = peg$literalExpectation("[", false);
239
- var peg$e5 = peg$literalExpectation("]", false);
240
- var peg$e6 = peg$literalExpectation(":", false);
241
- var peg$e7 = peg$literalExpectation("{", false);
242
- var peg$e8 = peg$literalExpectation("}", false);
243
- var peg$e9 = peg$otherExpectation("extended state attributes");
244
- var peg$e10 = peg$otherExpectation("extended state attribute");
245
- var peg$e11 = peg$literalExpectation("=", false);
246
- var peg$e12 = peg$otherExpectation("state attribute name");
247
- var peg$e13 = peg$literalExpectation("label", true);
248
- var peg$e14 = peg$literalExpectation("color", true);
249
- var peg$e15 = peg$otherExpectation("class attribute");
250
- var peg$e16 = peg$literalExpectation("class", true);
251
- var peg$e17 = peg$otherExpectation("state flag");
252
- var peg$e18 = peg$literalExpectation("active", true);
253
- var peg$e19 = peg$otherExpectation("state type");
254
- var peg$e20 = peg$literalExpectation("type", true);
255
- var peg$e21 = peg$otherExpectation("state type type");
256
- var peg$e22 = peg$literalExpectation("regular", false);
257
- var peg$e23 = peg$literalExpectation("initial", false);
258
- var peg$e24 = peg$literalExpectation("terminate", false);
259
- var peg$e25 = peg$literalExpectation("final", false);
260
- var peg$e26 = peg$literalExpectation("parallel", false);
261
- var peg$e27 = peg$literalExpectation("history", false);
262
- var peg$e28 = peg$literalExpectation("deephistory", false);
263
- var peg$e29 = peg$literalExpectation("choice", false);
264
- var peg$e30 = peg$literalExpectation("forkjoin", false);
265
- var peg$e31 = peg$literalExpectation("fork", false);
266
- var peg$e32 = peg$literalExpectation("join", false);
267
- var peg$e33 = peg$literalExpectation("junction", false);
268
- var peg$e34 = peg$otherExpectation("transition");
269
- var peg$e35 = peg$otherExpectation("extended transition attributes");
270
- var peg$e36 = peg$otherExpectation("extended transition attribute");
271
- var peg$e37 = peg$otherExpectation("transition attribute name");
272
- var peg$e38 = peg$otherExpectation("transition type name");
273
- var peg$e39 = peg$otherExpectation("numeric transition attribute name");
274
- var peg$e40 = peg$literalExpectation("width", true);
275
- var peg$e41 = peg$otherExpectation("transition type value");
276
- var peg$e42 = peg$literalExpectation("external", false);
277
- var peg$e43 = peg$literalExpectation("internal", false);
278
- var peg$e44 = peg$otherExpectation("left to right arrow");
279
- var peg$e45 = peg$literalExpectation("->", false);
280
- var peg$e46 = peg$literalExpectation("=>>", false);
281
- var peg$e47 = peg$literalExpectation("=>", false);
282
- var peg$e48 = peg$literalExpectation(">>", false);
283
- var peg$e49 = peg$literalExpectation(":>", false);
284
- var peg$e50 = peg$literalExpectation("--", false);
285
- var peg$e51 = peg$literalExpectation("==", false);
286
- var peg$e52 = peg$otherExpectation("right to left arrow");
287
- var peg$e53 = peg$literalExpectation("<-", false);
288
- var peg$e54 = peg$literalExpectation("<<=", false);
289
- var peg$e55 = peg$literalExpectation("<=", false);
290
- var peg$e56 = peg$literalExpectation("<<", false);
291
- var peg$e57 = peg$literalExpectation("<:", false);
292
- var peg$e58 = peg$literalExpectation("#", false);
293
- var peg$e59 = peg$literalExpectation(".", false);
294
- var peg$e60 = peg$classExpectation([["0", "9"]], false, false);
295
- var peg$e61 = peg$otherExpectation("double quoted string");
296
- var peg$e62 = peg$literalExpectation("\"", false);
297
- var peg$e63 = peg$literalExpectation("\\\"", false);
298
- var peg$e64 = peg$anyExpectation();
299
- var peg$e65 = peg$otherExpectation("valid class string");
300
- var peg$e66 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-", " "], false, false);
301
- var peg$e67 = peg$otherExpectation("identifier");
302
- var peg$e68 = peg$classExpectation([";", ",", " ", "\"", "\t", "\n", "\r", "=", "-", ">", "<", ":", "{", "["], true, false);
303
- var peg$e69 = peg$otherExpectation("whitespace");
304
- var peg$e70 = peg$classExpectation([" ", "\t"], false, false);
305
- var peg$e71 = peg$otherExpectation("line end");
306
- var peg$e72 = peg$classExpectation(["\r", "\n"], false, false);
307
- var peg$e73 = peg$literalExpectation("/*", false);
308
- var peg$e74 = peg$literalExpectation("*/", false);
309
- var peg$e75 = peg$literalExpectation("//", false);
310
- var peg$e76 = peg$classExpectation(["\r", "\n"], true, false);
311
- var peg$e77 = peg$otherExpectation("comment");
312
-
313
- var peg$f0 = function(statemachine) {
314
- statemachine.states = parserHelpers.extractUndeclaredStates(statemachine);
315
- return parserHelpers.classifyForkJoins(statemachine);
316
- };
317
- var peg$f1 = function(states, transitions) {
318
- let lStateMachine = {};
319
- parserHelpers.setIf(lStateMachine, 'states', states);
320
- parserHelpers.setIfNotEmpty(lStateMachine, 'transitions', transitions);
321
-
322
- return lStateMachine;
323
- };
324
- var peg$f2 = function(state) {return state};
325
- var peg$f3 = function(state) {return state};
326
- var peg$f4 = function(states) {
327
- return parserHelpers.uniq(states[0].concat(states[1]), parserHelpers.stateEqual);
328
- };
329
- var peg$f5 = function(notes, id, attrs) {return attrs};
330
- var peg$f6 = function(notes, id, extended_state_attributes, act) {return act};
331
- var peg$f7 = function(notes, id, extended_state_attributes, actions, sm) {return sm;};
332
- var peg$f8 = function(notes, id, extended_state_attributes, actions, statemachine) {
333
- let lState = parserHelpers.initState(id);
334
- (extended_state_attributes || []).forEach(
335
- pExtendedAttribute => parserHelpers.setIf(lState, pExtendedAttribute.name, pExtendedAttribute.value)
336
- );
337
- parserHelpers.setIf(lState, 'typeExplicitlySet', (extended_state_attributes || []).some(pExtendedAttribute => pExtendedAttribute.typeExplicitlySet));
338
- parserHelpers.setIf(lState, 'statemachine', statemachine);
339
- parserHelpers.setIfNotEmpty(lState, 'note', notes);
340
-
341
- if (Boolean(actions)) {
342
- parserHelpers.setIfNotEmpty(
343
- lState,
344
- 'actions',
345
- parserHelpers.extractActions(actions)
346
- );
347
- }
348
-
349
- return lState;
350
- };
351
- var peg$f9 = function(name, value) {
352
- return {name, value};
353
- };
354
- var peg$f10 = function(name, value) {
355
- return {name, value}
356
- };
357
- var peg$f11 = function(name) {
358
- return {name, value:true}
359
- };
360
- var peg$f12 = function(name, value) {
361
- return {name, value, typeExplicitlySet:true}
362
- };
363
- var peg$f13 = function(name) {
364
- return name.toLowerCase();
365
- };
366
- var peg$f14 = function(name) {
367
- return name.toLowerCase();
368
- };
369
- var peg$f15 = function(name) {
370
- return name.toLowerCase();
371
- };
372
- var peg$f16 = function(name) {
373
- return name.toLowerCase();
374
- };
375
- var peg$f17 = function(notes, trans, attrs) {return attrs};
376
- var peg$f18 = function(notes, trans, extended_attributes, lbl) {return lbl};
377
- var peg$f19 = function(notes, trans, extended_attributes, label) {
378
- if (label) {
379
- trans.label = label;
380
- trans = Object.assign(
381
- trans,
382
- parserHelpers.parseTransitionExpression(label)
383
- );
384
- }
385
- (extended_attributes || []).forEach(
386
- pExtendedAttribute => parserHelpers.setIf(trans, pExtendedAttribute.name, pExtendedAttribute.value)
387
- );
388
- parserHelpers.setIfNotEmpty(trans, 'note', notes);
389
-
390
- return trans;
391
- };
392
- var peg$f20 = function(from_, to) {
393
- return {
394
- from: from_,
395
- to: to
396
- }
397
- };
398
- var peg$f21 = function(to, from_) {
399
- return {
400
- from: from_,
401
- to: to
402
- }
403
- };
404
- var peg$f22 = function(name, value) {
405
- return {name, value};
406
- };
407
- var peg$f23 = function(name, value) {
408
- return {name, value};
409
- };
410
- var peg$f24 = function(name, value) {
411
- return {name, value};
412
- };
413
- var peg$f25 = function(name, value) {
414
- return {name, value};
415
- };
416
- var peg$f26 = function(name) {
417
- return name.toLowerCase();
418
- };
419
- var peg$f27 = function(name) {
420
- return name.toLowerCase();
421
- };
422
- var peg$f28 = function(name) {
423
- return name
424
- };
425
- var peg$f29 = function(com) {
426
- return com.join("").trim()
427
- };
428
- var peg$f30 = function(digits) { return parseFloat(digits.join("")); };
429
- var peg$f31 = function(digits) { return parseInt(digits.join(""), 10); };
430
- var peg$f32 = function(s) {return s.join("").replace(/\\\"/g, "\"")};
431
- var peg$f33 = function(c) {return c};
432
- var peg$f34 = function(s) {return s.join("")};
433
- var peg$f35 = function(c) {return c};
434
- var peg$f36 = function(s) {return s.join("").trim()};
435
- var peg$f37 = function(s) {return s.join("").trim()};
436
- var peg$f38 = function(c) {return c};
437
- var peg$f39 = function(c) {return c};
438
- var peg$f40 = function(chars) {return chars.join("")};
439
- var peg$f41 = function(c) {return c};
440
- var peg$f42 = function(c) {return c};
441
- var peg$f43 = function(c) {return c};
442
- var peg$f44 = function(start, com, end) {
443
- return start + com.join("") + end
444
- };
445
- var peg$f45 = function(start, com) {
446
- return start + com.join("")
447
- };
448
- var peg$currPos = 0;
449
- var peg$savedPos = 0;
450
- var peg$posDetailsCache = [{ line: 1, column: 1 }];
451
- var peg$maxFailPos = 0;
452
- var peg$maxFailExpected = [];
453
- var peg$silentFails = 0;
454
-
455
- var peg$result;
456
-
457
- if ("startRule" in options) {
458
- if (!(options.startRule in peg$startRuleFunctions)) {
459
- throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
460
- }
461
-
462
- peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
463
- }
464
-
465
- function text() {
466
- return input.substring(peg$savedPos, peg$currPos);
467
- }
468
-
469
- function offset() {
470
- return peg$savedPos;
471
- }
472
-
473
- function range() {
474
- return {
475
- source: peg$source,
476
- start: peg$savedPos,
477
- end: peg$currPos
478
- };
479
- }
480
-
481
- function location() {
482
- return peg$computeLocation(peg$savedPos, peg$currPos);
483
- }
484
-
485
- function expected(description, location) {
486
- location = location !== undefined
487
- ? location
488
- : peg$computeLocation(peg$savedPos, peg$currPos);
489
-
490
- throw peg$buildStructuredError(
491
- [peg$otherExpectation(description)],
492
- input.substring(peg$savedPos, peg$currPos),
493
- location
494
- );
495
- }
496
-
497
- function error(message, location) {
498
- location = location !== undefined
499
- ? location
500
- : peg$computeLocation(peg$savedPos, peg$currPos);
501
-
502
- throw peg$buildSimpleError(message, location);
503
- }
504
-
505
- function peg$literalExpectation(text, ignoreCase) {
506
- return { type: "literal", text: text, ignoreCase: ignoreCase };
507
- }
508
-
509
- function peg$classExpectation(parts, inverted, ignoreCase) {
510
- return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };
511
- }
512
-
513
- function peg$anyExpectation() {
514
- return { type: "any" };
515
- }
516
-
517
- function peg$endExpectation() {
518
- return { type: "end" };
519
- }
520
-
521
- function peg$otherExpectation(description) {
522
- return { type: "other", description: description };
523
- }
524
-
525
- function peg$computePosDetails(pos) {
526
- var details = peg$posDetailsCache[pos];
527
- var p;
528
-
529
- if (details) {
530
- return details;
531
- } else {
532
- p = pos - 1;
533
- while (!peg$posDetailsCache[p]) {
534
- p--;
535
- }
536
-
537
- details = peg$posDetailsCache[p];
538
- details = {
539
- line: details.line,
540
- column: details.column
541
- };
542
-
543
- while (p < pos) {
544
- if (input.charCodeAt(p) === 10) {
545
- details.line++;
546
- details.column = 1;
547
- } else {
548
- details.column++;
549
- }
550
-
551
- p++;
552
- }
553
-
554
- peg$posDetailsCache[pos] = details;
555
-
556
- return details;
557
- }
558
- }
559
-
560
- function peg$computeLocation(startPos, endPos, offset) {
561
- var startPosDetails = peg$computePosDetails(startPos);
562
- var endPosDetails = peg$computePosDetails(endPos);
563
-
564
- var res = {
565
- source: peg$source,
566
- start: {
567
- offset: startPos,
568
- line: startPosDetails.line,
569
- column: startPosDetails.column
570
- },
571
- end: {
572
- offset: endPos,
573
- line: endPosDetails.line,
574
- column: endPosDetails.column
575
- }
576
- };
577
- if (offset && peg$source && (typeof peg$source.offset === "function")) {
578
- res.start = peg$source.offset(res.start);
579
- res.end = peg$source.offset(res.end);
580
- }
581
- return res;
582
- }
583
-
584
- function peg$fail(expected) {
585
- if (peg$currPos < peg$maxFailPos) { return; }
586
-
587
- if (peg$currPos > peg$maxFailPos) {
588
- peg$maxFailPos = peg$currPos;
589
- peg$maxFailExpected = [];
590
- }
591
-
592
- peg$maxFailExpected.push(expected);
593
- }
594
-
595
- function peg$buildSimpleError(message, location) {
596
- return new peg$SyntaxError(message, null, null, location);
597
- }
598
-
599
- function peg$buildStructuredError(expected, found, location) {
600
- return new peg$SyntaxError(
601
- peg$SyntaxError.buildMessage(expected, found),
602
- expected,
603
- found,
604
- location
605
- );
606
- }
607
-
608
- function peg$parseprogram() {
609
- var s0, s1, s2, s3;
610
-
611
- s0 = peg$currPos;
612
- s1 = peg$parse_();
613
- s2 = peg$parsestatemachine();
614
- s3 = peg$parse_();
615
- peg$savedPos = s0;
616
- s0 = peg$f0(s2);
617
-
618
- return s0;
619
- }
620
-
621
- function peg$parsestatemachine() {
622
- var s0, s1, s2, s3;
623
-
624
- peg$silentFails++;
625
- s0 = peg$currPos;
626
- s1 = peg$parsestates();
627
- if (s1 === peg$FAILED) {
628
- s1 = null;
629
- }
630
- s2 = [];
631
- s3 = peg$parsetransition();
632
- while (s3 !== peg$FAILED) {
633
- s2.push(s3);
634
- s3 = peg$parsetransition();
635
- }
636
- peg$savedPos = s0;
637
- s0 = peg$f1(s1, s2);
638
- peg$silentFails--;
639
- s1 = peg$FAILED;
640
- if (peg$silentFails === 0) { peg$fail(peg$e0); }
641
-
642
- return s0;
643
- }
644
-
645
- function peg$parsestates() {
646
- var s0, s1, s2, s3, s4, s5;
647
-
648
- s0 = peg$currPos;
649
- s1 = peg$currPos;
650
- s2 = [];
651
- s3 = peg$currPos;
652
- s4 = peg$parsestate();
653
- if (s4 !== peg$FAILED) {
654
- if (input.charCodeAt(peg$currPos) === 44) {
655
- s5 = peg$c0;
656
- peg$currPos++;
657
- } else {
658
- s5 = peg$FAILED;
659
- if (peg$silentFails === 0) { peg$fail(peg$e1); }
660
- }
661
- if (s5 !== peg$FAILED) {
662
- peg$savedPos = s3;
663
- s3 = peg$f2(s4);
664
- } else {
665
- peg$currPos = s3;
666
- s3 = peg$FAILED;
667
- }
668
- } else {
669
- peg$currPos = s3;
670
- s3 = peg$FAILED;
671
- }
672
- while (s3 !== peg$FAILED) {
673
- s2.push(s3);
674
- s3 = peg$currPos;
675
- s4 = peg$parsestate();
676
- if (s4 !== peg$FAILED) {
677
- if (input.charCodeAt(peg$currPos) === 44) {
678
- s5 = peg$c0;
679
- peg$currPos++;
680
- } else {
681
- s5 = peg$FAILED;
682
- if (peg$silentFails === 0) { peg$fail(peg$e1); }
683
- }
684
- if (s5 !== peg$FAILED) {
685
- peg$savedPos = s3;
686
- s3 = peg$f2(s4);
687
- } else {
688
- peg$currPos = s3;
689
- s3 = peg$FAILED;
690
- }
691
- } else {
692
- peg$currPos = s3;
693
- s3 = peg$FAILED;
694
- }
695
- }
696
- s3 = peg$currPos;
697
- s4 = peg$parsestate();
698
- if (s4 !== peg$FAILED) {
699
- if (input.charCodeAt(peg$currPos) === 59) {
700
- s5 = peg$c1;
701
- peg$currPos++;
702
- } else {
703
- s5 = peg$FAILED;
704
- if (peg$silentFails === 0) { peg$fail(peg$e2); }
705
- }
706
- if (s5 !== peg$FAILED) {
707
- peg$savedPos = s3;
708
- s3 = peg$f3(s4);
709
- } else {
710
- peg$currPos = s3;
711
- s3 = peg$FAILED;
712
- }
713
- } else {
714
- peg$currPos = s3;
715
- s3 = peg$FAILED;
716
- }
717
- if (s3 !== peg$FAILED) {
718
- s2 = [s2, s3];
719
- s1 = s2;
720
- } else {
721
- peg$currPos = s1;
722
- s1 = peg$FAILED;
723
- }
724
- if (s1 !== peg$FAILED) {
725
- peg$savedPos = s0;
726
- s1 = peg$f4(s1);
727
- }
728
- s0 = s1;
729
-
730
- return s0;
731
- }
732
-
733
- function peg$parsestate() {
734
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14;
735
-
736
- peg$silentFails++;
737
- s0 = peg$currPos;
738
- s1 = [];
739
- s2 = peg$parsenote();
740
- while (s2 !== peg$FAILED) {
741
- s1.push(s2);
742
- s2 = peg$parsenote();
743
- }
744
- s2 = peg$parse_();
745
- s3 = peg$parseidentifier();
746
- if (s3 !== peg$FAILED) {
747
- s4 = peg$parse_();
748
- s5 = peg$currPos;
749
- if (input.charCodeAt(peg$currPos) === 91) {
750
- s6 = peg$c2;
751
- peg$currPos++;
752
- } else {
753
- s6 = peg$FAILED;
754
- if (peg$silentFails === 0) { peg$fail(peg$e4); }
755
- }
756
- if (s6 !== peg$FAILED) {
757
- s7 = peg$parseextended_state_attributes();
758
- if (input.charCodeAt(peg$currPos) === 93) {
759
- s8 = peg$c3;
760
- peg$currPos++;
761
- } else {
762
- s8 = peg$FAILED;
763
- if (peg$silentFails === 0) { peg$fail(peg$e5); }
764
- }
765
- if (s8 !== peg$FAILED) {
766
- peg$savedPos = s5;
767
- s5 = peg$f5(s1, s3, s7);
768
- } else {
769
- peg$currPos = s5;
770
- s5 = peg$FAILED;
771
- }
772
- } else {
773
- peg$currPos = s5;
774
- s5 = peg$FAILED;
775
- }
776
- if (s5 === peg$FAILED) {
777
- s5 = null;
778
- }
779
- s6 = peg$parse_();
780
- s7 = peg$currPos;
781
- if (input.charCodeAt(peg$currPos) === 58) {
782
- s8 = peg$c4;
783
- peg$currPos++;
784
- } else {
785
- s8 = peg$FAILED;
786
- if (peg$silentFails === 0) { peg$fail(peg$e6); }
787
- }
788
- if (s8 !== peg$FAILED) {
789
- s9 = peg$parse_();
790
- s10 = peg$parsestring();
791
- if (s10 !== peg$FAILED) {
792
- s11 = peg$parse_();
793
- peg$savedPos = s7;
794
- s7 = peg$f6(s1, s3, s5, s10);
795
- } else {
796
- peg$currPos = s7;
797
- s7 = peg$FAILED;
798
- }
799
- } else {
800
- peg$currPos = s7;
801
- s7 = peg$FAILED;
802
- }
803
- if (s7 === peg$FAILED) {
804
- s7 = null;
805
- }
806
- s8 = peg$parse_();
807
- s9 = peg$currPos;
808
- if (input.charCodeAt(peg$currPos) === 123) {
809
- s10 = peg$c5;
810
- peg$currPos++;
811
- } else {
812
- s10 = peg$FAILED;
813
- if (peg$silentFails === 0) { peg$fail(peg$e7); }
814
- }
815
- if (s10 !== peg$FAILED) {
816
- s11 = peg$parse_();
817
- s12 = peg$parsestatemachine();
818
- if (s12 !== peg$FAILED) {
819
- s13 = peg$parse_();
820
- if (input.charCodeAt(peg$currPos) === 125) {
821
- s14 = peg$c6;
822
- peg$currPos++;
823
- } else {
824
- s14 = peg$FAILED;
825
- if (peg$silentFails === 0) { peg$fail(peg$e8); }
826
- }
827
- if (s14 !== peg$FAILED) {
828
- peg$savedPos = s9;
829
- s9 = peg$f7(s1, s3, s5, s7, s12);
830
- } else {
831
- peg$currPos = s9;
832
- s9 = peg$FAILED;
833
- }
834
- } else {
835
- peg$currPos = s9;
836
- s9 = peg$FAILED;
837
- }
838
- } else {
839
- peg$currPos = s9;
840
- s9 = peg$FAILED;
841
- }
842
- if (s9 === peg$FAILED) {
843
- s9 = null;
844
- }
845
- s10 = peg$parse_();
846
- peg$savedPos = s0;
847
- s0 = peg$f8(s1, s3, s5, s7, s9);
848
- } else {
849
- peg$currPos = s0;
850
- s0 = peg$FAILED;
851
- }
852
- peg$silentFails--;
853
- if (s0 === peg$FAILED) {
854
- s1 = peg$FAILED;
855
- if (peg$silentFails === 0) { peg$fail(peg$e3); }
856
- }
857
-
858
- return s0;
859
- }
860
-
861
- function peg$parseextended_state_attributes() {
862
- var s0, s1;
863
-
864
- peg$silentFails++;
865
- s0 = [];
866
- s1 = peg$parseextended_state_attribute();
867
- while (s1 !== peg$FAILED) {
868
- s0.push(s1);
869
- s1 = peg$parseextended_state_attribute();
870
- }
871
- peg$silentFails--;
872
- s1 = peg$FAILED;
873
- if (peg$silentFails === 0) { peg$fail(peg$e9); }
874
-
875
- return s0;
876
- }
877
-
878
- function peg$parseextended_state_attribute() {
879
- var s0, s1, s2, s3, s4, s5, s6, s7;
880
-
881
- peg$silentFails++;
882
- s0 = peg$currPos;
883
- s1 = peg$parse_();
884
- s2 = peg$parseextended_state_string_attribute_name();
885
- if (s2 !== peg$FAILED) {
886
- s3 = peg$parse_();
887
- if (input.charCodeAt(peg$currPos) === 61) {
888
- s4 = peg$c7;
889
- peg$currPos++;
890
- } else {
891
- s4 = peg$FAILED;
892
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
893
- }
894
- if (s4 !== peg$FAILED) {
895
- s5 = peg$parse_();
896
- s6 = peg$parsequotedstring();
897
- if (s6 !== peg$FAILED) {
898
- s7 = peg$parse_();
899
- peg$savedPos = s0;
900
- s0 = peg$f9(s2, s6);
901
- } else {
902
- peg$currPos = s0;
903
- s0 = peg$FAILED;
904
- }
905
- } else {
906
- peg$currPos = s0;
907
- s0 = peg$FAILED;
908
- }
909
- } else {
910
- peg$currPos = s0;
911
- s0 = peg$FAILED;
912
- }
913
- if (s0 === peg$FAILED) {
914
- s0 = peg$currPos;
915
- s1 = peg$parse_();
916
- s2 = peg$parseclass_attribute_name();
917
- if (s2 !== peg$FAILED) {
918
- s3 = peg$parse_();
919
- if (input.charCodeAt(peg$currPos) === 61) {
920
- s4 = peg$c7;
921
- peg$currPos++;
922
- } else {
923
- s4 = peg$FAILED;
924
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
925
- }
926
- if (s4 !== peg$FAILED) {
927
- s5 = peg$parse_();
928
- s6 = peg$parseclass_string();
929
- if (s6 !== peg$FAILED) {
930
- s7 = peg$parse_();
931
- peg$savedPos = s0;
932
- s0 = peg$f10(s2, s6);
933
- } else {
934
- peg$currPos = s0;
935
- s0 = peg$FAILED;
936
- }
937
- } else {
938
- peg$currPos = s0;
939
- s0 = peg$FAILED;
940
- }
941
- } else {
942
- peg$currPos = s0;
943
- s0 = peg$FAILED;
944
- }
945
- if (s0 === peg$FAILED) {
946
- s0 = peg$currPos;
947
- s1 = peg$parse_();
948
- s2 = peg$parseextended_state_boolean_attribute_name();
949
- if (s2 !== peg$FAILED) {
950
- s3 = peg$parse_();
951
- peg$savedPos = s0;
952
- s0 = peg$f11(s2);
953
- } else {
954
- peg$currPos = s0;
955
- s0 = peg$FAILED;
956
- }
957
- if (s0 === peg$FAILED) {
958
- s0 = peg$currPos;
959
- s1 = peg$parse_();
960
- s2 = peg$parseextended_state_type_attribute_name();
961
- if (s2 !== peg$FAILED) {
962
- s3 = peg$parse_();
963
- if (input.charCodeAt(peg$currPos) === 61) {
964
- s4 = peg$c7;
965
- peg$currPos++;
966
- } else {
967
- s4 = peg$FAILED;
968
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
969
- }
970
- if (s4 !== peg$FAILED) {
971
- s5 = peg$parse_();
972
- s6 = peg$parseextended_state_type_attribute_type();
973
- if (s6 !== peg$FAILED) {
974
- s7 = peg$parse_();
975
- peg$savedPos = s0;
976
- s0 = peg$f12(s2, s6);
977
- } else {
978
- peg$currPos = s0;
979
- s0 = peg$FAILED;
980
- }
981
- } else {
982
- peg$currPos = s0;
983
- s0 = peg$FAILED;
984
- }
985
- } else {
986
- peg$currPos = s0;
987
- s0 = peg$FAILED;
988
- }
989
- }
990
- }
991
- }
992
- peg$silentFails--;
993
- if (s0 === peg$FAILED) {
994
- s1 = peg$FAILED;
995
- if (peg$silentFails === 0) { peg$fail(peg$e10); }
996
- }
997
-
998
- return s0;
999
- }
1000
-
1001
- function peg$parseextended_state_string_attribute_name() {
1002
- var s0, s1;
1003
-
1004
- peg$silentFails++;
1005
- s0 = peg$currPos;
1006
- if (input.substr(peg$currPos, 5).toLowerCase() === peg$c8) {
1007
- s1 = input.substr(peg$currPos, 5);
1008
- peg$currPos += 5;
1009
- } else {
1010
- s1 = peg$FAILED;
1011
- if (peg$silentFails === 0) { peg$fail(peg$e13); }
1012
- }
1013
- if (s1 === peg$FAILED) {
1014
- if (input.substr(peg$currPos, 5).toLowerCase() === peg$c9) {
1015
- s1 = input.substr(peg$currPos, 5);
1016
- peg$currPos += 5;
1017
- } else {
1018
- s1 = peg$FAILED;
1019
- if (peg$silentFails === 0) { peg$fail(peg$e14); }
1020
- }
1021
- }
1022
- if (s1 !== peg$FAILED) {
1023
- peg$savedPos = s0;
1024
- s1 = peg$f13(s1);
1025
- }
1026
- s0 = s1;
1027
- peg$silentFails--;
1028
- if (s0 === peg$FAILED) {
1029
- s1 = peg$FAILED;
1030
- if (peg$silentFails === 0) { peg$fail(peg$e12); }
1031
- }
1032
-
1033
- return s0;
1034
- }
1035
-
1036
- function peg$parseclass_attribute_name() {
1037
- var s0, s1;
1038
-
1039
- peg$silentFails++;
1040
- s0 = peg$currPos;
1041
- if (input.substr(peg$currPos, 5).toLowerCase() === peg$c10) {
1042
- s1 = input.substr(peg$currPos, 5);
1043
- peg$currPos += 5;
1044
- } else {
1045
- s1 = peg$FAILED;
1046
- if (peg$silentFails === 0) { peg$fail(peg$e16); }
1047
- }
1048
- if (s1 !== peg$FAILED) {
1049
- peg$savedPos = s0;
1050
- s1 = peg$f14(s1);
1051
- }
1052
- s0 = s1;
1053
- peg$silentFails--;
1054
- if (s0 === peg$FAILED) {
1055
- s1 = peg$FAILED;
1056
- if (peg$silentFails === 0) { peg$fail(peg$e15); }
1057
- }
1058
-
1059
- return s0;
1060
- }
1061
-
1062
- function peg$parseextended_state_boolean_attribute_name() {
1063
- var s0, s1;
1064
-
1065
- peg$silentFails++;
1066
- s0 = peg$currPos;
1067
- if (input.substr(peg$currPos, 6).toLowerCase() === peg$c11) {
1068
- s1 = input.substr(peg$currPos, 6);
1069
- peg$currPos += 6;
1070
- } else {
1071
- s1 = peg$FAILED;
1072
- if (peg$silentFails === 0) { peg$fail(peg$e18); }
1073
- }
1074
- if (s1 !== peg$FAILED) {
1075
- peg$savedPos = s0;
1076
- s1 = peg$f15(s1);
1077
- }
1078
- s0 = s1;
1079
- peg$silentFails--;
1080
- if (s0 === peg$FAILED) {
1081
- s1 = peg$FAILED;
1082
- if (peg$silentFails === 0) { peg$fail(peg$e17); }
1083
- }
1084
-
1085
- return s0;
1086
- }
1087
-
1088
- function peg$parseextended_state_type_attribute_name() {
1089
- var s0, s1;
1090
-
1091
- peg$silentFails++;
1092
- s0 = peg$currPos;
1093
- if (input.substr(peg$currPos, 4).toLowerCase() === peg$c12) {
1094
- s1 = input.substr(peg$currPos, 4);
1095
- peg$currPos += 4;
1096
- } else {
1097
- s1 = peg$FAILED;
1098
- if (peg$silentFails === 0) { peg$fail(peg$e20); }
1099
- }
1100
- if (s1 !== peg$FAILED) {
1101
- peg$savedPos = s0;
1102
- s1 = peg$f16(s1);
1103
- }
1104
- s0 = s1;
1105
- peg$silentFails--;
1106
- if (s0 === peg$FAILED) {
1107
- s1 = peg$FAILED;
1108
- if (peg$silentFails === 0) { peg$fail(peg$e19); }
1109
- }
1110
-
1111
- return s0;
1112
- }
1113
-
1114
- function peg$parseextended_state_type_attribute_type() {
1115
- var s0, s1;
1116
-
1117
- peg$silentFails++;
1118
- if (input.substr(peg$currPos, 7) === peg$c13) {
1119
- s0 = peg$c13;
1120
- peg$currPos += 7;
1121
- } else {
1122
- s0 = peg$FAILED;
1123
- if (peg$silentFails === 0) { peg$fail(peg$e22); }
1124
- }
1125
- if (s0 === peg$FAILED) {
1126
- if (input.substr(peg$currPos, 7) === peg$c14) {
1127
- s0 = peg$c14;
1128
- peg$currPos += 7;
1129
- } else {
1130
- s0 = peg$FAILED;
1131
- if (peg$silentFails === 0) { peg$fail(peg$e23); }
1132
- }
1133
- if (s0 === peg$FAILED) {
1134
- if (input.substr(peg$currPos, 9) === peg$c15) {
1135
- s0 = peg$c15;
1136
- peg$currPos += 9;
1137
- } else {
1138
- s0 = peg$FAILED;
1139
- if (peg$silentFails === 0) { peg$fail(peg$e24); }
1140
- }
1141
- if (s0 === peg$FAILED) {
1142
- if (input.substr(peg$currPos, 5) === peg$c16) {
1143
- s0 = peg$c16;
1144
- peg$currPos += 5;
1145
- } else {
1146
- s0 = peg$FAILED;
1147
- if (peg$silentFails === 0) { peg$fail(peg$e25); }
1148
- }
1149
- if (s0 === peg$FAILED) {
1150
- if (input.substr(peg$currPos, 8) === peg$c17) {
1151
- s0 = peg$c17;
1152
- peg$currPos += 8;
1153
- } else {
1154
- s0 = peg$FAILED;
1155
- if (peg$silentFails === 0) { peg$fail(peg$e26); }
1156
- }
1157
- if (s0 === peg$FAILED) {
1158
- if (input.substr(peg$currPos, 7) === peg$c18) {
1159
- s0 = peg$c18;
1160
- peg$currPos += 7;
1161
- } else {
1162
- s0 = peg$FAILED;
1163
- if (peg$silentFails === 0) { peg$fail(peg$e27); }
1164
- }
1165
- if (s0 === peg$FAILED) {
1166
- if (input.substr(peg$currPos, 11) === peg$c19) {
1167
- s0 = peg$c19;
1168
- peg$currPos += 11;
1169
- } else {
1170
- s0 = peg$FAILED;
1171
- if (peg$silentFails === 0) { peg$fail(peg$e28); }
1172
- }
1173
- if (s0 === peg$FAILED) {
1174
- if (input.substr(peg$currPos, 6) === peg$c20) {
1175
- s0 = peg$c20;
1176
- peg$currPos += 6;
1177
- } else {
1178
- s0 = peg$FAILED;
1179
- if (peg$silentFails === 0) { peg$fail(peg$e29); }
1180
- }
1181
- if (s0 === peg$FAILED) {
1182
- if (input.substr(peg$currPos, 8) === peg$c21) {
1183
- s0 = peg$c21;
1184
- peg$currPos += 8;
1185
- } else {
1186
- s0 = peg$FAILED;
1187
- if (peg$silentFails === 0) { peg$fail(peg$e30); }
1188
- }
1189
- if (s0 === peg$FAILED) {
1190
- if (input.substr(peg$currPos, 4) === peg$c22) {
1191
- s0 = peg$c22;
1192
- peg$currPos += 4;
1193
- } else {
1194
- s0 = peg$FAILED;
1195
- if (peg$silentFails === 0) { peg$fail(peg$e31); }
1196
- }
1197
- if (s0 === peg$FAILED) {
1198
- if (input.substr(peg$currPos, 4) === peg$c23) {
1199
- s0 = peg$c23;
1200
- peg$currPos += 4;
1201
- } else {
1202
- s0 = peg$FAILED;
1203
- if (peg$silentFails === 0) { peg$fail(peg$e32); }
1204
- }
1205
- if (s0 === peg$FAILED) {
1206
- if (input.substr(peg$currPos, 8) === peg$c24) {
1207
- s0 = peg$c24;
1208
- peg$currPos += 8;
1209
- } else {
1210
- s0 = peg$FAILED;
1211
- if (peg$silentFails === 0) { peg$fail(peg$e33); }
1212
- }
1213
- }
1214
- }
1215
- }
1216
- }
1217
- }
1218
- }
1219
- }
1220
- }
1221
- }
1222
- }
1223
- }
1224
- peg$silentFails--;
1225
- if (s0 === peg$FAILED) {
1226
- s1 = peg$FAILED;
1227
- if (peg$silentFails === 0) { peg$fail(peg$e21); }
1228
- }
1229
-
1230
- return s0;
1231
- }
1232
-
1233
- function peg$parsetransition() {
1234
- var s0, s1, s2, s3, s4, s5, s6, s7, s8;
1235
-
1236
- peg$silentFails++;
1237
- s0 = peg$currPos;
1238
- s1 = [];
1239
- s2 = peg$parsenote();
1240
- while (s2 !== peg$FAILED) {
1241
- s1.push(s2);
1242
- s2 = peg$parsenote();
1243
- }
1244
- s2 = peg$parsetransitionbase();
1245
- if (s2 !== peg$FAILED) {
1246
- s3 = peg$currPos;
1247
- if (input.charCodeAt(peg$currPos) === 91) {
1248
- s4 = peg$c2;
1249
- peg$currPos++;
1250
- } else {
1251
- s4 = peg$FAILED;
1252
- if (peg$silentFails === 0) { peg$fail(peg$e4); }
1253
- }
1254
- if (s4 !== peg$FAILED) {
1255
- s5 = peg$parseextended_transition_attributes();
1256
- if (input.charCodeAt(peg$currPos) === 93) {
1257
- s6 = peg$c3;
1258
- peg$currPos++;
1259
- } else {
1260
- s6 = peg$FAILED;
1261
- if (peg$silentFails === 0) { peg$fail(peg$e5); }
1262
- }
1263
- if (s6 !== peg$FAILED) {
1264
- s7 = peg$parse_();
1265
- peg$savedPos = s3;
1266
- s3 = peg$f17(s1, s2, s5);
1267
- } else {
1268
- peg$currPos = s3;
1269
- s3 = peg$FAILED;
1270
- }
1271
- } else {
1272
- peg$currPos = s3;
1273
- s3 = peg$FAILED;
1274
- }
1275
- if (s3 === peg$FAILED) {
1276
- s3 = null;
1277
- }
1278
- s4 = peg$currPos;
1279
- if (input.charCodeAt(peg$currPos) === 58) {
1280
- s5 = peg$c4;
1281
- peg$currPos++;
1282
- } else {
1283
- s5 = peg$FAILED;
1284
- if (peg$silentFails === 0) { peg$fail(peg$e6); }
1285
- }
1286
- if (s5 !== peg$FAILED) {
1287
- s6 = peg$parse_();
1288
- s7 = peg$parsetransitionstring();
1289
- if (s7 !== peg$FAILED) {
1290
- s8 = peg$parse_();
1291
- peg$savedPos = s4;
1292
- s4 = peg$f18(s1, s2, s3, s7);
1293
- } else {
1294
- peg$currPos = s4;
1295
- s4 = peg$FAILED;
1296
- }
1297
- } else {
1298
- peg$currPos = s4;
1299
- s4 = peg$FAILED;
1300
- }
1301
- if (s4 === peg$FAILED) {
1302
- s4 = null;
1303
- }
1304
- if (input.charCodeAt(peg$currPos) === 59) {
1305
- s5 = peg$c1;
1306
- peg$currPos++;
1307
- } else {
1308
- s5 = peg$FAILED;
1309
- if (peg$silentFails === 0) { peg$fail(peg$e2); }
1310
- }
1311
- if (s5 !== peg$FAILED) {
1312
- peg$savedPos = s0;
1313
- s0 = peg$f19(s1, s2, s3, s4);
1314
- } else {
1315
- peg$currPos = s0;
1316
- s0 = peg$FAILED;
1317
- }
1318
- } else {
1319
- peg$currPos = s0;
1320
- s0 = peg$FAILED;
1321
- }
1322
- peg$silentFails--;
1323
- if (s0 === peg$FAILED) {
1324
- s1 = peg$FAILED;
1325
- if (peg$silentFails === 0) { peg$fail(peg$e34); }
1326
- }
1327
-
1328
- return s0;
1329
- }
1330
-
1331
- function peg$parsetransitionbase() {
1332
- var s0, s1, s2, s3, s4, s5, s6, s7;
1333
-
1334
- s0 = peg$currPos;
1335
- s1 = peg$parse_();
1336
- s2 = peg$parseidentifier();
1337
- if (s2 !== peg$FAILED) {
1338
- s3 = peg$parse_();
1339
- s4 = peg$parsefwdarrowtoken();
1340
- if (s4 !== peg$FAILED) {
1341
- s5 = peg$parse_();
1342
- s6 = peg$parseidentifier();
1343
- if (s6 !== peg$FAILED) {
1344
- s7 = peg$parse_();
1345
- peg$savedPos = s0;
1346
- s0 = peg$f20(s2, s6);
1347
- } else {
1348
- peg$currPos = s0;
1349
- s0 = peg$FAILED;
1350
- }
1351
- } else {
1352
- peg$currPos = s0;
1353
- s0 = peg$FAILED;
1354
- }
1355
- } else {
1356
- peg$currPos = s0;
1357
- s0 = peg$FAILED;
1358
- }
1359
- if (s0 === peg$FAILED) {
1360
- s0 = peg$currPos;
1361
- s1 = peg$parse_();
1362
- s2 = peg$parseidentifier();
1363
- if (s2 !== peg$FAILED) {
1364
- s3 = peg$parse_();
1365
- s4 = peg$parsebckarrowtoken();
1366
- if (s4 !== peg$FAILED) {
1367
- s5 = peg$parse_();
1368
- s6 = peg$parseidentifier();
1369
- if (s6 !== peg$FAILED) {
1370
- s7 = peg$parse_();
1371
- peg$savedPos = s0;
1372
- s0 = peg$f21(s2, s6);
1373
- } else {
1374
- peg$currPos = s0;
1375
- s0 = peg$FAILED;
1376
- }
1377
- } else {
1378
- peg$currPos = s0;
1379
- s0 = peg$FAILED;
1380
- }
1381
- } else {
1382
- peg$currPos = s0;
1383
- s0 = peg$FAILED;
1384
- }
1385
- }
1386
-
1387
- return s0;
1388
- }
1389
-
1390
- function peg$parseextended_transition_attributes() {
1391
- var s0, s1;
1392
-
1393
- peg$silentFails++;
1394
- s0 = [];
1395
- s1 = peg$parseextended_transition_attribute();
1396
- while (s1 !== peg$FAILED) {
1397
- s0.push(s1);
1398
- s1 = peg$parseextended_transition_attribute();
1399
- }
1400
- peg$silentFails--;
1401
- s1 = peg$FAILED;
1402
- if (peg$silentFails === 0) { peg$fail(peg$e35); }
1403
-
1404
- return s0;
1405
- }
1406
-
1407
- function peg$parseextended_transition_attribute() {
1408
- var s0, s1, s2, s3, s4, s5, s6, s7;
1409
-
1410
- peg$silentFails++;
1411
- s0 = peg$currPos;
1412
- s1 = peg$parse_();
1413
- s2 = peg$parseextended_transition_string_attribute_name();
1414
- if (s2 !== peg$FAILED) {
1415
- s3 = peg$parse_();
1416
- if (input.charCodeAt(peg$currPos) === 61) {
1417
- s4 = peg$c7;
1418
- peg$currPos++;
1419
- } else {
1420
- s4 = peg$FAILED;
1421
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
1422
- }
1423
- if (s4 !== peg$FAILED) {
1424
- s5 = peg$parse_();
1425
- s6 = peg$parsequotedstring();
1426
- if (s6 !== peg$FAILED) {
1427
- s7 = peg$parse_();
1428
- peg$savedPos = s0;
1429
- s0 = peg$f22(s2, s6);
1430
- } else {
1431
- peg$currPos = s0;
1432
- s0 = peg$FAILED;
1433
- }
1434
- } else {
1435
- peg$currPos = s0;
1436
- s0 = peg$FAILED;
1437
- }
1438
- } else {
1439
- peg$currPos = s0;
1440
- s0 = peg$FAILED;
1441
- }
1442
- if (s0 === peg$FAILED) {
1443
- s0 = peg$currPos;
1444
- s1 = peg$parse_();
1445
- s2 = peg$parseclass_attribute_name();
1446
- if (s2 !== peg$FAILED) {
1447
- s3 = peg$parse_();
1448
- if (input.charCodeAt(peg$currPos) === 61) {
1449
- s4 = peg$c7;
1450
- peg$currPos++;
1451
- } else {
1452
- s4 = peg$FAILED;
1453
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
1454
- }
1455
- if (s4 !== peg$FAILED) {
1456
- s5 = peg$parse_();
1457
- s6 = peg$parseclass_string();
1458
- if (s6 !== peg$FAILED) {
1459
- s7 = peg$parse_();
1460
- peg$savedPos = s0;
1461
- s0 = peg$f23(s2, s6);
1462
- } else {
1463
- peg$currPos = s0;
1464
- s0 = peg$FAILED;
1465
- }
1466
- } else {
1467
- peg$currPos = s0;
1468
- s0 = peg$FAILED;
1469
- }
1470
- } else {
1471
- peg$currPos = s0;
1472
- s0 = peg$FAILED;
1473
- }
1474
- if (s0 === peg$FAILED) {
1475
- s0 = peg$currPos;
1476
- s1 = peg$parse_();
1477
- s2 = peg$parseextended_transition_type_name();
1478
- if (s2 !== peg$FAILED) {
1479
- s3 = peg$parse_();
1480
- if (input.charCodeAt(peg$currPos) === 61) {
1481
- s4 = peg$c7;
1482
- peg$currPos++;
1483
- } else {
1484
- s4 = peg$FAILED;
1485
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
1486
- }
1487
- if (s4 !== peg$FAILED) {
1488
- s5 = peg$parse_();
1489
- s6 = peg$parseextended_transition_type_value();
1490
- if (s6 !== peg$FAILED) {
1491
- s7 = peg$parse_();
1492
- peg$savedPos = s0;
1493
- s0 = peg$f24(s2, s6);
1494
- } else {
1495
- peg$currPos = s0;
1496
- s0 = peg$FAILED;
1497
- }
1498
- } else {
1499
- peg$currPos = s0;
1500
- s0 = peg$FAILED;
1501
- }
1502
- } else {
1503
- peg$currPos = s0;
1504
- s0 = peg$FAILED;
1505
- }
1506
- if (s0 === peg$FAILED) {
1507
- s0 = peg$currPos;
1508
- s1 = peg$parse_();
1509
- s2 = peg$parseextended_transition_numeric_attribute_name();
1510
- if (s2 !== peg$FAILED) {
1511
- s3 = peg$parse_();
1512
- if (input.charCodeAt(peg$currPos) === 61) {
1513
- s4 = peg$c7;
1514
- peg$currPos++;
1515
- } else {
1516
- s4 = peg$FAILED;
1517
- if (peg$silentFails === 0) { peg$fail(peg$e11); }
1518
- }
1519
- if (s4 !== peg$FAILED) {
1520
- s5 = peg$parse_();
1521
- s6 = peg$parsepositive_number();
1522
- if (s6 !== peg$FAILED) {
1523
- s7 = peg$parse_();
1524
- peg$savedPos = s0;
1525
- s0 = peg$f25(s2, s6);
1526
- } else {
1527
- peg$currPos = s0;
1528
- s0 = peg$FAILED;
1529
- }
1530
- } else {
1531
- peg$currPos = s0;
1532
- s0 = peg$FAILED;
1533
- }
1534
- } else {
1535
- peg$currPos = s0;
1536
- s0 = peg$FAILED;
1537
- }
1538
- }
1539
- }
1540
- }
1541
- peg$silentFails--;
1542
- if (s0 === peg$FAILED) {
1543
- s1 = peg$FAILED;
1544
- if (peg$silentFails === 0) { peg$fail(peg$e36); }
1545
- }
1546
-
1547
- return s0;
1548
- }
1549
-
1550
- function peg$parseextended_transition_string_attribute_name() {
1551
- var s0, s1;
1552
-
1553
- peg$silentFails++;
1554
- s0 = peg$currPos;
1555
- if (input.substr(peg$currPos, 5).toLowerCase() === peg$c9) {
1556
- s1 = input.substr(peg$currPos, 5);
1557
- peg$currPos += 5;
1558
- } else {
1559
- s1 = peg$FAILED;
1560
- if (peg$silentFails === 0) { peg$fail(peg$e14); }
1561
- }
1562
- if (s1 !== peg$FAILED) {
1563
- peg$savedPos = s0;
1564
- s1 = peg$f26(s1);
1565
- }
1566
- s0 = s1;
1567
- peg$silentFails--;
1568
- if (s0 === peg$FAILED) {
1569
- s1 = peg$FAILED;
1570
- if (peg$silentFails === 0) { peg$fail(peg$e37); }
1571
- }
1572
-
1573
- return s0;
1574
- }
1575
-
1576
- function peg$parseextended_transition_type_name() {
1577
- var s0, s1;
1578
-
1579
- peg$silentFails++;
1580
- s0 = peg$currPos;
1581
- if (input.substr(peg$currPos, 4).toLowerCase() === peg$c12) {
1582
- s1 = input.substr(peg$currPos, 4);
1583
- peg$currPos += 4;
1584
- } else {
1585
- s1 = peg$FAILED;
1586
- if (peg$silentFails === 0) { peg$fail(peg$e20); }
1587
- }
1588
- if (s1 !== peg$FAILED) {
1589
- peg$savedPos = s0;
1590
- s1 = peg$f27(s1);
1591
- }
1592
- s0 = s1;
1593
- peg$silentFails--;
1594
- if (s0 === peg$FAILED) {
1595
- s1 = peg$FAILED;
1596
- if (peg$silentFails === 0) { peg$fail(peg$e38); }
1597
- }
1598
-
1599
- return s0;
1600
- }
1601
-
1602
- function peg$parseextended_transition_numeric_attribute_name() {
1603
- var s0, s1;
1604
-
1605
- peg$silentFails++;
1606
- s0 = peg$currPos;
1607
- if (input.substr(peg$currPos, 5).toLowerCase() === peg$c25) {
1608
- s1 = input.substr(peg$currPos, 5);
1609
- peg$currPos += 5;
1610
- } else {
1611
- s1 = peg$FAILED;
1612
- if (peg$silentFails === 0) { peg$fail(peg$e40); }
1613
- }
1614
- if (s1 !== peg$FAILED) {
1615
- peg$savedPos = s0;
1616
- s1 = peg$f28(s1);
1617
- }
1618
- s0 = s1;
1619
- peg$silentFails--;
1620
- if (s0 === peg$FAILED) {
1621
- s1 = peg$FAILED;
1622
- if (peg$silentFails === 0) { peg$fail(peg$e39); }
1623
- }
1624
-
1625
- return s0;
1626
- }
1627
-
1628
- function peg$parseextended_transition_type_value() {
1629
- var s0, s1;
1630
-
1631
- peg$silentFails++;
1632
- if (input.substr(peg$currPos, 8) === peg$c26) {
1633
- s0 = peg$c26;
1634
- peg$currPos += 8;
1635
- } else {
1636
- s0 = peg$FAILED;
1637
- if (peg$silentFails === 0) { peg$fail(peg$e42); }
1638
- }
1639
- if (s0 === peg$FAILED) {
1640
- if (input.substr(peg$currPos, 8) === peg$c27) {
1641
- s0 = peg$c27;
1642
- peg$currPos += 8;
1643
- } else {
1644
- s0 = peg$FAILED;
1645
- if (peg$silentFails === 0) { peg$fail(peg$e43); }
1646
- }
1647
- }
1648
- peg$silentFails--;
1649
- if (s0 === peg$FAILED) {
1650
- s1 = peg$FAILED;
1651
- if (peg$silentFails === 0) { peg$fail(peg$e41); }
1652
- }
1653
-
1654
- return s0;
1655
- }
1656
-
1657
- function peg$parsefwdarrowtoken() {
1658
- var s0, s1;
1659
-
1660
- peg$silentFails++;
1661
- if (input.substr(peg$currPos, 2) === peg$c28) {
1662
- s0 = peg$c28;
1663
- peg$currPos += 2;
1664
- } else {
1665
- s0 = peg$FAILED;
1666
- if (peg$silentFails === 0) { peg$fail(peg$e45); }
1667
- }
1668
- if (s0 === peg$FAILED) {
1669
- if (input.substr(peg$currPos, 3) === peg$c29) {
1670
- s0 = peg$c29;
1671
- peg$currPos += 3;
1672
- } else {
1673
- s0 = peg$FAILED;
1674
- if (peg$silentFails === 0) { peg$fail(peg$e46); }
1675
- }
1676
- if (s0 === peg$FAILED) {
1677
- if (input.substr(peg$currPos, 2) === peg$c30) {
1678
- s0 = peg$c30;
1679
- peg$currPos += 2;
1680
- } else {
1681
- s0 = peg$FAILED;
1682
- if (peg$silentFails === 0) { peg$fail(peg$e47); }
1683
- }
1684
- if (s0 === peg$FAILED) {
1685
- if (input.substr(peg$currPos, 2) === peg$c31) {
1686
- s0 = peg$c31;
1687
- peg$currPos += 2;
1688
- } else {
1689
- s0 = peg$FAILED;
1690
- if (peg$silentFails === 0) { peg$fail(peg$e48); }
1691
- }
1692
- if (s0 === peg$FAILED) {
1693
- if (input.substr(peg$currPos, 2) === peg$c32) {
1694
- s0 = peg$c32;
1695
- peg$currPos += 2;
1696
- } else {
1697
- s0 = peg$FAILED;
1698
- if (peg$silentFails === 0) { peg$fail(peg$e49); }
1699
- }
1700
- if (s0 === peg$FAILED) {
1701
- if (input.substr(peg$currPos, 2) === peg$c33) {
1702
- s0 = peg$c33;
1703
- peg$currPos += 2;
1704
- } else {
1705
- s0 = peg$FAILED;
1706
- if (peg$silentFails === 0) { peg$fail(peg$e50); }
1707
- }
1708
- if (s0 === peg$FAILED) {
1709
- if (input.substr(peg$currPos, 2) === peg$c34) {
1710
- s0 = peg$c34;
1711
- peg$currPos += 2;
1712
- } else {
1713
- s0 = peg$FAILED;
1714
- if (peg$silentFails === 0) { peg$fail(peg$e51); }
1715
- }
1716
- }
1717
- }
1718
- }
1719
- }
1720
- }
1721
- }
1722
- peg$silentFails--;
1723
- if (s0 === peg$FAILED) {
1724
- s1 = peg$FAILED;
1725
- if (peg$silentFails === 0) { peg$fail(peg$e44); }
1726
- }
1727
-
1728
- return s0;
1729
- }
1730
-
1731
- function peg$parsebckarrowtoken() {
1732
- var s0, s1;
1733
-
1734
- peg$silentFails++;
1735
- if (input.substr(peg$currPos, 2) === peg$c35) {
1736
- s0 = peg$c35;
1737
- peg$currPos += 2;
1738
- } else {
1739
- s0 = peg$FAILED;
1740
- if (peg$silentFails === 0) { peg$fail(peg$e53); }
1741
- }
1742
- if (s0 === peg$FAILED) {
1743
- if (input.substr(peg$currPos, 3) === peg$c36) {
1744
- s0 = peg$c36;
1745
- peg$currPos += 3;
1746
- } else {
1747
- s0 = peg$FAILED;
1748
- if (peg$silentFails === 0) { peg$fail(peg$e54); }
1749
- }
1750
- if (s0 === peg$FAILED) {
1751
- if (input.substr(peg$currPos, 2) === peg$c37) {
1752
- s0 = peg$c37;
1753
- peg$currPos += 2;
1754
- } else {
1755
- s0 = peg$FAILED;
1756
- if (peg$silentFails === 0) { peg$fail(peg$e55); }
1757
- }
1758
- if (s0 === peg$FAILED) {
1759
- if (input.substr(peg$currPos, 2) === peg$c38) {
1760
- s0 = peg$c38;
1761
- peg$currPos += 2;
1762
- } else {
1763
- s0 = peg$FAILED;
1764
- if (peg$silentFails === 0) { peg$fail(peg$e56); }
1765
- }
1766
- if (s0 === peg$FAILED) {
1767
- if (input.substr(peg$currPos, 2) === peg$c39) {
1768
- s0 = peg$c39;
1769
- peg$currPos += 2;
1770
- } else {
1771
- s0 = peg$FAILED;
1772
- if (peg$silentFails === 0) { peg$fail(peg$e57); }
1773
- }
1774
- }
1775
- }
1776
- }
1777
- }
1778
- peg$silentFails--;
1779
- if (s0 === peg$FAILED) {
1780
- s1 = peg$FAILED;
1781
- if (peg$silentFails === 0) { peg$fail(peg$e52); }
1782
- }
1783
-
1784
- return s0;
1785
- }
1786
-
1787
- function peg$parsenote() {
1788
- var s0, s1, s2, s3, s4;
1789
-
1790
- s0 = peg$currPos;
1791
- s1 = peg$parse_();
1792
- if (input.charCodeAt(peg$currPos) === 35) {
1793
- s2 = peg$c40;
1794
- peg$currPos++;
1795
- } else {
1796
- s2 = peg$FAILED;
1797
- if (peg$silentFails === 0) { peg$fail(peg$e58); }
1798
- }
1799
- if (s2 !== peg$FAILED) {
1800
- s3 = [];
1801
- s4 = peg$parseslcomtok();
1802
- while (s4 !== peg$FAILED) {
1803
- s3.push(s4);
1804
- s4 = peg$parseslcomtok();
1805
- }
1806
- peg$savedPos = s0;
1807
- s0 = peg$f29(s3);
1808
- } else {
1809
- peg$currPos = s0;
1810
- s0 = peg$FAILED;
1811
- }
1812
-
1813
- return s0;
1814
- }
1815
-
1816
- function peg$parsepositive_number() {
1817
- var s0;
1818
-
1819
- s0 = peg$parsepositive_real();
1820
- if (s0 === peg$FAILED) {
1821
- s0 = peg$parsecardinal();
1822
- }
1823
-
1824
- return s0;
1825
- }
1826
-
1827
- function peg$parsepositive_real() {
1828
- var s0, s1, s2, s3, s4;
1829
-
1830
- s0 = peg$currPos;
1831
- s1 = peg$currPos;
1832
- s2 = peg$parsecardinal();
1833
- if (s2 !== peg$FAILED) {
1834
- if (input.charCodeAt(peg$currPos) === 46) {
1835
- s3 = peg$c41;
1836
- peg$currPos++;
1837
- } else {
1838
- s3 = peg$FAILED;
1839
- if (peg$silentFails === 0) { peg$fail(peg$e59); }
1840
- }
1841
- if (s3 !== peg$FAILED) {
1842
- s4 = peg$parsecardinal();
1843
- if (s4 !== peg$FAILED) {
1844
- s2 = [s2, s3, s4];
1845
- s1 = s2;
1846
- } else {
1847
- peg$currPos = s1;
1848
- s1 = peg$FAILED;
1849
- }
1850
- } else {
1851
- peg$currPos = s1;
1852
- s1 = peg$FAILED;
1853
- }
1854
- } else {
1855
- peg$currPos = s1;
1856
- s1 = peg$FAILED;
1857
- }
1858
- if (s1 !== peg$FAILED) {
1859
- peg$savedPos = s0;
1860
- s1 = peg$f30(s1);
1861
- }
1862
- s0 = s1;
1863
-
1864
- return s0;
1865
- }
1866
-
1867
- function peg$parsecardinal() {
1868
- var s0, s1, s2;
1869
-
1870
- s0 = peg$currPos;
1871
- s1 = [];
1872
- if (peg$r0.test(input.charAt(peg$currPos))) {
1873
- s2 = input.charAt(peg$currPos);
1874
- peg$currPos++;
1875
- } else {
1876
- s2 = peg$FAILED;
1877
- if (peg$silentFails === 0) { peg$fail(peg$e60); }
1878
- }
1879
- if (s2 !== peg$FAILED) {
1880
- while (s2 !== peg$FAILED) {
1881
- s1.push(s2);
1882
- if (peg$r0.test(input.charAt(peg$currPos))) {
1883
- s2 = input.charAt(peg$currPos);
1884
- peg$currPos++;
1885
- } else {
1886
- s2 = peg$FAILED;
1887
- if (peg$silentFails === 0) { peg$fail(peg$e60); }
1888
- }
1889
- }
1890
- } else {
1891
- s1 = peg$FAILED;
1892
- }
1893
- if (s1 !== peg$FAILED) {
1894
- peg$savedPos = s0;
1895
- s1 = peg$f31(s1);
1896
- }
1897
- s0 = s1;
1898
-
1899
- return s0;
1900
- }
1901
-
1902
- function peg$parsetransitionstring() {
1903
- var s0;
1904
-
1905
- s0 = peg$parsequotedstring();
1906
- if (s0 === peg$FAILED) {
1907
- s0 = peg$parseunquotedtransitionstring();
1908
- }
1909
-
1910
- return s0;
1911
- }
1912
-
1913
- function peg$parsestring() {
1914
- var s0;
1915
-
1916
- s0 = peg$parsequotedstring();
1917
- if (s0 === peg$FAILED) {
1918
- s0 = peg$parseunquotedstring();
1919
- }
1920
-
1921
- return s0;
1922
- }
1923
-
1924
- function peg$parsequotedstring() {
1925
- var s0, s1, s2, s3;
1926
-
1927
- peg$silentFails++;
1928
- s0 = peg$currPos;
1929
- if (input.charCodeAt(peg$currPos) === 34) {
1930
- s1 = peg$c42;
1931
- peg$currPos++;
1932
- } else {
1933
- s1 = peg$FAILED;
1934
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
1935
- }
1936
- if (s1 !== peg$FAILED) {
1937
- s2 = peg$parsestringcontent();
1938
- if (input.charCodeAt(peg$currPos) === 34) {
1939
- s3 = peg$c42;
1940
- peg$currPos++;
1941
- } else {
1942
- s3 = peg$FAILED;
1943
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
1944
- }
1945
- if (s3 !== peg$FAILED) {
1946
- peg$savedPos = s0;
1947
- s0 = peg$f32(s2);
1948
- } else {
1949
- peg$currPos = s0;
1950
- s0 = peg$FAILED;
1951
- }
1952
- } else {
1953
- peg$currPos = s0;
1954
- s0 = peg$FAILED;
1955
- }
1956
- peg$silentFails--;
1957
- if (s0 === peg$FAILED) {
1958
- s1 = peg$FAILED;
1959
- if (peg$silentFails === 0) { peg$fail(peg$e61); }
1960
- }
1961
-
1962
- return s0;
1963
- }
1964
-
1965
- function peg$parsestringcontent() {
1966
- var s0, s1, s2, s3;
1967
-
1968
- s0 = [];
1969
- s1 = peg$currPos;
1970
- s2 = peg$currPos;
1971
- peg$silentFails++;
1972
- if (input.charCodeAt(peg$currPos) === 34) {
1973
- s3 = peg$c42;
1974
- peg$currPos++;
1975
- } else {
1976
- s3 = peg$FAILED;
1977
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
1978
- }
1979
- peg$silentFails--;
1980
- if (s3 === peg$FAILED) {
1981
- s2 = undefined;
1982
- } else {
1983
- peg$currPos = s2;
1984
- s2 = peg$FAILED;
1985
- }
1986
- if (s2 !== peg$FAILED) {
1987
- if (input.substr(peg$currPos, 2) === peg$c43) {
1988
- s3 = peg$c43;
1989
- peg$currPos += 2;
1990
- } else {
1991
- s3 = peg$FAILED;
1992
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
1993
- }
1994
- if (s3 === peg$FAILED) {
1995
- if (input.length > peg$currPos) {
1996
- s3 = input.charAt(peg$currPos);
1997
- peg$currPos++;
1998
- } else {
1999
- s3 = peg$FAILED;
2000
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
2001
- }
2002
- }
2003
- if (s3 !== peg$FAILED) {
2004
- peg$savedPos = s1;
2005
- s1 = peg$f33(s3);
2006
- } else {
2007
- peg$currPos = s1;
2008
- s1 = peg$FAILED;
2009
- }
2010
- } else {
2011
- peg$currPos = s1;
2012
- s1 = peg$FAILED;
2013
- }
2014
- while (s1 !== peg$FAILED) {
2015
- s0.push(s1);
2016
- s1 = peg$currPos;
2017
- s2 = peg$currPos;
2018
- peg$silentFails++;
2019
- if (input.charCodeAt(peg$currPos) === 34) {
2020
- s3 = peg$c42;
2021
- peg$currPos++;
2022
- } else {
2023
- s3 = peg$FAILED;
2024
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
2025
- }
2026
- peg$silentFails--;
2027
- if (s3 === peg$FAILED) {
2028
- s2 = undefined;
2029
- } else {
2030
- peg$currPos = s2;
2031
- s2 = peg$FAILED;
2032
- }
2033
- if (s2 !== peg$FAILED) {
2034
- if (input.substr(peg$currPos, 2) === peg$c43) {
2035
- s3 = peg$c43;
2036
- peg$currPos += 2;
2037
- } else {
2038
- s3 = peg$FAILED;
2039
- if (peg$silentFails === 0) { peg$fail(peg$e63); }
2040
- }
2041
- if (s3 === peg$FAILED) {
2042
- if (input.length > peg$currPos) {
2043
- s3 = input.charAt(peg$currPos);
2044
- peg$currPos++;
2045
- } else {
2046
- s3 = peg$FAILED;
2047
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
2048
- }
2049
- }
2050
- if (s3 !== peg$FAILED) {
2051
- peg$savedPos = s1;
2052
- s1 = peg$f33(s3);
2053
- } else {
2054
- peg$currPos = s1;
2055
- s1 = peg$FAILED;
2056
- }
2057
- } else {
2058
- peg$currPos = s1;
2059
- s1 = peg$FAILED;
2060
- }
2061
- }
2062
-
2063
- return s0;
2064
- }
2065
-
2066
- function peg$parseclass_string() {
2067
- var s0, s1, s2, s3;
2068
-
2069
- peg$silentFails++;
2070
- s0 = peg$currPos;
2071
- if (input.charCodeAt(peg$currPos) === 34) {
2072
- s1 = peg$c42;
2073
- peg$currPos++;
2074
- } else {
2075
- s1 = peg$FAILED;
2076
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
2077
- }
2078
- if (s1 !== peg$FAILED) {
2079
- s2 = peg$parseclass_stringcontent();
2080
- if (input.charCodeAt(peg$currPos) === 34) {
2081
- s3 = peg$c42;
2082
- peg$currPos++;
2083
- } else {
2084
- s3 = peg$FAILED;
2085
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
2086
- }
2087
- if (s3 !== peg$FAILED) {
2088
- peg$savedPos = s0;
2089
- s0 = peg$f34(s2);
2090
- } else {
2091
- peg$currPos = s0;
2092
- s0 = peg$FAILED;
2093
- }
2094
- } else {
2095
- peg$currPos = s0;
2096
- s0 = peg$FAILED;
2097
- }
2098
- peg$silentFails--;
2099
- if (s0 === peg$FAILED) {
2100
- s1 = peg$FAILED;
2101
- if (peg$silentFails === 0) { peg$fail(peg$e65); }
2102
- }
2103
-
2104
- return s0;
2105
- }
2106
-
2107
- function peg$parseclass_stringcontent() {
2108
- var s0, s1, s2, s3;
2109
-
2110
- s0 = [];
2111
- s1 = peg$currPos;
2112
- s2 = peg$currPos;
2113
- peg$silentFails++;
2114
- if (input.charCodeAt(peg$currPos) === 34) {
2115
- s3 = peg$c42;
2116
- peg$currPos++;
2117
- } else {
2118
- s3 = peg$FAILED;
2119
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
2120
- }
2121
- peg$silentFails--;
2122
- if (s3 === peg$FAILED) {
2123
- s2 = undefined;
2124
- } else {
2125
- peg$currPos = s2;
2126
- s2 = peg$FAILED;
2127
- }
2128
- if (s2 !== peg$FAILED) {
2129
- if (peg$r1.test(input.charAt(peg$currPos))) {
2130
- s3 = input.charAt(peg$currPos);
2131
- peg$currPos++;
2132
- } else {
2133
- s3 = peg$FAILED;
2134
- if (peg$silentFails === 0) { peg$fail(peg$e66); }
2135
- }
2136
- if (s3 !== peg$FAILED) {
2137
- peg$savedPos = s1;
2138
- s1 = peg$f35(s3);
2139
- } else {
2140
- peg$currPos = s1;
2141
- s1 = peg$FAILED;
2142
- }
2143
- } else {
2144
- peg$currPos = s1;
2145
- s1 = peg$FAILED;
2146
- }
2147
- while (s1 !== peg$FAILED) {
2148
- s0.push(s1);
2149
- s1 = peg$currPos;
2150
- s2 = peg$currPos;
2151
- peg$silentFails++;
2152
- if (input.charCodeAt(peg$currPos) === 34) {
2153
- s3 = peg$c42;
2154
- peg$currPos++;
2155
- } else {
2156
- s3 = peg$FAILED;
2157
- if (peg$silentFails === 0) { peg$fail(peg$e62); }
2158
- }
2159
- peg$silentFails--;
2160
- if (s3 === peg$FAILED) {
2161
- s2 = undefined;
2162
- } else {
2163
- peg$currPos = s2;
2164
- s2 = peg$FAILED;
2165
- }
2166
- if (s2 !== peg$FAILED) {
2167
- if (peg$r1.test(input.charAt(peg$currPos))) {
2168
- s3 = input.charAt(peg$currPos);
2169
- peg$currPos++;
2170
- } else {
2171
- s3 = peg$FAILED;
2172
- if (peg$silentFails === 0) { peg$fail(peg$e66); }
2173
- }
2174
- if (s3 !== peg$FAILED) {
2175
- peg$savedPos = s1;
2176
- s1 = peg$f35(s3);
2177
- } else {
2178
- peg$currPos = s1;
2179
- s1 = peg$FAILED;
2180
- }
2181
- } else {
2182
- peg$currPos = s1;
2183
- s1 = peg$FAILED;
2184
- }
2185
- }
2186
-
2187
- return s0;
2188
- }
2189
-
2190
- function peg$parseunquotedtransitionstring() {
2191
- var s0, s1;
2192
-
2193
- s0 = peg$currPos;
2194
- s1 = peg$parsetransitionnonsep();
2195
- peg$savedPos = s0;
2196
- s1 = peg$f36(s1);
2197
- s0 = s1;
2198
-
2199
- return s0;
2200
- }
2201
-
2202
- function peg$parseunquotedstring() {
2203
- var s0, s1;
2204
-
2205
- s0 = peg$currPos;
2206
- s1 = peg$parsenonsep();
2207
- peg$savedPos = s0;
2208
- s1 = peg$f37(s1);
2209
- s0 = s1;
2210
-
2211
- return s0;
2212
- }
2213
-
2214
- function peg$parsenonsep() {
2215
- var s0, s1, s2, s3;
2216
-
2217
- s0 = [];
2218
- s1 = peg$currPos;
2219
- s2 = peg$currPos;
2220
- peg$silentFails++;
2221
- if (input.charCodeAt(peg$currPos) === 44) {
2222
- s3 = peg$c0;
2223
- peg$currPos++;
2224
- } else {
2225
- s3 = peg$FAILED;
2226
- if (peg$silentFails === 0) { peg$fail(peg$e1); }
2227
- }
2228
- if (s3 === peg$FAILED) {
2229
- if (input.charCodeAt(peg$currPos) === 59) {
2230
- s3 = peg$c1;
2231
- peg$currPos++;
2232
- } else {
2233
- s3 = peg$FAILED;
2234
- if (peg$silentFails === 0) { peg$fail(peg$e2); }
2235
- }
2236
- if (s3 === peg$FAILED) {
2237
- if (input.charCodeAt(peg$currPos) === 123) {
2238
- s3 = peg$c5;
2239
- peg$currPos++;
2240
- } else {
2241
- s3 = peg$FAILED;
2242
- if (peg$silentFails === 0) { peg$fail(peg$e7); }
2243
- }
2244
- }
2245
- }
2246
- peg$silentFails--;
2247
- if (s3 === peg$FAILED) {
2248
- s2 = undefined;
2249
- } else {
2250
- peg$currPos = s2;
2251
- s2 = peg$FAILED;
2252
- }
2253
- if (s2 !== peg$FAILED) {
2254
- if (input.length > peg$currPos) {
2255
- s3 = input.charAt(peg$currPos);
2256
- peg$currPos++;
2257
- } else {
2258
- s3 = peg$FAILED;
2259
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
2260
- }
2261
- if (s3 !== peg$FAILED) {
2262
- peg$savedPos = s1;
2263
- s1 = peg$f38(s3);
2264
- } else {
2265
- peg$currPos = s1;
2266
- s1 = peg$FAILED;
2267
- }
2268
- } else {
2269
- peg$currPos = s1;
2270
- s1 = peg$FAILED;
2271
- }
2272
- while (s1 !== peg$FAILED) {
2273
- s0.push(s1);
2274
- s1 = peg$currPos;
2275
- s2 = peg$currPos;
2276
- peg$silentFails++;
2277
- if (input.charCodeAt(peg$currPos) === 44) {
2278
- s3 = peg$c0;
2279
- peg$currPos++;
2280
- } else {
2281
- s3 = peg$FAILED;
2282
- if (peg$silentFails === 0) { peg$fail(peg$e1); }
2283
- }
2284
- if (s3 === peg$FAILED) {
2285
- if (input.charCodeAt(peg$currPos) === 59) {
2286
- s3 = peg$c1;
2287
- peg$currPos++;
2288
- } else {
2289
- s3 = peg$FAILED;
2290
- if (peg$silentFails === 0) { peg$fail(peg$e2); }
2291
- }
2292
- if (s3 === peg$FAILED) {
2293
- if (input.charCodeAt(peg$currPos) === 123) {
2294
- s3 = peg$c5;
2295
- peg$currPos++;
2296
- } else {
2297
- s3 = peg$FAILED;
2298
- if (peg$silentFails === 0) { peg$fail(peg$e7); }
2299
- }
2300
- }
2301
- }
2302
- peg$silentFails--;
2303
- if (s3 === peg$FAILED) {
2304
- s2 = undefined;
2305
- } else {
2306
- peg$currPos = s2;
2307
- s2 = peg$FAILED;
2308
- }
2309
- if (s2 !== peg$FAILED) {
2310
- if (input.length > peg$currPos) {
2311
- s3 = input.charAt(peg$currPos);
2312
- peg$currPos++;
2313
- } else {
2314
- s3 = peg$FAILED;
2315
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
2316
- }
2317
- if (s3 !== peg$FAILED) {
2318
- peg$savedPos = s1;
2319
- s1 = peg$f38(s3);
2320
- } else {
2321
- peg$currPos = s1;
2322
- s1 = peg$FAILED;
2323
- }
2324
- } else {
2325
- peg$currPos = s1;
2326
- s1 = peg$FAILED;
2327
- }
2328
- }
2329
-
2330
- return s0;
2331
- }
2332
-
2333
- function peg$parsetransitionnonsep() {
2334
- var s0, s1, s2, s3;
2335
-
2336
- s0 = [];
2337
- s1 = peg$currPos;
2338
- s2 = peg$currPos;
2339
- peg$silentFails++;
2340
- if (input.charCodeAt(peg$currPos) === 59) {
2341
- s3 = peg$c1;
2342
- peg$currPos++;
2343
- } else {
2344
- s3 = peg$FAILED;
2345
- if (peg$silentFails === 0) { peg$fail(peg$e2); }
2346
- }
2347
- if (s3 === peg$FAILED) {
2348
- if (input.charCodeAt(peg$currPos) === 123) {
2349
- s3 = peg$c5;
2350
- peg$currPos++;
2351
- } else {
2352
- s3 = peg$FAILED;
2353
- if (peg$silentFails === 0) { peg$fail(peg$e7); }
2354
- }
2355
- }
2356
- peg$silentFails--;
2357
- if (s3 === peg$FAILED) {
2358
- s2 = undefined;
2359
- } else {
2360
- peg$currPos = s2;
2361
- s2 = peg$FAILED;
2362
- }
2363
- if (s2 !== peg$FAILED) {
2364
- if (input.length > peg$currPos) {
2365
- s3 = input.charAt(peg$currPos);
2366
- peg$currPos++;
2367
- } else {
2368
- s3 = peg$FAILED;
2369
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
2370
- }
2371
- if (s3 !== peg$FAILED) {
2372
- peg$savedPos = s1;
2373
- s1 = peg$f39(s3);
2374
- } else {
2375
- peg$currPos = s1;
2376
- s1 = peg$FAILED;
2377
- }
2378
- } else {
2379
- peg$currPos = s1;
2380
- s1 = peg$FAILED;
2381
- }
2382
- while (s1 !== peg$FAILED) {
2383
- s0.push(s1);
2384
- s1 = peg$currPos;
2385
- s2 = peg$currPos;
2386
- peg$silentFails++;
2387
- if (input.charCodeAt(peg$currPos) === 59) {
2388
- s3 = peg$c1;
2389
- peg$currPos++;
2390
- } else {
2391
- s3 = peg$FAILED;
2392
- if (peg$silentFails === 0) { peg$fail(peg$e2); }
2393
- }
2394
- if (s3 === peg$FAILED) {
2395
- if (input.charCodeAt(peg$currPos) === 123) {
2396
- s3 = peg$c5;
2397
- peg$currPos++;
2398
- } else {
2399
- s3 = peg$FAILED;
2400
- if (peg$silentFails === 0) { peg$fail(peg$e7); }
2401
- }
2402
- }
2403
- peg$silentFails--;
2404
- if (s3 === peg$FAILED) {
2405
- s2 = undefined;
2406
- } else {
2407
- peg$currPos = s2;
2408
- s2 = peg$FAILED;
2409
- }
2410
- if (s2 !== peg$FAILED) {
2411
- if (input.length > peg$currPos) {
2412
- s3 = input.charAt(peg$currPos);
2413
- peg$currPos++;
2414
- } else {
2415
- s3 = peg$FAILED;
2416
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
2417
- }
2418
- if (s3 !== peg$FAILED) {
2419
- peg$savedPos = s1;
2420
- s1 = peg$f39(s3);
2421
- } else {
2422
- peg$currPos = s1;
2423
- s1 = peg$FAILED;
2424
- }
2425
- } else {
2426
- peg$currPos = s1;
2427
- s1 = peg$FAILED;
2428
- }
2429
- }
2430
-
2431
- return s0;
2432
- }
2433
-
2434
- function peg$parseidentifier() {
2435
- var s0, s1, s2;
2436
-
2437
- peg$silentFails++;
2438
- s0 = peg$currPos;
2439
- s1 = [];
2440
- if (peg$r2.test(input.charAt(peg$currPos))) {
2441
- s2 = input.charAt(peg$currPos);
2442
- peg$currPos++;
2443
- } else {
2444
- s2 = peg$FAILED;
2445
- if (peg$silentFails === 0) { peg$fail(peg$e68); }
2446
- }
2447
- if (s2 !== peg$FAILED) {
2448
- while (s2 !== peg$FAILED) {
2449
- s1.push(s2);
2450
- if (peg$r2.test(input.charAt(peg$currPos))) {
2451
- s2 = input.charAt(peg$currPos);
2452
- peg$currPos++;
2453
- } else {
2454
- s2 = peg$FAILED;
2455
- if (peg$silentFails === 0) { peg$fail(peg$e68); }
2456
- }
2457
- }
2458
- } else {
2459
- s1 = peg$FAILED;
2460
- }
2461
- if (s1 !== peg$FAILED) {
2462
- peg$savedPos = s0;
2463
- s1 = peg$f40(s1);
2464
- }
2465
- s0 = s1;
2466
- if (s0 === peg$FAILED) {
2467
- s0 = peg$parsequotedstring();
2468
- }
2469
- peg$silentFails--;
2470
- if (s0 === peg$FAILED) {
2471
- s1 = peg$FAILED;
2472
- if (peg$silentFails === 0) { peg$fail(peg$e67); }
2473
- }
2474
-
2475
- return s0;
2476
- }
2477
-
2478
- function peg$parsewhitespace() {
2479
- var s0, s1;
2480
-
2481
- peg$silentFails++;
2482
- s0 = peg$currPos;
2483
- if (peg$r3.test(input.charAt(peg$currPos))) {
2484
- s1 = input.charAt(peg$currPos);
2485
- peg$currPos++;
2486
- } else {
2487
- s1 = peg$FAILED;
2488
- if (peg$silentFails === 0) { peg$fail(peg$e70); }
2489
- }
2490
- if (s1 !== peg$FAILED) {
2491
- peg$savedPos = s0;
2492
- s1 = peg$f41(s1);
2493
- }
2494
- s0 = s1;
2495
- peg$silentFails--;
2496
- if (s0 === peg$FAILED) {
2497
- s1 = peg$FAILED;
2498
- if (peg$silentFails === 0) { peg$fail(peg$e69); }
2499
- }
2500
-
2501
- return s0;
2502
- }
2503
-
2504
- function peg$parselineend() {
2505
- var s0, s1;
2506
-
2507
- peg$silentFails++;
2508
- s0 = peg$currPos;
2509
- if (peg$r4.test(input.charAt(peg$currPos))) {
2510
- s1 = input.charAt(peg$currPos);
2511
- peg$currPos++;
2512
- } else {
2513
- s1 = peg$FAILED;
2514
- if (peg$silentFails === 0) { peg$fail(peg$e72); }
2515
- }
2516
- if (s1 !== peg$FAILED) {
2517
- peg$savedPos = s0;
2518
- s1 = peg$f42(s1);
2519
- }
2520
- s0 = s1;
2521
- peg$silentFails--;
2522
- if (s0 === peg$FAILED) {
2523
- s1 = peg$FAILED;
2524
- if (peg$silentFails === 0) { peg$fail(peg$e71); }
2525
- }
2526
-
2527
- return s0;
2528
- }
2529
-
2530
- function peg$parsemlcomstart() {
2531
- var s0;
2532
-
2533
- if (input.substr(peg$currPos, 2) === peg$c44) {
2534
- s0 = peg$c44;
2535
- peg$currPos += 2;
2536
- } else {
2537
- s0 = peg$FAILED;
2538
- if (peg$silentFails === 0) { peg$fail(peg$e73); }
2539
- }
2540
-
2541
- return s0;
2542
- }
2543
-
2544
- function peg$parsemlcomend() {
2545
- var s0;
2546
-
2547
- if (input.substr(peg$currPos, 2) === peg$c45) {
2548
- s0 = peg$c45;
2549
- peg$currPos += 2;
2550
- } else {
2551
- s0 = peg$FAILED;
2552
- if (peg$silentFails === 0) { peg$fail(peg$e74); }
2553
- }
2554
-
2555
- return s0;
2556
- }
2557
-
2558
- function peg$parsemlcomtok() {
2559
- var s0, s1, s2;
2560
-
2561
- s0 = peg$currPos;
2562
- s1 = peg$currPos;
2563
- peg$silentFails++;
2564
- if (input.substr(peg$currPos, 2) === peg$c45) {
2565
- s2 = peg$c45;
2566
- peg$currPos += 2;
2567
- } else {
2568
- s2 = peg$FAILED;
2569
- if (peg$silentFails === 0) { peg$fail(peg$e74); }
2570
- }
2571
- peg$silentFails--;
2572
- if (s2 === peg$FAILED) {
2573
- s1 = undefined;
2574
- } else {
2575
- peg$currPos = s1;
2576
- s1 = peg$FAILED;
2577
- }
2578
- if (s1 !== peg$FAILED) {
2579
- if (input.length > peg$currPos) {
2580
- s2 = input.charAt(peg$currPos);
2581
- peg$currPos++;
2582
- } else {
2583
- s2 = peg$FAILED;
2584
- if (peg$silentFails === 0) { peg$fail(peg$e64); }
2585
- }
2586
- if (s2 !== peg$FAILED) {
2587
- peg$savedPos = s0;
2588
- s0 = peg$f43(s2);
2589
- } else {
2590
- peg$currPos = s0;
2591
- s0 = peg$FAILED;
2592
- }
2593
- } else {
2594
- peg$currPos = s0;
2595
- s0 = peg$FAILED;
2596
- }
2597
-
2598
- return s0;
2599
- }
2600
-
2601
- function peg$parsemlcomment() {
2602
- var s0, s1, s2, s3;
2603
-
2604
- s0 = peg$currPos;
2605
- s1 = peg$parsemlcomstart();
2606
- if (s1 !== peg$FAILED) {
2607
- s2 = [];
2608
- s3 = peg$parsemlcomtok();
2609
- while (s3 !== peg$FAILED) {
2610
- s2.push(s3);
2611
- s3 = peg$parsemlcomtok();
2612
- }
2613
- s3 = peg$parsemlcomend();
2614
- if (s3 !== peg$FAILED) {
2615
- peg$savedPos = s0;
2616
- s0 = peg$f44(s1, s2, s3);
2617
- } else {
2618
- peg$currPos = s0;
2619
- s0 = peg$FAILED;
2620
- }
2621
- } else {
2622
- peg$currPos = s0;
2623
- s0 = peg$FAILED;
2624
- }
2625
-
2626
- return s0;
2627
- }
2628
-
2629
- function peg$parseslcomstart() {
2630
- var s0;
2631
-
2632
- if (input.substr(peg$currPos, 2) === peg$c46) {
2633
- s0 = peg$c46;
2634
- peg$currPos += 2;
2635
- } else {
2636
- s0 = peg$FAILED;
2637
- if (peg$silentFails === 0) { peg$fail(peg$e75); }
2638
- }
2639
-
2640
- return s0;
2641
- }
2642
-
2643
- function peg$parseslcomtok() {
2644
- var s0;
2645
-
2646
- if (peg$r5.test(input.charAt(peg$currPos))) {
2647
- s0 = input.charAt(peg$currPos);
2648
- peg$currPos++;
2649
- } else {
2650
- s0 = peg$FAILED;
2651
- if (peg$silentFails === 0) { peg$fail(peg$e76); }
2652
- }
2653
-
2654
- return s0;
2655
- }
2656
-
2657
- function peg$parseslcomment() {
2658
- var s0, s1, s2, s3;
2659
-
2660
- s0 = peg$currPos;
2661
- s1 = peg$parseslcomstart();
2662
- if (s1 !== peg$FAILED) {
2663
- s2 = [];
2664
- s3 = peg$parseslcomtok();
2665
- while (s3 !== peg$FAILED) {
2666
- s2.push(s3);
2667
- s3 = peg$parseslcomtok();
2668
- }
2669
- peg$savedPos = s0;
2670
- s0 = peg$f45(s1, s2);
2671
- } else {
2672
- peg$currPos = s0;
2673
- s0 = peg$FAILED;
2674
- }
2675
-
2676
- return s0;
2677
- }
2678
-
2679
- function peg$parsecomment() {
2680
- var s0, s1;
2681
-
2682
- peg$silentFails++;
2683
- s0 = peg$parseslcomment();
2684
- if (s0 === peg$FAILED) {
2685
- s0 = peg$parsemlcomment();
2686
- }
2687
- peg$silentFails--;
2688
- if (s0 === peg$FAILED) {
2689
- s1 = peg$FAILED;
2690
- if (peg$silentFails === 0) { peg$fail(peg$e77); }
2691
- }
2692
-
2693
- return s0;
2694
- }
2695
-
2696
- function peg$parse_() {
2697
- var s0, s1;
2698
-
2699
- s0 = [];
2700
- s1 = peg$parsewhitespace();
2701
- if (s1 === peg$FAILED) {
2702
- s1 = peg$parselineend();
2703
- if (s1 === peg$FAILED) {
2704
- s1 = peg$parsecomment();
2705
- }
2706
- }
2707
- while (s1 !== peg$FAILED) {
2708
- s0.push(s1);
2709
- s1 = peg$parsewhitespace();
2710
- if (s1 === peg$FAILED) {
2711
- s1 = peg$parselineend();
2712
- if (s1 === peg$FAILED) {
2713
- s1 = peg$parsecomment();
2714
- }
2715
- }
2716
- }
2717
-
2718
- return s0;
2719
- }
2720
-
2721
- peg$result = peg$startRuleFunction();
2722
-
2723
- if (peg$result !== peg$FAILED && peg$currPos === input.length) {
2724
- return peg$result;
2725
- } else {
2726
- if (peg$result !== peg$FAILED && peg$currPos < input.length) {
2727
- peg$fail(peg$endExpectation());
2728
- }
2729
-
2730
- throw peg$buildStructuredError(
2731
- peg$maxFailExpected,
2732
- peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,
2733
- peg$maxFailPos < input.length
2734
- ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
2735
- : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
2736
- );
2737
- }
2738
- }
2739
-
2740
- export {
2741
- peg$SyntaxError as SyntaxError,
2742
-
2743
- peg$parse as parse
2744
- };