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