Last active
December 27, 2015 05:29
-
-
Save shamansir/7274681 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = (function() { | |
| /* | |
| * Generated by PEG.js 0.7.0. | |
| * | |
| * http://pegjs.majda.cz/ | |
| */ | |
| function peg$subclass(child, parent) { | |
| function ctor() { this.constructor = child; } | |
| ctor.prototype = parent.prototype; | |
| child.prototype = new ctor(); | |
| } | |
| function SyntaxError(expected, found, offset, line, column) { | |
| function buildMessage(expected, found) { | |
| function stringEscape(s) { | |
| function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } | |
| return s | |
| .replace(/\\/g, '\\\\') | |
| .replace(/"/g, '\\"') | |
| .replace(/\x08/g, '\\b') | |
| .replace(/\t/g, '\\t') | |
| .replace(/\n/g, '\\n') | |
| .replace(/\f/g, '\\f') | |
| .replace(/\r/g, '\\r') | |
| .replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) | |
| .replace(/[\x10-\x1F\x80-\xFF]/g, function(ch) { return '\\x' + hex(ch); }) | |
| .replace(/[\u0180-\u0FFF]/g, function(ch) { return '\\u0' + hex(ch); }) | |
| .replace(/[\u1080-\uFFFF]/g, function(ch) { return '\\u' + hex(ch); }); | |
| } | |
| var expectedDesc, foundDesc; | |
| switch (expected.length) { | |
| case 0: | |
| expectedDesc = "end of input"; | |
| break; | |
| case 1: | |
| expectedDesc = expected[0]; | |
| break; | |
| default: | |
| expectedDesc = expected.slice(0, -1).join(", ") | |
| + " or " | |
| + expected[expected.length - 1]; | |
| } | |
| foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input"; | |
| return "Expected " + expectedDesc + " but " + foundDesc + " found."; | |
| } | |
| this.expected = expected; | |
| this.found = found; | |
| this.offset = offset; | |
| this.line = line; | |
| this.column = column; | |
| this.name = "SyntaxError"; | |
| this.message = buildMessage(expected, found); | |
| } | |
| peg$subclass(SyntaxError, Error); | |
| function parse(input) { | |
| var options = arguments.length > 1 ? arguments[1] : {}, | |
| peg$startRuleFunctions = { start: peg$parsestart }, | |
| peg$startRuleFunction = peg$parsestart, | |
| peg$c0 = null, | |
| peg$c1 = [], | |
| peg$c2 = function(stylesheet) { return stylesheet; }, | |
| peg$c3 = "", | |
| peg$c4 = ";", | |
| peg$c5 = "\";\"", | |
| peg$c6 = function(charset, imports, rules) { | |
| var importsConverted = []; | |
| for (var i = 0; i < imports.length; i++) { | |
| importsConverted.push(imports[i][0]); | |
| } | |
| var rulesConverted = []; | |
| for (i = 0; i < rules.length; i++) { | |
| rulesConverted.push(rules[i][0]); | |
| } | |
| return { | |
| type: "stylesheet", | |
| charset: charset !== "" ? charset[1] : null, | |
| imports: importsConverted, | |
| rules: rulesConverted | |
| }; | |
| }, | |
| peg$c7 = function(href, media) { | |
| return { | |
| type: "import_rule", | |
| href: href, | |
| media: media !== "" ? media : [] | |
| }; | |
| }, | |
| peg$c8 = "{", | |
| peg$c9 = "\"{\"", | |
| peg$c10 = "}", | |
| peg$c11 = "\"}\"", | |
| peg$c12 = function(media, rules) { | |
| return { | |
| type: "media_rule", | |
| media: media, | |
| rules: rules | |
| }; | |
| }, | |
| peg$c13 = ",", | |
| peg$c14 = "\",\"", | |
| peg$c15 = function(head, tail) { | |
| var result = [head]; | |
| for (var i = 0; i < tail.length; i++) { | |
| result.push(tail[i][2]); | |
| } | |
| return result; | |
| }, | |
| peg$c16 = function(ident) { return ident; }, | |
| peg$c17 = function(qualifier, declarationsHead, declarationsTail) { | |
| var declarations = declarationsHead !== "" ? [declarationsHead] : []; | |
| for (var i = 0; i < declarationsTail.length; i++) { | |
| if (declarationsTail[i][2] !== "") { | |
| declarations.push(declarationsTail[i][2]); | |
| } | |
| } | |
| return { | |
| type: "page_rule", | |
| qualifier: qualifier !== "" ? qualifier : null, | |
| declarations: declarations | |
| }; | |
| }, | |
| peg$c18 = ":", | |
| peg$c19 = "\":\"", | |
| peg$c20 = "/", | |
| peg$c21 = "\"/\"", | |
| peg$c22 = function() { return "/"; }, | |
| peg$c23 = function() { return ","; }, | |
| peg$c24 = "+", | |
| peg$c25 = "\"+\"", | |
| peg$c26 = function() { return "+"; }, | |
| peg$c27 = ">", | |
| peg$c28 = "\">\"", | |
| peg$c29 = function() { return ">"; }, | |
| peg$c30 = "-", | |
| peg$c31 = "\"-\"", | |
| peg$c32 = function(selectorsHead, selectorsTail, declarationsHead, declarationsTail) { | |
| var selectors = [selectorsHead]; | |
| for (var i = 0; i < selectorsTail.length; i++) { | |
| selectors.push(selectorsTail[i][2]); | |
| } | |
| var declarations = declarationsHead !== "" ? [declarationsHead] : []; | |
| for (i = 0; i < declarationsTail.length; i++) { | |
| if (declarationsTail[i][2] !== "") { | |
| declarations.push(declarationsTail[i][2]); | |
| } | |
| } | |
| return { | |
| type: "ruleset", | |
| selectors: selectors, | |
| declarations: declarations | |
| }; | |
| }, | |
| peg$c33 = function(left, combinator, right) { | |
| return { | |
| type: "selector", | |
| combinator: combinator, | |
| left: left, | |
| right: right | |
| }; | |
| }, | |
| peg$c34 = function(left, right) { | |
| return { | |
| type: "selector", | |
| combinator: " ", | |
| left: left, | |
| right: right | |
| }; | |
| }, | |
| peg$c35 = function(selector) { return selector; }, | |
| peg$c36 = function(id) { return { type: "ID selector", id: id.substr(1) }; }, | |
| peg$c37 = function(element, qualifiers) { | |
| return { | |
| type: "simple_selector", | |
| element: element, | |
| qualifiers: qualifiers | |
| }; | |
| }, | |
| peg$c38 = function(qualifiers) { | |
| return { | |
| type: "simple_selector", | |
| element: "*", | |
| qualifiers: qualifiers | |
| }; | |
| }, | |
| peg$c39 = ".", | |
| peg$c40 = "\".\"", | |
| peg$c41 = function(class_) { return { type: "class_selector", "class": class_ }; }, | |
| peg$c42 = "*", | |
| peg$c43 = "\"*\"", | |
| peg$c44 = "[", | |
| peg$c45 = "\"[\"", | |
| peg$c46 = "=", | |
| peg$c47 = "\"=\"", | |
| peg$c48 = "]", | |
| peg$c49 = "\"]\"", | |
| peg$c50 = function(attribute, operatorAndValue) { | |
| return { | |
| type: "attribute_selector", | |
| attribute: attribute, | |
| operator: operatorAndValue !== "" ? operatorAndValue[0] : null, | |
| value: operatorAndValue !== "" ? operatorAndValue[2] : null | |
| }; | |
| }, | |
| peg$c51 = ")", | |
| peg$c52 = "\")\"", | |
| peg$c53 = function(name, params) { | |
| return { | |
| type: "function", | |
| name: name, | |
| params: params !== "" ? [params[0]] : [] | |
| }; | |
| }, | |
| peg$c54 = function(value) { | |
| /* | |
| * The returned object has somewhat vague property names and values because | |
| * the rule matches both pseudo-classes and pseudo-elements (they look the | |
| * same at the syntactic level). | |
| */ | |
| return { | |
| type: "pseudo_selector", | |
| value: value | |
| }; | |
| }, | |
| peg$c55 = function(property, expression, important) { | |
| return { | |
| type: "declaration", | |
| property: property, | |
| expression: expression, | |
| important: important !== "" ? true : false | |
| }; | |
| }, | |
| peg$c56 = function(head, tail) { | |
| var result = head; | |
| for (var i = 0; i < tail.length; i++) { | |
| result = { | |
| type: "expression", | |
| operator: tail[i][0], | |
| left: result, | |
| right: tail[i][1] | |
| }; | |
| } | |
| return result; | |
| }, | |
| peg$c57 = function(operator, value) { return { type: "value", value: operator + value[0] }; }, | |
| peg$c58 = function(value) { return { type: "uri", value: value }; }, | |
| peg$c59 = function(value) { return { type: "string", value: value }; }, | |
| peg$c60 = function(value) { return { type: "ident", value: value }; }, | |
| peg$c61 = function(name, params) { | |
| return { | |
| type: "function", | |
| name: name, | |
| params: params | |
| }; | |
| }, | |
| peg$c62 = function(value) { return { type: "hexcolor", value: value}; }, | |
| peg$c63 = /^[0-9a-fA-F]/, | |
| peg$c64 = "[0-9a-fA-F]", | |
| peg$c65 = /^[\x80-\xFF]/, | |
| peg$c66 = "[\\x80-\\xFF]", | |
| peg$c67 = "\\", | |
| peg$c68 = "\"\\\\\"", | |
| peg$c69 = "\r\n", | |
| peg$c70 = "\"\\r\\n\"", | |
| peg$c71 = /^[ \t\r\n\f]/, | |
| peg$c72 = "[ \\t\\r\\n\\f]", | |
| peg$c73 = function(digits) { | |
| return String.fromCharCode(parseInt("0x" + digits)); | |
| }, | |
| peg$c74 = /^[^\r\n\f0-9a-fA-F]/, | |
| peg$c75 = "[^\\r\\n\\f0-9a-fA-F]", | |
| peg$c76 = function(char_) { return char_; }, | |
| peg$c77 = /^[_a-zA-Z]/, | |
| peg$c78 = "[_a-zA-Z]", | |
| peg$c79 = /^[_a-zA-Z0-9\-]/, | |
| peg$c80 = "[_a-zA-Z0-9\\-]", | |
| peg$c81 = /^[0-9]/, | |
| peg$c82 = "[0-9]", | |
| peg$c83 = function(parts) { return parseInt(parts); }, | |
| peg$c84 = function(parts) { return parseFloat(parts); }, | |
| peg$c85 = "\"", | |
| peg$c86 = "\"\\\"\"", | |
| peg$c87 = /^[^\n\r\f\\"]/, | |
| peg$c88 = "[^\\n\\r\\f\\\\\"]", | |
| peg$c89 = function(nl) { return nl }, | |
| peg$c90 = function(chars) { | |
| return chars.join(""); | |
| }, | |
| peg$c91 = "'", | |
| peg$c92 = "\"'\"", | |
| peg$c93 = /^[^\n\r\f\\']/, | |
| peg$c94 = "[^\\n\\r\\f\\\\']", | |
| peg$c95 = "/*", | |
| peg$c96 = "\"/*\"", | |
| peg$c97 = /^[^*]/, | |
| peg$c98 = "[^*]", | |
| peg$c99 = /^[^\/*]/, | |
| peg$c100 = "[^\\/*]", | |
| peg$c101 = function(dash, nmstart, nmchars) { | |
| return dash + nmstart + nmchars.join(""); | |
| }, | |
| peg$c102 = function(nmchars) { return nmchars.join(""); }, | |
| peg$c103 = /^[!#$%&*-~]/, | |
| peg$c104 = "[!#$%&*-~]", | |
| peg$c105 = function(chars) { return chars.join(""); }, | |
| peg$c106 = "\n", | |
| peg$c107 = "\"\\n\"", | |
| peg$c108 = "\r", | |
| peg$c109 = "\"\\r\"", | |
| peg$c110 = "\f", | |
| peg$c111 = "\"\\f\"", | |
| peg$c112 = /^[aA]/, | |
| peg$c113 = "[aA]", | |
| peg$c114 = "0", | |
| peg$c115 = "\"0\"", | |
| peg$c116 = "41", | |
| peg$c117 = "\"41\"", | |
| peg$c118 = function() { return "A"; }, | |
| peg$c119 = "61", | |
| peg$c120 = "\"61\"", | |
| peg$c121 = function() { return "a"; }, | |
| peg$c122 = /^[cC]/, | |
| peg$c123 = "[cC]", | |
| peg$c124 = "43", | |
| peg$c125 = "\"43\"", | |
| peg$c126 = function() { return "C"; }, | |
| peg$c127 = "63", | |
| peg$c128 = "\"63\"", | |
| peg$c129 = function() { return "c"; }, | |
| peg$c130 = /^[dD]/, | |
| peg$c131 = "[dD]", | |
| peg$c132 = "44", | |
| peg$c133 = "\"44\"", | |
| peg$c134 = function() { return "D"; }, | |
| peg$c135 = "64", | |
| peg$c136 = "\"64\"", | |
| peg$c137 = function() { return "d"; }, | |
| peg$c138 = /^[eE]/, | |
| peg$c139 = "[eE]", | |
| peg$c140 = "45", | |
| peg$c141 = "\"45\"", | |
| peg$c142 = function() { return "E"; }, | |
| peg$c143 = "65", | |
| peg$c144 = "\"65\"", | |
| peg$c145 = function() { return "e"; }, | |
| peg$c146 = /^[gG]/, | |
| peg$c147 = "[gG]", | |
| peg$c148 = "47", | |
| peg$c149 = "\"47\"", | |
| peg$c150 = function() { return "G"; }, | |
| peg$c151 = "67", | |
| peg$c152 = "\"67\"", | |
| peg$c153 = function() { return "g"; }, | |
| peg$c154 = /^[hH]/, | |
| peg$c155 = "[hH]", | |
| peg$c156 = "48", | |
| peg$c157 = "\"48\"", | |
| peg$c158 = function() { return "H"; }, | |
| peg$c159 = "68", | |
| peg$c160 = "\"68\"", | |
| peg$c161 = function() { return "h"; }, | |
| peg$c162 = /^[iI]/, | |
| peg$c163 = "[iI]", | |
| peg$c164 = "49", | |
| peg$c165 = "\"49\"", | |
| peg$c166 = function() { return "I"; }, | |
| peg$c167 = "69", | |
| peg$c168 = "\"69\"", | |
| peg$c169 = function() { return "i"; }, | |
| peg$c170 = /^[kK]/, | |
| peg$c171 = "[kK]", | |
| peg$c172 = "4", | |
| peg$c173 = "\"4\"", | |
| peg$c174 = /^[bB]/, | |
| peg$c175 = "[bB]", | |
| peg$c176 = function() { return "K"; }, | |
| peg$c177 = "6", | |
| peg$c178 = "\"6\"", | |
| peg$c179 = function() { return "k"; }, | |
| peg$c180 = /^[lL]/, | |
| peg$c181 = "[lL]", | |
| peg$c182 = function() { return "L"; }, | |
| peg$c183 = function() { return "l"; }, | |
| peg$c184 = /^[mM]/, | |
| peg$c185 = "[mM]", | |
| peg$c186 = function() { return "M"; }, | |
| peg$c187 = function() { return "m"; }, | |
| peg$c188 = /^[nN]/, | |
| peg$c189 = "[nN]", | |
| peg$c190 = function() { return "N"; }, | |
| peg$c191 = function() { return "n"; }, | |
| peg$c192 = /^[oO]/, | |
| peg$c193 = "[oO]", | |
| peg$c194 = /^[fF]/, | |
| peg$c195 = "[fF]", | |
| peg$c196 = function() { return "O"; }, | |
| peg$c197 = function() { return "o"; }, | |
| peg$c198 = /^[pP]/, | |
| peg$c199 = "[pP]", | |
| peg$c200 = "50", | |
| peg$c201 = "\"50\"", | |
| peg$c202 = function() { return "P"; }, | |
| peg$c203 = "70", | |
| peg$c204 = "\"70\"", | |
| peg$c205 = function() { return "p"; }, | |
| peg$c206 = /^[rR]/, | |
| peg$c207 = "[rR]", | |
| peg$c208 = "52", | |
| peg$c209 = "\"52\"", | |
| peg$c210 = function() { return "R"; }, | |
| peg$c211 = "72", | |
| peg$c212 = "\"72\"", | |
| peg$c213 = function() { return "r"; }, | |
| peg$c214 = /^[sS]/, | |
| peg$c215 = "[sS]", | |
| peg$c216 = "53", | |
| peg$c217 = "\"53\"", | |
| peg$c218 = function() { return "S"; }, | |
| peg$c219 = "73", | |
| peg$c220 = "\"73\"", | |
| peg$c221 = function() { return "s"; }, | |
| peg$c222 = /^[tT]/, | |
| peg$c223 = "[tT]", | |
| peg$c224 = "54", | |
| peg$c225 = "\"54\"", | |
| peg$c226 = function() { return "T"; }, | |
| peg$c227 = "74", | |
| peg$c228 = "\"74\"", | |
| peg$c229 = function() { return "t"; }, | |
| peg$c230 = /^[uU]/, | |
| peg$c231 = "[uU]", | |
| peg$c232 = "55", | |
| peg$c233 = "\"55\"", | |
| peg$c234 = function() { return "U"; }, | |
| peg$c235 = "75", | |
| peg$c236 = "\"75\"", | |
| peg$c237 = function() { return "u"; }, | |
| peg$c238 = /^[xX]/, | |
| peg$c239 = "[xX]", | |
| peg$c240 = "58", | |
| peg$c241 = "\"58\"", | |
| peg$c242 = function() { return "X"; }, | |
| peg$c243 = "78", | |
| peg$c244 = "\"78\"", | |
| peg$c245 = function() { return "x"; }, | |
| peg$c246 = /^[zZ]/, | |
| peg$c247 = "[zZ]", | |
| peg$c248 = "5", | |
| peg$c249 = "\"5\"", | |
| peg$c250 = function() { return "Z"; }, | |
| peg$c251 = "7", | |
| peg$c252 = "\"7\"", | |
| peg$c253 = function() { return "z"; }, | |
| peg$c254 = "whitespace", | |
| peg$c255 = "<!--", | |
| peg$c256 = "\"<!--\"", | |
| peg$c257 = "-->", | |
| peg$c258 = "\"-->\"", | |
| peg$c259 = "~=", | |
| peg$c260 = "\"~=\"", | |
| peg$c261 = "|=", | |
| peg$c262 = "\"|=\"", | |
| peg$c263 = "string", | |
| peg$c264 = function(string) { return string; }, | |
| peg$c265 = "identifier", | |
| peg$c266 = "hash", | |
| peg$c267 = "#", | |
| peg$c268 = "\"#\"", | |
| peg$c269 = function(name) { return "#" + name; }, | |
| peg$c270 = "@import", | |
| peg$c271 = "@", | |
| peg$c272 = "\"@\"", | |
| peg$c273 = "@page", | |
| peg$c274 = "@media", | |
| peg$c275 = "@charset", | |
| peg$c276 = "@charset ", | |
| peg$c277 = "\"@charset \"", | |
| peg$c278 = "!important", | |
| peg$c279 = "!", | |
| peg$c280 = "\"!\"", | |
| peg$c281 = function() { return "!important"; }, | |
| peg$c282 = "length", | |
| peg$c283 = function(num, e, m) { return num + e + m; }, | |
| peg$c284 = function(num, e, x) { return num + e + x; }, | |
| peg$c285 = function(num, unit) { | |
| return num + unit.join(""); | |
| }, | |
| peg$c286 = "angle", | |
| peg$c287 = "time", | |
| peg$c288 = function(m, s) { return m + s; }, | |
| peg$c289 = function(num, unit) { | |
| return num + unit; | |
| }, | |
| peg$c290 = "frequency", | |
| peg$c291 = function(num, unit) { return num + unit.join(""); }, | |
| peg$c292 = "dimension", | |
| peg$c293 = function(num, unit) { return num + unit; }, | |
| peg$c294 = "percentage", | |
| peg$c295 = "%", | |
| peg$c296 = "\"%\"", | |
| peg$c297 = function(parts) { return parts; }, | |
| peg$c298 = "number", | |
| peg$c299 = function(num) { return num; }, | |
| peg$c300 = "uri", | |
| peg$c301 = "(", | |
| peg$c302 = "\"(\"", | |
| peg$c303 = function(value) { return value; }, | |
| peg$c304 = "function", | |
| peg$c305 = function(name) { return name; }, | |
| peg$currPos = 0, | |
| peg$reportedPos = 0, | |
| peg$cachedPos = 0, | |
| peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }, | |
| 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$reportedPos, peg$currPos); | |
| } | |
| function offset() { | |
| return peg$reportedPos; | |
| } | |
| function line() { | |
| return peg$computePosDetails(peg$reportedPos).line; | |
| } | |
| function column() { | |
| return peg$computePosDetails(peg$reportedPos).column; | |
| } | |
| function peg$computePosDetails(pos) { | |
| function advance(details, startPos, endPos) { | |
| var p, ch; | |
| for (p = startPos; p < endPos; p++) { | |
| ch = input.charAt(p); | |
| if (ch === "\n") { | |
| if (!details.seenCR) { details.line++; } | |
| details.column = 1; | |
| details.seenCR = false; | |
| } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") { | |
| details.line++; | |
| details.column = 1; | |
| details.seenCR = true; | |
| } else { | |
| details.column++; | |
| details.seenCR = false; | |
| } | |
| } | |
| } | |
| if (peg$cachedPos !== pos) { | |
| if (peg$cachedPos > pos) { | |
| peg$cachedPos = 0; | |
| peg$cachedPosDetails = { line: 1, column: 1, seenCR: false }; | |
| } | |
| advance(peg$cachedPosDetails, peg$cachedPos, pos); | |
| peg$cachedPos = pos; | |
| } | |
| return peg$cachedPosDetails; | |
| } | |
| 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$cleanupExpected(expected) { | |
| var i = 0; | |
| expected.sort(); | |
| while (i < expected.length) { | |
| if (expected[i - 1] === expected[i]) { | |
| expected.splice(i, 1); | |
| } else { | |
| i++; | |
| } | |
| } | |
| } | |
| function peg$parsestart() { | |
| var s0, s1, s2, s3; | |
| s0 = peg$currPos; | |
| s1 = peg$parsestylesheet(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parsecomment(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parsecomment(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c2(s1); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsestylesheet() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; | |
| s0 = peg$currPos; | |
| s1 = peg$currPos; | |
| s2 = peg$parseCHARSET_SYM(); | |
| if (s2 !== null) { | |
| s3 = peg$parseSTRING(); | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 59) { | |
| s4 = peg$c4; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c5); } | |
| } | |
| if (s4 !== null) { | |
| s2 = [s2, s3, s4]; | |
| s1 = s2; | |
| } else { | |
| peg$currPos = s1; | |
| s1 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s1; | |
| s1 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s1; | |
| s1 = peg$c0; | |
| } | |
| if (s1 === null) { | |
| s1 = peg$c3; | |
| } | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| if (s3 === null) { | |
| s3 = peg$parseCDO(); | |
| if (s3 === null) { | |
| s3 = peg$parseCDC(); | |
| } | |
| } | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| if (s3 === null) { | |
| s3 = peg$parseCDO(); | |
| if (s3 === null) { | |
| s3 = peg$parseCDC(); | |
| } | |
| } | |
| } | |
| if (s2 !== null) { | |
| s3 = []; | |
| s4 = peg$currPos; | |
| s5 = peg$parseimport(); | |
| if (s5 !== null) { | |
| s6 = []; | |
| s7 = peg$currPos; | |
| s8 = peg$parseCDO(); | |
| if (s8 !== null) { | |
| s9 = []; | |
| s10 = peg$parseS(); | |
| while (s10 !== null) { | |
| s9.push(s10); | |
| s10 = peg$parseS(); | |
| } | |
| if (s9 !== null) { | |
| s8 = [s8, s9]; | |
| s7 = s8; | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| if (s7 === null) { | |
| s7 = peg$currPos; | |
| s8 = peg$parseCDC(); | |
| if (s8 !== null) { | |
| s9 = []; | |
| s10 = peg$parseS(); | |
| while (s10 !== null) { | |
| s9.push(s10); | |
| s10 = peg$parseS(); | |
| } | |
| if (s9 !== null) { | |
| s8 = [s8, s9]; | |
| s7 = s8; | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } | |
| while (s7 !== null) { | |
| s6.push(s7); | |
| s7 = peg$currPos; | |
| s8 = peg$parseCDO(); | |
| if (s8 !== null) { | |
| s9 = []; | |
| s10 = peg$parseS(); | |
| while (s10 !== null) { | |
| s9.push(s10); | |
| s10 = peg$parseS(); | |
| } | |
| if (s9 !== null) { | |
| s8 = [s8, s9]; | |
| s7 = s8; | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| if (s7 === null) { | |
| s7 = peg$currPos; | |
| s8 = peg$parseCDC(); | |
| if (s8 !== null) { | |
| s9 = []; | |
| s10 = peg$parseS(); | |
| while (s10 !== null) { | |
| s9.push(s10); | |
| s10 = peg$parseS(); | |
| } | |
| if (s9 !== null) { | |
| s8 = [s8, s9]; | |
| s7 = s8; | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } | |
| } | |
| if (s6 !== null) { | |
| s5 = [s5, s6]; | |
| s4 = s5; | |
| } else { | |
| peg$currPos = s4; | |
| s4 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s4; | |
| s4 = peg$c0; | |
| } | |
| while (s4 !== null) { | |
| s3.push(s4); | |
| s4 = peg$currPos; | |
| s5 = peg$parseimport(); | |
| if (s5 !== null) { | |
| s6 = []; | |
| s7 = peg$currPos; | |
| s8 = peg$parseCDO(); | |
| if (s8 !== null) { | |
| s9 = []; | |
| s10 = peg$parseS(); | |
| while (s10 !== null) { | |
| s9.push(s10); | |
| s10 = peg$parseS(); | |
| } | |
| if (s9 !== null) { | |
| s8 = [s8, s9]; | |
| s7 = s8; | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| if (s7 === null) { | |
| s7 = peg$currPos; | |
| s8 = peg$parseCDC(); | |
| if (s8 !== null) { | |
| s9 = []; | |
| s10 = peg$parseS(); | |
| while (s10 !== null) { | |
| s9.push(s10); | |
| s10 = peg$parseS(); | |
| } | |
| if (s9 !== null) { | |
| s8 = [s8, s9]; | |
| s7 = s8; | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } | |
| while (s7 !== null) { | |
| s6.push(s7); | |
| s7 = peg$currPos; | |
| s8 = peg$parseCDO(); | |
| if (s8 !== null) { | |
| s9 = []; | |
| s10 = peg$parseS(); | |
| while (s10 !== null) { | |
| s9.push(s10); | |
| s10 = peg$parseS(); | |
| } | |
| if (s9 !== null) { | |
| s8 = [s8, s9]; | |
| s7 = s8; | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| if (s7 === null) { | |
| s7 = peg$currPos; | |
| s8 = peg$parseCDC(); | |
| if (s8 !== null) { | |
| s9 = []; | |
| s10 = peg$parseS(); | |
| while (s10 !== null) { | |
| s9.push(s10); | |
| s10 = peg$parseS(); | |
| } | |
| if (s9 !== null) { | |
| s8 = [s8, s9]; | |
| s7 = s8; | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } | |
| } | |
| if (s6 !== null) { | |
| s5 = [s5, s6]; | |
| s4 = s5; | |
| } else { | |
| peg$currPos = s4; | |
| s4 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s4; | |
| s4 = peg$c0; | |
| } | |
| } | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$currPos; | |
| s6 = peg$parseruleset(); | |
| if (s6 === null) { | |
| s6 = peg$parsemedia(); | |
| if (s6 === null) { | |
| s6 = peg$parsepage(); | |
| } | |
| } | |
| if (s6 !== null) { | |
| s7 = []; | |
| s8 = peg$currPos; | |
| s9 = peg$parseCDO(); | |
| if (s9 !== null) { | |
| s10 = []; | |
| s11 = peg$parseS(); | |
| while (s11 !== null) { | |
| s10.push(s11); | |
| s11 = peg$parseS(); | |
| } | |
| if (s10 !== null) { | |
| s9 = [s9, s10]; | |
| s8 = s9; | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| if (s8 === null) { | |
| s8 = peg$currPos; | |
| s9 = peg$parseCDC(); | |
| if (s9 !== null) { | |
| s10 = []; | |
| s11 = peg$parseS(); | |
| while (s11 !== null) { | |
| s10.push(s11); | |
| s11 = peg$parseS(); | |
| } | |
| if (s10 !== null) { | |
| s9 = [s9, s10]; | |
| s8 = s9; | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } | |
| while (s8 !== null) { | |
| s7.push(s8); | |
| s8 = peg$currPos; | |
| s9 = peg$parseCDO(); | |
| if (s9 !== null) { | |
| s10 = []; | |
| s11 = peg$parseS(); | |
| while (s11 !== null) { | |
| s10.push(s11); | |
| s11 = peg$parseS(); | |
| } | |
| if (s10 !== null) { | |
| s9 = [s9, s10]; | |
| s8 = s9; | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| if (s8 === null) { | |
| s8 = peg$currPos; | |
| s9 = peg$parseCDC(); | |
| if (s9 !== null) { | |
| s10 = []; | |
| s11 = peg$parseS(); | |
| while (s11 !== null) { | |
| s10.push(s11); | |
| s11 = peg$parseS(); | |
| } | |
| if (s10 !== null) { | |
| s9 = [s9, s10]; | |
| s8 = s9; | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } | |
| } | |
| if (s7 !== null) { | |
| s6 = [s6, s7]; | |
| s5 = s6; | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$currPos; | |
| s6 = peg$parseruleset(); | |
| if (s6 === null) { | |
| s6 = peg$parsemedia(); | |
| if (s6 === null) { | |
| s6 = peg$parsepage(); | |
| } | |
| } | |
| if (s6 !== null) { | |
| s7 = []; | |
| s8 = peg$currPos; | |
| s9 = peg$parseCDO(); | |
| if (s9 !== null) { | |
| s10 = []; | |
| s11 = peg$parseS(); | |
| while (s11 !== null) { | |
| s10.push(s11); | |
| s11 = peg$parseS(); | |
| } | |
| if (s10 !== null) { | |
| s9 = [s9, s10]; | |
| s8 = s9; | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| if (s8 === null) { | |
| s8 = peg$currPos; | |
| s9 = peg$parseCDC(); | |
| if (s9 !== null) { | |
| s10 = []; | |
| s11 = peg$parseS(); | |
| while (s11 !== null) { | |
| s10.push(s11); | |
| s11 = peg$parseS(); | |
| } | |
| if (s10 !== null) { | |
| s9 = [s9, s10]; | |
| s8 = s9; | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } | |
| while (s8 !== null) { | |
| s7.push(s8); | |
| s8 = peg$currPos; | |
| s9 = peg$parseCDO(); | |
| if (s9 !== null) { | |
| s10 = []; | |
| s11 = peg$parseS(); | |
| while (s11 !== null) { | |
| s10.push(s11); | |
| s11 = peg$parseS(); | |
| } | |
| if (s10 !== null) { | |
| s9 = [s9, s10]; | |
| s8 = s9; | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| if (s8 === null) { | |
| s8 = peg$currPos; | |
| s9 = peg$parseCDC(); | |
| if (s9 !== null) { | |
| s10 = []; | |
| s11 = peg$parseS(); | |
| while (s11 !== null) { | |
| s10.push(s11); | |
| s11 = peg$parseS(); | |
| } | |
| if (s10 !== null) { | |
| s9 = [s9, s10]; | |
| s8 = s9; | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } | |
| } | |
| if (s7 !== null) { | |
| s6 = [s6, s7]; | |
| s5 = s6; | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| } | |
| if (s4 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c6(s1, s3, s4); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parseimport() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8; | |
| s0 = peg$currPos; | |
| s1 = peg$parseIMPORT_SYM(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| s3 = peg$parseSTRING(); | |
| if (s3 === null) { | |
| s3 = peg$parseURI(); | |
| } | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$parseS(); | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$parseS(); | |
| } | |
| if (s4 !== null) { | |
| s5 = peg$parsemedia_list(); | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 59) { | |
| s6 = peg$c4; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c5); } | |
| } | |
| if (s6 !== null) { | |
| s7 = []; | |
| s8 = peg$parseS(); | |
| while (s8 !== null) { | |
| s7.push(s8); | |
| s8 = peg$parseS(); | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c7(s3, s5); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsemedia() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; | |
| s0 = peg$currPos; | |
| s1 = peg$parseMEDIA_SYM(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| s3 = peg$parsemedia_list(); | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 123) { | |
| s4 = peg$c8; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c9); } | |
| } | |
| if (s4 !== null) { | |
| s5 = []; | |
| s6 = peg$parseS(); | |
| while (s6 !== null) { | |
| s5.push(s6); | |
| s6 = peg$parseS(); | |
| } | |
| if (s5 !== null) { | |
| s6 = []; | |
| s7 = peg$parseruleset(); | |
| while (s7 !== null) { | |
| s6.push(s7); | |
| s7 = peg$parseruleset(); | |
| } | |
| if (s6 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 125) { | |
| s7 = peg$c10; | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c11); } | |
| } | |
| if (s7 !== null) { | |
| s8 = []; | |
| s9 = peg$parseS(); | |
| while (s9 !== null) { | |
| s8.push(s9); | |
| s9 = peg$parseS(); | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c12(s3, s6); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsemedia_list() { | |
| var s0, s1, s2, s3, s4, s5, s6; | |
| s0 = peg$currPos; | |
| s1 = peg$parsemedium(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 44) { | |
| s4 = peg$c13; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c14); } | |
| } | |
| if (s4 !== null) { | |
| s5 = []; | |
| s6 = peg$parseS(); | |
| while (s6 !== null) { | |
| s5.push(s6); | |
| s6 = peg$parseS(); | |
| } | |
| if (s5 !== null) { | |
| s6 = peg$parsemedium(); | |
| if (s6 !== null) { | |
| s4 = [s4, s5, s6]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 44) { | |
| s4 = peg$c13; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c14); } | |
| } | |
| if (s4 !== null) { | |
| s5 = []; | |
| s6 = peg$parseS(); | |
| while (s6 !== null) { | |
| s5.push(s6); | |
| s6 = peg$parseS(); | |
| } | |
| if (s5 !== null) { | |
| s6 = peg$parsemedium(); | |
| if (s6 !== null) { | |
| s4 = [s4, s5, s6]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c15(s1, s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsemedium() { | |
| var s0, s1, s2, s3; | |
| s0 = peg$currPos; | |
| s1 = peg$parseIDENT(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c16(s1); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsepage() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; | |
| s0 = peg$currPos; | |
| s1 = peg$parsePAGE_SYM(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| s3 = peg$parsepseudo_page(); | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 123) { | |
| s4 = peg$c8; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c9); } | |
| } | |
| if (s4 !== null) { | |
| s5 = []; | |
| s6 = peg$parseS(); | |
| while (s6 !== null) { | |
| s5.push(s6); | |
| s6 = peg$parseS(); | |
| } | |
| if (s5 !== null) { | |
| s6 = peg$parsedeclaration(); | |
| if (s6 === null) { | |
| s6 = peg$c3; | |
| } | |
| if (s6 !== null) { | |
| s7 = []; | |
| s8 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 59) { | |
| s9 = peg$c4; | |
| peg$currPos++; | |
| } else { | |
| s9 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c5); } | |
| } | |
| if (s9 !== null) { | |
| s10 = []; | |
| s11 = peg$parseS(); | |
| while (s11 !== null) { | |
| s10.push(s11); | |
| s11 = peg$parseS(); | |
| } | |
| if (s10 !== null) { | |
| s11 = peg$parsedeclaration(); | |
| if (s11 === null) { | |
| s11 = peg$c3; | |
| } | |
| if (s11 !== null) { | |
| s9 = [s9, s10, s11]; | |
| s8 = s9; | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| while (s8 !== null) { | |
| s7.push(s8); | |
| s8 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 59) { | |
| s9 = peg$c4; | |
| peg$currPos++; | |
| } else { | |
| s9 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c5); } | |
| } | |
| if (s9 !== null) { | |
| s10 = []; | |
| s11 = peg$parseS(); | |
| while (s11 !== null) { | |
| s10.push(s11); | |
| s11 = peg$parseS(); | |
| } | |
| if (s10 !== null) { | |
| s11 = peg$parsedeclaration(); | |
| if (s11 === null) { | |
| s11 = peg$c3; | |
| } | |
| if (s11 !== null) { | |
| s9 = [s9, s10, s11]; | |
| s8 = s9; | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s8; | |
| s8 = peg$c0; | |
| } | |
| } | |
| if (s7 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 125) { | |
| s8 = peg$c10; | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c11); } | |
| } | |
| if (s8 !== null) { | |
| s9 = []; | |
| s10 = peg$parseS(); | |
| while (s10 !== null) { | |
| s9.push(s10); | |
| s10 = peg$parseS(); | |
| } | |
| if (s9 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c17(s3, s6, s7); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsepseudo_page() { | |
| var s0, s1, s2, s3, s4; | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 58) { | |
| s1 = peg$c18; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c19); } | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parseIDENT(); | |
| if (s2 !== null) { | |
| s3 = []; | |
| s4 = peg$parseS(); | |
| while (s4 !== null) { | |
| s3.push(s4); | |
| s4 = peg$parseS(); | |
| } | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c16(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parseoperator() { | |
| var s0, s1, s2, s3; | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 47) { | |
| s1 = peg$c20; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c21); } | |
| } | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c22(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 44) { | |
| s1 = peg$c13; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c14); } | |
| } | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c23(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parsecombinator() { | |
| var s0, s1, s2, s3; | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 43) { | |
| s1 = peg$c24; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c25); } | |
| } | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c26(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 62) { | |
| s1 = peg$c27; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c28); } | |
| } | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c29(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseunary_operator() { | |
| var s0; | |
| if (input.charCodeAt(peg$currPos) === 43) { | |
| s0 = peg$c24; | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c25); } | |
| } | |
| if (s0 === null) { | |
| if (input.charCodeAt(peg$currPos) === 45) { | |
| s0 = peg$c30; | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c31); } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseproperty() { | |
| var s0, s1, s2, s3; | |
| s0 = peg$currPos; | |
| s1 = peg$parseIDENT(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c16(s1); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parseruleset() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10; | |
| s0 = peg$currPos; | |
| s1 = peg$parseselector(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 44) { | |
| s4 = peg$c13; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c14); } | |
| } | |
| if (s4 !== null) { | |
| s5 = []; | |
| s6 = peg$parseS(); | |
| while (s6 !== null) { | |
| s5.push(s6); | |
| s6 = peg$parseS(); | |
| } | |
| if (s5 !== null) { | |
| s6 = peg$parseselector(); | |
| if (s6 !== null) { | |
| s4 = [s4, s5, s6]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 44) { | |
| s4 = peg$c13; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c14); } | |
| } | |
| if (s4 !== null) { | |
| s5 = []; | |
| s6 = peg$parseS(); | |
| while (s6 !== null) { | |
| s5.push(s6); | |
| s6 = peg$parseS(); | |
| } | |
| if (s5 !== null) { | |
| s6 = peg$parseselector(); | |
| if (s6 !== null) { | |
| s4 = [s4, s5, s6]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 123) { | |
| s3 = peg$c8; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c9); } | |
| } | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$parseS(); | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$parseS(); | |
| } | |
| if (s4 !== null) { | |
| s5 = peg$parsedeclaration(); | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| s6 = []; | |
| s7 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 59) { | |
| s8 = peg$c4; | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c5); } | |
| } | |
| if (s8 !== null) { | |
| s9 = []; | |
| s10 = peg$parseS(); | |
| while (s10 !== null) { | |
| s9.push(s10); | |
| s10 = peg$parseS(); | |
| } | |
| if (s9 !== null) { | |
| s10 = peg$parsedeclaration(); | |
| if (s10 === null) { | |
| s10 = peg$c3; | |
| } | |
| if (s10 !== null) { | |
| s8 = [s8, s9, s10]; | |
| s7 = s8; | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| while (s7 !== null) { | |
| s6.push(s7); | |
| s7 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 59) { | |
| s8 = peg$c4; | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c5); } | |
| } | |
| if (s8 !== null) { | |
| s9 = []; | |
| s10 = peg$parseS(); | |
| while (s10 !== null) { | |
| s9.push(s10); | |
| s10 = peg$parseS(); | |
| } | |
| if (s9 !== null) { | |
| s10 = peg$parsedeclaration(); | |
| if (s10 === null) { | |
| s10 = peg$c3; | |
| } | |
| if (s10 !== null) { | |
| s8 = [s8, s9, s10]; | |
| s7 = s8; | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s7; | |
| s7 = peg$c0; | |
| } | |
| } | |
| if (s6 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 125) { | |
| s7 = peg$c10; | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c11); } | |
| } | |
| if (s7 !== null) { | |
| s8 = []; | |
| s9 = peg$parseS(); | |
| while (s9 !== null) { | |
| s8.push(s9); | |
| s9 = peg$parseS(); | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c32(s1, s2, s5, s6); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parseselector() { | |
| var s0, s1, s2, s3, s4; | |
| s0 = peg$currPos; | |
| s1 = peg$parsesimple_selector(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| s3 = peg$parsecombinator(); | |
| if (s3 !== null) { | |
| s4 = peg$parseselector(); | |
| if (s4 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c33(s1, s3, s4); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| s1 = peg$parsesimple_selector(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| s3 = peg$parseselector(); | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c34(s1, s3); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| s1 = peg$parsesimple_selector(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c35(s1); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parsesimple_selector() { | |
| var s0, s1, s2, s3, s4; | |
| s0 = peg$currPos; | |
| s1 = peg$parseelement_name(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$currPos; | |
| s4 = peg$parseHASH(); | |
| if (s4 !== null) { | |
| peg$reportedPos = s3; | |
| s4 = peg$c36(s4); | |
| } | |
| if (s4 === null) { | |
| peg$currPos = s3; | |
| s3 = s4; | |
| } else { | |
| s3 = s4; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$parseclass(); | |
| if (s3 === null) { | |
| s3 = peg$parseattrib(); | |
| if (s3 === null) { | |
| s3 = peg$parsepseudo(); | |
| } | |
| } | |
| } | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$currPos; | |
| s4 = peg$parseHASH(); | |
| if (s4 !== null) { | |
| peg$reportedPos = s3; | |
| s4 = peg$c36(s4); | |
| } | |
| if (s4 === null) { | |
| peg$currPos = s3; | |
| s3 = s4; | |
| } else { | |
| s3 = s4; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$parseclass(); | |
| if (s3 === null) { | |
| s3 = peg$parseattrib(); | |
| if (s3 === null) { | |
| s3 = peg$parsepseudo(); | |
| } | |
| } | |
| } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c37(s1, s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$currPos; | |
| s3 = peg$parseHASH(); | |
| if (s3 !== null) { | |
| peg$reportedPos = s2; | |
| s3 = peg$c36(s3); | |
| } | |
| if (s3 === null) { | |
| peg$currPos = s2; | |
| s2 = s3; | |
| } else { | |
| s2 = s3; | |
| } | |
| if (s2 === null) { | |
| s2 = peg$parseclass(); | |
| if (s2 === null) { | |
| s2 = peg$parseattrib(); | |
| if (s2 === null) { | |
| s2 = peg$parsepseudo(); | |
| } | |
| } | |
| } | |
| if (s2 !== null) { | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$currPos; | |
| s3 = peg$parseHASH(); | |
| if (s3 !== null) { | |
| peg$reportedPos = s2; | |
| s3 = peg$c36(s3); | |
| } | |
| if (s3 === null) { | |
| peg$currPos = s2; | |
| s2 = s3; | |
| } else { | |
| s2 = s3; | |
| } | |
| if (s2 === null) { | |
| s2 = peg$parseclass(); | |
| if (s2 === null) { | |
| s2 = peg$parseattrib(); | |
| if (s2 === null) { | |
| s2 = peg$parsepseudo(); | |
| } | |
| } | |
| } | |
| } | |
| } else { | |
| s1 = peg$c0; | |
| } | |
| if (s1 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c38(s1); | |
| } | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseclass() { | |
| var s0, s1, s2; | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 46) { | |
| s1 = peg$c39; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c40); } | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parseIDENT(); | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c41(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parseelement_name() { | |
| var s0; | |
| s0 = peg$parseIDENT(); | |
| if (s0 === null) { | |
| if (input.charCodeAt(peg$currPos) === 42) { | |
| s0 = peg$c42; | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c43); } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseattrib() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10; | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 91) { | |
| s1 = peg$c44; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c45); } | |
| } | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| s3 = peg$parseIDENT(); | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$parseS(); | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$parseS(); | |
| } | |
| if (s4 !== null) { | |
| s5 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 61) { | |
| s6 = peg$c46; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c47); } | |
| } | |
| if (s6 === null) { | |
| s6 = peg$parseINCLUDES(); | |
| if (s6 === null) { | |
| s6 = peg$parseDASHMATCH(); | |
| } | |
| } | |
| if (s6 !== null) { | |
| s7 = []; | |
| s8 = peg$parseS(); | |
| while (s8 !== null) { | |
| s7.push(s8); | |
| s8 = peg$parseS(); | |
| } | |
| if (s7 !== null) { | |
| s8 = peg$parseIDENT(); | |
| if (s8 === null) { | |
| s8 = peg$parseSTRING(); | |
| } | |
| if (s8 !== null) { | |
| s9 = []; | |
| s10 = peg$parseS(); | |
| while (s10 !== null) { | |
| s9.push(s10); | |
| s10 = peg$parseS(); | |
| } | |
| if (s9 !== null) { | |
| s6 = [s6, s7, s8, s9]; | |
| s5 = s6; | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 93) { | |
| s6 = peg$c48; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c49); } | |
| } | |
| if (s6 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c50(s3, s5); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsepseudo() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8; | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 58) { | |
| s1 = peg$c18; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c19); } | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$currPos; | |
| s3 = peg$parseFUNCTION(); | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$parseS(); | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$parseS(); | |
| } | |
| if (s4 !== null) { | |
| s5 = peg$currPos; | |
| s6 = peg$parseIDENT(); | |
| if (s6 !== null) { | |
| s7 = []; | |
| s8 = peg$parseS(); | |
| while (s8 !== null) { | |
| s7.push(s8); | |
| s8 = peg$parseS(); | |
| } | |
| if (s7 !== null) { | |
| s6 = [s6, s7]; | |
| s5 = s6; | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 41) { | |
| s6 = peg$c51; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c52); } | |
| } | |
| if (s6 !== null) { | |
| peg$reportedPos = s2; | |
| s3 = peg$c53(s3, s5); | |
| if (s3 === null) { | |
| peg$currPos = s2; | |
| s2 = s3; | |
| } else { | |
| s2 = s3; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| if (s2 === null) { | |
| s2 = peg$parseIDENT(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c54(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsedeclaration() { | |
| var s0, s1, s2, s3, s4, s5; | |
| s0 = peg$currPos; | |
| s1 = peg$parseproperty(); | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 58) { | |
| s2 = peg$c18; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c19); } | |
| } | |
| if (s2 !== null) { | |
| s3 = []; | |
| s4 = peg$parseS(); | |
| while (s4 !== null) { | |
| s3.push(s4); | |
| s4 = peg$parseS(); | |
| } | |
| if (s3 !== null) { | |
| s4 = peg$parseexpr(); | |
| if (s4 !== null) { | |
| s5 = peg$parseprio(); | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c55(s1, s4, s5); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parseprio() { | |
| var s0, s1, s2, s3; | |
| s0 = peg$currPos; | |
| s1 = peg$parseIMPORTANT_SYM(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| s1 = [s1, s2]; | |
| s0 = s1; | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parseexpr() { | |
| var s0, s1, s2, s3, s4, s5; | |
| s0 = peg$currPos; | |
| s1 = peg$parseterm(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$currPos; | |
| s4 = peg$parseoperator(); | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| s5 = peg$parseterm(); | |
| if (s5 !== null) { | |
| s4 = [s4, s5]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$currPos; | |
| s4 = peg$parseoperator(); | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| s5 = peg$parseterm(); | |
| if (s5 !== null) { | |
| s4 = [s4, s5]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c56(s1, s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parseterm() { | |
| var s0, s1, s2, s3, s4, s5; | |
| s0 = peg$currPos; | |
| s1 = peg$parseunary_operator(); | |
| if (s1 === null) { | |
| s1 = peg$c3; | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$currPos; | |
| s3 = peg$parseEMS(); | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$parseS(); | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$parseS(); | |
| } | |
| if (s4 !== null) { | |
| s3 = [s3, s4]; | |
| s2 = s3; | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| if (s2 === null) { | |
| s2 = peg$currPos; | |
| s3 = peg$parseEXS(); | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$parseS(); | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$parseS(); | |
| } | |
| if (s4 !== null) { | |
| s3 = [s3, s4]; | |
| s2 = s3; | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| if (s2 === null) { | |
| s2 = peg$currPos; | |
| s3 = peg$parseLENGTH(); | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$parseS(); | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$parseS(); | |
| } | |
| if (s4 !== null) { | |
| s3 = [s3, s4]; | |
| s2 = s3; | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| if (s2 === null) { | |
| s2 = peg$currPos; | |
| s3 = peg$parseANGLE(); | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$parseS(); | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$parseS(); | |
| } | |
| if (s4 !== null) { | |
| s3 = [s3, s4]; | |
| s2 = s3; | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| if (s2 === null) { | |
| s2 = peg$currPos; | |
| s3 = peg$parseTIME(); | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$parseS(); | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$parseS(); | |
| } | |
| if (s4 !== null) { | |
| s3 = [s3, s4]; | |
| s2 = s3; | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| if (s2 === null) { | |
| s2 = peg$currPos; | |
| s3 = peg$parseFREQ(); | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$parseS(); | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$parseS(); | |
| } | |
| if (s4 !== null) { | |
| s3 = [s3, s4]; | |
| s2 = s3; | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| if (s2 === null) { | |
| s2 = peg$currPos; | |
| s3 = peg$parsePERCENTAGE(); | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$parseS(); | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$parseS(); | |
| } | |
| if (s4 !== null) { | |
| s3 = [s3, s4]; | |
| s2 = s3; | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| if (s2 === null) { | |
| s2 = peg$currPos; | |
| s3 = peg$parseNUMBER(); | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$parseS(); | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$parseS(); | |
| } | |
| if (s4 !== null) { | |
| s3 = [s3, s4]; | |
| s2 = s3; | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c57(s1, s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| s1 = peg$parseURI(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c58(s1); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$parsefunction(); | |
| if (s0 === null) { | |
| s0 = peg$parsehexcolor(); | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| s1 = peg$parseSTRING(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c59(s1); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| s1 = peg$parseIDENT(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c60(s1); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parsefunction() { | |
| var s0, s1, s2, s3, s4, s5, s6; | |
| s0 = peg$currPos; | |
| s1 = peg$parseFUNCTION(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| s3 = peg$parseexpr(); | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 41) { | |
| s4 = peg$c51; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c52); } | |
| } | |
| if (s4 !== null) { | |
| s5 = []; | |
| s6 = peg$parseS(); | |
| while (s6 !== null) { | |
| s5.push(s6); | |
| s6 = peg$parseS(); | |
| } | |
| if (s5 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c61(s1, s3); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsehexcolor() { | |
| var s0, s1, s2, s3; | |
| s0 = peg$currPos; | |
| s1 = peg$parseHASH(); | |
| if (s1 !== null) { | |
| s2 = []; | |
| s3 = peg$parseS(); | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| s3 = peg$parseS(); | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c62(s1); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parseh() { | |
| var s0; | |
| if (peg$c63.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c64); } | |
| } | |
| return s0; | |
| } | |
| function peg$parsenonascii() { | |
| var s0; | |
| if (peg$c65.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c66); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseunicode() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$currPos; | |
| s3 = peg$currPos; | |
| s4 = peg$parseh(); | |
| if (s4 !== null) { | |
| s5 = peg$parseh(); | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| s6 = peg$parseh(); | |
| if (s6 === null) { | |
| s6 = peg$c3; | |
| } | |
| if (s6 !== null) { | |
| s7 = peg$parseh(); | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| s8 = peg$parseh(); | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| s9 = peg$parseh(); | |
| if (s9 === null) { | |
| s9 = peg$c3; | |
| } | |
| if (s9 !== null) { | |
| s4 = [s4, s5, s6, s7, s8, s9]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 !== null) { | |
| s3 = input.substring(s2, peg$currPos); | |
| } | |
| s2 = s3; | |
| if (s2 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s3 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s3 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s3 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c73(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parseescape() { | |
| var s0, s1, s2; | |
| s0 = peg$parseunicode(); | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c74.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c75); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parsenmstart() { | |
| var s0; | |
| if (peg$c77.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c78); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$parsenonascii(); | |
| if (s0 === null) { | |
| s0 = peg$parseescape(); | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parsenmchar() { | |
| var s0; | |
| if (peg$c79.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c80); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$parsenonascii(); | |
| if (s0 === null) { | |
| s0 = peg$parseescape(); | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseinteger() { | |
| var s0, s1, s2, s3; | |
| s0 = peg$currPos; | |
| s1 = peg$currPos; | |
| s2 = []; | |
| if (peg$c81.test(input.charAt(peg$currPos))) { | |
| s3 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c82); } | |
| } | |
| if (s3 !== null) { | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| if (peg$c81.test(input.charAt(peg$currPos))) { | |
| s3 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c82); } | |
| } | |
| } | |
| } else { | |
| s2 = peg$c0; | |
| } | |
| if (s2 !== null) { | |
| s2 = input.substring(s1, peg$currPos); | |
| } | |
| s1 = s2; | |
| if (s1 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c83(s1); | |
| } | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| return s0; | |
| } | |
| function peg$parsefloat() { | |
| var s0, s1, s2, s3, s4, s5, s6; | |
| s0 = peg$currPos; | |
| s1 = peg$currPos; | |
| s2 = peg$currPos; | |
| s3 = []; | |
| if (peg$c81.test(input.charAt(peg$currPos))) { | |
| s4 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c82); } | |
| } | |
| while (s4 !== null) { | |
| s3.push(s4); | |
| if (peg$c81.test(input.charAt(peg$currPos))) { | |
| s4 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c82); } | |
| } | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 46) { | |
| s4 = peg$c39; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c40); } | |
| } | |
| if (s4 !== null) { | |
| s5 = []; | |
| if (peg$c81.test(input.charAt(peg$currPos))) { | |
| s6 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c82); } | |
| } | |
| if (s6 !== null) { | |
| while (s6 !== null) { | |
| s5.push(s6); | |
| if (peg$c81.test(input.charAt(peg$currPos))) { | |
| s6 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c82); } | |
| } | |
| } | |
| } else { | |
| s5 = peg$c0; | |
| } | |
| if (s5 !== null) { | |
| s3 = [s3, s4, s5]; | |
| s2 = s3; | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s2; | |
| s2 = peg$c0; | |
| } | |
| if (s2 !== null) { | |
| s2 = input.substring(s1, peg$currPos); | |
| } | |
| s1 = s2; | |
| if (s1 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c84(s1); | |
| } | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| return s0; | |
| } | |
| function peg$parsestring1() { | |
| var s0, s1, s2, s3, s4, s5; | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 34) { | |
| s1 = peg$c85; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c86); } | |
| } | |
| if (s1 !== null) { | |
| s2 = []; | |
| if (peg$c87.test(input.charAt(peg$currPos))) { | |
| s3 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c88); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s4 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s4 !== null) { | |
| s5 = peg$parsenl(); | |
| if (s5 !== null) { | |
| peg$reportedPos = s3; | |
| s4 = peg$c89(s5); | |
| if (s4 === null) { | |
| peg$currPos = s3; | |
| s3 = s4; | |
| } else { | |
| s3 = s4; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$parseescape(); | |
| } | |
| } | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| if (peg$c87.test(input.charAt(peg$currPos))) { | |
| s3 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c88); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s4 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s4 !== null) { | |
| s5 = peg$parsenl(); | |
| if (s5 !== null) { | |
| peg$reportedPos = s3; | |
| s4 = peg$c89(s5); | |
| if (s4 === null) { | |
| peg$currPos = s3; | |
| s3 = s4; | |
| } else { | |
| s3 = s4; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$parseescape(); | |
| } | |
| } | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 34) { | |
| s3 = peg$c85; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c86); } | |
| } | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c90(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsestring2() { | |
| var s0, s1, s2, s3, s4, s5; | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 39) { | |
| s1 = peg$c91; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c92); } | |
| } | |
| if (s1 !== null) { | |
| s2 = []; | |
| if (peg$c93.test(input.charAt(peg$currPos))) { | |
| s3 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c94); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s4 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s4 !== null) { | |
| s5 = peg$parsenl(); | |
| if (s5 !== null) { | |
| peg$reportedPos = s3; | |
| s4 = peg$c89(s5); | |
| if (s4 === null) { | |
| peg$currPos = s3; | |
| s3 = s4; | |
| } else { | |
| s3 = s4; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$parseescape(); | |
| } | |
| } | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| if (peg$c93.test(input.charAt(peg$currPos))) { | |
| s3 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c94); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s4 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s4 !== null) { | |
| s5 = peg$parsenl(); | |
| if (s5 !== null) { | |
| peg$reportedPos = s3; | |
| s4 = peg$c89(s5); | |
| if (s4 === null) { | |
| peg$currPos = s3; | |
| s3 = s4; | |
| } else { | |
| s3 = s4; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$parseescape(); | |
| } | |
| } | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 39) { | |
| s3 = peg$c91; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c92); } | |
| } | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c90(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsecomment() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; | |
| s0 = peg$currPos; | |
| if (input.substr(peg$currPos, 2) === peg$c95) { | |
| s1 = peg$c95; | |
| peg$currPos += 2; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c96); } | |
| } | |
| if (s1 !== null) { | |
| s2 = []; | |
| if (peg$c97.test(input.charAt(peg$currPos))) { | |
| s3 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c98); } | |
| } | |
| while (s3 !== null) { | |
| s2.push(s3); | |
| if (peg$c97.test(input.charAt(peg$currPos))) { | |
| s3 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c98); } | |
| } | |
| } | |
| if (s2 !== null) { | |
| s3 = []; | |
| if (input.charCodeAt(peg$currPos) === 42) { | |
| s4 = peg$c42; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c43); } | |
| } | |
| if (s4 !== null) { | |
| while (s4 !== null) { | |
| s3.push(s4); | |
| if (input.charCodeAt(peg$currPos) === 42) { | |
| s4 = peg$c42; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c43); } | |
| } | |
| } | |
| } else { | |
| s3 = peg$c0; | |
| } | |
| if (s3 !== null) { | |
| s4 = []; | |
| s5 = peg$currPos; | |
| if (peg$c99.test(input.charAt(peg$currPos))) { | |
| s6 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c100); } | |
| } | |
| if (s6 !== null) { | |
| s7 = []; | |
| if (peg$c97.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c98); } | |
| } | |
| while (s8 !== null) { | |
| s7.push(s8); | |
| if (peg$c97.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c98); } | |
| } | |
| } | |
| if (s7 !== null) { | |
| s8 = []; | |
| if (input.charCodeAt(peg$currPos) === 42) { | |
| s9 = peg$c42; | |
| peg$currPos++; | |
| } else { | |
| s9 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c43); } | |
| } | |
| if (s9 !== null) { | |
| while (s9 !== null) { | |
| s8.push(s9); | |
| if (input.charCodeAt(peg$currPos) === 42) { | |
| s9 = peg$c42; | |
| peg$currPos++; | |
| } else { | |
| s9 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c43); } | |
| } | |
| } | |
| } else { | |
| s8 = peg$c0; | |
| } | |
| if (s8 !== null) { | |
| s6 = [s6, s7, s8]; | |
| s5 = s6; | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| while (s5 !== null) { | |
| s4.push(s5); | |
| s5 = peg$currPos; | |
| if (peg$c99.test(input.charAt(peg$currPos))) { | |
| s6 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c100); } | |
| } | |
| if (s6 !== null) { | |
| s7 = []; | |
| if (peg$c97.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c98); } | |
| } | |
| while (s8 !== null) { | |
| s7.push(s8); | |
| if (peg$c97.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c98); } | |
| } | |
| } | |
| if (s7 !== null) { | |
| s8 = []; | |
| if (input.charCodeAt(peg$currPos) === 42) { | |
| s9 = peg$c42; | |
| peg$currPos++; | |
| } else { | |
| s9 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c43); } | |
| } | |
| if (s9 !== null) { | |
| while (s9 !== null) { | |
| s8.push(s9); | |
| if (input.charCodeAt(peg$currPos) === 42) { | |
| s9 = peg$c42; | |
| peg$currPos++; | |
| } else { | |
| s9 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c43); } | |
| } | |
| } | |
| } else { | |
| s8 = peg$c0; | |
| } | |
| if (s8 !== null) { | |
| s6 = [s6, s7, s8]; | |
| s5 = s6; | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s5; | |
| s5 = peg$c0; | |
| } | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 47) { | |
| s5 = peg$c20; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c21); } | |
| } | |
| if (s5 !== null) { | |
| s1 = [s1, s2, s3, s4, s5]; | |
| s0 = s1; | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parseident() { | |
| var s0, s1, s2, s3, s4; | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 45) { | |
| s1 = peg$c30; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c31); } | |
| } | |
| if (s1 === null) { | |
| s1 = peg$c3; | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parsenmstart(); | |
| if (s2 !== null) { | |
| s3 = []; | |
| s4 = peg$parsenmchar(); | |
| while (s4 !== null) { | |
| s3.push(s4); | |
| s4 = peg$parsenmchar(); | |
| } | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c101(s1, s2, s3); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsename() { | |
| var s0, s1, s2; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsenmchar(); | |
| if (s2 !== null) { | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsenmchar(); | |
| } | |
| } else { | |
| s1 = peg$c0; | |
| } | |
| if (s1 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c102(s1); | |
| } | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| return s0; | |
| } | |
| function peg$parsenum() { | |
| var s0; | |
| s0 = peg$parsefloat(); | |
| if (s0 === null) { | |
| s0 = peg$parseinteger(); | |
| } | |
| return s0; | |
| } | |
| function peg$parsestring() { | |
| var s0; | |
| s0 = peg$parsestring1(); | |
| if (s0 === null) { | |
| s0 = peg$parsestring2(); | |
| } | |
| return s0; | |
| } | |
| function peg$parseurl() { | |
| var s0, s1, s2; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| if (peg$c103.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c104); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$parsenonascii(); | |
| if (s2 === null) { | |
| s2 = peg$parseescape(); | |
| } | |
| } | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| if (peg$c103.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c104); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$parsenonascii(); | |
| if (s2 === null) { | |
| s2 = peg$parseescape(); | |
| } | |
| } | |
| } | |
| if (s1 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c105(s1); | |
| } | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| return s0; | |
| } | |
| function peg$parses() { | |
| var s0, s1; | |
| s0 = []; | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s1 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| if (s1 !== null) { | |
| while (s1 !== null) { | |
| s0.push(s1); | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s1 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| } else { | |
| s0 = peg$c0; | |
| } | |
| return s0; | |
| } | |
| function peg$parsew() { | |
| var s0; | |
| s0 = peg$parses(); | |
| if (s0 === null) { | |
| s0 = peg$c3; | |
| } | |
| return s0; | |
| } | |
| function peg$parsenl() { | |
| var s0; | |
| if (input.charCodeAt(peg$currPos) === 10) { | |
| s0 = peg$c106; | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c107); } | |
| } | |
| if (s0 === null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s0 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s0 === null) { | |
| if (input.charCodeAt(peg$currPos) === 13) { | |
| s0 = peg$c108; | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c109); } | |
| } | |
| if (s0 === null) { | |
| if (input.charCodeAt(peg$currPos) === 12) { | |
| s0 = peg$c110; | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c111); } | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseA() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c112.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c113); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c116) { | |
| s6 = peg$c116; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c117); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c118(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c119) { | |
| s6 = peg$c119; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c120); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c121(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseC() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c122.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c123); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c124) { | |
| s6 = peg$c124; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c125); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c126(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c127) { | |
| s6 = peg$c127; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c128); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c129(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseD() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c130.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c131); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c132) { | |
| s6 = peg$c132; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c133); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c134(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c135) { | |
| s6 = peg$c135; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c136); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c137(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseE() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c138.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c139); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c140) { | |
| s6 = peg$c140; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c141); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c142(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c143) { | |
| s6 = peg$c143; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c144); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c145(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseG() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c146.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c147); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c148) { | |
| s6 = peg$c148; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c149); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c150(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c151) { | |
| s6 = peg$c151; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c152); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c153(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c146.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c147); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseH() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c154.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c155); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c156) { | |
| s6 = peg$c156; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c157); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c158(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c159) { | |
| s6 = peg$c159; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c160); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c161(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c154.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c155); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseI() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c162.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c163); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c164) { | |
| s6 = peg$c164; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c165); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c166(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c167) { | |
| s6 = peg$c167; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c168); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c169(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c162.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c163); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseK() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8; | |
| if (peg$c170.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c171); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 52) { | |
| s6 = peg$c172; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c173); } | |
| } | |
| if (s6 !== null) { | |
| if (peg$c174.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c175); } | |
| } | |
| if (s7 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s8 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s8 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c176(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 54) { | |
| s6 = peg$c177; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c178); } | |
| } | |
| if (s6 !== null) { | |
| if (peg$c174.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c175); } | |
| } | |
| if (s7 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s8 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s8 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c179(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c170.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c171); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseL() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8; | |
| if (peg$c180.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c181); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 52) { | |
| s6 = peg$c172; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c173); } | |
| } | |
| if (s6 !== null) { | |
| if (peg$c122.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c123); } | |
| } | |
| if (s7 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s8 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s8 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c182(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 54) { | |
| s6 = peg$c177; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c178); } | |
| } | |
| if (s6 !== null) { | |
| if (peg$c122.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c123); } | |
| } | |
| if (s7 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s8 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s8 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c183(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c180.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c181); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseM() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8; | |
| if (peg$c184.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c185); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 52) { | |
| s6 = peg$c172; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c173); } | |
| } | |
| if (s6 !== null) { | |
| if (peg$c130.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c131); } | |
| } | |
| if (s7 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s8 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s8 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c186(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 54) { | |
| s6 = peg$c177; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c178); } | |
| } | |
| if (s6 !== null) { | |
| if (peg$c130.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c131); } | |
| } | |
| if (s7 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s8 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s8 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c187(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c184.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c185); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseN() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8; | |
| if (peg$c188.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c189); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 52) { | |
| s6 = peg$c172; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c173); } | |
| } | |
| if (s6 !== null) { | |
| if (peg$c138.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c139); } | |
| } | |
| if (s7 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s8 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s8 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c190(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 54) { | |
| s6 = peg$c177; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c178); } | |
| } | |
| if (s6 !== null) { | |
| if (peg$c138.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c139); } | |
| } | |
| if (s7 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s8 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s8 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c191(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c188.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c189); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseO() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8; | |
| if (peg$c192.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c193); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 52) { | |
| s6 = peg$c172; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c173); } | |
| } | |
| if (s6 !== null) { | |
| if (peg$c194.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c195); } | |
| } | |
| if (s7 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s8 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s8 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c196(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 54) { | |
| s6 = peg$c177; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c178); } | |
| } | |
| if (s6 !== null) { | |
| if (peg$c194.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c195); } | |
| } | |
| if (s7 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s8 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s8 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c197(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c192.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c193); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseP() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c198.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c199); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c200) { | |
| s6 = peg$c200; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c201); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c202(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c203) { | |
| s6 = peg$c203; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c204); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c205(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c198.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c199); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseR() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c206.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c207); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c208) { | |
| s6 = peg$c208; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c209); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c210(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c211) { | |
| s6 = peg$c211; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c212); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c213(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c206.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c207); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseS_() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c214.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c215); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c216) { | |
| s6 = peg$c216; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c217); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c218(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c219) { | |
| s6 = peg$c219; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c220); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c221(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c214.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c215); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseT() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c222.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c223); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c224) { | |
| s6 = peg$c224; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c225); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c226(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c227) { | |
| s6 = peg$c227; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c228); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c229(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c222.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c223); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseU() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c230.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c231); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c232) { | |
| s6 = peg$c232; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c233); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c234(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c235) { | |
| s6 = peg$c235; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c236); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c237(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c230.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c231); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseX() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| if (peg$c238.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c239); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c240) { | |
| s6 = peg$c240; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c241); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c242(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c243) { | |
| s6 = peg$c243; | |
| peg$currPos += 2; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c244); } | |
| } | |
| if (s6 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s7 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s7 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s7 === null) { | |
| s7 = peg$c3; | |
| } | |
| if (s7 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c245(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c238.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c239); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseZ() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8; | |
| if (peg$c246.test(input.charAt(peg$currPos))) { | |
| s0 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s0 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c247); } | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 53) { | |
| s6 = peg$c248; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c249); } | |
| } | |
| if (s6 !== null) { | |
| if (peg$c112.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c113); } | |
| } | |
| if (s7 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s8 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s8 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c250(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s2 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s2 === null) { | |
| s2 = peg$c3; | |
| } | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s3 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s3 === null) { | |
| s3 = peg$c3; | |
| } | |
| if (s3 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s4 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s4 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s4 === null) { | |
| s4 = peg$c3; | |
| } | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 48) { | |
| s5 = peg$c114; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c115); } | |
| } | |
| if (s5 === null) { | |
| s5 = peg$c3; | |
| } | |
| if (s5 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 55) { | |
| s6 = peg$c251; | |
| peg$currPos++; | |
| } else { | |
| s6 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c252); } | |
| } | |
| if (s6 !== null) { | |
| if (peg$c112.test(input.charAt(peg$currPos))) { | |
| s7 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s7 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c113); } | |
| } | |
| if (s7 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c69) { | |
| s8 = peg$c69; | |
| peg$currPos += 2; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c70); } | |
| } | |
| if (s8 === null) { | |
| if (peg$c71.test(input.charAt(peg$currPos))) { | |
| s8 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s8 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c72); } | |
| } | |
| } | |
| if (s8 === null) { | |
| s8 = peg$c3; | |
| } | |
| if (s8 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c253(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| if (s0 === null) { | |
| s0 = peg$currPos; | |
| if (input.charCodeAt(peg$currPos) === 92) { | |
| s1 = peg$c67; | |
| peg$currPos++; | |
| } else { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c68); } | |
| } | |
| if (s1 !== null) { | |
| if (peg$c246.test(input.charAt(peg$currPos))) { | |
| s2 = input.charAt(peg$currPos); | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c247); } | |
| } | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c76(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| return s0; | |
| } | |
| function peg$parseS() { | |
| var s0, s1, s2; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parses(); | |
| if (s2 !== null) { | |
| s1 = [s1, s2]; | |
| s0 = s1; | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c254); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseCDO() { | |
| var s0, s1, s2; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| if (input.substr(peg$currPos, 4) === peg$c255) { | |
| s2 = peg$c255; | |
| peg$currPos += 4; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c256); } | |
| } | |
| if (s2 !== null) { | |
| s1 = [s1, s2]; | |
| s0 = s1; | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c255); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseCDC() { | |
| var s0, s1, s2; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| if (input.substr(peg$currPos, 3) === peg$c257) { | |
| s2 = peg$c257; | |
| peg$currPos += 3; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c258); } | |
| } | |
| if (s2 !== null) { | |
| s1 = [s1, s2]; | |
| s0 = s1; | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c257); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseINCLUDES() { | |
| var s0, s1, s2; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c259) { | |
| s2 = peg$c259; | |
| peg$currPos += 2; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c260); } | |
| } | |
| if (s2 !== null) { | |
| s1 = [s1, s2]; | |
| s0 = s1; | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c259); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseDASHMATCH() { | |
| var s0, s1, s2; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| if (input.substr(peg$currPos, 2) === peg$c261) { | |
| s2 = peg$c261; | |
| peg$currPos += 2; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c262); } | |
| } | |
| if (s2 !== null) { | |
| s1 = [s1, s2]; | |
| s0 = s1; | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c261); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseSTRING() { | |
| var s0, s1, s2; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parsestring(); | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c264(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c263); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseIDENT() { | |
| var s0, s1, s2; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parseident(); | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c16(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c265); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseHASH() { | |
| var s0, s1, s2, s3; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 35) { | |
| s2 = peg$c267; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c268); } | |
| } | |
| if (s2 !== null) { | |
| s3 = peg$parsename(); | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c269(s3); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c266); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseIMPORT_SYM() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 64) { | |
| s2 = peg$c271; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c272); } | |
| } | |
| if (s2 !== null) { | |
| s3 = peg$parseI(); | |
| if (s3 !== null) { | |
| s4 = peg$parseM(); | |
| if (s4 !== null) { | |
| s5 = peg$parseP(); | |
| if (s5 !== null) { | |
| s6 = peg$parseO(); | |
| if (s6 !== null) { | |
| s7 = peg$parseR(); | |
| if (s7 !== null) { | |
| s8 = peg$parseT(); | |
| if (s8 !== null) { | |
| s1 = [s1, s2, s3, s4, s5, s6, s7, s8]; | |
| s0 = s1; | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c270); } | |
| } | |
| return s0; | |
| } | |
| function peg$parsePAGE_SYM() { | |
| var s0, s1, s2, s3, s4, s5, s6; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 64) { | |
| s2 = peg$c271; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c272); } | |
| } | |
| if (s2 !== null) { | |
| s3 = peg$parseP(); | |
| if (s3 !== null) { | |
| s4 = peg$parseA(); | |
| if (s4 !== null) { | |
| s5 = peg$parseG(); | |
| if (s5 !== null) { | |
| s6 = peg$parseE(); | |
| if (s6 !== null) { | |
| s1 = [s1, s2, s3, s4, s5, s6]; | |
| s0 = s1; | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c273); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseMEDIA_SYM() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 64) { | |
| s2 = peg$c271; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c272); } | |
| } | |
| if (s2 !== null) { | |
| s3 = peg$parseM(); | |
| if (s3 !== null) { | |
| s4 = peg$parseE(); | |
| if (s4 !== null) { | |
| s5 = peg$parseD(); | |
| if (s5 !== null) { | |
| s6 = peg$parseI(); | |
| if (s6 !== null) { | |
| s7 = peg$parseA(); | |
| if (s7 !== null) { | |
| s1 = [s1, s2, s3, s4, s5, s6, s7]; | |
| s0 = s1; | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c274); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseCHARSET_SYM() { | |
| var s0, s1, s2; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| if (input.substr(peg$currPos, 9) === peg$c276) { | |
| s2 = peg$c276; | |
| peg$currPos += 9; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c277); } | |
| } | |
| if (s2 !== null) { | |
| s1 = [s1, s2]; | |
| s0 = s1; | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c275); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseIMPORTANT_SYM() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 33) { | |
| s2 = peg$c279; | |
| peg$currPos++; | |
| } else { | |
| s2 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c280); } | |
| } | |
| if (s2 !== null) { | |
| s3 = []; | |
| s4 = peg$parses(); | |
| if (s4 === null) { | |
| s4 = peg$parsecomment(); | |
| } | |
| while (s4 !== null) { | |
| s3.push(s4); | |
| s4 = peg$parses(); | |
| if (s4 === null) { | |
| s4 = peg$parsecomment(); | |
| } | |
| } | |
| if (s3 !== null) { | |
| s4 = peg$parseI(); | |
| if (s4 !== null) { | |
| s5 = peg$parseM(); | |
| if (s5 !== null) { | |
| s6 = peg$parseP(); | |
| if (s6 !== null) { | |
| s7 = peg$parseO(); | |
| if (s7 !== null) { | |
| s8 = peg$parseR(); | |
| if (s8 !== null) { | |
| s9 = peg$parseT(); | |
| if (s9 !== null) { | |
| s10 = peg$parseA(); | |
| if (s10 !== null) { | |
| s11 = peg$parseN(); | |
| if (s11 !== null) { | |
| s12 = peg$parseT(); | |
| if (s12 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c281(); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c278); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseEMS() { | |
| var s0, s1, s2, s3, s4; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parsenum(); | |
| if (s2 !== null) { | |
| s3 = peg$parseE(); | |
| if (s3 !== null) { | |
| s4 = peg$parseM(); | |
| if (s4 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c283(s2, s3, s4); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c282); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseEXS() { | |
| var s0, s1, s2, s3, s4; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parsenum(); | |
| if (s2 !== null) { | |
| s3 = peg$parseE(); | |
| if (s3 !== null) { | |
| s4 = peg$parseX(); | |
| if (s4 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c284(s2, s3, s4); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c282); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseLENGTH() { | |
| var s0, s1, s2, s3, s4, s5; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parsenum(); | |
| if (s2 !== null) { | |
| s3 = peg$currPos; | |
| s4 = peg$parseP(); | |
| if (s4 !== null) { | |
| s5 = peg$parseX(); | |
| if (s5 !== null) { | |
| s4 = [s4, s5]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$currPos; | |
| s4 = peg$parseC(); | |
| if (s4 !== null) { | |
| s5 = peg$parseM(); | |
| if (s5 !== null) { | |
| s4 = [s4, s5]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$currPos; | |
| s4 = peg$parseM(); | |
| if (s4 !== null) { | |
| s5 = peg$parseM(); | |
| if (s5 !== null) { | |
| s4 = [s4, s5]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$currPos; | |
| s4 = peg$parseI(); | |
| if (s4 !== null) { | |
| s5 = peg$parseN(); | |
| if (s5 !== null) { | |
| s4 = [s4, s5]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$currPos; | |
| s4 = peg$parseP(); | |
| if (s4 !== null) { | |
| s5 = peg$parseT(); | |
| if (s5 !== null) { | |
| s4 = [s4, s5]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$currPos; | |
| s4 = peg$parseP(); | |
| if (s4 !== null) { | |
| s5 = peg$parseC(); | |
| if (s5 !== null) { | |
| s4 = [s4, s5]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c285(s2, s3); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c282); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseANGLE() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parsenum(); | |
| if (s2 !== null) { | |
| s3 = peg$currPos; | |
| s4 = peg$parseD(); | |
| if (s4 !== null) { | |
| s5 = peg$parseE(); | |
| if (s5 !== null) { | |
| s6 = peg$parseG(); | |
| if (s6 !== null) { | |
| s4 = [s4, s5, s6]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$currPos; | |
| s4 = peg$parseR(); | |
| if (s4 !== null) { | |
| s5 = peg$parseA(); | |
| if (s5 !== null) { | |
| s6 = peg$parseD(); | |
| if (s6 !== null) { | |
| s4 = [s4, s5, s6]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$currPos; | |
| s4 = peg$parseG(); | |
| if (s4 !== null) { | |
| s5 = peg$parseR(); | |
| if (s5 !== null) { | |
| s6 = peg$parseA(); | |
| if (s6 !== null) { | |
| s7 = peg$parseD(); | |
| if (s7 !== null) { | |
| s4 = [s4, s5, s6, s7]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } | |
| } | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c285(s2, s3); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c286); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseTIME() { | |
| var s0, s1, s2, s3, s4, s5; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parsenum(); | |
| if (s2 !== null) { | |
| s3 = peg$currPos; | |
| s4 = peg$parseM(); | |
| if (s4 !== null) { | |
| s5 = peg$parseS_(); | |
| if (s5 !== null) { | |
| peg$reportedPos = s3; | |
| s4 = peg$c288(s4, s5); | |
| if (s4 === null) { | |
| peg$currPos = s3; | |
| s3 = s4; | |
| } else { | |
| s3 = s4; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$parseS_(); | |
| } | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c289(s2, s3); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c287); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseFREQ() { | |
| var s0, s1, s2, s3, s4, s5, s6; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parsenum(); | |
| if (s2 !== null) { | |
| s3 = peg$currPos; | |
| s4 = peg$parseH(); | |
| if (s4 !== null) { | |
| s5 = peg$parseZ(); | |
| if (s5 !== null) { | |
| s4 = [s4, s5]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 === null) { | |
| s3 = peg$currPos; | |
| s4 = peg$parseK(); | |
| if (s4 !== null) { | |
| s5 = peg$parseH(); | |
| if (s5 !== null) { | |
| s6 = peg$parseZ(); | |
| if (s6 !== null) { | |
| s4 = [s4, s5, s6]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c291(s2, s3); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c290); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseDIMENSION() { | |
| var s0, s1, s2, s3; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parsenum(); | |
| if (s2 !== null) { | |
| s3 = peg$parseident(); | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c293(s2, s3); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c292); } | |
| } | |
| return s0; | |
| } | |
| function peg$parsePERCENTAGE() { | |
| var s0, s1, s2, s3, s4, s5; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$currPos; | |
| s3 = peg$currPos; | |
| s4 = peg$parsenum(); | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 37) { | |
| s5 = peg$c295; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c296); } | |
| } | |
| if (s5 !== null) { | |
| s4 = [s4, s5]; | |
| s3 = s4; | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s3; | |
| s3 = peg$c0; | |
| } | |
| if (s3 !== null) { | |
| s3 = input.substring(s2, peg$currPos); | |
| } | |
| s2 = s3; | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c297(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c294); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseNUMBER() { | |
| var s0, s1, s2; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parsenum(); | |
| if (s2 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c299(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c298); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseURI() { | |
| var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parseU(); | |
| if (s2 !== null) { | |
| s3 = peg$parseR(); | |
| if (s3 !== null) { | |
| s4 = peg$parseL(); | |
| if (s4 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 40) { | |
| s5 = peg$c301; | |
| peg$currPos++; | |
| } else { | |
| s5 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c302); } | |
| } | |
| if (s5 !== null) { | |
| s6 = peg$parsew(); | |
| if (s6 !== null) { | |
| s7 = peg$parsestring(); | |
| if (s7 === null) { | |
| s7 = peg$parseurl(); | |
| } | |
| if (s7 !== null) { | |
| s8 = peg$parsew(); | |
| if (s8 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 41) { | |
| s9 = peg$c51; | |
| peg$currPos++; | |
| } else { | |
| s9 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c52); } | |
| } | |
| if (s9 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c303(s7); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c300); } | |
| } | |
| return s0; | |
| } | |
| function peg$parseFUNCTION() { | |
| var s0, s1, s2, s3; | |
| peg$silentFails++; | |
| s0 = peg$currPos; | |
| s1 = []; | |
| s2 = peg$parsecomment(); | |
| while (s2 !== null) { | |
| s1.push(s2); | |
| s2 = peg$parsecomment(); | |
| } | |
| if (s1 !== null) { | |
| s2 = peg$parseident(); | |
| if (s2 !== null) { | |
| if (input.charCodeAt(peg$currPos) === 40) { | |
| s3 = peg$c301; | |
| peg$currPos++; | |
| } else { | |
| s3 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c302); } | |
| } | |
| if (s3 !== null) { | |
| peg$reportedPos = s0; | |
| s1 = peg$c305(s2); | |
| if (s1 === null) { | |
| peg$currPos = s0; | |
| s0 = s1; | |
| } else { | |
| s0 = s1; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| } else { | |
| peg$currPos = s0; | |
| s0 = peg$c0; | |
| } | |
| peg$silentFails--; | |
| if (s0 === null) { | |
| s1 = null; | |
| if (peg$silentFails === 0) { peg$fail(peg$c304); } | |
| } | |
| return s0; | |
| } | |
| peg$result = peg$startRuleFunction(); | |
| if (peg$result !== null && peg$currPos === input.length) { | |
| return peg$result; | |
| } else { | |
| peg$cleanupExpected(peg$maxFailExpected); | |
| peg$reportedPos = Math.max(peg$currPos, peg$maxFailPos); | |
| throw new SyntaxError( | |
| peg$maxFailExpected, | |
| peg$reportedPos < input.length ? input.charAt(peg$reportedPos) : null, | |
| peg$reportedPos, | |
| peg$computePosDetails(peg$reportedPos).line, | |
| peg$computePosDetails(peg$reportedPos).column | |
| ); | |
| } | |
| } | |
| return { | |
| SyntaxError: SyntaxError, | |
| parse: parse | |
| }; | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = (function(){ | |
| /* Generated by PEG.js-fn @VERSION (http://pegjs.majda.cz/). */ | |
| /* Functional modification by [email protected] (http://shamansir.github.com/). */ | |
| /* ########### ENVIRONMENT ########### */ | |
| var input, | |
| options; | |
| var pos, // 0, parser position | |
| p_pos; // 0, previous parser position | |
| // This code encloses all of the user blocks (initializer and/or actions) | |
| // in their own sandbox, so if there is an initializer, its inner variables | |
| // will [only] be accessible to actions; this, however, requires an initializer | |
| // not to have any first-level return statements. Also, this approach keeps parser | |
| // inner variables safe from user access, except the ones defined above. | |
| var __p_blocks = (function() { return function() { | |
| // backwards compatibility with original peg-js | |
| function offset() { return p_pos; }; | |
| function text() { return input.substring(p_pos, pos); }; | |
| function line() { return __p_coord(p_pos)[1]; }; | |
| function column() { return __p_coord(p_pos)[0]; }; | |
| function cell() { return __p_coord(p_pos); }; | |
| /* ########### USER CODE ########### */ | |
| /* ----------- BLOCKS ----------- */ | |
| // Blocks are grouped by rule name and id; they all get access to current context | |
| // through č variable which they expand into their arguments. Arguments | |
| // names are precalculated during parser generation process. | |
| // ƒ and č variables are named so creepy just to ensure that parser writer will not use them | |
| // for naming variables in his code (only č may clash in this architecture, in fact), | |
| // we hope any modern environment supports Unicode now | |
| return { | |
| "start": [ | |
| function(č) { | |
| // start[0] | |
| return (function(stylesheet) { | |
| return stylesheet; | |
| })(č.stylesheet); | |
| } | |
| ], | |
| "stylesheet": [ | |
| function(č) { | |
| // stylesheet[0] | |
| return (function(charset,imports,rules) { | |
| var importsConverted = []; | |
| for (var i = 0; i < imports.length; i++) { | |
| importsConverted.push(imports[i][0]); | |
| } | |
| var rulesConverted = []; | |
| for (i = 0; i < rules.length; i++) { | |
| rulesConverted.push(rules[i][0]); | |
| } | |
| return { | |
| type: "stylesheet", | |
| charset: charset !== "" ? charset[1] : null, | |
| imports: importsConverted, | |
| rules: rulesConverted | |
| }; | |
| })(č.charset,č.imports,č.rules); | |
| } | |
| ], | |
| "import": [ | |
| function(č) { | |
| // import[0] | |
| return (function(href,media) { | |
| return { | |
| type: "import_rule", | |
| href: href, | |
| media: media !== "" ? media : [] | |
| }; | |
| })(č.href,č.media); | |
| } | |
| ], | |
| "media": [ | |
| function(č) { | |
| // media[0] | |
| return (function(media,rules) { | |
| return { | |
| type: "media_rule", | |
| media: media, | |
| rules: rules | |
| }; | |
| })(č.media,č.rules); | |
| } | |
| ], | |
| "media_list": [ | |
| function(č) { | |
| // media_list[0] | |
| return (function(head,tail) { | |
| var result = [head]; | |
| for (var i = 0; i < tail.length; i++) { | |
| result.push(tail[i][2]); | |
| } | |
| return result; | |
| })(č.head,č.tail); | |
| } | |
| ], | |
| "medium": [ | |
| function(č) { | |
| // medium[0] | |
| return (function(ident) { | |
| return ident; | |
| })(č.ident); | |
| } | |
| ], | |
| "page": [ | |
| function(č) { | |
| // page[0] | |
| return (function(qualifier,declarationsHead,declarationsTail) { | |
| var declarations = declarationsHead !== "" ? [declarationsHead] : []; | |
| for (var i = 0; i < declarationsTail.length; i++) { | |
| if (declarationsTail[i][2] !== "") { | |
| declarations.push(declarationsTail[i][2]); | |
| } | |
| } | |
| return { | |
| type: "page_rule", | |
| qualifier: qualifier !== "" ? qualifier : null, | |
| declarations: declarations | |
| }; | |
| })(č.qualifier,č.declarationsHead,č.declarationsTail); | |
| } | |
| ], | |
| "pseudo_page": [ | |
| function(č) { | |
| // pseudo_page[0] | |
| return (function(ident) { | |
| return ident; | |
| })(č.ident); | |
| } | |
| ], | |
| "operator": [ | |
| function(č) { | |
| // operator[0] | |
| return "/"; | |
| }, | |
| function(č) { | |
| // operator[1] | |
| return ","; | |
| } | |
| ], | |
| "combinator": [ | |
| function(č) { | |
| // combinator[0] | |
| return "+"; | |
| }, | |
| function(č) { | |
| // combinator[1] | |
| return ">"; | |
| } | |
| ], | |
| "property": [ | |
| function(č) { | |
| // property[0] | |
| return (function(ident) { | |
| return ident; | |
| })(č.ident); | |
| } | |
| ], | |
| "ruleset": [ | |
| function(č) { | |
| // ruleset[0] | |
| return (function(selectorsHead,selectorsTail,declarationsHead,declarationsTail) { | |
| var selectors = [selectorsHead]; | |
| for (var i = 0; i < selectorsTail.length; i++) { | |
| selectors.push(selectorsTail[i][2]); | |
| } | |
| var declarations = declarationsHead !== "" ? [declarationsHead] : []; | |
| for (i = 0; i < declarationsTail.length; i++) { | |
| if (declarationsTail[i][2] !== "") { | |
| declarations.push(declarationsTail[i][2]); | |
| } | |
| } | |
| return { | |
| type: "ruleset", | |
| selectors: selectors, | |
| declarations: declarations | |
| }; | |
| })(č.selectorsHead,č.selectorsTail,č.declarationsHead,č.declarationsTail); | |
| } | |
| ], | |
| "selector": [ | |
| function(č) { | |
| // selector[0] | |
| return (function(left,combinator,right) { | |
| return { | |
| type: "selector", | |
| combinator: combinator, | |
| left: left, | |
| right: right | |
| }; | |
| })(č.left,č.combinator,č.right); | |
| }, | |
| function(č) { | |
| // selector[1] | |
| return (function(left,right) { | |
| return { | |
| type: "selector", | |
| combinator: " ", | |
| left: left, | |
| right: right | |
| }; | |
| })(č.left,č.right); | |
| }, | |
| function(č) { | |
| // selector[2] | |
| return (function(selector) { | |
| return selector; | |
| })(č.selector); | |
| } | |
| ], | |
| "simple_selector": [ | |
| function(č) { | |
| // simple_selector[0] | |
| return (function(element,id) { | |
| return { type: "ID selector", id: id.substr(1) }; | |
| })(č.element,č.id); | |
| }, | |
| function(č) { | |
| // simple_selector[1] | |
| return (function(element,qualifiers) { | |
| return { | |
| type: "simple_selector", | |
| element: element, | |
| qualifiers: qualifiers | |
| }; | |
| })(č.element,č.qualifiers); | |
| }, | |
| function(č) { | |
| // simple_selector[2] | |
| return (function(id) { | |
| return { type: "ID selector", id: id.substr(1) }; | |
| })(č.id); | |
| }, | |
| function(č) { | |
| // simple_selector[3] | |
| return (function(qualifiers) { | |
| return { | |
| type: "simple_selector", | |
| element: "*", | |
| qualifiers: qualifiers | |
| }; | |
| })(č.qualifiers); | |
| } | |
| ], | |
| "class": [ | |
| function(č) { | |
| // class[0] | |
| return (function(class_) { | |
| return { type: "class_selector", "class": class_ }; | |
| })(č.class_); | |
| } | |
| ], | |
| "attrib": [ | |
| function(č) { | |
| // attrib[0] | |
| return (function(attribute,operatorAndValue) { | |
| return { | |
| type: "attribute_selector", | |
| attribute: attribute, | |
| operator: operatorAndValue !== "" ? operatorAndValue[0] : null, | |
| value: operatorAndValue !== "" ? operatorAndValue[2] : null | |
| }; | |
| })(č.attribute,č.operatorAndValue); | |
| } | |
| ], | |
| "pseudo": [ | |
| function(č) { | |
| // pseudo[0] | |
| return (function(name,params) { | |
| return { | |
| type: "function", | |
| name: name, | |
| params: params !== "" ? [params[0]] : [] | |
| }; | |
| })(č.name,č.params); | |
| }, | |
| function(č) { | |
| // pseudo[1] | |
| return (function(value) { | |
| /* | |
| * The returned object has somewhat vague property names and values because | |
| * the rule matches both pseudo-classes and pseudo-elements (they look the | |
| * same at the syntactic level). | |
| */ | |
| return { | |
| type: "pseudo_selector", | |
| value: value | |
| }; | |
| })(č.value); | |
| } | |
| ], | |
| "declaration": [ | |
| function(č) { | |
| // declaration[0] | |
| return (function(property,expression,important) { | |
| return { | |
| type: "declaration", | |
| property: property, | |
| expression: expression, | |
| important: important !== "" ? true : false | |
| }; | |
| })(č.property,č.expression,č.important); | |
| } | |
| ], | |
| "expr": [ | |
| function(č) { | |
| // expr[0] | |
| return (function(head,tail) { | |
| var result = head; | |
| for (var i = 0; i < tail.length; i++) { | |
| result = { | |
| type: "expression", | |
| operator: tail[i][0], | |
| left: result, | |
| right: tail[i][1] | |
| }; | |
| } | |
| return result; | |
| })(č.head,č.tail); | |
| } | |
| ], | |
| "term": [ | |
| function(č) { | |
| // term[0] | |
| return (function(operator,value) { | |
| return { type: "value", value: operator + value[0] }; | |
| })(č.operator,č.value); | |
| }, | |
| function(č) { | |
| // term[1] | |
| return (function(value) { | |
| return { type: "uri", value: value }; | |
| })(č.value); | |
| }, | |
| function(č) { | |
| // term[2] | |
| return (function(value) { | |
| return { type: "string", value: value }; | |
| })(č.value); | |
| }, | |
| function(č) { | |
| // term[3] | |
| return (function(value) { | |
| return { type: "ident", value: value }; | |
| })(č.value); | |
| } | |
| ], | |
| "function": [ | |
| function(č) { | |
| // function[0] | |
| return (function(name,params) { | |
| return { | |
| type: "function", | |
| name: name, | |
| params: params | |
| }; | |
| })(č.name,č.params); | |
| } | |
| ], | |
| "hexcolor": [ | |
| function(č) { | |
| // hexcolor[0] | |
| return (function(value) { | |
| return { type: "hexcolor", value: value}; | |
| })(č.value); | |
| } | |
| ], | |
| "unicode": [ | |
| function(č) { | |
| // unicode[0] | |
| return (function(h1,h2,h3,h4,h5,h6) { | |
| return String.fromCharCode(parseInt("0x" + h1 + h2 + h3 + h4 + h5 + h6)); | |
| })(č.h1,č.h2,č.h3,č.h4,č.h5,č.h6); | |
| } | |
| ], | |
| "escape": [ | |
| function(č) { | |
| // escape[0] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "integer": [ | |
| function(č) { | |
| // integer[0] | |
| return (function(digits) { | |
| return parseInt(digits.join("")); | |
| })(č.digits); | |
| } | |
| ], | |
| "float": [ | |
| function(č) { | |
| // float[0] | |
| return (function(before,after) { | |
| return parseFloat(before.join("") + "." + after.join("")); | |
| })(č.before,č.after); | |
| } | |
| ], | |
| "string1": [ | |
| function(č) { | |
| // string1[0] | |
| return (function(nl) { | |
| return nl | |
| })(č.nl); | |
| }, | |
| function(č) { | |
| // string1[1] | |
| return (function(chars) { | |
| return chars.join(""); | |
| })(č.chars); | |
| } | |
| ], | |
| "string2": [ | |
| function(č) { | |
| // string2[0] | |
| return (function(nl) { | |
| return nl | |
| })(č.nl); | |
| }, | |
| function(č) { | |
| // string2[1] | |
| return (function(chars) { | |
| return chars.join(""); | |
| })(č.chars); | |
| } | |
| ], | |
| "ident": [ | |
| function(č) { | |
| // ident[0] | |
| return (function(dash,nmstart,nmchars) { | |
| return dash + nmstart + nmchars.join(""); | |
| })(č.dash,č.nmstart,č.nmchars); | |
| } | |
| ], | |
| "name": [ | |
| function(č) { | |
| // name[0] | |
| return (function(nmchars) { | |
| return nmchars.join(""); | |
| })(č.nmchars); | |
| } | |
| ], | |
| "url": [ | |
| function(č) { | |
| // url[0] | |
| return (function(chars) { | |
| return chars.join(""); | |
| })(č.chars); | |
| } | |
| ], | |
| "A": [ | |
| function(č) { | |
| // A[0] | |
| return "A"; | |
| }, | |
| function(č) { | |
| // A[1] | |
| return "a"; | |
| } | |
| ], | |
| "C": [ | |
| function(č) { | |
| // C[0] | |
| return "C"; | |
| }, | |
| function(č) { | |
| // C[1] | |
| return "c"; | |
| } | |
| ], | |
| "D": [ | |
| function(č) { | |
| // D[0] | |
| return "D"; | |
| }, | |
| function(č) { | |
| // D[1] | |
| return "d"; | |
| } | |
| ], | |
| "E": [ | |
| function(č) { | |
| // E[0] | |
| return "E"; | |
| }, | |
| function(č) { | |
| // E[1] | |
| return "e"; | |
| } | |
| ], | |
| "G": [ | |
| function(č) { | |
| // G[0] | |
| return "G"; | |
| }, | |
| function(č) { | |
| // G[1] | |
| return "g"; | |
| }, | |
| function(č) { | |
| // G[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "H": [ | |
| function(č) { | |
| // H[0] | |
| return (function(h) { | |
| return "H"; | |
| })(č.h); | |
| }, | |
| function(č) { | |
| // H[1] | |
| return (function(h) { | |
| return "h"; | |
| })(č.h); | |
| }, | |
| function(č) { | |
| // H[2] | |
| return (function(h,char_) { | |
| return char_; | |
| })(č.h,č.char_); | |
| } | |
| ], | |
| "I": [ | |
| function(č) { | |
| // I[0] | |
| return (function(i) { | |
| return "I"; | |
| })(č.i); | |
| }, | |
| function(č) { | |
| // I[1] | |
| return (function(i) { | |
| return "i"; | |
| })(č.i); | |
| }, | |
| function(č) { | |
| // I[2] | |
| return (function(i,char_) { | |
| return char_; | |
| })(č.i,č.char_); | |
| } | |
| ], | |
| "K": [ | |
| function(č) { | |
| // K[0] | |
| return "K"; | |
| }, | |
| function(č) { | |
| // K[1] | |
| return "k"; | |
| }, | |
| function(č) { | |
| // K[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "L": [ | |
| function(č) { | |
| // L[0] | |
| return "L"; | |
| }, | |
| function(č) { | |
| // L[1] | |
| return "l"; | |
| }, | |
| function(č) { | |
| // L[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "M": [ | |
| function(č) { | |
| // M[0] | |
| return "M"; | |
| }, | |
| function(č) { | |
| // M[1] | |
| return "m"; | |
| }, | |
| function(č) { | |
| // M[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "N": [ | |
| function(č) { | |
| // N[0] | |
| return "N"; | |
| }, | |
| function(č) { | |
| // N[1] | |
| return "n"; | |
| }, | |
| function(č) { | |
| // N[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "O": [ | |
| function(č) { | |
| // O[0] | |
| return "O"; | |
| }, | |
| function(č) { | |
| // O[1] | |
| return "o"; | |
| }, | |
| function(č) { | |
| // O[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "P": [ | |
| function(č) { | |
| // P[0] | |
| return "P"; | |
| }, | |
| function(č) { | |
| // P[1] | |
| return "p"; | |
| }, | |
| function(č) { | |
| // P[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "R": [ | |
| function(č) { | |
| // R[0] | |
| return "R"; | |
| }, | |
| function(č) { | |
| // R[1] | |
| return "r"; | |
| }, | |
| function(č) { | |
| // R[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "S_": [ | |
| function(č) { | |
| // S_[0] | |
| return "S"; | |
| }, | |
| function(č) { | |
| // S_[1] | |
| return "s"; | |
| }, | |
| function(č) { | |
| // S_[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "T": [ | |
| function(č) { | |
| // T[0] | |
| return "T"; | |
| }, | |
| function(č) { | |
| // T[1] | |
| return "t"; | |
| }, | |
| function(č) { | |
| // T[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "U": [ | |
| function(č) { | |
| // U[0] | |
| return "U"; | |
| }, | |
| function(č) { | |
| // U[1] | |
| return "u"; | |
| }, | |
| function(č) { | |
| // U[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "X": [ | |
| function(č) { | |
| // X[0] | |
| return "X"; | |
| }, | |
| function(č) { | |
| // X[1] | |
| return "x"; | |
| }, | |
| function(č) { | |
| // X[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "Z": [ | |
| function(č) { | |
| // Z[0] | |
| return "Z"; | |
| }, | |
| function(č) { | |
| // Z[1] | |
| return "z"; | |
| }, | |
| function(č) { | |
| // Z[2] | |
| return (function(char_) { | |
| return char_; | |
| })(č.char_); | |
| } | |
| ], | |
| "STRING": [ | |
| function(č) { | |
| // STRING[0] | |
| return (function(string) { | |
| return string; | |
| })(č.string); | |
| } | |
| ], | |
| "IDENT": [ | |
| function(č) { | |
| // IDENT[0] | |
| return (function(ident) { | |
| return ident; | |
| })(č.ident); | |
| } | |
| ], | |
| "HASH": [ | |
| function(č) { | |
| // HASH[0] | |
| return (function(name) { | |
| return "#" + name; | |
| })(č.name); | |
| } | |
| ], | |
| "IMPORTANT_SYM": [ | |
| function(č) { | |
| // IMPORTANT_SYM[0] | |
| return "!important"; | |
| } | |
| ], | |
| "EMS": [ | |
| function(č) { | |
| // EMS[0] | |
| return (function(num,e,m) { | |
| return num + e + m; | |
| })(č.num,č.e,č.m); | |
| } | |
| ], | |
| "EXS": [ | |
| function(č) { | |
| // EXS[0] | |
| return (function(num,e,x) { | |
| return num + e + x; | |
| })(č.num,č.e,č.x); | |
| } | |
| ], | |
| "LENGTH": [ | |
| function(č) { | |
| // LENGTH[0] | |
| return (function(num,unit) { | |
| return num + unit.join(""); | |
| })(č.num,č.unit); | |
| } | |
| ], | |
| "ANGLE": [ | |
| function(č) { | |
| // ANGLE[0] | |
| return (function(num,unit) { | |
| return num + unit.join(""); | |
| })(č.num,č.unit); | |
| } | |
| ], | |
| "TIME": [ | |
| function(č) { | |
| // TIME[0] | |
| return (function(num,m,s) { | |
| return m + s; | |
| })(č.num,č.m,č.s); | |
| }, | |
| function(č) { | |
| // TIME[1] | |
| return (function(num,unit) { | |
| return num + unit; | |
| })(č.num,č.unit); | |
| } | |
| ], | |
| "FREQ": [ | |
| function(č) { | |
| // FREQ[0] | |
| return (function(num,unit) { | |
| return num + unit.join(""); | |
| })(č.num,č.unit); | |
| } | |
| ], | |
| "DIMENSION": [ | |
| function(č) { | |
| // DIMENSION[0] | |
| return (function(num,unit) { | |
| return num + unit; | |
| })(č.num,č.unit); | |
| } | |
| ], | |
| "PERCENTAGE": [ | |
| function(č) { | |
| // PERCENTAGE[0] | |
| return (function(num) { | |
| return num + "%"; | |
| })(č.num); | |
| } | |
| ], | |
| "NUMBER": [ | |
| function(č) { | |
| // NUMBER[0] | |
| return (function(num) { | |
| return num; | |
| })(č.num); | |
| } | |
| ], | |
| "URI": [ | |
| function(č) { | |
| // URI[0] | |
| return (function(value) { | |
| return value; | |
| })(č.value); | |
| } | |
| ], | |
| "FUNCTION": [ | |
| function(č) { | |
| // FUNCTION[0] | |
| return (function(name) { | |
| return name; | |
| })(č.name); | |
| } | |
| ] | |
| }; | |
| } })(); | |
| // ƒ and č variables are named so creepy just to ensure that parser writer will not use them | |
| // for naming variables in his code (only č may clash in this architecture, in fact), | |
| // we hope any modern environment supports Unicode now | |
| var ƒ = null; // holds a pointer to current rule blocks, will be initialized in parse() function | |
| /* ########### PARSER ########### */ | |
| var __parser = function() { | |
| /* =========== PARSER-DEPENDENT CODE =========== */ | |
| /* ----------- RULES DEFINITIONS ----------- */ | |
| var rules = {}; (function() { | |
| rules.start = function() { | |
| var _code = ƒ.start; | |
| return ( | |
| action( | |
| seqnc( | |
| label("stylesheet", | |
| ref(rules.stylesheet) | |
| ), | |
| any( | |
| ref(rules.comment) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return stylesheet; }*/ | |
| ()); | |
| } | |
| rules.stylesheet = function() { | |
| var _code = ƒ.stylesheet; | |
| return ( | |
| action( | |
| seqnc( | |
| label("charset", | |
| maybe( | |
| seqnc( | |
| ref(rules.CHARSET_SYM), | |
| ref(rules.STRING), | |
| match(";") | |
| ) | |
| ) | |
| ), | |
| any( | |
| choice( | |
| ref(rules.S), | |
| ref(rules.CDO), | |
| ref(rules.CDC) | |
| ) | |
| ), | |
| label("imports", | |
| any( | |
| seqnc( | |
| ref(rules.import), | |
| any( | |
| choice( | |
| seqnc( | |
| ref(rules.CDO), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| seqnc( | |
| ref(rules.CDC), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ), | |
| label("rules", | |
| any( | |
| seqnc( | |
| choice( | |
| ref(rules.ruleset), | |
| ref(rules.media), | |
| ref(rules.page) | |
| ), | |
| any( | |
| choice( | |
| seqnc( | |
| ref(rules.CDO), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| seqnc( | |
| ref(rules.CDC), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| var importsConverted = []; | |
| for (var i = 0; i < imports.length; i++) { | |
| importsConverted.push(imports[i][0]); | |
| } | |
| var rulesConverted = []; | |
| for (i = 0; i < rules.length; i++) { | |
| rulesConverted.push(rules[i][0]); | |
| } | |
| return { | |
| type: "stylesheet", | |
| charset: charset !== "" ? charset[1] : null, | |
| imports: importsConverted, | |
| rules: rulesConverted | |
| }; | |
| }*/ | |
| ()); | |
| } | |
| rules.import = function() { | |
| var _code = ƒ.import; | |
| return ( | |
| action( | |
| seqnc( | |
| ref(rules.IMPORT_SYM), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("href", | |
| choice( | |
| ref(rules.STRING), | |
| ref(rules.URI) | |
| ) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("media", | |
| maybe( | |
| ref(rules.media_list) | |
| ) | |
| ), | |
| match(";"), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| return { | |
| type: "import_rule", | |
| href: href, | |
| media: media !== "" ? media : [] | |
| }; | |
| }*/ | |
| ()); | |
| } | |
| rules.media = function() { | |
| var _code = ƒ.media; | |
| return ( | |
| action( | |
| seqnc( | |
| ref(rules.MEDIA_SYM), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("media", | |
| ref(rules.media_list) | |
| ), | |
| match("{"), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("rules", | |
| any( | |
| ref(rules.ruleset) | |
| ) | |
| ), | |
| match("}"), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| return { | |
| type: "media_rule", | |
| media: media, | |
| rules: rules | |
| }; | |
| }*/ | |
| ()); | |
| } | |
| rules.media_list = function() { | |
| var _code = ƒ.media_list; | |
| return ( | |
| action( | |
| seqnc( | |
| label("head", | |
| ref(rules.medium) | |
| ), | |
| label("tail", | |
| any( | |
| seqnc( | |
| match(","), | |
| any( | |
| ref(rules.S) | |
| ), | |
| ref(rules.medium) | |
| ) | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| var result = [head]; | |
| for (var i = 0; i < tail.length; i++) { | |
| result.push(tail[i][2]); | |
| } | |
| return result; | |
| }*/ | |
| ()); | |
| } | |
| rules.medium = function() { | |
| var _code = ƒ.medium; | |
| return ( | |
| action( | |
| seqnc( | |
| label("ident", | |
| ref(rules.IDENT) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return ident; }*/ | |
| ()); | |
| } | |
| rules.page = function() { | |
| var _code = ƒ.page; | |
| return ( | |
| action( | |
| seqnc( | |
| ref(rules.PAGE_SYM), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("qualifier", | |
| maybe( | |
| ref(rules.pseudo_page) | |
| ) | |
| ), | |
| match("{"), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("declarationsHead", | |
| maybe( | |
| ref(rules.declaration) | |
| ) | |
| ), | |
| label("declarationsTail", | |
| any( | |
| seqnc( | |
| match(";"), | |
| any( | |
| ref(rules.S) | |
| ), | |
| maybe( | |
| ref(rules.declaration) | |
| ) | |
| ) | |
| ) | |
| ), | |
| match("}"), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| var declarations = declarationsHead !== "" ? [declarationsHead] : []; | |
| for (var i = 0; i < declarationsTail.length; i++) { | |
| if (declarationsTail[i][2] !== "") { | |
| declarations.push(declarationsTail[i][2]); | |
| } | |
| } | |
| return { | |
| type: "page_rule", | |
| qualifier: qualifier !== "" ? qualifier : null, | |
| declarations: declarations | |
| }; | |
| }*/ | |
| ()); | |
| } | |
| rules.pseudo_page = function() { | |
| var _code = ƒ.pseudo_page; | |
| return ( | |
| action( | |
| seqnc( | |
| match(":"), | |
| label("ident", | |
| ref(rules.IDENT) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return ident; }*/ | |
| ()); | |
| } | |
| rules.operator = function() { | |
| var _code = ƒ.operator; | |
| return ( | |
| choice( | |
| action( | |
| seqnc( | |
| match("/"), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "/"; }*/, | |
| action( | |
| seqnc( | |
| match(","), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return ","; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.combinator = function() { | |
| var _code = ƒ.combinator; | |
| return ( | |
| choice( | |
| action( | |
| seqnc( | |
| match("+"), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "+"; }*/, | |
| action( | |
| seqnc( | |
| match(">"), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return ">"; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.unary_operator = function() { | |
| return ( | |
| choice( | |
| match("+"), | |
| match("-") | |
| ) | |
| ()); | |
| } | |
| rules.property = function() { | |
| var _code = ƒ.property; | |
| return ( | |
| action( | |
| seqnc( | |
| label("ident", | |
| ref(rules.IDENT) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return ident; }*/ | |
| ()); | |
| } | |
| rules.ruleset = function() { | |
| var _code = ƒ.ruleset; | |
| return ( | |
| action( | |
| seqnc( | |
| label("selectorsHead", | |
| ref(rules.selector) | |
| ), | |
| label("selectorsTail", | |
| any( | |
| seqnc( | |
| match(","), | |
| any( | |
| ref(rules.S) | |
| ), | |
| ref(rules.selector) | |
| ) | |
| ) | |
| ), | |
| match("{"), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("declarationsHead", | |
| maybe( | |
| ref(rules.declaration) | |
| ) | |
| ), | |
| label("declarationsTail", | |
| any( | |
| seqnc( | |
| match(";"), | |
| any( | |
| ref(rules.S) | |
| ), | |
| maybe( | |
| ref(rules.declaration) | |
| ) | |
| ) | |
| ) | |
| ), | |
| match("}"), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| var selectors = [selectorsHead]; | |
| for (var i = 0; i < selectorsTail.length; i++) { | |
| selectors.push(selectorsTail[i][2]); | |
| } | |
| var declarations = declarationsHead !== "" ? [declarationsHead] : []; | |
| for (i = 0; i < declarationsTail.length; i++) { | |
| if (declarationsTail[i][2] !== "") { | |
| declarations.push(declarationsTail[i][2]); | |
| } | |
| } | |
| return { | |
| type: "ruleset", | |
| selectors: selectors, | |
| declarations: declarations | |
| }; | |
| }*/ | |
| ()); | |
| } | |
| rules.selector = function() { | |
| var _code = ƒ.selector; | |
| return ( | |
| choice( | |
| action( | |
| seqnc( | |
| label("left", | |
| ref(rules.simple_selector) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("combinator", | |
| ref(rules.combinator) | |
| ), | |
| label("right", | |
| ref(rules.selector) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| return { | |
| type: "selector", | |
| combinator: combinator, | |
| left: left, | |
| right: right | |
| }; | |
| }*/, | |
| action( | |
| seqnc( | |
| label("left", | |
| ref(rules.simple_selector) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("right", | |
| ref(rules.selector) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ | |
| return { | |
| type: "selector", | |
| combinator: " ", | |
| left: left, | |
| right: right | |
| }; | |
| }*/, | |
| action( | |
| seqnc( | |
| label("selector", | |
| ref(rules.simple_selector) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return selector; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.simple_selector = function() { | |
| var _code = ƒ.simple_selector; | |
| return ( | |
| choice( | |
| action( | |
| seqnc( | |
| label("element", | |
| ref(rules.element_name) | |
| ), | |
| label("qualifiers", | |
| any( | |
| choice( | |
| action( | |
| label("id", | |
| ref(rules.HASH) | |
| ), | |
| _code[0]) | |
| /*{ return { type: "ID selector", id: id.substr(1) }; }*/, | |
| ref(rules.class), | |
| ref(rules.attrib), | |
| ref(rules.pseudo) | |
| ) | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ | |
| return { | |
| type: "simple_selector", | |
| element: element, | |
| qualifiers: qualifiers | |
| }; | |
| }*/, | |
| action( | |
| label("qualifiers", | |
| some( | |
| choice( | |
| action( | |
| label("id", | |
| ref(rules.HASH) | |
| ), | |
| _code[2]) | |
| /*{ return { type: "ID selector", id: id.substr(1) }; }*/, | |
| ref(rules.class), | |
| ref(rules.attrib), | |
| ref(rules.pseudo) | |
| ) | |
| ) | |
| ), | |
| _code[3]) | |
| /*{ | |
| return { | |
| type: "simple_selector", | |
| element: "*", | |
| qualifiers: qualifiers | |
| }; | |
| }*/ | |
| ) | |
| ()); | |
| } | |
| rules.class = function() { | |
| var _code = ƒ.class; | |
| return ( | |
| action( | |
| seqnc( | |
| match("."), | |
| label("class_", | |
| ref(rules.IDENT) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return { type: "class_selector", "class": class_ }; }*/ | |
| ()); | |
| } | |
| rules.element_name = function() { | |
| return ( | |
| choice( | |
| ref(rules.IDENT), | |
| match("*") | |
| ) | |
| ()); | |
| } | |
| rules.attrib = function() { | |
| var _code = ƒ.attrib; | |
| return ( | |
| action( | |
| seqnc( | |
| match("["), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("attribute", | |
| ref(rules.IDENT) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("operatorAndValue", | |
| maybe( | |
| seqnc( | |
| choice( | |
| match("="), | |
| ref(rules.INCLUDES), | |
| ref(rules.DASHMATCH) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ), | |
| choice( | |
| ref(rules.IDENT), | |
| ref(rules.STRING) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ) | |
| ) | |
| ), | |
| match("]") | |
| ), | |
| _code[0]) | |
| /*{ | |
| return { | |
| type: "attribute_selector", | |
| attribute: attribute, | |
| operator: operatorAndValue !== "" ? operatorAndValue[0] : null, | |
| value: operatorAndValue !== "" ? operatorAndValue[2] : null | |
| }; | |
| }*/ | |
| ()); | |
| } | |
| rules.pseudo = function() { | |
| var _code = ƒ.pseudo; | |
| return ( | |
| action( | |
| seqnc( | |
| match(":"), | |
| label("value", | |
| choice( | |
| action( | |
| seqnc( | |
| label("name", | |
| ref(rules.FUNCTION) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("params", | |
| maybe( | |
| seqnc( | |
| ref(rules.IDENT), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ) | |
| ) | |
| ), | |
| match(")") | |
| ), | |
| _code[0]) | |
| /*{ | |
| return { | |
| type: "function", | |
| name: name, | |
| params: params !== "" ? [params[0]] : [] | |
| }; | |
| }*/, | |
| ref(rules.IDENT) | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ | |
| /-* | |
| * The returned object has somewhat vague property names and values because | |
| * the rule matches both pseudo-classes and pseudo-elements (they look the | |
| * same at the syntactic level). | |
| *-/ | |
| return { | |
| type: "pseudo_selector", | |
| value: value | |
| }; | |
| }*/ | |
| ()); | |
| } | |
| rules.declaration = function() { | |
| var _code = ƒ.declaration; | |
| return ( | |
| action( | |
| seqnc( | |
| label("property", | |
| ref(rules.property) | |
| ), | |
| match(":"), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("expression", | |
| ref(rules.expr) | |
| ), | |
| label("important", | |
| maybe( | |
| ref(rules.prio) | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| return { | |
| type: "declaration", | |
| property: property, | |
| expression: expression, | |
| important: important !== "" ? true : false | |
| }; | |
| }*/ | |
| ()); | |
| } | |
| rules.prio = function() { | |
| return ( | |
| seqnc( | |
| ref(rules.IMPORTANT_SYM), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ) | |
| ()); | |
| } | |
| rules.expr = function() { | |
| var _code = ƒ.expr; | |
| return ( | |
| action( | |
| seqnc( | |
| label("head", | |
| ref(rules.term) | |
| ), | |
| label("tail", | |
| any( | |
| seqnc( | |
| maybe( | |
| ref(rules.operator) | |
| ), | |
| ref(rules.term) | |
| ) | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| var result = head; | |
| for (var i = 0; i < tail.length; i++) { | |
| result = { | |
| type: "expression", | |
| operator: tail[i][0], | |
| left: result, | |
| right: tail[i][1] | |
| }; | |
| } | |
| return result; | |
| }*/ | |
| ()); | |
| } | |
| rules.term = function() { | |
| var _code = ƒ.term; | |
| return ( | |
| choice( | |
| action( | |
| seqnc( | |
| label("operator", | |
| maybe( | |
| ref(rules.unary_operator) | |
| ) | |
| ), | |
| label("value", | |
| choice( | |
| seqnc( | |
| ref(rules.EMS), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| seqnc( | |
| ref(rules.EXS), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| seqnc( | |
| ref(rules.LENGTH), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| seqnc( | |
| ref(rules.ANGLE), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| seqnc( | |
| ref(rules.TIME), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| seqnc( | |
| ref(rules.FREQ), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| seqnc( | |
| ref(rules.PERCENTAGE), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| seqnc( | |
| ref(rules.NUMBER), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ) | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return { type: "value", value: operator + value[0] }; }*/, | |
| action( | |
| seqnc( | |
| label("value", | |
| ref(rules.URI) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return { type: "uri", value: value }; }*/, | |
| ref(rules.function), | |
| ref(rules.hexcolor), | |
| action( | |
| seqnc( | |
| label("value", | |
| ref(rules.STRING) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return { type: "string", value: value }; }*/, | |
| action( | |
| seqnc( | |
| label("value", | |
| ref(rules.IDENT) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[3]) | |
| /*{ return { type: "ident", value: value }; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.function = function() { | |
| var _code = ƒ.function; | |
| return ( | |
| action( | |
| seqnc( | |
| label("name", | |
| ref(rules.FUNCTION) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ), | |
| label("params", | |
| ref(rules.expr) | |
| ), | |
| match(")"), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| return { | |
| type: "function", | |
| name: name, | |
| params: params | |
| }; | |
| }*/ | |
| ()); | |
| } | |
| rules.hexcolor = function() { | |
| var _code = ƒ.hexcolor; | |
| return ( | |
| action( | |
| seqnc( | |
| label("value", | |
| ref(rules.HASH) | |
| ), | |
| any( | |
| ref(rules.S) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return { type: "hexcolor", value: value}; }*/ | |
| ()); | |
| } | |
| rules.h = function() { | |
| return ( | |
| re(/^[0-9a-fA-F]/, "[0-9a-fA-F]") | |
| ()); | |
| } | |
| rules.nonascii = function() { | |
| return ( | |
| re(/^[\x80-\xFF]/, "[\\x80-\\xFF]") | |
| ()); | |
| } | |
| rules.unicode = function() { | |
| var _code = ƒ.unicode; | |
| return ( | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("h1", | |
| ref(rules.h) | |
| ), | |
| label("h2", | |
| maybe( | |
| ref(rules.h) | |
| ) | |
| ), | |
| label("h3", | |
| maybe( | |
| ref(rules.h) | |
| ) | |
| ), | |
| label("h4", | |
| maybe( | |
| ref(rules.h) | |
| ) | |
| ), | |
| label("h5", | |
| maybe( | |
| ref(rules.h) | |
| ) | |
| ), | |
| label("h6", | |
| maybe( | |
| ref(rules.h) | |
| ) | |
| ), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| return String.fromCharCode(parseInt("0x" + h1 + h2 + h3 + h4 + h5 + h6)); | |
| }*/ | |
| ()); | |
| } | |
| rules.escape = function() { | |
| var _code = ƒ.escape; | |
| return ( | |
| choice( | |
| ref(rules.unicode), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[^\r\n\f0-9a-fA-F]/, "[^\\r\\n\\f0-9a-fA-F]") | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.nmstart = function() { | |
| return ( | |
| choice( | |
| re(/^[_a-zA-Z]/, "[_a-zA-Z]"), | |
| ref(rules.nonascii), | |
| ref(rules.escape) | |
| ) | |
| ()); | |
| } | |
| rules.nmchar = function() { | |
| return ( | |
| choice( | |
| re(/^[_a-zA-Z0-9\-]/, "[_a-zA-Z0-9\\-]"), | |
| ref(rules.nonascii), | |
| ref(rules.escape) | |
| ) | |
| ()); | |
| } | |
| rules.integer = function() { | |
| var _code = ƒ.integer; | |
| return ( | |
| action( | |
| label("digits", | |
| some( | |
| re(/^[0-9]/, "[0-9]") | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return parseInt(digits.join("")); }*/ | |
| ()); | |
| } | |
| rules.float = function() { | |
| var _code = ƒ.float; | |
| return ( | |
| action( | |
| seqnc( | |
| label("before", | |
| any( | |
| re(/^[0-9]/, "[0-9]") | |
| ) | |
| ), | |
| match("."), | |
| label("after", | |
| some( | |
| re(/^[0-9]/, "[0-9]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| return parseFloat(before.join("") + "." + after.join("")); | |
| }*/ | |
| ()); | |
| } | |
| rules.string1 = function() { | |
| var _code = ƒ.string1; | |
| return ( | |
| action( | |
| seqnc( | |
| match("\""), | |
| label("chars", | |
| any( | |
| choice( | |
| re(/^[^\n\r\f\\"]/, "[^\\n\\r\\f\\\\\"]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("nl", | |
| ref(rules.nl) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return nl }*/, | |
| ref(rules.escape) | |
| ) | |
| ) | |
| ), | |
| match("\"") | |
| ), | |
| _code[1]) | |
| /*{ | |
| return chars.join(""); | |
| }*/ | |
| ()); | |
| } | |
| rules.string2 = function() { | |
| var _code = ƒ.string2; | |
| return ( | |
| action( | |
| seqnc( | |
| match("'"), | |
| label("chars", | |
| any( | |
| choice( | |
| re(/^[^\n\r\f\\']/, "[^\\n\\r\\f\\\\']"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("nl", | |
| ref(rules.nl) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return nl }*/, | |
| ref(rules.escape) | |
| ) | |
| ) | |
| ), | |
| match("'") | |
| ), | |
| _code[1]) | |
| /*{ | |
| return chars.join(""); | |
| }*/ | |
| ()); | |
| } | |
| rules.comment = function() { | |
| return ( | |
| seqnc( | |
| match("/*"), | |
| any( | |
| re(/^[^*]/, "[^*]") | |
| ), | |
| some( | |
| match("*") | |
| ), | |
| any( | |
| seqnc( | |
| re(/^[^\/*]/, "[^\\/*]"), | |
| any( | |
| re(/^[^*]/, "[^*]") | |
| ), | |
| some( | |
| match("*") | |
| ) | |
| ) | |
| ), | |
| match("/") | |
| ) | |
| ()); | |
| } | |
| rules.ident = function() { | |
| var _code = ƒ.ident; | |
| return ( | |
| action( | |
| seqnc( | |
| label("dash", | |
| maybe( | |
| match("-") | |
| ) | |
| ), | |
| label("nmstart", | |
| ref(rules.nmstart) | |
| ), | |
| label("nmchars", | |
| any( | |
| ref(rules.nmchar) | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| return dash + nmstart + nmchars.join(""); | |
| }*/ | |
| ()); | |
| } | |
| rules.name = function() { | |
| var _code = ƒ.name; | |
| return ( | |
| action( | |
| label("nmchars", | |
| some( | |
| ref(rules.nmchar) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return nmchars.join(""); }*/ | |
| ()); | |
| } | |
| rules.num = function() { | |
| return ( | |
| choice( | |
| ref(rules.float), | |
| ref(rules.integer) | |
| ) | |
| ()); | |
| } | |
| rules.string = function() { | |
| return ( | |
| choice( | |
| ref(rules.string1), | |
| ref(rules.string2) | |
| ) | |
| ()); | |
| } | |
| rules.url = function() { | |
| var _code = ƒ.url; | |
| return ( | |
| action( | |
| label("chars", | |
| any( | |
| choice( | |
| re(/^[!#$%&*-~]/, "[!#$%&*-~]"), | |
| ref(rules.nonascii), | |
| ref(rules.escape) | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return chars.join(""); }*/ | |
| ()); | |
| } | |
| rules.s = function() { | |
| return ( | |
| some( | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ()); | |
| } | |
| rules.w = function() { | |
| return ( | |
| maybe( | |
| ref(rules.s) | |
| ) | |
| ()); | |
| } | |
| rules.nl = function() { | |
| return ( | |
| choice( | |
| match("\n"), | |
| match("\r\n"), | |
| match("\r"), | |
| match("\f") | |
| ) | |
| ()); | |
| } | |
| rules.A = function() { | |
| var _code = ƒ.A; | |
| return ( | |
| choice( | |
| re(/^[aA]/, "[aA]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("41"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "A"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("61"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "a"; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.C = function() { | |
| var _code = ƒ.C; | |
| return ( | |
| choice( | |
| re(/^[cC]/, "[cC]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("43"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "C"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("63"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "c"; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.D = function() { | |
| var _code = ƒ.D; | |
| return ( | |
| choice( | |
| re(/^[dD]/, "[dD]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("44"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "D"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("64"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "d"; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.E = function() { | |
| var _code = ƒ.E; | |
| return ( | |
| choice( | |
| re(/^[eE]/, "[eE]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("45"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "E"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("65"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "e"; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.G = function() { | |
| var _code = ƒ.G; | |
| return ( | |
| choice( | |
| re(/^[gG]/, "[gG]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("47"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "G"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("67"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "g"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[gG]/, "[gG]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.H = function() { | |
| var _code = ƒ.H; | |
| return ( | |
| choice( | |
| label("h", | |
| re(/^[hH]/, "[hH]") | |
| ), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("48"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "H"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("68"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "h"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[hH]/, "[hH]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.I = function() { | |
| var _code = ƒ.I; | |
| return ( | |
| choice( | |
| label("i", | |
| re(/^[iI]/, "[iI]") | |
| ), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("49"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "I"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("69"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "i"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[iI]/, "[iI]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.K = function() { | |
| var _code = ƒ.K; | |
| return ( | |
| choice( | |
| re(/^[kK]/, "[kK]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("4"), | |
| re(/^[bB]/, "[bB]"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "K"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("6"), | |
| re(/^[bB]/, "[bB]"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "k"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[kK]/, "[kK]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.L = function() { | |
| var _code = ƒ.L; | |
| return ( | |
| choice( | |
| re(/^[lL]/, "[lL]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("4"), | |
| re(/^[cC]/, "[cC]"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "L"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("6"), | |
| re(/^[cC]/, "[cC]"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "l"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[lL]/, "[lL]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.M = function() { | |
| var _code = ƒ.M; | |
| return ( | |
| choice( | |
| re(/^[mM]/, "[mM]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("4"), | |
| re(/^[dD]/, "[dD]"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "M"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("6"), | |
| re(/^[dD]/, "[dD]"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "m"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[mM]/, "[mM]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.N = function() { | |
| var _code = ƒ.N; | |
| return ( | |
| choice( | |
| re(/^[nN]/, "[nN]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("4"), | |
| re(/^[eE]/, "[eE]"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "N"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("6"), | |
| re(/^[eE]/, "[eE]"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "n"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[nN]/, "[nN]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.O = function() { | |
| var _code = ƒ.O; | |
| return ( | |
| choice( | |
| re(/^[oO]/, "[oO]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("4"), | |
| re(/^[fF]/, "[fF]"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "O"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("6"), | |
| re(/^[fF]/, "[fF]"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "o"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[oO]/, "[oO]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.P = function() { | |
| var _code = ƒ.P; | |
| return ( | |
| choice( | |
| re(/^[pP]/, "[pP]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("50"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "P"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("70"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "p"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[pP]/, "[pP]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.R = function() { | |
| var _code = ƒ.R; | |
| return ( | |
| choice( | |
| re(/^[rR]/, "[rR]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("52"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "R"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("72"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "r"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[rR]/, "[rR]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.S_ = function() { | |
| var _code = ƒ.S_; | |
| return ( | |
| choice( | |
| re(/^[sS]/, "[sS]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("53"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "S"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("73"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "s"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[sS]/, "[sS]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.T = function() { | |
| var _code = ƒ.T; | |
| return ( | |
| choice( | |
| re(/^[tT]/, "[tT]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("54"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "T"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("74"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "t"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[tT]/, "[tT]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.U = function() { | |
| var _code = ƒ.U; | |
| return ( | |
| choice( | |
| re(/^[uU]/, "[uU]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("55"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "U"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("75"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "u"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[uU]/, "[uU]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.X = function() { | |
| var _code = ƒ.X; | |
| return ( | |
| choice( | |
| re(/^[xX]/, "[xX]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("58"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "X"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("78"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "x"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[xX]/, "[xX]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.Z = function() { | |
| var _code = ƒ.Z; | |
| return ( | |
| choice( | |
| re(/^[zZ]/, "[zZ]"), | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("5"), | |
| re(/^[aA]/, "[aA]"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "Z"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| maybe( | |
| match("0") | |
| ), | |
| match("7"), | |
| re(/^[aA]/, "[aA]"), | |
| maybe( | |
| choice( | |
| match("\r\n"), | |
| re(/^[ \t\r\n\f]/, "[ \\t\\r\\n\\f]") | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ return "z"; }*/, | |
| action( | |
| seqnc( | |
| match("\\"), | |
| label("char_", | |
| re(/^[zZ]/, "[zZ]") | |
| ) | |
| ), | |
| _code[2]) | |
| /*{ return char_; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.S = function() { | |
| return ( | |
| as("whitespace", | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| ref(rules.s) | |
| ) | |
| ) | |
| ()); | |
| } | |
| rules.CDO = function() { | |
| return ( | |
| as("<!--", | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| match("<!--") | |
| ) | |
| ) | |
| ()); | |
| } | |
| rules.CDC = function() { | |
| return ( | |
| as("-->", | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| match("-->") | |
| ) | |
| ) | |
| ()); | |
| } | |
| rules.INCLUDES = function() { | |
| return ( | |
| as("~=", | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| match("~=") | |
| ) | |
| ) | |
| ()); | |
| } | |
| rules.DASHMATCH = function() { | |
| return ( | |
| as("|=", | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| match("|=") | |
| ) | |
| ) | |
| ()); | |
| } | |
| rules.STRING = function() { | |
| var _code = ƒ.STRING; | |
| return ( | |
| as("string", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| label("string", | |
| ref(rules.string) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return string; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.IDENT = function() { | |
| var _code = ƒ.IDENT; | |
| return ( | |
| as("identifier", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| label("ident", | |
| ref(rules.ident) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return ident; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.HASH = function() { | |
| var _code = ƒ.HASH; | |
| return ( | |
| as("hash", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| match("#"), | |
| label("name", | |
| ref(rules.name) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return "#" + name; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.IMPORT_SYM = function() { | |
| return ( | |
| as("@import", | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| match("@"), | |
| ref(rules.I), | |
| ref(rules.M), | |
| ref(rules.P), | |
| ref(rules.O), | |
| ref(rules.R), | |
| ref(rules.T) | |
| ) | |
| ) | |
| ()); | |
| } | |
| rules.PAGE_SYM = function() { | |
| return ( | |
| as("@page", | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| match("@"), | |
| ref(rules.P), | |
| ref(rules.A), | |
| ref(rules.G), | |
| ref(rules.E) | |
| ) | |
| ) | |
| ()); | |
| } | |
| rules.MEDIA_SYM = function() { | |
| return ( | |
| as("@media", | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| match("@"), | |
| ref(rules.M), | |
| ref(rules.E), | |
| ref(rules.D), | |
| ref(rules.I), | |
| ref(rules.A) | |
| ) | |
| ) | |
| ()); | |
| } | |
| rules.CHARSET_SYM = function() { | |
| return ( | |
| as("@charset", | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| match("@charset ") | |
| ) | |
| ) | |
| ()); | |
| } | |
| rules.IMPORTANT_SYM = function() { | |
| var _code = ƒ.IMPORTANT_SYM; | |
| return ( | |
| as("!important", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| match("!"), | |
| any( | |
| choice( | |
| ref(rules.s), | |
| ref(rules.comment) | |
| ) | |
| ), | |
| ref(rules.I), | |
| ref(rules.M), | |
| ref(rules.P), | |
| ref(rules.O), | |
| ref(rules.R), | |
| ref(rules.T), | |
| ref(rules.A), | |
| ref(rules.N), | |
| ref(rules.T) | |
| ), | |
| _code[0]) | |
| /*{ return "!important"; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.EMS = function() { | |
| var _code = ƒ.EMS; | |
| return ( | |
| as("length", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| label("num", | |
| ref(rules.num) | |
| ), | |
| label("e", | |
| ref(rules.E) | |
| ), | |
| label("m", | |
| ref(rules.M) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return num + e + m; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.EXS = function() { | |
| var _code = ƒ.EXS; | |
| return ( | |
| as("length", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| label("num", | |
| ref(rules.num) | |
| ), | |
| label("e", | |
| ref(rules.E) | |
| ), | |
| label("x", | |
| ref(rules.X) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return num + e + x; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.LENGTH = function() { | |
| var _code = ƒ.LENGTH; | |
| return ( | |
| as("length", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| label("num", | |
| ref(rules.num) | |
| ), | |
| label("unit", | |
| choice( | |
| seqnc( | |
| ref(rules.P), | |
| ref(rules.X) | |
| ), | |
| seqnc( | |
| ref(rules.C), | |
| ref(rules.M) | |
| ), | |
| seqnc( | |
| ref(rules.M), | |
| ref(rules.M) | |
| ), | |
| seqnc( | |
| ref(rules.I), | |
| ref(rules.N) | |
| ), | |
| seqnc( | |
| ref(rules.P), | |
| ref(rules.T) | |
| ), | |
| seqnc( | |
| ref(rules.P), | |
| ref(rules.C) | |
| ) | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| return num + unit.join(""); | |
| }*/ | |
| ) | |
| ()); | |
| } | |
| rules.ANGLE = function() { | |
| var _code = ƒ.ANGLE; | |
| return ( | |
| as("angle", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| label("num", | |
| ref(rules.num) | |
| ), | |
| label("unit", | |
| choice( | |
| seqnc( | |
| ref(rules.D), | |
| ref(rules.E), | |
| ref(rules.G) | |
| ), | |
| seqnc( | |
| ref(rules.R), | |
| ref(rules.A), | |
| ref(rules.D) | |
| ), | |
| seqnc( | |
| ref(rules.G), | |
| ref(rules.R), | |
| ref(rules.A), | |
| ref(rules.D) | |
| ) | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ | |
| return num + unit.join(""); | |
| }*/ | |
| ) | |
| ()); | |
| } | |
| rules.TIME = function() { | |
| var _code = ƒ.TIME; | |
| return ( | |
| as("time", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| label("num", | |
| ref(rules.num) | |
| ), | |
| label("unit", | |
| choice( | |
| action( | |
| seqnc( | |
| label("m", | |
| ref(rules.M) | |
| ), | |
| label("s", | |
| ref(rules.S_) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return m + s; }*/, | |
| ref(rules.S_) | |
| ) | |
| ) | |
| ), | |
| _code[1]) | |
| /*{ | |
| return num + unit; | |
| }*/ | |
| ) | |
| ()); | |
| } | |
| rules.FREQ = function() { | |
| var _code = ƒ.FREQ; | |
| return ( | |
| as("frequency", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| label("num", | |
| ref(rules.num) | |
| ), | |
| label("unit", | |
| choice( | |
| seqnc( | |
| ref(rules.H), | |
| ref(rules.Z) | |
| ), | |
| seqnc( | |
| ref(rules.K), | |
| ref(rules.H), | |
| ref(rules.Z) | |
| ) | |
| ) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return num + unit.join(""); }*/ | |
| ) | |
| ()); | |
| } | |
| rules.DIMENSION = function() { | |
| var _code = ƒ.DIMENSION; | |
| return ( | |
| as("dimension", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| label("num", | |
| ref(rules.num) | |
| ), | |
| label("unit", | |
| ref(rules.ident) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return num + unit; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.PERCENTAGE = function() { | |
| var _code = ƒ.PERCENTAGE; | |
| return ( | |
| as("percentage", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| label("num", | |
| ref(rules.num) | |
| ), | |
| match("%") | |
| ), | |
| _code[0]) | |
| /*{ return num + "%"; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.NUMBER = function() { | |
| var _code = ƒ.NUMBER; | |
| return ( | |
| as("number", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| label("num", | |
| ref(rules.num) | |
| ) | |
| ), | |
| _code[0]) | |
| /*{ return num; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.URI = function() { | |
| var _code = ƒ.URI; | |
| return ( | |
| as("uri", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| ref(rules.U), | |
| ref(rules.R), | |
| ref(rules.L), | |
| match("("), | |
| ref(rules.w), | |
| label("value", | |
| choice( | |
| ref(rules.string), | |
| ref(rules.url) | |
| ) | |
| ), | |
| ref(rules.w), | |
| match(")") | |
| ), | |
| _code[0]) | |
| /*{ return value; }*/ | |
| ) | |
| ()); | |
| } | |
| rules.FUNCTION = function() { | |
| var _code = ƒ.FUNCTION; | |
| return ( | |
| as("function", | |
| action( | |
| seqnc( | |
| any( | |
| ref(rules.comment) | |
| ), | |
| label("name", | |
| ref(rules.ident) | |
| ), | |
| match("(") | |
| ), | |
| _code[0]) | |
| /*{ return name; }*/ | |
| ) | |
| ()); | |
| } | |
| })(); | |
| /* ----------- OPERATORS ----------- */ | |
| // get current char | |
| function cc() { return (pos < ilen) ? input.charAt(pos) : EOI; } | |
| var ref = def(inctx); // will call rule inside context | |
| function action(f, code) { | |
| return inctx(function() { | |
| p_pos = pos; var res; // save previous position | |
| f(); res = code(cctx); | |
| if (res === null) { pos = p_pos; | |
| failed(SOMETHING, NOTHING); } | |
| return res; | |
| }); | |
| } | |
| action = def(action); | |
| function seqnc(/*f...*/) { | |
| var p_pos = pos; // save previous position locally | |
| var fs = arguments, | |
| s = [], | |
| on_miss = function(e) { | |
| pos = p_pos; throw e; }; | |
| for (var fi = 0, fl = fs.length; | |
| fi < fl; fi++) { | |
| s.push(safe(fs[fi], on_miss)); | |
| } | |
| return s; | |
| } | |
| seqnc = def(seqnc); | |
| function as(name, f) { | |
| alias = name; var res = f(); | |
| alias = ''; return res; | |
| } | |
| as = def(as); | |
| function choice(/*f...*/) { | |
| var fs = arguments, | |
| missed = 0, | |
| my_e = null, | |
| on_miss = function(e) { | |
| my_e = e; missed = 1; | |
| }; | |
| for (var fi = 0, fl = fs.length; | |
| fi < fl; fi++) { | |
| var res = safe(fs[fi], on_miss); | |
| if (!missed) return res; | |
| missed = 0; | |
| } | |
| throw my_e; | |
| } | |
| choice = def(choice); | |
| function match(str) { | |
| var slen = str.length; | |
| if ((pos + slen) > ilen) { | |
| failed(quote(str), EOI); // exits | |
| } | |
| if (input.substr(pos, slen) === str) { | |
| pos += slen; | |
| return str; | |
| } | |
| failed(quote(str), cc()); | |
| } | |
| match = def(match); | |
| function label(lbl, f) { | |
| return cctx[lbl] = f(); | |
| } | |
| label = def(label); | |
| function some(f) { | |
| return [f()].concat(any(f)()); | |
| } | |
| some = def(some); | |
| function any(f) { | |
| var s = [], | |
| missed = 0, | |
| on_miss = function() { missed = 1; }; | |
| while (!missed) { | |
| s.push(safe(f, on_miss)); | |
| } | |
| if (missed) s.splice(-1); | |
| return s; | |
| } | |
| any = def(any); | |
| function maybe(f) { | |
| var missed = 0, | |
| res = safe(f, function() { | |
| missed = 1; | |
| }); | |
| if (missed) return ''; | |
| return res; | |
| } | |
| maybe = def(maybe); | |
| function re(rx, desc) { | |
| var res, desc = desc || rx.source; | |
| if (res = rx.exec(input.substr(pos))) { | |
| if (res.index !== 0) failed(desc, cc()); | |
| pos += res[0].length; | |
| return res[0]; | |
| } else failed(desc, cc()); | |
| } | |
| re = def(re); | |
| /* =========== PARSER-INDEPENDENT CODE =========== */ | |
| /* ----------- VARIABLES ----------- */ | |
| var cache, // {}, rule results cache, by name/pos | |
| ctx, // { ... }, total context | |
| cctx, // { ... }, current context pointer | |
| ctxl, // -1, context level | |
| current, // '-', current rule name | |
| alias; // '', current rule alias, if defined | |
| var failures, // {}, failures data | |
| rmfpos, // 0, rightmost failure position | |
| nr; // 0, no-report, fire errors w/o reporting | |
| var /*input, */ilen; // input, input length | |
| /* ----------- CONTEXT ----------- */ | |
| function ctx_lvl(parent) { | |
| function CtxLevel() { | |
| this.__p = parent; | |
| this.__l = ++ctxl; | |
| this.__c = null; | |
| }; | |
| CtxLevel.prototype = parent; | |
| return new CtxLevel(); | |
| } | |
| function din() { // dive in | |
| if (!cctx.__c) cctx.__c = ctx_lvl(cctx); | |
| cctx = cctx.__c; | |
| } | |
| function dout() { // dive out | |
| if (!cctx.__p) throw new Error('reached top context level'); | |
| cctx = cctx.__p; --ctxl; | |
| } | |
| function inctx(f) { // execute in own context and return | |
| var r, e; | |
| din(); r = safe(f, function(err) { e = err; }); | |
| dout(); if (e) throw e; | |
| return r; | |
| } | |
| /* ----------- DEFERRED ----------- */ | |
| // Makes passed function to save its argument values, | |
| // but not execute until specially requested | |
| function def(f) { | |
| return function() { | |
| return (function(f, args) { | |
| return function() { return f.apply(null, args); }; | |
| })(f, arguments); | |
| } | |
| } | |
| /* ----------- RULES WRAPPER ----------- */ | |
| var ckey; // cache key | |
| for (var rule in rules) { | |
| rules[rule] = (function(name, rule) { | |
| return function() { current = name; return rule(); }; | |
| })(rule, rules[rule]); | |
| } | |
| /* ----------- RESULT OBJECT + PARSE FUNCTION ----------- */ | |
| var result = { | |
| /* | |
| * Parses the input with a generated parser. If the parsing is successfull, | |
| * returns a value explicitly or implicitly specified by the grammar from | |
| * which the parser was generated (see |PEG.buildParser|). If the parsing is | |
| * unsuccessful, throws |PEG.parser.MatchFailed| describing the error. | |
| */ | |
| parse: function(_input, _opts) { | |
| var _opts = _opts || {}; | |
| // initialize variables | |
| pos = 0, p_pos = 0, input = _input, options = _opts; | |
| ilen = input.length, failures = {}, rmfpos = 0, nr = 0; | |
| __p_reset_coord(); | |
| cache = {}; | |
| ctxl = -1; ctx = ctx_lvl(), cctx = ctx; | |
| current = '-'; | |
| var startRule = _opts.startRule || "start"; | |
| if (["start"].indexOf(startRule) < 0) { | |
| throw new Error("Can't start parsing from rule " + quote(startRule) + "."); | |
| } | |
| // call user initializer and also | |
| // get blocks lying in the same context | |
| ƒ = __p_blocks(); | |
| // find start rule | |
| if (startRule) { | |
| if (rules[startRule] === undefined) { | |
| throw new SyntaxError("Rule not found: " + quote(startRule) + "."); | |
| }; | |
| } else { | |
| throw new Error("Start rule is not defined in options, no 'start' rule found and first rule in grammar was empty"); | |
| } | |
| // and execute it | |
| var res; | |
| try { | |
| res = rules[startRule](); | |
| if ((pos < ilen) || | |
| (res === null)) failed(EOI, cc()); | |
| } catch(e) { | |
| if (e instanceof MatchFailed) { | |
| // throw rightmost error instead | |
| throw adapt(failures[rmfpos]); | |
| } | |
| throw e; | |
| } | |
| return res; | |
| }, | |
| /* Returns the parser source code. */ | |
| toSource: function() { return this._source; }, | |
| /* makes error type accessible outside */ | |
| MatchFailed: MatchFailed, | |
| SyntaxError: SyntaxError | |
| }; | |
| /* ----------- UTILS ----------- */ | |
| function Marker(human_str) { this.str=human_str; }; | |
| Marker.prototype.toString = function() { return this.str; }; | |
| var EOI = new Marker('end of input'), | |
| ANY = new Marker('any character'), | |
| SOMETHING = new Marker('progress'), | |
| NOTHING = new Marker('nothing'); | |
| function hexOf(ch) { | |
| var x = ch.charCodeAt(0), | |
| v = x.toString(16).toUpperCase(), | |
| h = (x > 0xFF), | |
| i = (h ? 4 : 2) - v.length; | |
| while (i--) v = v + '0'; | |
| return '\\' + (h ? 'u' : 'x') + v; | |
| } | |
| function quote(s) { | |
| /* | |
| * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a | |
| * string literal except for the closing quote character, backslash, | |
| * carriage return, line separator, paragraph separator, and line feed. | |
| * Any character may appear in the form of an escape sequence. | |
| * | |
| * For portability, we also escape escape all control and non-ASCII | |
| * characters. Note that "\0" and "\v" escape sequences are not used | |
| * because JSHint does not like the first and IE the second. | |
| */ | |
| return '"' + s | |
| .replace(/\\/g, '\\\\') // backslash | |
| .replace(/"/g, '\\"') // closing quote character | |
| .replace(/\x08/g, '\\b') // backspace | |
| .replace(/\t/g, '\\t') // horizontal tab | |
| .replace(/\n/g, '\\n') // line feed | |
| .replace(/\f/g, '\\f') // form feed | |
| .replace(/\r/g, '\\r') // carriage return | |
| .replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g, hexOf) | |
| + '"'; | |
| } | |
| /* ----------- FAILURES ----------- */ | |
| function MatchFailed(what, found, expected) { | |
| this.what = what; | |
| this.expected = expected || []; | |
| this.found = found; | |
| this.offset = pos; | |
| this.xpos = [-1, -1]; | |
| this.line = -1; | |
| this.column = -1; | |
| } | |
| MatchFailed.prototype = new Error(); | |
| MatchFailed.prototype.toString = | |
| function() { return 'MatchFailed: '+emsg(this); }; | |
| var merr = function(fnd, exp) { | |
| return new MatchFailed(alias || current, fnd, exp); | |
| }; | |
| function failed(expected, found) { | |
| var expected = alias || expected; | |
| // if no report required, just throw | |
| if (nr) throw merr(found, [expected]); | |
| if (pos > rmfpos) rmfpos = pos; | |
| var e = failures[pos] || | |
| (failures[pos] = merr(found)); | |
| /*if (e.found !== found)*/ e.found = found; | |
| var prev = e.expected; | |
| var f; for (var i = prev.length; i--;) { | |
| if (prev[i] === expected) { | |
| f = 1; break; | |
| } | |
| }; if (!f) prev.push(expected); | |
| throw e; | |
| } | |
| function safe(f, callback) { | |
| try { return f(); | |
| } catch(e) { | |
| if (e instanceof MatchFailed) { | |
| if (callback) callback(e); | |
| } else { throw e; } | |
| } | |
| } | |
| function emsg(e) { | |
| var found_str, exp_str; | |
| if (e.found instanceof Marker) { | |
| found_str = e.found.str; | |
| } else { | |
| found_str = quote(e.found); | |
| } | |
| if (e.expected instanceof Marker) { | |
| exp_str = e.expected.str; | |
| } else if ((e.expected.length === 1) && | |
| (e.expected[0] instanceof Marker)) { | |
| exp_str = e.expected[0].str; | |
| } else { | |
| var xs = e.expected; | |
| exp_str = ((xs.length > 1) | |
| ? (xs.slice(0,-1).join(', ')+' '+ | |
| 'or '+xs.slice(-1)) | |
| : xs[0]); | |
| } | |
| return /*'Stopped at '+quote(e.what)+': */'Expected '+exp_str+ | |
| ' but '+found_str+' found.'; | |
| } | |
| function adapt(e) { | |
| var xpos = __p_coord(e.offset); | |
| e.xpos = xpos; e.line = xpos[1]; e.column = xpos[0]; | |
| e.message = emsg(e); | |
| if ((e.found instanceof Marker) && (e.found === EOI)) e.found = null; | |
| var xs = e.expected.sort(); | |
| if ((xs.length === 1) && | |
| (xs[0] === EOI)) { | |
| e.expected = []; | |
| } | |
| for (var i = xs.length; i--;) | |
| { if (xs[i] instanceof Marker) xs[i] = xs[i].str; }; | |
| return e; | |
| } | |
| function SyntaxError(msg) { // may be thrown from parser | |
| this.message = msg; | |
| } | |
| SyntaxError.prototype = new Error(); | |
| SyntaxError.prototype.toString = | |
| function() { return 'SyntaxError: '+this.message; }; | |
| /* ---------- RETURN RESULT OBJECT ----------- */ | |
| return result; | |
| }; | |
| /* ----------- COORDINATES CALCULATION ----------- */ | |
| // a function to find line-column position from a char-based position | |
| var __p_coord_cache; // cache of 2d position: [ last_pos, column, line, seen_cr ] | |
| function __p_reset_coord() { __p_coord_cache = [ 0, 1, 1, 0 ]; }; | |
| __p_reset_coord(); | |
| function __p_coord(pos) { | |
| /* | |
| * The first idea was to use |String.split| to break the input up to the | |
| * error position along newlines and derive the line and column from | |
| * there. However IE's |split| implementation is so broken that it was | |
| * enough to prevent it. | |
| */ | |
| var cl = 1, ln = 1, | |
| cr = 0, // bool, was CR found or not? | |
| c = __p_coord_cache; | |
| if (pos !== c[0]) { | |
| if (pos < c[0]) { | |
| __p_reset_coord(); | |
| } else { | |
| cl = c[1], ln = c[2], cr = c[3]; | |
| } | |
| var from = c[0], to = pos; | |
| for (var i = from, ch; i < to; i++) { | |
| ch = input.charAt(i); | |
| if (ch === "\n") { | |
| if (!cr) { ln++; } | |
| cl = 1; cr = 0; | |
| } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") { | |
| ln++; cl = 1; cr = 1; | |
| } else /*if (ch.length)*/ { | |
| cl++; cr = 0; | |
| } | |
| } | |
| __p_coord_cache = [ pos, cl, ln, cr ]; | |
| return [ cl, ln ]; | |
| } else return [ c[1], c[2] ]; | |
| } | |
| /* ----------- RETURN PARSER ----------- */ | |
| return __parser(); | |
| })();; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = (function(){ | |
| /* | |
| * Generated by PEG.js 0.7.0. | |
| * | |
| * http://pegjs.majda.cz/ | |
| */ | |
| function quote(s) { | |
| /* | |
| * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a | |
| * string literal except for the closing quote character, backslash, | |
| * carriage return, line separator, paragraph separator, and line feed. | |
| * Any character may appear in the form of an escape sequence. | |
| * | |
| * For portability, we also escape escape all control and non-ASCII | |
| * characters. Note that "\0" and "\v" escape sequences are not used | |
| * because JSHint does not like the first and IE the second. | |
| */ | |
| return '"' + s | |
| .replace(/\\/g, '\\\\') // backslash | |
| .replace(/"/g, '\\"') // closing quote character | |
| .replace(/\x08/g, '\\b') // backspace | |
| .replace(/\t/g, '\\t') // horizontal tab | |
| .replace(/\n/g, '\\n') // line feed | |
| .replace(/\f/g, '\\f') // form feed | |
| .replace(/\r/g, '\\r') // carriage return | |
| .replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g, escape) | |
| + '"'; | |
| } | |
| var result = { | |
| /* | |
| * Parses the input with a generated parser. If the parsing is successfull, | |
| * returns a value explicitly or implicitly specified by the grammar from | |
| * which the parser was generated (see |PEG.buildParser|). If the parsing is | |
| * unsuccessful, throws |PEG.parser.SyntaxError| describing the error. | |
| */ | |
| parse: function(input, startRule) { | |
| var parseFunctions = { | |
| "start": parse_start, | |
| "stylesheet": parse_stylesheet, | |
| "import": parse_import, | |
| "media": parse_media, | |
| "media_list": parse_media_list, | |
| "medium": parse_medium, | |
| "page": parse_page, | |
| "pseudo_page": parse_pseudo_page, | |
| "operator": parse_operator, | |
| "combinator": parse_combinator, | |
| "unary_operator": parse_unary_operator, | |
| "property": parse_property, | |
| "ruleset": parse_ruleset, | |
| "selector": parse_selector, | |
| "simple_selector": parse_simple_selector, | |
| "class": parse_class, | |
| "element_name": parse_element_name, | |
| "attrib": parse_attrib, | |
| "pseudo": parse_pseudo, | |
| "declaration": parse_declaration, | |
| "prio": parse_prio, | |
| "expr": parse_expr, | |
| "term": parse_term, | |
| "function": parse_function, | |
| "hexcolor": parse_hexcolor, | |
| "h": parse_h, | |
| "nonascii": parse_nonascii, | |
| "unicode": parse_unicode, | |
| "escape": parse_escape, | |
| "nmstart": parse_nmstart, | |
| "nmchar": parse_nmchar, | |
| "integer": parse_integer, | |
| "float": parse_float, | |
| "string1": parse_string1, | |
| "string2": parse_string2, | |
| "comment": parse_comment, | |
| "ident": parse_ident, | |
| "name": parse_name, | |
| "num": parse_num, | |
| "string": parse_string, | |
| "url": parse_url, | |
| "s": parse_s, | |
| "w": parse_w, | |
| "nl": parse_nl, | |
| "A": parse_A, | |
| "C": parse_C, | |
| "D": parse_D, | |
| "E": parse_E, | |
| "G": parse_G, | |
| "H": parse_H, | |
| "I": parse_I, | |
| "K": parse_K, | |
| "L": parse_L, | |
| "M": parse_M, | |
| "N": parse_N, | |
| "O": parse_O, | |
| "P": parse_P, | |
| "R": parse_R, | |
| "S_": parse_S_, | |
| "T": parse_T, | |
| "U": parse_U, | |
| "X": parse_X, | |
| "Z": parse_Z, | |
| "S": parse_S, | |
| "CDO": parse_CDO, | |
| "CDC": parse_CDC, | |
| "INCLUDES": parse_INCLUDES, | |
| "DASHMATCH": parse_DASHMATCH, | |
| "STRING": parse_STRING, | |
| "IDENT": parse_IDENT, | |
| "HASH": parse_HASH, | |
| "IMPORT_SYM": parse_IMPORT_SYM, | |
| "PAGE_SYM": parse_PAGE_SYM, | |
| "MEDIA_SYM": parse_MEDIA_SYM, | |
| "CHARSET_SYM": parse_CHARSET_SYM, | |
| "IMPORTANT_SYM": parse_IMPORTANT_SYM, | |
| "EMS": parse_EMS, | |
| "EXS": parse_EXS, | |
| "LENGTH": parse_LENGTH, | |
| "ANGLE": parse_ANGLE, | |
| "TIME": parse_TIME, | |
| "FREQ": parse_FREQ, | |
| "DIMENSION": parse_DIMENSION, | |
| "PERCENTAGE": parse_PERCENTAGE, | |
| "NUMBER": parse_NUMBER, | |
| "URI": parse_URI, | |
| "FUNCTION": parse_FUNCTION | |
| }; | |
| if (startRule !== undefined) { | |
| if (parseFunctions[startRule] === undefined) { | |
| throw new Error("Invalid rule name: " + quote(startRule) + "."); | |
| } | |
| } else { | |
| startRule = "start"; | |
| } | |
| var pos = 0; | |
| var reportFailures = 0; | |
| var rightmostFailuresPos = 0; | |
| var rightmostFailuresExpected = []; | |
| function padLeft(input, padding, length) { | |
| var result = input; | |
| var padLength = length - input.length; | |
| for (var i = 0; i < padLength; i++) { | |
| result = padding + result; | |
| } | |
| return result; | |
| } | |
| function escape(ch) { | |
| var charCode = ch.charCodeAt(0); | |
| var escapeChar; | |
| var length; | |
| if (charCode <= 0xFF) { | |
| escapeChar = 'x'; | |
| length = 2; | |
| } else { | |
| escapeChar = 'u'; | |
| length = 4; | |
| } | |
| return '\\' + escapeChar + padLeft(charCode.toString(16).toUpperCase(), '0', length); | |
| } | |
| function matchFailed(failure) { | |
| if (pos < rightmostFailuresPos) { | |
| return; | |
| } | |
| if (pos > rightmostFailuresPos) { | |
| rightmostFailuresPos = pos; | |
| rightmostFailuresExpected = []; | |
| } | |
| rightmostFailuresExpected.push(failure); | |
| } | |
| function parse_start() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_stylesheet(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_comment(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_comment(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, stylesheet) { return stylesheet; })(pos0, result0[0]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_stylesheet() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7, result8; | |
| var pos0, pos1, pos2, pos3; | |
| pos0 = pos; | |
| pos1 = pos; | |
| pos2 = pos; | |
| result0 = parse_CHARSET_SYM(); | |
| if (result0 !== null) { | |
| result1 = parse_STRING(); | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 59) { | |
| result2 = ";"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\";\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos2; | |
| } | |
| result0 = result0 !== null ? result0 : ""; | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| if (result2 === null) { | |
| result2 = parse_CDO(); | |
| if (result2 === null) { | |
| result2 = parse_CDC(); | |
| } | |
| } | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| if (result2 === null) { | |
| result2 = parse_CDO(); | |
| if (result2 === null) { | |
| result2 = parse_CDC(); | |
| } | |
| } | |
| } | |
| if (result1 !== null) { | |
| result2 = []; | |
| pos2 = pos; | |
| result3 = parse_import(); | |
| if (result3 !== null) { | |
| result4 = []; | |
| pos3 = pos; | |
| result5 = parse_CDO(); | |
| if (result5 !== null) { | |
| result6 = []; | |
| result7 = parse_S(); | |
| while (result7 !== null) { | |
| result6.push(result7); | |
| result7 = parse_S(); | |
| } | |
| if (result6 !== null) { | |
| result5 = [result5, result6]; | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| if (result5 === null) { | |
| pos3 = pos; | |
| result5 = parse_CDC(); | |
| if (result5 !== null) { | |
| result6 = []; | |
| result7 = parse_S(); | |
| while (result7 !== null) { | |
| result6.push(result7); | |
| result7 = parse_S(); | |
| } | |
| if (result6 !== null) { | |
| result5 = [result5, result6]; | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| } | |
| while (result5 !== null) { | |
| result4.push(result5); | |
| pos3 = pos; | |
| result5 = parse_CDO(); | |
| if (result5 !== null) { | |
| result6 = []; | |
| result7 = parse_S(); | |
| while (result7 !== null) { | |
| result6.push(result7); | |
| result7 = parse_S(); | |
| } | |
| if (result6 !== null) { | |
| result5 = [result5, result6]; | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| if (result5 === null) { | |
| pos3 = pos; | |
| result5 = parse_CDC(); | |
| if (result5 !== null) { | |
| result6 = []; | |
| result7 = parse_S(); | |
| while (result7 !== null) { | |
| result6.push(result7); | |
| result7 = parse_S(); | |
| } | |
| if (result6 !== null) { | |
| result5 = [result5, result6]; | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| } | |
| } | |
| if (result4 !== null) { | |
| result3 = [result3, result4]; | |
| } else { | |
| result3 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result3 = null; | |
| pos = pos2; | |
| } | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| pos2 = pos; | |
| result3 = parse_import(); | |
| if (result3 !== null) { | |
| result4 = []; | |
| pos3 = pos; | |
| result5 = parse_CDO(); | |
| if (result5 !== null) { | |
| result6 = []; | |
| result7 = parse_S(); | |
| while (result7 !== null) { | |
| result6.push(result7); | |
| result7 = parse_S(); | |
| } | |
| if (result6 !== null) { | |
| result5 = [result5, result6]; | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| if (result5 === null) { | |
| pos3 = pos; | |
| result5 = parse_CDC(); | |
| if (result5 !== null) { | |
| result6 = []; | |
| result7 = parse_S(); | |
| while (result7 !== null) { | |
| result6.push(result7); | |
| result7 = parse_S(); | |
| } | |
| if (result6 !== null) { | |
| result5 = [result5, result6]; | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| } | |
| while (result5 !== null) { | |
| result4.push(result5); | |
| pos3 = pos; | |
| result5 = parse_CDO(); | |
| if (result5 !== null) { | |
| result6 = []; | |
| result7 = parse_S(); | |
| while (result7 !== null) { | |
| result6.push(result7); | |
| result7 = parse_S(); | |
| } | |
| if (result6 !== null) { | |
| result5 = [result5, result6]; | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| if (result5 === null) { | |
| pos3 = pos; | |
| result5 = parse_CDC(); | |
| if (result5 !== null) { | |
| result6 = []; | |
| result7 = parse_S(); | |
| while (result7 !== null) { | |
| result6.push(result7); | |
| result7 = parse_S(); | |
| } | |
| if (result6 !== null) { | |
| result5 = [result5, result6]; | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result5 = null; | |
| pos = pos3; | |
| } | |
| } | |
| } | |
| if (result4 !== null) { | |
| result3 = [result3, result4]; | |
| } else { | |
| result3 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result3 = null; | |
| pos = pos2; | |
| } | |
| } | |
| if (result2 !== null) { | |
| result3 = []; | |
| pos2 = pos; | |
| result4 = parse_ruleset(); | |
| if (result4 === null) { | |
| result4 = parse_media(); | |
| if (result4 === null) { | |
| result4 = parse_page(); | |
| } | |
| } | |
| if (result4 !== null) { | |
| result5 = []; | |
| pos3 = pos; | |
| result6 = parse_CDO(); | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result6 = [result6, result7]; | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| if (result6 === null) { | |
| pos3 = pos; | |
| result6 = parse_CDC(); | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result6 = [result6, result7]; | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| } | |
| while (result6 !== null) { | |
| result5.push(result6); | |
| pos3 = pos; | |
| result6 = parse_CDO(); | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result6 = [result6, result7]; | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| if (result6 === null) { | |
| pos3 = pos; | |
| result6 = parse_CDC(); | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result6 = [result6, result7]; | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| } | |
| } | |
| if (result5 !== null) { | |
| result4 = [result4, result5]; | |
| } else { | |
| result4 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result4 = null; | |
| pos = pos2; | |
| } | |
| while (result4 !== null) { | |
| result3.push(result4); | |
| pos2 = pos; | |
| result4 = parse_ruleset(); | |
| if (result4 === null) { | |
| result4 = parse_media(); | |
| if (result4 === null) { | |
| result4 = parse_page(); | |
| } | |
| } | |
| if (result4 !== null) { | |
| result5 = []; | |
| pos3 = pos; | |
| result6 = parse_CDO(); | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result6 = [result6, result7]; | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| if (result6 === null) { | |
| pos3 = pos; | |
| result6 = parse_CDC(); | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result6 = [result6, result7]; | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| } | |
| while (result6 !== null) { | |
| result5.push(result6); | |
| pos3 = pos; | |
| result6 = parse_CDO(); | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result6 = [result6, result7]; | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| if (result6 === null) { | |
| pos3 = pos; | |
| result6 = parse_CDC(); | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result6 = [result6, result7]; | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result6 = null; | |
| pos = pos3; | |
| } | |
| } | |
| } | |
| if (result5 !== null) { | |
| result4 = [result4, result5]; | |
| } else { | |
| result4 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result4 = null; | |
| pos = pos2; | |
| } | |
| } | |
| if (result3 !== null) { | |
| result0 = [result0, result1, result2, result3]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, charset, imports, rules) { | |
| var importsConverted = []; | |
| for (var i = 0; i < imports.length; i++) { | |
| importsConverted.push(imports[i][0]); | |
| } | |
| var rulesConverted = []; | |
| for (i = 0; i < rules.length; i++) { | |
| rulesConverted.push(rules[i][0]); | |
| } | |
| return { | |
| type: "stylesheet", | |
| charset: charset !== "" ? charset[1] : null, | |
| imports: importsConverted, | |
| rules: rulesConverted | |
| }; | |
| })(pos0, result0[0], result0[2], result0[3]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_import() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_IMPORT_SYM(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result2 = parse_STRING(); | |
| if (result2 === null) { | |
| result2 = parse_URI(); | |
| } | |
| if (result2 !== null) { | |
| result3 = []; | |
| result4 = parse_S(); | |
| while (result4 !== null) { | |
| result3.push(result4); | |
| result4 = parse_S(); | |
| } | |
| if (result3 !== null) { | |
| result4 = parse_media_list(); | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 59) { | |
| result5 = ";"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\";\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| result6 = []; | |
| result7 = parse_S(); | |
| while (result7 !== null) { | |
| result6.push(result7); | |
| result7 = parse_S(); | |
| } | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, href, media) { | |
| return { | |
| type: "import_rule", | |
| href: href, | |
| media: media !== "" ? media : [] | |
| }; | |
| })(pos0, result0[2], result0[4]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_media() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7, result8; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_MEDIA_SYM(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result2 = parse_media_list(); | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 123) { | |
| result3 = "{"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"{\""); | |
| } | |
| } | |
| if (result3 !== null) { | |
| result4 = []; | |
| result5 = parse_S(); | |
| while (result5 !== null) { | |
| result4.push(result5); | |
| result5 = parse_S(); | |
| } | |
| if (result4 !== null) { | |
| result5 = []; | |
| result6 = parse_ruleset(); | |
| while (result6 !== null) { | |
| result5.push(result6); | |
| result6 = parse_ruleset(); | |
| } | |
| if (result5 !== null) { | |
| if (input.charCodeAt(pos) === 125) { | |
| result6 = "}"; | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"}\""); | |
| } | |
| } | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, media, rules) { | |
| return { | |
| type: "media_rule", | |
| media: media, | |
| rules: rules | |
| }; | |
| })(pos0, result0[2], result0[5]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_media_list() { | |
| var result0, result1, result2, result3, result4; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_medium(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| pos2 = pos; | |
| if (input.charCodeAt(pos) === 44) { | |
| result2 = ","; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\",\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result3 = []; | |
| result4 = parse_S(); | |
| while (result4 !== null) { | |
| result3.push(result4); | |
| result4 = parse_S(); | |
| } | |
| if (result3 !== null) { | |
| result4 = parse_medium(); | |
| if (result4 !== null) { | |
| result2 = [result2, result3, result4]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| pos2 = pos; | |
| if (input.charCodeAt(pos) === 44) { | |
| result2 = ","; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\",\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result3 = []; | |
| result4 = parse_S(); | |
| while (result4 !== null) { | |
| result3.push(result4); | |
| result4 = parse_S(); | |
| } | |
| if (result3 !== null) { | |
| result4 = parse_medium(); | |
| if (result4 !== null) { | |
| result2 = [result2, result3, result4]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, head, tail) { | |
| var result = [head]; | |
| for (var i = 0; i < tail.length; i++) { | |
| result.push(tail[i][2]); | |
| } | |
| return result; | |
| })(pos0, result0[0], result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_medium() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_IDENT(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, ident) { return ident; })(pos0, result0[0]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_page() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7, result8, result9; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_PAGE_SYM(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result2 = parse_pseudo_page(); | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 123) { | |
| result3 = "{"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"{\""); | |
| } | |
| } | |
| if (result3 !== null) { | |
| result4 = []; | |
| result5 = parse_S(); | |
| while (result5 !== null) { | |
| result4.push(result5); | |
| result5 = parse_S(); | |
| } | |
| if (result4 !== null) { | |
| result5 = parse_declaration(); | |
| result5 = result5 !== null ? result5 : ""; | |
| if (result5 !== null) { | |
| result6 = []; | |
| pos2 = pos; | |
| if (input.charCodeAt(pos) === 59) { | |
| result7 = ";"; | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\";\""); | |
| } | |
| } | |
| if (result7 !== null) { | |
| result8 = []; | |
| result9 = parse_S(); | |
| while (result9 !== null) { | |
| result8.push(result9); | |
| result9 = parse_S(); | |
| } | |
| if (result8 !== null) { | |
| result9 = parse_declaration(); | |
| result9 = result9 !== null ? result9 : ""; | |
| if (result9 !== null) { | |
| result7 = [result7, result8, result9]; | |
| } else { | |
| result7 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result7 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result7 = null; | |
| pos = pos2; | |
| } | |
| while (result7 !== null) { | |
| result6.push(result7); | |
| pos2 = pos; | |
| if (input.charCodeAt(pos) === 59) { | |
| result7 = ";"; | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\";\""); | |
| } | |
| } | |
| if (result7 !== null) { | |
| result8 = []; | |
| result9 = parse_S(); | |
| while (result9 !== null) { | |
| result8.push(result9); | |
| result9 = parse_S(); | |
| } | |
| if (result8 !== null) { | |
| result9 = parse_declaration(); | |
| result9 = result9 !== null ? result9 : ""; | |
| if (result9 !== null) { | |
| result7 = [result7, result8, result9]; | |
| } else { | |
| result7 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result7 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result7 = null; | |
| pos = pos2; | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.charCodeAt(pos) === 125) { | |
| result7 = "}"; | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"}\""); | |
| } | |
| } | |
| if (result7 !== null) { | |
| result8 = []; | |
| result9 = parse_S(); | |
| while (result9 !== null) { | |
| result8.push(result9); | |
| result9 = parse_S(); | |
| } | |
| if (result8 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7, result8]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, qualifier, declarationsHead, declarationsTail) { | |
| var declarations = declarationsHead !== "" ? [declarationsHead] : []; | |
| for (var i = 0; i < declarationsTail.length; i++) { | |
| if (declarationsTail[i][2] !== "") { | |
| declarations.push(declarationsTail[i][2]); | |
| } | |
| } | |
| return { | |
| type: "page_rule", | |
| qualifier: qualifier !== "" ? qualifier : null, | |
| declarations: declarations | |
| }; | |
| })(pos0, result0[2], result0[5], result0[6]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_pseudo_page() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 58) { | |
| result0 = ":"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\":\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_IDENT(); | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_S(); | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_S(); | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, ident) { return ident; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_operator() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 47) { | |
| result0 = "/"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"/\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "/"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 44) { | |
| result0 = ","; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\",\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return ","; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_combinator() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 43) { | |
| result0 = "+"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"+\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "+"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 62) { | |
| result0 = ">"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\">\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return ">"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_unary_operator() { | |
| var result0; | |
| if (input.charCodeAt(pos) === 43) { | |
| result0 = "+"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"+\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 45) { | |
| result0 = "-"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"-\""); | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_property() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_IDENT(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, ident) { return ident; })(pos0, result0[0]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_ruleset() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7, result8; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_selector(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| pos2 = pos; | |
| if (input.charCodeAt(pos) === 44) { | |
| result2 = ","; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\",\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result3 = []; | |
| result4 = parse_S(); | |
| while (result4 !== null) { | |
| result3.push(result4); | |
| result4 = parse_S(); | |
| } | |
| if (result3 !== null) { | |
| result4 = parse_selector(); | |
| if (result4 !== null) { | |
| result2 = [result2, result3, result4]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| pos2 = pos; | |
| if (input.charCodeAt(pos) === 44) { | |
| result2 = ","; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\",\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result3 = []; | |
| result4 = parse_S(); | |
| while (result4 !== null) { | |
| result3.push(result4); | |
| result4 = parse_S(); | |
| } | |
| if (result3 !== null) { | |
| result4 = parse_selector(); | |
| if (result4 !== null) { | |
| result2 = [result2, result3, result4]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 123) { | |
| result2 = "{"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"{\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result3 = []; | |
| result4 = parse_S(); | |
| while (result4 !== null) { | |
| result3.push(result4); | |
| result4 = parse_S(); | |
| } | |
| if (result3 !== null) { | |
| result4 = parse_declaration(); | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| result5 = []; | |
| pos2 = pos; | |
| if (input.charCodeAt(pos) === 59) { | |
| result6 = ";"; | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\";\""); | |
| } | |
| } | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result8 = parse_declaration(); | |
| result8 = result8 !== null ? result8 : ""; | |
| if (result8 !== null) { | |
| result6 = [result6, result7, result8]; | |
| } else { | |
| result6 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result6 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result6 = null; | |
| pos = pos2; | |
| } | |
| while (result6 !== null) { | |
| result5.push(result6); | |
| pos2 = pos; | |
| if (input.charCodeAt(pos) === 59) { | |
| result6 = ";"; | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\";\""); | |
| } | |
| } | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result8 = parse_declaration(); | |
| result8 = result8 !== null ? result8 : ""; | |
| if (result8 !== null) { | |
| result6 = [result6, result7, result8]; | |
| } else { | |
| result6 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result6 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result6 = null; | |
| pos = pos2; | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.charCodeAt(pos) === 125) { | |
| result6 = "}"; | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"}\""); | |
| } | |
| } | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, selectorsHead, selectorsTail, declarationsHead, declarationsTail) { | |
| var selectors = [selectorsHead]; | |
| for (var i = 0; i < selectorsTail.length; i++) { | |
| selectors.push(selectorsTail[i][2]); | |
| } | |
| var declarations = declarationsHead !== "" ? [declarationsHead] : []; | |
| for (i = 0; i < declarationsTail.length; i++) { | |
| if (declarationsTail[i][2] !== "") { | |
| declarations.push(declarationsTail[i][2]); | |
| } | |
| } | |
| return { | |
| type: "ruleset", | |
| selectors: selectors, | |
| declarations: declarations | |
| }; | |
| })(pos0, result0[0], result0[1], result0[4], result0[5]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_selector() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_simple_selector(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result2 = parse_combinator(); | |
| if (result2 !== null) { | |
| result3 = parse_selector(); | |
| if (result3 !== null) { | |
| result0 = [result0, result1, result2, result3]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, left, combinator, right) { | |
| return { | |
| type: "selector", | |
| combinator: combinator, | |
| left: left, | |
| right: right | |
| }; | |
| })(pos0, result0[0], result0[2], result0[3]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_simple_selector(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result2 = parse_selector(); | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, left, right) { | |
| return { | |
| type: "selector", | |
| combinator: " ", | |
| left: left, | |
| right: right | |
| }; | |
| })(pos0, result0[0], result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_simple_selector(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, selector) { return selector; })(pos0, result0[0]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_simple_selector() { | |
| var result0, result1, result2; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_element_name(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| pos2 = pos; | |
| result2 = parse_HASH(); | |
| if (result2 !== null) { | |
| result2 = (function(offset, id) { return { type: "ID selector", id: id.substr(1) }; })(pos2, result2); | |
| } | |
| if (result2 === null) { | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| result2 = parse_class(); | |
| if (result2 === null) { | |
| result2 = parse_attrib(); | |
| if (result2 === null) { | |
| result2 = parse_pseudo(); | |
| } | |
| } | |
| } | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| pos2 = pos; | |
| result2 = parse_HASH(); | |
| if (result2 !== null) { | |
| result2 = (function(offset, id) { return { type: "ID selector", id: id.substr(1) }; })(pos2, result2); | |
| } | |
| if (result2 === null) { | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| result2 = parse_class(); | |
| if (result2 === null) { | |
| result2 = parse_attrib(); | |
| if (result2 === null) { | |
| result2 = parse_pseudo(); | |
| } | |
| } | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, element, qualifiers) { | |
| return { | |
| type: "simple_selector", | |
| element: element, | |
| qualifiers: qualifiers | |
| }; | |
| })(pos0, result0[0], result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| result1 = parse_HASH(); | |
| if (result1 !== null) { | |
| result1 = (function(offset, id) { return { type: "ID selector", id: id.substr(1) }; })(pos1, result1); | |
| } | |
| if (result1 === null) { | |
| pos = pos1; | |
| } | |
| if (result1 === null) { | |
| result1 = parse_class(); | |
| if (result1 === null) { | |
| result1 = parse_attrib(); | |
| if (result1 === null) { | |
| result1 = parse_pseudo(); | |
| } | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = []; | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| pos1 = pos; | |
| result1 = parse_HASH(); | |
| if (result1 !== null) { | |
| result1 = (function(offset, id) { return { type: "ID selector", id: id.substr(1) }; })(pos1, result1); | |
| } | |
| if (result1 === null) { | |
| pos = pos1; | |
| } | |
| if (result1 === null) { | |
| result1 = parse_class(); | |
| if (result1 === null) { | |
| result1 = parse_attrib(); | |
| if (result1 === null) { | |
| result1 = parse_pseudo(); | |
| } | |
| } | |
| } | |
| } | |
| } else { | |
| result0 = null; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, qualifiers) { | |
| return { | |
| type: "simple_selector", | |
| element: "*", | |
| qualifiers: qualifiers | |
| }; | |
| })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_class() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 46) { | |
| result0 = "."; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\".\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_IDENT(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, class_) { return { type: "class_selector", "class": class_ }; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_element_name() { | |
| var result0; | |
| result0 = parse_IDENT(); | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 42) { | |
| result0 = "*"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*\""); | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_attrib() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7, result8; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 91) { | |
| result0 = "["; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"[\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result2 = parse_IDENT(); | |
| if (result2 !== null) { | |
| result3 = []; | |
| result4 = parse_S(); | |
| while (result4 !== null) { | |
| result3.push(result4); | |
| result4 = parse_S(); | |
| } | |
| if (result3 !== null) { | |
| pos2 = pos; | |
| if (input.charCodeAt(pos) === 61) { | |
| result4 = "="; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"=\""); | |
| } | |
| } | |
| if (result4 === null) { | |
| result4 = parse_INCLUDES(); | |
| if (result4 === null) { | |
| result4 = parse_DASHMATCH(); | |
| } | |
| } | |
| if (result4 !== null) { | |
| result5 = []; | |
| result6 = parse_S(); | |
| while (result6 !== null) { | |
| result5.push(result6); | |
| result6 = parse_S(); | |
| } | |
| if (result5 !== null) { | |
| result6 = parse_IDENT(); | |
| if (result6 === null) { | |
| result6 = parse_STRING(); | |
| } | |
| if (result6 !== null) { | |
| result7 = []; | |
| result8 = parse_S(); | |
| while (result8 !== null) { | |
| result7.push(result8); | |
| result8 = parse_S(); | |
| } | |
| if (result7 !== null) { | |
| result4 = [result4, result5, result6, result7]; | |
| } else { | |
| result4 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result4 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result4 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result4 = null; | |
| pos = pos2; | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 93) { | |
| result5 = "]"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"]\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, attribute, operatorAndValue) { | |
| return { | |
| type: "attribute_selector", | |
| attribute: attribute, | |
| operator: operatorAndValue !== "" ? operatorAndValue[0] : null, | |
| value: operatorAndValue !== "" ? operatorAndValue[2] : null | |
| }; | |
| })(pos0, result0[2], result0[4]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_pseudo() { | |
| var result0, result1, result2, result3, result4, result5; | |
| var pos0, pos1, pos2, pos3, pos4; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 58) { | |
| result0 = ":"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\":\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos2 = pos; | |
| pos3 = pos; | |
| result1 = parse_FUNCTION(); | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_S(); | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_S(); | |
| } | |
| if (result2 !== null) { | |
| pos4 = pos; | |
| result3 = parse_IDENT(); | |
| if (result3 !== null) { | |
| result4 = []; | |
| result5 = parse_S(); | |
| while (result5 !== null) { | |
| result4.push(result5); | |
| result5 = parse_S(); | |
| } | |
| if (result4 !== null) { | |
| result3 = [result3, result4]; | |
| } else { | |
| result3 = null; | |
| pos = pos4; | |
| } | |
| } else { | |
| result3 = null; | |
| pos = pos4; | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 41) { | |
| result4 = ")"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\")\""); | |
| } | |
| } | |
| if (result4 !== null) { | |
| result1 = [result1, result2, result3, result4]; | |
| } else { | |
| result1 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result1 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result1 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result1 = null; | |
| pos = pos3; | |
| } | |
| if (result1 !== null) { | |
| result1 = (function(offset, name, params) { | |
| return { | |
| type: "function", | |
| name: name, | |
| params: params !== "" ? [params[0]] : [] | |
| }; | |
| })(pos2, result1[0], result1[2]); | |
| } | |
| if (result1 === null) { | |
| pos = pos2; | |
| } | |
| if (result1 === null) { | |
| result1 = parse_IDENT(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, value) { | |
| /* | |
| * The returned object has somewhat vague property names and values because | |
| * the rule matches both pseudo-classes and pseudo-elements (they look the | |
| * same at the syntactic level). | |
| */ | |
| return { | |
| type: "pseudo_selector", | |
| value: value | |
| }; | |
| })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_declaration() { | |
| var result0, result1, result2, result3, result4; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_property(); | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 58) { | |
| result1 = ":"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\":\""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_S(); | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_S(); | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_expr(); | |
| if (result3 !== null) { | |
| result4 = parse_prio(); | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| result0 = [result0, result1, result2, result3, result4]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, property, expression, important) { | |
| return { | |
| type: "declaration", | |
| property: property, | |
| expression: expression, | |
| important: important !== "" ? true : false | |
| }; | |
| })(pos0, result0[0], result0[3], result0[4]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_prio() { | |
| var result0, result1, result2; | |
| var pos0; | |
| pos0 = pos; | |
| result0 = parse_IMPORTANT_SYM(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_expr() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_term(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| pos2 = pos; | |
| result2 = parse_operator(); | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| result3 = parse_term(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| pos2 = pos; | |
| result2 = parse_operator(); | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| result3 = parse_term(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, head, tail) { | |
| var result = head; | |
| for (var i = 0; i < tail.length; i++) { | |
| result = { | |
| type: "expression", | |
| operator: tail[i][0], | |
| left: result, | |
| right: tail[i][1] | |
| }; | |
| } | |
| return result; | |
| })(pos0, result0[0], result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_term() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_unary_operator(); | |
| result0 = result0 !== null ? result0 : ""; | |
| if (result0 !== null) { | |
| pos2 = pos; | |
| result1 = parse_EMS(); | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_S(); | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_S(); | |
| } | |
| if (result2 !== null) { | |
| result1 = [result1, result2]; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| if (result1 === null) { | |
| pos2 = pos; | |
| result1 = parse_EXS(); | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_S(); | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_S(); | |
| } | |
| if (result2 !== null) { | |
| result1 = [result1, result2]; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| if (result1 === null) { | |
| pos2 = pos; | |
| result1 = parse_LENGTH(); | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_S(); | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_S(); | |
| } | |
| if (result2 !== null) { | |
| result1 = [result1, result2]; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| if (result1 === null) { | |
| pos2 = pos; | |
| result1 = parse_ANGLE(); | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_S(); | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_S(); | |
| } | |
| if (result2 !== null) { | |
| result1 = [result1, result2]; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| if (result1 === null) { | |
| pos2 = pos; | |
| result1 = parse_TIME(); | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_S(); | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_S(); | |
| } | |
| if (result2 !== null) { | |
| result1 = [result1, result2]; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| if (result1 === null) { | |
| pos2 = pos; | |
| result1 = parse_FREQ(); | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_S(); | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_S(); | |
| } | |
| if (result2 !== null) { | |
| result1 = [result1, result2]; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| if (result1 === null) { | |
| pos2 = pos; | |
| result1 = parse_PERCENTAGE(); | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_S(); | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_S(); | |
| } | |
| if (result2 !== null) { | |
| result1 = [result1, result2]; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| if (result1 === null) { | |
| pos2 = pos; | |
| result1 = parse_NUMBER(); | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_S(); | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_S(); | |
| } | |
| if (result2 !== null) { | |
| result1 = [result1, result2]; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, operator, value) { return { type: "value", value: operator + value[0] }; })(pos0, result0[0], result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_URI(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, value) { return { type: "uri", value: value }; })(pos0, result0[0]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| result0 = parse_function(); | |
| if (result0 === null) { | |
| result0 = parse_hexcolor(); | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_STRING(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, value) { return { type: "string", value: value }; })(pos0, result0[0]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_IDENT(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, value) { return { type: "ident", value: value }; })(pos0, result0[0]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_function() { | |
| var result0, result1, result2, result3, result4, result5; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_FUNCTION(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result2 = parse_expr(); | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 41) { | |
| result3 = ")"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\")\""); | |
| } | |
| } | |
| if (result3 !== null) { | |
| result4 = []; | |
| result5 = parse_S(); | |
| while (result5 !== null) { | |
| result4.push(result5); | |
| result5 = parse_S(); | |
| } | |
| if (result4 !== null) { | |
| result0 = [result0, result1, result2, result3, result4]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, name, params) { | |
| return { | |
| type: "function", | |
| name: name, | |
| params: params | |
| }; | |
| })(pos0, result0[0], result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_hexcolor() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_HASH(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_S(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_S(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, value) { return { type: "hexcolor", value: value}; })(pos0, result0[0]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_h() { | |
| var result0; | |
| if (/^[0-9a-fA-F]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[0-9a-fA-F]"); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_nonascii() { | |
| var result0; | |
| if (/^[\x80-\xFF]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[\\x80-\\xFF]"); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_unicode() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_h(); | |
| if (result1 !== null) { | |
| result2 = parse_h(); | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| result3 = parse_h(); | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| result4 = parse_h(); | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| result5 = parse_h(); | |
| result5 = result5 !== null ? result5 : ""; | |
| if (result5 !== null) { | |
| result6 = parse_h(); | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, h1, h2, h3, h4, h5, h6) { | |
| return String.fromCharCode(parseInt("0x" + h1 + h2 + h3 + h4 + h5 + h6)); | |
| })(pos0, result0[1], result0[2], result0[3], result0[4], result0[5], result0[6]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_escape() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| result0 = parse_unicode(); | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[^\r\n\f0-9a-fA-F]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^\\r\\n\\f0-9a-fA-F]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_nmstart() { | |
| var result0; | |
| if (/^[_a-zA-Z]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[_a-zA-Z]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| result0 = parse_nonascii(); | |
| if (result0 === null) { | |
| result0 = parse_escape(); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_nmchar() { | |
| var result0; | |
| if (/^[_a-zA-Z0-9\-]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[_a-zA-Z0-9\\-]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| result0 = parse_nonascii(); | |
| if (result0 === null) { | |
| result0 = parse_escape(); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_integer() { | |
| var result0, result1; | |
| var pos0; | |
| pos0 = pos; | |
| if (/^[0-9]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[0-9]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = []; | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| if (/^[0-9]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[0-9]"); | |
| } | |
| } | |
| } | |
| } else { | |
| result0 = null; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, digits) { return parseInt(digits.join("")); })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_float() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| if (/^[0-9]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[0-9]"); | |
| } | |
| } | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| if (/^[0-9]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[0-9]"); | |
| } | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 46) { | |
| result1 = "."; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\".\""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| if (/^[0-9]/.test(input.charAt(pos))) { | |
| result3 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[0-9]"); | |
| } | |
| } | |
| if (result3 !== null) { | |
| result2 = []; | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| if (/^[0-9]/.test(input.charAt(pos))) { | |
| result3 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[0-9]"); | |
| } | |
| } | |
| } | |
| } else { | |
| result2 = null; | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, before, after) { | |
| return parseFloat(before.join("") + "." + after.join("")); | |
| })(pos0, result0[0], result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_string1() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1, pos2, pos3; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 34) { | |
| result0 = "\""; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\"\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = []; | |
| if (/^[^\n\r\f\\"]/.test(input.charAt(pos))) { | |
| result2 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^\\n\\r\\f\\\\\"]"); | |
| } | |
| } | |
| if (result2 === null) { | |
| pos2 = pos; | |
| pos3 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result2 = "\\"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_nl(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos3; | |
| } | |
| if (result2 !== null) { | |
| result2 = (function(offset, nl) { return nl })(pos2, result2[1]); | |
| } | |
| if (result2 === null) { | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| result2 = parse_escape(); | |
| } | |
| } | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| if (/^[^\n\r\f\\"]/.test(input.charAt(pos))) { | |
| result2 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^\\n\\r\\f\\\\\"]"); | |
| } | |
| } | |
| if (result2 === null) { | |
| pos2 = pos; | |
| pos3 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result2 = "\\"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_nl(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos3; | |
| } | |
| if (result2 !== null) { | |
| result2 = (function(offset, nl) { return nl })(pos2, result2[1]); | |
| } | |
| if (result2 === null) { | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| result2 = parse_escape(); | |
| } | |
| } | |
| } | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 34) { | |
| result2 = "\""; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\"\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, chars) { | |
| return chars.join(""); | |
| })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_string2() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1, pos2, pos3; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 39) { | |
| result0 = "'"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"'\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = []; | |
| if (/^[^\n\r\f\\']/.test(input.charAt(pos))) { | |
| result2 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^\\n\\r\\f\\\\']"); | |
| } | |
| } | |
| if (result2 === null) { | |
| pos2 = pos; | |
| pos3 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result2 = "\\"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_nl(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos3; | |
| } | |
| if (result2 !== null) { | |
| result2 = (function(offset, nl) { return nl })(pos2, result2[1]); | |
| } | |
| if (result2 === null) { | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| result2 = parse_escape(); | |
| } | |
| } | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| if (/^[^\n\r\f\\']/.test(input.charAt(pos))) { | |
| result2 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^\\n\\r\\f\\\\']"); | |
| } | |
| } | |
| if (result2 === null) { | |
| pos2 = pos; | |
| pos3 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result2 = "\\"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_nl(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos3; | |
| } | |
| if (result2 !== null) { | |
| result2 = (function(offset, nl) { return nl })(pos2, result2[1]); | |
| } | |
| if (result2 === null) { | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| result2 = parse_escape(); | |
| } | |
| } | |
| } | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 39) { | |
| result2 = "'"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"'\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, chars) { | |
| return chars.join(""); | |
| })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_comment() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 2) === "/*") { | |
| result0 = "/*"; | |
| pos += 2; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"/*\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = []; | |
| if (/^[^*]/.test(input.charAt(pos))) { | |
| result2 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^*]"); | |
| } | |
| } | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| if (/^[^*]/.test(input.charAt(pos))) { | |
| result2 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^*]"); | |
| } | |
| } | |
| } | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 42) { | |
| result3 = "*"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*\""); | |
| } | |
| } | |
| if (result3 !== null) { | |
| result2 = []; | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| if (input.charCodeAt(pos) === 42) { | |
| result3 = "*"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*\""); | |
| } | |
| } | |
| } | |
| } else { | |
| result2 = null; | |
| } | |
| if (result2 !== null) { | |
| result3 = []; | |
| pos1 = pos; | |
| if (/^[^\/*]/.test(input.charAt(pos))) { | |
| result4 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^\\/*]"); | |
| } | |
| } | |
| if (result4 !== null) { | |
| result5 = []; | |
| if (/^[^*]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^*]"); | |
| } | |
| } | |
| while (result6 !== null) { | |
| result5.push(result6); | |
| if (/^[^*]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^*]"); | |
| } | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.charCodeAt(pos) === 42) { | |
| result7 = "*"; | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*\""); | |
| } | |
| } | |
| if (result7 !== null) { | |
| result6 = []; | |
| while (result7 !== null) { | |
| result6.push(result7); | |
| if (input.charCodeAt(pos) === 42) { | |
| result7 = "*"; | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*\""); | |
| } | |
| } | |
| } | |
| } else { | |
| result6 = null; | |
| } | |
| if (result6 !== null) { | |
| result4 = [result4, result5, result6]; | |
| } else { | |
| result4 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result4 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result4 = null; | |
| pos = pos1; | |
| } | |
| while (result4 !== null) { | |
| result3.push(result4); | |
| pos1 = pos; | |
| if (/^[^\/*]/.test(input.charAt(pos))) { | |
| result4 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^\\/*]"); | |
| } | |
| } | |
| if (result4 !== null) { | |
| result5 = []; | |
| if (/^[^*]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^*]"); | |
| } | |
| } | |
| while (result6 !== null) { | |
| result5.push(result6); | |
| if (/^[^*]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[^*]"); | |
| } | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.charCodeAt(pos) === 42) { | |
| result7 = "*"; | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*\""); | |
| } | |
| } | |
| if (result7 !== null) { | |
| result6 = []; | |
| while (result7 !== null) { | |
| result6.push(result7); | |
| if (input.charCodeAt(pos) === 42) { | |
| result7 = "*"; | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*\""); | |
| } | |
| } | |
| } | |
| } else { | |
| result6 = null; | |
| } | |
| if (result6 !== null) { | |
| result4 = [result4, result5, result6]; | |
| } else { | |
| result4 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result4 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result4 = null; | |
| pos = pos1; | |
| } | |
| } | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 47) { | |
| result4 = "/"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"/\""); | |
| } | |
| } | |
| if (result4 !== null) { | |
| result0 = [result0, result1, result2, result3, result4]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_ident() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 45) { | |
| result0 = "-"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"-\""); | |
| } | |
| } | |
| result0 = result0 !== null ? result0 : ""; | |
| if (result0 !== null) { | |
| result1 = parse_nmstart(); | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_nmchar(); | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_nmchar(); | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, dash, nmstart, nmchars) { | |
| return dash + nmstart + nmchars.join(""); | |
| })(pos0, result0[0], result0[1], result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_name() { | |
| var result0, result1; | |
| var pos0; | |
| pos0 = pos; | |
| result1 = parse_nmchar(); | |
| if (result1 !== null) { | |
| result0 = []; | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_nmchar(); | |
| } | |
| } else { | |
| result0 = null; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, nmchars) { return nmchars.join(""); })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_num() { | |
| var result0; | |
| result0 = parse_float(); | |
| if (result0 === null) { | |
| result0 = parse_integer(); | |
| } | |
| return result0; | |
| } | |
| function parse_string() { | |
| var result0; | |
| result0 = parse_string1(); | |
| if (result0 === null) { | |
| result0 = parse_string2(); | |
| } | |
| return result0; | |
| } | |
| function parse_url() { | |
| var result0, result1; | |
| var pos0; | |
| pos0 = pos; | |
| result0 = []; | |
| if (/^[!#$%&*-~]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[!#$%&*-~]"); | |
| } | |
| } | |
| if (result1 === null) { | |
| result1 = parse_nonascii(); | |
| if (result1 === null) { | |
| result1 = parse_escape(); | |
| } | |
| } | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| if (/^[!#$%&*-~]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[!#$%&*-~]"); | |
| } | |
| } | |
| if (result1 === null) { | |
| result1 = parse_nonascii(); | |
| if (result1 === null) { | |
| result1 = parse_escape(); | |
| } | |
| } | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, chars) { return chars.join(""); })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_s() { | |
| var result0, result1; | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = []; | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| } else { | |
| result0 = null; | |
| } | |
| return result0; | |
| } | |
| function parse_w() { | |
| var result0; | |
| result0 = parse_s(); | |
| result0 = result0 !== null ? result0 : ""; | |
| return result0; | |
| } | |
| function parse_nl() { | |
| var result0; | |
| if (input.charCodeAt(pos) === 10) { | |
| result0 = "\n"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\n\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result0 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 13) { | |
| result0 = "\r"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 12) { | |
| result0 = "\f"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\f\""); | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_A() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[aA]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[aA]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "41") { | |
| result5 = "41"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"41\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "A"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "61") { | |
| result5 = "61"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"61\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "a"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_C() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[cC]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[cC]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "43") { | |
| result5 = "43"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"43\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "C"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "63") { | |
| result5 = "63"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"63\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "c"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_D() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[dD]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[dD]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "44") { | |
| result5 = "44"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"44\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "D"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "64") { | |
| result5 = "64"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"64\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "d"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_E() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[eE]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[eE]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "45") { | |
| result5 = "45"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"45\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "E"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "65") { | |
| result5 = "65"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"65\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "e"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_G() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[gG]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[gG]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "47") { | |
| result5 = "47"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"47\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "G"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "67") { | |
| result5 = "67"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"67\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "g"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[gG]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[gG]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_H() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[hH]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[hH]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "48") { | |
| result5 = "48"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"48\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "H"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "68") { | |
| result5 = "68"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"68\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "h"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[hH]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[hH]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_I() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[iI]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[iI]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "49") { | |
| result5 = "49"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"49\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "I"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "69") { | |
| result5 = "69"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"69\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "i"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[iI]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[iI]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_K() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7; | |
| var pos0, pos1; | |
| if (/^[kK]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[kK]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 52) { | |
| result5 = "4"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"4\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (/^[bB]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[bB]"); | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "K"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 54) { | |
| result5 = "6"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"6\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (/^[bB]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[bB]"); | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "k"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[kK]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[kK]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_L() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7; | |
| var pos0, pos1; | |
| if (/^[lL]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[lL]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 52) { | |
| result5 = "4"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"4\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (/^[cC]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[cC]"); | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "L"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 54) { | |
| result5 = "6"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"6\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (/^[cC]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[cC]"); | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "l"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[lL]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[lL]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_M() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7; | |
| var pos0, pos1; | |
| if (/^[mM]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[mM]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 52) { | |
| result5 = "4"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"4\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (/^[dD]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[dD]"); | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "M"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 54) { | |
| result5 = "6"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"6\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (/^[dD]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[dD]"); | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "m"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[mM]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[mM]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_N() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7; | |
| var pos0, pos1; | |
| if (/^[nN]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[nN]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 52) { | |
| result5 = "4"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"4\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (/^[eE]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[eE]"); | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "N"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 54) { | |
| result5 = "6"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"6\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (/^[eE]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[eE]"); | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "n"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[nN]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[nN]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_O() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7; | |
| var pos0, pos1; | |
| if (/^[oO]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[oO]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 52) { | |
| result5 = "4"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"4\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (/^[fF]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[fF]"); | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "O"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 54) { | |
| result5 = "6"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"6\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (/^[fF]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[fF]"); | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "o"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[oO]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[oO]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_P() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[pP]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[pP]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "50") { | |
| result5 = "50"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"50\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "P"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "70") { | |
| result5 = "70"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"70\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "p"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[pP]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[pP]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_R() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[rR]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[rR]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "52") { | |
| result5 = "52"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"52\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "R"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "72") { | |
| result5 = "72"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"72\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "r"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[rR]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[rR]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_S_() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[sS]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[sS]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "53") { | |
| result5 = "53"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"53\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "S"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "73") { | |
| result5 = "73"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"73\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "s"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[sS]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[sS]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_T() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[tT]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[tT]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "54") { | |
| result5 = "54"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"54\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "T"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "74") { | |
| result5 = "74"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"74\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "t"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[tT]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[tT]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_U() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[uU]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[uU]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "55") { | |
| result5 = "55"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"55\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "U"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "75") { | |
| result5 = "75"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"75\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "u"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[uU]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[uU]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_X() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0, pos1; | |
| if (/^[xX]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[xX]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "58") { | |
| result5 = "58"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"58\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "X"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.substr(pos, 2) === "78") { | |
| result5 = "78"; | |
| pos += 2; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"78\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result6 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result6 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result6 = result6 !== null ? result6 : ""; | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "x"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[xX]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[xX]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_Z() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7; | |
| var pos0, pos1; | |
| if (/^[zZ]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[zZ]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 53) { | |
| result5 = "5"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"5\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (/^[aA]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[aA]"); | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "Z"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result1 = "0"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result2 = "0"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result3 = "0"; | |
| pos++; | |
| } else { | |
| result3 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 48) { | |
| result4 = "0"; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| result4 = result4 !== null ? result4 : ""; | |
| if (result4 !== null) { | |
| if (input.charCodeAt(pos) === 55) { | |
| result5 = "7"; | |
| pos++; | |
| } else { | |
| result5 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"7\""); | |
| } | |
| } | |
| if (result5 !== null) { | |
| if (/^[aA]/.test(input.charAt(pos))) { | |
| result6 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result6 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[aA]"); | |
| } | |
| } | |
| if (result6 !== null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result7 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result7 === null) { | |
| if (/^[ \t\r\n\f]/.test(input.charAt(pos))) { | |
| result7 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result7 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[ \\t\\r\\n\\f]"); | |
| } | |
| } | |
| } | |
| result7 = result7 !== null ? result7 : ""; | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "z"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[zZ]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[zZ]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_S() { | |
| var result0, result1; | |
| var pos0; | |
| reportFailures++; | |
| pos0 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_s(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("whitespace"); | |
| } | |
| return result0; | |
| } | |
| function parse_CDO() { | |
| var result0, result1; | |
| var pos0; | |
| reportFailures++; | |
| pos0 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| if (input.substr(pos, 4) === "<!--") { | |
| result1 = "<!--"; | |
| pos += 4; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"<!--\""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("<!--"); | |
| } | |
| return result0; | |
| } | |
| function parse_CDC() { | |
| var result0, result1; | |
| var pos0; | |
| reportFailures++; | |
| pos0 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| if (input.substr(pos, 3) === "-->") { | |
| result1 = "-->"; | |
| pos += 3; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"-->\""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("-->"); | |
| } | |
| return result0; | |
| } | |
| function parse_INCLUDES() { | |
| var result0, result1; | |
| var pos0; | |
| reportFailures++; | |
| pos0 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| if (input.substr(pos, 2) === "~=") { | |
| result1 = "~="; | |
| pos += 2; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"~=\""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("~="); | |
| } | |
| return result0; | |
| } | |
| function parse_DASHMATCH() { | |
| var result0, result1; | |
| var pos0; | |
| reportFailures++; | |
| pos0 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| if (input.substr(pos, 2) === "|=") { | |
| result1 = "|="; | |
| pos += 2; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"|=\""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("|="); | |
| } | |
| return result0; | |
| } | |
| function parse_STRING() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_string(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, string) { return string; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("string"); | |
| } | |
| return result0; | |
| } | |
| function parse_IDENT() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_ident(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, ident) { return ident; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("identifier"); | |
| } | |
| return result0; | |
| } | |
| function parse_HASH() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 35) { | |
| result1 = "#"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"#\""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result2 = parse_name(); | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, name) { return "#" + name; })(pos0, result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("hash"); | |
| } | |
| return result0; | |
| } | |
| function parse_IMPORT_SYM() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7; | |
| var pos0; | |
| reportFailures++; | |
| pos0 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 64) { | |
| result1 = "@"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"@\""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result2 = parse_I(); | |
| if (result2 !== null) { | |
| result3 = parse_M(); | |
| if (result3 !== null) { | |
| result4 = parse_P(); | |
| if (result4 !== null) { | |
| result5 = parse_O(); | |
| if (result5 !== null) { | |
| result6 = parse_R(); | |
| if (result6 !== null) { | |
| result7 = parse_T(); | |
| if (result7 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("@import"); | |
| } | |
| return result0; | |
| } | |
| function parse_PAGE_SYM() { | |
| var result0, result1, result2, result3, result4, result5; | |
| var pos0; | |
| reportFailures++; | |
| pos0 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 64) { | |
| result1 = "@"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"@\""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result2 = parse_P(); | |
| if (result2 !== null) { | |
| result3 = parse_A(); | |
| if (result3 !== null) { | |
| result4 = parse_G(); | |
| if (result4 !== null) { | |
| result5 = parse_E(); | |
| if (result5 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("@page"); | |
| } | |
| return result0; | |
| } | |
| function parse_MEDIA_SYM() { | |
| var result0, result1, result2, result3, result4, result5, result6; | |
| var pos0; | |
| reportFailures++; | |
| pos0 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 64) { | |
| result1 = "@"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"@\""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result2 = parse_M(); | |
| if (result2 !== null) { | |
| result3 = parse_E(); | |
| if (result3 !== null) { | |
| result4 = parse_D(); | |
| if (result4 !== null) { | |
| result5 = parse_I(); | |
| if (result5 !== null) { | |
| result6 = parse_A(); | |
| if (result6 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("@media"); | |
| } | |
| return result0; | |
| } | |
| function parse_CHARSET_SYM() { | |
| var result0, result1; | |
| var pos0; | |
| reportFailures++; | |
| pos0 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| if (input.substr(pos, 9) === "@charset ") { | |
| result1 = "@charset "; | |
| pos += 9; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"@charset \""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("@charset"); | |
| } | |
| return result0; | |
| } | |
| function parse_IMPORTANT_SYM() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7, result8, result9, result10, result11; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 33) { | |
| result1 = "!"; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"!\""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result2 = []; | |
| result3 = parse_s(); | |
| if (result3 === null) { | |
| result3 = parse_comment(); | |
| } | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_s(); | |
| if (result3 === null) { | |
| result3 = parse_comment(); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_I(); | |
| if (result3 !== null) { | |
| result4 = parse_M(); | |
| if (result4 !== null) { | |
| result5 = parse_P(); | |
| if (result5 !== null) { | |
| result6 = parse_O(); | |
| if (result6 !== null) { | |
| result7 = parse_R(); | |
| if (result7 !== null) { | |
| result8 = parse_T(); | |
| if (result8 !== null) { | |
| result9 = parse_A(); | |
| if (result9 !== null) { | |
| result10 = parse_N(); | |
| if (result10 !== null) { | |
| result11 = parse_T(); | |
| if (result11 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7, result8, result9, result10, result11]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "!important"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("!important"); | |
| } | |
| return result0; | |
| } | |
| function parse_EMS() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_num(); | |
| if (result1 !== null) { | |
| result2 = parse_E(); | |
| if (result2 !== null) { | |
| result3 = parse_M(); | |
| if (result3 !== null) { | |
| result0 = [result0, result1, result2, result3]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, num, e, m) { return num + e + m; })(pos0, result0[1], result0[2], result0[3]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("length"); | |
| } | |
| return result0; | |
| } | |
| function parse_EXS() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_num(); | |
| if (result1 !== null) { | |
| result2 = parse_E(); | |
| if (result2 !== null) { | |
| result3 = parse_X(); | |
| if (result3 !== null) { | |
| result0 = [result0, result1, result2, result3]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, num, e, x) { return num + e + x; })(pos0, result0[1], result0[2], result0[3]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("length"); | |
| } | |
| return result0; | |
| } | |
| function parse_LENGTH() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1, pos2; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_num(); | |
| if (result1 !== null) { | |
| pos2 = pos; | |
| result2 = parse_P(); | |
| if (result2 !== null) { | |
| result3 = parse_X(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| pos2 = pos; | |
| result2 = parse_C(); | |
| if (result2 !== null) { | |
| result3 = parse_M(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| pos2 = pos; | |
| result2 = parse_M(); | |
| if (result2 !== null) { | |
| result3 = parse_M(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| pos2 = pos; | |
| result2 = parse_I(); | |
| if (result2 !== null) { | |
| result3 = parse_N(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| pos2 = pos; | |
| result2 = parse_P(); | |
| if (result2 !== null) { | |
| result3 = parse_T(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| pos2 = pos; | |
| result2 = parse_P(); | |
| if (result2 !== null) { | |
| result3 = parse_C(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, num, unit) { | |
| return num + unit.join(""); | |
| })(pos0, result0[1], result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("length"); | |
| } | |
| return result0; | |
| } | |
| function parse_ANGLE() { | |
| var result0, result1, result2, result3, result4, result5; | |
| var pos0, pos1, pos2; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_num(); | |
| if (result1 !== null) { | |
| pos2 = pos; | |
| result2 = parse_D(); | |
| if (result2 !== null) { | |
| result3 = parse_E(); | |
| if (result3 !== null) { | |
| result4 = parse_G(); | |
| if (result4 !== null) { | |
| result2 = [result2, result3, result4]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| pos2 = pos; | |
| result2 = parse_R(); | |
| if (result2 !== null) { | |
| result3 = parse_A(); | |
| if (result3 !== null) { | |
| result4 = parse_D(); | |
| if (result4 !== null) { | |
| result2 = [result2, result3, result4]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| pos2 = pos; | |
| result2 = parse_G(); | |
| if (result2 !== null) { | |
| result3 = parse_R(); | |
| if (result3 !== null) { | |
| result4 = parse_A(); | |
| if (result4 !== null) { | |
| result5 = parse_D(); | |
| if (result5 !== null) { | |
| result2 = [result2, result3, result4, result5]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, num, unit) { | |
| return num + unit.join(""); | |
| })(pos0, result0[1], result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("angle"); | |
| } | |
| return result0; | |
| } | |
| function parse_TIME() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1, pos2, pos3; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_num(); | |
| if (result1 !== null) { | |
| pos2 = pos; | |
| pos3 = pos; | |
| result2 = parse_M(); | |
| if (result2 !== null) { | |
| result3 = parse_S_(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos3; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos3; | |
| } | |
| if (result2 !== null) { | |
| result2 = (function(offset, m, s) { return m + s; })(pos2, result2[0], result2[1]); | |
| } | |
| if (result2 === null) { | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| result2 = parse_S_(); | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, num, unit) { | |
| return num + unit; | |
| })(pos0, result0[1], result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("time"); | |
| } | |
| return result0; | |
| } | |
| function parse_FREQ() { | |
| var result0, result1, result2, result3, result4; | |
| var pos0, pos1, pos2; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_num(); | |
| if (result1 !== null) { | |
| pos2 = pos; | |
| result2 = parse_H(); | |
| if (result2 !== null) { | |
| result3 = parse_Z(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 === null) { | |
| pos2 = pos; | |
| result2 = parse_K(); | |
| if (result2 !== null) { | |
| result3 = parse_H(); | |
| if (result3 !== null) { | |
| result4 = parse_Z(); | |
| if (result4 !== null) { | |
| result2 = [result2, result3, result4]; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, num, unit) { return num + unit.join(""); })(pos0, result0[1], result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("frequency"); | |
| } | |
| return result0; | |
| } | |
| function parse_DIMENSION() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_num(); | |
| if (result1 !== null) { | |
| result2 = parse_ident(); | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, num, unit) { return num + unit; })(pos0, result0[1], result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("dimension"); | |
| } | |
| return result0; | |
| } | |
| function parse_PERCENTAGE() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_num(); | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 37) { | |
| result2 = "%"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"%\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, num) { return num + "%"; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("percentage"); | |
| } | |
| return result0; | |
| } | |
| function parse_NUMBER() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_num(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, num) { return num; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("number"); | |
| } | |
| return result0; | |
| } | |
| function parse_URI() { | |
| var result0, result1, result2, result3, result4, result5, result6, result7, result8; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_U(); | |
| if (result1 !== null) { | |
| result2 = parse_R(); | |
| if (result2 !== null) { | |
| result3 = parse_L(); | |
| if (result3 !== null) { | |
| if (input.charCodeAt(pos) === 40) { | |
| result4 = "("; | |
| pos++; | |
| } else { | |
| result4 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"(\""); | |
| } | |
| } | |
| if (result4 !== null) { | |
| result5 = parse_w(); | |
| if (result5 !== null) { | |
| result6 = parse_string(); | |
| if (result6 === null) { | |
| result6 = parse_url(); | |
| } | |
| if (result6 !== null) { | |
| result7 = parse_w(); | |
| if (result7 !== null) { | |
| if (input.charCodeAt(pos) === 41) { | |
| result8 = ")"; | |
| pos++; | |
| } else { | |
| result8 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\")\""); | |
| } | |
| } | |
| if (result8 !== null) { | |
| result0 = [result0, result1, result2, result3, result4, result5, result6, result7, result8]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, value) { return value; })(pos0, result0[6]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("uri"); | |
| } | |
| return result0; | |
| } | |
| function parse_FUNCTION() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = []; | |
| result1 = parse_comment(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_comment(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_ident(); | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 40) { | |
| result2 = "("; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"(\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, name) { return name; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("function"); | |
| } | |
| return result0; | |
| } | |
| function cleanupExpected(expected) { | |
| expected.sort(); | |
| var lastExpected = null; | |
| var cleanExpected = []; | |
| for (var i = 0; i < expected.length; i++) { | |
| if (expected[i] !== lastExpected) { | |
| cleanExpected.push(expected[i]); | |
| lastExpected = expected[i]; | |
| } | |
| } | |
| return cleanExpected; | |
| } | |
| function computeErrorPosition() { | |
| /* | |
| * The first idea was to use |String.split| to break the input up to the | |
| * error position along newlines and derive the line and column from | |
| * there. However IE's |split| implementation is so broken that it was | |
| * enough to prevent it. | |
| */ | |
| var line = 1; | |
| var column = 1; | |
| var seenCR = false; | |
| for (var i = 0; i < Math.max(pos, rightmostFailuresPos); i++) { | |
| var ch = input.charAt(i); | |
| if (ch === "\n") { | |
| if (!seenCR) { line++; } | |
| column = 1; | |
| seenCR = false; | |
| } else if (ch === "\r" || ch === "\u2028" || ch === "\u2029") { | |
| line++; | |
| column = 1; | |
| seenCR = true; | |
| } else { | |
| column++; | |
| seenCR = false; | |
| } | |
| } | |
| return { line: line, column: column }; | |
| } | |
| var result = parseFunctions[startRule](); | |
| /* | |
| * The parser is now in one of the following three states: | |
| * | |
| * 1. The parser successfully parsed the whole input. | |
| * | |
| * - |result !== null| | |
| * - |pos === input.length| | |
| * - |rightmostFailuresExpected| may or may not contain something | |
| * | |
| * 2. The parser successfully parsed only a part of the input. | |
| * | |
| * - |result !== null| | |
| * - |pos < input.length| | |
| * - |rightmostFailuresExpected| may or may not contain something | |
| * | |
| * 3. The parser did not successfully parse any part of the input. | |
| * | |
| * - |result === null| | |
| * - |pos === 0| | |
| * - |rightmostFailuresExpected| contains at least one failure | |
| * | |
| * All code following this comment (including called functions) must | |
| * handle these states. | |
| */ | |
| if (result === null || pos !== input.length) { | |
| var offset = Math.max(pos, rightmostFailuresPos); | |
| var found = offset < input.length ? input.charAt(offset) : null; | |
| var errorPosition = computeErrorPosition(); | |
| throw new this.SyntaxError( | |
| cleanupExpected(rightmostFailuresExpected), | |
| found, | |
| offset, | |
| errorPosition.line, | |
| errorPosition.column | |
| ); | |
| } | |
| return result; | |
| }, | |
| /* Returns the parser source code. */ | |
| toSource: function() { return this._source; } | |
| }; | |
| /* Thrown when a parser encounters a syntax error. */ | |
| result.SyntaxError = function(expected, found, offset, line, column) { | |
| function buildMessage(expected, found) { | |
| var expectedHumanized, foundHumanized; | |
| switch (expected.length) { | |
| case 0: | |
| expectedHumanized = "end of input"; | |
| break; | |
| case 1: | |
| expectedHumanized = expected[0]; | |
| break; | |
| default: | |
| expectedHumanized = expected.slice(0, expected.length - 1).join(", ") | |
| + " or " | |
| + expected[expected.length - 1]; | |
| } | |
| foundHumanized = found ? quote(found) : "end of input"; | |
| return "Expected " + expectedHumanized + " but " + foundHumanized + " found."; | |
| } | |
| this.name = "SyntaxError"; | |
| this.expected = expected; | |
| this.found = found; | |
| this.message = buildMessage(expected, found); | |
| this.offset = offset; | |
| this.line = line; | |
| this.column = column; | |
| }; | |
| result.SyntaxError.prototype = Error.prototype; | |
| return result; | |
| })(); |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = (function(){ | |
| /* | |
| * Generated by PEG.js 0.7.0. | |
| * | |
| * http://pegjs.majda.cz/ | |
| */ | |
| function quote(s) { | |
| /* | |
| * ECMA-262, 5th ed., 7.8.4: All characters may appear literally in a | |
| * string literal except for the closing quote character, backslash, | |
| * carriage return, line separator, paragraph separator, and line feed. | |
| * Any character may appear in the form of an escape sequence. | |
| * | |
| * For portability, we also escape escape all control and non-ASCII | |
| * characters. Note that "\0" and "\v" escape sequences are not used | |
| * because JSHint does not like the first and IE the second. | |
| */ | |
| return '"' + s | |
| .replace(/\\/g, '\\\\') // backslash | |
| .replace(/"/g, '\\"') // closing quote character | |
| .replace(/\x08/g, '\\b') // backspace | |
| .replace(/\t/g, '\\t') // horizontal tab | |
| .replace(/\n/g, '\\n') // line feed | |
| .replace(/\f/g, '\\f') // form feed | |
| .replace(/\r/g, '\\r') // carriage return | |
| .replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g, escape) | |
| + '"'; | |
| } | |
| var result = { | |
| /* | |
| * Parses the input with a generated parser. If the parsing is successfull, | |
| * returns a value explicitly or implicitly specified by the grammar from | |
| * which the parser was generated (see |PEG.buildParser|). If the parsing is | |
| * unsuccessful, throws |PEG.parser.SyntaxError| describing the error. | |
| */ | |
| parse: function(input, startRule) { | |
| var parseFunctions = { | |
| "start": parse_start, | |
| "SourceCharacter": parse_SourceCharacter, | |
| "WhiteSpace": parse_WhiteSpace, | |
| "LineTerminator": parse_LineTerminator, | |
| "LineTerminatorSequence": parse_LineTerminatorSequence, | |
| "Comment": parse_Comment, | |
| "MultiLineComment": parse_MultiLineComment, | |
| "MultiLineCommentNoLineTerminator": parse_MultiLineCommentNoLineTerminator, | |
| "SingleLineComment": parse_SingleLineComment, | |
| "Identifier": parse_Identifier, | |
| "IdentifierName": parse_IdentifierName, | |
| "IdentifierStart": parse_IdentifierStart, | |
| "IdentifierPart": parse_IdentifierPart, | |
| "UnicodeLetter": parse_UnicodeLetter, | |
| "UnicodeCombiningMark": parse_UnicodeCombiningMark, | |
| "ReservedWord": parse_ReservedWord, | |
| "Keyword": parse_Keyword, | |
| "FutureReservedWord": parse_FutureReservedWord, | |
| "Literal": parse_Literal, | |
| "NullLiteral": parse_NullLiteral, | |
| "BooleanLiteral": parse_BooleanLiteral, | |
| "NumericLiteral": parse_NumericLiteral, | |
| "DecimalLiteral": parse_DecimalLiteral, | |
| "DecimalIntegerLiteral": parse_DecimalIntegerLiteral, | |
| "DecimalDigits": parse_DecimalDigits, | |
| "DecimalDigit": parse_DecimalDigit, | |
| "NonZeroDigit": parse_NonZeroDigit, | |
| "ExponentPart": parse_ExponentPart, | |
| "ExponentIndicator": parse_ExponentIndicator, | |
| "SignedInteger": parse_SignedInteger, | |
| "HexIntegerLiteral": parse_HexIntegerLiteral, | |
| "HexDigit": parse_HexDigit, | |
| "StringLiteral": parse_StringLiteral, | |
| "DoubleStringCharacters": parse_DoubleStringCharacters, | |
| "SingleStringCharacters": parse_SingleStringCharacters, | |
| "DoubleStringCharacter": parse_DoubleStringCharacter, | |
| "SingleStringCharacter": parse_SingleStringCharacter, | |
| "LineContinuation": parse_LineContinuation, | |
| "EscapeSequence": parse_EscapeSequence, | |
| "CharacterEscapeSequence": parse_CharacterEscapeSequence, | |
| "SingleEscapeCharacter": parse_SingleEscapeCharacter, | |
| "NonEscapeCharacter": parse_NonEscapeCharacter, | |
| "EscapeCharacter": parse_EscapeCharacter, | |
| "HexEscapeSequence": parse_HexEscapeSequence, | |
| "UnicodeEscapeSequence": parse_UnicodeEscapeSequence, | |
| "RegularExpressionLiteral": parse_RegularExpressionLiteral, | |
| "RegularExpressionBody": parse_RegularExpressionBody, | |
| "RegularExpressionChars": parse_RegularExpressionChars, | |
| "RegularExpressionFirstChar": parse_RegularExpressionFirstChar, | |
| "RegularExpressionChar": parse_RegularExpressionChar, | |
| "RegularExpressionBackslashSequence": parse_RegularExpressionBackslashSequence, | |
| "RegularExpressionNonTerminator": parse_RegularExpressionNonTerminator, | |
| "RegularExpressionClass": parse_RegularExpressionClass, | |
| "RegularExpressionClassChars": parse_RegularExpressionClassChars, | |
| "RegularExpressionClassChar": parse_RegularExpressionClassChar, | |
| "RegularExpressionFlags": parse_RegularExpressionFlags, | |
| "BreakToken": parse_BreakToken, | |
| "CaseToken": parse_CaseToken, | |
| "CatchToken": parse_CatchToken, | |
| "ContinueToken": parse_ContinueToken, | |
| "DebuggerToken": parse_DebuggerToken, | |
| "DefaultToken": parse_DefaultToken, | |
| "DeleteToken": parse_DeleteToken, | |
| "DoToken": parse_DoToken, | |
| "ElseToken": parse_ElseToken, | |
| "FalseToken": parse_FalseToken, | |
| "FinallyToken": parse_FinallyToken, | |
| "ForToken": parse_ForToken, | |
| "FunctionToken": parse_FunctionToken, | |
| "GetToken": parse_GetToken, | |
| "IfToken": parse_IfToken, | |
| "InstanceofToken": parse_InstanceofToken, | |
| "InToken": parse_InToken, | |
| "NewToken": parse_NewToken, | |
| "NullToken": parse_NullToken, | |
| "ReturnToken": parse_ReturnToken, | |
| "SetToken": parse_SetToken, | |
| "SwitchToken": parse_SwitchToken, | |
| "ThisToken": parse_ThisToken, | |
| "ThrowToken": parse_ThrowToken, | |
| "TrueToken": parse_TrueToken, | |
| "TryToken": parse_TryToken, | |
| "TypeofToken": parse_TypeofToken, | |
| "VarToken": parse_VarToken, | |
| "VoidToken": parse_VoidToken, | |
| "WhileToken": parse_WhileToken, | |
| "WithToken": parse_WithToken, | |
| "Ll": parse_Ll, | |
| "Lm": parse_Lm, | |
| "Lo": parse_Lo, | |
| "Lt": parse_Lt, | |
| "Lu": parse_Lu, | |
| "Mc": parse_Mc, | |
| "Mn": parse_Mn, | |
| "Nd": parse_Nd, | |
| "Nl": parse_Nl, | |
| "Pc": parse_Pc, | |
| "Zs": parse_Zs, | |
| "EOS": parse_EOS, | |
| "EOSNoLineTerminator": parse_EOSNoLineTerminator, | |
| "EOF": parse_EOF, | |
| "_": parse__, | |
| "__": parse___, | |
| "PrimaryExpression": parse_PrimaryExpression, | |
| "ArrayLiteral": parse_ArrayLiteral, | |
| "ElementList": parse_ElementList, | |
| "Elision": parse_Elision, | |
| "ObjectLiteral": parse_ObjectLiteral, | |
| "PropertyNameAndValueList": parse_PropertyNameAndValueList, | |
| "PropertyAssignment": parse_PropertyAssignment, | |
| "PropertyName": parse_PropertyName, | |
| "MemberExpression": parse_MemberExpression, | |
| "NewExpression": parse_NewExpression, | |
| "CallExpression": parse_CallExpression, | |
| "Arguments": parse_Arguments, | |
| "ArgumentList": parse_ArgumentList, | |
| "LeftHandSideExpression": parse_LeftHandSideExpression, | |
| "PostfixExpression": parse_PostfixExpression, | |
| "PostfixOperator": parse_PostfixOperator, | |
| "UnaryExpression": parse_UnaryExpression, | |
| "UnaryOperator": parse_UnaryOperator, | |
| "MultiplicativeExpression": parse_MultiplicativeExpression, | |
| "MultiplicativeOperator": parse_MultiplicativeOperator, | |
| "AdditiveExpression": parse_AdditiveExpression, | |
| "AdditiveOperator": parse_AdditiveOperator, | |
| "ShiftExpression": parse_ShiftExpression, | |
| "ShiftOperator": parse_ShiftOperator, | |
| "RelationalExpression": parse_RelationalExpression, | |
| "RelationalOperator": parse_RelationalOperator, | |
| "RelationalExpressionNoIn": parse_RelationalExpressionNoIn, | |
| "RelationalOperatorNoIn": parse_RelationalOperatorNoIn, | |
| "EqualityExpression": parse_EqualityExpression, | |
| "EqualityExpressionNoIn": parse_EqualityExpressionNoIn, | |
| "EqualityOperator": parse_EqualityOperator, | |
| "BitwiseANDExpression": parse_BitwiseANDExpression, | |
| "BitwiseANDExpressionNoIn": parse_BitwiseANDExpressionNoIn, | |
| "BitwiseANDOperator": parse_BitwiseANDOperator, | |
| "BitwiseXORExpression": parse_BitwiseXORExpression, | |
| "BitwiseXORExpressionNoIn": parse_BitwiseXORExpressionNoIn, | |
| "BitwiseXOROperator": parse_BitwiseXOROperator, | |
| "BitwiseORExpression": parse_BitwiseORExpression, | |
| "BitwiseORExpressionNoIn": parse_BitwiseORExpressionNoIn, | |
| "BitwiseOROperator": parse_BitwiseOROperator, | |
| "LogicalANDExpression": parse_LogicalANDExpression, | |
| "LogicalANDExpressionNoIn": parse_LogicalANDExpressionNoIn, | |
| "LogicalANDOperator": parse_LogicalANDOperator, | |
| "LogicalORExpression": parse_LogicalORExpression, | |
| "LogicalORExpressionNoIn": parse_LogicalORExpressionNoIn, | |
| "LogicalOROperator": parse_LogicalOROperator, | |
| "ConditionalExpression": parse_ConditionalExpression, | |
| "ConditionalExpressionNoIn": parse_ConditionalExpressionNoIn, | |
| "AssignmentExpression": parse_AssignmentExpression, | |
| "AssignmentExpressionNoIn": parse_AssignmentExpressionNoIn, | |
| "AssignmentOperator": parse_AssignmentOperator, | |
| "Expression": parse_Expression, | |
| "ExpressionNoIn": parse_ExpressionNoIn, | |
| "Statement": parse_Statement, | |
| "Block": parse_Block, | |
| "StatementList": parse_StatementList, | |
| "VariableStatement": parse_VariableStatement, | |
| "VariableDeclarationList": parse_VariableDeclarationList, | |
| "VariableDeclarationListNoIn": parse_VariableDeclarationListNoIn, | |
| "VariableDeclaration": parse_VariableDeclaration, | |
| "VariableDeclarationNoIn": parse_VariableDeclarationNoIn, | |
| "Initialiser": parse_Initialiser, | |
| "InitialiserNoIn": parse_InitialiserNoIn, | |
| "EmptyStatement": parse_EmptyStatement, | |
| "ExpressionStatement": parse_ExpressionStatement, | |
| "IfStatement": parse_IfStatement, | |
| "IterationStatement": parse_IterationStatement, | |
| "DoWhileStatement": parse_DoWhileStatement, | |
| "WhileStatement": parse_WhileStatement, | |
| "ForStatement": parse_ForStatement, | |
| "ForInStatement": parse_ForInStatement, | |
| "ContinueStatement": parse_ContinueStatement, | |
| "BreakStatement": parse_BreakStatement, | |
| "ReturnStatement": parse_ReturnStatement, | |
| "WithStatement": parse_WithStatement, | |
| "SwitchStatement": parse_SwitchStatement, | |
| "CaseBlock": parse_CaseBlock, | |
| "CaseClauses": parse_CaseClauses, | |
| "CaseClause": parse_CaseClause, | |
| "DefaultClause": parse_DefaultClause, | |
| "LabelledStatement": parse_LabelledStatement, | |
| "ThrowStatement": parse_ThrowStatement, | |
| "TryStatement": parse_TryStatement, | |
| "Catch": parse_Catch, | |
| "Finally": parse_Finally, | |
| "DebuggerStatement": parse_DebuggerStatement, | |
| "FunctionDeclaration": parse_FunctionDeclaration, | |
| "FunctionExpression": parse_FunctionExpression, | |
| "FormalParameterList": parse_FormalParameterList, | |
| "FunctionBody": parse_FunctionBody, | |
| "Program": parse_Program, | |
| "SourceElements": parse_SourceElements | |
| }; | |
| if (startRule !== undefined) { | |
| if (parseFunctions[startRule] === undefined) { | |
| throw new Error("Invalid rule name: " + quote(startRule) + "."); | |
| } | |
| } else { | |
| startRule = "start"; | |
| } | |
| var pos = 0; | |
| var reportFailures = 0; | |
| var rightmostFailuresPos = 0; | |
| var rightmostFailuresExpected = []; | |
| function padLeft(input, padding, length) { | |
| var result = input; | |
| var padLength = length - input.length; | |
| for (var i = 0; i < padLength; i++) { | |
| result = padding + result; | |
| } | |
| return result; | |
| } | |
| function escape(ch) { | |
| var charCode = ch.charCodeAt(0); | |
| var escapeChar; | |
| var length; | |
| if (charCode <= 0xFF) { | |
| escapeChar = 'x'; | |
| length = 2; | |
| } else { | |
| escapeChar = 'u'; | |
| length = 4; | |
| } | |
| return '\\' + escapeChar + padLeft(charCode.toString(16).toUpperCase(), '0', length); | |
| } | |
| function matchFailed(failure) { | |
| if (pos < rightmostFailuresPos) { | |
| return; | |
| } | |
| if (pos > rightmostFailuresPos) { | |
| rightmostFailuresPos = pos; | |
| rightmostFailuresExpected = []; | |
| } | |
| rightmostFailuresExpected.push(failure); | |
| } | |
| function parse_start() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse___(); | |
| if (result0 !== null) { | |
| result1 = parse_Program(); | |
| if (result1 !== null) { | |
| result2 = parse___(); | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, program) { return program; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_SourceCharacter() { | |
| var result0; | |
| if (input.length > pos) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("any character"); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_WhiteSpace() { | |
| var result0; | |
| reportFailures++; | |
| if (/^[\t\x0B\f \xA0\uFEFF]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[\\t\\x0B\\f \\xA0\\uFEFF]"); | |
| } | |
| } | |
| if (result0 === null) { | |
| result0 = parse_Zs(); | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("whitespace"); | |
| } | |
| return result0; | |
| } | |
| function parse_LineTerminator() { | |
| var result0; | |
| if (/^[\n\r\u2028\u2029]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[\\n\\r\\u2028\\u2029]"); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_LineTerminatorSequence() { | |
| var result0; | |
| reportFailures++; | |
| if (input.charCodeAt(pos) === 10) { | |
| result0 = "\n"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\n\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 2) === "\r\n") { | |
| result0 = "\r\n"; | |
| pos += 2; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\\n\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 13) { | |
| result0 = "\r"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\r\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 8232) { | |
| result0 = "\u2028"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\u2028\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 8233) { | |
| result0 = "\u2029"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\u2029\""); | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("end of line"); | |
| } | |
| return result0; | |
| } | |
| function parse_Comment() { | |
| var result0; | |
| reportFailures++; | |
| result0 = parse_MultiLineComment(); | |
| if (result0 === null) { | |
| result0 = parse_SingleLineComment(); | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("comment"); | |
| } | |
| return result0; | |
| } | |
| function parse_MultiLineComment() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| if (input.substr(pos, 2) === "/*") { | |
| result0 = "/*"; | |
| pos += 2; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"/*\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = []; | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| if (input.substr(pos, 2) === "*/") { | |
| result2 = "*/"; | |
| pos += 2; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*/\""); | |
| } | |
| } | |
| reportFailures--; | |
| if (result2 === null) { | |
| result2 = ""; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_SourceCharacter(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos1; | |
| } | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| if (input.substr(pos, 2) === "*/") { | |
| result2 = "*/"; | |
| pos += 2; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*/\""); | |
| } | |
| } | |
| reportFailures--; | |
| if (result2 === null) { | |
| result2 = ""; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_SourceCharacter(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos1; | |
| } | |
| } | |
| if (result1 !== null) { | |
| if (input.substr(pos, 2) === "*/") { | |
| result2 = "*/"; | |
| pos += 2; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*/\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_MultiLineCommentNoLineTerminator() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| if (input.substr(pos, 2) === "/*") { | |
| result0 = "/*"; | |
| pos += 2; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"/*\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = []; | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| if (input.substr(pos, 2) === "*/") { | |
| result2 = "*/"; | |
| pos += 2; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*/\""); | |
| } | |
| } | |
| if (result2 === null) { | |
| result2 = parse_LineTerminator(); | |
| } | |
| reportFailures--; | |
| if (result2 === null) { | |
| result2 = ""; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_SourceCharacter(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos1; | |
| } | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| if (input.substr(pos, 2) === "*/") { | |
| result2 = "*/"; | |
| pos += 2; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*/\""); | |
| } | |
| } | |
| if (result2 === null) { | |
| result2 = parse_LineTerminator(); | |
| } | |
| reportFailures--; | |
| if (result2 === null) { | |
| result2 = ""; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_SourceCharacter(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos1; | |
| } | |
| } | |
| if (result1 !== null) { | |
| if (input.substr(pos, 2) === "*/") { | |
| result2 = "*/"; | |
| pos += 2; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"*/\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_SingleLineComment() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| if (input.substr(pos, 2) === "//") { | |
| result0 = "//"; | |
| pos += 2; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"//\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = []; | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| result2 = parse_LineTerminator(); | |
| reportFailures--; | |
| if (result2 === null) { | |
| result2 = ""; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_SourceCharacter(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos1; | |
| } | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| result2 = parse_LineTerminator(); | |
| reportFailures--; | |
| if (result2 === null) { | |
| result2 = ""; | |
| } else { | |
| result2 = null; | |
| pos = pos2; | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_SourceCharacter(); | |
| if (result3 !== null) { | |
| result2 = [result2, result3]; | |
| } else { | |
| result2 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result2 = null; | |
| pos = pos1; | |
| } | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_Identifier() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| result0 = parse_ReservedWord(); | |
| reportFailures--; | |
| if (result0 === null) { | |
| result0 = ""; | |
| } else { | |
| result0 = null; | |
| pos = pos2; | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_IdentifierName(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, name) { return name; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("identifier"); | |
| } | |
| return result0; | |
| } | |
| function parse_IdentifierName() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_IdentifierStart(); | |
| if (result0 !== null) { | |
| result1 = []; | |
| result2 = parse_IdentifierPart(); | |
| while (result2 !== null) { | |
| result1.push(result2); | |
| result2 = parse_IdentifierPart(); | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, start, parts) { | |
| return start + parts.join(""); | |
| })(pos0, result0[0], result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("identifier"); | |
| } | |
| return result0; | |
| } | |
| function parse_IdentifierStart() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| result0 = parse_UnicodeLetter(); | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 36) { | |
| result0 = "$"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"$\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 95) { | |
| result0 = "_"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"_\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_UnicodeEscapeSequence(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, sequence) { return sequence; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_IdentifierPart() { | |
| var result0; | |
| var pos0; | |
| result0 = parse_IdentifierStart(); | |
| if (result0 === null) { | |
| result0 = parse_UnicodeCombiningMark(); | |
| if (result0 === null) { | |
| result0 = parse_Nd(); | |
| if (result0 === null) { | |
| result0 = parse_Pc(); | |
| if (result0 === null) { | |
| pos0 = pos; | |
| if (input.charCodeAt(pos) === 8204) { | |
| result0 = "\u200C"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\u200C\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "\u200C"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| if (input.charCodeAt(pos) === 8205) { | |
| result0 = "\u200D"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\u200D\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "\u200D"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_UnicodeLetter() { | |
| var result0; | |
| result0 = parse_Lu(); | |
| if (result0 === null) { | |
| result0 = parse_Ll(); | |
| if (result0 === null) { | |
| result0 = parse_Lt(); | |
| if (result0 === null) { | |
| result0 = parse_Lm(); | |
| if (result0 === null) { | |
| result0 = parse_Lo(); | |
| if (result0 === null) { | |
| result0 = parse_Nl(); | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_UnicodeCombiningMark() { | |
| var result0; | |
| result0 = parse_Mn(); | |
| if (result0 === null) { | |
| result0 = parse_Mc(); | |
| } | |
| return result0; | |
| } | |
| function parse_ReservedWord() { | |
| var result0; | |
| result0 = parse_Keyword(); | |
| if (result0 === null) { | |
| result0 = parse_FutureReservedWord(); | |
| if (result0 === null) { | |
| result0 = parse_NullLiteral(); | |
| if (result0 === null) { | |
| result0 = parse_BooleanLiteral(); | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_Keyword() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 5) === "break") { | |
| result0 = "break"; | |
| pos += 5; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"break\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 4) === "case") { | |
| result0 = "case"; | |
| pos += 4; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"case\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 5) === "catch") { | |
| result0 = "catch"; | |
| pos += 5; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"catch\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 8) === "continue") { | |
| result0 = "continue"; | |
| pos += 8; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"continue\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 8) === "debugger") { | |
| result0 = "debugger"; | |
| pos += 8; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"debugger\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 7) === "default") { | |
| result0 = "default"; | |
| pos += 7; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"default\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 6) === "delete") { | |
| result0 = "delete"; | |
| pos += 6; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"delete\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 2) === "do") { | |
| result0 = "do"; | |
| pos += 2; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"do\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 4) === "else") { | |
| result0 = "else"; | |
| pos += 4; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"else\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 7) === "finally") { | |
| result0 = "finally"; | |
| pos += 7; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"finally\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 3) === "for") { | |
| result0 = "for"; | |
| pos += 3; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"for\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 8) === "function") { | |
| result0 = "function"; | |
| pos += 8; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"function\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 2) === "if") { | |
| result0 = "if"; | |
| pos += 2; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"if\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 10) === "instanceof") { | |
| result0 = "instanceof"; | |
| pos += 10; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"instanceof\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 2) === "in") { | |
| result0 = "in"; | |
| pos += 2; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"in\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 3) === "new") { | |
| result0 = "new"; | |
| pos += 3; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"new\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 6) === "return") { | |
| result0 = "return"; | |
| pos += 6; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"return\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 6) === "switch") { | |
| result0 = "switch"; | |
| pos += 6; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"switch\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 4) === "this") { | |
| result0 = "this"; | |
| pos += 4; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"this\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 5) === "throw") { | |
| result0 = "throw"; | |
| pos += 5; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"throw\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 3) === "try") { | |
| result0 = "try"; | |
| pos += 3; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"try\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 6) === "typeof") { | |
| result0 = "typeof"; | |
| pos += 6; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"typeof\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 3) === "var") { | |
| result0 = "var"; | |
| pos += 3; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"var\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 4) === "void") { | |
| result0 = "void"; | |
| pos += 4; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"void\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 5) === "while") { | |
| result0 = "while"; | |
| pos += 5; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"while\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 4) === "with") { | |
| result0 = "with"; | |
| pos += 4; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"with\""); | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_FutureReservedWord() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 5) === "class") { | |
| result0 = "class"; | |
| pos += 5; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"class\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 5) === "const") { | |
| result0 = "const"; | |
| pos += 5; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"const\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 4) === "enum") { | |
| result0 = "enum"; | |
| pos += 4; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"enum\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 6) === "export") { | |
| result0 = "export"; | |
| pos += 6; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"export\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 7) === "extends") { | |
| result0 = "extends"; | |
| pos += 7; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"extends\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 6) === "import") { | |
| result0 = "import"; | |
| pos += 6; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"import\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.substr(pos, 5) === "super") { | |
| result0 = "super"; | |
| pos += 5; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"super\""); | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_Literal() { | |
| var result0; | |
| var pos0; | |
| result0 = parse_NullLiteral(); | |
| if (result0 === null) { | |
| result0 = parse_BooleanLiteral(); | |
| if (result0 === null) { | |
| pos0 = pos; | |
| result0 = parse_NumericLiteral(); | |
| if (result0 !== null) { | |
| result0 = (function(offset, value) { | |
| return { | |
| type: "NumericLiteral", | |
| value: value | |
| }; | |
| })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| result0 = parse_StringLiteral(); | |
| if (result0 !== null) { | |
| result0 = (function(offset, value) { | |
| return { | |
| type: "StringLiteral", | |
| value: value | |
| }; | |
| })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| result0 = parse_RegularExpressionLiteral(); | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_NullLiteral() { | |
| var result0; | |
| var pos0; | |
| pos0 = pos; | |
| result0 = parse_NullToken(); | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return { type: "NullLiteral" }; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_BooleanLiteral() { | |
| var result0; | |
| var pos0; | |
| pos0 = pos; | |
| result0 = parse_TrueToken(); | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return { type: "BooleanLiteral", value: true }; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| result0 = parse_FalseToken(); | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return { type: "BooleanLiteral", value: false }; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_NumericLiteral() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_HexIntegerLiteral(); | |
| if (result0 === null) { | |
| result0 = parse_DecimalLiteral(); | |
| } | |
| if (result0 !== null) { | |
| pos2 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierStart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, literal) { | |
| return literal; | |
| })(pos0, result0[0]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("number"); | |
| } | |
| return result0; | |
| } | |
| function parse_DecimalLiteral() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_DecimalIntegerLiteral(); | |
| if (result0 !== null) { | |
| if (input.charCodeAt(pos) === 46) { | |
| result1 = "."; | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\".\""); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result2 = parse_DecimalDigits(); | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| result3 = parse_ExponentPart(); | |
| result3 = result3 !== null ? result3 : ""; | |
| if (result3 !== null) { | |
| result0 = [result0, result1, result2, result3]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, before, after, exponent) { | |
| return parseFloat(before + "." + after + exponent); | |
| })(pos0, result0[0], result0[2], result0[3]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 46) { | |
| result0 = "."; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\".\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_DecimalDigits(); | |
| if (result1 !== null) { | |
| result2 = parse_ExponentPart(); | |
| result2 = result2 !== null ? result2 : ""; | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, after, exponent) { | |
| return parseFloat("." + after + exponent); | |
| })(pos0, result0[1], result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_DecimalIntegerLiteral(); | |
| if (result0 !== null) { | |
| result1 = parse_ExponentPart(); | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, before, exponent) { | |
| return parseFloat(before + exponent); | |
| })(pos0, result0[0], result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_DecimalIntegerLiteral() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| if (input.charCodeAt(pos) === 48) { | |
| result0 = "0"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_NonZeroDigit(); | |
| if (result0 !== null) { | |
| result1 = parse_DecimalDigits(); | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, digit, digits) { return digit + digits; })(pos0, result0[0], result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_DecimalDigits() { | |
| var result0, result1; | |
| var pos0; | |
| pos0 = pos; | |
| result1 = parse_DecimalDigit(); | |
| if (result1 !== null) { | |
| result0 = []; | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_DecimalDigit(); | |
| } | |
| } else { | |
| result0 = null; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, digits) { return digits.join(""); })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_DecimalDigit() { | |
| var result0; | |
| if (/^[0-9]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[0-9]"); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_NonZeroDigit() { | |
| var result0; | |
| if (/^[1-9]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[1-9]"); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_ExponentPart() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_ExponentIndicator(); | |
| if (result0 !== null) { | |
| result1 = parse_SignedInteger(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, indicator, integer) { | |
| return indicator + integer; | |
| })(pos0, result0[0], result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_ExponentIndicator() { | |
| var result0; | |
| if (/^[eE]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[eE]"); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_SignedInteger() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (/^[\-+]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[\\-+]"); | |
| } | |
| } | |
| result0 = result0 !== null ? result0 : ""; | |
| if (result0 !== null) { | |
| result1 = parse_DecimalDigits(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, sign, digits) { return sign + digits; })(pos0, result0[0], result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_HexIntegerLiteral() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 48) { | |
| result0 = "0"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| if (/^[xX]/.test(input.charAt(pos))) { | |
| result1 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result1 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[xX]"); | |
| } | |
| } | |
| if (result1 !== null) { | |
| result3 = parse_HexDigit(); | |
| if (result3 !== null) { | |
| result2 = []; | |
| while (result3 !== null) { | |
| result2.push(result3); | |
| result3 = parse_HexDigit(); | |
| } | |
| } else { | |
| result2 = null; | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, digits) { return parseInt("0x" + digits.join("")); })(pos0, result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_HexDigit() { | |
| var result0; | |
| if (/^[0-9a-fA-F]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[0-9a-fA-F]"); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_StringLiteral() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 34) { | |
| result0 = "\""; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\"\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_DoubleStringCharacters(); | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 34) { | |
| result2 = "\""; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\"\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 === null) { | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 39) { | |
| result0 = "'"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"'\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_SingleStringCharacters(); | |
| result1 = result1 !== null ? result1 : ""; | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 39) { | |
| result2 = "'"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"'\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, parts) { | |
| return parts[1]; | |
| })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("string"); | |
| } | |
| return result0; | |
| } | |
| function parse_DoubleStringCharacters() { | |
| var result0, result1; | |
| var pos0; | |
| pos0 = pos; | |
| result1 = parse_DoubleStringCharacter(); | |
| if (result1 !== null) { | |
| result0 = []; | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_DoubleStringCharacter(); | |
| } | |
| } else { | |
| result0 = null; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, chars) { return chars.join(""); })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_SingleStringCharacters() { | |
| var result0, result1; | |
| var pos0; | |
| pos0 = pos; | |
| result1 = parse_SingleStringCharacter(); | |
| if (result1 !== null) { | |
| result0 = []; | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_SingleStringCharacter(); | |
| } | |
| } else { | |
| result0 = null; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, chars) { return chars.join(""); })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_DoubleStringCharacter() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| if (input.charCodeAt(pos) === 34) { | |
| result0 = "\""; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\"\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| result0 = parse_LineTerminator(); | |
| } | |
| } | |
| reportFailures--; | |
| if (result0 === null) { | |
| result0 = ""; | |
| } else { | |
| result0 = null; | |
| pos = pos2; | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_SourceCharacter(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_EscapeSequence(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, sequence) { return sequence; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| result0 = parse_LineContinuation(); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_SingleStringCharacter() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| if (input.charCodeAt(pos) === 39) { | |
| result0 = "'"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"'\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| result0 = parse_LineTerminator(); | |
| } | |
| } | |
| reportFailures--; | |
| if (result0 === null) { | |
| result0 = ""; | |
| } else { | |
| result0 = null; | |
| pos = pos2; | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_SourceCharacter(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_EscapeSequence(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, sequence) { return sequence; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| result0 = parse_LineContinuation(); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_LineContinuation() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_LineTerminatorSequence(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, sequence) { return sequence; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_EscapeSequence() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| result0 = parse_CharacterEscapeSequence(); | |
| if (result0 === null) { | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 48) { | |
| result0 = "0"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"0\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos2 = pos; | |
| reportFailures++; | |
| result1 = parse_DecimalDigit(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "\0"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| result0 = parse_HexEscapeSequence(); | |
| if (result0 === null) { | |
| result0 = parse_UnicodeEscapeSequence(); | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_CharacterEscapeSequence() { | |
| var result0; | |
| result0 = parse_SingleEscapeCharacter(); | |
| if (result0 === null) { | |
| result0 = parse_NonEscapeCharacter(); | |
| } | |
| return result0; | |
| } | |
| function parse_SingleEscapeCharacter() { | |
| var result0; | |
| var pos0; | |
| pos0 = pos; | |
| if (/^['"\\bfnrtv]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("['\"\\\\bfnrtv]"); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { | |
| return char_ | |
| .replace("b", "\b") | |
| .replace("f", "\f") | |
| .replace("n", "\n") | |
| .replace("r", "\r") | |
| .replace("t", "\t") | |
| .replace("v", "\x0B") // IE does not recognize "\v". | |
| })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_NonEscapeCharacter() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| result0 = parse_EscapeCharacter(); | |
| reportFailures--; | |
| if (result0 === null) { | |
| result0 = ""; | |
| } else { | |
| result0 = null; | |
| pos = pos2; | |
| } | |
| if (result0 === null) { | |
| result0 = parse_LineTerminator(); | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_SourceCharacter(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_EscapeCharacter() { | |
| var result0; | |
| result0 = parse_SingleEscapeCharacter(); | |
| if (result0 === null) { | |
| result0 = parse_DecimalDigit(); | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 120) { | |
| result0 = "x"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"x\""); | |
| } | |
| } | |
| if (result0 === null) { | |
| if (input.charCodeAt(pos) === 117) { | |
| result0 = "u"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"u\""); | |
| } | |
| } | |
| } | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_HexEscapeSequence() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 120) { | |
| result0 = "x"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"x\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_HexDigit(); | |
| if (result1 !== null) { | |
| result2 = parse_HexDigit(); | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, h1, h2) { | |
| return String.fromCharCode(parseInt("0x" + h1 + h2)); | |
| })(pos0, result0[1], result0[2]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_UnicodeEscapeSequence() { | |
| var result0, result1, result2, result3, result4; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 117) { | |
| result0 = "u"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"u\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_HexDigit(); | |
| if (result1 !== null) { | |
| result2 = parse_HexDigit(); | |
| if (result2 !== null) { | |
| result3 = parse_HexDigit(); | |
| if (result3 !== null) { | |
| result4 = parse_HexDigit(); | |
| if (result4 !== null) { | |
| result0 = [result0, result1, result2, result3, result4]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, h1, h2, h3, h4) { | |
| return String.fromCharCode(parseInt("0x" + h1 + h2 + h3 + h4)); | |
| })(pos0, result0[1], result0[2], result0[3], result0[4]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_RegularExpressionLiteral() { | |
| var result0, result1, result2, result3; | |
| var pos0, pos1; | |
| reportFailures++; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 47) { | |
| result0 = "/"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"/\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_RegularExpressionBody(); | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 47) { | |
| result2 = "/"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"/\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result3 = parse_RegularExpressionFlags(); | |
| if (result3 !== null) { | |
| result0 = [result0, result1, result2, result3]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, body, flags) { | |
| return { | |
| type: "RegularExpressionLiteral", | |
| body: body, | |
| flags: flags | |
| }; | |
| })(pos0, result0[1], result0[3]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| reportFailures--; | |
| if (reportFailures === 0 && result0 === null) { | |
| matchFailed("regular expression"); | |
| } | |
| return result0; | |
| } | |
| function parse_RegularExpressionBody() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| result0 = parse_RegularExpressionFirstChar(); | |
| if (result0 !== null) { | |
| result1 = parse_RegularExpressionChars(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_, chars) { | |
| return char_ + chars; | |
| })(pos0, result0[0], result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_RegularExpressionChars() { | |
| var result0, result1; | |
| var pos0; | |
| pos0 = pos; | |
| result0 = []; | |
| result1 = parse_RegularExpressionChar(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_RegularExpressionChar(); | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, chars) { return chars.join(""); })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_RegularExpressionFirstChar() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| if (/^[*\\\/[]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[*\\\\\\/[]"); | |
| } | |
| } | |
| reportFailures--; | |
| if (result0 === null) { | |
| result0 = ""; | |
| } else { | |
| result0 = null; | |
| pos = pos2; | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_RegularExpressionNonTerminator(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| result0 = parse_RegularExpressionBackslashSequence(); | |
| if (result0 === null) { | |
| result0 = parse_RegularExpressionClass(); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_RegularExpressionChar() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| if (/^[\\\/[]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[\\\\\\/[]"); | |
| } | |
| } | |
| reportFailures--; | |
| if (result0 === null) { | |
| result0 = ""; | |
| } else { | |
| result0 = null; | |
| pos = pos2; | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_RegularExpressionNonTerminator(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| result0 = parse_RegularExpressionBackslashSequence(); | |
| if (result0 === null) { | |
| result0 = parse_RegularExpressionClass(); | |
| } | |
| } | |
| return result0; | |
| } | |
| function parse_RegularExpressionBackslashSequence() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 92) { | |
| result0 = "\\"; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"\\\\\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_RegularExpressionNonTerminator(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return "\\" + char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_RegularExpressionNonTerminator() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| result0 = parse_LineTerminator(); | |
| reportFailures--; | |
| if (result0 === null) { | |
| result0 = ""; | |
| } else { | |
| result0 = null; | |
| pos = pos2; | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_SourceCharacter(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_RegularExpressionClass() { | |
| var result0, result1, result2; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.charCodeAt(pos) === 91) { | |
| result0 = "["; | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"[\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_RegularExpressionClassChars(); | |
| if (result1 !== null) { | |
| if (input.charCodeAt(pos) === 93) { | |
| result2 = "]"; | |
| pos++; | |
| } else { | |
| result2 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"]\""); | |
| } | |
| } | |
| if (result2 !== null) { | |
| result0 = [result0, result1, result2]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, chars) { return "[" + chars + "]"; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_RegularExpressionClassChars() { | |
| var result0, result1; | |
| var pos0; | |
| pos0 = pos; | |
| result0 = []; | |
| result1 = parse_RegularExpressionClassChar(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_RegularExpressionClassChar(); | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, chars) { return chars.join(""); })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_RegularExpressionClassChar() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| pos2 = pos; | |
| reportFailures++; | |
| if (/^[\]\\]/.test(input.charAt(pos))) { | |
| result0 = input.charAt(pos); | |
| pos++; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("[\\]\\\\]"); | |
| } | |
| } | |
| reportFailures--; | |
| if (result0 === null) { | |
| result0 = ""; | |
| } else { | |
| result0 = null; | |
| pos = pos2; | |
| } | |
| if (result0 !== null) { | |
| result1 = parse_RegularExpressionNonTerminator(); | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, char_) { return char_; })(pos0, result0[1]); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| if (result0 === null) { | |
| result0 = parse_RegularExpressionBackslashSequence(); | |
| } | |
| return result0; | |
| } | |
| function parse_RegularExpressionFlags() { | |
| var result0, result1; | |
| var pos0; | |
| pos0 = pos; | |
| result0 = []; | |
| result1 = parse_IdentifierPart(); | |
| while (result1 !== null) { | |
| result0.push(result1); | |
| result1 = parse_IdentifierPart(); | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset, parts) { return parts.join(""); })(pos0, result0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_BreakToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 5) === "break") { | |
| result0 = "break"; | |
| pos += 5; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"break\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_CaseToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 4) === "case") { | |
| result0 = "case"; | |
| pos += 4; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"case\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_CatchToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 5) === "catch") { | |
| result0 = "catch"; | |
| pos += 5; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"catch\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_ContinueToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 8) === "continue") { | |
| result0 = "continue"; | |
| pos += 8; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"continue\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_DebuggerToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 8) === "debugger") { | |
| result0 = "debugger"; | |
| pos += 8; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"debugger\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_DefaultToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 7) === "default") { | |
| result0 = "default"; | |
| pos += 7; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"default\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_DeleteToken() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.substr(pos, 6) === "delete") { | |
| result0 = "delete"; | |
| pos += 6; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"delete\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos2 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "delete"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_DoToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 2) === "do") { | |
| result0 = "do"; | |
| pos += 2; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"do\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_ElseToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 4) === "else") { | |
| result0 = "else"; | |
| pos += 4; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"else\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_FalseToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 5) === "false") { | |
| result0 = "false"; | |
| pos += 5; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"false\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_FinallyToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 7) === "finally") { | |
| result0 = "finally"; | |
| pos += 7; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"finally\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_ForToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 3) === "for") { | |
| result0 = "for"; | |
| pos += 3; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"for\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_FunctionToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 8) === "function") { | |
| result0 = "function"; | |
| pos += 8; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"function\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_GetToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 3) === "get") { | |
| result0 = "get"; | |
| pos += 3; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"get\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_IfToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 2) === "if") { | |
| result0 = "if"; | |
| pos += 2; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"if\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_InstanceofToken() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.substr(pos, 10) === "instanceof") { | |
| result0 = "instanceof"; | |
| pos += 10; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"instanceof\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos2 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "instanceof"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_InToken() { | |
| var result0, result1; | |
| var pos0, pos1, pos2; | |
| pos0 = pos; | |
| pos1 = pos; | |
| if (input.substr(pos, 2) === "in") { | |
| result0 = "in"; | |
| pos += 2; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"in\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos2 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos2; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos1; | |
| } | |
| if (result0 !== null) { | |
| result0 = (function(offset) { return "in"; })(pos0); | |
| } | |
| if (result0 === null) { | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_NewToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 3) === "new") { | |
| result0 = "new"; | |
| pos += 3; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"new\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_NullToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 4) === "null") { | |
| result0 = "null"; | |
| pos += 4; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"null\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_ReturnToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 6) === "return") { | |
| result0 = "return"; | |
| pos += 6; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"return\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| } else { | |
| result0 = null; | |
| pos = pos0; | |
| } | |
| return result0; | |
| } | |
| function parse_SetToken() { | |
| var result0, result1; | |
| var pos0, pos1; | |
| pos0 = pos; | |
| if (input.substr(pos, 3) === "set") { | |
| result0 = "set"; | |
| pos += 3; | |
| } else { | |
| result0 = null; | |
| if (reportFailures === 0) { | |
| matchFailed("\"set\""); | |
| } | |
| } | |
| if (result0 !== null) { | |
| pos1 = pos; | |
| reportFailures++; | |
| result1 = parse_IdentifierPart(); | |
| reportFailures--; | |
| if (result1 === null) { | |
| result1 = ""; | |
| } else { | |
| result1 = null; | |
| pos = pos1; | |
| } | |
| if (result1 !== null) { | |
| result0 = [result0, result1]; | |
| } else { | |
| result0 = null; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment