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