@gmod/bed 2.0.4 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -1
- package/README.md +6 -6
- package/dist/as/autoSqlSchemas.d.ts +10 -0
- package/dist/as/autoSqlSchemas.js +14 -0
- package/dist/as/autoSqlSchemas.js.map +1 -0
- package/dist/autoSql.d.ts +14 -0
- package/dist/autoSql.js +1515 -0
- package/dist/autoSql.js.map +1 -0
- package/dist/defaultTypes.d.ts +4 -0
- package/dist/defaultTypes.js +28 -0
- package/dist/defaultTypes.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/parser.d.ts +13 -0
- package/dist/parser.js +104 -0
- package/dist/parser.js.map +1 -0
- package/dist/util.d.ts +1 -0
- package/dist/util.js +42 -0
- package/dist/util.js.map +1 -0
- package/esm/as/autoSqlSchemas.d.ts +10 -0
- package/esm/as/autoSqlSchemas.js +170 -0
- package/esm/as/autoSqlSchemas.js.map +1 -0
- package/esm/autoSql.d.ts +14 -0
- package/esm/autoSql.js +1515 -0
- package/esm/autoSql.js.map +1 -0
- package/esm/defaultTypes.d.ts +4 -0
- package/esm/defaultTypes.js +6 -0
- package/esm/defaultTypes.js.map +1 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.js +3 -0
- package/esm/index.js.map +1 -0
- package/esm/parser.d.ts +13 -0
- package/esm/parser.js +95 -0
- package/esm/parser.js.map +1 -0
- package/esm/util.d.ts +1 -0
- package/esm/util.js +27 -0
- package/esm/util.js.map +1 -0
- package/package.json +24 -38
- package/dist/main.js +0 -2102
package/dist/main.js
DELETED
|
@@ -1,2102 +0,0 @@
|
|
|
1
|
-
module.exports =
|
|
2
|
-
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
-
/******/ // The module cache
|
|
4
|
-
/******/ var installedModules = {};
|
|
5
|
-
/******/
|
|
6
|
-
/******/ // The require function
|
|
7
|
-
/******/ function __webpack_require__(moduleId) {
|
|
8
|
-
/******/
|
|
9
|
-
/******/ // Check if module is in cache
|
|
10
|
-
/******/ if(installedModules[moduleId]) {
|
|
11
|
-
/******/ return installedModules[moduleId].exports;
|
|
12
|
-
/******/ }
|
|
13
|
-
/******/ // Create a new module (and put it into the cache)
|
|
14
|
-
/******/ var module = installedModules[moduleId] = {
|
|
15
|
-
/******/ i: moduleId,
|
|
16
|
-
/******/ l: false,
|
|
17
|
-
/******/ exports: {}
|
|
18
|
-
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/ // Execute the module function
|
|
21
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
-
/******/
|
|
23
|
-
/******/ // Flag the module as loaded
|
|
24
|
-
/******/ module.l = true;
|
|
25
|
-
/******/
|
|
26
|
-
/******/ // Return the exports of the module
|
|
27
|
-
/******/ return module.exports;
|
|
28
|
-
/******/ }
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
-
/******/ __webpack_require__.m = modules;
|
|
33
|
-
/******/
|
|
34
|
-
/******/ // expose the module cache
|
|
35
|
-
/******/ __webpack_require__.c = installedModules;
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // define getter function for harmony exports
|
|
38
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
-
/******/ }
|
|
42
|
-
/******/ };
|
|
43
|
-
/******/
|
|
44
|
-
/******/ // define __esModule on exports
|
|
45
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
-
/******/ }
|
|
49
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
-
/******/ };
|
|
51
|
-
/******/
|
|
52
|
-
/******/ // create a fake namespace object
|
|
53
|
-
/******/ // mode & 1: value is a module id, require it
|
|
54
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
-
/******/ // mode & 4: return value when already ns object
|
|
56
|
-
/******/ // mode & 8|1: behave like require
|
|
57
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
-
/******/ if(mode & 8) return value;
|
|
60
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
-
/******/ var ns = Object.create(null);
|
|
62
|
-
/******/ __webpack_require__.r(ns);
|
|
63
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
-
/******/ return ns;
|
|
66
|
-
/******/ };
|
|
67
|
-
/******/
|
|
68
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
-
/******/ __webpack_require__.n = function(module) {
|
|
70
|
-
/******/ var getter = module && module.__esModule ?
|
|
71
|
-
/******/ function getDefault() { return module['default']; } :
|
|
72
|
-
/******/ function getModuleExports() { return module; };
|
|
73
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
-
/******/ return getter;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // __webpack_public_path__
|
|
81
|
-
/******/ __webpack_require__.p = "";
|
|
82
|
-
/******/
|
|
83
|
-
/******/
|
|
84
|
-
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s = 4);
|
|
86
|
-
/******/ })
|
|
87
|
-
/************************************************************************/
|
|
88
|
-
/******/ ([
|
|
89
|
-
/* 0 */
|
|
90
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
91
|
-
|
|
92
|
-
"use strict";
|
|
93
|
-
/*
|
|
94
|
-
* Generated by PEG.js 0.10.0.
|
|
95
|
-
*
|
|
96
|
-
* http://pegjs.org/
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
function peg$subclass(child, parent) {
|
|
101
|
-
function ctor() {
|
|
102
|
-
this.constructor = child;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
ctor.prototype = parent.prototype;
|
|
106
|
-
child.prototype = new ctor();
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function peg$SyntaxError(message, expected, found, location) {
|
|
110
|
-
this.message = message;
|
|
111
|
-
this.expected = expected;
|
|
112
|
-
this.found = found;
|
|
113
|
-
this.location = location;
|
|
114
|
-
this.name = "SyntaxError";
|
|
115
|
-
|
|
116
|
-
if (typeof Error.captureStackTrace === "function") {
|
|
117
|
-
Error.captureStackTrace(this, peg$SyntaxError);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
peg$subclass(peg$SyntaxError, Error);
|
|
122
|
-
|
|
123
|
-
peg$SyntaxError.buildMessage = function (expected, found) {
|
|
124
|
-
var DESCRIBE_EXPECTATION_FNS = {
|
|
125
|
-
literal: function literal(expectation) {
|
|
126
|
-
return "\"" + literalEscape(expectation.text) + "\"";
|
|
127
|
-
},
|
|
128
|
-
"class": function _class(expectation) {
|
|
129
|
-
var escapedParts = "",
|
|
130
|
-
i;
|
|
131
|
-
|
|
132
|
-
for (i = 0; i < expectation.parts.length; i++) {
|
|
133
|
-
escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
|
|
137
|
-
},
|
|
138
|
-
any: function any(expectation) {
|
|
139
|
-
return "any character";
|
|
140
|
-
},
|
|
141
|
-
end: function end(expectation) {
|
|
142
|
-
return "end of input";
|
|
143
|
-
},
|
|
144
|
-
other: function other(expectation) {
|
|
145
|
-
return expectation.description;
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
function hex(ch) {
|
|
150
|
-
return ch.charCodeAt(0).toString(16).toUpperCase();
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function literalEscape(s) {
|
|
154
|
-
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) {
|
|
155
|
-
return '\\x0' + hex(ch);
|
|
156
|
-
}).replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) {
|
|
157
|
-
return '\\x' + hex(ch);
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
function classEscape(s) {
|
|
162
|
-
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) {
|
|
163
|
-
return '\\x0' + hex(ch);
|
|
164
|
-
}).replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) {
|
|
165
|
-
return '\\x' + hex(ch);
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function describeExpectation(expectation) {
|
|
170
|
-
return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
function describeExpected(expected) {
|
|
174
|
-
var descriptions = new Array(expected.length),
|
|
175
|
-
i,
|
|
176
|
-
j;
|
|
177
|
-
|
|
178
|
-
for (i = 0; i < expected.length; i++) {
|
|
179
|
-
descriptions[i] = describeExpectation(expected[i]);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
descriptions.sort();
|
|
183
|
-
|
|
184
|
-
if (descriptions.length > 0) {
|
|
185
|
-
for (i = 1, j = 1; i < descriptions.length; i++) {
|
|
186
|
-
if (descriptions[i - 1] !== descriptions[i]) {
|
|
187
|
-
descriptions[j] = descriptions[i];
|
|
188
|
-
j++;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
descriptions.length = j;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
switch (descriptions.length) {
|
|
196
|
-
case 1:
|
|
197
|
-
return descriptions[0];
|
|
198
|
-
|
|
199
|
-
case 2:
|
|
200
|
-
return descriptions[0] + " or " + descriptions[1];
|
|
201
|
-
|
|
202
|
-
default:
|
|
203
|
-
return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1];
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function describeFound(found) {
|
|
208
|
-
return found ? "\"" + literalEscape(found) + "\"" : "end of input";
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
function peg$parse(input, options) {
|
|
215
|
-
options = options !== void 0 ? options : {};
|
|
216
|
-
|
|
217
|
-
var peg$FAILED = {},
|
|
218
|
-
peg$startRuleFunctions = {
|
|
219
|
-
declaration: peg$parsedeclaration
|
|
220
|
-
},
|
|
221
|
-
peg$startRuleFunction = peg$parsedeclaration,
|
|
222
|
-
peg$c0 = "(",
|
|
223
|
-
peg$c1 = peg$literalExpectation("(", false),
|
|
224
|
-
peg$c2 = ")",
|
|
225
|
-
peg$c3 = peg$literalExpectation(")", false),
|
|
226
|
-
peg$c4 = function peg$c4(type, name, comment, fields) {
|
|
227
|
-
return {
|
|
228
|
-
type: type,
|
|
229
|
-
name: name,
|
|
230
|
-
comment: comment,
|
|
231
|
-
fields: fields
|
|
232
|
-
};
|
|
233
|
-
},
|
|
234
|
-
peg$c5 = "simple",
|
|
235
|
-
peg$c6 = peg$literalExpectation("simple", false),
|
|
236
|
-
peg$c7 = "object",
|
|
237
|
-
peg$c8 = peg$literalExpectation("object", false),
|
|
238
|
-
peg$c9 = "table",
|
|
239
|
-
peg$c10 = peg$literalExpectation("table", false),
|
|
240
|
-
peg$c11 = "auto",
|
|
241
|
-
peg$c12 = peg$literalExpectation("auto", false),
|
|
242
|
-
peg$c13 = "primary",
|
|
243
|
-
peg$c14 = peg$literalExpectation("primary", false),
|
|
244
|
-
peg$c15 = "index",
|
|
245
|
-
peg$c16 = peg$literalExpectation("index", false),
|
|
246
|
-
peg$c17 = "unique",
|
|
247
|
-
peg$c18 = peg$literalExpectation("unique", false),
|
|
248
|
-
peg$c19 = function peg$c19(f1, w) {
|
|
249
|
-
return w;
|
|
250
|
-
},
|
|
251
|
-
peg$c20 = function peg$c20(f1, fds) {
|
|
252
|
-
fds.unshift(f1);
|
|
253
|
-
return fds;
|
|
254
|
-
},
|
|
255
|
-
peg$c21 = ";",
|
|
256
|
-
peg$c22 = peg$literalExpectation(";", false),
|
|
257
|
-
peg$c23 = function peg$c23(type, name, comment) {
|
|
258
|
-
return {
|
|
259
|
-
type: type,
|
|
260
|
-
name: name,
|
|
261
|
-
comment: comment
|
|
262
|
-
};
|
|
263
|
-
},
|
|
264
|
-
peg$c24 = "[",
|
|
265
|
-
peg$c25 = peg$literalExpectation("[", false),
|
|
266
|
-
peg$c26 = "]",
|
|
267
|
-
peg$c27 = peg$literalExpectation("]", false),
|
|
268
|
-
peg$c28 = function peg$c28(type, size, name, comment) {
|
|
269
|
-
return {
|
|
270
|
-
type: type,
|
|
271
|
-
size: size,
|
|
272
|
-
name: name,
|
|
273
|
-
comment: comment
|
|
274
|
-
};
|
|
275
|
-
},
|
|
276
|
-
peg$c29 = function peg$c29(type, vals, name, comment) {
|
|
277
|
-
return {
|
|
278
|
-
type: type,
|
|
279
|
-
vals: vals,
|
|
280
|
-
name: name,
|
|
281
|
-
comment: comment
|
|
282
|
-
};
|
|
283
|
-
},
|
|
284
|
-
peg$c30 = ",",
|
|
285
|
-
peg$c31 = peg$literalExpectation(",", false),
|
|
286
|
-
peg$c32 = "int",
|
|
287
|
-
peg$c33 = peg$literalExpectation("int", false),
|
|
288
|
-
peg$c34 = "uint",
|
|
289
|
-
peg$c35 = peg$literalExpectation("uint", false),
|
|
290
|
-
peg$c36 = "short",
|
|
291
|
-
peg$c37 = peg$literalExpectation("short", false),
|
|
292
|
-
peg$c38 = "ushort",
|
|
293
|
-
peg$c39 = peg$literalExpectation("ushort", false),
|
|
294
|
-
peg$c40 = "byte",
|
|
295
|
-
peg$c41 = peg$literalExpectation("byte", false),
|
|
296
|
-
peg$c42 = "ubyte",
|
|
297
|
-
peg$c43 = peg$literalExpectation("ubyte", false),
|
|
298
|
-
peg$c44 = "float",
|
|
299
|
-
peg$c45 = peg$literalExpectation("float", false),
|
|
300
|
-
peg$c46 = "char",
|
|
301
|
-
peg$c47 = peg$literalExpectation("char", false),
|
|
302
|
-
peg$c48 = "string",
|
|
303
|
-
peg$c49 = peg$literalExpectation("string", false),
|
|
304
|
-
peg$c50 = "lstring",
|
|
305
|
-
peg$c51 = peg$literalExpectation("lstring", false),
|
|
306
|
-
peg$c52 = "enum",
|
|
307
|
-
peg$c53 = peg$literalExpectation("enum", false),
|
|
308
|
-
peg$c54 = "double",
|
|
309
|
-
peg$c55 = peg$literalExpectation("double", false),
|
|
310
|
-
peg$c56 = "bigint",
|
|
311
|
-
peg$c57 = peg$literalExpectation("bigint", false),
|
|
312
|
-
peg$c58 = "set",
|
|
313
|
-
peg$c59 = peg$literalExpectation("set", false),
|
|
314
|
-
peg$c60 = function peg$c60(t, n) {
|
|
315
|
-
return t + ' ' + n;
|
|
316
|
-
},
|
|
317
|
-
peg$c61 = /^[a-zA-Z_]/,
|
|
318
|
-
peg$c62 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false),
|
|
319
|
-
peg$c63 = /^[a-zA-Z0-9_]/,
|
|
320
|
-
peg$c64 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false),
|
|
321
|
-
peg$c65 = function peg$c65(t) {
|
|
322
|
-
return text();
|
|
323
|
-
},
|
|
324
|
-
peg$c66 = "\"",
|
|
325
|
-
peg$c67 = peg$literalExpectation("\"", false),
|
|
326
|
-
peg$c68 = /^[^"]/,
|
|
327
|
-
peg$c69 = peg$classExpectation(["\""], true, false),
|
|
328
|
-
peg$c70 = function peg$c70(t) {
|
|
329
|
-
return t.join('');
|
|
330
|
-
},
|
|
331
|
-
peg$c71 = /^[^\n\r]/,
|
|
332
|
-
peg$c72 = peg$classExpectation(["\n", "\r"], true, false),
|
|
333
|
-
peg$c73 = function peg$c73(t) {
|
|
334
|
-
return t.join('').replace(/^"/, '').replace(/"$/, '');
|
|
335
|
-
},
|
|
336
|
-
peg$c74 = peg$otherExpectation("integer"),
|
|
337
|
-
peg$c75 = /^[0-9]/,
|
|
338
|
-
peg$c76 = peg$classExpectation([["0", "9"]], false, false),
|
|
339
|
-
peg$c77 = function peg$c77() {
|
|
340
|
-
return parseInt(text(), 10);
|
|
341
|
-
},
|
|
342
|
-
peg$c78 = peg$otherExpectation("whitespace"),
|
|
343
|
-
peg$c79 = /^[ \t\n\r]/,
|
|
344
|
-
peg$c80 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false),
|
|
345
|
-
peg$currPos = 0,
|
|
346
|
-
peg$savedPos = 0,
|
|
347
|
-
peg$posDetailsCache = [{
|
|
348
|
-
line: 1,
|
|
349
|
-
column: 1
|
|
350
|
-
}],
|
|
351
|
-
peg$maxFailPos = 0,
|
|
352
|
-
peg$maxFailExpected = [],
|
|
353
|
-
peg$silentFails = 0,
|
|
354
|
-
peg$result;
|
|
355
|
-
|
|
356
|
-
if ("startRule" in options) {
|
|
357
|
-
if (!(options.startRule in peg$startRuleFunctions)) {
|
|
358
|
-
throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
function text() {
|
|
365
|
-
return input.substring(peg$savedPos, peg$currPos);
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
function location() {
|
|
369
|
-
return peg$computeLocation(peg$savedPos, peg$currPos);
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
function expected(description, location) {
|
|
373
|
-
location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos);
|
|
374
|
-
throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
function error(message, location) {
|
|
378
|
-
location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos);
|
|
379
|
-
throw peg$buildSimpleError(message, location);
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
function peg$literalExpectation(text, ignoreCase) {
|
|
383
|
-
return {
|
|
384
|
-
type: "literal",
|
|
385
|
-
text: text,
|
|
386
|
-
ignoreCase: ignoreCase
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
function peg$classExpectation(parts, inverted, ignoreCase) {
|
|
391
|
-
return {
|
|
392
|
-
type: "class",
|
|
393
|
-
parts: parts,
|
|
394
|
-
inverted: inverted,
|
|
395
|
-
ignoreCase: ignoreCase
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
function peg$anyExpectation() {
|
|
400
|
-
return {
|
|
401
|
-
type: "any"
|
|
402
|
-
};
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
function peg$endExpectation() {
|
|
406
|
-
return {
|
|
407
|
-
type: "end"
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
function peg$otherExpectation(description) {
|
|
412
|
-
return {
|
|
413
|
-
type: "other",
|
|
414
|
-
description: description
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
function peg$computePosDetails(pos) {
|
|
419
|
-
var details = peg$posDetailsCache[pos],
|
|
420
|
-
p;
|
|
421
|
-
|
|
422
|
-
if (details) {
|
|
423
|
-
return details;
|
|
424
|
-
} else {
|
|
425
|
-
p = pos - 1;
|
|
426
|
-
|
|
427
|
-
while (!peg$posDetailsCache[p]) {
|
|
428
|
-
p--;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
details = peg$posDetailsCache[p];
|
|
432
|
-
details = {
|
|
433
|
-
line: details.line,
|
|
434
|
-
column: details.column
|
|
435
|
-
};
|
|
436
|
-
|
|
437
|
-
while (p < pos) {
|
|
438
|
-
if (input.charCodeAt(p) === 10) {
|
|
439
|
-
details.line++;
|
|
440
|
-
details.column = 1;
|
|
441
|
-
} else {
|
|
442
|
-
details.column++;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
p++;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
peg$posDetailsCache[pos] = details;
|
|
449
|
-
return details;
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
function peg$computeLocation(startPos, endPos) {
|
|
454
|
-
var startPosDetails = peg$computePosDetails(startPos),
|
|
455
|
-
endPosDetails = peg$computePosDetails(endPos);
|
|
456
|
-
return {
|
|
457
|
-
start: {
|
|
458
|
-
offset: startPos,
|
|
459
|
-
line: startPosDetails.line,
|
|
460
|
-
column: startPosDetails.column
|
|
461
|
-
},
|
|
462
|
-
end: {
|
|
463
|
-
offset: endPos,
|
|
464
|
-
line: endPosDetails.line,
|
|
465
|
-
column: endPosDetails.column
|
|
466
|
-
}
|
|
467
|
-
};
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
function peg$fail(expected) {
|
|
471
|
-
if (peg$currPos < peg$maxFailPos) {
|
|
472
|
-
return;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
if (peg$currPos > peg$maxFailPos) {
|
|
476
|
-
peg$maxFailPos = peg$currPos;
|
|
477
|
-
peg$maxFailExpected = [];
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
peg$maxFailExpected.push(expected);
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
function peg$buildSimpleError(message, location) {
|
|
484
|
-
return new peg$SyntaxError(message, null, null, location);
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
function peg$buildStructuredError(expected, found, location) {
|
|
488
|
-
return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location);
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
function peg$parsedeclaration() {
|
|
492
|
-
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
|
|
493
|
-
s0 = peg$currPos;
|
|
494
|
-
s1 = peg$parse_();
|
|
495
|
-
|
|
496
|
-
if (s1 !== peg$FAILED) {
|
|
497
|
-
s2 = peg$parsedeclareType();
|
|
498
|
-
|
|
499
|
-
if (s2 !== peg$FAILED) {
|
|
500
|
-
s3 = peg$parse_();
|
|
501
|
-
|
|
502
|
-
if (s3 !== peg$FAILED) {
|
|
503
|
-
s4 = peg$parsedeclareName();
|
|
504
|
-
|
|
505
|
-
if (s4 !== peg$FAILED) {
|
|
506
|
-
s5 = peg$parse_();
|
|
507
|
-
|
|
508
|
-
if (s5 !== peg$FAILED) {
|
|
509
|
-
s6 = peg$parsecomment();
|
|
510
|
-
|
|
511
|
-
if (s6 !== peg$FAILED) {
|
|
512
|
-
s7 = peg$parse_();
|
|
513
|
-
|
|
514
|
-
if (s7 !== peg$FAILED) {
|
|
515
|
-
if (input.charCodeAt(peg$currPos) === 40) {
|
|
516
|
-
s8 = peg$c0;
|
|
517
|
-
peg$currPos++;
|
|
518
|
-
} else {
|
|
519
|
-
s8 = peg$FAILED;
|
|
520
|
-
|
|
521
|
-
if (peg$silentFails === 0) {
|
|
522
|
-
peg$fail(peg$c1);
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
if (s8 !== peg$FAILED) {
|
|
527
|
-
s9 = peg$parse_();
|
|
528
|
-
|
|
529
|
-
if (s9 !== peg$FAILED) {
|
|
530
|
-
s10 = peg$parsefieldList();
|
|
531
|
-
|
|
532
|
-
if (s10 !== peg$FAILED) {
|
|
533
|
-
s11 = peg$parse_();
|
|
534
|
-
|
|
535
|
-
if (s11 !== peg$FAILED) {
|
|
536
|
-
if (input.charCodeAt(peg$currPos) === 41) {
|
|
537
|
-
s12 = peg$c2;
|
|
538
|
-
peg$currPos++;
|
|
539
|
-
} else {
|
|
540
|
-
s12 = peg$FAILED;
|
|
541
|
-
|
|
542
|
-
if (peg$silentFails === 0) {
|
|
543
|
-
peg$fail(peg$c3);
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
if (s12 !== peg$FAILED) {
|
|
548
|
-
s13 = peg$parse_();
|
|
549
|
-
|
|
550
|
-
if (s13 !== peg$FAILED) {
|
|
551
|
-
peg$savedPos = s0;
|
|
552
|
-
s1 = peg$c4(s2, s4, s6, s10);
|
|
553
|
-
s0 = s1;
|
|
554
|
-
} else {
|
|
555
|
-
peg$currPos = s0;
|
|
556
|
-
s0 = peg$FAILED;
|
|
557
|
-
}
|
|
558
|
-
} else {
|
|
559
|
-
peg$currPos = s0;
|
|
560
|
-
s0 = peg$FAILED;
|
|
561
|
-
}
|
|
562
|
-
} else {
|
|
563
|
-
peg$currPos = s0;
|
|
564
|
-
s0 = peg$FAILED;
|
|
565
|
-
}
|
|
566
|
-
} else {
|
|
567
|
-
peg$currPos = s0;
|
|
568
|
-
s0 = peg$FAILED;
|
|
569
|
-
}
|
|
570
|
-
} else {
|
|
571
|
-
peg$currPos = s0;
|
|
572
|
-
s0 = peg$FAILED;
|
|
573
|
-
}
|
|
574
|
-
} else {
|
|
575
|
-
peg$currPos = s0;
|
|
576
|
-
s0 = peg$FAILED;
|
|
577
|
-
}
|
|
578
|
-
} else {
|
|
579
|
-
peg$currPos = s0;
|
|
580
|
-
s0 = peg$FAILED;
|
|
581
|
-
}
|
|
582
|
-
} else {
|
|
583
|
-
peg$currPos = s0;
|
|
584
|
-
s0 = peg$FAILED;
|
|
585
|
-
}
|
|
586
|
-
} else {
|
|
587
|
-
peg$currPos = s0;
|
|
588
|
-
s0 = peg$FAILED;
|
|
589
|
-
}
|
|
590
|
-
} else {
|
|
591
|
-
peg$currPos = s0;
|
|
592
|
-
s0 = peg$FAILED;
|
|
593
|
-
}
|
|
594
|
-
} else {
|
|
595
|
-
peg$currPos = s0;
|
|
596
|
-
s0 = peg$FAILED;
|
|
597
|
-
}
|
|
598
|
-
} else {
|
|
599
|
-
peg$currPos = s0;
|
|
600
|
-
s0 = peg$FAILED;
|
|
601
|
-
}
|
|
602
|
-
} else {
|
|
603
|
-
peg$currPos = s0;
|
|
604
|
-
s0 = peg$FAILED;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
return s0;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
function peg$parsedeclareType() {
|
|
611
|
-
var s0;
|
|
612
|
-
|
|
613
|
-
if (input.substr(peg$currPos, 6) === peg$c5) {
|
|
614
|
-
s0 = peg$c5;
|
|
615
|
-
peg$currPos += 6;
|
|
616
|
-
} else {
|
|
617
|
-
s0 = peg$FAILED;
|
|
618
|
-
|
|
619
|
-
if (peg$silentFails === 0) {
|
|
620
|
-
peg$fail(peg$c6);
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
if (s0 === peg$FAILED) {
|
|
625
|
-
if (input.substr(peg$currPos, 6) === peg$c7) {
|
|
626
|
-
s0 = peg$c7;
|
|
627
|
-
peg$currPos += 6;
|
|
628
|
-
} else {
|
|
629
|
-
s0 = peg$FAILED;
|
|
630
|
-
|
|
631
|
-
if (peg$silentFails === 0) {
|
|
632
|
-
peg$fail(peg$c8);
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
if (s0 === peg$FAILED) {
|
|
637
|
-
if (input.substr(peg$currPos, 5) === peg$c9) {
|
|
638
|
-
s0 = peg$c9;
|
|
639
|
-
peg$currPos += 5;
|
|
640
|
-
} else {
|
|
641
|
-
s0 = peg$FAILED;
|
|
642
|
-
|
|
643
|
-
if (peg$silentFails === 0) {
|
|
644
|
-
peg$fail(peg$c10);
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
return s0;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
function peg$parsedeclareName() {
|
|
654
|
-
var s0, s1, s2, s3;
|
|
655
|
-
s0 = peg$parsename();
|
|
656
|
-
|
|
657
|
-
if (s0 === peg$FAILED) {
|
|
658
|
-
s0 = peg$currPos;
|
|
659
|
-
s1 = peg$parsename();
|
|
660
|
-
|
|
661
|
-
if (s1 !== peg$FAILED) {
|
|
662
|
-
s2 = peg$parseindexType();
|
|
663
|
-
|
|
664
|
-
if (s2 !== peg$FAILED) {
|
|
665
|
-
s1 = [s1, s2];
|
|
666
|
-
s0 = s1;
|
|
667
|
-
} else {
|
|
668
|
-
peg$currPos = s0;
|
|
669
|
-
s0 = peg$FAILED;
|
|
670
|
-
}
|
|
671
|
-
} else {
|
|
672
|
-
peg$currPos = s0;
|
|
673
|
-
s0 = peg$FAILED;
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
if (s0 === peg$FAILED) {
|
|
677
|
-
s0 = peg$currPos;
|
|
678
|
-
s1 = peg$parsename();
|
|
679
|
-
|
|
680
|
-
if (s1 !== peg$FAILED) {
|
|
681
|
-
if (input.substr(peg$currPos, 4) === peg$c11) {
|
|
682
|
-
s2 = peg$c11;
|
|
683
|
-
peg$currPos += 4;
|
|
684
|
-
} else {
|
|
685
|
-
s2 = peg$FAILED;
|
|
686
|
-
|
|
687
|
-
if (peg$silentFails === 0) {
|
|
688
|
-
peg$fail(peg$c12);
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
if (s2 !== peg$FAILED) {
|
|
693
|
-
s1 = [s1, s2];
|
|
694
|
-
s0 = s1;
|
|
695
|
-
} else {
|
|
696
|
-
peg$currPos = s0;
|
|
697
|
-
s0 = peg$FAILED;
|
|
698
|
-
}
|
|
699
|
-
} else {
|
|
700
|
-
peg$currPos = s0;
|
|
701
|
-
s0 = peg$FAILED;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
if (s0 === peg$FAILED) {
|
|
705
|
-
s0 = peg$currPos;
|
|
706
|
-
s1 = peg$parsename();
|
|
707
|
-
|
|
708
|
-
if (s1 !== peg$FAILED) {
|
|
709
|
-
s2 = peg$parseindexType();
|
|
710
|
-
|
|
711
|
-
if (s2 !== peg$FAILED) {
|
|
712
|
-
if (input.substr(peg$currPos, 4) === peg$c11) {
|
|
713
|
-
s3 = peg$c11;
|
|
714
|
-
peg$currPos += 4;
|
|
715
|
-
} else {
|
|
716
|
-
s3 = peg$FAILED;
|
|
717
|
-
|
|
718
|
-
if (peg$silentFails === 0) {
|
|
719
|
-
peg$fail(peg$c12);
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
if (s3 !== peg$FAILED) {
|
|
724
|
-
s1 = [s1, s2, s3];
|
|
725
|
-
s0 = s1;
|
|
726
|
-
} else {
|
|
727
|
-
peg$currPos = s0;
|
|
728
|
-
s0 = peg$FAILED;
|
|
729
|
-
}
|
|
730
|
-
} else {
|
|
731
|
-
peg$currPos = s0;
|
|
732
|
-
s0 = peg$FAILED;
|
|
733
|
-
}
|
|
734
|
-
} else {
|
|
735
|
-
peg$currPos = s0;
|
|
736
|
-
s0 = peg$FAILED;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
return s0;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
function peg$parseindexType() {
|
|
746
|
-
var s0;
|
|
747
|
-
|
|
748
|
-
if (input.substr(peg$currPos, 7) === peg$c13) {
|
|
749
|
-
s0 = peg$c13;
|
|
750
|
-
peg$currPos += 7;
|
|
751
|
-
} else {
|
|
752
|
-
s0 = peg$FAILED;
|
|
753
|
-
|
|
754
|
-
if (peg$silentFails === 0) {
|
|
755
|
-
peg$fail(peg$c14);
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
if (s0 === peg$FAILED) {
|
|
760
|
-
if (input.substr(peg$currPos, 5) === peg$c15) {
|
|
761
|
-
s0 = peg$c15;
|
|
762
|
-
peg$currPos += 5;
|
|
763
|
-
} else {
|
|
764
|
-
s0 = peg$FAILED;
|
|
765
|
-
|
|
766
|
-
if (peg$silentFails === 0) {
|
|
767
|
-
peg$fail(peg$c16);
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
if (s0 === peg$FAILED) {
|
|
772
|
-
if (input.substr(peg$currPos, 6) === peg$c17) {
|
|
773
|
-
s0 = peg$c17;
|
|
774
|
-
peg$currPos += 6;
|
|
775
|
-
} else {
|
|
776
|
-
s0 = peg$FAILED;
|
|
777
|
-
|
|
778
|
-
if (peg$silentFails === 0) {
|
|
779
|
-
peg$fail(peg$c18);
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
return s0;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
function peg$parsecomment() {
|
|
789
|
-
var s0;
|
|
790
|
-
s0 = peg$parsenonQuotedString();
|
|
791
|
-
|
|
792
|
-
if (s0 === peg$FAILED) {
|
|
793
|
-
s0 = peg$parse_();
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
return s0;
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
function peg$parsefieldList() {
|
|
800
|
-
var s0, s1, s2, s3, s4, s5, s6;
|
|
801
|
-
s0 = peg$currPos;
|
|
802
|
-
s1 = peg$parsefield();
|
|
803
|
-
|
|
804
|
-
if (s1 !== peg$FAILED) {
|
|
805
|
-
s2 = peg$parse_();
|
|
806
|
-
|
|
807
|
-
if (s2 !== peg$FAILED) {
|
|
808
|
-
s3 = [];
|
|
809
|
-
s4 = peg$currPos;
|
|
810
|
-
s5 = peg$parse_();
|
|
811
|
-
|
|
812
|
-
if (s5 !== peg$FAILED) {
|
|
813
|
-
s6 = peg$parsefield();
|
|
814
|
-
|
|
815
|
-
if (s6 !== peg$FAILED) {
|
|
816
|
-
peg$savedPos = s4;
|
|
817
|
-
s5 = peg$c19(s1, s6);
|
|
818
|
-
s4 = s5;
|
|
819
|
-
} else {
|
|
820
|
-
peg$currPos = s4;
|
|
821
|
-
s4 = peg$FAILED;
|
|
822
|
-
}
|
|
823
|
-
} else {
|
|
824
|
-
peg$currPos = s4;
|
|
825
|
-
s4 = peg$FAILED;
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
while (s4 !== peg$FAILED) {
|
|
829
|
-
s3.push(s4);
|
|
830
|
-
s4 = peg$currPos;
|
|
831
|
-
s5 = peg$parse_();
|
|
832
|
-
|
|
833
|
-
if (s5 !== peg$FAILED) {
|
|
834
|
-
s6 = peg$parsefield();
|
|
835
|
-
|
|
836
|
-
if (s6 !== peg$FAILED) {
|
|
837
|
-
peg$savedPos = s4;
|
|
838
|
-
s5 = peg$c19(s1, s6);
|
|
839
|
-
s4 = s5;
|
|
840
|
-
} else {
|
|
841
|
-
peg$currPos = s4;
|
|
842
|
-
s4 = peg$FAILED;
|
|
843
|
-
}
|
|
844
|
-
} else {
|
|
845
|
-
peg$currPos = s4;
|
|
846
|
-
s4 = peg$FAILED;
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
if (s3 !== peg$FAILED) {
|
|
851
|
-
s4 = peg$parse_();
|
|
852
|
-
|
|
853
|
-
if (s4 !== peg$FAILED) {
|
|
854
|
-
peg$savedPos = s0;
|
|
855
|
-
s1 = peg$c20(s1, s3);
|
|
856
|
-
s0 = s1;
|
|
857
|
-
} else {
|
|
858
|
-
peg$currPos = s0;
|
|
859
|
-
s0 = peg$FAILED;
|
|
860
|
-
}
|
|
861
|
-
} else {
|
|
862
|
-
peg$currPos = s0;
|
|
863
|
-
s0 = peg$FAILED;
|
|
864
|
-
}
|
|
865
|
-
} else {
|
|
866
|
-
peg$currPos = s0;
|
|
867
|
-
s0 = peg$FAILED;
|
|
868
|
-
}
|
|
869
|
-
} else {
|
|
870
|
-
peg$currPos = s0;
|
|
871
|
-
s0 = peg$FAILED;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
return s0;
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
function peg$parsefield() {
|
|
878
|
-
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
|
|
879
|
-
s0 = peg$currPos;
|
|
880
|
-
s1 = peg$parsefieldType();
|
|
881
|
-
|
|
882
|
-
if (s1 !== peg$FAILED) {
|
|
883
|
-
s2 = peg$parse_();
|
|
884
|
-
|
|
885
|
-
if (s2 !== peg$FAILED) {
|
|
886
|
-
s3 = peg$parsename();
|
|
887
|
-
|
|
888
|
-
if (s3 !== peg$FAILED) {
|
|
889
|
-
s4 = peg$parse_();
|
|
890
|
-
|
|
891
|
-
if (s4 !== peg$FAILED) {
|
|
892
|
-
if (input.charCodeAt(peg$currPos) === 59) {
|
|
893
|
-
s5 = peg$c21;
|
|
894
|
-
peg$currPos++;
|
|
895
|
-
} else {
|
|
896
|
-
s5 = peg$FAILED;
|
|
897
|
-
|
|
898
|
-
if (peg$silentFails === 0) {
|
|
899
|
-
peg$fail(peg$c22);
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
if (s5 !== peg$FAILED) {
|
|
904
|
-
s6 = peg$parse_();
|
|
905
|
-
|
|
906
|
-
if (s6 !== peg$FAILED) {
|
|
907
|
-
s7 = peg$parsecomment();
|
|
908
|
-
|
|
909
|
-
if (s7 !== peg$FAILED) {
|
|
910
|
-
peg$savedPos = s0;
|
|
911
|
-
s1 = peg$c23(s1, s3, s7);
|
|
912
|
-
s0 = s1;
|
|
913
|
-
} else {
|
|
914
|
-
peg$currPos = s0;
|
|
915
|
-
s0 = peg$FAILED;
|
|
916
|
-
}
|
|
917
|
-
} else {
|
|
918
|
-
peg$currPos = s0;
|
|
919
|
-
s0 = peg$FAILED;
|
|
920
|
-
}
|
|
921
|
-
} else {
|
|
922
|
-
peg$currPos = s0;
|
|
923
|
-
s0 = peg$FAILED;
|
|
924
|
-
}
|
|
925
|
-
} else {
|
|
926
|
-
peg$currPos = s0;
|
|
927
|
-
s0 = peg$FAILED;
|
|
928
|
-
}
|
|
929
|
-
} else {
|
|
930
|
-
peg$currPos = s0;
|
|
931
|
-
s0 = peg$FAILED;
|
|
932
|
-
}
|
|
933
|
-
} else {
|
|
934
|
-
peg$currPos = s0;
|
|
935
|
-
s0 = peg$FAILED;
|
|
936
|
-
}
|
|
937
|
-
} else {
|
|
938
|
-
peg$currPos = s0;
|
|
939
|
-
s0 = peg$FAILED;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
if (s0 === peg$FAILED) {
|
|
943
|
-
s0 = peg$currPos;
|
|
944
|
-
s1 = peg$parsefieldType();
|
|
945
|
-
|
|
946
|
-
if (s1 !== peg$FAILED) {
|
|
947
|
-
s2 = peg$parse_();
|
|
948
|
-
|
|
949
|
-
if (s2 !== peg$FAILED) {
|
|
950
|
-
if (input.charCodeAt(peg$currPos) === 91) {
|
|
951
|
-
s3 = peg$c24;
|
|
952
|
-
peg$currPos++;
|
|
953
|
-
} else {
|
|
954
|
-
s3 = peg$FAILED;
|
|
955
|
-
|
|
956
|
-
if (peg$silentFails === 0) {
|
|
957
|
-
peg$fail(peg$c25);
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
if (s3 !== peg$FAILED) {
|
|
962
|
-
s4 = peg$parse_();
|
|
963
|
-
|
|
964
|
-
if (s4 !== peg$FAILED) {
|
|
965
|
-
s5 = peg$parsefieldSize();
|
|
966
|
-
|
|
967
|
-
if (s5 !== peg$FAILED) {
|
|
968
|
-
s6 = peg$parse_();
|
|
969
|
-
|
|
970
|
-
if (s6 !== peg$FAILED) {
|
|
971
|
-
if (input.charCodeAt(peg$currPos) === 93) {
|
|
972
|
-
s7 = peg$c26;
|
|
973
|
-
peg$currPos++;
|
|
974
|
-
} else {
|
|
975
|
-
s7 = peg$FAILED;
|
|
976
|
-
|
|
977
|
-
if (peg$silentFails === 0) {
|
|
978
|
-
peg$fail(peg$c27);
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
if (s7 !== peg$FAILED) {
|
|
983
|
-
s8 = peg$parse_();
|
|
984
|
-
|
|
985
|
-
if (s8 !== peg$FAILED) {
|
|
986
|
-
s9 = peg$parsename();
|
|
987
|
-
|
|
988
|
-
if (s9 !== peg$FAILED) {
|
|
989
|
-
s10 = peg$parse_();
|
|
990
|
-
|
|
991
|
-
if (s10 !== peg$FAILED) {
|
|
992
|
-
if (input.charCodeAt(peg$currPos) === 59) {
|
|
993
|
-
s11 = peg$c21;
|
|
994
|
-
peg$currPos++;
|
|
995
|
-
} else {
|
|
996
|
-
s11 = peg$FAILED;
|
|
997
|
-
|
|
998
|
-
if (peg$silentFails === 0) {
|
|
999
|
-
peg$fail(peg$c22);
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
if (s11 !== peg$FAILED) {
|
|
1004
|
-
s12 = peg$parse_();
|
|
1005
|
-
|
|
1006
|
-
if (s12 !== peg$FAILED) {
|
|
1007
|
-
s13 = peg$parsecomment();
|
|
1008
|
-
|
|
1009
|
-
if (s13 !== peg$FAILED) {
|
|
1010
|
-
peg$savedPos = s0;
|
|
1011
|
-
s1 = peg$c28(s1, s5, s9, s13);
|
|
1012
|
-
s0 = s1;
|
|
1013
|
-
} else {
|
|
1014
|
-
peg$currPos = s0;
|
|
1015
|
-
s0 = peg$FAILED;
|
|
1016
|
-
}
|
|
1017
|
-
} else {
|
|
1018
|
-
peg$currPos = s0;
|
|
1019
|
-
s0 = peg$FAILED;
|
|
1020
|
-
}
|
|
1021
|
-
} else {
|
|
1022
|
-
peg$currPos = s0;
|
|
1023
|
-
s0 = peg$FAILED;
|
|
1024
|
-
}
|
|
1025
|
-
} else {
|
|
1026
|
-
peg$currPos = s0;
|
|
1027
|
-
s0 = peg$FAILED;
|
|
1028
|
-
}
|
|
1029
|
-
} else {
|
|
1030
|
-
peg$currPos = s0;
|
|
1031
|
-
s0 = peg$FAILED;
|
|
1032
|
-
}
|
|
1033
|
-
} else {
|
|
1034
|
-
peg$currPos = s0;
|
|
1035
|
-
s0 = peg$FAILED;
|
|
1036
|
-
}
|
|
1037
|
-
} else {
|
|
1038
|
-
peg$currPos = s0;
|
|
1039
|
-
s0 = peg$FAILED;
|
|
1040
|
-
}
|
|
1041
|
-
} else {
|
|
1042
|
-
peg$currPos = s0;
|
|
1043
|
-
s0 = peg$FAILED;
|
|
1044
|
-
}
|
|
1045
|
-
} else {
|
|
1046
|
-
peg$currPos = s0;
|
|
1047
|
-
s0 = peg$FAILED;
|
|
1048
|
-
}
|
|
1049
|
-
} else {
|
|
1050
|
-
peg$currPos = s0;
|
|
1051
|
-
s0 = peg$FAILED;
|
|
1052
|
-
}
|
|
1053
|
-
} else {
|
|
1054
|
-
peg$currPos = s0;
|
|
1055
|
-
s0 = peg$FAILED;
|
|
1056
|
-
}
|
|
1057
|
-
} else {
|
|
1058
|
-
peg$currPos = s0;
|
|
1059
|
-
s0 = peg$FAILED;
|
|
1060
|
-
}
|
|
1061
|
-
} else {
|
|
1062
|
-
peg$currPos = s0;
|
|
1063
|
-
s0 = peg$FAILED;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
if (s0 === peg$FAILED) {
|
|
1067
|
-
s0 = peg$currPos;
|
|
1068
|
-
s1 = peg$parsefieldType();
|
|
1069
|
-
|
|
1070
|
-
if (s1 !== peg$FAILED) {
|
|
1071
|
-
s2 = peg$parse_();
|
|
1072
|
-
|
|
1073
|
-
if (s2 !== peg$FAILED) {
|
|
1074
|
-
if (input.charCodeAt(peg$currPos) === 40) {
|
|
1075
|
-
s3 = peg$c0;
|
|
1076
|
-
peg$currPos++;
|
|
1077
|
-
} else {
|
|
1078
|
-
s3 = peg$FAILED;
|
|
1079
|
-
|
|
1080
|
-
if (peg$silentFails === 0) {
|
|
1081
|
-
peg$fail(peg$c1);
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
if (s3 !== peg$FAILED) {
|
|
1086
|
-
s4 = peg$parse_();
|
|
1087
|
-
|
|
1088
|
-
if (s4 !== peg$FAILED) {
|
|
1089
|
-
s5 = peg$parsefieldValues();
|
|
1090
|
-
|
|
1091
|
-
if (s5 !== peg$FAILED) {
|
|
1092
|
-
s6 = peg$parse_();
|
|
1093
|
-
|
|
1094
|
-
if (s6 !== peg$FAILED) {
|
|
1095
|
-
if (input.charCodeAt(peg$currPos) === 41) {
|
|
1096
|
-
s7 = peg$c2;
|
|
1097
|
-
peg$currPos++;
|
|
1098
|
-
} else {
|
|
1099
|
-
s7 = peg$FAILED;
|
|
1100
|
-
|
|
1101
|
-
if (peg$silentFails === 0) {
|
|
1102
|
-
peg$fail(peg$c3);
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
if (s7 !== peg$FAILED) {
|
|
1107
|
-
s8 = peg$parse_();
|
|
1108
|
-
|
|
1109
|
-
if (s8 !== peg$FAILED) {
|
|
1110
|
-
s9 = peg$parsename();
|
|
1111
|
-
|
|
1112
|
-
if (s9 !== peg$FAILED) {
|
|
1113
|
-
s10 = peg$parse_();
|
|
1114
|
-
|
|
1115
|
-
if (s10 !== peg$FAILED) {
|
|
1116
|
-
if (input.charCodeAt(peg$currPos) === 59) {
|
|
1117
|
-
s11 = peg$c21;
|
|
1118
|
-
peg$currPos++;
|
|
1119
|
-
} else {
|
|
1120
|
-
s11 = peg$FAILED;
|
|
1121
|
-
|
|
1122
|
-
if (peg$silentFails === 0) {
|
|
1123
|
-
peg$fail(peg$c22);
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
if (s11 !== peg$FAILED) {
|
|
1128
|
-
s12 = peg$parse_();
|
|
1129
|
-
|
|
1130
|
-
if (s12 !== peg$FAILED) {
|
|
1131
|
-
s13 = peg$parsecomment();
|
|
1132
|
-
|
|
1133
|
-
if (s13 !== peg$FAILED) {
|
|
1134
|
-
peg$savedPos = s0;
|
|
1135
|
-
s1 = peg$c29(s1, s5, s9, s13);
|
|
1136
|
-
s0 = s1;
|
|
1137
|
-
} else {
|
|
1138
|
-
peg$currPos = s0;
|
|
1139
|
-
s0 = peg$FAILED;
|
|
1140
|
-
}
|
|
1141
|
-
} else {
|
|
1142
|
-
peg$currPos = s0;
|
|
1143
|
-
s0 = peg$FAILED;
|
|
1144
|
-
}
|
|
1145
|
-
} else {
|
|
1146
|
-
peg$currPos = s0;
|
|
1147
|
-
s0 = peg$FAILED;
|
|
1148
|
-
}
|
|
1149
|
-
} else {
|
|
1150
|
-
peg$currPos = s0;
|
|
1151
|
-
s0 = peg$FAILED;
|
|
1152
|
-
}
|
|
1153
|
-
} else {
|
|
1154
|
-
peg$currPos = s0;
|
|
1155
|
-
s0 = peg$FAILED;
|
|
1156
|
-
}
|
|
1157
|
-
} else {
|
|
1158
|
-
peg$currPos = s0;
|
|
1159
|
-
s0 = peg$FAILED;
|
|
1160
|
-
}
|
|
1161
|
-
} else {
|
|
1162
|
-
peg$currPos = s0;
|
|
1163
|
-
s0 = peg$FAILED;
|
|
1164
|
-
}
|
|
1165
|
-
} else {
|
|
1166
|
-
peg$currPos = s0;
|
|
1167
|
-
s0 = peg$FAILED;
|
|
1168
|
-
}
|
|
1169
|
-
} else {
|
|
1170
|
-
peg$currPos = s0;
|
|
1171
|
-
s0 = peg$FAILED;
|
|
1172
|
-
}
|
|
1173
|
-
} else {
|
|
1174
|
-
peg$currPos = s0;
|
|
1175
|
-
s0 = peg$FAILED;
|
|
1176
|
-
}
|
|
1177
|
-
} else {
|
|
1178
|
-
peg$currPos = s0;
|
|
1179
|
-
s0 = peg$FAILED;
|
|
1180
|
-
}
|
|
1181
|
-
} else {
|
|
1182
|
-
peg$currPos = s0;
|
|
1183
|
-
s0 = peg$FAILED;
|
|
1184
|
-
}
|
|
1185
|
-
} else {
|
|
1186
|
-
peg$currPos = s0;
|
|
1187
|
-
s0 = peg$FAILED;
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
return s0;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
function peg$parsefieldValues() {
|
|
1196
|
-
var s0, s1, s2, s3, s4, s5, s6;
|
|
1197
|
-
s0 = peg$currPos;
|
|
1198
|
-
s1 = peg$parsename();
|
|
1199
|
-
|
|
1200
|
-
if (s1 !== peg$FAILED) {
|
|
1201
|
-
s2 = [];
|
|
1202
|
-
s3 = peg$currPos;
|
|
1203
|
-
|
|
1204
|
-
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1205
|
-
s4 = peg$c30;
|
|
1206
|
-
peg$currPos++;
|
|
1207
|
-
} else {
|
|
1208
|
-
s4 = peg$FAILED;
|
|
1209
|
-
|
|
1210
|
-
if (peg$silentFails === 0) {
|
|
1211
|
-
peg$fail(peg$c31);
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
if (s4 !== peg$FAILED) {
|
|
1216
|
-
s5 = peg$parse_();
|
|
1217
|
-
|
|
1218
|
-
if (s5 !== peg$FAILED) {
|
|
1219
|
-
s6 = peg$parsename();
|
|
1220
|
-
|
|
1221
|
-
if (s6 !== peg$FAILED) {
|
|
1222
|
-
peg$savedPos = s3;
|
|
1223
|
-
s4 = peg$c19(s1, s6);
|
|
1224
|
-
s3 = s4;
|
|
1225
|
-
} else {
|
|
1226
|
-
peg$currPos = s3;
|
|
1227
|
-
s3 = peg$FAILED;
|
|
1228
|
-
}
|
|
1229
|
-
} else {
|
|
1230
|
-
peg$currPos = s3;
|
|
1231
|
-
s3 = peg$FAILED;
|
|
1232
|
-
}
|
|
1233
|
-
} else {
|
|
1234
|
-
peg$currPos = s3;
|
|
1235
|
-
s3 = peg$FAILED;
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
while (s3 !== peg$FAILED) {
|
|
1239
|
-
s2.push(s3);
|
|
1240
|
-
s3 = peg$currPos;
|
|
1241
|
-
|
|
1242
|
-
if (input.charCodeAt(peg$currPos) === 44) {
|
|
1243
|
-
s4 = peg$c30;
|
|
1244
|
-
peg$currPos++;
|
|
1245
|
-
} else {
|
|
1246
|
-
s4 = peg$FAILED;
|
|
1247
|
-
|
|
1248
|
-
if (peg$silentFails === 0) {
|
|
1249
|
-
peg$fail(peg$c31);
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
if (s4 !== peg$FAILED) {
|
|
1254
|
-
s5 = peg$parse_();
|
|
1255
|
-
|
|
1256
|
-
if (s5 !== peg$FAILED) {
|
|
1257
|
-
s6 = peg$parsename();
|
|
1258
|
-
|
|
1259
|
-
if (s6 !== peg$FAILED) {
|
|
1260
|
-
peg$savedPos = s3;
|
|
1261
|
-
s4 = peg$c19(s1, s6);
|
|
1262
|
-
s3 = s4;
|
|
1263
|
-
} else {
|
|
1264
|
-
peg$currPos = s3;
|
|
1265
|
-
s3 = peg$FAILED;
|
|
1266
|
-
}
|
|
1267
|
-
} else {
|
|
1268
|
-
peg$currPos = s3;
|
|
1269
|
-
s3 = peg$FAILED;
|
|
1270
|
-
}
|
|
1271
|
-
} else {
|
|
1272
|
-
peg$currPos = s3;
|
|
1273
|
-
s3 = peg$FAILED;
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
if (s2 !== peg$FAILED) {
|
|
1278
|
-
peg$savedPos = s0;
|
|
1279
|
-
s1 = peg$c20(s1, s2);
|
|
1280
|
-
s0 = s1;
|
|
1281
|
-
} else {
|
|
1282
|
-
peg$currPos = s0;
|
|
1283
|
-
s0 = peg$FAILED;
|
|
1284
|
-
}
|
|
1285
|
-
} else {
|
|
1286
|
-
peg$currPos = s0;
|
|
1287
|
-
s0 = peg$FAILED;
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
return s0;
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
function peg$parsefieldType() {
|
|
1294
|
-
var s0, s1, s2, s3;
|
|
1295
|
-
|
|
1296
|
-
if (input.substr(peg$currPos, 3) === peg$c32) {
|
|
1297
|
-
s0 = peg$c32;
|
|
1298
|
-
peg$currPos += 3;
|
|
1299
|
-
} else {
|
|
1300
|
-
s0 = peg$FAILED;
|
|
1301
|
-
|
|
1302
|
-
if (peg$silentFails === 0) {
|
|
1303
|
-
peg$fail(peg$c33);
|
|
1304
|
-
}
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
if (s0 === peg$FAILED) {
|
|
1308
|
-
if (input.substr(peg$currPos, 4) === peg$c34) {
|
|
1309
|
-
s0 = peg$c34;
|
|
1310
|
-
peg$currPos += 4;
|
|
1311
|
-
} else {
|
|
1312
|
-
s0 = peg$FAILED;
|
|
1313
|
-
|
|
1314
|
-
if (peg$silentFails === 0) {
|
|
1315
|
-
peg$fail(peg$c35);
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
if (s0 === peg$FAILED) {
|
|
1320
|
-
if (input.substr(peg$currPos, 5) === peg$c36) {
|
|
1321
|
-
s0 = peg$c36;
|
|
1322
|
-
peg$currPos += 5;
|
|
1323
|
-
} else {
|
|
1324
|
-
s0 = peg$FAILED;
|
|
1325
|
-
|
|
1326
|
-
if (peg$silentFails === 0) {
|
|
1327
|
-
peg$fail(peg$c37);
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
if (s0 === peg$FAILED) {
|
|
1332
|
-
if (input.substr(peg$currPos, 6) === peg$c38) {
|
|
1333
|
-
s0 = peg$c38;
|
|
1334
|
-
peg$currPos += 6;
|
|
1335
|
-
} else {
|
|
1336
|
-
s0 = peg$FAILED;
|
|
1337
|
-
|
|
1338
|
-
if (peg$silentFails === 0) {
|
|
1339
|
-
peg$fail(peg$c39);
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
if (s0 === peg$FAILED) {
|
|
1344
|
-
if (input.substr(peg$currPos, 4) === peg$c40) {
|
|
1345
|
-
s0 = peg$c40;
|
|
1346
|
-
peg$currPos += 4;
|
|
1347
|
-
} else {
|
|
1348
|
-
s0 = peg$FAILED;
|
|
1349
|
-
|
|
1350
|
-
if (peg$silentFails === 0) {
|
|
1351
|
-
peg$fail(peg$c41);
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
if (s0 === peg$FAILED) {
|
|
1356
|
-
if (input.substr(peg$currPos, 5) === peg$c42) {
|
|
1357
|
-
s0 = peg$c42;
|
|
1358
|
-
peg$currPos += 5;
|
|
1359
|
-
} else {
|
|
1360
|
-
s0 = peg$FAILED;
|
|
1361
|
-
|
|
1362
|
-
if (peg$silentFails === 0) {
|
|
1363
|
-
peg$fail(peg$c43);
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
|
|
1367
|
-
if (s0 === peg$FAILED) {
|
|
1368
|
-
if (input.substr(peg$currPos, 5) === peg$c44) {
|
|
1369
|
-
s0 = peg$c44;
|
|
1370
|
-
peg$currPos += 5;
|
|
1371
|
-
} else {
|
|
1372
|
-
s0 = peg$FAILED;
|
|
1373
|
-
|
|
1374
|
-
if (peg$silentFails === 0) {
|
|
1375
|
-
peg$fail(peg$c45);
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
if (s0 === peg$FAILED) {
|
|
1380
|
-
if (input.substr(peg$currPos, 4) === peg$c46) {
|
|
1381
|
-
s0 = peg$c46;
|
|
1382
|
-
peg$currPos += 4;
|
|
1383
|
-
} else {
|
|
1384
|
-
s0 = peg$FAILED;
|
|
1385
|
-
|
|
1386
|
-
if (peg$silentFails === 0) {
|
|
1387
|
-
peg$fail(peg$c47);
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
if (s0 === peg$FAILED) {
|
|
1392
|
-
if (input.substr(peg$currPos, 6) === peg$c48) {
|
|
1393
|
-
s0 = peg$c48;
|
|
1394
|
-
peg$currPos += 6;
|
|
1395
|
-
} else {
|
|
1396
|
-
s0 = peg$FAILED;
|
|
1397
|
-
|
|
1398
|
-
if (peg$silentFails === 0) {
|
|
1399
|
-
peg$fail(peg$c49);
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
if (s0 === peg$FAILED) {
|
|
1404
|
-
if (input.substr(peg$currPos, 7) === peg$c50) {
|
|
1405
|
-
s0 = peg$c50;
|
|
1406
|
-
peg$currPos += 7;
|
|
1407
|
-
} else {
|
|
1408
|
-
s0 = peg$FAILED;
|
|
1409
|
-
|
|
1410
|
-
if (peg$silentFails === 0) {
|
|
1411
|
-
peg$fail(peg$c51);
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
if (s0 === peg$FAILED) {
|
|
1416
|
-
if (input.substr(peg$currPos, 4) === peg$c52) {
|
|
1417
|
-
s0 = peg$c52;
|
|
1418
|
-
peg$currPos += 4;
|
|
1419
|
-
} else {
|
|
1420
|
-
s0 = peg$FAILED;
|
|
1421
|
-
|
|
1422
|
-
if (peg$silentFails === 0) {
|
|
1423
|
-
peg$fail(peg$c53);
|
|
1424
|
-
}
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
if (s0 === peg$FAILED) {
|
|
1428
|
-
if (input.substr(peg$currPos, 6) === peg$c54) {
|
|
1429
|
-
s0 = peg$c54;
|
|
1430
|
-
peg$currPos += 6;
|
|
1431
|
-
} else {
|
|
1432
|
-
s0 = peg$FAILED;
|
|
1433
|
-
|
|
1434
|
-
if (peg$silentFails === 0) {
|
|
1435
|
-
peg$fail(peg$c55);
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
|
-
if (s0 === peg$FAILED) {
|
|
1440
|
-
if (input.substr(peg$currPos, 6) === peg$c56) {
|
|
1441
|
-
s0 = peg$c56;
|
|
1442
|
-
peg$currPos += 6;
|
|
1443
|
-
} else {
|
|
1444
|
-
s0 = peg$FAILED;
|
|
1445
|
-
|
|
1446
|
-
if (peg$silentFails === 0) {
|
|
1447
|
-
peg$fail(peg$c57);
|
|
1448
|
-
}
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
if (s0 === peg$FAILED) {
|
|
1452
|
-
if (input.substr(peg$currPos, 3) === peg$c58) {
|
|
1453
|
-
s0 = peg$c58;
|
|
1454
|
-
peg$currPos += 3;
|
|
1455
|
-
} else {
|
|
1456
|
-
s0 = peg$FAILED;
|
|
1457
|
-
|
|
1458
|
-
if (peg$silentFails === 0) {
|
|
1459
|
-
peg$fail(peg$c59);
|
|
1460
|
-
}
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
if (s0 === peg$FAILED) {
|
|
1464
|
-
s0 = peg$currPos;
|
|
1465
|
-
s1 = peg$parsedeclareType();
|
|
1466
|
-
|
|
1467
|
-
if (s1 !== peg$FAILED) {
|
|
1468
|
-
s2 = peg$parse_();
|
|
1469
|
-
|
|
1470
|
-
if (s2 !== peg$FAILED) {
|
|
1471
|
-
s3 = peg$parsedeclareName();
|
|
1472
|
-
|
|
1473
|
-
if (s3 !== peg$FAILED) {
|
|
1474
|
-
peg$savedPos = s0;
|
|
1475
|
-
s1 = peg$c60(s1, s3);
|
|
1476
|
-
s0 = s1;
|
|
1477
|
-
} else {
|
|
1478
|
-
peg$currPos = s0;
|
|
1479
|
-
s0 = peg$FAILED;
|
|
1480
|
-
}
|
|
1481
|
-
} else {
|
|
1482
|
-
peg$currPos = s0;
|
|
1483
|
-
s0 = peg$FAILED;
|
|
1484
|
-
}
|
|
1485
|
-
} else {
|
|
1486
|
-
peg$currPos = s0;
|
|
1487
|
-
s0 = peg$FAILED;
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
}
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
return s0;
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
function peg$parsefieldSize() {
|
|
1508
|
-
var s0;
|
|
1509
|
-
s0 = peg$parsenumber();
|
|
1510
|
-
|
|
1511
|
-
if (s0 === peg$FAILED) {
|
|
1512
|
-
s0 = peg$parsename();
|
|
1513
|
-
}
|
|
1514
|
-
|
|
1515
|
-
return s0;
|
|
1516
|
-
}
|
|
1517
|
-
|
|
1518
|
-
function peg$parsename() {
|
|
1519
|
-
var s0, s1, s2, s3, s4;
|
|
1520
|
-
s0 = peg$currPos;
|
|
1521
|
-
s1 = peg$currPos;
|
|
1522
|
-
|
|
1523
|
-
if (peg$c61.test(input.charAt(peg$currPos))) {
|
|
1524
|
-
s2 = input.charAt(peg$currPos);
|
|
1525
|
-
peg$currPos++;
|
|
1526
|
-
} else {
|
|
1527
|
-
s2 = peg$FAILED;
|
|
1528
|
-
|
|
1529
|
-
if (peg$silentFails === 0) {
|
|
1530
|
-
peg$fail(peg$c62);
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
if (s2 !== peg$FAILED) {
|
|
1535
|
-
s3 = [];
|
|
1536
|
-
|
|
1537
|
-
if (peg$c63.test(input.charAt(peg$currPos))) {
|
|
1538
|
-
s4 = input.charAt(peg$currPos);
|
|
1539
|
-
peg$currPos++;
|
|
1540
|
-
} else {
|
|
1541
|
-
s4 = peg$FAILED;
|
|
1542
|
-
|
|
1543
|
-
if (peg$silentFails === 0) {
|
|
1544
|
-
peg$fail(peg$c64);
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
while (s4 !== peg$FAILED) {
|
|
1549
|
-
s3.push(s4);
|
|
1550
|
-
|
|
1551
|
-
if (peg$c63.test(input.charAt(peg$currPos))) {
|
|
1552
|
-
s4 = input.charAt(peg$currPos);
|
|
1553
|
-
peg$currPos++;
|
|
1554
|
-
} else {
|
|
1555
|
-
s4 = peg$FAILED;
|
|
1556
|
-
|
|
1557
|
-
if (peg$silentFails === 0) {
|
|
1558
|
-
peg$fail(peg$c64);
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
if (s3 !== peg$FAILED) {
|
|
1564
|
-
s2 = [s2, s3];
|
|
1565
|
-
s1 = s2;
|
|
1566
|
-
} else {
|
|
1567
|
-
peg$currPos = s1;
|
|
1568
|
-
s1 = peg$FAILED;
|
|
1569
|
-
}
|
|
1570
|
-
} else {
|
|
1571
|
-
peg$currPos = s1;
|
|
1572
|
-
s1 = peg$FAILED;
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
if (s1 !== peg$FAILED) {
|
|
1576
|
-
peg$savedPos = s0;
|
|
1577
|
-
s1 = peg$c65(s1);
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
|
-
s0 = s1;
|
|
1581
|
-
return s0;
|
|
1582
|
-
}
|
|
1583
|
-
|
|
1584
|
-
function peg$parsequotedString() {
|
|
1585
|
-
var s0, s1, s2, s3;
|
|
1586
|
-
s0 = peg$currPos;
|
|
1587
|
-
|
|
1588
|
-
if (input.charCodeAt(peg$currPos) === 34) {
|
|
1589
|
-
s1 = peg$c66;
|
|
1590
|
-
peg$currPos++;
|
|
1591
|
-
} else {
|
|
1592
|
-
s1 = peg$FAILED;
|
|
1593
|
-
|
|
1594
|
-
if (peg$silentFails === 0) {
|
|
1595
|
-
peg$fail(peg$c67);
|
|
1596
|
-
}
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
if (s1 !== peg$FAILED) {
|
|
1600
|
-
s2 = [];
|
|
1601
|
-
|
|
1602
|
-
if (peg$c68.test(input.charAt(peg$currPos))) {
|
|
1603
|
-
s3 = input.charAt(peg$currPos);
|
|
1604
|
-
peg$currPos++;
|
|
1605
|
-
} else {
|
|
1606
|
-
s3 = peg$FAILED;
|
|
1607
|
-
|
|
1608
|
-
if (peg$silentFails === 0) {
|
|
1609
|
-
peg$fail(peg$c69);
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
while (s3 !== peg$FAILED) {
|
|
1614
|
-
s2.push(s3);
|
|
1615
|
-
|
|
1616
|
-
if (peg$c68.test(input.charAt(peg$currPos))) {
|
|
1617
|
-
s3 = input.charAt(peg$currPos);
|
|
1618
|
-
peg$currPos++;
|
|
1619
|
-
} else {
|
|
1620
|
-
s3 = peg$FAILED;
|
|
1621
|
-
|
|
1622
|
-
if (peg$silentFails === 0) {
|
|
1623
|
-
peg$fail(peg$c69);
|
|
1624
|
-
}
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
if (s2 !== peg$FAILED) {
|
|
1629
|
-
if (input.charCodeAt(peg$currPos) === 34) {
|
|
1630
|
-
s3 = peg$c66;
|
|
1631
|
-
peg$currPos++;
|
|
1632
|
-
} else {
|
|
1633
|
-
s3 = peg$FAILED;
|
|
1634
|
-
|
|
1635
|
-
if (peg$silentFails === 0) {
|
|
1636
|
-
peg$fail(peg$c67);
|
|
1637
|
-
}
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
if (s3 !== peg$FAILED) {
|
|
1641
|
-
peg$savedPos = s0;
|
|
1642
|
-
s1 = peg$c70(s2);
|
|
1643
|
-
s0 = s1;
|
|
1644
|
-
} else {
|
|
1645
|
-
peg$currPos = s0;
|
|
1646
|
-
s0 = peg$FAILED;
|
|
1647
|
-
}
|
|
1648
|
-
} else {
|
|
1649
|
-
peg$currPos = s0;
|
|
1650
|
-
s0 = peg$FAILED;
|
|
1651
|
-
}
|
|
1652
|
-
} else {
|
|
1653
|
-
peg$currPos = s0;
|
|
1654
|
-
s0 = peg$FAILED;
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
return s0;
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
function peg$parsenonQuotedString() {
|
|
1661
|
-
var s0, s1, s2;
|
|
1662
|
-
s0 = peg$currPos;
|
|
1663
|
-
s1 = [];
|
|
1664
|
-
|
|
1665
|
-
if (peg$c71.test(input.charAt(peg$currPos))) {
|
|
1666
|
-
s2 = input.charAt(peg$currPos);
|
|
1667
|
-
peg$currPos++;
|
|
1668
|
-
} else {
|
|
1669
|
-
s2 = peg$FAILED;
|
|
1670
|
-
|
|
1671
|
-
if (peg$silentFails === 0) {
|
|
1672
|
-
peg$fail(peg$c72);
|
|
1673
|
-
}
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
while (s2 !== peg$FAILED) {
|
|
1677
|
-
s1.push(s2);
|
|
1678
|
-
|
|
1679
|
-
if (peg$c71.test(input.charAt(peg$currPos))) {
|
|
1680
|
-
s2 = input.charAt(peg$currPos);
|
|
1681
|
-
peg$currPos++;
|
|
1682
|
-
} else {
|
|
1683
|
-
s2 = peg$FAILED;
|
|
1684
|
-
|
|
1685
|
-
if (peg$silentFails === 0) {
|
|
1686
|
-
peg$fail(peg$c72);
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
if (s1 !== peg$FAILED) {
|
|
1692
|
-
peg$savedPos = s0;
|
|
1693
|
-
s1 = peg$c73(s1);
|
|
1694
|
-
}
|
|
1695
|
-
|
|
1696
|
-
s0 = s1;
|
|
1697
|
-
return s0;
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
function peg$parsenumber() {
|
|
1701
|
-
var s0, s1, s2, s3;
|
|
1702
|
-
peg$silentFails++;
|
|
1703
|
-
s0 = peg$currPos;
|
|
1704
|
-
s1 = peg$parse_();
|
|
1705
|
-
|
|
1706
|
-
if (s1 !== peg$FAILED) {
|
|
1707
|
-
s2 = [];
|
|
1708
|
-
|
|
1709
|
-
if (peg$c75.test(input.charAt(peg$currPos))) {
|
|
1710
|
-
s3 = input.charAt(peg$currPos);
|
|
1711
|
-
peg$currPos++;
|
|
1712
|
-
} else {
|
|
1713
|
-
s3 = peg$FAILED;
|
|
1714
|
-
|
|
1715
|
-
if (peg$silentFails === 0) {
|
|
1716
|
-
peg$fail(peg$c76);
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
|
-
if (s3 !== peg$FAILED) {
|
|
1721
|
-
while (s3 !== peg$FAILED) {
|
|
1722
|
-
s2.push(s3);
|
|
1723
|
-
|
|
1724
|
-
if (peg$c75.test(input.charAt(peg$currPos))) {
|
|
1725
|
-
s3 = input.charAt(peg$currPos);
|
|
1726
|
-
peg$currPos++;
|
|
1727
|
-
} else {
|
|
1728
|
-
s3 = peg$FAILED;
|
|
1729
|
-
|
|
1730
|
-
if (peg$silentFails === 0) {
|
|
1731
|
-
peg$fail(peg$c76);
|
|
1732
|
-
}
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
} else {
|
|
1736
|
-
s2 = peg$FAILED;
|
|
1737
|
-
}
|
|
1738
|
-
|
|
1739
|
-
if (s2 !== peg$FAILED) {
|
|
1740
|
-
peg$savedPos = s0;
|
|
1741
|
-
s1 = peg$c77();
|
|
1742
|
-
s0 = s1;
|
|
1743
|
-
} else {
|
|
1744
|
-
peg$currPos = s0;
|
|
1745
|
-
s0 = peg$FAILED;
|
|
1746
|
-
}
|
|
1747
|
-
} else {
|
|
1748
|
-
peg$currPos = s0;
|
|
1749
|
-
s0 = peg$FAILED;
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
peg$silentFails--;
|
|
1753
|
-
|
|
1754
|
-
if (s0 === peg$FAILED) {
|
|
1755
|
-
s1 = peg$FAILED;
|
|
1756
|
-
|
|
1757
|
-
if (peg$silentFails === 0) {
|
|
1758
|
-
peg$fail(peg$c74);
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
|
-
|
|
1762
|
-
return s0;
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
function peg$parse_() {
|
|
1766
|
-
var s0, s1;
|
|
1767
|
-
peg$silentFails++;
|
|
1768
|
-
s0 = [];
|
|
1769
|
-
|
|
1770
|
-
if (peg$c79.test(input.charAt(peg$currPos))) {
|
|
1771
|
-
s1 = input.charAt(peg$currPos);
|
|
1772
|
-
peg$currPos++;
|
|
1773
|
-
} else {
|
|
1774
|
-
s1 = peg$FAILED;
|
|
1775
|
-
|
|
1776
|
-
if (peg$silentFails === 0) {
|
|
1777
|
-
peg$fail(peg$c80);
|
|
1778
|
-
}
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
while (s1 !== peg$FAILED) {
|
|
1782
|
-
s0.push(s1);
|
|
1783
|
-
|
|
1784
|
-
if (peg$c79.test(input.charAt(peg$currPos))) {
|
|
1785
|
-
s1 = input.charAt(peg$currPos);
|
|
1786
|
-
peg$currPos++;
|
|
1787
|
-
} else {
|
|
1788
|
-
s1 = peg$FAILED;
|
|
1789
|
-
|
|
1790
|
-
if (peg$silentFails === 0) {
|
|
1791
|
-
peg$fail(peg$c80);
|
|
1792
|
-
}
|
|
1793
|
-
}
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
peg$silentFails--;
|
|
1797
|
-
|
|
1798
|
-
if (s0 === peg$FAILED) {
|
|
1799
|
-
s1 = peg$FAILED;
|
|
1800
|
-
|
|
1801
|
-
if (peg$silentFails === 0) {
|
|
1802
|
-
peg$fail(peg$c78);
|
|
1803
|
-
}
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
return s0;
|
|
1807
|
-
}
|
|
1808
|
-
|
|
1809
|
-
peg$result = peg$startRuleFunction();
|
|
1810
|
-
|
|
1811
|
-
if (peg$result !== peg$FAILED && peg$currPos === input.length) {
|
|
1812
|
-
return peg$result;
|
|
1813
|
-
} else {
|
|
1814
|
-
if (peg$result !== peg$FAILED && peg$currPos < input.length) {
|
|
1815
|
-
peg$fail(peg$endExpectation());
|
|
1816
|
-
}
|
|
1817
|
-
|
|
1818
|
-
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));
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
module.exports = {
|
|
1823
|
-
SyntaxError: peg$SyntaxError,
|
|
1824
|
-
parse: peg$parse
|
|
1825
|
-
};
|
|
1826
|
-
|
|
1827
|
-
/***/ }),
|
|
1828
|
-
/* 1 */
|
|
1829
|
-
/***/ (function(module, exports) {
|
|
1830
|
-
|
|
1831
|
-
function _classCallCheck(instance, Constructor) {
|
|
1832
|
-
if (!(instance instanceof Constructor)) {
|
|
1833
|
-
throw new TypeError("Cannot call a class as a function");
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
module.exports = _classCallCheck;
|
|
1838
|
-
|
|
1839
|
-
/***/ }),
|
|
1840
|
-
/* 2 */
|
|
1841
|
-
/***/ (function(module, exports) {
|
|
1842
|
-
|
|
1843
|
-
function _defineProperties(target, props) {
|
|
1844
|
-
for (var i = 0; i < props.length; i++) {
|
|
1845
|
-
var descriptor = props[i];
|
|
1846
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
1847
|
-
descriptor.configurable = true;
|
|
1848
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
1849
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1850
|
-
}
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
1854
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1855
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1856
|
-
return Constructor;
|
|
1857
|
-
}
|
|
1858
|
-
|
|
1859
|
-
module.exports = _createClass;
|
|
1860
|
-
|
|
1861
|
-
/***/ }),
|
|
1862
|
-
/* 3 */
|
|
1863
|
-
/***/ (function(module, exports) {
|
|
1864
|
-
|
|
1865
|
-
function _defineProperty(obj, key, value) {
|
|
1866
|
-
if (key in obj) {
|
|
1867
|
-
Object.defineProperty(obj, key, {
|
|
1868
|
-
value: value,
|
|
1869
|
-
enumerable: true,
|
|
1870
|
-
configurable: true,
|
|
1871
|
-
writable: true
|
|
1872
|
-
});
|
|
1873
|
-
} else {
|
|
1874
|
-
obj[key] = value;
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
return obj;
|
|
1878
|
-
}
|
|
1879
|
-
|
|
1880
|
-
module.exports = _defineProperty;
|
|
1881
|
-
|
|
1882
|
-
/***/ }),
|
|
1883
|
-
/* 4 */
|
|
1884
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1885
|
-
|
|
1886
|
-
"use strict";
|
|
1887
|
-
// ESM COMPAT FLAG
|
|
1888
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1889
|
-
|
|
1890
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
|
|
1891
|
-
var classCallCheck = __webpack_require__(1);
|
|
1892
|
-
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
|
|
1893
|
-
|
|
1894
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
|
|
1895
|
-
var createClass = __webpack_require__(2);
|
|
1896
|
-
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
|
|
1897
|
-
|
|
1898
|
-
// EXTERNAL MODULE: ./src/autoSql.js
|
|
1899
|
-
var autoSql = __webpack_require__(0);
|
|
1900
|
-
var autoSql_default = /*#__PURE__*/__webpack_require__.n(autoSql);
|
|
1901
|
-
|
|
1902
|
-
// CONCATENATED MODULE: ./src/as/bigInteract.as
|
|
1903
|
-
/* harmony default export */ var bigInteract = ("table interact\n\"interaction between two regions\"\n (\n string chrom; \"Chromosome (or contig, scaffold, etc.). For interchromosomal, use 2 records\"\n uint chromStart; \"Start position of lower region. For interchromosomal, set to chromStart of this region\"\n uint chromEnd; \"End position of upper region. For interchromosomal, set to chromEnd of this region\"\n string name; \"Name of item, for display. Usually 'sourceName/targetName/exp' or empty\"\n uint score; \"Score (0-1000)\"\n double value; \"Strength of interaction or other data value. Typically basis for score\"\n string exp; \"Experiment name (metadata for filtering). Use . if not applicable\"\n string color; \"Item color. Specified as r,g,b or hexadecimal #RRGGBB or html color name, as in //www.w3.org/TR/css3-color/#html4. Use 0 and spectrum setting to shade by score\"\n string sourceChrom; \"Chromosome of source region (directional) or lower region. For non-directional interchromosomal, chrom of this region.\"\n uint sourceStart; \"Start position in chromosome of source/lower/this region\"\n uint sourceEnd; \"End position in chromosome of source/lower/this region\"\n string sourceName; \"Identifier of source/lower/this region\"\n string sourceStrand; \"Orientation of source/lower/this region: + or -. Use . if not applicable\"\n string targetChrom; \"Chromosome of target region (directional) or upper region. For non-directional interchromosomal, chrom of other region\"\n uint targetStart; \"Start position in chromosome of target/upper/this region\"\n uint targetEnd; \"End position in chromosome of target/upper/this region\"\n string targetName; \"Identifier of target/upper/this region\"\n string targetStrand; \"Orientation of target/upper/this region: + or -. Use . if not applicable\"\n\n )\n");
|
|
1904
|
-
// CONCATENATED MODULE: ./src/as/bigMaf.as
|
|
1905
|
-
/* harmony default export */ var bigMaf = ("table bedMaf\n\"Bed3 with MAF block\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n lstring mafBlock; \"MAF block\"\n )\n");
|
|
1906
|
-
// CONCATENATED MODULE: ./src/as/bigPsl.as
|
|
1907
|
-
/* harmony default export */ var bigPsl = ("table bigPsl\n\"bigPsl pairwise alignment\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name or ID of item, ideally both human readable and unique\"\n uint score; \"Score (0-1000)\"\n char[1] strand; \"+ or - indicates whether the query aligns to the + or - strand on the reference\"\n uint thickStart; \"Start of where display should be thick (start codon)\"\n uint thickEnd; \"End of where display should be thick (stop codon)\"\n uint reserved; \"RGB value (use R,G,B string in input file)\"\n int blockCount; \"Number of blocks\"\n int[blockCount] blockSizes; \"Comma separated list of block sizes\"\n int[blockCount] chromStarts; \"Start positions relative to chromStart\"\n\n uint oChromStart;\"Start position in other chromosome\"\n uint oChromEnd; \"End position in other chromosome\"\n char[1] oStrand; \"+ or -, - means that psl was reversed into BED-compatible coordinates\" \n uint oChromSize; \"Size of other chromosome.\"\n int[blockCount] oChromStarts; \"Start positions relative to oChromStart or from oChromStart+oChromSize depending on strand\"\n\n lstring oSequence; \"Sequence on other chrom (or empty)\"\n string oCDS; \"CDS in NCBI format\"\n\n uint chromSize;\"Size of target chromosome\"\n\n uint match; \"Number of bases matched.\"\n uint misMatch; \" Number of bases that don't match \"\n uint repMatch; \" Number of bases that match but are part of repeats \"\n uint nCount; \" Number of 'N' bases \"\n uint seqType; \"0=empty, 1=nucleotide, 2=amino_acid\"\n )\n\n");
|
|
1908
|
-
// CONCATENATED MODULE: ./src/as/bigNarrowPeak.as
|
|
1909
|
-
/* harmony default export */ var bigNarrowPeak = ("table bigNarrowPeak\n\"BED6+4 Peaks of signal enrichment based on pooled, normalized (interpreted) data.\"\n(\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name;\t \"Name given to a region (preferably unique). Use . if no name is assigned\"\n uint score; \"Indicates how dark the peak will be displayed in the browser (0-1000) \"\n char[1] strand; \"+ or - or . for unknown\"\n float signalValue; \"Measurement of average enrichment for the region\"\n float pValue; \"Statistical significance of signal value (-log10). Set to -1 if not used.\"\n float qValue; \"Statistical significance with multiple-test correction applied (FDR -log10). Set to -1 if not used.\"\n int peak; \"Point-source called for this peak; 0-based offset from chromStart. Set to -1 if no point-source called.\"\n)\n");
|
|
1910
|
-
// CONCATENATED MODULE: ./src/as/bigGenePred.as
|
|
1911
|
-
/* harmony default export */ var bigGenePred = ("table bigGenePred\n\"bigGenePred gene models\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name or ID of item, ideally both human readable and unique\"\n uint score; \"Score (0-1000)\"\n char[1] strand; \"+ or - for strand\"\n uint thickStart; \"Start of where display should be thick (start codon)\"\n uint thickEnd; \"End of where display should be thick (stop codon)\"\n uint reserved; \"RGB value (use R,G,B string in input file)\"\n int blockCount; \"Number of blocks\"\n int[blockCount] blockSizes; \"Comma separated list of block sizes\"\n int[blockCount] chromStarts; \"Start positions relative to chromStart\"\n string name2; \"Alternative/human readable name\"\n string cdsStartStat; \"Status of CDS start annotation (none, unknown, incomplete, or complete)\"\n string cdsEndStat; \"Status of CDS end annotation (none, unknown, incomplete, or complete)\"\n int[blockCount] exonFrames; \"Exon frame {0,1,2}, or -1 if no frame for exon\"\n string type; \"Transcript type\"\n string geneName; \"Primary identifier for gene\"\n string geneName2; \"Alternative/human readable gene name\"\n string geneType; \"Gene type\"\n )\n\n");
|
|
1912
|
-
// CONCATENATED MODULE: ./src/as/bigLink.as
|
|
1913
|
-
/* harmony default export */ var bigLink = ("\n\ntable bigLink\n\"bigLink pairwise alignment\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name or ID of item, ideally both human readable and unique\"\n uint qStart; \"start of alignment on query sequence\"\n )\n\n");
|
|
1914
|
-
// CONCATENATED MODULE: ./src/as/bigChain.as
|
|
1915
|
-
/* harmony default export */ var bigChain = ("\ntable bigChain\n\"bigChain pairwise alignment\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string name; \"Name or ID of item, ideally both human readable and unique\"\n uint score; \"Score (0-1000)\"\n char[1] strand; \"+ or - for strand\"\n uint tSize; \"size of target sequence\"\n string qName; \"name of query sequence\"\n uint qSize; \"size of query sequence\"\n uint qStart; \"start of alignment on query sequence\"\n uint qEnd; \"end of alignment on query sequence\"\n uint chainScore; \"score from chain\"\n )\n\n");
|
|
1916
|
-
// CONCATENATED MODULE: ./src/as/mafFrames.as
|
|
1917
|
-
/* harmony default export */ var mafFrames = ("table mafFrames\n\"codon frame assignment for MAF components\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start range in chromosome\"\n uint chromEnd; \"End range in chromosome\"\n string src; \"Name of sequence source in MAF\"\n ubyte frame; \"frame (0,1,2) for first base(+) or last bast(-)\"\n char[1] strand; \"+ or -\"\n string name; \"Name of gene used to define frame\"\n int prevFramePos; \"target position of the previous base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous\"\n int nextFramePos; \"target position of the next base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous\"\n ubyte isExonStart; \"does this start the CDS portion of an exon?\"\n ubyte isExonEnd; \"does this end the CDS portion of an exon?\"\n )\n");
|
|
1918
|
-
// CONCATENATED MODULE: ./src/as/mafSummary.as
|
|
1919
|
-
/* harmony default export */ var mafSummary = ("table mafSummary\n\"Positions and scores for alignment blocks\"\n (\n string chrom; \"Reference sequence chromosome or scaffold\"\n uint chromStart; \"Start position in chromosome\"\n uint chromEnd; \"End position in chromosome\"\n string src; \"Sequence name or database of alignment\"\n float score; \"Floating point score.\"\n char[1] leftStatus; \"Gap/break annotation for preceding block\"\n char[1] rightStatus; \"Gap/break annotation for following block\"\n )\n");
|
|
1920
|
-
// CONCATENATED MODULE: ./src/as/defaultBedSchema.as
|
|
1921
|
-
/* harmony default export */ var defaultBedSchema = ("table defaultBedSchema\n\"BED12\"\n (\n string chrom; \"The name of the chromosome (e.g. chr3, chrY, chr2_random) or scaffold (e.g. scaffold10671).\"\n uint chromStart; \"The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered 0.\"\n uint chromEnd; \"The ending position of the feature in the chromosome or scaffold. The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99.\"\n string name; \"Defines the name of the BED line.\"\n float score; \"Feature score, doesn't care about the 0-1000 limit as in bed\"\n char strand; \"Defines the strand. Either '.' (=no strand) or '+' or '-'\"\n uint thickStart; \"The starting position at which the feature is drawn thickly (for example, the start codon in gene displays). When there is no thick part, thickStart and thickEnd are usually set to the chromStart position.\"\n uint thickEnd; \"The ending position at which the feature is drawn thickly (for example the stop codon in gene displays).\"\n string itemRgb; \"An RGB value of the form R,G,B (e.g. 255,0,0). \"\n uint blockCount; \" The number of blocks (exons) in the BED line.\"\n uint[blockCount] blockSizes; \" A comma-separated list of the block sizes. The number of items in this list should correspond to blockCount.\"\n uint[blockCount] blockStarts; \"A comma-separated list of block starts. All of the blockStart positions should be calculated relative to chromStart. The number of items in this list should correspond to blockCount.\"\n )\n");
|
|
1922
|
-
// CONCATENATED MODULE: ./src/defaultTypes.js
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
var types = {
|
|
1935
|
-
bigInteract: bigInteract,
|
|
1936
|
-
bigMaf: bigMaf,
|
|
1937
|
-
bigPsl: bigPsl,
|
|
1938
|
-
bigNarrowPeak: bigNarrowPeak,
|
|
1939
|
-
bigGenePred: bigGenePred,
|
|
1940
|
-
bigLink: bigLink,
|
|
1941
|
-
bigChain: bigChain,
|
|
1942
|
-
mafFrames: mafFrames,
|
|
1943
|
-
mafSummary: mafSummary,
|
|
1944
|
-
defaultBedSchema: defaultBedSchema
|
|
1945
|
-
};
|
|
1946
|
-
Object.keys(types).forEach(function (k) {
|
|
1947
|
-
types[k] = autoSql_default.a.parse(types[k].trim());
|
|
1948
|
-
});
|
|
1949
|
-
/* harmony default export */ var defaultTypes = (types);
|
|
1950
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
|
|
1951
|
-
var defineProperty = __webpack_require__(3);
|
|
1952
|
-
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
|
1953
|
-
|
|
1954
|
-
// CONCATENATED MODULE: ./src/util.js
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
1958
|
-
|
|
1959
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
1960
|
-
|
|
1961
|
-
/*
|
|
1962
|
-
* adds some type annotations to the autoSql schema
|
|
1963
|
-
* for numeric fields ['uint', 'int', 'float', 'long'] "isNumeric" is added
|
|
1964
|
-
* for array types "isArray" is added
|
|
1965
|
-
* for numeric array types "isArray" and "arrayIsNumeric" is set
|
|
1966
|
-
*
|
|
1967
|
-
* @param autoSql - an autoSql schema from the peg parser
|
|
1968
|
-
* @return autoSql with type annotations added
|
|
1969
|
-
*/
|
|
1970
|
-
function detectTypes(autoSql) {
|
|
1971
|
-
var numericTypes = ['uint', 'int', 'float', 'long'];
|
|
1972
|
-
var fields = autoSql.fields.map(function (autoField) {
|
|
1973
|
-
var type = {};
|
|
1974
|
-
|
|
1975
|
-
if (!autoField.size && numericTypes.includes(autoField.type)) {
|
|
1976
|
-
type.isNumeric = true;
|
|
1977
|
-
}
|
|
1978
|
-
|
|
1979
|
-
if (autoField.size && autoField.type !== 'char') {
|
|
1980
|
-
type.isArray = true;
|
|
1981
|
-
}
|
|
1982
|
-
|
|
1983
|
-
if (autoField.size && numericTypes.includes(autoField.type)) {
|
|
1984
|
-
type.arrayIsNumeric = true;
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
return _objectSpread(_objectSpread({}, autoField), type);
|
|
1988
|
-
});
|
|
1989
|
-
return _objectSpread(_objectSpread({}, autoSql), {}, {
|
|
1990
|
-
fields: fields
|
|
1991
|
-
});
|
|
1992
|
-
}
|
|
1993
|
-
// CONCATENATED MODULE: ./src/parse.js
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
var parse_BED = /*#__PURE__*/function () {
|
|
2001
|
-
function BED() {
|
|
2002
|
-
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2003
|
-
|
|
2004
|
-
classCallCheck_default()(this, BED);
|
|
2005
|
-
|
|
2006
|
-
if (args.autoSql) {
|
|
2007
|
-
this.autoSql = detectTypes(autoSql_default.a.parse(args.autoSql));
|
|
2008
|
-
} else if (args.type) {
|
|
2009
|
-
this.autoSql = detectTypes(defaultTypes[args.type] || function (e) {
|
|
2010
|
-
throw e;
|
|
2011
|
-
}(new Error('Type not found')));
|
|
2012
|
-
} else {
|
|
2013
|
-
this.autoSql = detectTypes(defaultTypes.defaultBedSchema);
|
|
2014
|
-
}
|
|
2015
|
-
}
|
|
2016
|
-
/*
|
|
2017
|
-
* parses a line of text as a BED line with the loaded autoSql schema
|
|
2018
|
-
*
|
|
2019
|
-
* @param line - a BED line as tab delimited text or array
|
|
2020
|
-
* @param opts - supply opts.uniqueId
|
|
2021
|
-
* @return a object representing a feature
|
|
2022
|
-
*/
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
createClass_default()(BED, [{
|
|
2026
|
-
key: "parseLine",
|
|
2027
|
-
value: function parseLine(line) {
|
|
2028
|
-
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2029
|
-
var autoSql = this.autoSql;
|
|
2030
|
-
var uniqueId = opts.uniqueId;
|
|
2031
|
-
var fields = line;
|
|
2032
|
-
|
|
2033
|
-
if (!Array.isArray(line)) {
|
|
2034
|
-
if (line.startsWith('track') || line.startsWith('browser')) {
|
|
2035
|
-
throw new Error("track and browser line parsing is not supported, please filter:\n".concat(line));
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
fields = line.split('\t');
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
|
-
var featureData = {};
|
|
2042
|
-
|
|
2043
|
-
if (uniqueId) {
|
|
2044
|
-
featureData.uniqueId = uniqueId;
|
|
2045
|
-
}
|
|
2046
|
-
|
|
2047
|
-
for (var i = 0; i < autoSql.fields.length; i += 1) {
|
|
2048
|
-
var autoField = autoSql.fields[i];
|
|
2049
|
-
var columnVal = fields[i];
|
|
2050
|
-
var isNumeric = autoField.isNumeric,
|
|
2051
|
-
isArray = autoField.isArray,
|
|
2052
|
-
arrayIsNumeric = autoField.arrayIsNumeric,
|
|
2053
|
-
name = autoField.name;
|
|
2054
|
-
|
|
2055
|
-
if (columnVal === null || columnVal === undefined) {
|
|
2056
|
-
break;
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
if (columnVal !== '.') {
|
|
2060
|
-
if (isNumeric) {
|
|
2061
|
-
var num = Number(columnVal); // if the number parse results in NaN, somebody probably
|
|
2062
|
-
// listed the type erroneously as numeric, so don't use
|
|
2063
|
-
// the parsed number
|
|
2064
|
-
|
|
2065
|
-
columnVal = Number.isNaN(num) ? columnVal : num;
|
|
2066
|
-
} else if (isArray) {
|
|
2067
|
-
// parse array values
|
|
2068
|
-
columnVal = columnVal.split(',');
|
|
2069
|
-
if (columnVal[columnVal.length - 1] === '') columnVal.pop();
|
|
2070
|
-
if (arrayIsNumeric) columnVal = columnVal.map(function (str) {
|
|
2071
|
-
return Number(str);
|
|
2072
|
-
});
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
|
-
featureData[name] = columnVal;
|
|
2076
|
-
}
|
|
2077
|
-
}
|
|
2078
|
-
|
|
2079
|
-
if (featureData.chrom) {
|
|
2080
|
-
featureData.chrom = decodeURIComponent(featureData.chrom);
|
|
2081
|
-
}
|
|
2082
|
-
|
|
2083
|
-
featureData.strand = {
|
|
2084
|
-
'.': 0,
|
|
2085
|
-
'-': -1,
|
|
2086
|
-
'+': 1
|
|
2087
|
-
}[featureData.strand] || 0;
|
|
2088
|
-
return featureData;
|
|
2089
|
-
}
|
|
2090
|
-
}]);
|
|
2091
|
-
|
|
2092
|
-
return BED;
|
|
2093
|
-
}();
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
// CONCATENATED MODULE: ./src/index.js
|
|
2097
|
-
/** @module BED */
|
|
2098
|
-
|
|
2099
|
-
/* harmony default export */ var src = __webpack_exports__["default"] = (parse_BED);
|
|
2100
|
-
|
|
2101
|
-
/***/ })
|
|
2102
|
-
/******/ ]);
|