@gmod/bed 2.1.5 → 2.1.7

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