@gmod/bed 2.1.5 → 2.1.7

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/src/autoSql.js DELETED
@@ -1,1501 +0,0 @@
1
- /*
2
- * Generated by PEG.js 0.10.0.
3
- *
4
- * http://pegjs.org/
5
- */
6
-
7
- "use strict";
8
-
9
- function peg$subclass(child, parent) {
10
- function ctor() { this.constructor = child; }
11
- ctor.prototype = parent.prototype;
12
- child.prototype = new ctor();
13
- }
14
-
15
- function peg$SyntaxError(message, expected, found, location) {
16
- this.message = message;
17
- this.expected = expected;
18
- this.found = found;
19
- this.location = location;
20
- this.name = "SyntaxError";
21
-
22
- if (typeof Error.captureStackTrace === "function") {
23
- Error.captureStackTrace(this, peg$SyntaxError);
24
- }
25
- }
26
-
27
- peg$subclass(peg$SyntaxError, Error);
28
-
29
- peg$SyntaxError.buildMessage = function(expected, found) {
30
- var DESCRIBE_EXPECTATION_FNS = {
31
- literal: function(expectation) {
32
- return "\"" + literalEscape(expectation.text) + "\"";
33
- },
34
-
35
- "class": function(expectation) {
36
- var escapedParts = "",
37
- i;
38
-
39
- for (i = 0; i < expectation.parts.length; i++) {
40
- escapedParts += expectation.parts[i] instanceof Array
41
- ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1])
42
- : classEscape(expectation.parts[i]);
43
- }
44
-
45
- return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
46
- },
47
-
48
- any: function(expectation) {
49
- return "any character";
50
- },
51
-
52
- end: function(expectation) {
53
- return "end of input";
54
- },
55
-
56
- other: function(expectation) {
57
- return expectation.description;
58
- }
59
- };
60
-
61
- function hex(ch) {
62
- return ch.charCodeAt(0).toString(16).toUpperCase();
63
- }
64
-
65
- function literalEscape(s) {
66
- return s
67
- .replace(/\\/g, '\\\\')
68
- .replace(/"/g, '\\"')
69
- .replace(/\0/g, '\\0')
70
- .replace(/\t/g, '\\t')
71
- .replace(/\n/g, '\\n')
72
- .replace(/\r/g, '\\r')
73
- .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); })
74
- .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); });
75
- }
76
-
77
- function classEscape(s) {
78
- return s
79
- .replace(/\\/g, '\\\\')
80
- .replace(/\]/g, '\\]')
81
- .replace(/\^/g, '\\^')
82
- .replace(/-/g, '\\-')
83
- .replace(/\0/g, '\\0')
84
- .replace(/\t/g, '\\t')
85
- .replace(/\n/g, '\\n')
86
- .replace(/\r/g, '\\r')
87
- .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); })
88
- .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); });
89
- }
90
-
91
- function describeExpectation(expectation) {
92
- return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
93
- }
94
-
95
- function describeExpected(expected) {
96
- var descriptions = new Array(expected.length),
97
- i, j;
98
-
99
- for (i = 0; i < expected.length; i++) {
100
- descriptions[i] = describeExpectation(expected[i]);
101
- }
102
-
103
- descriptions.sort();
104
-
105
- if (descriptions.length > 0) {
106
- for (i = 1, j = 1; i < descriptions.length; i++) {
107
- if (descriptions[i - 1] !== descriptions[i]) {
108
- descriptions[j] = descriptions[i];
109
- j++;
110
- }
111
- }
112
- descriptions.length = j;
113
- }
114
-
115
- switch (descriptions.length) {
116
- case 1:
117
- return descriptions[0];
118
-
119
- case 2:
120
- return descriptions[0] + " or " + descriptions[1];
121
-
122
- default:
123
- return descriptions.slice(0, -1).join(", ")
124
- + ", or "
125
- + descriptions[descriptions.length - 1];
126
- }
127
- }
128
-
129
- function describeFound(found) {
130
- return found ? "\"" + literalEscape(found) + "\"" : "end of input";
131
- }
132
-
133
- return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
134
- };
135
-
136
- function peg$parse(input, options) {
137
- options = options !== void 0 ? options : {};
138
-
139
- var peg$FAILED = {},
140
-
141
- peg$startRuleFunctions = { declaration: peg$parsedeclaration },
142
- peg$startRuleFunction = peg$parsedeclaration,
143
-
144
- peg$c0 = "(",
145
- peg$c1 = peg$literalExpectation("(", false),
146
- peg$c2 = ")",
147
- peg$c3 = peg$literalExpectation(")", false),
148
- peg$c4 = function(type, name, comment, fields) { return { type, name, comment, fields } },
149
- peg$c5 = "simple",
150
- peg$c6 = peg$literalExpectation("simple", false),
151
- peg$c7 = "object",
152
- peg$c8 = peg$literalExpectation("object", false),
153
- peg$c9 = "table",
154
- peg$c10 = peg$literalExpectation("table", false),
155
- peg$c11 = "auto",
156
- peg$c12 = peg$literalExpectation("auto", false),
157
- peg$c13 = "primary",
158
- peg$c14 = peg$literalExpectation("primary", false),
159
- peg$c15 = "index",
160
- peg$c16 = peg$literalExpectation("index", false),
161
- peg$c17 = "unique",
162
- peg$c18 = peg$literalExpectation("unique", false),
163
- peg$c19 = function(f1, w) { return w; },
164
- peg$c20 = function(f1, fds) {
165
- if(f1.name) {
166
- fds.unshift(f1);
167
- }
168
- return fds;
169
- },
170
- peg$c21 = "#",
171
- peg$c22 = peg$literalExpectation("#", false),
172
- peg$c23 = ";",
173
- peg$c24 = peg$literalExpectation(";", false),
174
- peg$c25 = function(type, name, comment) { return { type, name, comment } },
175
- peg$c26 = "[",
176
- peg$c27 = peg$literalExpectation("[", false),
177
- peg$c28 = "]",
178
- peg$c29 = peg$literalExpectation("]", false),
179
- peg$c30 = function(type, size, name, comment) { return { type, size, name, comment } },
180
- peg$c31 = function(type, vals, name, comment) { return { type, vals, name, comment } },
181
- peg$c32 = ",",
182
- peg$c33 = peg$literalExpectation(",", false),
183
- peg$c34 = function(f1, fds) {
184
- fds.unshift(f1);
185
- return fds;
186
- },
187
- peg$c35 = "int",
188
- peg$c36 = peg$literalExpectation("int", false),
189
- peg$c37 = "uint",
190
- peg$c38 = peg$literalExpectation("uint", false),
191
- peg$c39 = "short",
192
- peg$c40 = peg$literalExpectation("short", false),
193
- peg$c41 = "ushort",
194
- peg$c42 = peg$literalExpectation("ushort", false),
195
- peg$c43 = "byte",
196
- peg$c44 = peg$literalExpectation("byte", false),
197
- peg$c45 = "ubyte",
198
- peg$c46 = peg$literalExpectation("ubyte", false),
199
- peg$c47 = "float",
200
- peg$c48 = peg$literalExpectation("float", false),
201
- peg$c49 = "char",
202
- peg$c50 = peg$literalExpectation("char", false),
203
- peg$c51 = "string",
204
- peg$c52 = peg$literalExpectation("string", false),
205
- peg$c53 = "lstring",
206
- peg$c54 = peg$literalExpectation("lstring", false),
207
- peg$c55 = "enum",
208
- peg$c56 = peg$literalExpectation("enum", false),
209
- peg$c57 = "double",
210
- peg$c58 = peg$literalExpectation("double", false),
211
- peg$c59 = "bigint",
212
- peg$c60 = peg$literalExpectation("bigint", false),
213
- peg$c61 = "set",
214
- peg$c62 = peg$literalExpectation("set", false),
215
- peg$c63 = function(t, n) { return t+' '+n },
216
- peg$c64 = /^[a-zA-Z_]/,
217
- peg$c65 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false),
218
- peg$c66 = /^[a-zA-Z0-9_]/,
219
- peg$c67 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false),
220
- peg$c68 = function(t) { return text() },
221
- peg$c69 = "\"",
222
- peg$c70 = peg$literalExpectation("\"", false),
223
- peg$c71 = /^[^"]/,
224
- peg$c72 = peg$classExpectation(["\""], true, false),
225
- peg$c73 = function(t) { return t.join('') },
226
- peg$c74 = /^[^\n\r]/,
227
- peg$c75 = peg$classExpectation(["\n", "\r"], true, false),
228
- peg$c76 = function(t) { return t.join('').replace(/^"/,'').replace(/"$/,'') },
229
- peg$c77 = peg$otherExpectation("integer"),
230
- peg$c78 = /^[0-9]/,
231
- peg$c79 = peg$classExpectation([["0", "9"]], false, false),
232
- peg$c80 = function() { return parseInt(text(), 10); },
233
- peg$c81 = peg$otherExpectation("whitespace"),
234
- peg$c82 = /^[ \t\n\r]/,
235
- peg$c83 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false),
236
-
237
- peg$currPos = 0,
238
- peg$savedPos = 0,
239
- peg$posDetailsCache = [{ line: 1, column: 1 }],
240
- peg$maxFailPos = 0,
241
- peg$maxFailExpected = [],
242
- peg$silentFails = 0,
243
-
244
- peg$result;
245
-
246
- if ("startRule" in options) {
247
- if (!(options.startRule in peg$startRuleFunctions)) {
248
- throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
249
- }
250
-
251
- peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
252
- }
253
-
254
- function text() {
255
- return input.substring(peg$savedPos, peg$currPos);
256
- }
257
-
258
- function location() {
259
- return peg$computeLocation(peg$savedPos, peg$currPos);
260
- }
261
-
262
- function expected(description, location) {
263
- location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)
264
-
265
- throw peg$buildStructuredError(
266
- [peg$otherExpectation(description)],
267
- input.substring(peg$savedPos, peg$currPos),
268
- location
269
- );
270
- }
271
-
272
- function error(message, location) {
273
- location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)
274
-
275
- throw peg$buildSimpleError(message, location);
276
- }
277
-
278
- function peg$literalExpectation(text, ignoreCase) {
279
- return { type: "literal", text: text, ignoreCase: ignoreCase };
280
- }
281
-
282
- function peg$classExpectation(parts, inverted, ignoreCase) {
283
- return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };
284
- }
285
-
286
- function peg$anyExpectation() {
287
- return { type: "any" };
288
- }
289
-
290
- function peg$endExpectation() {
291
- return { type: "end" };
292
- }
293
-
294
- function peg$otherExpectation(description) {
295
- return { type: "other", description: description };
296
- }
297
-
298
- function peg$computePosDetails(pos) {
299
- var details = peg$posDetailsCache[pos], p;
300
-
301
- if (details) {
302
- return details;
303
- } else {
304
- p = pos - 1;
305
- while (!peg$posDetailsCache[p]) {
306
- p--;
307
- }
308
-
309
- details = peg$posDetailsCache[p];
310
- details = {
311
- line: details.line,
312
- column: details.column
313
- };
314
-
315
- while (p < pos) {
316
- if (input.charCodeAt(p) === 10) {
317
- details.line++;
318
- details.column = 1;
319
- } else {
320
- details.column++;
321
- }
322
-
323
- p++;
324
- }
325
-
326
- peg$posDetailsCache[pos] = details;
327
- return details;
328
- }
329
- }
330
-
331
- function peg$computeLocation(startPos, endPos) {
332
- var startPosDetails = peg$computePosDetails(startPos),
333
- endPosDetails = peg$computePosDetails(endPos);
334
-
335
- return {
336
- start: {
337
- offset: startPos,
338
- line: startPosDetails.line,
339
- column: startPosDetails.column
340
- },
341
- end: {
342
- offset: endPos,
343
- line: endPosDetails.line,
344
- column: endPosDetails.column
345
- }
346
- };
347
- }
348
-
349
- function peg$fail(expected) {
350
- if (peg$currPos < peg$maxFailPos) { return; }
351
-
352
- if (peg$currPos > peg$maxFailPos) {
353
- peg$maxFailPos = peg$currPos;
354
- peg$maxFailExpected = [];
355
- }
356
-
357
- peg$maxFailExpected.push(expected);
358
- }
359
-
360
- function peg$buildSimpleError(message, location) {
361
- return new peg$SyntaxError(message, null, null, location);
362
- }
363
-
364
- function peg$buildStructuredError(expected, found, location) {
365
- return new peg$SyntaxError(
366
- peg$SyntaxError.buildMessage(expected, found),
367
- expected,
368
- found,
369
- location
370
- );
371
- }
372
-
373
- function peg$parsedeclaration() {
374
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
375
-
376
- s0 = peg$currPos;
377
- s1 = peg$parse_();
378
- if (s1 !== peg$FAILED) {
379
- s2 = peg$parsedeclareType();
380
- if (s2 !== peg$FAILED) {
381
- s3 = peg$parse_();
382
- if (s3 !== peg$FAILED) {
383
- s4 = peg$parsedeclareName();
384
- if (s4 !== peg$FAILED) {
385
- s5 = peg$parse_();
386
- if (s5 !== peg$FAILED) {
387
- s6 = peg$parsecomment();
388
- if (s6 !== peg$FAILED) {
389
- s7 = peg$parse_();
390
- if (s7 !== peg$FAILED) {
391
- if (input.charCodeAt(peg$currPos) === 40) {
392
- s8 = peg$c0;
393
- peg$currPos++;
394
- } else {
395
- s8 = peg$FAILED;
396
- if (peg$silentFails === 0) { peg$fail(peg$c1); }
397
- }
398
- if (s8 !== peg$FAILED) {
399
- s9 = peg$parse_();
400
- if (s9 !== peg$FAILED) {
401
- s10 = peg$parsefieldList();
402
- if (s10 !== peg$FAILED) {
403
- s11 = peg$parse_();
404
- if (s11 !== peg$FAILED) {
405
- if (input.charCodeAt(peg$currPos) === 41) {
406
- s12 = peg$c2;
407
- peg$currPos++;
408
- } else {
409
- s12 = peg$FAILED;
410
- if (peg$silentFails === 0) { peg$fail(peg$c3); }
411
- }
412
- if (s12 !== peg$FAILED) {
413
- s13 = peg$parse_();
414
- if (s13 !== peg$FAILED) {
415
- peg$savedPos = s0;
416
- s1 = peg$c4(s2, s4, s6, s10);
417
- s0 = s1;
418
- } else {
419
- peg$currPos = s0;
420
- s0 = peg$FAILED;
421
- }
422
- } else {
423
- peg$currPos = s0;
424
- s0 = peg$FAILED;
425
- }
426
- } else {
427
- peg$currPos = s0;
428
- s0 = peg$FAILED;
429
- }
430
- } else {
431
- peg$currPos = s0;
432
- s0 = peg$FAILED;
433
- }
434
- } else {
435
- peg$currPos = s0;
436
- s0 = peg$FAILED;
437
- }
438
- } else {
439
- peg$currPos = s0;
440
- s0 = peg$FAILED;
441
- }
442
- } else {
443
- peg$currPos = s0;
444
- s0 = peg$FAILED;
445
- }
446
- } else {
447
- peg$currPos = s0;
448
- s0 = peg$FAILED;
449
- }
450
- } else {
451
- peg$currPos = s0;
452
- s0 = peg$FAILED;
453
- }
454
- } else {
455
- peg$currPos = s0;
456
- s0 = peg$FAILED;
457
- }
458
- } else {
459
- peg$currPos = s0;
460
- s0 = peg$FAILED;
461
- }
462
- } else {
463
- peg$currPos = s0;
464
- s0 = peg$FAILED;
465
- }
466
- } else {
467
- peg$currPos = s0;
468
- s0 = peg$FAILED;
469
- }
470
-
471
- return s0;
472
- }
473
-
474
- function peg$parsedeclareType() {
475
- var s0;
476
-
477
- if (input.substr(peg$currPos, 6) === peg$c5) {
478
- s0 = peg$c5;
479
- peg$currPos += 6;
480
- } else {
481
- s0 = peg$FAILED;
482
- if (peg$silentFails === 0) { peg$fail(peg$c6); }
483
- }
484
- if (s0 === peg$FAILED) {
485
- if (input.substr(peg$currPos, 6) === peg$c7) {
486
- s0 = peg$c7;
487
- peg$currPos += 6;
488
- } else {
489
- s0 = peg$FAILED;
490
- if (peg$silentFails === 0) { peg$fail(peg$c8); }
491
- }
492
- if (s0 === peg$FAILED) {
493
- if (input.substr(peg$currPos, 5) === peg$c9) {
494
- s0 = peg$c9;
495
- peg$currPos += 5;
496
- } else {
497
- s0 = peg$FAILED;
498
- if (peg$silentFails === 0) { peg$fail(peg$c10); }
499
- }
500
- }
501
- }
502
-
503
- return s0;
504
- }
505
-
506
- function peg$parsedeclareName() {
507
- var s0, s1, s2, s3;
508
-
509
- s0 = peg$parsename();
510
- if (s0 === peg$FAILED) {
511
- s0 = peg$currPos;
512
- s1 = peg$parsename();
513
- if (s1 !== peg$FAILED) {
514
- s2 = peg$parseindexType();
515
- if (s2 !== peg$FAILED) {
516
- s1 = [s1, s2];
517
- s0 = s1;
518
- } else {
519
- peg$currPos = s0;
520
- s0 = peg$FAILED;
521
- }
522
- } else {
523
- peg$currPos = s0;
524
- s0 = peg$FAILED;
525
- }
526
- if (s0 === peg$FAILED) {
527
- s0 = peg$currPos;
528
- s1 = peg$parsename();
529
- if (s1 !== peg$FAILED) {
530
- if (input.substr(peg$currPos, 4) === peg$c11) {
531
- s2 = peg$c11;
532
- peg$currPos += 4;
533
- } else {
534
- s2 = peg$FAILED;
535
- if (peg$silentFails === 0) { peg$fail(peg$c12); }
536
- }
537
- if (s2 !== peg$FAILED) {
538
- s1 = [s1, s2];
539
- s0 = s1;
540
- } else {
541
- peg$currPos = s0;
542
- s0 = peg$FAILED;
543
- }
544
- } else {
545
- peg$currPos = s0;
546
- s0 = peg$FAILED;
547
- }
548
- if (s0 === peg$FAILED) {
549
- s0 = peg$currPos;
550
- s1 = peg$parsename();
551
- if (s1 !== peg$FAILED) {
552
- s2 = peg$parseindexType();
553
- if (s2 !== peg$FAILED) {
554
- if (input.substr(peg$currPos, 4) === peg$c11) {
555
- s3 = peg$c11;
556
- peg$currPos += 4;
557
- } else {
558
- s3 = peg$FAILED;
559
- if (peg$silentFails === 0) { peg$fail(peg$c12); }
560
- }
561
- if (s3 !== peg$FAILED) {
562
- s1 = [s1, s2, s3];
563
- s0 = s1;
564
- } else {
565
- peg$currPos = s0;
566
- s0 = peg$FAILED;
567
- }
568
- } else {
569
- peg$currPos = s0;
570
- s0 = peg$FAILED;
571
- }
572
- } else {
573
- peg$currPos = s0;
574
- s0 = peg$FAILED;
575
- }
576
- }
577
- }
578
- }
579
-
580
- return s0;
581
- }
582
-
583
- function peg$parseindexType() {
584
- var s0;
585
-
586
- if (input.substr(peg$currPos, 7) === peg$c13) {
587
- s0 = peg$c13;
588
- peg$currPos += 7;
589
- } else {
590
- s0 = peg$FAILED;
591
- if (peg$silentFails === 0) { peg$fail(peg$c14); }
592
- }
593
- if (s0 === peg$FAILED) {
594
- if (input.substr(peg$currPos, 5) === peg$c15) {
595
- s0 = peg$c15;
596
- peg$currPos += 5;
597
- } else {
598
- s0 = peg$FAILED;
599
- if (peg$silentFails === 0) { peg$fail(peg$c16); }
600
- }
601
- if (s0 === peg$FAILED) {
602
- if (input.substr(peg$currPos, 6) === peg$c17) {
603
- s0 = peg$c17;
604
- peg$currPos += 6;
605
- } else {
606
- s0 = peg$FAILED;
607
- if (peg$silentFails === 0) { peg$fail(peg$c18); }
608
- }
609
- }
610
- }
611
-
612
- return s0;
613
- }
614
-
615
- function peg$parsecomment() {
616
- var s0;
617
-
618
- s0 = peg$parsenonQuotedString();
619
- if (s0 === peg$FAILED) {
620
- s0 = peg$parse_();
621
- }
622
-
623
- return s0;
624
- }
625
-
626
- function peg$parsefieldList() {
627
- var s0, s1, s2, s3, s4, s5, s6;
628
-
629
- s0 = peg$currPos;
630
- s1 = peg$parsefield();
631
- if (s1 !== peg$FAILED) {
632
- s2 = peg$parse_();
633
- if (s2 !== peg$FAILED) {
634
- s3 = [];
635
- s4 = peg$currPos;
636
- s5 = peg$parse_();
637
- if (s5 !== peg$FAILED) {
638
- s6 = peg$parsefield();
639
- if (s6 !== peg$FAILED) {
640
- peg$savedPos = s4;
641
- s5 = peg$c19(s1, s6);
642
- s4 = s5;
643
- } else {
644
- peg$currPos = s4;
645
- s4 = peg$FAILED;
646
- }
647
- } else {
648
- peg$currPos = s4;
649
- s4 = peg$FAILED;
650
- }
651
- while (s4 !== peg$FAILED) {
652
- s3.push(s4);
653
- s4 = peg$currPos;
654
- s5 = peg$parse_();
655
- if (s5 !== peg$FAILED) {
656
- s6 = peg$parsefield();
657
- if (s6 !== peg$FAILED) {
658
- peg$savedPos = s4;
659
- s5 = peg$c19(s1, s6);
660
- s4 = s5;
661
- } else {
662
- peg$currPos = s4;
663
- s4 = peg$FAILED;
664
- }
665
- } else {
666
- peg$currPos = s4;
667
- s4 = peg$FAILED;
668
- }
669
- }
670
- if (s3 !== peg$FAILED) {
671
- s4 = peg$parse_();
672
- if (s4 !== peg$FAILED) {
673
- peg$savedPos = s0;
674
- s1 = peg$c20(s1, s3);
675
- s0 = s1;
676
- } else {
677
- peg$currPos = s0;
678
- s0 = peg$FAILED;
679
- }
680
- } else {
681
- peg$currPos = s0;
682
- s0 = peg$FAILED;
683
- }
684
- } else {
685
- peg$currPos = s0;
686
- s0 = peg$FAILED;
687
- }
688
- } else {
689
- peg$currPos = s0;
690
- s0 = peg$FAILED;
691
- }
692
-
693
- return s0;
694
- }
695
-
696
- function peg$parsecommentStart() {
697
- var s0;
698
-
699
- if (input.charCodeAt(peg$currPos) === 35) {
700
- s0 = peg$c21;
701
- peg$currPos++;
702
- } else {
703
- s0 = peg$FAILED;
704
- if (peg$silentFails === 0) { peg$fail(peg$c22); }
705
- }
706
-
707
- return s0;
708
- }
709
-
710
- function peg$parseinternalComment() {
711
- var s0, s1, s2, s3, s4;
712
-
713
- s0 = peg$currPos;
714
- s1 = peg$parse_();
715
- if (s1 !== peg$FAILED) {
716
- s2 = peg$parsecommentStart();
717
- if (s2 !== peg$FAILED) {
718
- s3 = peg$parsenonQuotedString();
719
- if (s3 !== peg$FAILED) {
720
- s4 = peg$parse_();
721
- if (s4 !== peg$FAILED) {
722
- s1 = [s1, s2, s3, s4];
723
- s0 = s1;
724
- } else {
725
- peg$currPos = s0;
726
- s0 = peg$FAILED;
727
- }
728
- } else {
729
- peg$currPos = s0;
730
- s0 = peg$FAILED;
731
- }
732
- } else {
733
- peg$currPos = s0;
734
- s0 = peg$FAILED;
735
- }
736
- } else {
737
- peg$currPos = s0;
738
- s0 = peg$FAILED;
739
- }
740
-
741
- return s0;
742
- }
743
-
744
- function peg$parsefield() {
745
- var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
746
-
747
- s0 = peg$currPos;
748
- s1 = peg$parsefieldType();
749
- if (s1 !== peg$FAILED) {
750
- s2 = peg$parse_();
751
- if (s2 !== peg$FAILED) {
752
- s3 = peg$parsename();
753
- if (s3 !== peg$FAILED) {
754
- s4 = peg$parse_();
755
- if (s4 !== peg$FAILED) {
756
- if (input.charCodeAt(peg$currPos) === 59) {
757
- s5 = peg$c23;
758
- peg$currPos++;
759
- } else {
760
- s5 = peg$FAILED;
761
- if (peg$silentFails === 0) { peg$fail(peg$c24); }
762
- }
763
- if (s5 !== peg$FAILED) {
764
- s6 = peg$parse_();
765
- if (s6 !== peg$FAILED) {
766
- s7 = peg$parsecomment();
767
- if (s7 !== peg$FAILED) {
768
- peg$savedPos = s0;
769
- s1 = peg$c25(s1, s3, s7);
770
- s0 = s1;
771
- } else {
772
- peg$currPos = s0;
773
- s0 = peg$FAILED;
774
- }
775
- } else {
776
- peg$currPos = s0;
777
- s0 = peg$FAILED;
778
- }
779
- } else {
780
- peg$currPos = s0;
781
- s0 = peg$FAILED;
782
- }
783
- } else {
784
- peg$currPos = s0;
785
- s0 = peg$FAILED;
786
- }
787
- } else {
788
- peg$currPos = s0;
789
- s0 = peg$FAILED;
790
- }
791
- } else {
792
- peg$currPos = s0;
793
- s0 = peg$FAILED;
794
- }
795
- } else {
796
- peg$currPos = s0;
797
- s0 = peg$FAILED;
798
- }
799
- if (s0 === peg$FAILED) {
800
- s0 = peg$currPos;
801
- s1 = peg$parsefieldType();
802
- if (s1 !== peg$FAILED) {
803
- s2 = peg$parse_();
804
- if (s2 !== peg$FAILED) {
805
- if (input.charCodeAt(peg$currPos) === 91) {
806
- s3 = peg$c26;
807
- peg$currPos++;
808
- } else {
809
- s3 = peg$FAILED;
810
- if (peg$silentFails === 0) { peg$fail(peg$c27); }
811
- }
812
- if (s3 !== peg$FAILED) {
813
- s4 = peg$parse_();
814
- if (s4 !== peg$FAILED) {
815
- s5 = peg$parsefieldSize();
816
- if (s5 !== peg$FAILED) {
817
- s6 = peg$parse_();
818
- if (s6 !== peg$FAILED) {
819
- if (input.charCodeAt(peg$currPos) === 93) {
820
- s7 = peg$c28;
821
- peg$currPos++;
822
- } else {
823
- s7 = peg$FAILED;
824
- if (peg$silentFails === 0) { peg$fail(peg$c29); }
825
- }
826
- if (s7 !== peg$FAILED) {
827
- s8 = peg$parse_();
828
- if (s8 !== peg$FAILED) {
829
- s9 = peg$parsename();
830
- if (s9 !== peg$FAILED) {
831
- s10 = peg$parse_();
832
- if (s10 !== peg$FAILED) {
833
- if (input.charCodeAt(peg$currPos) === 59) {
834
- s11 = peg$c23;
835
- peg$currPos++;
836
- } else {
837
- s11 = peg$FAILED;
838
- if (peg$silentFails === 0) { peg$fail(peg$c24); }
839
- }
840
- if (s11 !== peg$FAILED) {
841
- s12 = peg$parse_();
842
- if (s12 !== peg$FAILED) {
843
- s13 = peg$parsecomment();
844
- if (s13 !== peg$FAILED) {
845
- peg$savedPos = s0;
846
- s1 = peg$c30(s1, s5, s9, s13);
847
- s0 = s1;
848
- } else {
849
- peg$currPos = s0;
850
- s0 = peg$FAILED;
851
- }
852
- } else {
853
- peg$currPos = s0;
854
- s0 = peg$FAILED;
855
- }
856
- } else {
857
- peg$currPos = s0;
858
- s0 = peg$FAILED;
859
- }
860
- } else {
861
- peg$currPos = s0;
862
- s0 = peg$FAILED;
863
- }
864
- } else {
865
- peg$currPos = s0;
866
- s0 = peg$FAILED;
867
- }
868
- } else {
869
- peg$currPos = s0;
870
- s0 = peg$FAILED;
871
- }
872
- } else {
873
- peg$currPos = s0;
874
- s0 = peg$FAILED;
875
- }
876
- } else {
877
- peg$currPos = s0;
878
- s0 = peg$FAILED;
879
- }
880
- } else {
881
- peg$currPos = s0;
882
- s0 = peg$FAILED;
883
- }
884
- } else {
885
- peg$currPos = s0;
886
- s0 = peg$FAILED;
887
- }
888
- } else {
889
- peg$currPos = s0;
890
- s0 = peg$FAILED;
891
- }
892
- } else {
893
- peg$currPos = s0;
894
- s0 = peg$FAILED;
895
- }
896
- } else {
897
- peg$currPos = s0;
898
- s0 = peg$FAILED;
899
- }
900
- if (s0 === peg$FAILED) {
901
- s0 = peg$currPos;
902
- s1 = peg$parsefieldType();
903
- if (s1 !== peg$FAILED) {
904
- s2 = peg$parse_();
905
- if (s2 !== peg$FAILED) {
906
- if (input.charCodeAt(peg$currPos) === 40) {
907
- s3 = peg$c0;
908
- peg$currPos++;
909
- } else {
910
- s3 = peg$FAILED;
911
- if (peg$silentFails === 0) { peg$fail(peg$c1); }
912
- }
913
- if (s3 !== peg$FAILED) {
914
- s4 = peg$parse_();
915
- if (s4 !== peg$FAILED) {
916
- s5 = peg$parsefieldValues();
917
- if (s5 !== peg$FAILED) {
918
- s6 = peg$parse_();
919
- if (s6 !== peg$FAILED) {
920
- if (input.charCodeAt(peg$currPos) === 41) {
921
- s7 = peg$c2;
922
- peg$currPos++;
923
- } else {
924
- s7 = peg$FAILED;
925
- if (peg$silentFails === 0) { peg$fail(peg$c3); }
926
- }
927
- if (s7 !== peg$FAILED) {
928
- s8 = peg$parse_();
929
- if (s8 !== peg$FAILED) {
930
- s9 = peg$parsename();
931
- if (s9 !== peg$FAILED) {
932
- s10 = peg$parse_();
933
- if (s10 !== peg$FAILED) {
934
- if (input.charCodeAt(peg$currPos) === 59) {
935
- s11 = peg$c23;
936
- peg$currPos++;
937
- } else {
938
- s11 = peg$FAILED;
939
- if (peg$silentFails === 0) { peg$fail(peg$c24); }
940
- }
941
- if (s11 !== peg$FAILED) {
942
- s12 = peg$parse_();
943
- if (s12 !== peg$FAILED) {
944
- s13 = peg$parsecomment();
945
- if (s13 !== peg$FAILED) {
946
- peg$savedPos = s0;
947
- s1 = peg$c31(s1, s5, s9, s13);
948
- s0 = s1;
949
- } else {
950
- peg$currPos = s0;
951
- s0 = peg$FAILED;
952
- }
953
- } else {
954
- peg$currPos = s0;
955
- s0 = peg$FAILED;
956
- }
957
- } else {
958
- peg$currPos = s0;
959
- s0 = peg$FAILED;
960
- }
961
- } else {
962
- peg$currPos = s0;
963
- s0 = peg$FAILED;
964
- }
965
- } else {
966
- peg$currPos = s0;
967
- s0 = peg$FAILED;
968
- }
969
- } else {
970
- peg$currPos = s0;
971
- s0 = peg$FAILED;
972
- }
973
- } else {
974
- peg$currPos = s0;
975
- s0 = peg$FAILED;
976
- }
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
- } else {
990
- peg$currPos = s0;
991
- s0 = peg$FAILED;
992
- }
993
- } else {
994
- peg$currPos = s0;
995
- s0 = peg$FAILED;
996
- }
997
- } else {
998
- peg$currPos = s0;
999
- s0 = peg$FAILED;
1000
- }
1001
- if (s0 === peg$FAILED) {
1002
- s0 = peg$parseinternalComment();
1003
- }
1004
- }
1005
- }
1006
-
1007
- return s0;
1008
- }
1009
-
1010
- function peg$parsefieldValues() {
1011
- var s0, s1, s2, s3, s4, s5, s6;
1012
-
1013
- s0 = peg$currPos;
1014
- s1 = peg$parsename();
1015
- if (s1 !== peg$FAILED) {
1016
- s2 = [];
1017
- s3 = peg$currPos;
1018
- if (input.charCodeAt(peg$currPos) === 44) {
1019
- s4 = peg$c32;
1020
- peg$currPos++;
1021
- } else {
1022
- s4 = peg$FAILED;
1023
- if (peg$silentFails === 0) { peg$fail(peg$c33); }
1024
- }
1025
- if (s4 !== peg$FAILED) {
1026
- s5 = peg$parse_();
1027
- if (s5 !== peg$FAILED) {
1028
- s6 = peg$parsename();
1029
- if (s6 !== peg$FAILED) {
1030
- peg$savedPos = s3;
1031
- s4 = peg$c19(s1, s6);
1032
- s3 = s4;
1033
- } else {
1034
- peg$currPos = s3;
1035
- s3 = peg$FAILED;
1036
- }
1037
- } else {
1038
- peg$currPos = s3;
1039
- s3 = peg$FAILED;
1040
- }
1041
- } else {
1042
- peg$currPos = s3;
1043
- s3 = peg$FAILED;
1044
- }
1045
- while (s3 !== peg$FAILED) {
1046
- s2.push(s3);
1047
- s3 = peg$currPos;
1048
- if (input.charCodeAt(peg$currPos) === 44) {
1049
- s4 = peg$c32;
1050
- peg$currPos++;
1051
- } else {
1052
- s4 = peg$FAILED;
1053
- if (peg$silentFails === 0) { peg$fail(peg$c33); }
1054
- }
1055
- if (s4 !== peg$FAILED) {
1056
- s5 = peg$parse_();
1057
- if (s5 !== peg$FAILED) {
1058
- s6 = peg$parsename();
1059
- if (s6 !== peg$FAILED) {
1060
- peg$savedPos = s3;
1061
- s4 = peg$c19(s1, s6);
1062
- s3 = s4;
1063
- } else {
1064
- peg$currPos = s3;
1065
- s3 = peg$FAILED;
1066
- }
1067
- } else {
1068
- peg$currPos = s3;
1069
- s3 = peg$FAILED;
1070
- }
1071
- } else {
1072
- peg$currPos = s3;
1073
- s3 = peg$FAILED;
1074
- }
1075
- }
1076
- if (s2 !== peg$FAILED) {
1077
- peg$savedPos = s0;
1078
- s1 = peg$c34(s1, s2);
1079
- s0 = s1;
1080
- } else {
1081
- peg$currPos = s0;
1082
- s0 = peg$FAILED;
1083
- }
1084
- } else {
1085
- peg$currPos = s0;
1086
- s0 = peg$FAILED;
1087
- }
1088
-
1089
- return s0;
1090
- }
1091
-
1092
- function peg$parsefieldType() {
1093
- var s0, s1, s2, s3;
1094
-
1095
- if (input.substr(peg$currPos, 3) === peg$c35) {
1096
- s0 = peg$c35;
1097
- peg$currPos += 3;
1098
- } else {
1099
- s0 = peg$FAILED;
1100
- if (peg$silentFails === 0) { peg$fail(peg$c36); }
1101
- }
1102
- if (s0 === peg$FAILED) {
1103
- if (input.substr(peg$currPos, 4) === peg$c37) {
1104
- s0 = peg$c37;
1105
- peg$currPos += 4;
1106
- } else {
1107
- s0 = peg$FAILED;
1108
- if (peg$silentFails === 0) { peg$fail(peg$c38); }
1109
- }
1110
- if (s0 === peg$FAILED) {
1111
- if (input.substr(peg$currPos, 5) === peg$c39) {
1112
- s0 = peg$c39;
1113
- peg$currPos += 5;
1114
- } else {
1115
- s0 = peg$FAILED;
1116
- if (peg$silentFails === 0) { peg$fail(peg$c40); }
1117
- }
1118
- if (s0 === peg$FAILED) {
1119
- if (input.substr(peg$currPos, 6) === peg$c41) {
1120
- s0 = peg$c41;
1121
- peg$currPos += 6;
1122
- } else {
1123
- s0 = peg$FAILED;
1124
- if (peg$silentFails === 0) { peg$fail(peg$c42); }
1125
- }
1126
- if (s0 === peg$FAILED) {
1127
- if (input.substr(peg$currPos, 4) === peg$c43) {
1128
- s0 = peg$c43;
1129
- peg$currPos += 4;
1130
- } else {
1131
- s0 = peg$FAILED;
1132
- if (peg$silentFails === 0) { peg$fail(peg$c44); }
1133
- }
1134
- if (s0 === peg$FAILED) {
1135
- if (input.substr(peg$currPos, 5) === peg$c45) {
1136
- s0 = peg$c45;
1137
- peg$currPos += 5;
1138
- } else {
1139
- s0 = peg$FAILED;
1140
- if (peg$silentFails === 0) { peg$fail(peg$c46); }
1141
- }
1142
- if (s0 === peg$FAILED) {
1143
- if (input.substr(peg$currPos, 5) === peg$c47) {
1144
- s0 = peg$c47;
1145
- peg$currPos += 5;
1146
- } else {
1147
- s0 = peg$FAILED;
1148
- if (peg$silentFails === 0) { peg$fail(peg$c48); }
1149
- }
1150
- if (s0 === peg$FAILED) {
1151
- if (input.substr(peg$currPos, 4) === peg$c49) {
1152
- s0 = peg$c49;
1153
- peg$currPos += 4;
1154
- } else {
1155
- s0 = peg$FAILED;
1156
- if (peg$silentFails === 0) { peg$fail(peg$c50); }
1157
- }
1158
- if (s0 === peg$FAILED) {
1159
- if (input.substr(peg$currPos, 6) === peg$c51) {
1160
- s0 = peg$c51;
1161
- peg$currPos += 6;
1162
- } else {
1163
- s0 = peg$FAILED;
1164
- if (peg$silentFails === 0) { peg$fail(peg$c52); }
1165
- }
1166
- if (s0 === peg$FAILED) {
1167
- if (input.substr(peg$currPos, 7) === peg$c53) {
1168
- s0 = peg$c53;
1169
- peg$currPos += 7;
1170
- } else {
1171
- s0 = peg$FAILED;
1172
- if (peg$silentFails === 0) { peg$fail(peg$c54); }
1173
- }
1174
- if (s0 === peg$FAILED) {
1175
- if (input.substr(peg$currPos, 4) === peg$c55) {
1176
- s0 = peg$c55;
1177
- peg$currPos += 4;
1178
- } else {
1179
- s0 = peg$FAILED;
1180
- if (peg$silentFails === 0) { peg$fail(peg$c56); }
1181
- }
1182
- if (s0 === peg$FAILED) {
1183
- if (input.substr(peg$currPos, 6) === peg$c57) {
1184
- s0 = peg$c57;
1185
- peg$currPos += 6;
1186
- } else {
1187
- s0 = peg$FAILED;
1188
- if (peg$silentFails === 0) { peg$fail(peg$c58); }
1189
- }
1190
- if (s0 === peg$FAILED) {
1191
- if (input.substr(peg$currPos, 6) === peg$c59) {
1192
- s0 = peg$c59;
1193
- peg$currPos += 6;
1194
- } else {
1195
- s0 = peg$FAILED;
1196
- if (peg$silentFails === 0) { peg$fail(peg$c60); }
1197
- }
1198
- if (s0 === peg$FAILED) {
1199
- if (input.substr(peg$currPos, 3) === peg$c61) {
1200
- s0 = peg$c61;
1201
- peg$currPos += 3;
1202
- } else {
1203
- s0 = peg$FAILED;
1204
- if (peg$silentFails === 0) { peg$fail(peg$c62); }
1205
- }
1206
- if (s0 === peg$FAILED) {
1207
- s0 = peg$currPos;
1208
- s1 = peg$parsedeclareType();
1209
- if (s1 !== peg$FAILED) {
1210
- s2 = peg$parse_();
1211
- if (s2 !== peg$FAILED) {
1212
- s3 = peg$parsedeclareName();
1213
- if (s3 !== peg$FAILED) {
1214
- peg$savedPos = s0;
1215
- s1 = peg$c63(s1, s3);
1216
- s0 = s1;
1217
- } else {
1218
- peg$currPos = s0;
1219
- s0 = peg$FAILED;
1220
- }
1221
- } else {
1222
- peg$currPos = s0;
1223
- s0 = peg$FAILED;
1224
- }
1225
- } else {
1226
- peg$currPos = s0;
1227
- s0 = peg$FAILED;
1228
- }
1229
- }
1230
- }
1231
- }
1232
- }
1233
- }
1234
- }
1235
- }
1236
- }
1237
- }
1238
- }
1239
- }
1240
- }
1241
- }
1242
- }
1243
-
1244
- return s0;
1245
- }
1246
-
1247
- function peg$parsefieldSize() {
1248
- var s0;
1249
-
1250
- s0 = peg$parsenumber();
1251
- if (s0 === peg$FAILED) {
1252
- s0 = peg$parsename();
1253
- }
1254
-
1255
- return s0;
1256
- }
1257
-
1258
- function peg$parsename() {
1259
- var s0, s1, s2, s3, s4;
1260
-
1261
- s0 = peg$currPos;
1262
- s1 = peg$currPos;
1263
- if (peg$c64.test(input.charAt(peg$currPos))) {
1264
- s2 = input.charAt(peg$currPos);
1265
- peg$currPos++;
1266
- } else {
1267
- s2 = peg$FAILED;
1268
- if (peg$silentFails === 0) { peg$fail(peg$c65); }
1269
- }
1270
- if (s2 !== peg$FAILED) {
1271
- s3 = [];
1272
- if (peg$c66.test(input.charAt(peg$currPos))) {
1273
- s4 = input.charAt(peg$currPos);
1274
- peg$currPos++;
1275
- } else {
1276
- s4 = peg$FAILED;
1277
- if (peg$silentFails === 0) { peg$fail(peg$c67); }
1278
- }
1279
- while (s4 !== peg$FAILED) {
1280
- s3.push(s4);
1281
- if (peg$c66.test(input.charAt(peg$currPos))) {
1282
- s4 = input.charAt(peg$currPos);
1283
- peg$currPos++;
1284
- } else {
1285
- s4 = peg$FAILED;
1286
- if (peg$silentFails === 0) { peg$fail(peg$c67); }
1287
- }
1288
- }
1289
- if (s3 !== peg$FAILED) {
1290
- s2 = [s2, s3];
1291
- s1 = s2;
1292
- } else {
1293
- peg$currPos = s1;
1294
- s1 = peg$FAILED;
1295
- }
1296
- } else {
1297
- peg$currPos = s1;
1298
- s1 = peg$FAILED;
1299
- }
1300
- if (s1 !== peg$FAILED) {
1301
- peg$savedPos = s0;
1302
- s1 = peg$c68(s1);
1303
- }
1304
- s0 = s1;
1305
-
1306
- return s0;
1307
- }
1308
-
1309
- function peg$parsequotedString() {
1310
- var s0, s1, s2, s3;
1311
-
1312
- s0 = peg$currPos;
1313
- if (input.charCodeAt(peg$currPos) === 34) {
1314
- s1 = peg$c69;
1315
- peg$currPos++;
1316
- } else {
1317
- s1 = peg$FAILED;
1318
- if (peg$silentFails === 0) { peg$fail(peg$c70); }
1319
- }
1320
- if (s1 !== peg$FAILED) {
1321
- s2 = [];
1322
- if (peg$c71.test(input.charAt(peg$currPos))) {
1323
- s3 = input.charAt(peg$currPos);
1324
- peg$currPos++;
1325
- } else {
1326
- s3 = peg$FAILED;
1327
- if (peg$silentFails === 0) { peg$fail(peg$c72); }
1328
- }
1329
- while (s3 !== peg$FAILED) {
1330
- s2.push(s3);
1331
- if (peg$c71.test(input.charAt(peg$currPos))) {
1332
- s3 = input.charAt(peg$currPos);
1333
- peg$currPos++;
1334
- } else {
1335
- s3 = peg$FAILED;
1336
- if (peg$silentFails === 0) { peg$fail(peg$c72); }
1337
- }
1338
- }
1339
- if (s2 !== peg$FAILED) {
1340
- if (input.charCodeAt(peg$currPos) === 34) {
1341
- s3 = peg$c69;
1342
- peg$currPos++;
1343
- } else {
1344
- s3 = peg$FAILED;
1345
- if (peg$silentFails === 0) { peg$fail(peg$c70); }
1346
- }
1347
- if (s3 !== peg$FAILED) {
1348
- peg$savedPos = s0;
1349
- s1 = peg$c73(s2);
1350
- s0 = s1;
1351
- } else {
1352
- peg$currPos = s0;
1353
- s0 = peg$FAILED;
1354
- }
1355
- } else {
1356
- peg$currPos = s0;
1357
- s0 = peg$FAILED;
1358
- }
1359
- } else {
1360
- peg$currPos = s0;
1361
- s0 = peg$FAILED;
1362
- }
1363
-
1364
- return s0;
1365
- }
1366
-
1367
- function peg$parsenonQuotedString() {
1368
- var s0, s1, s2;
1369
-
1370
- s0 = peg$currPos;
1371
- s1 = [];
1372
- if (peg$c74.test(input.charAt(peg$currPos))) {
1373
- s2 = input.charAt(peg$currPos);
1374
- peg$currPos++;
1375
- } else {
1376
- s2 = peg$FAILED;
1377
- if (peg$silentFails === 0) { peg$fail(peg$c75); }
1378
- }
1379
- while (s2 !== peg$FAILED) {
1380
- s1.push(s2);
1381
- if (peg$c74.test(input.charAt(peg$currPos))) {
1382
- s2 = input.charAt(peg$currPos);
1383
- peg$currPos++;
1384
- } else {
1385
- s2 = peg$FAILED;
1386
- if (peg$silentFails === 0) { peg$fail(peg$c75); }
1387
- }
1388
- }
1389
- if (s1 !== peg$FAILED) {
1390
- peg$savedPos = s0;
1391
- s1 = peg$c76(s1);
1392
- }
1393
- s0 = s1;
1394
-
1395
- return s0;
1396
- }
1397
-
1398
- function peg$parsenumber() {
1399
- var s0, s1, s2, s3;
1400
-
1401
- peg$silentFails++;
1402
- s0 = peg$currPos;
1403
- s1 = peg$parse_();
1404
- if (s1 !== peg$FAILED) {
1405
- s2 = [];
1406
- if (peg$c78.test(input.charAt(peg$currPos))) {
1407
- s3 = input.charAt(peg$currPos);
1408
- peg$currPos++;
1409
- } else {
1410
- s3 = peg$FAILED;
1411
- if (peg$silentFails === 0) { peg$fail(peg$c79); }
1412
- }
1413
- if (s3 !== peg$FAILED) {
1414
- while (s3 !== peg$FAILED) {
1415
- s2.push(s3);
1416
- if (peg$c78.test(input.charAt(peg$currPos))) {
1417
- s3 = input.charAt(peg$currPos);
1418
- peg$currPos++;
1419
- } else {
1420
- s3 = peg$FAILED;
1421
- if (peg$silentFails === 0) { peg$fail(peg$c79); }
1422
- }
1423
- }
1424
- } else {
1425
- s2 = peg$FAILED;
1426
- }
1427
- if (s2 !== peg$FAILED) {
1428
- peg$savedPos = s0;
1429
- s1 = peg$c80();
1430
- s0 = s1;
1431
- } else {
1432
- peg$currPos = s0;
1433
- s0 = peg$FAILED;
1434
- }
1435
- } else {
1436
- peg$currPos = s0;
1437
- s0 = peg$FAILED;
1438
- }
1439
- peg$silentFails--;
1440
- if (s0 === peg$FAILED) {
1441
- s1 = peg$FAILED;
1442
- if (peg$silentFails === 0) { peg$fail(peg$c77); }
1443
- }
1444
-
1445
- return s0;
1446
- }
1447
-
1448
- function peg$parse_() {
1449
- var s0, s1;
1450
-
1451
- peg$silentFails++;
1452
- s0 = [];
1453
- if (peg$c82.test(input.charAt(peg$currPos))) {
1454
- s1 = input.charAt(peg$currPos);
1455
- peg$currPos++;
1456
- } else {
1457
- s1 = peg$FAILED;
1458
- if (peg$silentFails === 0) { peg$fail(peg$c83); }
1459
- }
1460
- while (s1 !== peg$FAILED) {
1461
- s0.push(s1);
1462
- if (peg$c82.test(input.charAt(peg$currPos))) {
1463
- s1 = input.charAt(peg$currPos);
1464
- peg$currPos++;
1465
- } else {
1466
- s1 = peg$FAILED;
1467
- if (peg$silentFails === 0) { peg$fail(peg$c83); }
1468
- }
1469
- }
1470
- peg$silentFails--;
1471
- if (s0 === peg$FAILED) {
1472
- s1 = peg$FAILED;
1473
- if (peg$silentFails === 0) { peg$fail(peg$c81); }
1474
- }
1475
-
1476
- return s0;
1477
- }
1478
-
1479
- peg$result = peg$startRuleFunction();
1480
-
1481
- if (peg$result !== peg$FAILED && peg$currPos === input.length) {
1482
- return peg$result;
1483
- } else {
1484
- if (peg$result !== peg$FAILED && peg$currPos < input.length) {
1485
- peg$fail(peg$endExpectation());
1486
- }
1487
-
1488
- throw peg$buildStructuredError(
1489
- peg$maxFailExpected,
1490
- peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,
1491
- peg$maxFailPos < input.length
1492
- ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
1493
- : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)
1494
- );
1495
- }
1496
- }
1497
-
1498
- module.exports = {
1499
- SyntaxError: peg$SyntaxError,
1500
- parse: peg$parse
1501
- };