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