5777 lines
255 KiB
JavaScript
5777 lines
255 KiB
JavaScript
|
/*
|
||
|
* Generated by PEG.js 0.10.0.
|
||
|
*
|
||
|
* http://pegjs.org/
|
||
|
*/
|
||
|
|
||
|
"use strict";
|
||
|
|
||
|
function peg$subclass(child, parent) {
|
||
|
function ctor() { this.constructor = child; }
|
||
|
ctor.prototype = parent.prototype;
|
||
|
child.prototype = new ctor();
|
||
|
}
|
||
|
|
||
|
function peg$SyntaxError(message, expected, found, location) {
|
||
|
this.message = message;
|
||
|
this.expected = expected;
|
||
|
this.found = found;
|
||
|
this.location = location;
|
||
|
this.name = "SyntaxError";
|
||
|
|
||
|
if (typeof Error.captureStackTrace === "function") {
|
||
|
Error.captureStackTrace(this, peg$SyntaxError);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
peg$subclass(peg$SyntaxError, Error);
|
||
|
|
||
|
peg$SyntaxError.buildMessage = function(expected, found) {
|
||
|
var DESCRIBE_EXPECTATION_FNS = {
|
||
|
literal: function(expectation) {
|
||
|
return "\"" + literalEscape(expectation.text) + "\"";
|
||
|
},
|
||
|
|
||
|
"class": function(expectation) {
|
||
|
var escapedParts = "",
|
||
|
i;
|
||
|
|
||
|
for (i = 0; i < expectation.parts.length; i++) {
|
||
|
escapedParts += expectation.parts[i] instanceof Array
|
||
|
? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1])
|
||
|
: classEscape(expectation.parts[i]);
|
||
|
}
|
||
|
|
||
|
return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
|
||
|
},
|
||
|
|
||
|
any: function(expectation) {
|
||
|
return "any character";
|
||
|
},
|
||
|
|
||
|
end: function(expectation) {
|
||
|
return "end of input";
|
||
|
},
|
||
|
|
||
|
other: function(expectation) {
|
||
|
return expectation.description;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
function hex(ch) {
|
||
|
return ch.charCodeAt(0).toString(16).toUpperCase();
|
||
|
}
|
||
|
|
||
|
function literalEscape(s) {
|
||
|
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) { return '\\x0' + hex(ch); })
|
||
|
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); });
|
||
|
}
|
||
|
|
||
|
function classEscape(s) {
|
||
|
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) { return '\\x0' + hex(ch); })
|
||
|
.replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); });
|
||
|
}
|
||
|
|
||
|
function describeExpectation(expectation) {
|
||
|
return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
|
||
|
}
|
||
|
|
||
|
function describeExpected(expected) {
|
||
|
var descriptions = new Array(expected.length),
|
||
|
i, j;
|
||
|
|
||
|
for (i = 0; i < expected.length; i++) {
|
||
|
descriptions[i] = describeExpectation(expected[i]);
|
||
|
}
|
||
|
|
||
|
descriptions.sort();
|
||
|
|
||
|
if (descriptions.length > 0) {
|
||
|
for (i = 1, j = 1; i < descriptions.length; i++) {
|
||
|
if (descriptions[i - 1] !== descriptions[i]) {
|
||
|
descriptions[j] = descriptions[i];
|
||
|
j++;
|
||
|
}
|
||
|
}
|
||
|
descriptions.length = j;
|
||
|
}
|
||
|
|
||
|
switch (descriptions.length) {
|
||
|
case 1:
|
||
|
return descriptions[0];
|
||
|
|
||
|
case 2:
|
||
|
return descriptions[0] + " or " + descriptions[1];
|
||
|
|
||
|
default:
|
||
|
return descriptions.slice(0, -1).join(", ")
|
||
|
+ ", or "
|
||
|
+ descriptions[descriptions.length - 1];
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function describeFound(found) {
|
||
|
return found ? "\"" + literalEscape(found) + "\"" : "end of input";
|
||
|
}
|
||
|
|
||
|
return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
|
||
|
};
|
||
|
|
||
|
function peg$parse(input, options) {
|
||
|
options = options !== void 0 ? options : {};
|
||
|
|
||
|
var peg$FAILED = {},
|
||
|
|
||
|
peg$startRuleFunctions = { TypeExpression: peg$parseTypeExpression },
|
||
|
peg$startRuleFunction = peg$parseTypeExpression,
|
||
|
|
||
|
peg$c0 = function(r, unk) {
|
||
|
var result = unk;
|
||
|
|
||
|
if (r) {
|
||
|
result = repeatable(result);
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c1 = "?",
|
||
|
peg$c2 = peg$literalExpectation("?", false),
|
||
|
peg$c3 = "!",
|
||
|
peg$c4 = peg$literalExpectation("!", false),
|
||
|
peg$c5 = function(r, prefix, expr) {
|
||
|
var result = expr;
|
||
|
|
||
|
if (r) {
|
||
|
result = repeatable(result);
|
||
|
}
|
||
|
|
||
|
return nullable(result, prefix);
|
||
|
},
|
||
|
peg$c6 = function(expr, optionalPre, postfix, optionalPost) {
|
||
|
var result = expr;
|
||
|
|
||
|
// we only allow one optional operator
|
||
|
if (optionalPre && optionalPost) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
// "non-nullable, yet optional" makes no sense, but we allow it
|
||
|
result = nullable(result, postfix);
|
||
|
|
||
|
if (optionalPre || optionalPost) {
|
||
|
result = optional(result);
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c7 = function(expr, postfix) {
|
||
|
return nullable(expr, postfix);
|
||
|
},
|
||
|
peg$c8 = function(prefix, expr) {
|
||
|
prefix = prefix || '';
|
||
|
|
||
|
return nullable(expr, prefix);
|
||
|
},
|
||
|
peg$c9 = function(expr, postfix) {
|
||
|
postfix = postfix || '';
|
||
|
|
||
|
return nullable(expr, postfix);
|
||
|
},
|
||
|
peg$c10 = function(expr) {
|
||
|
return repeatable(expr);
|
||
|
},
|
||
|
peg$c11 = function(lit, opt) {
|
||
|
var result = lit;
|
||
|
|
||
|
if (opt) {
|
||
|
result = optional(result);
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c12 = function(lit) {
|
||
|
return repeatable(lit);
|
||
|
},
|
||
|
peg$c13 = "*",
|
||
|
peg$c14 = peg$literalExpectation("*", false),
|
||
|
peg$c15 = function() {
|
||
|
return {
|
||
|
type: Types.AllLiteral
|
||
|
};
|
||
|
},
|
||
|
peg$c16 = function() {
|
||
|
return {
|
||
|
type: Types.NullLiteral
|
||
|
};
|
||
|
},
|
||
|
peg$c17 = function() {
|
||
|
return {
|
||
|
type: Types.UndefinedLiteral
|
||
|
};
|
||
|
},
|
||
|
peg$c18 = "...",
|
||
|
peg$c19 = peg$literalExpectation("...", false),
|
||
|
peg$c20 = function() {
|
||
|
return {
|
||
|
repeatable: true
|
||
|
};
|
||
|
},
|
||
|
peg$c21 = "=",
|
||
|
peg$c22 = peg$literalExpectation("=", false),
|
||
|
peg$c23 = function() {
|
||
|
return {
|
||
|
optional: true
|
||
|
};
|
||
|
},
|
||
|
peg$c24 = "[]",
|
||
|
peg$c25 = peg$literalExpectation("[]", false),
|
||
|
peg$c26 = function(name, brackets) {
|
||
|
var result;
|
||
|
|
||
|
function nest(obj) {
|
||
|
return {
|
||
|
type: Types.TypeApplication,
|
||
|
expression: {
|
||
|
type: Types.NameExpression,
|
||
|
name: 'Array'
|
||
|
},
|
||
|
applications: [obj]
|
||
|
};
|
||
|
}
|
||
|
|
||
|
// we only allow this if JSDoc parsing is enabled
|
||
|
if (!options.jsdoc) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
result = nest(name);
|
||
|
result.applications[0].type = Types.NameExpression;
|
||
|
|
||
|
for (var i = 0, l = brackets.length - 1; i < l; i++) {
|
||
|
result = nest(result);
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c27 = function(exp, appl, opt) {
|
||
|
var result = {};
|
||
|
|
||
|
var nameExp = {
|
||
|
type: Types.NameExpression,
|
||
|
name: exp.name
|
||
|
};
|
||
|
|
||
|
if (appl && appl.length) {
|
||
|
result.type = Types.TypeApplication;
|
||
|
result.expression = nameExp;
|
||
|
result.applications = appl;
|
||
|
} else {
|
||
|
result = nameExp;
|
||
|
}
|
||
|
|
||
|
if (opt) {
|
||
|
result = optional(result);
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c28 = function(t) {
|
||
|
return repeatable(t);
|
||
|
},
|
||
|
peg$c29 = function(exp, opt) {
|
||
|
var result = {
|
||
|
type: Types.NameExpression,
|
||
|
name: exp.name,
|
||
|
reservedWord: true
|
||
|
};
|
||
|
|
||
|
if (opt) {
|
||
|
result = optional(result);
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c30 = ".",
|
||
|
peg$c31 = peg$literalExpectation(".", false),
|
||
|
peg$c32 = "<",
|
||
|
peg$c33 = peg$literalExpectation("<", false),
|
||
|
peg$c34 = ">",
|
||
|
peg$c35 = peg$literalExpectation(">", false),
|
||
|
peg$c36 = function(sep, l) {
|
||
|
return l;
|
||
|
},
|
||
|
peg$c37 = ",",
|
||
|
peg$c38 = peg$literalExpectation(",", false),
|
||
|
peg$c39 = function(expr, list) {
|
||
|
var result = [expr];
|
||
|
for (var i = 0, l = list.length; i < l; i++) {
|
||
|
result.push(list[i][3]);
|
||
|
}
|
||
|
return result;
|
||
|
},
|
||
|
peg$c40 = function() {
|
||
|
var result;
|
||
|
|
||
|
// we only allow this if JSDoc parsing is enabled
|
||
|
if (!options.jsdoc) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
result = {
|
||
|
type: Types.TypeApplication,
|
||
|
expression: {
|
||
|
type: Types.NameExpression,
|
||
|
name: 'Array'
|
||
|
},
|
||
|
applications: [
|
||
|
{
|
||
|
type: Types.FunctionType,
|
||
|
params: []
|
||
|
}
|
||
|
]
|
||
|
};
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c41 = function(sig, opt) {
|
||
|
// signature is required unless JSDoc parsing is enabled
|
||
|
if (!sig && !options.jsdoc) {
|
||
|
return null;
|
||
|
} else if (sig === null) {
|
||
|
sig = {
|
||
|
params: []
|
||
|
};
|
||
|
}
|
||
|
|
||
|
var result = {
|
||
|
type: Types.FunctionType
|
||
|
};
|
||
|
|
||
|
Object.keys(sig).forEach(function(key) {
|
||
|
result[key] = sig[key];
|
||
|
});
|
||
|
|
||
|
if (opt) {
|
||
|
result = optional(result);
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c42 = "(",
|
||
|
peg$c43 = peg$literalExpectation("(", false),
|
||
|
peg$c44 = ")",
|
||
|
peg$c45 = peg$literalExpectation(")", false),
|
||
|
peg$c46 = ":",
|
||
|
peg$c47 = peg$literalExpectation(":", false),
|
||
|
peg$c48 = function(sig, returns) {
|
||
|
var result = {};
|
||
|
|
||
|
result.params = sig ? sig.params : [];
|
||
|
if (sig && sig['new']) {
|
||
|
result['new'] = sig['new'];
|
||
|
}
|
||
|
if (sig && sig['this']) {
|
||
|
result['this'] = sig['this']
|
||
|
}
|
||
|
|
||
|
if (returns && returns[3]) {
|
||
|
result.result = returns[3];
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c49 = function(funcNew, funcThis, params) {
|
||
|
var result = {
|
||
|
params: params ? params[3] : [],
|
||
|
'new': funcNew
|
||
|
};
|
||
|
if (funcThis) {
|
||
|
result['this'] = funcThis[3];
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c50 = function(funcThis, funcNew, params) {
|
||
|
var result = {
|
||
|
params: params ? params[3] : [],
|
||
|
'this': funcThis
|
||
|
};
|
||
|
if (funcNew) {
|
||
|
result['new'] = funcNew[3];
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c51 = function(params) {
|
||
|
return {
|
||
|
params: params
|
||
|
};
|
||
|
},
|
||
|
peg$c52 = "new",
|
||
|
peg$c53 = peg$literalExpectation("new", false),
|
||
|
peg$c54 = function(expr) { return expr; },
|
||
|
peg$c55 = "this",
|
||
|
peg$c56 = peg$literalExpectation("this", false),
|
||
|
peg$c57 = function(rp) {
|
||
|
return [rp];
|
||
|
},
|
||
|
peg$c58 = function(nrp, rp) {
|
||
|
var result = [];
|
||
|
if (nrp !== '') {
|
||
|
result = nrp;
|
||
|
}
|
||
|
if (rp && rp[3]) {
|
||
|
result.push(rp[3]);
|
||
|
}
|
||
|
return result;
|
||
|
},
|
||
|
peg$c59 = function(p, list) {
|
||
|
var result = [p];
|
||
|
for (var i = 0, l = list.length; i < l; i++) {
|
||
|
result.push(list[i][3]);
|
||
|
}
|
||
|
return result;
|
||
|
},
|
||
|
peg$c60 = function(op, list) {
|
||
|
var result = [op];
|
||
|
for (var i = 0, l = list.length; i < l; i++) {
|
||
|
result.push(list[i][3]);
|
||
|
}
|
||
|
return result;
|
||
|
},
|
||
|
peg$c61 = function(paramType) { return paramType; },
|
||
|
peg$c62 = function(t) {
|
||
|
t = optional(t);
|
||
|
return t;
|
||
|
},
|
||
|
peg$c63 = "[",
|
||
|
peg$c64 = peg$literalExpectation("[", false),
|
||
|
peg$c65 = "]",
|
||
|
peg$c66 = peg$literalExpectation("]", false),
|
||
|
peg$c67 = function(t) {
|
||
|
return repeatable(t || '');
|
||
|
},
|
||
|
peg$c68 = function() {
|
||
|
return repeatable({});
|
||
|
},
|
||
|
peg$c69 = function(t, opt) {
|
||
|
var result = {
|
||
|
type: Types.TypeUnion,
|
||
|
elements: t
|
||
|
};
|
||
|
|
||
|
if (opt) {
|
||
|
result = optional(result);
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c70 = function(tu) {
|
||
|
return repeatable(tu);
|
||
|
},
|
||
|
peg$c71 = function(expr, list) {
|
||
|
var result = [expr];
|
||
|
for (var i = 0, l = list.length; i < l; i++) {
|
||
|
result.push(list[i][1]);
|
||
|
}
|
||
|
return result;
|
||
|
},
|
||
|
peg$c72 = function(expr, list) {
|
||
|
var result = [expr];
|
||
|
|
||
|
for (var i = 0, l = list.length; i < l; i++) {
|
||
|
result.push(list[i][1]);
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c73 = function(list) {
|
||
|
return {
|
||
|
type: Types.TypeUnion,
|
||
|
elements: list
|
||
|
};
|
||
|
},
|
||
|
peg$c74 = "|",
|
||
|
peg$c75 = peg$literalExpectation("|", false),
|
||
|
peg$c76 = function() {
|
||
|
return '';
|
||
|
},
|
||
|
peg$c77 = "{",
|
||
|
peg$c78 = peg$literalExpectation("{", false),
|
||
|
peg$c79 = "}",
|
||
|
peg$c80 = peg$literalExpectation("}", false),
|
||
|
peg$c81 = function(list, opt) {
|
||
|
var result = {
|
||
|
type: Types.RecordType,
|
||
|
fields: list || []
|
||
|
};
|
||
|
|
||
|
if (opt) {
|
||
|
result = optional(result);
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c82 = function(type, list) {
|
||
|
var result = [type];
|
||
|
|
||
|
list = list || [];
|
||
|
for (var i = 0, l = list.length; i < l; i++) {
|
||
|
result.push(list[i][3]);
|
||
|
}
|
||
|
return result;
|
||
|
},
|
||
|
peg$c83 = function(key, expr) {
|
||
|
var result = {
|
||
|
type: Types.FieldType,
|
||
|
key: key,
|
||
|
value: undefined
|
||
|
};
|
||
|
|
||
|
if (expr && expr[3]) {
|
||
|
result.value = expr[3];
|
||
|
}
|
||
|
|
||
|
return result;
|
||
|
},
|
||
|
peg$c84 = function(t) {
|
||
|
if (!options.jsdoc) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
return t;
|
||
|
},
|
||
|
peg$c85 = function(lit) {
|
||
|
if (!options.jsdoc) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
return {
|
||
|
name: '"' + lit.join('') + '"'
|
||
|
};
|
||
|
},
|
||
|
peg$c86 = function(lit) {
|
||
|
if (!options.jsdoc) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
return {
|
||
|
name: "'" + lit.join('') + "'"
|
||
|
};
|
||
|
},
|
||
|
peg$c87 = function(id, props) {
|
||
|
props = props || '';
|
||
|
|
||
|
return {
|
||
|
name: id + props
|
||
|
};
|
||
|
},
|
||
|
peg$c88 = function(rw) {
|
||
|
return {
|
||
|
name: rw
|
||
|
};
|
||
|
},
|
||
|
peg$c89 = function(lit) {
|
||
|
return '"' + lit + '"';
|
||
|
},
|
||
|
peg$c90 = function(lit) {
|
||
|
return "'" + lit + "'";
|
||
|
},
|
||
|
peg$c91 = "#",
|
||
|
peg$c92 = peg$literalExpectation("#", false),
|
||
|
peg$c93 = "~",
|
||
|
peg$c94 = peg$literalExpectation("~", false),
|
||
|
peg$c95 = "/",
|
||
|
peg$c96 = peg$literalExpectation("/", false),
|
||
|
peg$c97 = function(sep, prop) {
|
||
|
// we only allow '.' unless JSDoc parsing is enabled
|
||
|
if (sep !== '.' && !options.jsdoc) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
return sep + prop;
|
||
|
},
|
||
|
peg$c98 = function(name) { return name; },
|
||
|
peg$c99 = "$",
|
||
|
peg$c100 = peg$literalExpectation("$", false),
|
||
|
peg$c101 = "_",
|
||
|
peg$c102 = peg$literalExpectation("_", false),
|
||
|
peg$c103 = "@",
|
||
|
peg$c104 = peg$literalExpectation("@", false),
|
||
|
peg$c105 = "-",
|
||
|
peg$c106 = peg$literalExpectation("-", false),
|
||
|
peg$c107 = "\u200C",
|
||
|
peg$c108 = peg$literalExpectation("\u200C", false),
|
||
|
peg$c109 = "\u200D",
|
||
|
peg$c110 = peg$literalExpectation("\u200D", false),
|
||
|
peg$c111 = function(parts) {
|
||
|
if (!options.jsdoc) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
parts = parts || [];
|
||
|
|
||
|
return '(' + parts.join(', ') + ')';
|
||
|
|
||
|
},
|
||
|
peg$c112 = function(params) {
|
||
|
if (!options.jsdoc) {
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
params = params || [];
|
||
|
|
||
|
return '(' + params.join(', ') + ')';
|
||
|
},
|
||
|
peg$c113 = "break",
|
||
|
peg$c114 = peg$literalExpectation("break", false),
|
||
|
peg$c115 = "case",
|
||
|
peg$c116 = peg$literalExpectation("case", false),
|
||
|
peg$c117 = "catch",
|
||
|
peg$c118 = peg$literalExpectation("catch", false),
|
||
|
peg$c119 = "continue",
|
||
|
peg$c120 = peg$literalExpectation("continue", false),
|
||
|
peg$c121 = "debugger",
|
||
|
peg$c122 = peg$literalExpectation("debugger", false),
|
||
|
peg$c123 = "default",
|
||
|
peg$c124 = peg$literalExpectation("default", false),
|
||
|
peg$c125 = "delete",
|
||
|
peg$c126 = peg$literalExpectation("delete", false),
|
||
|
peg$c127 = "do",
|
||
|
peg$c128 = peg$literalExpectation("do", false),
|
||
|
peg$c129 = "else",
|
||
|
peg$c130 = peg$literalExpectation("else", false),
|
||
|
peg$c131 = "finally",
|
||
|
peg$c132 = peg$literalExpectation("finally", false),
|
||
|
peg$c133 = "for",
|
||
|
peg$c134 = peg$literalExpectation("for", false),
|
||
|
peg$c135 = "if",
|
||
|
peg$c136 = peg$literalExpectation("if", false),
|
||
|
peg$c137 = "in",
|
||
|
peg$c138 = peg$literalExpectation("in", false),
|
||
|
peg$c139 = "instanceof",
|
||
|
peg$c140 = peg$literalExpectation("instanceof", false),
|
||
|
peg$c141 = "return",
|
||
|
peg$c142 = peg$literalExpectation("return", false),
|
||
|
peg$c143 = "switch",
|
||
|
peg$c144 = peg$literalExpectation("switch", false),
|
||
|
peg$c145 = "throw",
|
||
|
peg$c146 = peg$literalExpectation("throw", false),
|
||
|
peg$c147 = "try",
|
||
|
peg$c148 = peg$literalExpectation("try", false),
|
||
|
peg$c149 = "typeof",
|
||
|
peg$c150 = peg$literalExpectation("typeof", false),
|
||
|
peg$c151 = "var",
|
||
|
peg$c152 = peg$literalExpectation("var", false),
|
||
|
peg$c153 = "void",
|
||
|
peg$c154 = peg$literalExpectation("void", false),
|
||
|
peg$c155 = "while",
|
||
|
peg$c156 = peg$literalExpectation("while", false),
|
||
|
peg$c157 = "with",
|
||
|
peg$c158 = peg$literalExpectation("with", false),
|
||
|
peg$c159 = function(kw) {
|
||
|
return kw;
|
||
|
},
|
||
|
peg$c160 = "class",
|
||
|
peg$c161 = peg$literalExpectation("class", false),
|
||
|
peg$c162 = "const",
|
||
|
peg$c163 = peg$literalExpectation("const", false),
|
||
|
peg$c164 = "enum",
|
||
|
peg$c165 = peg$literalExpectation("enum", false),
|
||
|
peg$c166 = "export",
|
||
|
peg$c167 = peg$literalExpectation("export", false),
|
||
|
peg$c168 = "extends",
|
||
|
peg$c169 = peg$literalExpectation("extends", false),
|
||
|
peg$c170 = "import",
|
||
|
peg$c171 = peg$literalExpectation("import", false),
|
||
|
peg$c172 = "super",
|
||
|
peg$c173 = peg$literalExpectation("super", false),
|
||
|
peg$c174 = "implements",
|
||
|
peg$c175 = peg$literalExpectation("implements", false),
|
||
|
peg$c176 = "interface",
|
||
|
peg$c177 = peg$literalExpectation("interface", false),
|
||
|
peg$c178 = "let",
|
||
|
peg$c179 = peg$literalExpectation("let", false),
|
||
|
peg$c180 = "package",
|
||
|
peg$c181 = peg$literalExpectation("package", false),
|
||
|
peg$c182 = "private",
|
||
|
peg$c183 = peg$literalExpectation("private", false),
|
||
|
peg$c184 = "protected",
|
||
|
peg$c185 = peg$literalExpectation("protected", false),
|
||
|
peg$c186 = "public",
|
||
|
peg$c187 = peg$literalExpectation("public", false),
|
||
|
peg$c188 = "static",
|
||
|
peg$c189 = peg$literalExpectation("static", false),
|
||
|
peg$c190 = "yield",
|
||
|
peg$c191 = peg$literalExpectation("yield", false),
|
||
|
peg$c192 = function(frw) {
|
||
|
return frw;
|
||
|
},
|
||
|
peg$c193 = "\"",
|
||
|
peg$c194 = peg$literalExpectation("\"", false),
|
||
|
peg$c195 = function(str) {
|
||
|
return str;
|
||
|
},
|
||
|
peg$c196 = "'",
|
||
|
peg$c197 = peg$literalExpectation("'", false),
|
||
|
peg$c198 = function(lit, digits, exp) {
|
||
|
return parseFloat(lit + '.' + (digits || '') + (exp || ''));
|
||
|
},
|
||
|
peg$c199 = function(digits, exp) {
|
||
|
return parseFloat('.' + digits + (exp || ''));
|
||
|
},
|
||
|
peg$c200 = function(lit, exp) {
|
||
|
return parseFloat(lit + (exp || ''));
|
||
|
},
|
||
|
peg$c201 = "0",
|
||
|
peg$c202 = peg$literalExpectation("0", false),
|
||
|
peg$c203 = /^[eE]/,
|
||
|
peg$c204 = peg$classExpectation(["e", "E"], false, false),
|
||
|
peg$c205 = /^[+\-]/,
|
||
|
peg$c206 = peg$classExpectation(["+", "-"], false, false),
|
||
|
peg$c207 = /^[xX]/,
|
||
|
peg$c208 = peg$classExpectation(["x", "X"], false, false),
|
||
|
peg$c209 = function(hex) {
|
||
|
return parseInt('0x' + hex, 16);
|
||
|
},
|
||
|
peg$c210 = "null",
|
||
|
peg$c211 = peg$literalExpectation("null", false),
|
||
|
peg$c212 = "undefined",
|
||
|
peg$c213 = peg$literalExpectation("undefined", false),
|
||
|
peg$c214 = function() {
|
||
|
return {
|
||
|
type: Types.UnknownLiteral
|
||
|
};
|
||
|
},
|
||
|
peg$c215 = "true",
|
||
|
peg$c216 = peg$literalExpectation("true", false),
|
||
|
peg$c217 = "false",
|
||
|
peg$c218 = peg$literalExpectation("false", false),
|
||
|
peg$c219 = "Function",
|
||
|
peg$c220 = peg$literalExpectation("Function", false),
|
||
|
peg$c221 = "function",
|
||
|
peg$c222 = peg$literalExpectation("function", false),
|
||
|
peg$c223 = "\\",
|
||
|
peg$c224 = peg$literalExpectation("\\", false),
|
||
|
peg$c225 = "u",
|
||
|
peg$c226 = peg$literalExpectation("u", false),
|
||
|
peg$c227 = function(hex) {
|
||
|
return String.fromCharCode(parseInt('0x' + hex), 16);
|
||
|
},
|
||
|
peg$c228 = /^[0-9]/,
|
||
|
peg$c229 = peg$classExpectation([["0", "9"]], false, false),
|
||
|
peg$c230 = /^[1-9]/,
|
||
|
peg$c231 = peg$classExpectation([["1", "9"]], false, false),
|
||
|
peg$c232 = /^[0-9a-fA-F]/,
|
||
|
peg$c233 = peg$classExpectation([["0", "9"], ["a", "f"], ["A", "F"]], false, false),
|
||
|
peg$c234 = peg$otherExpectation("Unicode combining mark"),
|
||
|
peg$c235 = /^[\u0903\u093E\u093F\u0940\u0949\u094A\u094B\u094C\u0982\u0983\u09BE\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u09D7\u0A03\u0A3E\u0A3F\u0A40\u0A83\u0ABE\u0ABF\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6\u0BC7\u0BC8\u0BCA\u0BCB\u0BCC\u0BD7\u0C01\u0C02\u0C03\u0C41\u0C42\u0C43\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC2\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0D02\u0D03\u0D3E\u0D3F\u0D40\u0D46\u0D47\u0D48\u0D4A\u0D4B\u0D4C\u0D57\u0D82\u0D83\u0DCF\u0DD0\u0DD1\u0DD8\u0DD9\u0DDA\u0DDB\u0DDC\u0DDD\u0DDE\u0DDF\u0DF2\u0DF3\u0F3E\u0F3F\u0F7F\u102B\u102C\u1031\u1038\u103B\u103C\u1056\u1057\u1062\u1063\u1064\u1067\u1068\u1069\u106A\u106B\u106C\u106D\u1083\u1084\u1087\u1088\u1089\u108A\u108B\u108C\u108F\u17B6\u17BE\u17BF\u17C0\u17C1\u17C2\u17C3\u17C4\u17C5\u17C7\u17C8\u1923\u1924\u1925\u1926\u1929\u192A\u192B\u1930\u1931\u1933\u1934\u1935\u1936\u1937\u1938\u19B0\u19B1\u19B2\u19B3\u19B4\u19B5\u19B6\u19B7\u19B8\u19B9\u19BA\u19BB\u19BC\u19BD\u19BE\u19BF\u19C0\u19C8\u19C9\u1A19\u1A1A\u1A1B\u1B04\u1B35\u1B3B\u1B3D\u1B3E\u1B3F\u1B40\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1C24\u1C25\u1C26\u1C27\u1C28\u1C29\u1C2A\u1C2B\u1C34\u1C35\uA823\uA824\uA827\uA880\uA881\uA8B4\uA8B5\uA8B6\uA8B7\uA8B8\uA8B9\uA8BA\uA8BB\uA8BC\uA8BD\uA8BE\uA8BF\uA8C0\uA8C1\uA8C2\uA8C3\uA952\uA953\uAA2F\uAA30\uAA33\uAA34\uAA4D]/,
|
||
|
peg$c236 = peg$classExpectation(["\u0903", "\u093E", "\u093F", "\u0940", "\u0949", "\u094A", "\u094B", "\u094C", "\u0982", "\u0983", "\u09BE", "\u09BF", "\u09C0", "\u09C7", "\u09C8", "\u09CB", "\u09CC", "\u09D7", "\u0A03", "\u0A3E", "\u0A3F", "\u0A40", "\u0A83", "\u0ABE", "\u0ABF", "\u0AC0", "\u0AC9", "\u0ACB", "\u0ACC", "\u0B02", "\u0B03", "\u0B3E", "\u0B40", "\u0B47", "\u0B48", "\u0B4B", "\u0B4C", "\u0B57", "\u0BBE", "\u0BBF", "\u0BC1", "\u0BC2", "\u0BC6", "\u0BC7", "\u0BC8", "\u0BCA", "\u0BCB", "\u0BCC", "\u0BD7", "\u0C01", "\u0C02", "\u0C03", "\u0C41", "\u0C42", "\u0C43", "\u0C44", "\u0C82", "\u0C83", "\u0CBE", "\u0CC0", "\u0CC1", "\u0CC2", "\u0CC3", "\u0CC4", "\u0CC7", "\u0CC8", "\u0CCA", "\u0CCB", "\u0CD5", "\u0CD6", "\u0D02", "\u0D03", "\u0D3E", "\u0D3F", "\u0D40", "\u0D46", "\u0D47", "\u0D48", "\u0D4A", "\u0D4B", "\u0D4C", "\u0D57", "\u0D82", "\u0D83", "\u0DCF", "\u0DD0", "\u0DD1", "\u0DD8", "\u0DD9", "\u0DDA", "\u0DDB", "\u0DDC", "\u0DDD", "\u0DDE", "\u0DDF", "\u0DF2", "\u0DF3", "\u0F3E", "\u0F3F", "\u0F7F", "\u102B", "\u102C", "\u1031", "\u1038", "\u103B", "\u103C", "\u1056", "\u1057", "\u1062", "\u1063", "\u1064", "\u1067", "\u1068", "\u1069", "\u106A", "\u106B", "\u106C", "\u106D", "\u1083", "\u1084", "\u1087", "\u1088", "\u1089", "\u108A", "\u108B", "\u108C", "\u108F", "\u17B6", "\u17BE", "\u17BF", "\u17C0", "\u17C1", "\u17C2", "\u17C3", "\u17C4", "\u17C5", "\u17C7", "\u17C8", "\u1923", "\u1924", "\u1925", "\u1926", "\u1929", "\u192A", "\u192B", "\u1930", "\u1931", "\u1933", "\u1934", "\u1935", "\u1936", "\u1937", "\u1938", "\u19B0", "\u19B1", "\u19B2", "\u19B3", "\u19B4", "\u19B5", "\u19B6", "\u19B7", "\u19B8", "\u19B9", "\u19BA", "\u19BB", "\u19BC", "\u19BD", "\u19BE", "\u19BF", "\u19C0", "\u19C8", "\u19C9", "\u1A19", "\u1A1A", "\u1A1B", "\u1B04", "\u1B35", "\u1B3B", "\u1B3D", "\u1B3E", "\u1B3F", "\u1B40", "\u1B41", "\u1B43", "\u1B44", "\u1B82", "\u1BA1", "\u1BA6", "\u1BA7", "\u1BAA", "\u1C24", "\u1C25", "\u1C26", "\u1C27", "\u1C28", "\u1C29", "\u1C2A", "\u1C2B", "\u1C34", "\u1C35", "\uA823", "\uA824", "\uA827", "\uA880", "\uA881", "\uA8B4", "\uA8B5", "\uA8B6", "\uA8B7", "\uA8B8", "\uA8B9", "\uA8BA", "\uA8BB", "\uA8BC", "\uA8BD", "\uA8BE", "\uA8BF", "\uA8C0", "\uA8C1", "\uA8C2", "\uA8C3", "\uA952", "\uA953", "\uAA2F", "\uAA30", "\uAA33", "\uAA34", "\uAA4D"], false, false),
|
||
|
peg$c237 = peg$otherExpectation("Unicode decimal number"),
|
||
|
peg$c238 = /^[0123456789\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u06F0\u06F1\u06F2\u06F3\u06F4\u06F5\u06F6\u06F7\u06F8\u06F9\u07C0\u07C1\u07C2\u07C3\u07C4\u07C5\u07C6\u07C7\u07C8\u07C9\u0966\u0967\u0968\u0969\u096A\u096B\u096C\u096D\u096E\u096F\u09E6\u09E7\u09E8\u09E9\u09EA\u09EB\u09EC\u09ED\u09EE\u09EF\u0A66\u0A67\u0A68\u0A69\u0A6A\u0A6B\u0A6C\u0A6D\u0A6E\u0A6F\u0AE6\u0AE7\u0AE8\u0AE9\u0AEA\u0AEB\u0AEC\u0AED\u0AEE\u0AEF\u0B66\u0B67\u0B68\u0B69\u0B6A\u0B6B\u0B6C\u0B6D\u0B6E\u0B6F\u0BE6\u0BE7\u0BE8\u0BE9\u0BEA\u0BEB\u0BEC\u0BED\u0BEE\u0BEF\u0C66\u0C67\u0C68\u0C69\u0C6A\u0C6B\u0C6C\u0C6D\u0C6E\u0C6F\u0CE6\u0CE7\u0CE8\u0CE9\u0CEA\u0CEB\u0CEC\u0CED\u0CEE\u0CEF\u0D66\u0D67\u0D68\u0D69\u0D6A\u0D6B\u0D6C\u0D6D\u0D6E\u0D6F\u0E50\u0E51\u0E52\u0E53\u0E54\u0E55\u0E56\u0E57\u0E58\u0E59\u0ED0\u0ED1\u0ED2\u0ED3\u0ED4\u0ED5\u0ED6\u0ED7\u0ED8\u0ED9\u0F20\u0F21\u0F22\u0F23\u0F24\u0F25\u0F26\u0F27\u0F28\u0F29\u1040\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049\u1090\u1091\u1092\u1093\u1094\u1095\u1096\u1097\u1098\u1099\u17E0\u17E1\u17E2\u17E3\u17E4\u17E5\u17E6\u17E7\u17E8\u17E9\u1810\u1811\u1812\u1813\u1814\u1815\u1816\u1817\u1818\u1819\u1946\u1947\u1948\u1949\u194A\u194B\u194C\u194D\u194E\u194F\u19D0\u19D1\u19D2\u19D3\u19D4\u19D5\u19D6\u19D7\u19D8\u19D9\u1B50\u1B51\u1B52\u1B53\u1B54\u1B55\u1B56\u1B57\u1B58\u1B59\u1BB0\u1BB1\u1BB2\u1BB3\u1BB4\u1BB5\u1BB6\u1BB7\u1BB8\u1BB9\u1C40\u1C41\u1C42\u1C43\u1C44\u1C45\u1C46\u1C47\u1C48\u1C49\u1C50\u1C51\u1C52\u1C53\u1C54\u1C55\u1C56\u1C57\u1C58\u1C59\uA620\uA621\uA622\uA623\uA624\uA625\uA626\uA627\uA628\uA629\uA8D0\uA8D1\uA8D2\uA8D3\uA8D4\uA8D5\uA8D6\uA8D7\uA8D8\uA8D9\uA900\uA901\uA902\uA903\uA904\uA905\uA906\uA907\uA908\uA909\uAA50\uAA51\uAA52\uAA53\uAA54\uAA55\uAA56\uAA57\uAA58\uAA59\uFF10\uFF11\uFF12\uFF13\uFF14\uFF15\uFF16\uFF17\uFF18\uFF19]/,
|
||
|
peg$c239 = peg$classExpectation(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669", "\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9", "\u07C0", "\u07C1", "\u07C2", "\u07C3", "\u07C4", "\u07C5", "\u07C6", "\u07C7", "\u07C8", "\u07C9", "\u0966", "\u0967", "\u0968", "\u0969", "\u096A", "\u096B", "\u096C", "\u096D", "\u096E", "\u096F", "\u09E6", "\u09E7", "\u09E8", "\u09E9", "\u09EA", "\u09EB", "\u09EC", "\u09ED", "\u09EE", "\u09EF", "\u0A66", "\u0A67", "\u0A68", "\u0A69", "\u0A6A", "\u0A6B", "\u0A6C", "\u0A6D", "\u0A6E", "\u0A6F", "\u0AE6", "\u0AE7", "\u0AE8", "\u0AE9", "\u0AEA", "\u0AEB", "\u0AEC", "\u0AED", "\u0AEE", "\u0AEF", "\u0B66", "\u0B67", "\u0B68", "\u0B69", "\u0B6A", "\u0B6B", "\u0B6C", "\u0B6D", "\u0B6E", "\u0B6F", "\u0BE6", "\u0BE7", "\u0BE8", "\u0BE9", "\u0BEA", "\u0BEB", "\u0BEC", "\u0BED", "\u0BEE", "\u0BEF", "\u0C66", "\u0C67", "\u0C68", "\u0C69", "\u0C6A", "\u0C6B", "\u0C6C", "\u0C6D", "\u0C6E", "\u0C6F", "\u0CE6", "\u0CE7", "\u0CE8", "\u0CE9", "\u0CEA", "\u0CEB", "\u0CEC", "\u0CED", "\u0CEE", "\u0CEF", "\u0D66", "\u0D67", "\u0D68", "\u0D69", "\u0D6A", "\u0D6B", "\u0D6C", "\u0D6D", "\u0D6E", "\u0D6F", "\u0E50", "\u0E51", "\u0E52", "\u0E53", "\u0E54", "\u0E55", "\u0E56", "\u0E57", "\u0E58", "\u0E59", "\u0ED0", "\u0ED1", "\u0ED2", "\u0ED3", "\u0ED4", "\u0ED5", "\u0ED6", "\u0ED7", "\u0ED8", "\u0ED9", "\u0F20", "\u0F21", "\u0F22", "\u0F23", "\u0F24", "\u0F25", "\u0F26", "\u0F27", "\u0F28", "\u0F29", "\u1040", "\u1041", "\u1042", "\u1043", "\u1044", "\u1045", "\u1046", "\u1047", "\u1048", "\u1049", "\u1090", "\u1091", "\u1092", "\u1093", "\u1094", "\u1095", "\u1096", "\u1097", "\u1098", "\u1099", "\u17E0", "\u17E1", "\u17E2", "\u17E3", "\u17E4", "\u17E5", "\u17E6", "\u17E7", "\u17E8", "\u17E9", "\u1810", "\u1811", "\u1812", "\u1813", "\u1814", "\u1815", "\u1816", "\u1817", "\u1818", "\u1819", "\u1946", "\u1947", "\u1948", "\u1949", "\u194A", "\u194B", "\u194C", "\u194D", "\u194E", "\u194F", "\u19D0", "\u19D1", "\u19D2", "\u19D3", "\u19D4", "\u19D5", "\u19D6", "\u19D7", "\u19D8", "\u19D9", "\u1B50", "\u1B51", "\u1B52", "\u1B53", "\u1B54", "\u1B55", "\u1B56", "\u1B57", "\u1B58", "\u1B59", "\u1BB0", "\u1BB1", "\u1BB2", "\u1BB3", "\u1BB4", "\u1BB5", "\u1BB6", "\u1BB7", "\u1BB8", "\u1BB9", "\u1C40", "\u1C41", "\u1C42", "\u1C43", "\u1C44", "\u1C45", "\u1C46", "\u1C47", "\u1C48", "\u1C49", "\u1C50", "\u1C51", "\u1C52", "\u1C53", "\u1C54", "\u1C55", "\u1C56", "\u1C57", "\u1C58", "\u1C59", "\uA620", "\uA621", "\uA622", "\uA623", "\uA624", "\uA625", "\uA626", "\uA627", "\uA628", "\uA629", "\uA8D0", "\uA8D1", "\uA8D2", "\uA8D3", "\uA8D4", "\uA8D5", "\uA8D6", "\uA8D7", "\uA8D8", "\uA8D9", "\uA900", "\uA901", "\uA902", "\uA903", "\uA904", "\uA905", "\uA906", "\uA907", "\uA908", "\uA909", "\uAA50", "\uAA51", "\uAA52", "\uAA53", "\uAA54", "\uAA55", "\uAA56", "\uAA57", "\uAA58", "\uAA59", "\uFF10", "\uFF11", "\uFF12", "\uFF13", "\uFF14", "\uFF15", "\uFF16", "\uFF17", "\uFF18", "\uFF19"], false, false),
|
||
|
peg$c240 = peg$otherExpectation("Unicode punctuation connector"),
|
||
|
peg$c241 = /^[_\u203F\u2040\u2054\uFE33\uFE34\uFE4D\uFE4E\uFE4F\uFF3F]/,
|
||
|
peg$c242 = peg$classExpectation(["_", "\u203F", "\u2040", "\u2054", "\uFE33", "\uFE34", "\uFE4D", "\uFE4E", "\uFE4F", "\uFF3F"], false, false),
|
||
|
peg$c243 = peg$otherExpectation("Unicode uppercase letter"),
|
||
|
peg$c244 = /^[ABCDEFGHIJKLMNOPQRSTUVWXYZ\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189\u018A\u018B\u018E\u018F\u0190\u0191\u0193\u0194\u0196\u0197\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1\u01B2\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6\u01F7\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243\u0244\u0245\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u0386\u0388\u0389\u038A\u038C\u038E\u038F\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03AA\u03AB\u03CF\u03D2\u03D3\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD\u03FE\u03FF\u0400\u0401\u0402\u0403\u0404\u0405\u0406\u0407\u0408\u0409\u040A\u040B\u040C\u040D\u040E\u040F\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0531\u0532\u0533\u0534\u0535\u0536\u0537\u0538\u0539\u053A\u053B\u053C\u053D\u053E\u053F\u0540\u0541\u0542\u0543\u0544\u0545\u0546\u0547\u0548\u0549\u054A\u054B\u054C\u054D\u054E\u054F\u0550\u0551\u0552\u0553\u0554\u0555\u0556\u10A0\u10A1\u10A2\u10A3\u10A4\u10A5\u10A6\u10A7\u10A8\u10A9\u10AA\u10AB\u10AC\u10AD\u10AE\u10AF\u10B0\u10B1\u10B2\u10B3\u10B4\u10B5\u10B6\u10B7\u10B8\u10B9\u10BA\u10BB\u10BC\u10BD\u10BE\u10BF\u10C0\u10C1\u10C2\u10C3\u10C4\u10C5\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08\u1F09\u1F0A\u1F0B\u1F0C\u1F0D\u1F0E\u1F0F\u1F18\u1F19\u1F1A\u1F1B\u1F1C\u1F1D\u1F28\u1F29\u1F2A\u1F2B\u1F2C\u1F2D\u1F2E\u1F2F\u1F38\u1F39\u1F3A\u1F3B\u1F3C\u1F3D\u1F3E\u1F3F\u1F48\u1F49\u1F4A\u1F4B\u1F4C\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68\u1F69\u1F6A\u1F6B\u1F6C\u1F6D\u1F6E\u1F6F\u1FB8\u1FB9\u1FBA\u1FBB\u1FC8\u1FC9\u1FCA\u1FCB\u1FD8\u1FD9\u1FDA\u1FDB\u1FE8\u1FE9\u1FEA\u1FEB\u1FEC\u1FF8\u1FF9\u1FFA\u1FFB\u2102\u2107\u210B\u210C\u210D\u2110\u2111\u2112\u2115\u2119\u211A\u211B\u211C\u211D\u2124\u2126\u2128\u212A\u212
|
||
|
peg$c245 = peg$classExpectation(["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "\xC0", "\xC1", "\xC2", "\xC3", "\xC4", "\xC5", "\xC6", "\xC7", "\xC8", "\xC9", "\xCA", "\xCB", "\xCC", "\xCD", "\xCE", "\xCF", "\xD0", "\xD1", "\xD2", "\xD3", "\xD4", "\xD5", "\xD6", "\xD8", "\xD9", "\xDA", "\xDB", "\xDC", "\xDD", "\xDE", "\u0100", "\u0102", "\u0104", "\u0106", "\u0108", "\u010A", "\u010C", "\u010E", "\u0110", "\u0112", "\u0114", "\u0116", "\u0118", "\u011A", "\u011C", "\u011E", "\u0120", "\u0122", "\u0124", "\u0126", "\u0128", "\u012A", "\u012C", "\u012E", "\u0130", "\u0132", "\u0134", "\u0136", "\u0139", "\u013B", "\u013D", "\u013F", "\u0141", "\u0143", "\u0145", "\u0147", "\u014A", "\u014C", "\u014E", "\u0150", "\u0152", "\u0154", "\u0156", "\u0158", "\u015A", "\u015C", "\u015E", "\u0160", "\u0162", "\u0164", "\u0166", "\u0168", "\u016A", "\u016C", "\u016E", "\u0170", "\u0172", "\u0174", "\u0176", "\u0178", "\u0179", "\u017B", "\u017D", "\u0181", "\u0182", "\u0184", "\u0186", "\u0187", "\u0189", "\u018A", "\u018B", "\u018E", "\u018F", "\u0190", "\u0191", "\u0193", "\u0194", "\u0196", "\u0197", "\u0198", "\u019C", "\u019D", "\u019F", "\u01A0", "\u01A2", "\u01A4", "\u01A6", "\u01A7", "\u01A9", "\u01AC", "\u01AE", "\u01AF", "\u01B1", "\u01B2", "\u01B3", "\u01B5", "\u01B7", "\u01B8", "\u01BC", "\u01C4", "\u01C7", "\u01CA", "\u01CD", "\u01CF", "\u01D1", "\u01D3", "\u01D5", "\u01D7", "\u01D9", "\u01DB", "\u01DE", "\u01E0", "\u01E2", "\u01E4", "\u01E6", "\u01E8", "\u01EA", "\u01EC", "\u01EE", "\u01F1", "\u01F4", "\u01F6", "\u01F7", "\u01F8", "\u01FA", "\u01FC", "\u01FE", "\u0200", "\u0202", "\u0204", "\u0206", "\u0208", "\u020A", "\u020C", "\u020E", "\u0210", "\u0212", "\u0214", "\u0216", "\u0218", "\u021A", "\u021C", "\u021E", "\u0220", "\u0222", "\u0224", "\u0226", "\u0228", "\u022A", "\u022C", "\u022E", "\u0230", "\u0232", "\u023A", "\u023B", "\u023D", "\u023E", "\u0241", "\u0243", "\u0244", "\u0245", "\u0246", "\u0248", "\u024A", "\u024C", "\u024E", "\u0370", "\u0372", "\u0376", "\u0386", "\u0388", "\u0389", "\u038A", "\u038C", "\u038E", "\u038F", "\u0391", "\u0392", "\u0393", "\u0394", "\u0395", "\u0396", "\u0397", "\u0398", "\u0399", "\u039A", "\u039B", "\u039C", "\u039D", "\u039E", "\u039F", "\u03A0", "\u03A1", "\u03A3", "\u03A4", "\u03A5", "\u03A6", "\u03A7", "\u03A8", "\u03A9", "\u03AA", "\u03AB", "\u03CF", "\u03D2", "\u03D3", "\u03D4", "\u03D8", "\u03DA", "\u03DC", "\u03DE", "\u03E0", "\u03E2", "\u03E4", "\u03E6", "\u03E8", "\u03EA", "\u03EC", "\u03EE", "\u03F4", "\u03F7", "\u03F9", "\u03FA", "\u03FD", "\u03FE", "\u03FF", "\u0400", "\u0401", "\u0402", "\u0403", "\u0404", "\u0405", "\u0406", "\u0407", "\u0408", "\u0409", "\u040A", "\u040B", "\u040C", "\u040D", "\u040E", "\u040F", "\u0410", "\u0411", "\u0412", "\u0413", "\u0414", "\u0415", "\u0416", "\u0417", "\u0418", "\u0419", "\u041A", "\u041B", "\u041C", "\u041D", "\u041E", "\u041F", "\u0420", "\u0421", "\u0422", "\u0423", "\u0424", "\u0425", "\u0426", "\u0427", "\u0428", "\u0429", "\u042A", "\u042B", "\u042C", "\u042D", "\u042E", "\u042F", "\u0460", "\u0462", "\u0464", "\u0466", "\u0468", "\u046A", "\u046C", "\u046E", "\u0470", "\u0472", "\u0474", "\u0476", "\u0478", "\u047A", "\u047C", "\u047E", "\u0480", "\u048A", "\u048C", "\u048E", "\u0490", "\u0492", "\u0494", "\u0496", "\u0498", "\u049A", "\u049C", "\u049E", "\u04A0", "\u04A2", "\u04A4", "\u04A6", "\u04A8", "\u04AA", "\u04AC", "\u04AE", "\u04B0", "\u04B2", "\u04B4", "\u04B6", "\u04B8", "\u04BA", "\u04BC", "\u04BE", "\u04C0", "\u04C1", "\u04C3", "\u04C5", "\u04C7", "\u04C9", "\u04CB", "\u04CD", "\u04D0", "\u04D2", "\u04D4", "\u04D6", "\u04D8", "\u04DA", "\u04DC", "\u04DE", "\u04E0", "\u04E2", "\u04E4", "\u04E6", "\u04E8", "\u04EA", "\u04EC", "\u04EE", "\u04F0", "\u04F2", "\u04F4", "\u04F6", "\u04F8", "\u04FA", "\u04FC", "\u04FE", "\u0500", "\u0502", "\u0504", "\u0506", "\u0508", "\u050A", "\u050C", "\u050E", "\u0510", "\u0512", "\u0514", "\u0516", "\u0518", "\u051A", "\u051C", "\u051E", "\u0520", "\u0522", "\u0531", "\u053
|
||
|
peg$c246 = peg$otherExpectation("Unicode lowercase letter"),
|
||
|
peg$c247 = /^[abcdefghijklmnopqrstuvwxyz\xAA\xB5\xBA\xDF\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E\u017F\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199\u019A\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD\u01BE\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233\u0234\u0235\u0236\u0237\u0238\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F\u0250\u0251\u0252\u0253\u0254\u0255\u0256\u0257\u0258\u0259\u025A\u025B\u025C\u025D\u025E\u025F\u0260\u0261\u0262\u0263\u0264\u0265\u0266\u0267\u0268\u0269\u026A\u026B\u026C\u026D\u026E\u026F\u0270\u0271\u0272\u0273\u0274\u0275\u0276\u0277\u0278\u0279\u027A\u027B\u027C\u027D\u027E\u027F\u0280\u0281\u0282\u0283\u0284\u0285\u0286\u0287\u0288\u0289\u028A\u028B\u028C\u028D\u028E\u028F\u0290\u0291\u0292\u0293\u0295\u0296\u0297\u0298\u0299\u029A\u029B\u029C\u029D\u029E\u029F\u02A0\u02A1\u02A2\u02A3\u02A4\u02A5\u02A6\u02A7\u02A8\u02A9\u02AA\u02AB\u02AC\u02AD\u02AE\u02AF\u0371\u0373\u0377\u037B\u037C\u037D\u0390\u03AC\u03AD\u03AE\u03AF\u03B0\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9\u03CA\u03CB\u03CC\u03CD\u03CE\u03D0\u03D1\u03D5\u03D6\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF\u03F0\u03F1\u03F2\u03F3\u03F5\u03F8\u03FB\u03FC\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\u0450\u0451\u0452\u0453\u0454\u0455\u0456\u0457\u0458\u0459\u045A\u045B\u045C\u045D\u045E\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0561\u0562\u0563\u0564\u0565\u0566\u0567\u0568\u0569\u056A\u056B\u056C\u056D\u056E\u056F\u0570\u0571\u0572\u0573\u0574\u0575\u0576\u0577\u0578\u0579\u057A\u057B\u057C\u057D\u057E\u057F\u0580\u0581\u0582\u0583\u0584\u0585\u0586\u0587\u1D00\u1D01\u1D02\u1D03\u1D04\u1D05\u1D06\u1D07\u1D08\u1D09\u1D0A\u1D0B\u1D0C\u1D0D\u1D0E\u1D0F\u1D10\u1D11\u1D12\u1D13\u1D14\u1D15\u1D16\u1D17\u1D18\u1D19\u1D1A\u1D1B\u1D1C\u1D1D\u1D1E\u1D1F\u1D20\u1D21\u1D22\u1D23\u1D24\u1D25\u1D26\u1D27\u1D28\u1D29\u1D2A\u1D2B\u1D62\u1D63\u1D64\u1D65\u1D66\u1D67\u1D68\u1D69\u1D6A\u1D6B\u1D6C\u1D6D\u1D6E\u1D6F\u1D70\u1D71\u1D72\u1D73\u1D74\u1D75\u1D76\u1D77\u1D79\u1D7A\u1D7B\u1D7C\u1D7D\u1D7E\u1D7F\u1D80\u1D81\u1D82\u1D83\u1D84\u1D85\u1D86\u1D87\u1D88\u1D89\u1D8A\u1D8B\u1D8C\u1D8D\u1D8E\u1D8F\u1D90\u1D91\u1D92\u1D93\u1D94\u1D95\u1D96\u1D97\u1D98\u1D99\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1
|
||
|
peg$c248 = peg$classExpectation(["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "\xAA", "\xB5", "\xBA", "\xDF", "\xE0", "\xE1", "\xE2", "\xE3", "\xE4", "\xE5", "\xE6", "\xE7", "\xE8", "\xE9", "\xEA", "\xEB", "\xEC", "\xED", "\xEE", "\xEF", "\xF0", "\xF1", "\xF2", "\xF3", "\xF4", "\xF5", "\xF6", "\xF8", "\xF9", "\xFA", "\xFB", "\xFC", "\xFD", "\xFE", "\xFF", "\u0101", "\u0103", "\u0105", "\u0107", "\u0109", "\u010B", "\u010D", "\u010F", "\u0111", "\u0113", "\u0115", "\u0117", "\u0119", "\u011B", "\u011D", "\u011F", "\u0121", "\u0123", "\u0125", "\u0127", "\u0129", "\u012B", "\u012D", "\u012F", "\u0131", "\u0133", "\u0135", "\u0137", "\u0138", "\u013A", "\u013C", "\u013E", "\u0140", "\u0142", "\u0144", "\u0146", "\u0148", "\u0149", "\u014B", "\u014D", "\u014F", "\u0151", "\u0153", "\u0155", "\u0157", "\u0159", "\u015B", "\u015D", "\u015F", "\u0161", "\u0163", "\u0165", "\u0167", "\u0169", "\u016B", "\u016D", "\u016F", "\u0171", "\u0173", "\u0175", "\u0177", "\u017A", "\u017C", "\u017E", "\u017F", "\u0180", "\u0183", "\u0185", "\u0188", "\u018C", "\u018D", "\u0192", "\u0195", "\u0199", "\u019A", "\u019B", "\u019E", "\u01A1", "\u01A3", "\u01A5", "\u01A8", "\u01AA", "\u01AB", "\u01AD", "\u01B0", "\u01B4", "\u01B6", "\u01B9", "\u01BA", "\u01BD", "\u01BE", "\u01BF", "\u01C6", "\u01C9", "\u01CC", "\u01CE", "\u01D0", "\u01D2", "\u01D4", "\u01D6", "\u01D8", "\u01DA", "\u01DC", "\u01DD", "\u01DF", "\u01E1", "\u01E3", "\u01E5", "\u01E7", "\u01E9", "\u01EB", "\u01ED", "\u01EF", "\u01F0", "\u01F3", "\u01F5", "\u01F9", "\u01FB", "\u01FD", "\u01FF", "\u0201", "\u0203", "\u0205", "\u0207", "\u0209", "\u020B", "\u020D", "\u020F", "\u0211", "\u0213", "\u0215", "\u0217", "\u0219", "\u021B", "\u021D", "\u021F", "\u0221", "\u0223", "\u0225", "\u0227", "\u0229", "\u022B", "\u022D", "\u022F", "\u0231", "\u0233", "\u0234", "\u0235", "\u0236", "\u0237", "\u0238", "\u0239", "\u023C", "\u023F", "\u0240", "\u0242", "\u0247", "\u0249", "\u024B", "\u024D", "\u024F", "\u0250", "\u0251", "\u0252", "\u0253", "\u0254", "\u0255", "\u0256", "\u0257", "\u0258", "\u0259", "\u025A", "\u025B", "\u025C", "\u025D", "\u025E", "\u025F", "\u0260", "\u0261", "\u0262", "\u0263", "\u0264", "\u0265", "\u0266", "\u0267", "\u0268", "\u0269", "\u026A", "\u026B", "\u026C", "\u026D", "\u026E", "\u026F", "\u0270", "\u0271", "\u0272", "\u0273", "\u0274", "\u0275", "\u0276", "\u0277", "\u0278", "\u0279", "\u027A", "\u027B", "\u027C", "\u027D", "\u027E", "\u027F", "\u0280", "\u0281", "\u0282", "\u0283", "\u0284", "\u0285", "\u0286", "\u0287", "\u0288", "\u0289", "\u028A", "\u028B", "\u028C", "\u028D", "\u028E", "\u028F", "\u0290", "\u0291", "\u0292", "\u0293", "\u0295", "\u0296", "\u0297", "\u0298", "\u0299", "\u029A", "\u029B", "\u029C", "\u029D", "\u029E", "\u029F", "\u02A0", "\u02A1", "\u02A2", "\u02A3", "\u02A4", "\u02A5", "\u02A6", "\u02A7", "\u02A8", "\u02A9", "\u02AA", "\u02AB", "\u02AC", "\u02AD", "\u02AE", "\u02AF", "\u0371", "\u0373", "\u0377", "\u037B", "\u037C", "\u037D", "\u0390", "\u03AC", "\u03AD", "\u03AE", "\u03AF", "\u03B0", "\u03B1", "\u03B2", "\u03B3", "\u03B4", "\u03B5", "\u03B6", "\u03B7", "\u03B8", "\u03B9", "\u03BA", "\u03BB", "\u03BC", "\u03BD", "\u03BE", "\u03BF", "\u03C0", "\u03C1", "\u03C2", "\u03C3", "\u03C4", "\u03C5", "\u03C6", "\u03C7", "\u03C8", "\u03C9", "\u03CA", "\u03CB", "\u03CC", "\u03CD", "\u03CE", "\u03D0", "\u03D1", "\u03D5", "\u03D6", "\u03D7", "\u03D9", "\u03DB", "\u03DD", "\u03DF", "\u03E1", "\u03E3", "\u03E5", "\u03E7", "\u03E9", "\u03EB", "\u03ED", "\u03EF", "\u03F0", "\u03F1", "\u03F2", "\u03F3", "\u03F5", "\u03F8", "\u03FB", "\u03FC", "\u0430", "\u0431", "\u0432", "\u0433", "\u0434", "\u0435", "\u0436", "\u0437", "\u0438", "\u0439", "\u043A", "\u043B", "\u043C", "\u043D", "\u043E", "\u043F", "\u0440", "\u0441", "\u0442", "\u0443", "\u0444", "\u0445", "\u0446", "\u0447", "\u0448", "\u0449", "\u044A", "\u044B", "\u044C", "\u044D", "\u044E", "\u044F", "\u0450", "\u0451", "\u0452", "\u0453", "\u0454", "\u0455", "\u0456", "\u0457", "\u0458", "\u045
|
||
|
peg$c249 = peg$otherExpectation("Unicode titlecase letter"),
|
||
|
peg$c250 = /^[\u01C5\u01C8\u01CB\u01F2\u1F88\u1F89\u1F8A\u1F8B\u1F8C\u1F8D\u1F8E\u1F8F\u1F98\u1F99\u1F9A\u1F9B\u1F9C\u1F9D\u1F9E\u1F9F\u1FA8\u1FA9\u1FAA\u1FAB\u1FAC\u1FAD\u1FAE\u1FAF\u1FBC\u1FCC]/,
|
||
|
peg$c251 = peg$classExpectation(["\u01C5", "\u01C8", "\u01CB", "\u01F2", "\u1F88", "\u1F89", "\u1F8A", "\u1F8B", "\u1F8C", "\u1F8D", "\u1F8E", "\u1F8F", "\u1F98", "\u1F99", "\u1F9A", "\u1F9B", "\u1F9C", "\u1F9D", "\u1F9E", "\u1F9F", "\u1FA8", "\u1FA9", "\u1FAA", "\u1FAB", "\u1FAC", "\u1FAD", "\u1FAE", "\u1FAF", "\u1FBC", "\u1FCC"], false, false),
|
||
|
peg$c252 = peg$otherExpectation("Unicode modifier letter"),
|
||
|
peg$c253 = /^[\u02B0\u02B1\u02B2\u02B3\u02B4\u02B5\u02B6\u02B7\u02B8\u02B9\u02BA\u02BB\u02BC\u02BD\u02BE\u02BF\u02C0\u02C1\u02C6\u02C7\u02C8\u02C9\u02CA\u02CB\u02CC\u02CD\u02CE\u02CF\u02D0\u02D1\u02E0\u02E1\u02E2\u02E3\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5\u06E6\u07F4\u07F5\u07FA\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1C78\u1C79\u1C7A\u1C7B\u1C7C\u1C7D\u1D2C\u1D2D\u1D2E\u1D2F\u1D30\u1D31\u1D32\u1D33\u1D34\u1D35\u1D36\u1D37\u1D38\u1D39\u1D3A\u1D3B\u1D3C\u1D3D\u1D3E\u1D3F\u1D40\u1D41\u1D42\u1D43\u1D44\u1D45\u1D46\u1D47\u1D48\u1D49\u1D4A\u1D4B\u1D4C\u1D4D\u1D4E\u1D4F\u1D50\u1D51\u1D52\u1D53\u1D54\u1D55\u1D56\u1D57\u1D58\u1D59\u1D5A\u1D5B\u1D5C\u1D5D\u1D5E\u1D5F\u1D60\u1D61\u1D78\u1D9B\u1D9C\u1D9D\u1D9E\u1D9F\u1DA0\u1DA1\u1DA2\u1DA3\u1DA4\u1DA5\u1DA6\u1DA7\u1DA8\u1DA9\u1DAA\u1DAB\u1DAC\u1DAD\u1DAE\u1DAF\u1DB0\u1DB1\u1DB2\u1DB3\u1DB4\u1DB5\u1DB6\u1DB7\u1DB8\u1DB9\u1DBA\u1DBB\u1DBC\u1DBD\u1DBE\u1DBF\u2090\u2091\u2092\u2093\u2094\u2C7D\u2D6F\u2E2F\u3005\u3031\u3032\u3033\u3034\u3035\u303B\u309D\u309E\u30FC\u30FD\u30FE\uA015\uA60C\uA67F\uA717\uA718\uA719\uA71A\uA71B\uA71C\uA71D\uA71E\uA71F\uA770\uA788\uFF70\uFF9E\uFF9F]/,
|
||
|
peg$c254 = peg$classExpectation(["\u02B0", "\u02B1", "\u02B2", "\u02B3", "\u02B4", "\u02B5", "\u02B6", "\u02B7", "\u02B8", "\u02B9", "\u02BA", "\u02BB", "\u02BC", "\u02BD", "\u02BE", "\u02BF", "\u02C0", "\u02C1", "\u02C6", "\u02C7", "\u02C8", "\u02C9", "\u02CA", "\u02CB", "\u02CC", "\u02CD", "\u02CE", "\u02CF", "\u02D0", "\u02D1", "\u02E0", "\u02E1", "\u02E2", "\u02E3", "\u02E4", "\u02EC", "\u02EE", "\u0374", "\u037A", "\u0559", "\u0640", "\u06E5", "\u06E6", "\u07F4", "\u07F5", "\u07FA", "\u0971", "\u0E46", "\u0EC6", "\u10FC", "\u17D7", "\u1843", "\u1C78", "\u1C79", "\u1C7A", "\u1C7B", "\u1C7C", "\u1C7D", "\u1D2C", "\u1D2D", "\u1D2E", "\u1D2F", "\u1D30", "\u1D31", "\u1D32", "\u1D33", "\u1D34", "\u1D35", "\u1D36", "\u1D37", "\u1D38", "\u1D39", "\u1D3A", "\u1D3B", "\u1D3C", "\u1D3D", "\u1D3E", "\u1D3F", "\u1D40", "\u1D41", "\u1D42", "\u1D43", "\u1D44", "\u1D45", "\u1D46", "\u1D47", "\u1D48", "\u1D49", "\u1D4A", "\u1D4B", "\u1D4C", "\u1D4D", "\u1D4E", "\u1D4F", "\u1D50", "\u1D51", "\u1D52", "\u1D53", "\u1D54", "\u1D55", "\u1D56", "\u1D57", "\u1D58", "\u1D59", "\u1D5A", "\u1D5B", "\u1D5C", "\u1D5D", "\u1D5E", "\u1D5F", "\u1D60", "\u1D61", "\u1D78", "\u1D9B", "\u1D9C", "\u1D9D", "\u1D9E", "\u1D9F", "\u1DA0", "\u1DA1", "\u1DA2", "\u1DA3", "\u1DA4", "\u1DA5", "\u1DA6", "\u1DA7", "\u1DA8", "\u1DA9", "\u1DAA", "\u1DAB", "\u1DAC", "\u1DAD", "\u1DAE", "\u1DAF", "\u1DB0", "\u1DB1", "\u1DB2", "\u1DB3", "\u1DB4", "\u1DB5", "\u1DB6", "\u1DB7", "\u1DB8", "\u1DB9", "\u1DBA", "\u1DBB", "\u1DBC", "\u1DBD", "\u1DBE", "\u1DBF", "\u2090", "\u2091", "\u2092", "\u2093", "\u2094", "\u2C7D", "\u2D6F", "\u2E2F", "\u3005", "\u3031", "\u3032", "\u3033", "\u3034", "\u3035", "\u303B", "\u309D", "\u309E", "\u30FC", "\u30FD", "\u30FE", "\uA015", "\uA60C", "\uA67F", "\uA717", "\uA718", "\uA719", "\uA71A", "\uA71B", "\uA71C", "\uA71D", "\uA71E", "\uA71F", "\uA770", "\uA788", "\uFF70", "\uFF9E", "\uFF9F"], false, false),
|
||
|
peg$c255 = peg$otherExpectation("Unicode other letter"),
|
||
|
peg$c256 = /^[\u01BB\u01C0\u01C1\u01C2\u01C3\u0294\u05D0\u05D1\u05D2\u05D3\u05D4\u05D5\u05D6\u05D7\u05D8\u05D9\u05DA\u05DB\u05DC\u05DD\u05DE\u05DF\u05E0\u05E1\u05E2\u05E3\u05E4\u05E5\u05E6\u05E7\u05E8\u05E9\u05EA\u05F0\u05F1\u05F2\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u063B\u063C\u063D\u063E\u063F\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u066E\u066F\u0671\u0672\u0673\u0674\u0675\u0676\u0677\u0678\u0679\u067A\u067B\u067C\u067D\u067E\u067F\u0680\u0681\u0682\u0683\u0684\u0685\u0686\u0687\u0688\u0689\u068A\u068B\u068C\u068D\u068E\u068F\u0690\u0691\u0692\u0693\u0694\u0695\u0696\u0697\u0698\u0699\u069A\u069B\u069C\u069D\u069E\u069F\u06A0\u06A1\u06A2\u06A3\u06A4\u06A5\u06A6\u06A7\u06A8\u06A9\u06AA\u06AB\u06AC\u06AD\u06AE\u06AF\u06B0\u06B1\u06B2\u06B3\u06B4\u06B5\u06B6\u06B7\u06B8\u06B9\u06BA\u06BB\u06BC\u06BD\u06BE\u06BF\u06C0\u06C1\u06C2\u06C3\u06C4\u06C5\u06C6\u06C7\u06C8\u06C9\u06CA\u06CB\u06CC\u06CD\u06CE\u06CF\u06D0\u06D1\u06D2\u06D3\u06D5\u06EE\u06EF\u06FA\u06FB\u06FC\u06FF\u0710\u0712\u0713\u0714\u0715\u0716\u0717\u0718\u0719\u071A\u071B\u071C\u071D\u071E\u071F\u0720\u0721\u0722\u0723\u0724\u0725\u0726\u0727\u0728\u0729\u072A\u072B\u072C\u072D\u072E\u072F\u074D\u074E\u074F\u0750\u0751\u0752\u0753\u0754\u0755\u0756\u0757\u0758\u0759\u075A\u075B\u075C\u075D\u075E\u075F\u0760\u0761\u0762\u0763\u0764\u0765\u0766\u0767\u0768\u0769\u076A\u076B\u076C\u076D\u076E\u076F\u0770\u0771\u0772\u0773\u0774\u0775\u0776\u0777\u0778\u0779\u077A\u077B\u077C\u077D\u077E\u077F\u0780\u0781\u0782\u0783\u0784\u0785\u0786\u0787\u0788\u0789\u078A\u078B\u078C\u078D\u078E\u078F\u0790\u0791\u0792\u0793\u0794\u0795\u0796\u0797\u0798\u0799\u079A\u079B\u079C\u079D\u079E\u079F\u07A0\u07A1\u07A2\u07A3\u07A4\u07A5\u07B1\u07CA\u07CB\u07CC\u07CD\u07CE\u07CF\u07D0\u07D1\u07D2\u07D3\u07D4\u07D5\u07D6\u07D7\u07D8\u07D9\u07DA\u07DB\u07DC\u07DD\u07DE\u07DF\u07E0\u07E1\u07E2\u07E3\u07E4\u07E5\u07E6\u07E7\u07E8\u07E9\u07EA\u0904\u0905\u0906\u0907\u0908\u0909\u090A\u090B\u090C\u090D\u090E\u090F\u0910\u0911\u0912\u0913\u0914\u0915\u0916\u0917\u0918\u0919\u091A\u091B\u091C\u091D\u091E\u091F\u0920\u0921\u0922\u0923\u0924\u0925\u0926\u0927\u0928\u0929\u092A\u092B\u092C\u092D\u092E\u092F\u0930\u0931\u0932\u0933\u0934\u0935\u0936\u0937\u0938\u0939\u093D\u0950\u0958\u0959\u095A\u095B\u095C\u095D\u095E\u095F\u0960\u0961\u0972\u097B\u097C\u097D\u097E\u097F\u0985\u0986\u0987\u0988\u0989\u098A\u098B\u098C\u098F\u0990\u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099A\u099B\u099C\u099D\u099E\u099F\u09A0\u09A1\u09A2\u09A3\u09A4\u09A5\u09A6\u09A7\u09A8\u09AA\u09AB\u09AC\u09AD\u09AE\u09AF\u09B0\u09B2\u09B6\u09B7\u09B8\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF\u09E0\u09E1\u09F0\u09F1\u0A05\u0A06\u0A07\u0A08\u0A09\u0A0A\u0A0F\u0A10\u0A13\u0A14\u0A15\u0A16\u0A17\u0A18\u0A19\u0A1A\u0A1B\u0A1C\u0A1D\u0A1E\u0A1F\u0A20\u0A21\u0A22\u0A23\u0A24\u0A25\u0A26\u0A27\u0A28\u0A2A\u0A2B\u0A2C\u0A2D\u0A2E\u0A2F\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59\u0A5A\u0A5B\u0A5C\u0A5E\u0A72\u0A73\u0A74\u0A85\u0A86\u0A87\u0A88\u0A89\u0A8A\u0A8B\u0A8C\u0A8D\u0A8F\u0A90\u0A91\u0A93\u0A94\u0A95\u0A96\u0A97\u0A98\u0A99\u0A9A\u0A9B\u0A9C\u0A9D\u0A9E\u0A9F\u0AA0\u0AA1\u0AA2\u0AA3\u0AA4\u0AA5\u0AA6\u0AA7\u0AA8\u0AAA\u0AAB\u0AAC\u0AAD\u0AAE\u0AAF\u0AB0\u0AB2\u0AB3\u0AB5\u0AB6\u0AB7\u0AB8\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05\u0B06\u0B07\u0B08\u0B09\u0B0A\u0B0B\u0B0C\u0B0F\u0B10\u0B13\u0B14\u0B15\u0B16\u0B17\u0B18\u0B19\u0B1A\u0B1B\u0B1C\u0B1D\u0B1E\u0B1F\u0B20\u0B21\u0B22\u0B23\u0B24\u0B25\u0B26\u0B27\u0B28\u0B2A\u0B2B\u0B2C\u0B2D\u0B2E\u0B2F\u0B30\u0B32\u0B33\u0B35\u0B36\u0B37\u0B38\u0B39\u0B3D\u0B5C\u0B5D\u0B5F\u0B60\u0B61\u0B71\u0B83\u0B85\u0B86\u0B87\u0B88\u0B89\u0B8A\u0B8E\u0B8F\u0B90\u0B92\u0B93\u0B94\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BA9\u0BAA\u0BAE\u0BAF\u0BB0\u0BB1\u0BB2\u0BB3\u0BB4\u0BB5\u0BB6\u0BB7\u0BB8\u0BB9\u0BD0\u0C05\u0C06\u0C07\u0C08\u0C09\u0C0A\u0C0B\u0C0C\u0C0E\u0C0F\u0C10\u0C12\u0C13\u0C14\u0C15\u0C16\u0C17\u0C18\u0C19\u0C1A\u0C1B\u0C1C\
|
||
|
peg$c257 = peg$classExpectation(["\u01BB", "\u01C0", "\u01C1", "\u01C2", "\u01C3", "\u0294", "\u05D0", "\u05D1", "\u05D2", "\u05D3", "\u05D4", "\u05D5", "\u05D6", "\u05D7", "\u05D8", "\u05D9", "\u05DA", "\u05DB", "\u05DC", "\u05DD", "\u05DE", "\u05DF", "\u05E0", "\u05E1", "\u05E2", "\u05E3", "\u05E4", "\u05E5", "\u05E6", "\u05E7", "\u05E8", "\u05E9", "\u05EA", "\u05F0", "\u05F1", "\u05F2", "\u0621", "\u0622", "\u0623", "\u0624", "\u0625", "\u0626", "\u0627", "\u0628", "\u0629", "\u062A", "\u062B", "\u062C", "\u062D", "\u062E", "\u062F", "\u0630", "\u0631", "\u0632", "\u0633", "\u0634", "\u0635", "\u0636", "\u0637", "\u0638", "\u0639", "\u063A", "\u063B", "\u063C", "\u063D", "\u063E", "\u063F", "\u0641", "\u0642", "\u0643", "\u0644", "\u0645", "\u0646", "\u0647", "\u0648", "\u0649", "\u064A", "\u066E", "\u066F", "\u0671", "\u0672", "\u0673", "\u0674", "\u0675", "\u0676", "\u0677", "\u0678", "\u0679", "\u067A", "\u067B", "\u067C", "\u067D", "\u067E", "\u067F", "\u0680", "\u0681", "\u0682", "\u0683", "\u0684", "\u0685", "\u0686", "\u0687", "\u0688", "\u0689", "\u068A", "\u068B", "\u068C", "\u068D", "\u068E", "\u068F", "\u0690", "\u0691", "\u0692", "\u0693", "\u0694", "\u0695", "\u0696", "\u0697", "\u0698", "\u0699", "\u069A", "\u069B", "\u069C", "\u069D", "\u069E", "\u069F", "\u06A0", "\u06A1", "\u06A2", "\u06A3", "\u06A4", "\u06A5", "\u06A6", "\u06A7", "\u06A8", "\u06A9", "\u06AA", "\u06AB", "\u06AC", "\u06AD", "\u06AE", "\u06AF", "\u06B0", "\u06B1", "\u06B2", "\u06B3", "\u06B4", "\u06B5", "\u06B6", "\u06B7", "\u06B8", "\u06B9", "\u06BA", "\u06BB", "\u06BC", "\u06BD", "\u06BE", "\u06BF", "\u06C0", "\u06C1", "\u06C2", "\u06C3", "\u06C4", "\u06C5", "\u06C6", "\u06C7", "\u06C8", "\u06C9", "\u06CA", "\u06CB", "\u06CC", "\u06CD", "\u06CE", "\u06CF", "\u06D0", "\u06D1", "\u06D2", "\u06D3", "\u06D5", "\u06EE", "\u06EF", "\u06FA", "\u06FB", "\u06FC", "\u06FF", "\u0710", "\u0712", "\u0713", "\u0714", "\u0715", "\u0716", "\u0717", "\u0718", "\u0719", "\u071A", "\u071B", "\u071C", "\u071D", "\u071E", "\u071F", "\u0720", "\u0721", "\u0722", "\u0723", "\u0724", "\u0725", "\u0726", "\u0727", "\u0728", "\u0729", "\u072A", "\u072B", "\u072C", "\u072D", "\u072E", "\u072F", "\u074D", "\u074E", "\u074F", "\u0750", "\u0751", "\u0752", "\u0753", "\u0754", "\u0755", "\u0756", "\u0757", "\u0758", "\u0759", "\u075A", "\u075B", "\u075C", "\u075D", "\u075E", "\u075F", "\u0760", "\u0761", "\u0762", "\u0763", "\u0764", "\u0765", "\u0766", "\u0767", "\u0768", "\u0769", "\u076A", "\u076B", "\u076C", "\u076D", "\u076E", "\u076F", "\u0770", "\u0771", "\u0772", "\u0773", "\u0774", "\u0775", "\u0776", "\u0777", "\u0778", "\u0779", "\u077A", "\u077B", "\u077C", "\u077D", "\u077E", "\u077F", "\u0780", "\u0781", "\u0782", "\u0783", "\u0784", "\u0785", "\u0786", "\u0787", "\u0788", "\u0789", "\u078A", "\u078B", "\u078C", "\u078D", "\u078E", "\u078F", "\u0790", "\u0791", "\u0792", "\u0793", "\u0794", "\u0795", "\u0796", "\u0797", "\u0798", "\u0799", "\u079A", "\u079B", "\u079C", "\u079D", "\u079E", "\u079F", "\u07A0", "\u07A1", "\u07A2", "\u07A3", "\u07A4", "\u07A5", "\u07B1", "\u07CA", "\u07CB", "\u07CC", "\u07CD", "\u07CE", "\u07CF", "\u07D0", "\u07D1", "\u07D2", "\u07D3", "\u07D4", "\u07D5", "\u07D6", "\u07D7", "\u07D8", "\u07D9", "\u07DA", "\u07DB", "\u07DC", "\u07DD", "\u07DE", "\u07DF", "\u07E0", "\u07E1", "\u07E2", "\u07E3", "\u07E4", "\u07E5", "\u07E6", "\u07E7", "\u07E8", "\u07E9", "\u07EA", "\u0904", "\u0905", "\u0906", "\u0907", "\u0908", "\u0909", "\u090A", "\u090B", "\u090C", "\u090D", "\u090E", "\u090F", "\u0910", "\u0911", "\u0912", "\u0913", "\u0914", "\u0915", "\u0916", "\u0917", "\u0918", "\u0919", "\u091A", "\u091B", "\u091C", "\u091D", "\u091E", "\u091F", "\u0920", "\u0921", "\u0922", "\u0923", "\u0924", "\u0925", "\u0926", "\u0927", "\u0928", "\u0929", "\u092A", "\u092B", "\u092C", "\u092D", "\u092E", "\u092F", "\u0930", "\u0931", "\u0932", "\u0933", "\u0934", "\u0935", "\u0936", "\u0937", "\u0938", "\u0939", "\u093D", "\u0950", "\u0958", "\u0959", "\u095A", "\u095B", "\u095C", "\u095D", "\u095E", "\u095F", "\u0960", "\u0961", "\u097
|
||
|
peg$c258 = peg$otherExpectation("Unicode letter number"),
|
||
|
peg$c259 = /^[\u16EE\u16EF\u16F0\u2160\u2161\u2162\u2163\u2164\u2165\u2166\u2167\u2168\u2169\u216A\u216B\u216C\u216D\u216E\u216F\u2170\u2171\u2172\u2173\u2174\u2175\u2176\u2177\u2178\u2179\u217A\u217B\u217C\u217D\u217E\u217F\u2180\u2181\u2182\u2185\u2186\u2187\u2188\u3007\u3021\u3022\u3023\u3024\u3025\u3026\u3027\u3028\u3029\u3038\u3039\u303A]/,
|
||
|
peg$c260 = peg$classExpectation(["\u16EE", "\u16EF", "\u16F0", "\u2160", "\u2161", "\u2162", "\u2163", "\u2164", "\u2165", "\u2166", "\u2167", "\u2168", "\u2169", "\u216A", "\u216B", "\u216C", "\u216D", "\u216E", "\u216F", "\u2170", "\u2171", "\u2172", "\u2173", "\u2174", "\u2175", "\u2176", "\u2177", "\u2178", "\u2179", "\u217A", "\u217B", "\u217C", "\u217D", "\u217E", "\u217F", "\u2180", "\u2181", "\u2182", "\u2185", "\u2186", "\u2187", "\u2188", "\u3007", "\u3021", "\u3022", "\u3023", "\u3024", "\u3025", "\u3026", "\u3027", "\u3028", "\u3029", "\u3038", "\u3039", "\u303A"], false, false),
|
||
|
peg$c261 = peg$otherExpectation("Unicode separator, space"),
|
||
|
peg$c262 = /^[ \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000]/,
|
||
|
peg$c263 = peg$classExpectation([" ", "\xA0", "\u1680", "\u180E", "\u2000", "\u2001", "\u2002", "\u2003", "\u2004", "\u2005", "\u2006", "\u2007", "\u2008", "\u2009", "\u200A", "\u202F", "\u205F", "\u3000"], false, false),
|
||
|
peg$c264 = function(c) {
|
||
|
return c;
|
||
|
},
|
||
|
peg$c265 = function(seq) {
|
||
|
return seq;
|
||
|
},
|
||
|
peg$c266 = "\n",
|
||
|
peg$c267 = peg$literalExpectation("\n", false),
|
||
|
peg$c268 = "\r",
|
||
|
peg$c269 = peg$literalExpectation("\r", false),
|
||
|
peg$c270 = "\u2028",
|
||
|
peg$c271 = peg$literalExpectation("\u2028", false),
|
||
|
peg$c272 = "\u2029",
|
||
|
peg$c273 = peg$literalExpectation("\u2029", false),
|
||
|
peg$c274 = "\r\n",
|
||
|
peg$c275 = peg$literalExpectation("\r\n", false),
|
||
|
peg$c276 = function() {
|
||
|
return '0';
|
||
|
},
|
||
|
peg$c277 = /^['"\\bfnrtv]/,
|
||
|
peg$c278 = peg$classExpectation(["'", "\"", "\\", "b", "f", "n", "r", "t", "v"], false, false),
|
||
|
peg$c279 = "x",
|
||
|
peg$c280 = peg$literalExpectation("x", false),
|
||
|
peg$c281 = peg$anyExpectation(),
|
||
|
peg$c282 = peg$otherExpectation("whitespace"),
|
||
|
peg$c283 = peg$otherExpectation("empty"),
|
||
|
peg$c284 = "",
|
||
|
peg$c285 = /^[\t\x0B\f \xA0\uFEFF]/,
|
||
|
peg$c286 = peg$classExpectation(["\t", "\x0B", "\f", " ", "\xA0", "\uFEFF"], false, false),
|
||
|
|
||
|
peg$currPos = 0,
|
||
|
peg$savedPos = 0,
|
||
|
peg$posDetailsCache = [{ line: 1, column: 1 }],
|
||
|
peg$maxFailPos = 0,
|
||
|
peg$maxFailExpected = [],
|
||
|
peg$silentFails = 0,
|
||
|
|
||
|
peg$result;
|
||
|
|
||
|
if ("startRule" in options) {
|
||
|
if (!(options.startRule in peg$startRuleFunctions)) {
|
||
|
throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
|
||
|
}
|
||
|
|
||
|
peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
|
||
|
}
|
||
|
|
||
|
function text() {
|
||
|
return input.substring(peg$savedPos, peg$currPos);
|
||
|
}
|
||
|
|
||
|
function location() {
|
||
|
return peg$computeLocation(peg$savedPos, peg$currPos);
|
||
|
}
|
||
|
|
||
|
function expected(description, location) {
|
||
|
location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)
|
||
|
|
||
|
throw peg$buildStructuredError(
|
||
|
[peg$otherExpectation(description)],
|
||
|
input.substring(peg$savedPos, peg$currPos),
|
||
|
location
|
||
|
);
|
||
|
}
|
||
|
|
||
|
function error(message, location) {
|
||
|
location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)
|
||
|
|
||
|
throw peg$buildSimpleError(message, location);
|
||
|
}
|
||
|
|
||
|
function peg$literalExpectation(text, ignoreCase) {
|
||
|
return { type: "literal", text: text, ignoreCase: ignoreCase };
|
||
|
}
|
||
|
|
||
|
function peg$classExpectation(parts, inverted, ignoreCase) {
|
||
|
return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };
|
||
|
}
|
||
|
|
||
|
function peg$anyExpectation() {
|
||
|
return { type: "any" };
|
||
|
}
|
||
|
|
||
|
function peg$endExpectation() {
|
||
|
return { type: "end" };
|
||
|
}
|
||
|
|
||
|
function peg$otherExpectation(description) {
|
||
|
return { type: "other", description: description };
|
||
|
}
|
||
|
|
||
|
function peg$computePosDetails(pos) {
|
||
|
var details = peg$posDetailsCache[pos], p;
|
||
|
|
||
|
if (details) {
|
||
|
return details;
|
||
|
} else {
|
||
|
p = pos - 1;
|
||
|
while (!peg$posDetailsCache[p]) {
|
||
|
p--;
|
||
|
}
|
||
|
|
||
|
details = peg$posDetailsCache[p];
|
||
|
details = {
|
||
|
line: details.line,
|
||
|
column: details.column
|
||
|
};
|
||
|
|
||
|
while (p < pos) {
|
||
|
if (input.charCodeAt(p) === 10) {
|
||
|
details.line++;
|
||
|
details.column = 1;
|
||
|
} else {
|
||
|
details.column++;
|
||
|
}
|
||
|
|
||
|
p++;
|
||
|
}
|
||
|
|
||
|
peg$posDetailsCache[pos] = details;
|
||
|
return details;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function peg$computeLocation(startPos, endPos) {
|
||
|
var startPosDetails = peg$computePosDetails(startPos),
|
||
|
endPosDetails = peg$computePosDetails(endPos);
|
||
|
|
||
|
return {
|
||
|
start: {
|
||
|
offset: startPos,
|
||
|
line: startPosDetails.line,
|
||
|
column: startPosDetails.column
|
||
|
},
|
||
|
end: {
|
||
|
offset: endPos,
|
||
|
line: endPosDetails.line,
|
||
|
column: endPosDetails.column
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
function peg$fail(expected) {
|
||
|
if (peg$currPos < peg$maxFailPos) { return; }
|
||
|
|
||
|
if (peg$currPos > peg$maxFailPos) {
|
||
|
peg$maxFailPos = peg$currPos;
|
||
|
peg$maxFailExpected = [];
|
||
|
}
|
||
|
|
||
|
peg$maxFailExpected.push(expected);
|
||
|
}
|
||
|
|
||
|
function peg$buildSimpleError(message, location) {
|
||
|
return new peg$SyntaxError(message, null, null, location);
|
||
|
}
|
||
|
|
||
|
function peg$buildStructuredError(expected, found, location) {
|
||
|
return new peg$SyntaxError(
|
||
|
peg$SyntaxError.buildMessage(expected, found),
|
||
|
expected,
|
||
|
found,
|
||
|
location
|
||
|
);
|
||
|
}
|
||
|
|
||
|
function peg$parseTypeExpression() {
|
||
|
var s0, s1, s2, s3, s4;
|
||
|
|
||
|
s0 = peg$parseTypeUnionLegacySyntax();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRepeatable();
|
||
|
if (s1 === peg$FAILED) {
|
||
|
s1 = null;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseUnknownLiteral();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
s4 = peg$parseBasicTypeExpression();
|
||
|
peg$silentFails--;
|
||
|
if (s4 === peg$FAILED) {
|
||
|
s3 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c0(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRepeatable();
|
||
|
if (s1 === peg$FAILED) {
|
||
|
s1 = null;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 63) {
|
||
|
s2 = peg$c1;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c2); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 33) {
|
||
|
s2 = peg$c3;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c4); }
|
||
|
}
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parseBasicTypeExpressionNonRepeatable();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c5(s1, s2, s3);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseBasicTypeExpression();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseOptional();
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 63) {
|
||
|
s3 = peg$c1;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c2); }
|
||
|
}
|
||
|
if (s3 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 33) {
|
||
|
s3 = peg$c3;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c4); }
|
||
|
}
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parseOptional();
|
||
|
if (s4 === peg$FAILED) {
|
||
|
s4 = null;
|
||
|
}
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c6(s1, s2, s3, s4);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseBasicTypeExpression();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 63) {
|
||
|
s2 = peg$c1;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c2); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 33) {
|
||
|
s2 = peg$c3;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c4); }
|
||
|
}
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c7(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseBasicTypeExpression() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseTypeUnion();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseRestrictedTypeExpression();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseRestrictedTypeExpression() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseFunctionType();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseRecordType();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseLiteralType();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseNameExpressionType();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseBasicTypeExpressionNonRepeatable() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseTypeUnionNonRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseRestrictedTypeExpressionNonRepeatable();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseRestrictedTypeExpressionNonRepeatable() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseFunctionTypeNonRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseRecordTypeNonRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseLiteralTypeNonRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseNameExpressionTypeNonRepeatable();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseModifiedRestrictedTypeExpression() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseModifiedRestrictedTypeExpressionRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseModifiedRestrictedTypeExpressionNonRepeatable();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseModifiedRestrictedTypeExpressionNonRepeatable() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 63) {
|
||
|
s1 = peg$c1;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c2); }
|
||
|
}
|
||
|
if (s1 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 33) {
|
||
|
s1 = peg$c3;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c4); }
|
||
|
}
|
||
|
}
|
||
|
if (s1 === peg$FAILED) {
|
||
|
s1 = null;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseRestrictedTypeExpressionNonRepeatable();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c8(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRestrictedTypeExpressionNonRepeatable();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 63) {
|
||
|
s2 = peg$c1;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c2); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 33) {
|
||
|
s2 = peg$c3;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c4); }
|
||
|
}
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c9(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseModifiedRestrictedTypeExpressionRepeatable() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRepeatable();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseModifiedRestrictedTypeExpressionNonRepeatable();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c10(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseLiteralType() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseLiteralTypeRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseLiteralTypeNonRepeatable();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseLiteralTypeNonRepeatable() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseLiteral();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseOptional();
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c11(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseLiteralTypeRepeatable() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRepeatable();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseLiteralTypeNonRepeatable();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c12(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseLiteral() {
|
||
|
var s0, s1;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 42) {
|
||
|
s1 = peg$c13;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c14); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c15();
|
||
|
}
|
||
|
s0 = s1;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseUnknownLiteral();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseNullLiteral();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c16();
|
||
|
}
|
||
|
s0 = s1;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseUndefinedLiteral();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c17();
|
||
|
}
|
||
|
s0 = s1;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseRepeatable() {
|
||
|
var s0, s1;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.substr(peg$currPos, 3) === peg$c18) {
|
||
|
s1 = peg$c18;
|
||
|
peg$currPos += 3;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c19); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c20();
|
||
|
}
|
||
|
s0 = s1;
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseOptional() {
|
||
|
var s0, s1;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 61) {
|
||
|
s1 = peg$c21;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c22); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c23();
|
||
|
}
|
||
|
s0 = s1;
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseNameExpressionType() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseNameExpressionTypeRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseNameExpressionTypeNonRepeatable();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseNameExpressionTypeNonRepeatable() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseNameExpression();
|
||
|
if (s1 === peg$FAILED) {
|
||
|
s1 = peg$parseReservedWordNameExpressionTypeNonRepeatable();
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = [];
|
||
|
if (input.substr(peg$currPos, 2) === peg$c24) {
|
||
|
s3 = peg$c24;
|
||
|
peg$currPos += 2;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c25); }
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
while (s3 !== peg$FAILED) {
|
||
|
s2.push(s3);
|
||
|
if (input.substr(peg$currPos, 2) === peg$c24) {
|
||
|
s3 = peg$c24;
|
||
|
peg$currPos += 2;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c25); }
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c26(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseNameExpression();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseTypeApplication();
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parseOptional();
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s3 = null;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c27(s1, s2, s3);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseReservedWordNameExpressionTypeNonRepeatable();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseNameExpressionTypeRepeatable() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRepeatable();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseNameExpressionTypeNonRepeatable();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c28(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseReservedWordNameExpressionType() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseReservedWordNameExpressionTypeRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseReservedWordNameExpressionTypeNonRepeatable();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseReservedWordNameExpressionTypeNonRepeatable() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseReservedWordNameExpression();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseOptional();
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c29(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseReservedWordNameExpressionTypeRepeatable() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRepeatable();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseReservedWordNameExpressionTypeNonRepeatable();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c28(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseTypeApplication() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 46) {
|
||
|
s1 = peg$c30;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c31); }
|
||
|
}
|
||
|
if (s1 === peg$FAILED) {
|
||
|
s1 = null;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 60) {
|
||
|
s2 = peg$c32;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c33); }
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parse_();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parseTypeExpressionList();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parse_();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 62) {
|
||
|
s6 = peg$c34;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s6 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c35); }
|
||
|
}
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c36(s1, s4);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseTypeExpressionList() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6, s7;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseTypeExpression();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = [];
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s5 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parse_();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseTypeExpression();
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
s4 = [s4, s5, s6, s7];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
while (s3 !== peg$FAILED) {
|
||
|
s2.push(s3);
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s5 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parse_();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseTypeExpression();
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
s4 = [s4, s5, s6, s7];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c39(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFunctionType() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseFunctionTypeRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseFunctionTypeNonRepeatable();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFunctionTypeNonRepeatable() {
|
||
|
var s0, s1, s2, s3, s4, s5;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseFunctionLiteral();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 2) === peg$c24) {
|
||
|
s2 = peg$c24;
|
||
|
peg$currPos += 2;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c25); }
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c40();
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseFunctionLiteral();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
s3 = peg$parseNameExpression();
|
||
|
peg$silentFails--;
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s2 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parse_();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parseFunctionSignatureType();
|
||
|
if (s4 === peg$FAILED) {
|
||
|
s4 = null;
|
||
|
}
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parseOptional();
|
||
|
if (s5 === peg$FAILED) {
|
||
|
s5 = null;
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c41(s4, s5);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFunctionTypeRepeatable() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRepeatable();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseFunctionTypeNonRepeatable();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c28(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFunctionSignatureType() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 40) {
|
||
|
s1 = peg$c42;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c43); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parse_();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parseFunctionSignature();
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s3 = null;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 41) {
|
||
|
s5 = peg$c44;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c45); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$currPos;
|
||
|
s7 = peg$parse_();
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 58) {
|
||
|
s8 = peg$c46;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s8 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c47); }
|
||
|
}
|
||
|
if (s8 !== peg$FAILED) {
|
||
|
s9 = peg$parse_();
|
||
|
if (s9 !== peg$FAILED) {
|
||
|
s10 = peg$parseTypeExpression();
|
||
|
if (s10 !== peg$FAILED) {
|
||
|
s7 = [s7, s8, s9, s10];
|
||
|
s6 = s7;
|
||
|
} else {
|
||
|
peg$currPos = s6;
|
||
|
s6 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s6;
|
||
|
s6 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s6;
|
||
|
s6 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s6;
|
||
|
s6 = peg$FAILED;
|
||
|
}
|
||
|
if (s6 === peg$FAILED) {
|
||
|
s6 = null;
|
||
|
}
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c48(s3, s6);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFunctionSignature() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6, s7;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseFunctionSignatureNew();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
s3 = peg$parse_();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s4 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s4 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parse_();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parseFunctionSignatureThis();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s3 = [s3, s4, s5, s6];
|
||
|
s2 = s3;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s5 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parse_();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseParametersType();
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
s4 = [s4, s5, s6, s7];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s3 = null;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c49(s1, s2, s3);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseFunctionSignatureThis();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
s3 = peg$parse_();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s4 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s4 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parse_();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parseFunctionSignatureNew();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s3 = [s3, s4, s5, s6];
|
||
|
s2 = s3;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s5 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parse_();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseParametersType();
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
s4 = [s4, s5, s6, s7];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s3 = null;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c50(s1, s2, s3);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseParametersType();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c51(s1);
|
||
|
}
|
||
|
s0 = s1;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFunctionSignatureNew() {
|
||
|
var s0, s1, s2, s3, s4, s5;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.substr(peg$currPos, 3) === peg$c52) {
|
||
|
s1 = peg$c52;
|
||
|
peg$currPos += 3;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c53); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parse_();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 58) {
|
||
|
s3 = peg$c46;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c47); }
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parseTypeExpression();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c54(s5);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFunctionSignatureThis() {
|
||
|
var s0, s1, s2, s3, s4, s5;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.substr(peg$currPos, 4) === peg$c55) {
|
||
|
s1 = peg$c55;
|
||
|
peg$currPos += 4;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c56); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parse_();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 58) {
|
||
|
s3 = peg$c46;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c47); }
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parseTypeExpression();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c54(s5);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseParametersType() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRestParameterType();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c57(s1);
|
||
|
}
|
||
|
s0 = s1;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseNonRestParametersType();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
s3 = peg$parse_();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s4 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s4 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parse_();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parseRestParameterType();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s3 = [s3, s4, s5, s6];
|
||
|
s2 = s3;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c58(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseNonRestParametersType() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6, s7;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseParameterType();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = [];
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s5 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parse_();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseParameterType();
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
s4 = [s4, s5, s6, s7];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
while (s3 !== peg$FAILED) {
|
||
|
s2.push(s3);
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s5 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parse_();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseParameterType();
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
s4 = [s4, s5, s6, s7];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c59(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseOptionalParametersType();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseOptionalParametersType() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6, s7;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseOptionalParameterType();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = [];
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s5 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parse_();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseOptionalParameterType();
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
s4 = [s4, s5, s6, s7];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
while (s3 !== peg$FAILED) {
|
||
|
s2.push(s3);
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s5 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parse_();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseOptionalParameterType();
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
s4 = [s4, s5, s6, s7];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c60(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseParameterType() {
|
||
|
var s0, s1;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseTypeExpression();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c61(s1);
|
||
|
}
|
||
|
s0 = s1;
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseOptionalParameterType() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseParameterType();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseOptional();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c62(s1);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseRestParameterType() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRepeatable();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 91) {
|
||
|
s2 = peg$c63;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c64); }
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parse_();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parseParameterType();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parse_();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 93) {
|
||
|
s6 = peg$c65;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s6 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c66); }
|
||
|
}
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c28(s4);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRepeatable();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseParameterType();
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c67(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRepeatable();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
if (input.charCodeAt(peg$currPos) === 91) {
|
||
|
s3 = peg$c63;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c64); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s2 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c68();
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseTypeUnion() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseTypeUnionRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseTypeUnionNonRepeatable();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseTypeUnionNonRepeatable() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6, s7;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parse_();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 40) {
|
||
|
s2 = peg$c42;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c43); }
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parse_();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parseTypeUnionList();
|
||
|
if (s4 === peg$FAILED) {
|
||
|
s4 = null;
|
||
|
}
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parse_();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 41) {
|
||
|
s6 = peg$c44;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s6 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c45); }
|
||
|
}
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseOptional();
|
||
|
if (s7 === peg$FAILED) {
|
||
|
s7 = null;
|
||
|
}
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c69(s4, s7);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseTypeUnionRepeatable() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRepeatable();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseTypeUnionNonRepeatable();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c70(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseTypeUnionList() {
|
||
|
var s0, s1, s2, s3, s4, s5;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseTypeExpression();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = [];
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parseTypeUnionSeparator();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parseTypeExpression();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s4 = [s4, s5];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
while (s3 !== peg$FAILED) {
|
||
|
s2.push(s3);
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parseTypeUnionSeparator();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parseTypeExpression();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s4 = [s4, s5];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c71(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseRestrictedTypeUnionList() {
|
||
|
var s0, s1, s2, s3, s4, s5;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseModifiedRestrictedTypeExpression();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = [];
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parseTypeUnionSeparator();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parseModifiedRestrictedTypeExpression();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s4 = [s4, s5];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
while (s3 !== peg$FAILED) {
|
||
|
s2.push(s3);
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parseTypeUnionSeparator();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parseModifiedRestrictedTypeExpression();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s4 = [s4, s5];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c72(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseTypeUnionLegacySyntax() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6, s7;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parse_();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
if (input.charCodeAt(peg$currPos) === 40) {
|
||
|
s3 = peg$c42;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c43); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s2 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parse_();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parseRestrictedTypeUnionList();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parse_();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
if (input.charCodeAt(peg$currPos) === 41) {
|
||
|
s7 = peg$c44;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s7 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c45); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s7 === peg$FAILED) {
|
||
|
s6 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s6;
|
||
|
s6 = peg$FAILED;
|
||
|
}
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c73(s4);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseTypeUnionSeparator() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parse_();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 124) {
|
||
|
s2 = peg$c74;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c75); }
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parse_();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c76();
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseRecordType() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseRecordTypeRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseRecordTypeNonRepeatable();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseRecordTypeNonRepeatable() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6, s7;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parse_();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 123) {
|
||
|
s2 = peg$c77;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c78); }
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parse_();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parseFieldTypeList();
|
||
|
if (s4 === peg$FAILED) {
|
||
|
s4 = null;
|
||
|
}
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parse_();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 125) {
|
||
|
s6 = peg$c79;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s6 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c80); }
|
||
|
}
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseOptional();
|
||
|
if (s7 === peg$FAILED) {
|
||
|
s7 = null;
|
||
|
}
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c81(s4, s7);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseRecordTypeRepeatable() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseRepeatable();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseRecordTypeNonRepeatable();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c28(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFieldTypeList() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6, s7;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseFieldType();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = [];
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s5 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parse_();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseFieldType();
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
s4 = [s4, s5, s6, s7];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
while (s3 !== peg$FAILED) {
|
||
|
s2.push(s3);
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 44) {
|
||
|
s5 = peg$c37;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c38); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parse_();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseFieldType();
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
s4 = [s4, s5, s6, s7];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c82(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFieldType() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseFieldName();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
s3 = peg$parse_();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 58) {
|
||
|
s4 = peg$c46;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s4 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c47); }
|
||
|
}
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parse_();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parseTypeExpression();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s3 = [s3, s4, s5, s6];
|
||
|
s2 = s3;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c83(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFieldName() {
|
||
|
var s0, s1;
|
||
|
|
||
|
s0 = peg$parseNameExpressionTypeNonRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseReservedWordNameExpressionTypeNonRepeatable();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseTypeExpression();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c84(s1);
|
||
|
}
|
||
|
s0 = s1;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseNameExpression() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseDoubleStringLiteral();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c85(s1);
|
||
|
}
|
||
|
s0 = s1;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseSingleStringLiteral();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c86(s1);
|
||
|
}
|
||
|
s0 = s1;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseIdentifier();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parsePropertyChain();
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c87(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseReservedWordNameExpression() {
|
||
|
var s0, s1;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseReservedWord();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c88(s1);
|
||
|
}
|
||
|
s0 = s1;
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parsePropertyIdentifier() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
s0 = peg$parseIdentifier();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseDoubleStringLiteral();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c89(s1);
|
||
|
}
|
||
|
s0 = s1;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseSingleStringLiteral();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c90(s1);
|
||
|
}
|
||
|
s0 = s1;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseNumericLiteral();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseKeyword();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
if (input.charCodeAt(peg$currPos) === 40) {
|
||
|
s3 = peg$c42;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c43); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s2 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s1 = [s1, s2];
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseFutureReservedWord();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parsePropertyChain() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = [];
|
||
|
s2 = peg$parsePropertyChainItem();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
while (s2 !== peg$FAILED) {
|
||
|
s1.push(s2);
|
||
|
s2 = peg$parsePropertyChainItem();
|
||
|
}
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s0 = input.substring(s0, peg$currPos);
|
||
|
} else {
|
||
|
s0 = s1;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parsePropertyChainItem() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 46) {
|
||
|
s1 = peg$c30;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c31); }
|
||
|
}
|
||
|
if (s1 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 35) {
|
||
|
s1 = peg$c91;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c92); }
|
||
|
}
|
||
|
if (s1 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 126) {
|
||
|
s1 = peg$c93;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c94); }
|
||
|
}
|
||
|
if (s1 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 58) {
|
||
|
s1 = peg$c46;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c47); }
|
||
|
}
|
||
|
if (s1 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 47) {
|
||
|
s1 = peg$c95;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c96); }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
if (input.charCodeAt(peg$currPos) === 60) {
|
||
|
s3 = peg$c32;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c33); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s2 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parsePropertyIdentifier();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c97(s1, s3);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseNamespaceExpression() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseNameExpression();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseStringLiteral();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseIdentifier() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
s2 = peg$parseReservedWord();
|
||
|
peg$silentFails--;
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s1 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseIdentifierName();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c98(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseIdentifierName() {
|
||
|
var s0, s1, s2, s3, s4;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$currPos;
|
||
|
s2 = peg$parseIdentifierStart();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = [];
|
||
|
s4 = peg$parseIdentifierPart();
|
||
|
while (s4 !== peg$FAILED) {
|
||
|
s3.push(s4);
|
||
|
s4 = peg$parseIdentifierPart();
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parseIdentifierEnd();
|
||
|
if (s4 === peg$FAILED) {
|
||
|
s4 = null;
|
||
|
}
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s2 = [s2, s3, s4];
|
||
|
s1 = s2;
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s0 = input.substring(s0, peg$currPos);
|
||
|
} else {
|
||
|
s0 = s1;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseIdentifierStart() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseUnicodeLetter();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseNumericLiteral();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 36) {
|
||
|
s0 = peg$c99;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c100); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 95) {
|
||
|
s0 = peg$c101;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c102); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 64) {
|
||
|
s0 = peg$c103;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c104); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseUnicodeEscapeSequenceLiteral();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseIdentifierPart() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseIdentifierStart();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 45) {
|
||
|
s0 = peg$c105;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c106); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseUnicodeMc();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseUnicodeNd();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseUnicodePc();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 8204) {
|
||
|
s0 = peg$c107;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c108); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 8205) {
|
||
|
s0 = peg$c109;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c110); }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseIdentifierEnd() {
|
||
|
var s0, s1, s2, s3, s4, s5;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 40) {
|
||
|
s1 = peg$c42;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c43); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parse_();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = [];
|
||
|
s4 = peg$parseIdentifierPart();
|
||
|
while (s4 !== peg$FAILED) {
|
||
|
s3.push(s4);
|
||
|
s4 = peg$parseIdentifierPart();
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 41) {
|
||
|
s5 = peg$c44;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c45); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c111(s3);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 40) {
|
||
|
s1 = peg$c42;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c43); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parse_();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parseParametersType();
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s3 = null;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parse_();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 41) {
|
||
|
s5 = peg$c44;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s5 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c45); }
|
||
|
}
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c112(s3);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseIdentifierPart();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseReservedWord() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseKeyword();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseFutureReservedWord();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseNullLiteral();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseBooleanLiteral();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseKeyword() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$currPos;
|
||
|
if (input.substr(peg$currPos, 5) === peg$c113) {
|
||
|
s2 = peg$c113;
|
||
|
peg$currPos += 5;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c114); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 4) === peg$c115) {
|
||
|
s2 = peg$c115;
|
||
|
peg$currPos += 4;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c116); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 5) === peg$c117) {
|
||
|
s2 = peg$c117;
|
||
|
peg$currPos += 5;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c118); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 8) === peg$c119) {
|
||
|
s2 = peg$c119;
|
||
|
peg$currPos += 8;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c120); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 8) === peg$c121) {
|
||
|
s2 = peg$c121;
|
||
|
peg$currPos += 8;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c122); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 7) === peg$c123) {
|
||
|
s2 = peg$c123;
|
||
|
peg$currPos += 7;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c124); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 6) === peg$c125) {
|
||
|
s2 = peg$c125;
|
||
|
peg$currPos += 6;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c126); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 2) === peg$c127) {
|
||
|
s2 = peg$c127;
|
||
|
peg$currPos += 2;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c128); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 4) === peg$c129) {
|
||
|
s2 = peg$c129;
|
||
|
peg$currPos += 4;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c130); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 7) === peg$c131) {
|
||
|
s2 = peg$c131;
|
||
|
peg$currPos += 7;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c132); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 3) === peg$c133) {
|
||
|
s2 = peg$c133;
|
||
|
peg$currPos += 3;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c134); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = peg$parseFunctionLiteralLc();
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 2) === peg$c135) {
|
||
|
s2 = peg$c135;
|
||
|
peg$currPos += 2;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c136); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 2) === peg$c137) {
|
||
|
s2 = peg$c137;
|
||
|
peg$currPos += 2;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c138); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 10) === peg$c139) {
|
||
|
s2 = peg$c139;
|
||
|
peg$currPos += 10;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c140); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 3) === peg$c52) {
|
||
|
s2 = peg$c52;
|
||
|
peg$currPos += 3;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c53); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 6) === peg$c141) {
|
||
|
s2 = peg$c141;
|
||
|
peg$currPos += 6;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c142); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 6) === peg$c143) {
|
||
|
s2 = peg$c143;
|
||
|
peg$currPos += 6;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c144); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 4) === peg$c55) {
|
||
|
s2 = peg$c55;
|
||
|
peg$currPos += 4;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c56); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 5) === peg$c145) {
|
||
|
s2 = peg$c145;
|
||
|
peg$currPos += 5;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c146); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 3) === peg$c147) {
|
||
|
s2 = peg$c147;
|
||
|
peg$currPos += 3;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c148); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 6) === peg$c149) {
|
||
|
s2 = peg$c149;
|
||
|
peg$currPos += 6;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c150); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 3) === peg$c151) {
|
||
|
s2 = peg$c151;
|
||
|
peg$currPos += 3;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c152); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 4) === peg$c153) {
|
||
|
s2 = peg$c153;
|
||
|
peg$currPos += 4;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c154); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 5) === peg$c155) {
|
||
|
s2 = peg$c155;
|
||
|
peg$currPos += 5;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c156); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 4) === peg$c157) {
|
||
|
s2 = peg$c157;
|
||
|
peg$currPos += 4;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c158); }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s1 = input.substring(s1, peg$currPos);
|
||
|
} else {
|
||
|
s1 = s2;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
s3 = peg$parseIdentifierPart();
|
||
|
peg$silentFails--;
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s2 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c159(s1);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFutureReservedWord() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$currPos;
|
||
|
if (input.substr(peg$currPos, 5) === peg$c160) {
|
||
|
s2 = peg$c160;
|
||
|
peg$currPos += 5;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c161); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 5) === peg$c162) {
|
||
|
s2 = peg$c162;
|
||
|
peg$currPos += 5;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c163); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 4) === peg$c164) {
|
||
|
s2 = peg$c164;
|
||
|
peg$currPos += 4;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c165); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 6) === peg$c166) {
|
||
|
s2 = peg$c166;
|
||
|
peg$currPos += 6;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c167); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 7) === peg$c168) {
|
||
|
s2 = peg$c168;
|
||
|
peg$currPos += 7;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c169); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 6) === peg$c170) {
|
||
|
s2 = peg$c170;
|
||
|
peg$currPos += 6;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c171); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 5) === peg$c172) {
|
||
|
s2 = peg$c172;
|
||
|
peg$currPos += 5;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c173); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 10) === peg$c174) {
|
||
|
s2 = peg$c174;
|
||
|
peg$currPos += 10;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c175); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 9) === peg$c176) {
|
||
|
s2 = peg$c176;
|
||
|
peg$currPos += 9;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c177); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 3) === peg$c178) {
|
||
|
s2 = peg$c178;
|
||
|
peg$currPos += 3;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c179); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 7) === peg$c180) {
|
||
|
s2 = peg$c180;
|
||
|
peg$currPos += 7;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c181); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 7) === peg$c182) {
|
||
|
s2 = peg$c182;
|
||
|
peg$currPos += 7;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c183); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 9) === peg$c184) {
|
||
|
s2 = peg$c184;
|
||
|
peg$currPos += 9;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c185); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 6) === peg$c186) {
|
||
|
s2 = peg$c186;
|
||
|
peg$currPos += 6;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c187); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 6) === peg$c188) {
|
||
|
s2 = peg$c188;
|
||
|
peg$currPos += 6;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c189); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 5) === peg$c190) {
|
||
|
s2 = peg$c190;
|
||
|
peg$currPos += 5;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c191); }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s1 = input.substring(s1, peg$currPos);
|
||
|
} else {
|
||
|
s1 = s2;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
s3 = peg$parseIdentifierPart();
|
||
|
peg$silentFails--;
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s2 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c192(s1);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseStringLiteral() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseDoubleStringLiteral();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseSingleStringLiteral();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseDoubleStringLiteral() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 34) {
|
||
|
s1 = peg$c193;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c194); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = [];
|
||
|
s3 = peg$parseDoubleStringCharacter();
|
||
|
while (s3 !== peg$FAILED) {
|
||
|
s2.push(s3);
|
||
|
s3 = peg$parseDoubleStringCharacter();
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 34) {
|
||
|
s3 = peg$c193;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c194); }
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c195(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseSingleStringLiteral() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 39) {
|
||
|
s1 = peg$c196;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c197); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = [];
|
||
|
s3 = peg$parseSingleStringCharacter();
|
||
|
while (s3 !== peg$FAILED) {
|
||
|
s2.push(s3);
|
||
|
s3 = peg$parseSingleStringCharacter();
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 39) {
|
||
|
s3 = peg$c196;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c197); }
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c195(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseNumericLiteral() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseDecimalLiteral();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseHexIntegerLiteral();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseDecimalLiteral() {
|
||
|
var s0, s1, s2, s3, s4;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseDecimalIntegerLiteral();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 46) {
|
||
|
s2 = peg$c30;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c31); }
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parseDecimalDigits();
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s3 = null;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s4 = peg$parseExponentPart();
|
||
|
if (s4 === peg$FAILED) {
|
||
|
s4 = null;
|
||
|
}
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c198(s1, s3, s4);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 46) {
|
||
|
s1 = peg$c30;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c31); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseDecimalDigits();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parseExponentPart();
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s3 = null;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c199(s2, s3);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$parseDecimalIntegerLiteral();
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseExponentPart();
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c200(s1, s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseDecimalIntegerLiteral() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
if (input.charCodeAt(peg$currPos) === 48) {
|
||
|
s0 = peg$c201;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c202); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$currPos;
|
||
|
s2 = peg$parseNonZeroDigit();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parseDecimalDigits();
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s3 = null;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s2 = [s2, s3];
|
||
|
s1 = s2;
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s0 = input.substring(s0, peg$currPos);
|
||
|
} else {
|
||
|
s0 = s1;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseDecimalDigits() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = [];
|
||
|
s2 = peg$parseDecimalDigit();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
while (s2 !== peg$FAILED) {
|
||
|
s1.push(s2);
|
||
|
s2 = peg$parseDecimalDigit();
|
||
|
}
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s0 = input.substring(s0, peg$currPos);
|
||
|
} else {
|
||
|
s0 = s1;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseExponentPart() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$currPos;
|
||
|
s2 = peg$parseExponentIndicator();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parseSignedInteger();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s2 = [s2, s3];
|
||
|
s1 = s2;
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s0 = input.substring(s0, peg$currPos);
|
||
|
} else {
|
||
|
s0 = s1;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseExponentIndicator() {
|
||
|
var s0;
|
||
|
|
||
|
if (peg$c203.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c204); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseSignedInteger() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$currPos;
|
||
|
if (peg$c205.test(input.charAt(peg$currPos))) {
|
||
|
s2 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c206); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = null;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parseDecimalDigits();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s2 = [s2, s3];
|
||
|
s1 = s2;
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s0 = input.substring(s0, peg$currPos);
|
||
|
} else {
|
||
|
s0 = s1;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseHexIntegerLiteral() {
|
||
|
var s0, s1, s2, s3, s4, s5;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 48) {
|
||
|
s1 = peg$c201;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c202); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
if (peg$c207.test(input.charAt(peg$currPos))) {
|
||
|
s2 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c208); }
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$currPos;
|
||
|
s4 = [];
|
||
|
s5 = peg$parseHexDigit();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
while (s5 !== peg$FAILED) {
|
||
|
s4.push(s5);
|
||
|
s5 = peg$parseHexDigit();
|
||
|
}
|
||
|
} else {
|
||
|
s4 = peg$FAILED;
|
||
|
}
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s3 = input.substring(s3, peg$currPos);
|
||
|
} else {
|
||
|
s3 = s4;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c209(s3);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseNullLiteral() {
|
||
|
var s0;
|
||
|
|
||
|
if (input.substr(peg$currPos, 4) === peg$c210) {
|
||
|
s0 = peg$c210;
|
||
|
peg$currPos += 4;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c211); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUndefinedLiteral() {
|
||
|
var s0;
|
||
|
|
||
|
if (input.substr(peg$currPos, 9) === peg$c212) {
|
||
|
s0 = peg$c212;
|
||
|
peg$currPos += 9;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c213); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnknownLiteral() {
|
||
|
var s0, s1;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 63) {
|
||
|
s1 = peg$c1;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c2); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c214();
|
||
|
}
|
||
|
s0 = s1;
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseBooleanLiteral() {
|
||
|
var s0;
|
||
|
|
||
|
if (input.substr(peg$currPos, 4) === peg$c215) {
|
||
|
s0 = peg$c215;
|
||
|
peg$currPos += 4;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c216); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 5) === peg$c217) {
|
||
|
s0 = peg$c217;
|
||
|
peg$currPos += 5;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c218); }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFunctionLiteral() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseFunctionLiteralUc();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseFunctionLiteralLc();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFunctionLiteralUc() {
|
||
|
var s0;
|
||
|
|
||
|
if (input.substr(peg$currPos, 8) === peg$c219) {
|
||
|
s0 = peg$c219;
|
||
|
peg$currPos += 8;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c220); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseFunctionLiteralLc() {
|
||
|
var s0;
|
||
|
|
||
|
if (input.substr(peg$currPos, 8) === peg$c221) {
|
||
|
s0 = peg$c221;
|
||
|
peg$currPos += 8;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c222); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodeLetter() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseUnicodeLu();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseUnicodeLl();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseUnicodeLt();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseUnicodeLm();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseUnicodeLo();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseUnicodeLn();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodeEscapeSequenceLiteral() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 92) {
|
||
|
s2 = peg$c223;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c224); }
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s3 = peg$parseUnicodeEscapeSequence();
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s2 = [s2, s3];
|
||
|
s1 = s2;
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s0 = input.substring(s0, peg$currPos);
|
||
|
} else {
|
||
|
s0 = s1;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodeEscapeSequence() {
|
||
|
var s0, s1, s2, s3, s4, s5, s6, s7;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 117) {
|
||
|
s1 = peg$c225;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c226); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parseHexDigit();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parseHexDigit();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s6 = peg$parseHexDigit();
|
||
|
if (s6 !== peg$FAILED) {
|
||
|
s7 = peg$parseHexDigit();
|
||
|
if (s7 !== peg$FAILED) {
|
||
|
s4 = [s4, s5, s6, s7];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s2 = input.substring(s2, peg$currPos);
|
||
|
} else {
|
||
|
s2 = s3;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c227(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseDecimalDigit() {
|
||
|
var s0;
|
||
|
|
||
|
if (peg$c228.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c229); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseNonZeroDigit() {
|
||
|
var s0;
|
||
|
|
||
|
if (peg$c230.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c231); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseHexDigit() {
|
||
|
var s0;
|
||
|
|
||
|
if (peg$c232.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c233); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodeMc() {
|
||
|
var s0, s1;
|
||
|
|
||
|
peg$silentFails++;
|
||
|
if (peg$c235.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c236); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c234); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodeNd() {
|
||
|
var s0, s1;
|
||
|
|
||
|
peg$silentFails++;
|
||
|
if (peg$c238.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c239); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c237); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodePc() {
|
||
|
var s0, s1;
|
||
|
|
||
|
peg$silentFails++;
|
||
|
if (peg$c241.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c242); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c240); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodeLu() {
|
||
|
var s0, s1;
|
||
|
|
||
|
peg$silentFails++;
|
||
|
if (peg$c244.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c245); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c243); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodeLl() {
|
||
|
var s0, s1;
|
||
|
|
||
|
peg$silentFails++;
|
||
|
if (peg$c247.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c248); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c246); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodeLt() {
|
||
|
var s0, s1;
|
||
|
|
||
|
peg$silentFails++;
|
||
|
if (peg$c250.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c251); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c249); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodeLm() {
|
||
|
var s0, s1;
|
||
|
|
||
|
peg$silentFails++;
|
||
|
if (peg$c253.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c254); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c252); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodeLo() {
|
||
|
var s0, s1;
|
||
|
|
||
|
peg$silentFails++;
|
||
|
if (peg$c256.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c257); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c255); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodeLn() {
|
||
|
var s0, s1;
|
||
|
|
||
|
peg$silentFails++;
|
||
|
if (peg$c259.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c260); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c258); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseUnicodeZs() {
|
||
|
var s0, s1;
|
||
|
|
||
|
peg$silentFails++;
|
||
|
if (peg$c262.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c263); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c261); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseDoubleStringCharacter() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
if (input.charCodeAt(peg$currPos) === 34) {
|
||
|
s2 = peg$c193;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c194); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 92) {
|
||
|
s2 = peg$c223;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c224); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = peg$parseLineTerminator();
|
||
|
}
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s1 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseSourceCharacter();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c264(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 92) {
|
||
|
s1 = peg$c223;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c224); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseEscapeSequence();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c265(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseLineContinuation();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseSingleStringCharacter() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
if (input.charCodeAt(peg$currPos) === 39) {
|
||
|
s2 = peg$c196;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c197); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 92) {
|
||
|
s2 = peg$c223;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s2 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c224); }
|
||
|
}
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = peg$parseLineTerminator();
|
||
|
}
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s1 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseSourceCharacter();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c264(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 92) {
|
||
|
s1 = peg$c223;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c224); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseEscapeSequence();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c265(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseLineContinuation();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseLineTerminatorSequence() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
if (input.charCodeAt(peg$currPos) === 10) {
|
||
|
s0 = peg$c266;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c267); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 13) {
|
||
|
s1 = peg$c268;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c269); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
if (input.charCodeAt(peg$currPos) === 10) {
|
||
|
s3 = peg$c266;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s3 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c267); }
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s2 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
s1 = [s1, s2];
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 8232) {
|
||
|
s0 = peg$c270;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c271); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 8233) {
|
||
|
s0 = peg$c272;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c273); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.substr(peg$currPos, 2) === peg$c274) {
|
||
|
s0 = peg$c274;
|
||
|
peg$currPos += 2;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c275); }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseLineTerminator() {
|
||
|
var s0;
|
||
|
|
||
|
if (input.charCodeAt(peg$currPos) === 10) {
|
||
|
s0 = peg$c266;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c267); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 13) {
|
||
|
s0 = peg$c268;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c269); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 8232) {
|
||
|
s0 = peg$c270;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c271); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 8233) {
|
||
|
s0 = peg$c272;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c273); }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseEscapeSequence() {
|
||
|
var s0, s1, s2, s3;
|
||
|
|
||
|
s0 = peg$parseCharacterEscapeSequence();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 48) {
|
||
|
s1 = peg$c201;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c202); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
s3 = peg$parseDecimalDigit();
|
||
|
peg$silentFails--;
|
||
|
if (s3 === peg$FAILED) {
|
||
|
s2 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s2;
|
||
|
s2 = peg$FAILED;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c276();
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseHexEscapeSequence();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseUnicodeEscapeSequence();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseCharacterEscapeSequence() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseSingleEscapeCharacter();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseNonEscapeCharacter();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseSingleEscapeCharacter() {
|
||
|
var s0;
|
||
|
|
||
|
if (peg$c277.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c278); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseNonEscapeCharacter() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
s1 = peg$currPos;
|
||
|
peg$silentFails++;
|
||
|
s2 = peg$parseEscapeCharacter();
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s2 = peg$parseLineTerminator();
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s2 === peg$FAILED) {
|
||
|
s1 = void 0;
|
||
|
} else {
|
||
|
peg$currPos = s1;
|
||
|
s1 = peg$FAILED;
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseSourceCharacter();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c264(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseEscapeCharacter() {
|
||
|
var s0;
|
||
|
|
||
|
s0 = peg$parseSingleEscapeCharacter();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseDecimalDigit();
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 120) {
|
||
|
s0 = peg$c279;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c280); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
if (input.charCodeAt(peg$currPos) === 117) {
|
||
|
s0 = peg$c225;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c226); }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseSourceCharacter() {
|
||
|
var s0;
|
||
|
|
||
|
if (input.length > peg$currPos) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c281); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseHexEscapeSequence() {
|
||
|
var s0, s1, s2, s3, s4, s5;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 120) {
|
||
|
s1 = peg$c279;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c280); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$currPos;
|
||
|
s3 = peg$currPos;
|
||
|
s4 = peg$parseHexDigit();
|
||
|
if (s4 !== peg$FAILED) {
|
||
|
s5 = peg$parseHexDigit();
|
||
|
if (s5 !== peg$FAILED) {
|
||
|
s4 = [s4, s5];
|
||
|
s3 = s4;
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s3;
|
||
|
s3 = peg$FAILED;
|
||
|
}
|
||
|
if (s3 !== peg$FAILED) {
|
||
|
s2 = input.substring(s2, peg$currPos);
|
||
|
} else {
|
||
|
s2 = s3;
|
||
|
}
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c227(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseLineContinuation() {
|
||
|
var s0, s1, s2;
|
||
|
|
||
|
s0 = peg$currPos;
|
||
|
if (input.charCodeAt(peg$currPos) === 92) {
|
||
|
s1 = peg$c223;
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c224); }
|
||
|
}
|
||
|
if (s1 !== peg$FAILED) {
|
||
|
s2 = peg$parseLineTerminatorSequence();
|
||
|
if (s2 !== peg$FAILED) {
|
||
|
peg$savedPos = s0;
|
||
|
s1 = peg$c265(s2);
|
||
|
s0 = s1;
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
} else {
|
||
|
peg$currPos = s0;
|
||
|
s0 = peg$FAILED;
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parse_() {
|
||
|
var s0, s1;
|
||
|
|
||
|
peg$silentFails++;
|
||
|
s0 = [];
|
||
|
s1 = peg$parseWhitespace();
|
||
|
while (s1 !== peg$FAILED) {
|
||
|
s0.push(s1);
|
||
|
s1 = peg$parseWhitespace();
|
||
|
}
|
||
|
peg$silentFails--;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c282); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parse__() {
|
||
|
var s0, s1;
|
||
|
|
||
|
peg$silentFails++;
|
||
|
s0 = peg$c284;
|
||
|
peg$silentFails--;
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s1 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c283); }
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
function peg$parseWhitespace() {
|
||
|
var s0;
|
||
|
|
||
|
if (peg$c285.test(input.charAt(peg$currPos))) {
|
||
|
s0 = input.charAt(peg$currPos);
|
||
|
peg$currPos++;
|
||
|
} else {
|
||
|
s0 = peg$FAILED;
|
||
|
if (peg$silentFails === 0) { peg$fail(peg$c286); }
|
||
|
}
|
||
|
if (s0 === peg$FAILED) {
|
||
|
s0 = peg$parseUnicodeZs();
|
||
|
}
|
||
|
|
||
|
return s0;
|
||
|
}
|
||
|
|
||
|
|
||
|
var Types = require('./types');
|
||
|
|
||
|
function optional(obj) {
|
||
|
obj.optional = true;
|
||
|
return obj;
|
||
|
}
|
||
|
|
||
|
function repeatable(obj) {
|
||
|
obj.repeatable = true;
|
||
|
return obj;
|
||
|
}
|
||
|
|
||
|
function nullable(obj, modifier) {
|
||
|
if (modifier) {
|
||
|
obj.nullable = (modifier === '?' ? true : false);
|
||
|
}
|
||
|
|
||
|
return obj;
|
||
|
}
|
||
|
|
||
|
|
||
|
peg$result = peg$startRuleFunction();
|
||
|
|
||
|
if (peg$result !== peg$FAILED && peg$currPos === input.length) {
|
||
|
return peg$result;
|
||
|
} else {
|
||
|
if (peg$result !== peg$FAILED && peg$currPos < input.length) {
|
||
|
peg$fail(peg$endExpectation());
|
||
|
}
|
||
|
|
||
|
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)
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
SyntaxError: peg$SyntaxError,
|
||
|
parse: peg$parse
|
||
|
};
|