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