unexpectedly 0.0.7 → 1.0.0

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/testFile.peg.js CHANGED
@@ -1,8 +1,9 @@
1
- // Generated by Peggy 0.11.0.
1
+ // Generated by Peggy 3.0.2.
2
2
  //
3
- // https://github.com/peggyjs/peggy
3
+ // https://peggyjs.org/
4
4
 
5
- "use strict";
5
+
6
+ import { mapObj } from './utils.js'
6
7
 
7
8
  function peg$subclass(child, parent) {
8
9
  function C() { this.constructor = child; }
@@ -11,19 +12,62 @@ function peg$subclass(child, parent) {
11
12
  }
12
13
 
13
14
  function peg$SyntaxError(message, expected, found, location) {
14
- this.message = message;
15
- this.expected = expected;
16
- this.found = found;
17
- this.location = location;
18
- this.name = "SyntaxError";
19
-
20
- if (typeof Error.captureStackTrace === "function") {
21
- Error.captureStackTrace(this, peg$SyntaxError);
15
+ var self = Error.call(this, message);
16
+ // istanbul ignore next Check is a necessary evil to support older environments
17
+ if (Object.setPrototypeOf) {
18
+ Object.setPrototypeOf(self, peg$SyntaxError.prototype);
22
19
  }
20
+ self.expected = expected;
21
+ self.found = found;
22
+ self.location = location;
23
+ self.name = "SyntaxError";
24
+ return self;
23
25
  }
24
26
 
25
27
  peg$subclass(peg$SyntaxError, Error);
26
28
 
29
+ function peg$padEnd(str, targetLength, padString) {
30
+ padString = padString || " ";
31
+ if (str.length > targetLength) { return str; }
32
+ targetLength -= str.length;
33
+ padString += padString.repeat(targetLength);
34
+ return str + padString.slice(0, targetLength);
35
+ }
36
+
37
+ peg$SyntaxError.prototype.format = function(sources) {
38
+ var str = "Error: " + this.message;
39
+ if (this.location) {
40
+ var src = null;
41
+ var k;
42
+ for (k = 0; k < sources.length; k++) {
43
+ if (sources[k].source === this.location.source) {
44
+ src = sources[k].text.split(/\r\n|\n|\r/g);
45
+ break;
46
+ }
47
+ }
48
+ var s = this.location.start;
49
+ var offset_s = (this.location.source && (typeof this.location.source.offset === "function"))
50
+ ? this.location.source.offset(s)
51
+ : s;
52
+ var loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column;
53
+ if (src) {
54
+ var e = this.location.end;
55
+ var filler = peg$padEnd("", offset_s.line.toString().length, ' ');
56
+ var line = src[s.line - 1];
57
+ var last = s.line === e.line ? e.column : line.length + 1;
58
+ var hatLen = (last - s.column) || 1;
59
+ str += "\n --> " + loc + "\n"
60
+ + filler + " |\n"
61
+ + offset_s.line + " | " + line + "\n"
62
+ + filler + " | " + peg$padEnd("", s.column - 1, ' ')
63
+ + peg$padEnd("", hatLen, "^");
64
+ } else {
65
+ str += "\n at " + loc;
66
+ }
67
+ }
68
+ return str;
69
+ };
70
+
27
71
  peg$SyntaxError.buildMessage = function(expected, found) {
28
72
  var DESCRIBE_EXPECTATION_FNS = {
29
73
  literal: function(expectation) {
@@ -37,7 +81,7 @@ peg$SyntaxError.buildMessage = function(expected, found) {
37
81
  : classEscape(part);
38
82
  });
39
83
 
40
- return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
84
+ return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]";
41
85
  },
42
86
 
43
87
  any: function() {
@@ -128,115 +172,122 @@ function peg$parse(input, options) {
128
172
  options = options !== undefined ? options : {};
129
173
 
130
174
  var peg$FAILED = {};
175
+ var peg$source = options.grammarSource;
131
176
 
132
177
  var peg$startRuleFunctions = { start: peg$parsestart };
133
178
  var peg$startRuleFunction = peg$parsestart;
134
179
 
135
- var peg$c0 = function(h) { return h };
136
- var peg$c1 = function(head, l) {return l};
137
- var peg$c2 = function(head, tail) {
138
- const all = list(head, tail)
139
- const vars = mapObj(all.filter(t => t && t.hasOwnProperty('name')),
140
- ({name, ...rest}) => [name, rest])
141
- return {
142
- tests: all.filter(t => t && t.hasOwnProperty('expected')),
143
- vars
144
- }
145
- };
146
- var peg$c3 = "";
147
- var peg$c4 = "#!";
148
- var peg$c5 = peg$literalExpectation("#!", false);
149
- var peg$c6 = ":";
150
- var peg$c7 = peg$literalExpectation(":", false);
151
- var peg$c8 = function(name, c) { return { value: c, line: location().start.line, column: location().start.column}};
152
- var peg$c9 = function(name, value) {
153
- value.name = name;
154
- return value;
155
- };
156
- var peg$c10 = function(expected, inp) { return inp};
157
- var peg$c11 = function(expected, inputs) {
158
- return { expected, inputs, line: location().start.line }
159
- };
160
- var peg$c12 = "!";
161
- var peg$c13 = peg$literalExpectation("!", false);
162
- var peg$c14 = function() { return options.EXCEPTION || "!" };
163
- var peg$c15 = "\"";
164
- var peg$c16 = peg$literalExpectation("\"", false);
165
- var peg$c17 = function(info) { return info.join('') };
166
- var peg$c18 = "'";
167
- var peg$c19 = peg$literalExpectation("'", false);
168
- var peg$c20 = "`";
169
- var peg$c21 = peg$literalExpectation("`", false);
170
- var peg$c22 = peg$otherExpectation("characters that go inside double quotes, including escaped dquotes");
171
- var peg$c23 = "\\\"";
172
- var peg$c24 = peg$literalExpectation("\\\"", false);
173
- var peg$c25 = function() { return '"' };
174
- var peg$c26 = /^[^\\"]/;
175
- var peg$c27 = peg$classExpectation(["\\", "\""], true, false);
176
- var peg$c28 = peg$otherExpectation("characters that go inside single quotes, including escaped squotes");
177
- var peg$c29 = "\\'";
178
- var peg$c30 = peg$literalExpectation("\\'", false);
179
- var peg$c31 = function() { return "'" };
180
- var peg$c32 = /^[^\\']/;
181
- var peg$c33 = peg$classExpectation(["\\", "'"], true, false);
182
- var peg$c34 = peg$otherExpectation("characters that go inside back quotes, including escaped bquotes");
183
- var peg$c35 = "\\`";
184
- var peg$c36 = peg$literalExpectation("\\`", false);
185
- var peg$c37 = function() { return "`" };
186
- var peg$c38 = /^[^\\`]/;
187
- var peg$c39 = peg$classExpectation(["\\", "`"], true, false);
188
- var peg$c40 = "0x";
189
- var peg$c41 = peg$literalExpectation("0x", false);
190
- var peg$c42 = /^[a-fA-F0-9]/;
191
- var peg$c43 = peg$classExpectation([["a", "f"], ["A", "F"], ["0", "9"]], false, false);
192
- var peg$c44 = function(hx) { return '0x' + hx.toLowerCase(hx) };
193
- var peg$c45 = function(chars) { return chars.join('') };
194
- var peg$c46 = peg$otherExpectation("words can contain quoted bits");
195
- var peg$c47 = /^[^ #:'"\t\r\n]/;
196
- var peg$c48 = peg$classExpectation([" ", "#", ":", "'", "\"", "\t", "\r", "\n"], true, false);
197
- var peg$c49 = peg$otherExpectation("other quoted characters, as needed");
198
- var peg$c50 = "\\\\";
199
- var peg$c51 = peg$literalExpectation("\\\\", false);
200
- var peg$c52 = function() { return '\\' };
201
- var peg$c53 = "\\r";
202
- var peg$c54 = peg$literalExpectation("\\r", false);
203
- var peg$c55 = function() { return '\r' };
204
- var peg$c56 = "\\n";
205
- var peg$c57 = peg$literalExpectation("\\n", false);
206
- var peg$c58 = function() { return '\n' };
207
- var peg$c59 = "\\t";
208
- var peg$c60 = peg$literalExpectation("\\t", false);
209
- var peg$c61 = function() { return '\t' };
210
- var peg$c62 = "\\#";
211
- var peg$c63 = peg$literalExpectation("\\#", false);
212
- var peg$c64 = function() { return '#' };
213
- var peg$c65 = "\\:";
214
- var peg$c66 = peg$literalExpectation("\\:", false);
215
- var peg$c67 = function() { return ':' };
216
- var peg$c68 = "\\ ";
217
- var peg$c69 = peg$literalExpectation("\\ ", false);
218
- var peg$c70 = function() { return ' ' };
219
- var peg$c71 = "#";
220
- var peg$c72 = peg$literalExpectation("#", false);
221
- var peg$c73 = /^[^\r\n]/;
222
- var peg$c74 = peg$classExpectation(["\r", "\n"], true, false);
223
- var peg$c75 = function() { return undefined };
224
- var peg$c76 = peg$otherExpectation("optional whitespace");
225
- var peg$c77 = /^[ \t]/;
226
- var peg$c78 = peg$classExpectation([" ", "\t"], false, false);
227
- var peg$c79 = peg$otherExpectation("optional whitespace, including newlines");
228
- var peg$c80 = /^[ \t\r\n]/;
229
- var peg$c81 = peg$classExpectation([" ", "\t", "\r", "\n"], false, false);
230
- var peg$c82 = function() { return undefined};
231
- var peg$c83 = peg$otherExpectation("required whitespace");
232
- var peg$c84 = peg$otherExpectation("End of line");
233
- var peg$c85 = "\n";
234
- var peg$c86 = peg$literalExpectation("\n", false);
235
- var peg$c87 = "\r\n";
236
- var peg$c88 = peg$literalExpectation("\r\n", false);
237
- var peg$c89 = "\r";
238
- var peg$c90 = peg$literalExpectation("\r", false);
239
-
180
+ var peg$c0 = "#!";
181
+ var peg$c1 = "!";
182
+ var peg$c2 = ":";
183
+ var peg$c3 = "\"";
184
+ var peg$c4 = "'";
185
+ var peg$c5 = "`";
186
+ var peg$c6 = "\\\"";
187
+ var peg$c7 = "\\'";
188
+ var peg$c8 = "\\`";
189
+ var peg$c9 = "0x";
190
+ var peg$c10 = "\\\\";
191
+ var peg$c11 = "\\r";
192
+ var peg$c12 = "\\n";
193
+ var peg$c13 = "\\t";
194
+ var peg$c14 = "\\#";
195
+ var peg$c15 = "\\:";
196
+ var peg$c16 = "\\ ";
197
+ var peg$c17 = "#";
198
+ var peg$c18 = "\n";
199
+ var peg$c19 = "\r\n";
200
+ var peg$c20 = "\r";
201
+
202
+ var peg$r0 = /^[^\\"]/;
203
+ var peg$r1 = /^[^\\']/;
204
+ var peg$r2 = /^[^\\`]/;
205
+ var peg$r3 = /^[a-fA-F0-9]/;
206
+ var peg$r4 = /^[^ #:'"\t\r\n]/;
207
+ var peg$r5 = /^[^\r\n]/;
208
+ var peg$r6 = /^[ \t]/;
209
+ var peg$r7 = /^[ \t\r\n]/;
210
+
211
+ var peg$e0 = peg$literalExpectation("#!", false);
212
+ var peg$e1 = peg$literalExpectation("!", false);
213
+ var peg$e2 = peg$literalExpectation(":", false);
214
+ var peg$e3 = peg$literalExpectation("\"", false);
215
+ var peg$e4 = peg$literalExpectation("'", false);
216
+ var peg$e5 = peg$literalExpectation("`", false);
217
+ var peg$e6 = peg$otherExpectation("characters that go inside double quotes, including escaped dquotes");
218
+ var peg$e7 = peg$literalExpectation("\\\"", false);
219
+ var peg$e8 = peg$classExpectation(["\\", "\""], true, false);
220
+ var peg$e9 = peg$otherExpectation("characters that go inside single quotes, including escaped squotes");
221
+ var peg$e10 = peg$literalExpectation("\\'", false);
222
+ var peg$e11 = peg$classExpectation(["\\", "'"], true, false);
223
+ var peg$e12 = peg$otherExpectation("characters that go inside back quotes, including escaped bquotes");
224
+ var peg$e13 = peg$literalExpectation("\\`", false);
225
+ var peg$e14 = peg$classExpectation(["\\", "`"], true, false);
226
+ var peg$e15 = peg$literalExpectation("0x", false);
227
+ var peg$e16 = peg$classExpectation([["a", "f"], ["A", "F"], ["0", "9"]], false, false);
228
+ var peg$e17 = peg$otherExpectation("words can contain quoted bits");
229
+ var peg$e18 = peg$classExpectation([" ", "#", ":", "'", "\"", "\t", "\r", "\n"], true, false);
230
+ var peg$e19 = peg$otherExpectation("other quoted characters, as needed");
231
+ var peg$e20 = peg$literalExpectation("\\\\", false);
232
+ var peg$e21 = peg$literalExpectation("\\r", false);
233
+ var peg$e22 = peg$literalExpectation("\\n", false);
234
+ var peg$e23 = peg$literalExpectation("\\t", false);
235
+ var peg$e24 = peg$literalExpectation("\\#", false);
236
+ var peg$e25 = peg$literalExpectation("\\:", false);
237
+ var peg$e26 = peg$literalExpectation("\\ ", false);
238
+ var peg$e27 = peg$literalExpectation("#", false);
239
+ var peg$e28 = peg$classExpectation(["\r", "\n"], true, false);
240
+ var peg$e29 = peg$otherExpectation("optional whitespace");
241
+ var peg$e30 = peg$classExpectation([" ", "\t"], false, false);
242
+ var peg$e31 = peg$otherExpectation("optional whitespace, including newlines");
243
+ var peg$e32 = peg$classExpectation([" ", "\t", "\r", "\n"], false, false);
244
+ var peg$e33 = peg$otherExpectation("required whitespace");
245
+ var peg$e34 = peg$otherExpectation("End of line");
246
+ var peg$e35 = peg$literalExpectation("\n", false);
247
+ var peg$e36 = peg$literalExpectation("\r\n", false);
248
+ var peg$e37 = peg$literalExpectation("\r", false);
249
+
250
+ var peg$f0 = function(all) {
251
+ const vars = mapObj(all.filter(t => t && t.hasOwnProperty('name')),
252
+ ({name, ...rest}) => [name, rest])
253
+ return {
254
+ tests: all.filter(t => t && t.hasOwnProperty('expected')),
255
+ vars
256
+ }
257
+ };
258
+ var peg$f1 = function(env, name, value) {
259
+ value.name = name;
260
+ value.env = Boolean(env);
261
+ return value;
262
+ };
263
+ var peg$f2 = function(value) {
264
+ const start = location().start;
265
+ return { value, line: start.line, column: start.column}
266
+ };
267
+ var peg$f3 = function(expected, inputs) {
268
+ const start = location().start;
269
+ return { expected, inputs, line: start.line, column: start.column }
270
+ };
271
+ var peg$f4 = function() { return options.EXCEPTION || "!" };
272
+ var peg$f5 = function(info) { return info.join('') };
273
+ var peg$f6 = function(info) { return info.join('') };
274
+ var peg$f7 = function(info) { return info.join('') };
275
+ var peg$f8 = function() { return '"' };
276
+ var peg$f9 = function() { return "'" };
277
+ var peg$f10 = function() { return "`" };
278
+ var peg$f11 = function(hx) { return '0x' + hx.toLowerCase(hx) };
279
+ var peg$f12 = function(chars) { return chars.join('') };
280
+ var peg$f13 = function() { return '\\' };
281
+ var peg$f14 = function() { return '\r' };
282
+ var peg$f15 = function() { return '\n' };
283
+ var peg$f16 = function() { return '\t' };
284
+ var peg$f17 = function() { return '#' };
285
+ var peg$f18 = function() { return ':' };
286
+ var peg$f19 = function() { return ' ' };
287
+ var peg$f20 = function() { return undefined };
288
+ var peg$f21 = function() { return undefined };
289
+ var peg$f22 = function() { return undefined};
290
+ var peg$f23 = function() { return undefined };
240
291
  var peg$currPos = 0;
241
292
  var peg$savedPos = 0;
242
293
  var peg$posDetailsCache = [{ line: 1, column: 1 }];
@@ -258,6 +309,18 @@ function peg$parse(input, options) {
258
309
  return input.substring(peg$savedPos, peg$currPos);
259
310
  }
260
311
 
312
+ function offset() {
313
+ return peg$savedPos;
314
+ }
315
+
316
+ function range() {
317
+ return {
318
+ source: peg$source,
319
+ start: peg$savedPos,
320
+ end: peg$currPos
321
+ };
322
+ }
323
+
261
324
  function location() {
262
325
  return peg$computeLocation(peg$savedPos, peg$currPos);
263
326
  }
@@ -337,11 +400,12 @@ function peg$parse(input, options) {
337
400
  }
338
401
  }
339
402
 
340
- function peg$computeLocation(startPos, endPos) {
403
+ function peg$computeLocation(startPos, endPos, offset) {
341
404
  var startPosDetails = peg$computePosDetails(startPos);
342
405
  var endPosDetails = peg$computePosDetails(endPos);
343
406
 
344
- return {
407
+ var res = {
408
+ source: peg$source,
345
409
  start: {
346
410
  offset: startPos,
347
411
  line: startPosDetails.line,
@@ -353,6 +417,11 @@ function peg$parse(input, options) {
353
417
  column: endPosDetails.column
354
418
  }
355
419
  };
420
+ if (offset && peg$source && (typeof peg$source.offset === "function")) {
421
+ res.start = peg$source.offset(res.start);
422
+ res.end = peg$source.offset(res.end);
423
+ }
424
+ return res;
356
425
  }
357
426
 
358
427
  function peg$fail(expected) {
@@ -380,107 +449,39 @@ function peg$parse(input, options) {
380
449
  }
381
450
 
382
451
  function peg$parsestart() {
383
- var s0, s1, s2, s3, s4, s5, s6, s7;
452
+ var s0, s1, s2, s3, s4, s5, s6;
384
453
 
385
454
  s0 = peg$currPos;
386
- s1 = peg$currPos;
387
- s2 = peg$parseWS();
388
- if (s2 !== peg$FAILED) {
389
- s3 = peg$parseline();
390
- if (s3 === peg$FAILED) {
391
- s3 = null;
392
- }
393
- if (s3 !== peg$FAILED) {
394
- s4 = peg$parse_();
395
- if (s4 !== peg$FAILED) {
396
- peg$savedPos = s1;
397
- s2 = peg$c0(s3);
398
- s1 = s2;
399
- } else {
400
- peg$currPos = s1;
401
- s1 = peg$FAILED;
402
- }
403
- } else {
404
- peg$currPos = s1;
405
- s1 = peg$FAILED;
406
- }
407
- } else {
408
- peg$currPos = s1;
409
- s1 = peg$FAILED;
455
+ s1 = [];
456
+ s2 = peg$currPos;
457
+ s3 = peg$parseWS();
458
+ s4 = peg$parseline();
459
+ if (s4 === peg$FAILED) {
460
+ s4 = null;
410
461
  }
411
- if (s1 !== peg$FAILED) {
412
- s2 = [];
413
- s3 = peg$currPos;
414
- s4 = peg$parseEOL();
415
- if (s4 !== peg$FAILED) {
416
- s5 = peg$parseWS();
417
- if (s5 !== peg$FAILED) {
418
- s6 = peg$parseline();
419
- if (s6 !== peg$FAILED) {
420
- s7 = peg$parse_();
421
- if (s7 !== peg$FAILED) {
422
- peg$savedPos = s3;
423
- s4 = peg$c1(s1, s6);
424
- s3 = s4;
425
- } else {
426
- peg$currPos = s3;
427
- s3 = peg$FAILED;
428
- }
429
- } else {
430
- peg$currPos = s3;
431
- s3 = peg$FAILED;
432
- }
433
- } else {
434
- peg$currPos = s3;
435
- s3 = peg$FAILED;
436
- }
437
- } else {
438
- peg$currPos = s3;
439
- s3 = peg$FAILED;
440
- }
441
- while (s3 !== peg$FAILED) {
442
- s2.push(s3);
462
+ s5 = peg$parse_();
463
+ s2 = s4;
464
+ while (s2 !== peg$FAILED) {
465
+ s1.push(s2);
466
+ s2 = peg$currPos;
467
+ s3 = peg$parseEOL();
468
+ if (s3 !== peg$FAILED) {
443
469
  s3 = peg$currPos;
444
- s4 = peg$parseEOL();
445
- if (s4 !== peg$FAILED) {
446
- s5 = peg$parseWS();
447
- if (s5 !== peg$FAILED) {
448
- s6 = peg$parseline();
449
- if (s6 !== peg$FAILED) {
450
- s7 = peg$parse_();
451
- if (s7 !== peg$FAILED) {
452
- peg$savedPos = s3;
453
- s4 = peg$c1(s1, s6);
454
- s3 = s4;
455
- } else {
456
- peg$currPos = s3;
457
- s3 = peg$FAILED;
458
- }
459
- } else {
460
- peg$currPos = s3;
461
- s3 = peg$FAILED;
462
- }
463
- } else {
464
- peg$currPos = s3;
465
- s3 = peg$FAILED;
466
- }
467
- } else {
468
- peg$currPos = s3;
469
- s3 = peg$FAILED;
470
+ s4 = peg$parseWS();
471
+ s5 = peg$parseline();
472
+ if (s5 === peg$FAILED) {
473
+ s5 = null;
470
474
  }
471
- }
472
- if (s2 !== peg$FAILED) {
473
- peg$savedPos = s0;
474
- s1 = peg$c2(s1, s2);
475
- s0 = s1;
475
+ s6 = peg$parse_();
476
+ s3 = s5;
477
+ s2 = s3;
476
478
  } else {
477
- peg$currPos = s0;
478
- s0 = peg$FAILED;
479
+ s2 = s3;
479
480
  }
480
- } else {
481
- peg$currPos = s0;
482
- s0 = peg$FAILED;
483
481
  }
482
+ peg$savedPos = s0;
483
+ s1 = peg$f0(s1);
484
+ s0 = s1;
484
485
 
485
486
  return s0;
486
487
  }
@@ -494,7 +495,7 @@ function peg$parse(input, options) {
494
495
  if (s0 === peg$FAILED) {
495
496
  s0 = peg$parsetest();
496
497
  if (s0 === peg$FAILED) {
497
- s0 = peg$c3;
498
+ s0 = '';
498
499
  }
499
500
  }
500
501
  }
@@ -503,62 +504,45 @@ function peg$parse(input, options) {
503
504
  }
504
505
 
505
506
  function peg$parsevar() {
506
- var s0, s1, s2, s3, s4, s5, s6, s7, s8;
507
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
507
508
 
508
509
  s0 = peg$currPos;
509
- if (input.substr(peg$currPos, 2) === peg$c4) {
510
- s1 = peg$c4;
510
+ if (input.substr(peg$currPos, 2) === peg$c0) {
511
+ s1 = peg$c0;
511
512
  peg$currPos += 2;
512
513
  } else {
513
514
  s1 = peg$FAILED;
514
- if (peg$silentFails === 0) { peg$fail(peg$c5); }
515
+ if (peg$silentFails === 0) { peg$fail(peg$e0); }
515
516
  }
516
517
  if (s1 !== peg$FAILED) {
517
- s2 = peg$parse_();
518
- if (s2 !== peg$FAILED) {
519
- s3 = peg$parsechunk();
520
- if (s3 !== peg$FAILED) {
521
- s4 = peg$parse_();
522
- if (s4 !== peg$FAILED) {
523
- if (input.charCodeAt(peg$currPos) === 58) {
524
- s5 = peg$c6;
525
- peg$currPos++;
526
- } else {
527
- s5 = peg$FAILED;
528
- if (peg$silentFails === 0) { peg$fail(peg$c7); }
529
- }
530
- if (s5 !== peg$FAILED) {
531
- s6 = peg$parse_();
532
- if (s6 !== peg$FAILED) {
533
- s7 = peg$currPos;
534
- s8 = peg$parsechunk();
535
- if (s8 !== peg$FAILED) {
536
- peg$savedPos = s7;
537
- s8 = peg$c8(s3, s8);
538
- }
539
- s7 = s8;
540
- if (s7 !== peg$FAILED) {
541
- s8 = peg$parse_();
542
- if (s8 !== peg$FAILED) {
543
- peg$savedPos = s0;
544
- s1 = peg$c9(s3, s7);
545
- s0 = s1;
546
- } else {
547
- peg$currPos = s0;
548
- s0 = peg$FAILED;
549
- }
550
- } else {
551
- peg$currPos = s0;
552
- s0 = peg$FAILED;
553
- }
554
- } else {
555
- peg$currPos = s0;
556
- s0 = peg$FAILED;
557
- }
558
- } else {
559
- peg$currPos = s0;
560
- s0 = peg$FAILED;
561
- }
518
+ if (input.charCodeAt(peg$currPos) === 33) {
519
+ s2 = peg$c1;
520
+ peg$currPos++;
521
+ } else {
522
+ s2 = peg$FAILED;
523
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
524
+ }
525
+ if (s2 === peg$FAILED) {
526
+ s2 = null;
527
+ }
528
+ s3 = peg$parse_();
529
+ s4 = peg$parsechunk();
530
+ if (s4 !== peg$FAILED) {
531
+ s5 = peg$parse_();
532
+ if (input.charCodeAt(peg$currPos) === 58) {
533
+ s6 = peg$c2;
534
+ peg$currPos++;
535
+ } else {
536
+ s6 = peg$FAILED;
537
+ if (peg$silentFails === 0) { peg$fail(peg$e2); }
538
+ }
539
+ if (s6 !== peg$FAILED) {
540
+ s7 = peg$parse_();
541
+ s8 = peg$parseval();
542
+ if (s8 !== peg$FAILED) {
543
+ s9 = peg$parse_();
544
+ peg$savedPos = s0;
545
+ s0 = peg$f1(s2, s4, s8);
562
546
  } else {
563
547
  peg$currPos = s0;
564
548
  s0 = peg$FAILED;
@@ -579,6 +563,20 @@ function peg$parse(input, options) {
579
563
  return s0;
580
564
  }
581
565
 
566
+ function peg$parseval() {
567
+ var s0, s1;
568
+
569
+ s0 = peg$currPos;
570
+ s1 = peg$parsechunk();
571
+ if (s1 !== peg$FAILED) {
572
+ peg$savedPos = s0;
573
+ s1 = peg$f2(s1);
574
+ }
575
+ s0 = s1;
576
+
577
+ return s0;
578
+ }
579
+
582
580
  function peg$parsetest() {
583
581
  var s0, s1, s2, s3, s4, s5;
584
582
 
@@ -591,9 +589,7 @@ function peg$parse(input, options) {
591
589
  if (s4 !== peg$FAILED) {
592
590
  s5 = peg$parsechunk();
593
591
  if (s5 !== peg$FAILED) {
594
- peg$savedPos = s3;
595
- s4 = peg$c10(s1, s5);
596
- s3 = s4;
592
+ s3 = s5;
597
593
  } else {
598
594
  peg$currPos = s3;
599
595
  s3 = peg$FAILED;
@@ -609,9 +605,7 @@ function peg$parse(input, options) {
609
605
  if (s4 !== peg$FAILED) {
610
606
  s5 = peg$parsechunk();
611
607
  if (s5 !== peg$FAILED) {
612
- peg$savedPos = s3;
613
- s4 = peg$c10(s1, s5);
614
- s3 = s4;
608
+ s3 = s5;
615
609
  } else {
616
610
  peg$currPos = s3;
617
611
  s3 = peg$FAILED;
@@ -621,23 +615,12 @@ function peg$parse(input, options) {
621
615
  s3 = peg$FAILED;
622
616
  }
623
617
  }
624
- if (s2 !== peg$FAILED) {
625
- s3 = peg$parsecomment();
626
- if (s3 === peg$FAILED) {
627
- s3 = null;
628
- }
629
- if (s3 !== peg$FAILED) {
630
- peg$savedPos = s0;
631
- s1 = peg$c11(s1, s2);
632
- s0 = s1;
633
- } else {
634
- peg$currPos = s0;
635
- s0 = peg$FAILED;
636
- }
637
- } else {
638
- peg$currPos = s0;
639
- s0 = peg$FAILED;
618
+ s3 = peg$parsecomment();
619
+ if (s3 === peg$FAILED) {
620
+ s3 = null;
640
621
  }
622
+ peg$savedPos = s0;
623
+ s0 = peg$f3(s1, s2);
641
624
  } else {
642
625
  peg$currPos = s0;
643
626
  s0 = peg$FAILED;
@@ -651,15 +634,15 @@ function peg$parse(input, options) {
651
634
 
652
635
  s0 = peg$currPos;
653
636
  if (input.charCodeAt(peg$currPos) === 33) {
654
- s1 = peg$c12;
637
+ s1 = peg$c1;
655
638
  peg$currPos++;
656
639
  } else {
657
640
  s1 = peg$FAILED;
658
- if (peg$silentFails === 0) { peg$fail(peg$c13); }
641
+ if (peg$silentFails === 0) { peg$fail(peg$e1); }
659
642
  }
660
643
  if (s1 !== peg$FAILED) {
661
644
  peg$savedPos = s0;
662
- s1 = peg$c14();
645
+ s1 = peg$f4();
663
646
  }
664
647
  s0 = s1;
665
648
  if (s0 === peg$FAILED) {
@@ -688,11 +671,11 @@ function peg$parse(input, options) {
688
671
 
689
672
  s0 = peg$currPos;
690
673
  if (input.charCodeAt(peg$currPos) === 34) {
691
- s1 = peg$c15;
674
+ s1 = peg$c3;
692
675
  peg$currPos++;
693
676
  } else {
694
677
  s1 = peg$FAILED;
695
- if (peg$silentFails === 0) { peg$fail(peg$c16); }
678
+ if (peg$silentFails === 0) { peg$fail(peg$e3); }
696
679
  }
697
680
  if (s1 !== peg$FAILED) {
698
681
  s2 = [];
@@ -701,22 +684,16 @@ function peg$parse(input, options) {
701
684
  s2.push(s3);
702
685
  s3 = peg$parsedqchar();
703
686
  }
704
- if (s2 !== peg$FAILED) {
705
- if (input.charCodeAt(peg$currPos) === 34) {
706
- s3 = peg$c15;
707
- peg$currPos++;
708
- } else {
709
- s3 = peg$FAILED;
710
- if (peg$silentFails === 0) { peg$fail(peg$c16); }
711
- }
712
- if (s3 !== peg$FAILED) {
713
- peg$savedPos = s0;
714
- s1 = peg$c17(s2);
715
- s0 = s1;
716
- } else {
717
- peg$currPos = s0;
718
- s0 = peg$FAILED;
719
- }
687
+ if (input.charCodeAt(peg$currPos) === 34) {
688
+ s3 = peg$c3;
689
+ peg$currPos++;
690
+ } else {
691
+ s3 = peg$FAILED;
692
+ if (peg$silentFails === 0) { peg$fail(peg$e3); }
693
+ }
694
+ if (s3 !== peg$FAILED) {
695
+ peg$savedPos = s0;
696
+ s0 = peg$f5(s2);
720
697
  } else {
721
698
  peg$currPos = s0;
722
699
  s0 = peg$FAILED;
@@ -728,11 +705,11 @@ function peg$parse(input, options) {
728
705
  if (s0 === peg$FAILED) {
729
706
  s0 = peg$currPos;
730
707
  if (input.charCodeAt(peg$currPos) === 39) {
731
- s1 = peg$c18;
708
+ s1 = peg$c4;
732
709
  peg$currPos++;
733
710
  } else {
734
711
  s1 = peg$FAILED;
735
- if (peg$silentFails === 0) { peg$fail(peg$c19); }
712
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
736
713
  }
737
714
  if (s1 !== peg$FAILED) {
738
715
  s2 = [];
@@ -741,22 +718,16 @@ function peg$parse(input, options) {
741
718
  s2.push(s3);
742
719
  s3 = peg$parsesqchar();
743
720
  }
744
- if (s2 !== peg$FAILED) {
745
- if (input.charCodeAt(peg$currPos) === 39) {
746
- s3 = peg$c18;
747
- peg$currPos++;
748
- } else {
749
- s3 = peg$FAILED;
750
- if (peg$silentFails === 0) { peg$fail(peg$c19); }
751
- }
752
- if (s3 !== peg$FAILED) {
753
- peg$savedPos = s0;
754
- s1 = peg$c17(s2);
755
- s0 = s1;
756
- } else {
757
- peg$currPos = s0;
758
- s0 = peg$FAILED;
759
- }
721
+ if (input.charCodeAt(peg$currPos) === 39) {
722
+ s3 = peg$c4;
723
+ peg$currPos++;
724
+ } else {
725
+ s3 = peg$FAILED;
726
+ if (peg$silentFails === 0) { peg$fail(peg$e4); }
727
+ }
728
+ if (s3 !== peg$FAILED) {
729
+ peg$savedPos = s0;
730
+ s0 = peg$f6(s2);
760
731
  } else {
761
732
  peg$currPos = s0;
762
733
  s0 = peg$FAILED;
@@ -768,11 +739,11 @@ function peg$parse(input, options) {
768
739
  if (s0 === peg$FAILED) {
769
740
  s0 = peg$currPos;
770
741
  if (input.charCodeAt(peg$currPos) === 96) {
771
- s1 = peg$c20;
742
+ s1 = peg$c5;
772
743
  peg$currPos++;
773
744
  } else {
774
745
  s1 = peg$FAILED;
775
- if (peg$silentFails === 0) { peg$fail(peg$c21); }
746
+ if (peg$silentFails === 0) { peg$fail(peg$e5); }
776
747
  }
777
748
  if (s1 !== peg$FAILED) {
778
749
  s2 = [];
@@ -781,22 +752,16 @@ function peg$parse(input, options) {
781
752
  s2.push(s3);
782
753
  s3 = peg$parsebqchar();
783
754
  }
784
- if (s2 !== peg$FAILED) {
785
- if (input.charCodeAt(peg$currPos) === 96) {
786
- s3 = peg$c20;
787
- peg$currPos++;
788
- } else {
789
- s3 = peg$FAILED;
790
- if (peg$silentFails === 0) { peg$fail(peg$c21); }
791
- }
792
- if (s3 !== peg$FAILED) {
793
- peg$savedPos = s0;
794
- s1 = peg$c17(s2);
795
- s0 = s1;
796
- } else {
797
- peg$currPos = s0;
798
- s0 = peg$FAILED;
799
- }
755
+ if (input.charCodeAt(peg$currPos) === 96) {
756
+ s3 = peg$c5;
757
+ peg$currPos++;
758
+ } else {
759
+ s3 = peg$FAILED;
760
+ if (peg$silentFails === 0) { peg$fail(peg$e5); }
761
+ }
762
+ if (s3 !== peg$FAILED) {
763
+ peg$savedPos = s0;
764
+ s0 = peg$f7(s2);
800
765
  } else {
801
766
  peg$currPos = s0;
802
767
  s0 = peg$FAILED;
@@ -816,16 +781,16 @@ function peg$parse(input, options) {
816
781
 
817
782
  peg$silentFails++;
818
783
  s0 = peg$currPos;
819
- if (input.substr(peg$currPos, 2) === peg$c23) {
820
- s1 = peg$c23;
784
+ if (input.substr(peg$currPos, 2) === peg$c6) {
785
+ s1 = peg$c6;
821
786
  peg$currPos += 2;
822
787
  } else {
823
788
  s1 = peg$FAILED;
824
- if (peg$silentFails === 0) { peg$fail(peg$c24); }
789
+ if (peg$silentFails === 0) { peg$fail(peg$e7); }
825
790
  }
826
791
  if (s1 !== peg$FAILED) {
827
792
  peg$savedPos = s0;
828
- s1 = peg$c25();
793
+ s1 = peg$f8();
829
794
  }
830
795
  s0 = s1;
831
796
  if (s0 === peg$FAILED) {
@@ -833,22 +798,22 @@ function peg$parse(input, options) {
833
798
  if (s0 === peg$FAILED) {
834
799
  s0 = peg$currPos;
835
800
  s1 = [];
836
- if (peg$c26.test(input.charAt(peg$currPos))) {
801
+ if (peg$r0.test(input.charAt(peg$currPos))) {
837
802
  s2 = input.charAt(peg$currPos);
838
803
  peg$currPos++;
839
804
  } else {
840
805
  s2 = peg$FAILED;
841
- if (peg$silentFails === 0) { peg$fail(peg$c27); }
806
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
842
807
  }
843
808
  if (s2 !== peg$FAILED) {
844
809
  while (s2 !== peg$FAILED) {
845
810
  s1.push(s2);
846
- if (peg$c26.test(input.charAt(peg$currPos))) {
811
+ if (peg$r0.test(input.charAt(peg$currPos))) {
847
812
  s2 = input.charAt(peg$currPos);
848
813
  peg$currPos++;
849
814
  } else {
850
815
  s2 = peg$FAILED;
851
- if (peg$silentFails === 0) { peg$fail(peg$c27); }
816
+ if (peg$silentFails === 0) { peg$fail(peg$e8); }
852
817
  }
853
818
  }
854
819
  } else {
@@ -864,7 +829,7 @@ function peg$parse(input, options) {
864
829
  peg$silentFails--;
865
830
  if (s0 === peg$FAILED) {
866
831
  s1 = peg$FAILED;
867
- if (peg$silentFails === 0) { peg$fail(peg$c22); }
832
+ if (peg$silentFails === 0) { peg$fail(peg$e6); }
868
833
  }
869
834
 
870
835
  return s0;
@@ -875,16 +840,16 @@ function peg$parse(input, options) {
875
840
 
876
841
  peg$silentFails++;
877
842
  s0 = peg$currPos;
878
- if (input.substr(peg$currPos, 2) === peg$c29) {
879
- s1 = peg$c29;
843
+ if (input.substr(peg$currPos, 2) === peg$c7) {
844
+ s1 = peg$c7;
880
845
  peg$currPos += 2;
881
846
  } else {
882
847
  s1 = peg$FAILED;
883
- if (peg$silentFails === 0) { peg$fail(peg$c30); }
848
+ if (peg$silentFails === 0) { peg$fail(peg$e10); }
884
849
  }
885
850
  if (s1 !== peg$FAILED) {
886
851
  peg$savedPos = s0;
887
- s1 = peg$c31();
852
+ s1 = peg$f9();
888
853
  }
889
854
  s0 = s1;
890
855
  if (s0 === peg$FAILED) {
@@ -892,22 +857,22 @@ function peg$parse(input, options) {
892
857
  if (s0 === peg$FAILED) {
893
858
  s0 = peg$currPos;
894
859
  s1 = [];
895
- if (peg$c32.test(input.charAt(peg$currPos))) {
860
+ if (peg$r1.test(input.charAt(peg$currPos))) {
896
861
  s2 = input.charAt(peg$currPos);
897
862
  peg$currPos++;
898
863
  } else {
899
864
  s2 = peg$FAILED;
900
- if (peg$silentFails === 0) { peg$fail(peg$c33); }
865
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
901
866
  }
902
867
  if (s2 !== peg$FAILED) {
903
868
  while (s2 !== peg$FAILED) {
904
869
  s1.push(s2);
905
- if (peg$c32.test(input.charAt(peg$currPos))) {
870
+ if (peg$r1.test(input.charAt(peg$currPos))) {
906
871
  s2 = input.charAt(peg$currPos);
907
872
  peg$currPos++;
908
873
  } else {
909
874
  s2 = peg$FAILED;
910
- if (peg$silentFails === 0) { peg$fail(peg$c33); }
875
+ if (peg$silentFails === 0) { peg$fail(peg$e11); }
911
876
  }
912
877
  }
913
878
  } else {
@@ -923,7 +888,7 @@ function peg$parse(input, options) {
923
888
  peg$silentFails--;
924
889
  if (s0 === peg$FAILED) {
925
890
  s1 = peg$FAILED;
926
- if (peg$silentFails === 0) { peg$fail(peg$c28); }
891
+ if (peg$silentFails === 0) { peg$fail(peg$e9); }
927
892
  }
928
893
 
929
894
  return s0;
@@ -934,16 +899,16 @@ function peg$parse(input, options) {
934
899
 
935
900
  peg$silentFails++;
936
901
  s0 = peg$currPos;
937
- if (input.substr(peg$currPos, 2) === peg$c35) {
938
- s1 = peg$c35;
902
+ if (input.substr(peg$currPos, 2) === peg$c8) {
903
+ s1 = peg$c8;
939
904
  peg$currPos += 2;
940
905
  } else {
941
906
  s1 = peg$FAILED;
942
- if (peg$silentFails === 0) { peg$fail(peg$c36); }
907
+ if (peg$silentFails === 0) { peg$fail(peg$e13); }
943
908
  }
944
909
  if (s1 !== peg$FAILED) {
945
910
  peg$savedPos = s0;
946
- s1 = peg$c37();
911
+ s1 = peg$f10();
947
912
  }
948
913
  s0 = s1;
949
914
  if (s0 === peg$FAILED) {
@@ -951,22 +916,22 @@ function peg$parse(input, options) {
951
916
  if (s0 === peg$FAILED) {
952
917
  s0 = peg$currPos;
953
918
  s1 = [];
954
- if (peg$c38.test(input.charAt(peg$currPos))) {
919
+ if (peg$r2.test(input.charAt(peg$currPos))) {
955
920
  s2 = input.charAt(peg$currPos);
956
921
  peg$currPos++;
957
922
  } else {
958
923
  s2 = peg$FAILED;
959
- if (peg$silentFails === 0) { peg$fail(peg$c39); }
924
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
960
925
  }
961
926
  if (s2 !== peg$FAILED) {
962
927
  while (s2 !== peg$FAILED) {
963
928
  s1.push(s2);
964
- if (peg$c38.test(input.charAt(peg$currPos))) {
929
+ if (peg$r2.test(input.charAt(peg$currPos))) {
965
930
  s2 = input.charAt(peg$currPos);
966
931
  peg$currPos++;
967
932
  } else {
968
933
  s2 = peg$FAILED;
969
- if (peg$silentFails === 0) { peg$fail(peg$c39); }
934
+ if (peg$silentFails === 0) { peg$fail(peg$e14); }
970
935
  }
971
936
  }
972
937
  } else {
@@ -982,7 +947,7 @@ function peg$parse(input, options) {
982
947
  peg$silentFails--;
983
948
  if (s0 === peg$FAILED) {
984
949
  s1 = peg$FAILED;
985
- if (peg$silentFails === 0) { peg$fail(peg$c34); }
950
+ if (peg$silentFails === 0) { peg$fail(peg$e12); }
986
951
  }
987
952
 
988
953
  return s0;
@@ -992,32 +957,32 @@ function peg$parse(input, options) {
992
957
  var s0, s1, s2, s3, s4;
993
958
 
994
959
  s0 = peg$currPos;
995
- if (input.substr(peg$currPos, 2) === peg$c40) {
996
- s1 = peg$c40;
960
+ if (input.substr(peg$currPos, 2) === peg$c9) {
961
+ s1 = peg$c9;
997
962
  peg$currPos += 2;
998
963
  } else {
999
964
  s1 = peg$FAILED;
1000
- if (peg$silentFails === 0) { peg$fail(peg$c41); }
965
+ if (peg$silentFails === 0) { peg$fail(peg$e15); }
1001
966
  }
1002
967
  if (s1 !== peg$FAILED) {
1003
968
  s2 = peg$currPos;
1004
969
  s3 = [];
1005
- if (peg$c42.test(input.charAt(peg$currPos))) {
970
+ if (peg$r3.test(input.charAt(peg$currPos))) {
1006
971
  s4 = input.charAt(peg$currPos);
1007
972
  peg$currPos++;
1008
973
  } else {
1009
974
  s4 = peg$FAILED;
1010
- if (peg$silentFails === 0) { peg$fail(peg$c43); }
975
+ if (peg$silentFails === 0) { peg$fail(peg$e16); }
1011
976
  }
1012
977
  if (s4 !== peg$FAILED) {
1013
978
  while (s4 !== peg$FAILED) {
1014
979
  s3.push(s4);
1015
- if (peg$c42.test(input.charAt(peg$currPos))) {
980
+ if (peg$r3.test(input.charAt(peg$currPos))) {
1016
981
  s4 = input.charAt(peg$currPos);
1017
982
  peg$currPos++;
1018
983
  } else {
1019
984
  s4 = peg$FAILED;
1020
- if (peg$silentFails === 0) { peg$fail(peg$c43); }
985
+ if (peg$silentFails === 0) { peg$fail(peg$e16); }
1021
986
  }
1022
987
  }
1023
988
  } else {
@@ -1030,8 +995,7 @@ function peg$parse(input, options) {
1030
995
  }
1031
996
  if (s2 !== peg$FAILED) {
1032
997
  peg$savedPos = s0;
1033
- s1 = peg$c44(s2);
1034
- s0 = s1;
998
+ s0 = peg$f11(s2);
1035
999
  } else {
1036
1000
  peg$currPos = s0;
1037
1001
  s0 = peg$FAILED;
@@ -1060,7 +1024,7 @@ function peg$parse(input, options) {
1060
1024
  }
1061
1025
  if (s1 !== peg$FAILED) {
1062
1026
  peg$savedPos = s0;
1063
- s1 = peg$c45(s1);
1027
+ s1 = peg$f12(s1);
1064
1028
  }
1065
1029
  s0 = s1;
1066
1030
 
@@ -1084,22 +1048,22 @@ function peg$parse(input, options) {
1084
1048
  if (s0 === peg$FAILED) {
1085
1049
  s0 = peg$currPos;
1086
1050
  s1 = [];
1087
- if (peg$c47.test(input.charAt(peg$currPos))) {
1051
+ if (peg$r4.test(input.charAt(peg$currPos))) {
1088
1052
  s2 = input.charAt(peg$currPos);
1089
1053
  peg$currPos++;
1090
1054
  } else {
1091
1055
  s2 = peg$FAILED;
1092
- if (peg$silentFails === 0) { peg$fail(peg$c48); }
1056
+ if (peg$silentFails === 0) { peg$fail(peg$e18); }
1093
1057
  }
1094
1058
  if (s2 !== peg$FAILED) {
1095
1059
  while (s2 !== peg$FAILED) {
1096
1060
  s1.push(s2);
1097
- if (peg$c47.test(input.charAt(peg$currPos))) {
1061
+ if (peg$r4.test(input.charAt(peg$currPos))) {
1098
1062
  s2 = input.charAt(peg$currPos);
1099
1063
  peg$currPos++;
1100
1064
  } else {
1101
1065
  s2 = peg$FAILED;
1102
- if (peg$silentFails === 0) { peg$fail(peg$c48); }
1066
+ if (peg$silentFails === 0) { peg$fail(peg$e18); }
1103
1067
  }
1104
1068
  }
1105
1069
  } else {
@@ -1114,7 +1078,7 @@ function peg$parse(input, options) {
1114
1078
  peg$silentFails--;
1115
1079
  if (s0 === peg$FAILED) {
1116
1080
  s1 = peg$FAILED;
1117
- if (peg$silentFails === 0) { peg$fail(peg$c46); }
1081
+ if (peg$silentFails === 0) { peg$fail(peg$e17); }
1118
1082
  }
1119
1083
 
1120
1084
  return s0;
@@ -1125,100 +1089,100 @@ function peg$parse(input, options) {
1125
1089
 
1126
1090
  peg$silentFails++;
1127
1091
  s0 = peg$currPos;
1128
- if (input.substr(peg$currPos, 2) === peg$c50) {
1129
- s1 = peg$c50;
1092
+ if (input.substr(peg$currPos, 2) === peg$c10) {
1093
+ s1 = peg$c10;
1130
1094
  peg$currPos += 2;
1131
1095
  } else {
1132
1096
  s1 = peg$FAILED;
1133
- if (peg$silentFails === 0) { peg$fail(peg$c51); }
1097
+ if (peg$silentFails === 0) { peg$fail(peg$e20); }
1134
1098
  }
1135
1099
  if (s1 !== peg$FAILED) {
1136
1100
  peg$savedPos = s0;
1137
- s1 = peg$c52();
1101
+ s1 = peg$f13();
1138
1102
  }
1139
1103
  s0 = s1;
1140
1104
  if (s0 === peg$FAILED) {
1141
1105
  s0 = peg$currPos;
1142
- if (input.substr(peg$currPos, 2) === peg$c53) {
1143
- s1 = peg$c53;
1106
+ if (input.substr(peg$currPos, 2) === peg$c11) {
1107
+ s1 = peg$c11;
1144
1108
  peg$currPos += 2;
1145
1109
  } else {
1146
1110
  s1 = peg$FAILED;
1147
- if (peg$silentFails === 0) { peg$fail(peg$c54); }
1111
+ if (peg$silentFails === 0) { peg$fail(peg$e21); }
1148
1112
  }
1149
1113
  if (s1 !== peg$FAILED) {
1150
1114
  peg$savedPos = s0;
1151
- s1 = peg$c55();
1115
+ s1 = peg$f14();
1152
1116
  }
1153
1117
  s0 = s1;
1154
1118
  if (s0 === peg$FAILED) {
1155
1119
  s0 = peg$currPos;
1156
- if (input.substr(peg$currPos, 2) === peg$c56) {
1157
- s1 = peg$c56;
1120
+ if (input.substr(peg$currPos, 2) === peg$c12) {
1121
+ s1 = peg$c12;
1158
1122
  peg$currPos += 2;
1159
1123
  } else {
1160
1124
  s1 = peg$FAILED;
1161
- if (peg$silentFails === 0) { peg$fail(peg$c57); }
1125
+ if (peg$silentFails === 0) { peg$fail(peg$e22); }
1162
1126
  }
1163
1127
  if (s1 !== peg$FAILED) {
1164
1128
  peg$savedPos = s0;
1165
- s1 = peg$c58();
1129
+ s1 = peg$f15();
1166
1130
  }
1167
1131
  s0 = s1;
1168
1132
  if (s0 === peg$FAILED) {
1169
1133
  s0 = peg$currPos;
1170
- if (input.substr(peg$currPos, 2) === peg$c59) {
1171
- s1 = peg$c59;
1134
+ if (input.substr(peg$currPos, 2) === peg$c13) {
1135
+ s1 = peg$c13;
1172
1136
  peg$currPos += 2;
1173
1137
  } else {
1174
1138
  s1 = peg$FAILED;
1175
- if (peg$silentFails === 0) { peg$fail(peg$c60); }
1139
+ if (peg$silentFails === 0) { peg$fail(peg$e23); }
1176
1140
  }
1177
1141
  if (s1 !== peg$FAILED) {
1178
1142
  peg$savedPos = s0;
1179
- s1 = peg$c61();
1143
+ s1 = peg$f16();
1180
1144
  }
1181
1145
  s0 = s1;
1182
1146
  if (s0 === peg$FAILED) {
1183
1147
  s0 = peg$currPos;
1184
- if (input.substr(peg$currPos, 2) === peg$c62) {
1185
- s1 = peg$c62;
1148
+ if (input.substr(peg$currPos, 2) === peg$c14) {
1149
+ s1 = peg$c14;
1186
1150
  peg$currPos += 2;
1187
1151
  } else {
1188
1152
  s1 = peg$FAILED;
1189
- if (peg$silentFails === 0) { peg$fail(peg$c63); }
1153
+ if (peg$silentFails === 0) { peg$fail(peg$e24); }
1190
1154
  }
1191
1155
  if (s1 !== peg$FAILED) {
1192
1156
  peg$savedPos = s0;
1193
- s1 = peg$c64();
1157
+ s1 = peg$f17();
1194
1158
  }
1195
1159
  s0 = s1;
1196
1160
  if (s0 === peg$FAILED) {
1197
1161
  s0 = peg$currPos;
1198
- if (input.substr(peg$currPos, 2) === peg$c65) {
1199
- s1 = peg$c65;
1162
+ if (input.substr(peg$currPos, 2) === peg$c15) {
1163
+ s1 = peg$c15;
1200
1164
  peg$currPos += 2;
1201
1165
  } else {
1202
1166
  s1 = peg$FAILED;
1203
- if (peg$silentFails === 0) { peg$fail(peg$c66); }
1167
+ if (peg$silentFails === 0) { peg$fail(peg$e25); }
1204
1168
  }
1205
1169
  if (s1 !== peg$FAILED) {
1206
1170
  peg$savedPos = s0;
1207
- s1 = peg$c67();
1171
+ s1 = peg$f18();
1208
1172
  }
1209
1173
  s0 = s1;
1210
1174
  if (s0 === peg$FAILED) {
1211
1175
  s0 = peg$currPos;
1212
- if (input.substr(peg$currPos, 2) === peg$c68) {
1213
- s1 = peg$c68;
1176
+ if (input.substr(peg$currPos, 2) === peg$c16) {
1177
+ s1 = peg$c16;
1214
1178
  peg$currPos += 2;
1215
1179
  } else {
1216
1180
  s1 = peg$FAILED;
1217
- if (peg$silentFails === 0) { peg$fail(peg$c69); }
1181
+ if (peg$silentFails === 0) { peg$fail(peg$e26); }
1218
1182
  }
1219
1183
  if (s1 !== peg$FAILED) {
1220
1184
  peg$savedPos = s0;
1221
- s1 = peg$c70();
1185
+ s1 = peg$f19();
1222
1186
  }
1223
1187
  s0 = s1;
1224
1188
  }
@@ -1230,7 +1194,7 @@ function peg$parse(input, options) {
1230
1194
  peg$silentFails--;
1231
1195
  if (s0 === peg$FAILED) {
1232
1196
  s1 = peg$FAILED;
1233
- if (peg$silentFails === 0) { peg$fail(peg$c49); }
1197
+ if (peg$silentFails === 0) { peg$fail(peg$e19); }
1234
1198
  }
1235
1199
 
1236
1200
  return s0;
@@ -1241,45 +1205,34 @@ function peg$parse(input, options) {
1241
1205
 
1242
1206
  s0 = peg$currPos;
1243
1207
  s1 = peg$parseWS();
1244
- if (s1 !== peg$FAILED) {
1245
- if (input.charCodeAt(peg$currPos) === 35) {
1246
- s2 = peg$c71;
1208
+ if (input.charCodeAt(peg$currPos) === 35) {
1209
+ s2 = peg$c17;
1210
+ peg$currPos++;
1211
+ } else {
1212
+ s2 = peg$FAILED;
1213
+ if (peg$silentFails === 0) { peg$fail(peg$e27); }
1214
+ }
1215
+ if (s2 !== peg$FAILED) {
1216
+ s3 = [];
1217
+ if (peg$r5.test(input.charAt(peg$currPos))) {
1218
+ s4 = input.charAt(peg$currPos);
1247
1219
  peg$currPos++;
1248
1220
  } else {
1249
- s2 = peg$FAILED;
1250
- if (peg$silentFails === 0) { peg$fail(peg$c72); }
1221
+ s4 = peg$FAILED;
1222
+ if (peg$silentFails === 0) { peg$fail(peg$e28); }
1251
1223
  }
1252
- if (s2 !== peg$FAILED) {
1253
- s3 = [];
1254
- if (peg$c73.test(input.charAt(peg$currPos))) {
1224
+ while (s4 !== peg$FAILED) {
1225
+ s3.push(s4);
1226
+ if (peg$r5.test(input.charAt(peg$currPos))) {
1255
1227
  s4 = input.charAt(peg$currPos);
1256
1228
  peg$currPos++;
1257
1229
  } else {
1258
1230
  s4 = peg$FAILED;
1259
- if (peg$silentFails === 0) { peg$fail(peg$c74); }
1231
+ if (peg$silentFails === 0) { peg$fail(peg$e28); }
1260
1232
  }
1261
- while (s4 !== peg$FAILED) {
1262
- s3.push(s4);
1263
- if (peg$c73.test(input.charAt(peg$currPos))) {
1264
- s4 = input.charAt(peg$currPos);
1265
- peg$currPos++;
1266
- } else {
1267
- s4 = peg$FAILED;
1268
- if (peg$silentFails === 0) { peg$fail(peg$c74); }
1269
- }
1270
- }
1271
- if (s3 !== peg$FAILED) {
1272
- peg$savedPos = s0;
1273
- s1 = peg$c75();
1274
- s0 = s1;
1275
- } else {
1276
- peg$currPos = s0;
1277
- s0 = peg$FAILED;
1278
- }
1279
- } else {
1280
- peg$currPos = s0;
1281
- s0 = peg$FAILED;
1282
1233
  }
1234
+ peg$savedPos = s0;
1235
+ s0 = peg$f20();
1283
1236
  } else {
1284
1237
  peg$currPos = s0;
1285
1238
  s0 = peg$FAILED;
@@ -1294,33 +1247,29 @@ function peg$parse(input, options) {
1294
1247
  peg$silentFails++;
1295
1248
  s0 = peg$currPos;
1296
1249
  s1 = [];
1297
- if (peg$c77.test(input.charAt(peg$currPos))) {
1250
+ if (peg$r6.test(input.charAt(peg$currPos))) {
1298
1251
  s2 = input.charAt(peg$currPos);
1299
1252
  peg$currPos++;
1300
1253
  } else {
1301
1254
  s2 = peg$FAILED;
1302
- if (peg$silentFails === 0) { peg$fail(peg$c78); }
1255
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
1303
1256
  }
1304
1257
  while (s2 !== peg$FAILED) {
1305
1258
  s1.push(s2);
1306
- if (peg$c77.test(input.charAt(peg$currPos))) {
1259
+ if (peg$r6.test(input.charAt(peg$currPos))) {
1307
1260
  s2 = input.charAt(peg$currPos);
1308
1261
  peg$currPos++;
1309
1262
  } else {
1310
1263
  s2 = peg$FAILED;
1311
- if (peg$silentFails === 0) { peg$fail(peg$c78); }
1264
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
1312
1265
  }
1313
1266
  }
1314
- if (s1 !== peg$FAILED) {
1315
- peg$savedPos = s0;
1316
- s1 = peg$c75();
1317
- }
1267
+ peg$savedPos = s0;
1268
+ s1 = peg$f21();
1318
1269
  s0 = s1;
1319
1270
  peg$silentFails--;
1320
- if (s0 === peg$FAILED) {
1321
- s1 = peg$FAILED;
1322
- if (peg$silentFails === 0) { peg$fail(peg$c76); }
1323
- }
1271
+ s1 = peg$FAILED;
1272
+ if (peg$silentFails === 0) { peg$fail(peg$e29); }
1324
1273
 
1325
1274
  return s0;
1326
1275
  }
@@ -1331,33 +1280,29 @@ function peg$parse(input, options) {
1331
1280
  peg$silentFails++;
1332
1281
  s0 = peg$currPos;
1333
1282
  s1 = [];
1334
- if (peg$c80.test(input.charAt(peg$currPos))) {
1283
+ if (peg$r7.test(input.charAt(peg$currPos))) {
1335
1284
  s2 = input.charAt(peg$currPos);
1336
1285
  peg$currPos++;
1337
1286
  } else {
1338
1287
  s2 = peg$FAILED;
1339
- if (peg$silentFails === 0) { peg$fail(peg$c81); }
1288
+ if (peg$silentFails === 0) { peg$fail(peg$e32); }
1340
1289
  }
1341
1290
  while (s2 !== peg$FAILED) {
1342
1291
  s1.push(s2);
1343
- if (peg$c80.test(input.charAt(peg$currPos))) {
1292
+ if (peg$r7.test(input.charAt(peg$currPos))) {
1344
1293
  s2 = input.charAt(peg$currPos);
1345
1294
  peg$currPos++;
1346
1295
  } else {
1347
1296
  s2 = peg$FAILED;
1348
- if (peg$silentFails === 0) { peg$fail(peg$c81); }
1297
+ if (peg$silentFails === 0) { peg$fail(peg$e32); }
1349
1298
  }
1350
1299
  }
1351
- if (s1 !== peg$FAILED) {
1352
- peg$savedPos = s0;
1353
- s1 = peg$c82();
1354
- }
1300
+ peg$savedPos = s0;
1301
+ s1 = peg$f22();
1355
1302
  s0 = s1;
1356
1303
  peg$silentFails--;
1357
- if (s0 === peg$FAILED) {
1358
- s1 = peg$FAILED;
1359
- if (peg$silentFails === 0) { peg$fail(peg$c79); }
1360
- }
1304
+ s1 = peg$FAILED;
1305
+ if (peg$silentFails === 0) { peg$fail(peg$e31); }
1361
1306
 
1362
1307
  return s0;
1363
1308
  }
@@ -1368,22 +1313,22 @@ function peg$parse(input, options) {
1368
1313
  peg$silentFails++;
1369
1314
  s0 = peg$currPos;
1370
1315
  s1 = [];
1371
- if (peg$c77.test(input.charAt(peg$currPos))) {
1316
+ if (peg$r6.test(input.charAt(peg$currPos))) {
1372
1317
  s2 = input.charAt(peg$currPos);
1373
1318
  peg$currPos++;
1374
1319
  } else {
1375
1320
  s2 = peg$FAILED;
1376
- if (peg$silentFails === 0) { peg$fail(peg$c78); }
1321
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
1377
1322
  }
1378
1323
  if (s2 !== peg$FAILED) {
1379
1324
  while (s2 !== peg$FAILED) {
1380
1325
  s1.push(s2);
1381
- if (peg$c77.test(input.charAt(peg$currPos))) {
1326
+ if (peg$r6.test(input.charAt(peg$currPos))) {
1382
1327
  s2 = input.charAt(peg$currPos);
1383
1328
  peg$currPos++;
1384
1329
  } else {
1385
1330
  s2 = peg$FAILED;
1386
- if (peg$silentFails === 0) { peg$fail(peg$c78); }
1331
+ if (peg$silentFails === 0) { peg$fail(peg$e30); }
1387
1332
  }
1388
1333
  }
1389
1334
  } else {
@@ -1391,13 +1336,13 @@ function peg$parse(input, options) {
1391
1336
  }
1392
1337
  if (s1 !== peg$FAILED) {
1393
1338
  peg$savedPos = s0;
1394
- s1 = peg$c75();
1339
+ s1 = peg$f23();
1395
1340
  }
1396
1341
  s0 = s1;
1397
1342
  peg$silentFails--;
1398
1343
  if (s0 === peg$FAILED) {
1399
1344
  s1 = peg$FAILED;
1400
- if (peg$silentFails === 0) { peg$fail(peg$c83); }
1345
+ if (peg$silentFails === 0) { peg$fail(peg$e33); }
1401
1346
  }
1402
1347
 
1403
1348
  return s0;
@@ -1408,47 +1353,39 @@ function peg$parse(input, options) {
1408
1353
 
1409
1354
  peg$silentFails++;
1410
1355
  if (input.charCodeAt(peg$currPos) === 10) {
1411
- s0 = peg$c85;
1356
+ s0 = peg$c18;
1412
1357
  peg$currPos++;
1413
1358
  } else {
1414
1359
  s0 = peg$FAILED;
1415
- if (peg$silentFails === 0) { peg$fail(peg$c86); }
1360
+ if (peg$silentFails === 0) { peg$fail(peg$e35); }
1416
1361
  }
1417
1362
  if (s0 === peg$FAILED) {
1418
- if (input.substr(peg$currPos, 2) === peg$c87) {
1419
- s0 = peg$c87;
1363
+ if (input.substr(peg$currPos, 2) === peg$c19) {
1364
+ s0 = peg$c19;
1420
1365
  peg$currPos += 2;
1421
1366
  } else {
1422
1367
  s0 = peg$FAILED;
1423
- if (peg$silentFails === 0) { peg$fail(peg$c88); }
1368
+ if (peg$silentFails === 0) { peg$fail(peg$e36); }
1424
1369
  }
1425
1370
  if (s0 === peg$FAILED) {
1426
1371
  if (input.charCodeAt(peg$currPos) === 13) {
1427
- s0 = peg$c89;
1372
+ s0 = peg$c20;
1428
1373
  peg$currPos++;
1429
1374
  } else {
1430
1375
  s0 = peg$FAILED;
1431
- if (peg$silentFails === 0) { peg$fail(peg$c90); }
1376
+ if (peg$silentFails === 0) { peg$fail(peg$e37); }
1432
1377
  }
1433
1378
  }
1434
1379
  }
1435
1380
  peg$silentFails--;
1436
1381
  if (s0 === peg$FAILED) {
1437
1382
  s1 = peg$FAILED;
1438
- if (peg$silentFails === 0) { peg$fail(peg$c84); }
1383
+ if (peg$silentFails === 0) { peg$fail(peg$e34); }
1439
1384
  }
1440
1385
 
1441
1386
  return s0;
1442
1387
  }
1443
1388
 
1444
-
1445
- const { mapObj } = require('./utils')
1446
- function list (head, tail) {
1447
- tail.unshift(head)
1448
- return tail
1449
- }
1450
-
1451
-
1452
1389
  peg$result = peg$startRuleFunction();
1453
1390
 
1454
1391
  if (peg$result !== peg$FAILED && peg$currPos === input.length) {
@@ -1468,7 +1405,8 @@ function peg$parse(input, options) {
1468
1405
  }
1469
1406
  }
1470
1407
 
1471
- module.exports = {
1472
- SyntaxError: peg$SyntaxError,
1473
- parse: peg$parse
1408
+ export {
1409
+ peg$SyntaxError as SyntaxError,
1410
+
1411
+ peg$parse as parse
1474
1412
  };